  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



     Gödel

     ·  Web page: www.cs.bris.ac.uk/~bowers/goedel.html

        Gödel 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.  Gödel
        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 Gödel'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 Böhme

             Johann-Heinrich-Abt-Straße 7
             95213
             Münchberg
             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 Böhme
   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 Böhme. 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 Böhme.  All rights reserved.
#
# Author: Uwe Böhme <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 Böhme.
   
   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 Trümper <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 Trümper 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 Jörg 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 Jörg 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 Jörg 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]StjärnTV, 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, São 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. StjärnTV, Stockholm Sweden

   This information is provided by Fredrik Staxaeng
   <[162]fstx@algorithmica.se>:
   
   StjärnTV 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, São 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
  Andrés 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.
  #          "Infovía 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-Telefónica) 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 copy­righted 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 Zurück 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
       française
       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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn ttoo LLiinnuuxx

  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>

  LLiinnuuxx, 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 ddiissttrriibbuuttiioonn of Linux.  The word LLiinnuuxx,
  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> NNoonnee of these distributions is ``the official Linux''.

  Linux is nnoott public domain, nor is it `shareware'.  It is `free'
  software, commonly called ffrreeeewwaarree or OOppeenn SSoouurrccee SSooffttwwaarree[[ttmm]] (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.


  22..  LLiinnuuxx FFeeaattuurreess


  +o  multitasking: several programs running at the same time.

  +o  multiuser: several users on the same machine at the same time (and
     nnoo 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.



  33..  HHaarrddwwaarree IIssssuueess

  33..11..  MMiinniimmaall ccoonnffiigguurraattiioonn

  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.


  33..22..  UUssaabbllee ccoonnffiigguurraattiioonn

  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 ssllooww 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.


  33..33..  SSuuppppoorrtteedd hhaarrddwwaarree


     CCPPUU::
        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.


     AArrcchhiitteeccttuurree::
        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...


     RRAAMM::
        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.


     DDaattaa ssttoorraaggee::
        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.  NN..BB.. These lists are incomplete,
        and always will be.  Distribution vendors maintain more up-to-
        date lists.


     VViiddeeoo::
        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/>)


     NNeettwwoorrkkiinngg::
        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.


     SSeerriiaall::
        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.


     OOtthheerr hhaarrddwwaarree::
        SoundBlaster, ProAudio Spectrum 16, Gravis Ultrasound, most
        other sound cards, most (all?)  flavours of bus mice (Microsoft,
        Logitech, PS/2), etc.


  44..  AAnn IInnccoommpplleettee LLiisstt ooff PPoorrtteedd PPrrooggrraammss aanndd OOtthheerr SSooffttwwaarree

  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:


     BBaassiicc UUnniixx ccoommmmaannddss::
        ls, tr, sed, awk and so on (you name it, Linux probably has it).


     DDeevveellooppmmeenntt ttoooollss::
        gcc, gdb, make, bison, flex, perl, rcs, cvs, prof.


     LLaanngguuaaggeess aanndd EEnnvviirroonnmmeennttss::
        C, C++, Objective C, Java, Modula-3, Modula-2, Oberon, Ada95,
        Pascal, Fortran, ML, scheme, Tcl/tk, Perl, Python, Common Lisp,
        and many others.


     GGrraapphhiiccaall eennvviirroonnmmeennttss::
        GNOME and KDE (desktops), X11R6 (XFree86 3.x), X11R5 (XFree86
        2.x), MGR.


     EEddiittoorrss::
        GNU Emacs, XEmacs, MicroEmacs, jove, ez, epoch, elvis (GNU vi),
        vim, vile, joe, pico, jed, and others.


     SShheellllss::
        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.


     TTeelleeccoommmmuunniiccaattiioonn::
        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.


     NNeewwss aanndd mmaaiill::
        C-news, innd, trn, nn, tin, smail, elm, mh, exmh, pine, mutt,
        etc.


     TTeexxttpprroocceessssiinngg::
        TeX, groff, doc, ez, LyX, Lout, Linuxdoc-SGML, and others.


     GGaammeess::
        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.


  55..  WWhhoo uusseess LLiinnuuxx??

  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/>.


  66..  GGeettttiinngg LLiinnuuxx

  66..11..  AAnnoonnyymmoouuss FFTTPP

  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.


  66..22..  CCDDRROOMM

  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 lloonngg 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.




  66..33..  OOtthheerr mmeetthhooddss ooff oobbttaaiinniinngg LLiinnuuxx

  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.



  77..  LLeeggaall SSttaattuuss ooff LLiinnuuxx

  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).


  88..  NNeewwss AAbboouutt LLiinnuuxx

  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 kkeerrnneell
  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, ddoo nnoott crosspost between the Linux newsgroups.  The oonnllyy
  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/>


  99..  TThhee FFuuttuurree

  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 (NNOOTT the subject) of the message.


  1100..  TThhiiss ddooccuummeenntt

  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/>


  1111..  LLeeggaalleessee

  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 Rodríguez, 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 Bächle, 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 Fahrvergnügen.
  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 Bächle (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 Bächle
  (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 Portégé 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 Nordgård-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 König <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 don´t 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 it´s 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 don´t 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,
  don´t 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 Björn 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 Tekijänoikeuksista ja kopioinnista
     1.3 Tekstin esitystavasta
     1.4 Kiitokset

  2. Näppäimistöasetukset

     2.1 Perusnäppäimistö
     2.2 ISO Latin-1 -merkistö
     2.3 Näppäimistökartan parantelua

  3. Pääteasetukset

  4. Ympäristön lokaaliasetukset

  5. Aikavyöhykeasetukset

  6. X11R6

  7. Eräiden 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?

  Tämä dokumentti kertoo, mitä pitäisi tehdä Linuxin suomettamiseksi sen
  jälkeen kun käyttöjärjestelmä perussovelluksineen on asennettu
  koneeseen jostain Linux-jakelusta. Näin saadaan suomalaiset kirjaimet,
  näppäimistö ja muut paikalliset asetukset toimimaan oikein.
  Lähtökohtana on Slackware- tai RedHat-jakelusta asennettu Linux-
  järjestelmä, mutta ohjeista on todennäköisesti apua myös muiden Linux-
  jakeluversioiden käyttäjille.

  Varsin suuri osa ohjeista pätee Linuxin lisäksi muissakin Unix-
  tyyppisissä järjestelmissä. Sama toimii myös toisinpäin: jos et löydä
  etsimääsi tietoa tästä dokumentista, tutki muita FAQ- jne. tiedostoja
  (ks.  esim. Linuxin HOWTO-dokumentit sekä viitteet [``UNIXHelp''] ja
  [``faqs'']). Tämän dokumentin viitteissä on, mikäli mahdollista,
  käytetty kotimaisia peilauksia ulkomailla sijaitsevien alkuperäisten
  tiedostovarastojen asemesta.

  Tässä ohjeessa ei ole yleensä eritelty root-käyttäjän ja tavallisen
  käyttäjän tekemiä asetuksia. Jotkut ohjeista ovat siis ainoastaan
  ylläpitäjän heiniä ja vaikuttavat koneen kaikkiin käyttäjiin, jotkut
  taas ovat tavallisen käyttäjän itselleen tekemiä asetuksia.  Linux-
  koneissa ylläpitäjä ja käyttäjä ovat usein - mutta eivät aina - sama
  henkilö. Hyvin monet asetukset voi tehdä molemmilla tavoilla; esim.
  kaikkien käyttäjien oletukset hakemistossa  /etc oleviin tiedostoihin
  ja käyttäjän omat asetukset kotihakemistossa  $HOME oleviin pisteellä
  alkaviin tiedostoihin.


  1.2.  Tekijänoikeuksista ja kopioinnista

  Copyright © 1996 by Pekka Taipale. Tätä dokumenttia saa kopioida ja
  levittää muuttamattomana vapaasti. Jos levität muutettua tai
  lyhennettyä versiota dokumentista, tätä tekijänoikeusmerkintää ei saa
  poistaa.  En ota vastuuta mahdollisista virheistä enkä varsinkaan
  muiden muuttamista versioista. Jos teet dokumenttiin lisäyksiä tai
  korjauksia, merkitse selvästi oma työsi. Parasta olisi, jos
  lähettäisit korjausehdotuksesi minulle osoitteeseen  pjt@iki.fi
  jolloin ne voidaan ottaa mukaan alkuperäiseen tekstiin.


  1.3.  Tekstin esitystavasta

  Tämä HOWTO on kirjoitettu SGML-muodossa. HTML-, TeX- ja tekstiversiot
  generoidaan SGML:stä Linuxdoc-SGML -ohjelmalla [``Linuxdoc'']. Tämän
  tekstin ulkopuolelle osoittavat viittaukset (HTML-versiossa linkit) on
  koottu yhteen paikkaan, ks. luku ``Aiheeseen liittyvää materiaalia''.
  Muualla dokumentissa olevat linkit ovat ristiinviittauksia dokumentin
  sisällä. Näin on menetelty siksi, että olisi helpompi hahmottaa,
  milloin HTML-version linkin seuraaminen on viemässä lukemaan jotakin
  muuta dokumenttia ja milloin se on ristiinviittaus tämän HOWTO:n
  sisällä.



  1.4.  Kiitokset

  Kiitos kaikille kommentteja ja korjauksia esittäneille.  Erityisesti
  mainittakoon Tuomas Aura, Tuomas Eerola, Timo Korvola, Jaakko Ruohio,
  Jani Tammi ja Lars Wirzenius.



  2.  Näppäimistöasetukset

  2.1.  Perusnäppäimistö

  Tässä kerrotaan tekstikonsolin näppäimistöasetuksista. X-ympäristöstä
  on tietoa luvussa ``X11R6''.

  Jos näppäimistösi on Linuxin asennuksen jäljiltä amerikkalaista
  mallia, olet ohittanut näppäimistökartan valinnan asennusohjelmassa.
  Näppäimistökartaksi kannattaa valita ISO Latin-1-merkkejä (ks. kohta
  ``alla'') tuottava kartta  fi-latin1. Seitsemänbittinen fi-kartta on
  poistumassa käytöstä eikä sitä kannata käyttää jos siihen ei ole
  erityistä tarvetta.

  Slackware-järjestelmissä näppäimistökartan voi asettaa lisäämällä
  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-järjestelmissä asetus tehdään tiedostoon
   /etc/rc.boot/console.

  Näppäimistökarttatiedostot ovat yleensä hakemistossa
  /usr/lib/kbd/keytables. Mikäli fi-latin1 -karttaa ei löydy tästä
  hakemistosta, etsi esim. Slackware-jakelun keytbls-paketti.
  Ruotsalaiset käyttävät samaa näppäimistökarttaa kuin suomalaiset.


  2.2.  ISO Latin-1 -merkistö

  Suomenkielinen teksti kirjoitetaan Linux-ympäristössä ISO Latin-1
  -merkistöllä, joka käyttää 7-bittisiä ASCII-merkkejä englannin
  perusaakkosten näyttämiseen ja 8-bittisiä ns.  ISO-skandeja
  suomalaisiin kirjaimiin å, ä, ö jne.  Myös mm. MS Windows käyttää
  samaa merkistöä. Lisätietoja löytyy Timo Kiravuon merkistöohjeesta
  [``skandit''] ja Jukka Korpelan ISO-Latin-1-merkkejä käsittelevästä
  tekstistä [``ISO-latin1''].

  Jos fi-latin1 -näppäimistöllä ä:n ja ö:n painalluksista tulee d- ja v-
  kirjaimia, hukkuu kahdeksas bitti jonnekin. Ks. Pääteasetukset-kohta
  (``'') sekä rlogin (``'') ja telnet (``''). Jos skandien painaminen
  aiheuttaa piippauksia tai mitään ei tapahdu, sovellus (esim.
  komentotulkki) ei huoli 8-bittisiä merkkejä. Katso sovelluksien
  kohdalta komentotulkkisi asetukset (kohdat ``bash'' ja ``tcsh'').



  2.3.  Näppäimistökartan parantelua


  Timo Korvola ehdottaa:

  Gravea, tildeä ja sirkumfleksia tarvitaan sen verran usein, että
  elämän helpottamiseksi voi tehdä fi-latin1.map:in lataamisen jälkeen
  vaikkapa näin:



       ______________________________________________________________________
       loadkeys << '@loadkeys'
         keycode 5 = four currency dollar
         keycode 13 = dead_acute grave
         keycode 27 = dead_diaeresis asciicircum asciitilde
         keycode 97 = Compose
       @loadkeys
       ______________________________________________________________________



  Tämä korjaa myös shift 4:n tuottamaan valuuttamerkin siten kuin
  näppäimistössä lukee. Oikeasta controlista tehdään compose, jolla voi
  tuottaa vaikkapa è:n näppäilemällä compose ` e.

  Konsolin näppäinkoodit saa helposti selville ohjelmalla showkey.


  3.  Pääteasetukset

  8-bittisten suomalaisten merkkien toimiminen vaatii, että pääteyhteys
  on 8-bittinen. Yleensä Linux-koneen näppäimistöllä ja päätelinjoilla
  näin onkin, mutta mikäli ei ole, asetus saadaan päälle 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.  Ympäristön lokaaliasetukset

  Lokaaliasetusten tarkoitus on saada ohjelmat noudattamaan esimerkiksi
  eri kielten erilaisia aakkosjärjestyssääntöjä ja muita käytäntöjä.
  Lokaalit vaikuttavat mm. kellonaikojen ja päivämäärien tulostusmuotoon
  ja tietueiden lajittelujärjestykseen eri ohjelmia käytettäessä -
  mikäli 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-merkistölokaalia ISO-8859-1. Oikea lokaaliasetus Suomessa on
  finnish.iso88591. Lokaali asetetaan ympäristömuuttujien 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 käyttöön.  Lokaalin asetus voi olla myös
  epäviisasta, koska esim.  päivämäärätulostuksen 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 välttämättä
  järkevää, mutta LC_CTYPE ja LC_COLLATE kannattaa asettaa
  suomalaiseksi. Esim. tcsh vaatii LC_CTYPE-asetuksen, jotta 8-bittiset
  merkit toimisivat.

  Jos käytät komentotulkkina csh-varianttia (kuten tcsh), haluat
  todennäköisesti tehdä asetuksen tiedostossa /etc/csh.cshrc tai
  $HOME/.cshrc:



       ______________________________________________________________________
               setenv LC_CTYPE finnish.iso88591
       ______________________________________________________________________



  Jos taas käytät sh-varianttia (kuten bash tai pdksh), kirjoita
  tiedostoon  /etc/profile tai  $HOME/.profile:



       ______________________________________________________________________
               export LC_CTYPE=finnish.iso88591
       ______________________________________________________________________



  5.  Aikavyöhykeasetukset

  Linux-koneen CMOS-kello voi osoittaa joko UTC-aikaa - kuten UNIX-
  koneissa on yleensä tapana - tai paikallista aikaa. (UTC on
  kansainvälinen normaaliaika, suunnilleen sama kuin Greenwich Mean Time
  eli GMT.) Linux-jakelut olettavat yleensä kellon käyvän paikallista
  aikaa, koska MS-DOS ja muut tavalliset PC-käyttöjärjestelmät eivät
  tunne aikavyöhykkeitä. Tällöin Linuxin käynnistystiedostoissa - 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, käyttöjärjestelmä huolehtii ajan
  näyttämisestä oikein mm. kesäaikaan siirryttäessä, kunhan aikavyöhyke
  on asetetty oikein.  Jos CMOS-kello on paikallisessa ajassa, kesä- ja
  talviaikoihin siirtymiset on tehtävä käsin. CMOS-kellon aikaa voi
  muuttaa joko CMOS-setupista käsin tai sitten Linuxissa clock-
  komennolla (ks.  man 8 clock).

  Suomen aikavyöhyke on EET (Eastern European Time).  Aikavyöhykkeen voi
  asentaa käyttöjärjestelmän asennuksen yhteydessä; mikäli et tehnyt
  sitä tai teit sen väärin, voit tehdä asetuksen root-tunnuksella
  komennolla



       ______________________________________________________________________
       ln -s /usr/lib/zoneinfo/Europe/Helsinki /usr/lib/zoneinfo/localtime
       ______________________________________________________________________



  (Vanhemmissa Linux-jakeluissa ei ole Helsinki-vyöhykettä; käytä
  EET:tä).

  Yleensä systeemin oletusaikavyöhykkeen asettaminen riittää. Jos
  yksittäinen käyttäjä tarvitsee erilaisen aikavyöhykkeen, sen voi
  asettaa käyttäjäkohtaisesti TZ-muuttujalla.  POSIX-käytäntö on, että
  TZ-asetus on muotoa EET-2EETDST, mikä tarkoittaa, että aikavyöhyke on
  EET, se on kaksi tuntia edellä GMT:tä, ja kesäaikaan siirrytään
  EETDST-säännön mukaan. Asetus saadaan aikaan komentotulkin
  alustustiedostossa, esim.  bash-käyttäjille lisäämällä kotihakemiston
   .profile-tiedostoon rivi



       ______________________________________________________________________
       export TZ=EET-2EETDST
       ______________________________________________________________________



  6.  X11R6

  XFree86 saa näppäimistökarttansa Linuxin konsolilta. Useimpien
  näppäinten (ml. ä ja ö) pitäisi toimia suoraan oikein, kun konsolin
  näppäimistökartta on asetettu. "Kuolleiden" näppäinten määrityksiä
  (dead_acute, dead_diaeresis ym.) ei kuitenkaan saada konsolilta, joten
  lopputulosta täytyy hieman paikkailla.

  Jos kone on konfiguroitu käynnistämään xdm eli käyttäjä ei
  kirjoittaudu sisään virtuaalikonsolille vaan suoraan X11:aan, voi olla
  tarpeen asettaa koko suomalainen näppäimistökartta .Xmodmap-
  tiedostossa.

  Mikäli AltGr-näppäin 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 käynnistysskriptit ajavat yleensä xmodmap-ohjelman, joka muuttaa
  X:n näppäimistökarttaa käyttäjän
   .Xmodmap-tiedoston perusteella.  .Xmodmap-tiedosto voi näyttää esim.
  tältä:



       ______________________________________________________________________
       keycode  13 = 4 currency dollar
       keycode  21 = acute grave
       keycode  35 = dead_diaeresis asciicircum asciitilde
       ______________________________________________________________________



  Tässä näppäimeen, jonka näppäinkoodi on 13 (näppäimistön päälohkon
  numeronäppäin 4) sidotaan merkit 4, valuuttamerkki ja $, jotka
  tulevat, kun ko. näppäintä painetaan yksinään, shiftin kanssa ja
  AltGr-näppäimen kanssa.

  Näppäimeen 21 (Backspace-näppäimen vieressä) sidotaan hipsumerkit ja
  näppäimeen 35 (å:n ja Enterin välissä) 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 käyttöön komennolla



       ______________________________________________________________________
       xmodmap .Xmodmap
       ______________________________________________________________________



  Ks.  man xmodmap. Huomaa, että emacs saattaa kohdella näppäimiä
  poikkeavasti. X:n alla näppäinkoodit saa selville ohjelmalla  xev.

   Esimerkki X11-näppäimistökartasta

  Tämän 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.  Eräiden sovellusten asetukset

  Tähän ei ole kerätty kaikkia mahdollisia sovelluksia; lisäapua voi
  löytyä esim. German-HOWTO:sta [``german''].


  7.1.  bash

  Tee kotihakemistoosi tiedosto  .inputrc, ja laita sinne nämä rivit:



  ______________________________________________________________________
  set meta-flag on
  set convert-meta off
  set output-meta on
  ______________________________________________________________________



  Tämän jälkeen komentotulkki huolii 8-bittiset merkit ja näyttää ne
  oikein.

  bash lukee käynnistyessään useita eri tiedostoja. .profile,
  .bash_login ja  .bash_profile luetaan ainoastaan
  sisäänkirjoittautumisen (login) yhteydessä; .bashrc taas suoritetaan
  aina kun bash käynnistyy (myös esim. xterm-ikkunassa).


  7.2.  tcsh

  tcsh käyttää 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 kääntää tcsh:n itse, tai
  kopioida tcsh-binäärin 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 käytät
  tätä versiota, poista se ja asenna uudempi versio. Myös emacs 19.30
  toimii väärin jos se on käännetty 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 pitäisi näyttää tältä:



       ______________________________________________________________________
       masina set outbinary
       hissi.kone.fi set outbinary
       ______________________________________________________________________



  Voit myös antaa käynnistettäessä option  -8 tai asettaa binäärimoodin
  telnet-istunnon aikana painamalla telnetin escape-merkkiä (ei ESC-
  näppäin vaan telnetin escape character, oletuksena  C-] joka löytyy
  yleensä näppäilemällä Ctrl-5) ja antamalla komennon.  Ks.  man telnet.



  7.5.  rlogin

  rlogin-komennossa pitää antaa optio  -8 jotta 8-bittiset merkit
  kulkisivat yhteyden läpi. Ks.  man rlogin.



  7.6.  joe

  joe tarvitsee option  -asis jotta se kohtelisi merkkejä 8-bittisinä.

  Poista välilyönti joerc-tiedostosta sen rivin alusta, jolla lukee
  -asis. Kaikkien käyttäjien yhteinen joerc-tiedosto on yleensä
  /usr/lib/joe/joerc ja käyttäjäkohtainen tiedosto $HOME/.joerc.



  7.7.  less

  Aseta ympäristömuuttuja LESSCHARSET arvoon latin1:



       ______________________________________________________________________
       export LESSCHARSET=latin1
       ______________________________________________________________________



  tai vastaava C-shellin komento.


  7.8.  irc


   Tämän kirjoitti Jani Tammi (jantam@utu.fi).

  Laita  .ircrc-tiedostoon rivi:



  ______________________________________________________________________
          set eight_bit_characters on
  ______________________________________________________________________



  Tämän lisäksi saatat tarvita myös komennon



       ______________________________________________________________________
               /set translation latin_1
       ______________________________________________________________________



  Huomaa, että tämä 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
  käyttämällä babel-pakettia, joka on siis syytä valita asennettavaksi
  TeXiä asennettaessa.

  TeXistä on kaksi Linux-järjestelmissä yleisesti käytettyä jakelua:
  NTeX ja teTeX. NTeX tulee Slackwaren ja teTeX RedHatin mukana. teTeX
  on näistä helpompi konfiguroida.

  TeXin hakemistopolut ja konfigurointi vaihtelevat jakelusta toiseen.
  Voit joutua tekemään asiat jakelusta riippuen hyvinkin paljon tästä
  ohjeesta poikkeavalla tavalla.


  7.11.1.  NTeX

  Tässä opasti Tuomas Aura (Tuomas.Aura@hut.fi):

  LaTeXissa (2e) ei ole valmiina suomenkielistä tavutusta, vaan se on
  käännettävä itse. Tämä tapahtuu seuraavasti (root-käyttäjänä):


  ·  Etsi tiedosto  language.dat (Slackwaren NTeXissä
     /usr/lib/texmf/tex/latex/cfg/language.dat) ja editoi sitä. Valitse
     enintään 4 kieltä ja poista niiden edestä kommenttimerkki %.
     Slackware 3.0:n NTeX:issä on kielen nimi "finnish" kirjoitettu
     väärin: "finish". Tämä 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

       ______________________________________________________________________



  ·  Näin syntyy tiedosto  latex.fmt. Kopioi se LaTeXin ini-hakemistoon,
     esim. NTeXissä:


       ______________________________________________________________________
               mv latex.fmt /usr/lib/texmf/ini/

       ______________________________________________________________________

  Nyt pitäisi 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ä pitäisi lukea jotain tämän
  tapaista:



       ______________________________________________________________________
       \documentclass[a4paper,finnish]{article}
       \usepackage{t1enc,isolatin1,babel}
       ______________________________________________________________________



  LaTeX2e <1994/12/01> -formaatilla ja uudemmilla toimii myös hienompi
  ratkaisu:



       ______________________________________________________________________
       \documentclass[a4paper, finnish]{article}
       \usepackage{babel}
       \usepackage[latin1]{inputenc}
       \usepackage[T1]{fontenc}
       ______________________________________________________________________



  Näillä otsikoilla pitäisi suomalaisen tavutuksen ja kirjainten toimia
  oikein, mikäli TeX-jakelu on asennettu ja konfiguroitu oikein. Tässä
  ei neuvota LaTeX-dokumenttien tekemistä tarkemmin. Jukka Korpelan
  TKK:lle tekemästä 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
  järjestelmät) on järkevintä lähettää 8-bittisiä ISO Latin1-skandeja
  silloin kun kirjoitetaan suomeksi tai ruotsiksi.

  Postiohjelmat kuten elm ja pine näyttävät Latin1-merkit oikein, kun ne
  on konfiguroitu sovellusten kohdalla kuvatulla tavalla (ks. kohdat
  ``elm'' ja ``pine'').  Jäljellä 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ä sisältö on 8-bittistä tekstiä.
  Tämä tapahtuu liittämällä lähteviin viesteihin seuraavat MIME-
  standardin [``RFC1521''] mukaiset otsikot. Tämä edellyttää, että
  kaikki viestiä välittävät koneet kykenevät käsittelemään 8-bittistä
  tietoa viestin rungossa.  Suomi on jo jokseenkin läpeensä 8-bittinen,
  mutta erityisesti USA:sta löytyy vielä runsaasti 7-bittisiä
  postijärjestelmiä, jotka ovat postistandardin RFC822 mukaisia
  [``RFC822'']. Näiden kanssa on yleensä tyydyttävä käyttämään QP-
  koodausta (ks. ``MIME Quoted Printable-koodaus'').  Tavallisesti
  seuraavat otsikot ja 8-bittiset merkit kuitenkin riittävät:



       ______________________________________________________________________
       Mime-Version: 1.0
       Content-Type: text/plain; charset=ISO-8859-1
       Content-Transfer-Encoding: 8bit
       ______________________________________________________________________



  Esim. elm-ohjelmassa nämä 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''].  Näitä kutsutaan usein sattuvasti myös
  nimellä Quoted Unreadable.

  QP-koodattuja viestejä ei kannata lähettää, jos 8-bittisten merkkien
  lähettäminen 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 binääridataa sisältävät 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 käyttää metamailia suoraan, mikäli
  metamail on polun varrella eli ajettavissa.  emacs-pohjaiset posti- ja
  nyyssisovellukset saattavat tarvita tiedon metamailin sijainnista
  .emacs-tiedostossa esim. näin:



  ______________________________________________________________________
  (setq metamail-program-name "/usr/local/bin/metamail")
  ______________________________________________________________________



  9.  Aiheeseen liittyvää materiaalia

  Seuraavat dokumentit voivat olla hyödyllistä luettavaa näiden
  ongelmien kanssa painiessasi:


  1.  [skandit]

     Suomalaiset merkit tietokoneissa, Timo Kiravuo:

     <http://www.nixu.fi/~kiravuo/skandit.html>

  2.  [ISO-latin1]

     ISO-Latin-1-merkistöstä, 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 française
  Écrit par Guylhem Aznar, <guylhem(à)oeil.qc.ca>
  v3.2 ; Décembre 1999

  Copyright © 1997, 1998, 1999, Guylhem Aznar ; librement distribuable
  selon les termes du LDP.  Toutes les marques citées appartiennent à
  leurs propriétaires respectifs.
  ______________________________________________________________________

  Table of Contents



  1. Présentation

     1.1 Introduction
     1.2 Fichiers utilisés dans ce HOWTO
     1.3 Les Français ne sont pas les seuls francophones !
        1.3.1 a) Différentes 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 problèmes

     2.1 Présentation
     2.2 Solutions
     2.3 Aider

  3. Le vocabulaire : petit lexique

     3.1 8 bits
     3.2 La police de caractères
     3.3 Les polices de caractères
     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. Réglage du clavier sous Linux

     4.1 Introduction
     4.2 Attention au stty !
     4.3 Faire de ces modifications les défauts au démarrage
     4.4 Polices de caractère
     4.5 Vieilles versions
     4.6 Améliorations spécifiques au clavier français latin9
        4.6.1 a) carré/cube
        4.6.2 b) dollar / livre / symbole monétaire 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 (recommandée)
        5.3.3 c) Solution du compose
        5.3.4 d) Solution modifiant la libX11
        5.3.5 e) Est-ce nécessaire ?
     5.4 « latin9 » ou « latin1 » ?
     5.5 Table de correspondances
     5.6 Les polices ISO 8859-15 latin 9 sous X

  6. Réglage 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 possibilités Unicode
     6.3 Les locales, messages en Français
     6.4 Son linux en français
     6.5 Les variables
     6.6 Les caractères 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. Réglage 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.  Présentation



  1.1.  Introduction


  Ce document a été rédigé pour aider à configurer un ordinateur doté du
  système d'exploitation Linux pour des utilisateurs francophones.

  Il y est expliqué par exemple comment configurer périphériques et
  applications afin de prendre en compte les particularités et les
  spécificités de notre langue...

  Toutefois, ce document ne traite pas de l'installation du système
  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 apprêtiez
  maintenant à mieux la configurer ; veuillez donc vous référer à
  d'autres HOWTOs pour l'installation.

  Les adresses électroniques ont été volontairement supprimées ou
  modifiées en remplaçant les « a enroulés » par des « (à) » afin
  d'éviter les publipostages très gênants.

  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
  employés tout au long de ce document.


  1.2.  Fichiers utilisés dans ce HOWTO


  Tous les fichiers cités dans ce HOWTO, sont disponibles sous licence
  GPL sur ma page

  Je vous recommande de télécharger tous ces fichiers pour les utiliser
  selon les exemples proposés.


  1.3.  Les Français ne sont pas les seuls francophones !



  1.3.1.  a) Différentes versions


  Pour chaque manipulation dépendant du pays concerné, un certain nombre
  de versions peuvent être proposées :


  ·  une canadienne normalisée (cn)

  ·  une belge wallonne (be)

  ·  une française (fr)

  ·  une québécoise (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 bénéficier
  de l'étendue des caractères 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 françaises,
  j'invite les lecteurs luxembourgeois à se reporter aux exemples
  français.

  1.3.4.  d) Le Canada : 3 claviers


  Il est classique de parler des claviers « canadien international »,
  surtout destinés aux anglophones (qui leur préfèrent toutefois les
  claviers QWERTY standard) et les claviers « canadien français », aux
  lettres accentuées.

  Mais, de nouveaux claviers dits « canadiens normalisés » ont fait leur
  apparition récemment pour fusionner les modèles « canadien
  international », non concerné par le cadre du Francophones HOWTO, et «
  canadien français ».

  Ces nouveaux claviers répondent aux normes CAN/CSA Z243.200-92 et ISO
  9995-7 ; ils sont prévus pour être utilisés dans n'importe quelle
  langue, en remplaçant par exemple les intitulés des touches par des
  pictogrammes : « Del », en anglais, qui se traduisait par « Suppr » en
  français devient ainsi trois barres obliques fines orientées sud-
  ouest/nord-est.

  Plus d'explications sont disponibles sur le site de l'Office de la
  Langue Française.

  Toutefois je n'ai pas pu réussir à me procurer un tel clavier ; mes
  fichiers de configuration sont donc uniquement basés sur les
  (illustrations) et les normes théoriques, et non les normes pratiques.

  Par exemple, si j'ai compris que la touche « Control » de droite est
  utilisée comme une « AltGr » mais sert à obtenir encore d'autres
  caractères, je n'ai aucune idée du comportement de ces touches lorsque
  seule l'autre a une sérigraphie prévue...

  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 recommandées par ce document ne peuvent être
  effectuées que sous le compte privilégié « root » ; la plus grande
  prudence est alors de rigueur car toute action inadéquate peut mettre
  en péril le contenu des disques.

  Sauvegarder les fichiers existants, par exemple en les copiant sous le
  même nom suivi du préfixe .old, avant de les modifier ou remplacer.


  1.4.2.  b) CHERCHER


  Le paquetage GNU nommé "find" offre un programme appelé locate, grâce
  auquel l'utilisateur peut retrouver le nom complet, chemin de
  répertoires, d'un fichier dont il ne connaît que le nom.

  Certaines distributions Linux fournissent cela en /usr/bin/locate.

  En tant que root, lancer updatedb invoque un find / sur les disques
  montés 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 problèmes



  2.1.  Présentation


  Le problème de tout utilisateur francophone après l'installation de
  Linux est de lui faire comprendre qu'il utilise des normes différentes
  des standards par défaut états-uniens..

  Cela a des conséquences sur :


  ·  la police de caractères donc les caractères spéciaux que l'on
     utilise, accentués comme É È À Ç ou bien ligaturés comme Æ , voire
     « e dans l'o » qui vient d'apparaître sous Linux grâce à la norme
     ISO-8859-15 aussi nommée latin-9

  ·  la correspondance entre la sérigraphie 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
     défaut

  ·  le format de page pris en charge par les programmes que vous
     utilisez pour imprimer, différent entre les États-Unis; (14×8,5
     pouces pour du papier dit légal) et l'Europe (29,7×21 cm pour des
     feuilles a4)

  ·  le format des dates et de l'heure, la position des jours et des
     mois étant variable selon les régions de la francophonie

  ·  le format de la monnaie, aussi variable selon les francophones

  ·  la langue utilisée pour les messages d'erreur


  2.2.  Solutions


  Tout est préconfiguré pour un états-unien : bien que ceux-ci ne
  représentent pas la majorité de la population mondiale, ils ont été
  précurseurs en informatique.

  Il faut donc se faire reconnaître comme une « exception » par les
  différents 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 système très ouvert
  à des modifications de toutes sortes et comme vous allez le découvrir
  au fil de ce document, et il est assez simple d'obtenir un résultat
  très 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'hésitez 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 caractères sont dits « 8 bits » s'ils correspondent à des accents
  ou à des signes spéciaux comme « § », non inclus dans le standard
  ASCII « 7 bits ».

  Ce standard, sans accents ni caractères spéciaux, correspond aux 128
  (2^7) premiers caractères des 256 (2^8), de 0 à 255.

  Pour des raisons historiques (place disponible, inutilité pour les
  états uniens) seuls les 128 (2^7) premiers caractères ont été
  normalisés par l'ASCII : par exemple le A qui est le 65e caractère de
  la table ASCII s'écrit 0100 0001 en notation binaire.

  Pour les caractères situés hors de la norme ASCII, différentes «
  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 224ème
  caractère équivalent noté « eb » en hexadécimal correspond à « ë ».


  3.2.  La police de caractères


  Une police de caractères est une correspondance entre des codes
  informatiques et des caractères (alphanumériques...) affichables par
  l'ordinateur.

  La police de caractères est l'ensemble des représentations graphiques
  des caractères d'un standard.


  3.3.  Les polices de caractères


  Il existe plusieurs polices de caractères 8 bits pouvant répondre au
  besoins des francophones.

  Je vous recommande de lire à ce sujet l'excellent site de Roman
  Czyborra qui a fait une thèse sur ce sujet et qui vous donnera une
  explication fort détaillée

  Pour résumer, il est nécessaire de choisir une police de caractères
  pour que tous les caractères français 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 caractère accentué (comme l'Anglais, le
     Malais et l'Indonésien), 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 départ), mais il
     ne me semble pas que ce soit dans Latin 1.

     Dans la pratique, bien sûr, les Afrikaaner utilisent Latin 1 ; la
     même 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, Tchèque, Slovaque, Slovène, 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
     problème pour le Roumain, car le Latin 2 contient formellement les
     caractères avec une cédille, quand en roumain on utilise une
     virgule souscrite.

  ·  ISO 8859-3 : latin 3 : Espéranto et Maltais.

     Initialement, c'était prévu pour les langues d'Europe du Sud, y
     compris le Turc, les langues d'Espagne (donc Catalan, Basque), le
     Français.

     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 plutôt 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'Azéri, 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 caractères, et le public
     concerné est de toute manière assez limité.

  ·  ISO 8859-11 : Thai.

     Pas encore officiellement adopté.

  ·  ISO 8859-12 : Indien (n'existe pas encore).

     Prévu 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 réduit en utilisation aux langues
     baltes et à l'Este ou Estonien.

  ·  ISO 8859-14 : latin 8 : langues celtes.

     Pour le Breton, le Gaélique et les dialectes parlées au Pays de
     Galles et en Irlande.

  ·  ISO 8859-15 : latin 9 : comme latin 1, en y comblant quelques
     manques.

     Pour le Français, 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-européenne utilisée par la
     majorité des systèmes UNIX, elle permet de disposer de tous les
     caractères Français sauf les « o e liés », l'euro et l'y tréma
     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 européenne, il s'agit d'une
     version révisée de l'ISO 8859-1 latin 1 pour inclure tous les
     caractères des pays européens ; ainsi on y retrouve les caractères
     Français manquant, l'euro, et des caractères finlandais manquants.

  ·  latin 0 : l'ISO 8859-15 latin 9 est souvent incorrectement abrégée
     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 complète de ce standard

  ·  cp1252 : équivalent sous Windows de cette police, aussi
     incompatible, qui apporte les mêmes caractères manquants, du fait
     d'une révision récente de cette norme.

  ·  ISO 8859-9 latin 5 : police officielle en Turquie et en Hollande,
     où les caractères Islandais peu utilisés ont été remplacés par les
     caractères turcs.

  ·  cp1254 : équivalent sous Windows de cette police, aussi
     incompatible, qui apporte les caractères manquant au Français
     précédemment cités et remplace les caractères Islandais peu
     utilisés par les caractères turcs.

  Les choix de polices de caractères sont souvent des questions ou la
  raison se heurte aux habitudes.

  Pour ma part, si vous hésitez, je vous recommande l'ISO 8859-15 latin
  9, pour diverses raisons :


  ·  Il supporte l'intégralité des caractères utilisés en Français de
     manière 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 européenne si
     l'Unicode, évolution du 8 bits, n'est pas disponible

  ·  Il permet d'écrire des textes avec l'intégralité des caractères
     utilisés 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 système 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 décidez
  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 répandu : 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
  résultat 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 français AZERTY ont une table de clavier
  différente 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 caractères 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 début/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
  représentés par des flèches aux traits appuyés.

  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
  associée à la touche, en l'occurence« "\e[4  » pour « End ».

  Lorsque bash ou un autre programme reçoit 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 premières lignes permettent d'afficher les caractères 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
  caractères en elles-mêmes, mais qui modifient la façon dont la frappe
  suivante va être interprétée, par exemple, le tréma ou l'accent
  circonflexe sont en général 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 Français et en AltGr
     de ù pour les Belges, l'accent grave en AltGr de 7 pour les
     français & en AltGr de carré/cube pour les Belges, le tréma et
     l'accent circonflexe tous deux à côté du P

  ·  sf et usx: les accent aigus, graves, circonflexes, les trémas et la
     tilde

  ·  qc: les accent graves, circonflexes, les trémas et la cédille


  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 fréquemments mélangées, au mieux fonctionnant à l'identique, au
  pire ne fonctionnant pas du tout.

  Commençons donc par bien les définir :


  ·  BackSpace : touche placée en haut à droite du pavé principal, au
     dessus d' « Entrée », au cabochon marqué d'une flèche 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 orientées sud-ouest/nord-est.

  Le pavé numérique offre une touche au marquage identique et à effet
  identique lorsque « Verr Num » ou « Num Lock » est désactivé.

  Ces deux touches correspondent chacune à un de ces codes :


  ·  BS : caractère ASCII 0x08, ou control-h.

  ·  DEL : caractère ASCII 0x7F, ou control-?

  ·  ^D : caractère 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, basée sur des
  fuseaux.

  La France se trouve en zone MET, « heure moyenne européenne » soit
  GMT+1 ; la zone « MET DST » correspond à l'heure d'été activée soit
  GMT+2.


  ·  GMT est l'heure solaire moyenne de Greenwich. L'heure est comptée à
     partir de midi et est donc décalée de 12 h  par rapport au temps
     universel. GMT est basée sur la rotation de la terre, ce n'est donc
     pas un temps régulier. 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 méridien zéro. Il est basé sur des étalons
     atomiques, mais des secondes intercalaires sont ajoutées
     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, défini à Paris, qui sert de référence aux
  différentes heures légales.

  L'acronyme « GMT » est employé 99% du temps pour désigner UTC, mais
  c'est une erreur ou un abus de langage.

  Enfin, à titre purement indicatif, il existe l'heure astronomique,
  aussi comptée sur des étalons atomiques mais décalée 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.  Réglage 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 français 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 recommandées 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
  caractère.

  Les tables ici fournies fonctionnent correctement et ne nécessitent
  donc pas de stty erase qui risquerait surtout de perturber leur bon
  fonctionnement !

  Supprimez-donc ces lignes de vos fichiers d'initialisation de
  l'interpréteur de commandes « shell », comme .bashrc, .bash_profile ou
  .tcshrc .


  4.3.  Faire de ces modifications les défauts au démarrage



  D'habitude, loadkeys est exécuté par des scripts au démarrage ; 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 lançant loadkeys ; il vous
  suffit alors de l'éditer pour que vos modifications soient désormais
  prise en en compte à chaque démarrage.

  Les distributions RedHat et Debian constituent des exceptions : la
  table de clavier par défaut étant définie 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 modèle de clavier)

  Vous devrez mettre une copie de la table que vous utilisez dans le
  répertoire où votre distribution va chercher les tables de clavier ;
  en général /usr/lib/kbd/keymaps/i386/azerty/ pour une RedHat et
  /usr/share/kbd/keymaps/i386/azerty/ pour une Debian.

  Allez donc sur télechargez l'archive, enregistrez-la dans votre
  répertoire  /, puis détarrez-la avec la commande:



               tar -xzvf francophones-howto.tgz



  Cela crée un répertoire  /french : placez-vous dans ce répertoire puis
  tapez :



               cp tables-clavier/linux-console/fr-latin9.map /usr/lib/kbd/keytables/i386/azerty/



  Pour afficher les caractères latin9, vous devrez exécuter les
  instructions de la section « polices de caractère ».


  4.4.  Polices de caractère


  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 développées 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 caractères français.

  Vous trouverez aussi des fichiers « .uni » qui ne sont utiles que pour
  créer des polices ou pour ceux qui utilisent l'unicode : ils fixent
  des correspondances entre les « dessins » des caractères dans la
  police et les codes des dits caractères, un même 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 même manière tous les
  fichiers commençant par « lat9 » et se terminant par « .uni » dans le
  répertoire /usr/lib/kbd/consoletrans avec la commande:



           cp lat9*.uni /usr/lib/kbd/consoletrans



  D'habitude, setfont est exécuté par des scripts au démarrage ; 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 lançant setfont ; il vous
  suffit alors de l'éditer pour que vos modifications soient désormais
  prise en en compte à chaque démarrage...

  Les distributions RedHat et Debian constituent des exceptions : la
  police par défaut étant définie 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 représente 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 caractères « étendus » comme les voyelles accentués,
     symboles de ponctuation comme paragraphe...

  ·  E représente l'encodage latin, par exemple 1 pour latin1, 0 ou 9
     pour latin9

  ·  NNN représente la taille individuelle de chaque caractère ; 08 est
     presque illisible mais 16 est un peu gros... À régler selon les
     goûts de chacun.

  Je vous conseille la police lat9-16u.psf ou son équivalent lat0-16.psf
  installée par défaut sur la plupart des distributions, très souvent
  compressée donc avec le suffixe « .gz » .

  [ rajouter une explication sur comment installer la police ]

  La section « une police, des polices » vous donnera plus de détails
  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
  dépend est trop vieille : il faut vous procurer une version plus
  récente 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 désuétude puisque la grande majorité des programmes
  prennent désormais en charge ces fameuses touches mortes et les
  caractères accentués.

  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é prévus :


  4.6.  Améliorations spécifiques au clavier français latin9


  Ça y est, vous pouvez taper du texte latin 9 sous Linux en mode
  console !

  Seules 2 touches ont été modifiées :


  4.6.1.  a) carré/cube

  Elle sert maintenant à oe/OE liés ; en AltGr on y trouve les
  guillemets français.

  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 appliquée à la
  norme AZERTY française.

  En résumé :

  ·  AltGr (oe) : «

  ·  AltGr + Shift (oe) : »

  ·  AltGr (w) : «

  ·  AltGr (x) : »

  ·  AltGr (m) : ¹

  ·  AltGr (ù) : ²

  ·  AltGr (*) : ³


  4.6.2.  b) dollar / livre / symbole monétaire international


  Étant donné que le symbole monétaire international n'est plus
  disponible dans la norme d'encodage ISO 8859-15, il a été remplacé par
  la division centésimale de l'euro : le cent, disponible donc en AltGr
  ($).

  Dans les précédentes versions, le dollar & la livre, des monnaies
  étrangères, avaient été déplacés 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 déjà occupée sur un clavier, la
  position de l'euro est laissée au libre choix des programmeurs.

  AltGr (e) sert à faire « ê » depuis 1992 sous Linux, mais devant les
  protestations légitimes d'utilisateurs disposant d'un clavier où
  l'euro est sérigraphié en AltGr (e), j'ai du déplacer le ê en AltGr +
  Shift ($).

  Désolé d'avoir rompu la « tradition » linuxienne pour conserver la
  compatibilité à la norme AZERTY & aux recommandations officielles de
  l'EURO WORKSHOP !

  En résumé :


  ·  AltGr (e) : euro

  ·  AltGr ($) : cent

  ·  AltGr + Shift ($) : ê


  4.7.  Pour les autres claviers latin9


  L'euro & les cents ont été rajoutés respectivement en AltGr (e) & en
  AltGr (c).

  La touche AltGr a donc été rajoutée ; pour utiliser ces fonctions avec
  toute table de clavier, il suffit de charger other-latin9.map après
  votre table nationale.

  La plupart des améliorations du clavier français ont été transposées
  aux claviers nationaux par des auteurs externes.

  Toutefois, je ne possède pas chaque modèle de clavier et ne peut
  expliquer en détail toutes ces modifications ; des sections
  spécifiques seront donc rajoutées par la suite par d'autres auteurs.


  4.8.  Dans tous les cas


  « Home », « End », « Delete » et « BackSpace » ont été corrigées & les
  touches « Windows » ont été correctement définies, pour passer d'une
  console virtuelle à l'autre.

  Des « Composes », séquences à préfixer par la touche compose ( «
  ImprÉcran » ou « Print Screen » par défaut) ont été rajoutées, mais
  cela reste transparent pour l'utilisateur.

  Par exemple:

  ·  COMPOSE ^ suivi d'une des lettres (s,S,z,Z) sert à obtenir les
     lettres finlandaises rajoutées

  ·  COMPOSE " suivi d'une des lettres (y,Y) sert à obtenir les y trémas
     franco-néerlandais rajoutés

  ·  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 années, « 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 grâce à votre
  .xinitrc ou /etc/X11/xinit/xinitrc

  Pour convertir une table console correcte, on utilisait « mk_modmap »
  livré avec l'archive kbd et généralement installé en
  /usr/lib/kbd/keytables

  Les utilisateurs désirant personnaliser leur table xmodmap employaient
  le programme « xkeycaps ».

  Puis XFree 2.1 et les version ultérieures ont reconnu la disposition
  des touches du clavier gérée par « loadkeys », rendant théoriquement
  xmodmap inutile.

  Mais la gestion de la touche « COMPOSE » assurée par XFree 3.1
  laissait un peu à désirer, la table héritée de « loadkeys » ne servant
  guère.

  Il fallait donc continuer à employer xmodmap, l'utilitaire logiciel
  standard permettant d'obliger le serveur X à associer les événements
  souris/clavier à des caractères.

  Sous XFree version 3.2 et postérieures, « xkb » rendit xmodmap
  définitivement obsolète.
  Mais ne voilà-t-il pas les rumeurs qui voulaient que les prochaines
  versions de XFree ne supporte plus les touches mortes se sont
  confirmées !!!

  Dans la distribution X11 du X Consortium, donc XFree86, qui en est
  directement issu, il n'existe plus de mécanisme général de gestion des
  touches mortes, ou des solutions approximatives obligeant à supprimer
  aussi xkb ou modifier des bibliothèques de programmes !


  5.2.  Mal programmer


  À chaque programme de bien gérer les touches mortes au lieu de faire
  confiance à X pour cette tâche.

  En réalité, il n'est pas compliqué de gérer 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 compliquée !

  De ce fait, elles ne fonctionnent que pour les clients X «
  internationalisés », c'est-à-dire qui gèrent eux-mêmes les problèmes
  liés aux méthodes d'entrée de données des différentes langues
  nationales.

  Ceci est très gênant lorsqu'on veut pouvoir saisir du texte comportant
  des lettres accentuées, 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 (recommandée)


  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 récentes de XFree, AltGr et
                                               # RightAlt sont synonymes.

       ScrollLock      Compose                 # Pour faire des caractères spéciaux.
                                               # 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 préfèrent :


               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 méthode pour obtenir des caractères 8 bits :

  Dans /usr/X11R6/lib/X11/locale/iso8859-1/Compose se trouve une table
  de « correspondance » entre deux caractères et un résultat ; les deux
  caractères sont «mélangés» 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 paramétrage préconisé, réglé dans XF86Config, la fait correspondre
  à la touche « Arrêt Défil » 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 affectée à « Compose
  ».


  5.3.4.  d) Solution modifiant la libX11


  Thomas Quinot <Thomas.Quinot(à)cuivre.fdn.fr> vous propose donc sa
  libX11 modifiée, qui gère les touches mortes de manière transparente
  pour tous les clients.

  Elle permet également de traiter les séquences composées inconnues
  comme des paires de caractères, par exemple :



               ~ + / = ~/



  Pour l'utiliser :

  ·  Récupérez libX11-XF3.3.1.tar.gz ;

  ·  Extrayez le fichier libX11.so.6.1 ;

  ·  Placez-le dans /usr/X11R6/lib/ ;

  ·  Exécutez ldconfig ;

  ·  Désactivez l'extension XKB en utilisant l'option XkbDisable dans la
     section Keyboard de votre XF86Config.


  5.3.5.  e) Est-ce nécessaire ?


  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 répertoire
  /usr/X11R6/lib/X11/xkb/symbols/ cela signifie que vous n'utilisez pas
  xkb : procurez-vous donc une version plus récente de X window !

  Sans xkb, XFree se rabattra par défaut sur votre configuration de
  clavier pour Linux avec loadkeys.

  Toutefois, la translation n'est pas parfaite et je vous recommanderais
  plutôt 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
  considère comme utilisateur d'un clavier 7 bits !
  Il convient donc d'utiliser une table adaptée avec xkb.


  5.4.  « latin9 » ou « latin1 » ?


  Je vous conseille de choisir les tables latin9 que je maintiens à
  jour, plus récentes que les versions latin1, permettant d'utiliser de
  multiples améliorations, détaillées dans la section clavier sous
  linux-console, pour disposer du plus de confort possible et plus
  adaptées car maintenu par des francophones.

  Les nombreuses améliorations dont elles bénéficient permettent de
  pallier au déficiences de nombreux programmes.

  Par exemple, certains programmes en Motif comme Netscape (tm) ne
  savent pas encore gérer les touches mortes ... donc impossible de
  taper par exemple des ê ou des î sur les claviers des Belges et
  Français, puisque la touche morte « accent circonflexe » est le seul
  moyen d'obtenir ces caractères !

  « fr-latin9 » répond à ce problème 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 tréma !


  5.5.  Table de correspondances



  ·  AltGr (voyelle) : voyelle accent grave

  ·  AltGr + Shift (voyelle) : voyelle tréma

  ·  AltGr (touche au dessous de la voyelle) : voyelle majuscule accent
     grave

  ·  AltGr + Shift (touche au dessous de la voyelle) : voyelle majuscule
     tréma

  ·  AltGr + Shift (minuscule accentuée) : majuscule accentuée

  Par exemple :


  ·  AltGr (a) : â

  ·  AltGr (q) : Â

  ·  AltGr + Shift (ù) : Ù

  L'astuce marche aussi pour le c cédille :


  ·  AltGr + Shift (ç) : Ç

  Donc même dans les pires conditions, si aucune touche morte ne
  fonctionne, on peut quand même accéder à toutes les voyelles
  accentuées, majuscules et minuscules !

  Vous y trouverez en plus les guillemets français (« »), les symboles
  employés 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 grâce à 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 adaptée jamais vous ne verrez les caractères rajoutés dans
  cette norme.

  Il faut donc utiliser l'utilitaire de conversion « bdftopcf » qui en
  quelque sorte permet de compiler les polices de caractères fournies.

  Placez-vous dans le répertoire de l'archive que vous avez récupéré
  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à crée 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 répertoire adéquat, pour lequel l'index des
  polices de caractères sera mis à jour.

  Alors, ajoutez la table de composition latin9 aux compositions par
  défaut de X, spécifiques à 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 reconnaît pas l'ISO
  8859-15 latin9.

  De là, redémarrer 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 paramètre 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.  Réglage du clavier pour les applications en mode texte



  6.1.  Tout d'abord


  Le huitième bit doit survivre à l'entrée du noyau, assurez-vous-en
  donc avec :



               stty cs8 -istrip -parenb



  Ensuite, il convient de s'assurer que l'application est apte à
  supporter les caractères 8 bits : par exemple, ispell n'est pas
  compilé pour des caractères 8 bits par défaut : 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 appréhender un peu mieux le
  vocabulaire de base et les différentes 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 résumer l'histoire des polices en grandes étapes :

  Au début était l'ASCII, qui codait ses caractères sur 7 bits.

  Prévu pour des états-uniens, il était impossible d'incorporer des
  caractères accentués à la norme déjà présente de 127 caractères.

  Ainsi vint le 8 bits qui étendit le nombre de caractères à 255 et les
  normes ISO 8859, latin et cp, pour les plus connues, qui vinrent
  pallier à cette déficience du fait des 128 positions supplémentaires
  disponibles en encodant les caractères sur 8 bits.

  Mais plusieurs de ces normes étaient nécessaire du fait de
  l'impossibilité de faire tenir les caractères de toutes les langues du
  monde sur 8 bits.

  La norme ISO 8859-1 latin 1, la plus utilisée, se destine par exemple
  au langues d'Europe de l'ouest, du nord, d'Amérique, la norme ISO
  8859-2 latin 2 est prévue pour l'Europe de l'est...

  L'Unicode est l'un de ces standard, destiné à terme à remplacer les
  différentes é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 caractères nécessaires à
  toutes les langues du monde, mais reste encore peu utilisé ou
  implémenté.

  En effet, il est impossible de l'utiliser en pratique sous linux-
  console, la mémoire exigüe de la carte vidéo ne permettant pas de
  stocker tous les caractères 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 répandent sous X,
  grâce à des outils comme freetype, xfstt (...) et le très attendu
  XFree 4 qui devrait les supporter en natif.

  Actuellement, la nouvelle norme européenne ISO 8859-15 latin 9 est
  censée permettre la transition vers l'Unicode en apportant à l'ancien
  ISO 8859-1 latin 1 les caractères 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 compléter les failles de l'ISO 8859-1 latin 1 en
  y rajoutant des caractères déjà présents 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 défaut la nouvelle norme
  ISO 8859-15 latin 9, destinée à remplacer l'ensemble des polices
  européennes par une seule.

  Son but est voisin de l'Unicode, mais elle a l'avantage d'être plus
  légère que celui-ci et d'être applicable tout de suite.

  Elle apporte notamment des caractères qui manquaient beaucoup pour les
  Français et les Finlandais :


  ·  « e dans l'o » en majuscule et minuscule pour les Français, 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 européens

  Cette nouvelle norme, ISO 8859-15 latin 9 aussi connue sous le nom
  générique latin0, reste cependant encore très peu répandue 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 répondant différemment à la même 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 réalité les différences vont bien plus loin, de l'ordre dans
     lequel sont les caractères de la police, ce qui joue sur l'aspect
     des applications semi graphique, les correspondances avec des
     caractères latin1 ± latin9 ± Unicode ce qui a un rôle dans la
     compatibilité croisée ou exclusive, par exemple purement Unicode...

  J'ai donc complété par 2 types de ma création pour répondre au mieux
  aux différents besoins.



             | Encodage dans | Inclusion d'une | Compatibilité | Compatibilité
             |  l'ordre iso  |  table Unicode  |   exclusive   |    croisée
       --------------------------------------------------------------------------
       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 monétaires
     internationaux apparaîtront comme des euro, ce qui peut poser des
     problèmes 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 récentes du noyau, selon le site de Yann Dirson,
     il semble donc que toutes les polices devraient contenir une table
     de correspondance Unicode...

  ·  des lat9u encodées dans un ordre non standard, mais identique à
     celui des polices latXu de kbd, par rapport aux polices
     précédentes, en amenant les mêmes problèmes avec le cp1252 et le
     latin1 mais en incluant une table de correspondance Unicode, ce qui
     permet d'avoir de jolis caractères semi graphiques sous Yast, mc,
     ou d'autres programmes basés sur ncurses ou dialog.

  ·  des lat9v encodées dans l'ordre officiel iso comme les lat9 mais
     avec une table Unicode complète : là aucun symbole monétaire
     international ne sera remplacé par l'euro !  Ces polices sont
     utiles pour éviter les problèmes d'export, grâce à l'Unicode *pur*,
     avec une table de clavier Unicode adaptée : tous les caractères
     latin9 sont remplacés par des caractères Unicodes et affichés
     ainsi, ce qui a le mérite d'être compatible avec le latin9,
     l'Unicode, d'être élégant techniquement mais inutilisable «
     normalement » sous linux-console. Presque aucun système n'est
     entièrement prêt 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 immédiatement,
  en posant quelques problèmes pour les caractères latin1 qui seront
  remplacés par leurs équivalents latin9, mais sans rendre l'Unicode
  obligatoire comme les lat9U, sans emmêler les caractères graphiques
  comme les lat9, et en permettant aussi d'afficher les caractères
  spécifiques au latin9 en Unicode *pur*, à l'exception des caractères
  spécifiques au latin1 donc...

  Je vous rassure, vous n'êtes pas obligés 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 même yuedit et le projet « 9 » (9term, 9wm... rien à voir
  avec l'opérateur télécom français du même nom) qui utilisent l'Unicode
  sous X, avec plus ou moins de succès.

  En revanche, sous linux-console, tout programme peut utiliser
  l'Unicode.

  Mais, hélas!, aussi grande que soit la mémoire des cartes vidéos
  actuelles, elle ne peut charger l'intégralité des caractères d'une
  police Unicode.

  Il existe donc des « jeux de caractères » limités mais bien utiles
  pour les langues baltiques, asiatiques, est-africaines...


  6.2.5.  e) Utiliser les possibilités 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 caractères 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 Français


  Linux en 'version française' existe... mais ne semble pas facile à
  obtenir.

  La librairie locale(7) [cf aussi perllocale, setlocale, getlocale]
  utilisée par la librairie C se sert de variables d'environnement pour
  définir les préférences linguistiques et nationales.

  Pablo Saratxaga répondait ainsi à Pascal Rigaux en prenant l'exemple
  de sort :



   PR> J'ai découvert aujourd'hui la variable d'environnement LANG. C'est assez
   PR> surprenant de se retrouver avec de l'aide en français (même si elle n'est pas
   PR> toujours aussi précise que la version anglaise) quand on fait ls --help.

  C'est agréable 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 » après « 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 chaînes 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 chaînes s1  et  s2.
         Elle renvoie un entier inférieur, égal ou supérieur a zéro
         si  s1 est respectivement inférieure, égale, ou supérieure
         a  s2.   La  comparaison est effectuée en se basant sur la
         localisation en cours pour la catégorie 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'après la page de manuel supporte les locales.

  Qui s'y colle ? Ça devrait être assez simple à réaliser sur un système GNU
  en tout cas.



  Il existe différente variables à exporter, avec chacune une fonction
  spécifique ; le format standardisé est:



               langue[_PAYS[.CHARSET]][@variante]



  Les crochets dénotent l'optionalité, par exemple: 'fr', 'fr_BE',

  Les fonctions de la libc, celle de GNU en tout cas, iront chercher
  dans « l'ordre décroissant » si on peut dire; par exemple si on
  spécifie avec 'fr_CH' puis avec 'fr'.



  ·  LC_COLLATE  définit les équivalences de caractères pour les
     comparaisons (æ peut être équivalent à ae), pour les ligatures et
     pour les césures.

  ·  LC_CTYPE    définit les caractères affichables

  ·  LC_MONETARY définit le format et le symbole de la monnaie utilisée

  ·  LC_NUMERIC  définit le format numérique : regroupement, marqueur
     décimal...

  ·  LC_MESSAGES définit la langue des messages

  ·  LC_TIME     définit le format de la date, les noms des jours et des
     mois

  ·  LC_ALL      valeur par défaut des variables précédentes : si une
     LC_ n'est pas définie, LC_ALL est prise en compte, sinon la libc se
     rabat sur LANG.

  ·  LANG        différent des variables précédentes, contient le code
     langue au format iso : fr,en,de...

  ·  LANGUAGE    liste des locales par ordre de préférence séparées 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 français générique

  ·  fr_FR français de France

  ·  fr_BE français de Belgique

  ·  fr_CH français de Suisse

  ·  fr_LU français du Luxembourg

  ·  fr_CA français du Canada

  Par exemple, si vous être un Français 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 répertoire de ce type



  Toutefois, avec le passage à l'euro, ces locales ne sont plus
  adaptées.

  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 lançant :



          cp charmaps/ISO-8859-15 /usr/share/i18n/charmaps/ISO-8859-15
          cp locales/* /usr/share/i18n/locales/



  Alors, régénérer 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 caractères 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 Français (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 supportée par les autres UNIX comme Solaris.

  Pour les shell scripts, il peut être utile de rajouter « LC_TIME=C »
  pour empêcher la date d'être localisé, embêtant pour les grep et
  autres qui cherchent « Mon » « Tue »... et non « Lun », « Mar »...

  Les données correspondantes aux préférences se trouvent généralement
  dans /usr/share/locale. S'ils manquent, vous pouvez récupérer leur
  source

  Concernant les autres fichiers abordés dans cet article, vous les
  trouverez avec les autres fichiers de cet HOWTO sur ma page.


  6.4.  Son linux en français


  Pour se faire SON linux en français il faut en pratique disposer des
  sources de la libc et d'un minimum de compétences en langage C ; ces
  manipulations sont inutiles pour l'utilisateur standard de Linux qui
  se contentera d'utiliser les locales de la section précédente.

  Mais voici donc, pour la bonne bouche, quelques renseignements
  collectés...

  Laurent Chemla nous pilote :



       Si j'ai suivi, il y a deux trucs qui font la même chose, d'où embrouille, les
       locales et un truc appelé nls.

       Les locales, sous Linux, ça va par défaut dans /usr/lib/locale,
       et ça contient de quoi préciser 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 détails. 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 gère un fichier qui est dans /etc/locale/.
       (NDG : De nos jours, ils se trouvent plutôt 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 français. 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
       règles françaises, là il faut aller dans les sources de
       libc/locale et dans chacun des sous-répertoires jeter un oeil sur le
       fichier exemple, le modifier pour le français (c'est des tout petits
       fichiers), et faire « make », avant de copier le résultat dans
       /usr/lib/local/fr/ et de faire un « export LC_ALL=fr ».



  Autre astuce pour ménager les vieux logiciels :



  cd /usr/lib
  ln -sf /usr/share/locale .



  Ne pas oublier de télécharger sur le site du lip6 :


  ·  Les pages de manuel en français, archive man-fr-*, adaptées par C.
     Blaess. Il suffit d'extraire le contenu de l'archive dans le
     répertoire /usr/man/fr.

  ·  Une intéressante documentation technique : locale.fr, par P.
     D'Cruze, adaptée par É. Dumas

  Pour en apprendre davantage lire la page de manuel de « locale » :
  bibliothèque de pages de manuel 5 ou 7 :



               bash# man 5 locale
               bash# man 7 locale



  6.5.  Les variables


  Ces variables doivent être exportées à 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
       # caractères 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 cités dont le nom commence par «
  . » doivent se trouver dans votre répertoire maison  /


  6.6.  Les caractères 8 bits dans les programmes utilisant readline
  tels bash ou ncftp...


  Readline est une librairie de saisie de caractères avec historique et
  complétion ; elle est utilisée par de nombreux programmes comme bash,
  ncftp, gnuplot...

  Par défaut, le 8e bit sert à coder la touche Meta.

  Elle est utilisée pour coder certaines commandes mais la touche «
  Escape » ou « Échap » peut la remplacer.

  Si vous souhaitez voir et saisir des accents avec les applications
  compilées avec readline, comme bash pour les versions supérieures à
  1.13, ajoutez ceci dans votre fichier $INPUTRC, par défaut ~/.inputrc)
  :



       # Permettre de rentrer & recevoir des caractères accentués
       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 caractères vers l'avant avec «
  Delete » et vers l'arrière avec « BackSpace », ceci n'étant pas prévu
  sur les tables de clavier par défaut « mimant » le comportement d'un
  clavier de console VT100 .

  Les deux dernières options vous permettront d'utiliser « Home » et «
  End » pour aller au début 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 grâce à ce fichier ; pour obtenir le code
  d'une touche invoquer cat puis appuyer sur la touche : son code
  apparaît.

  Le code physique :



               ^[



  correspond à la séquence 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, grâce à la variable d'environnement INPUTRC, utiliser
  un fichier commun à tous les utilisateurs.

  Enfin, je vous recommande d'utiliser ce fichier .bashrc à placer dans
  votre répertoire maison :



       # ~/.bashrc : exécuté par bash(1) pour les shells lancés après 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 création de fichiers
       #umask 022



  Le fichier .bash_profile ou .bash_login, exécuté par bash(1) lors des
  logins, y est strictement identique mais peut, si vous le voulez,
  présenter des différences pour afficher par exemple une citation en
  laçant 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 concernés, les variables indiquées plus haut
  en remplaçant 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 préférer 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 utilisées,
  sinon tcsh agit en iso_8859_1, quelle que soit les valeurs données à
  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 réciproquement...

  a) D'abord, quelle heure est-il :-) ?

  Après avoir regardé sur la pendule la plus proche de vous, tapez :

  clock

  puis

  date

  La première heure est celle du bios, la seconde celle calculée par
  Linux à partir de /etc/zoneconfig.

  Pour peu que vous ayez installé timezone, votre machine peut jongler
  aisément entre les différents fuseaux horaires... ce que les DOS ou
  Windows ne permettent pas !

  b) L'heure du choix !

  De là, deux possibilitées : soit vous décidez de laisser l'heure
  système à l'heure locale, peu pratique, excepté si vous hébergez aussi
  sur votre disque dur ces systèmes d'exploitation peu évolué, ne
  sachant même 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 réglage

  Pour procéder, regardez d'abord si l'heure système retournée 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 «
  réglage du fuseau ».


  ·  Pour les français, 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 décisions futures de la cour européenne, l'heure d'été «
  daylight savings » risque d'être abandonné...  ce qui compliquera
  cette explication !


  ·  Pour les canadiens français :

  Vous êtes dans une zone horaire GMT-4 si vous habitez autour de
  Montréal .
  Pour les autres provinces, consulter un dictionnaire !

  Premièrement, 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).

  Dès lors, clock et date doivent vous retourner la même heure...


  ·  Pour les canadiens français : utilisez GMT+4


  ·  Pour les français, belges wallons et suisses romands :

  Si vous lisez ce document en été, le décalage 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
  régler le système : tapez :

  ln -sf /usr/lib/zoneinfo/Etc/GMT-2 /etc/zoneconfig

  clock

  date

  L'heure calculée correspond donc à l'heure de Greenwich, l'heure
  système à l'heure locale... soit l'inverse de ce que l'on veut.

  Un simple : clock -w

  Va alors mettre l'heure du système en heure de Greenwich, utilisant
  pour cela l'heure locale inversée volontairement avec l'heure système.

  d) Régler le fuseau horaire :

  Tapez alors : ln -sf /usr/lib/zoneinfo/Europe/Votre-ville
  /etc/zoneconfig

  Et voilà ! Le système 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, procédez de même en remplaçant les « -2 »
  par « X », X représentant l'opposé de votre décalage horaire (par
  exemple -4 au Québec, 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

  Très simple et très utile : plus besoin de se souvenir du décalage
  horaire (plus ou moins X heures) puisque Linux se charge désormais de
  tout !



  6.11.  vi


  Normalement, aucune modification n'est nécessaire à part l'utilisation
  de loadkeys (détaillée 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 défauts 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 césure automatique de la ligne à N caractères :
  set tw=72

  " Faire apparaître les tabulations et les espaces
  set list

  " Changer les défauts 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

  " Réglages 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 après
  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'intérieur 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 gzippés

  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++ même 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 variés à 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 défaut sans broncher mais peut des fois
  rencontrer des problèmes 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 prédéfinis
  qui ne sont pas forcement ceux qui sont en place sur le système.

  Si vous constatez des problèmes, vous devez redéfinir la liste ispell-
  dictionary-alist des dictionnaires.

  Cette liste contient :

  ·  le nom du dictionnaire

  ·  la liste des caractères composant un mot

  ·  la lise opposée des caractères ne composant pas un mot

  ·  les caractères de liaison à l'intérieur des mots ("-", "'"...)

  ·  vrai ou faux si ces caractères peuvent être présents 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" ; français
    "[A-Za-zÀÂÇ-ËÎÏÔÙÛÜàâç-ëîïôùûü]" "[^A-Za-zÀÂÇ-ËÎÏÔÙÛÜàâç-ëîïôùûü]"
    "[---']" nil ("-n") "~nroff")
   ("francais-TeX" ; français
    "[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 norvégien
    "[A-Za-zåÅøØæÆéÉèÈ]" "[^A-Za-zåÅøØæÆéÉèÈ]"
    "[---'^`\"]" t nil "~nroff")
   ))



  Le dictionnaire "francais-TeX" est un lien symbolique sur "francais"
  qui permet d'ajouter une entrée 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 démarrage du shell (comme .bashrc et
  .bash_profile dans votre répertoire 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 répertoire maison
  : il permet d'employer les touches fléchées, « Page_Up », « Page_Down
  », « Home » et « End ».

  Ne pas négliger la page de manuel de less car il peut être intéressant
  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, définissez dans les fichiers de démarrage de
  votre shell les alias suivants permettant de voir les fichiers dont le
  nom comprend des caractères 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 complète de tous les fichiers
  présents dans le répertoire, avec leurs attributs, leurs tailles...

  --color=auto est préférable 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 généré doit accepter les entrées 8-bits (bien sûr 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 définir



       LC_CTYPE=ISO-8859-1



  dans l'environment.


  6.18.  rlogin


  Utilisez l'option :



       -8



  6.19.  joe


  Utiliser joe 2.8 ou plus récent qui devraient fonctionner après
  édition du fichier de configuration : placer l'option -asis dans
  /usr/lib/joerc en première colonne.


  6.20.  TeX et LaTeX


  Le plus simple consiste à employer GuTemberg, une distribution de
  LaTeX avec tous les défauts réglés pour des francophones par des
  francophones !

  Mais si vous préférez une version standard non modifiée, il suffit
  d'ajouter au début 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 séparément

  Pour gs et xdvi, il faut utiliser des options spéciales (sur ma
  machine, ce sont des alias). En effet, ils sont souvent configurés
  pour un papier états-unien dit « légal », 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 spécifier 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 français

  Si vous utilisez une distribution RedHat ou Debian, celles-ci sont
  présentes sur le cédérom : il suffit de les sélectionner lors de
  l'installation.

  De là, deux possibilités :


  ·  soit vous ne voulez que des manuels en Français, 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 préférez par défaut des manuels en Français 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 défaut
  et se rabattra sinon sur des pages en anglais.

  Si vous désirez 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 Québec ou
  sur le mirroir du lip6

  Un fichier LISEZMOI explique pas à pas et en Français l'installation.


  6.23.  Les claviers 105 touches


  Aussi appelés « claviers Microsoft (tm) », ils ont trois touches de
  plus que les claviers normaux.

  Comment s'en servir ?

  En mode console, éditer french.map et décommenter les lignes en
  parlant !

  De même pour french (pour Xwindow).


  6.24.  PGP



  Attention, dans certains pays totalitaires, l'utilisation de logiciels
  de cryptographie est considérée comme usage d'armes de guerre, ce qui
  est punissable par la loi !

  Sautez donc ce paragraphe si votre législation locale ne permet pas
  d'utiliser des logiciels de cryptographie.

  Premièrement, il faut se procurer pgp-international (à cause de
  problèmes de patentes et de législation 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 norvégien de PGP

  Ensuite, mettre dans votre répertoire maison, dans un sous répertoire
  .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 même 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 grâce à Pablo Sartxaga (srtxg à
  chanae.alphanet.ch) dans un message explicant la différence
  Unicode/latin/cp :



   DB>   quand on lance « setfont » sans argument
   DB>   il semble qu'on obtienne le même effet que setfont -u none

  Normal et logique.

   DB>   --> en un mot la table de conversion « Unicode » est désactivée
   DB>       ce qui transforme le « e accent aigü (dec 130) » en « théta (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 possèdes les glyphes à la bonne place par rapport au codage
  de caractères 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 créer des
  images an ascii-art, un fichier par caractère (256 fichiers donc), il te
  suffit alors de jongler avec les fichiers pour les changer de place et
  régénerer la police).  Note cependant que le codage cp437 n'inclut pas
  tous les caractères de iso-8859-1, notamment manquent quasi toutes les
  majuscules accentuées, et les lettres ãõ nécessaires en portugais. Tu
  peux toujours modifier la police pour créer ces caractères manquants.

   DB>   sur ma Slackware 3.2, à aucun moment setfont n'apparaît dans les scripts
   DB>   de démarrage ni dans les ~/profiles et autres ~/.bashrc

  Donc c'est la police dans la ROM de la carte video qui est utilisée.

   DB>   et pourtant cette
   DB>   conversion est effectuée correctement puisque j'ai les accents à l'écran.

  Je suppose que le kernel présuppose (à juste titre) que la police en ROM vidéo
  est au codage cp437.

   DB>        une fois que je lance « setfont -u none » je perds donc les accents.

  Normal, car dès 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 défaut 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 défaut est « straight to font », pas de
  conversion.

   DB>            j'en conclue que Linux utilise la police résidente par défaut de
   DB>            la carte EGA/VGA

   DB>        [Q] --> comment retrouver cette police ?

  Il y a un programme nommé « restoretextmode » qui est assez populaire
  auprès 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 général 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 » plutôt que « def », ils font _presque_ la même
  chose, mais « cp437 » est visuellement plus agréable car il remplace les
  caractères non présents dans la police par les lettres non accentuées 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 agréables; « def » lui ne mets
  totu simplement rien pour les caractères 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 caractères
  à gauche à cause des caractères de largeur nulle :)

  Essaye aussi la police « t.fnt », elle est assez jolie, toute en rondeurs, je la
  trouve réposante, et quand je dois utiliser un PC avec les polices style
  courier par défaut je trouve ça très agressif je me demande comment ils
  peuvent travailler avec :)



  Lire aussi les articles de news : « FAQ - les accents français 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 : fenêtrage, lignes de
  saisie, édition de formulaires, couleurs, caractères « ALT » ascii
  semi-graphique ibm, comme sous dos...


  6.27.1.  Introduction


  La version standard de curses utilise le huitième bit pour la vidéo
  inversée (voir le flag _STANDOUT défini 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 livrées en général avec la
  version 1.9.9e de ncurses, or il se trouve que la librairie form de
  cette version est BUGGÉE (problèmes de rafraîchissement des fenêtres).

  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 livrée
  sur la plupart des distributions (RedHat 4.2, 5.0, 5.1, Slackware 3.2,
  Debian 1.9) en tout cas.


  Symptôme : 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 après 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 définition des locales a
  (encore) changé : il faut les régénérer à 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 « spécificités
  culturelles du pays ».

  Cela sert à résoudre les erreurs rapportées par perl ou une mauvaise
  gestion des accents par ncurses.

  ·  récupérer pour la libc5 la collection de locales POSIX

  ·  ou pour la libc6, elle est dans l'ajout « glibc-localedata »

  ·  copier dans le répertoire /usr/share/locale les fichiers fr_FR et
     en_DK (qui est inclus dans fr_FR)

  ·  créer le répertoire /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 créera l'entrée fr dans /usr/share/locale soit :



               /usr/share/locale/fr



  Ce répertoire 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
     française a été faite par Éric DUMAS (hélas ce doc ne traite
     principalement que de LC_MESSAGES. À quand la suite Éric ? ;-) )

  ·  compléter éventuellement l'initialisation des variables du shell
     comme décrit dans la section sur bash ou tcsh

  ·  dans un programme, utilisez la fonction  setlocale() (man
     setlocale.3) pour fixer les paramètres 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
  remplacées par divers caractères.

  2 possibilitées :

  ·  La police chargée ne dispose pas de caractères 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 général 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 français directement dans le
  kernel, ce qui est pratique pour les systèmes embarqués ou ne
  démarrant 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 spécifier un clavier (français, par
  exemple) au démarrage 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 diffèrent 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, remplaçant 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 problème, é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 thème de l'ISO-8859-1 et sur « comment
  manipuler les caractères 8-bits » est disponible


  7.  Réglage 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 relève 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 résoudre tous les
  problèmes de rxvt et de xterm ...

  Pour les résoudre sans créer 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 même le pavé numérique, fonctionnant comme en mode
  console, i.e.  Shift-Page_Up permettant de faire défiler une page,
  voire mieux : le pavé numérique reconnaissant enfin la différence
  entre Verr. Num allumé et Verr. Num éteint.

  X international terminal (xiterm pour les intimes) est bien sûr sous
  GPL et mis à jour pour suivre parallèlement 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 remède miracle !

  Il faudrait modifier le code source, code indiqué plus haut, pour
  remplacer XLookupString par XmLookupString.

  Utilisez les possibilités 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 problème avec les
  touches « spéciales » (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 Makarévitch
  (nat à nataa.fr.eu.org) qui l'a relu et m'a aidé à le modifier de
  nombreuses fois.

  Un excellent document plus générique, traitant de l'installation par
  ex, est le Guide du Rootard, disponible sur freenix ou le lip6

  Remercions enfin par ordre alphabétique ces contributeurs :

  Jean-Michel Antoine
  Michel Billaud
  Chmouel Boudjnah
  Stephane Bortzmeyer
  Denis Braussen
  Rémy 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
  Frédéric Petit
  Thomas Quinot
  David Robert
  Olivier Robert
  Benjamin Ryzman
  Pablo Saratxaga
  Julien Simon
  Loïc Tortay
  J.M. Vansteene



  Surtout, si je vous oublie, signalez-le moi !  De même 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 intégrer dans les prochaines versions !

  Signalez-moi aussi les erreurs : cet HOWTO est en perpétuel
  changement, avec des nouveautés incluses à chaque version ; des
  erreurs peuvent facilement s'y glisser !



F FRANCOPH.;1                       	Francophones-HOWTO
  German HOWTO
  Winfried Trümper <winni@xpilot.org>
  v1.6, 19 March 1997

  Dieses Dokument enthält Tips und Informationen für 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 Verfügbarkeit
     1.5 Rückkopplung
     1.6 Urheberrechte
     1.7 Danksagung

  2. Rüstzeug 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 Bücher
     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 Länderübergreifende Einstellungen
              5.1.1.4.1 Deadkeys
              5.1.1.4.2 Compose
              5.1.1.4.3 Unicode
     5.2 Zeichensatz für 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 höher:
        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 Außer Konkurenz ...
        6.1.1 Zeichensätze ohne Umlaute
        6.1.2 Eigene Süppchen
     6.2 Die Ausreißer
        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 Weiterführende 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 höher
              6.3.2.1.2 plain-TeX, LaTeX2.09
           6.3.2.2 Layout
           6.3.2.3 Deutsche Wortrennung
        6.3.3 Rechtschreibprüfung mit deutschem Wörterbuch
           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 Zeichensätze
     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 Erklärende Übersetzung einiger technischer Begriffe


  ______________________________________________________________________

  1.  Über das German-HOWTO


  1.1.  Benutzung auf eigene Gefahr

  Text, Abbildungen und Programme in diesem HOWTO wurden mit großer
  Sorgfalt erarbeitet. Dennoch sind Fehler nicht ganz auszuschließen.
  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
  angepaßt ist. Die Forderung der Benutzer sollte natürlich sein, daß
  alle Linux-Distributionen länderspezifische Einstellungen von sich aus
  berücksichtigen. Schließlich ist dies der Zweck der Distributionen:
  anhand einfacher Informationen das System weitmöglichst zu
  konfigurieren, ohne daß der Benutzer erst Guru werden muß.

  Kurz: würden alle Distributionen ihre Hausaufgaben machen, wäre diese
  HOWTO erheblich kürzer.



  1.3.  Thematischer Umfang

  Dieses HOWTO beschränkt sich ausschließlich auf die Beschreibung der
  für Deutschland spezifischen Konfiguration von Linux und seinen
  Programmen.

  Es wird weder eine allgemeine deutsche Einführung in Linux gegeben,
  noch wird die vorhandene Original-Dokumentation durch dieses HOWTO
  überflüssig.


  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 ausdrücklich für 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.  Verfügbarkeit

  Dieses HOWTO ist offizieller Teil des `Linux Documentation Projects'
  (LDP) und somit wie alle anderen Dokumente des LPD erhältlich. Nähere
  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.  Rückkopplung

  Korrekturen von Tippfehlern und Verbesserungsvorschläge 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 kämen
  wir hin, wenn das German HOWTO zur allgemeinen Sammelstelle für Bug-
  Fixes würde?

  Man verschone mich mit über das HOWTO hinausgehende Fragen wie z.B.
  `Warum  stürzt ispell ab?'. Ich stehe aus gutem Grund nicht auf der
  Liste der deutschen Linux-Unterstützer und beantworte auch keine
  Fragen per e-mail.



  1.6.  Urheberrechte

  Copyright (1994,1995,1996,1997) Winfried Trümper <winni@xpilot.org>

  Das German-HOWTO darf im ganzen oder teilweise vervielfältigt und
  vertrieben werden, sowohl in gedruckter als auch in elektronischer
  Form, solange dieses Copyright beibehalten wird. Kommerzieller
  Vertrieb ist in diesem Sinne ausdrücklich erlaubt, solange höchstens
  (anteilige) Kosten für die Datenträger 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 Vorschläge 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 Münch <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.  Rüstzeug und generelle Bemerkungen



  2.1.  Warum sind deutsche Anpassungen notwendig?

  Linux wird von einer weltweiten Gemeinde von Hackern im Internet
  entwickelt. Obwohl Linux ursprünglich 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
  müssen 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) erläutert die Handhabung der
  erwähnten Konfigurationsdateien.


  Im Linux Keyboard- und Keystroke-HOWTO findet man alle "Tricks" für
  die Tastatur.


  2.4.  Kurzes Glossar


     ASCII
        ist ein 7-bit Zeichensatz und enthält 2^7 = 2*2*2*2*2*2*2 = 128
        Zeichen, was gerade mal für a-z, A-Z, 0-9 und einige wichtige
        Zeichen ausreicht. Das amerikanische Alphabet halt.


     8-bit-clean
        ein 8-bit Zeichensatz umfaßt 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 können.  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, enthält Umlaute und viele
        Sonderzeichen für die `westeuropäischen' Sprachen.  (Die
        osteuropäischen und weitere haben andere Endziffern.)


     Unicode
        Unicode ist ein Standard, der Zeichen aus den
        unterschiedlichsten Sprachen der Länder dieser Welt enthält.
        Dazu werden die Zeichenpositionen in einem 32-bit Zeichensatz
        definiert, was noch längst nicht abgeschlossen ist. Gängigere
        Zeichensätze (wie die Zeichen der europäischen Sprachfamilien)
        sind als 16-bit Untergruppen festgelegt, die in kompatibler
        Weise als einzelne 16-bit Unicode-Zeichensätze verwendet werden
        können. Wenn hier von einem Unicode-Zeichensatz die Rede ist,
        ist die 16-bit Untergruppe der europäischen Sprachfamilien
        gemeint.



     POSIX
        POSIX steht für `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 für ein Land oder einen Spracheraum und die vom
        jeweiligen Programm benötigten übersetzten Texte.


     Internationalization
        Veränderung eines Programms zur Unterstützung mehrerer Sprachen.



     i18n
        Abkürzung für 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 benötigten Informationen zur
        Verfügung zu stellen, um den nationalen Besonderheiten,
        bezüglich 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
        Abkürzung für localization, die wie i18n entstanden ist.



  3.  Menschen


  3.1.  Benutzergruppen

  In vielen Städten haben sich Linux-Benutzer zu sogenannten Linux User
  Groups (LUG) zusammengetan. Diese Benutzergruppen sind offen für jeden
  und halten regelmäßige Treffen ab. Sie sind der ideale Treffpunkt für
  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 Anfängern 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 fördern.


  3.3.  Online Chat (IRC)

  Im IRC-Kanal #LinuxGER halten sich einige deutsche Linux-Aktivisten
  auf.  Nähere Informationen unter der URL:

       <http://www.infodrom.north.de/Linux/LinuxGER/>



  3.4.  Newsgroups

  Früher 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 Handbücher nun wirklich nicht das gelbe
  vom Ei sind, sollte man die newgroups mit übermäßigen 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 alltäglichen Dinge diskutieren kann.



  4.  Dokumentation


  4.1.  Deutsches Linux HOWTO Projekt (DLHP)

  Das Deutsche Linux HOWTO Projekt beschäftigt 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 nähere Informationen
  zum Projekt abrufen.



  4.2.  Bücher

  Mittlerweile gibt es sehr viele deutschsprachige Bücher zu Linux,
  weshalb ich die Übersicht aus diesem HOWTO herausgenommen habe.

  Martin Schulze <joey@finlandia.infodrom.north.de> unterhält eine Liste
  mit deutschen Büchern rund um Linux, die unter der URL:

       <http://www.infodrom.north.de/Linux/Buecher/>


  erhältlich ist und die in der Newsgroup de.comp.os.linux.misc
  regelmäßig 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 äußerst nützlichen 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 täuscht 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 vorgetäuschten
  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 F1­F8 ----------------/ <­>           |       \\   ///        |
         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 für die Kommandos
  ist, darüber kann nur das Handbuch der eigenen Distribution Auskunft
  geben. (Tip: das Configuration HOWTO kann in vielen Fällen helfen.)

  Weiterführende 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 nämlich von Hause aus.



  5.1.1.  Tastenbelegung der Textkonsolen

  Für die unterschiedlichen Tastaturen der verschiedenen Länder 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 Mißverständnissen 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 wäre eine direkte Abfrage der
  Tastatur-Hardware (so wie unter DOS) über ein Netzwerk nicht möglich -
  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
  länderspezifischen 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 für 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.  Länderübergreifende Einstellungen

  Die Tastaturtabellen sind Textdateien, die sich mit dem persönlichen
  Lieblingseditor bearbeiten lassen. Um z.B. die französischen
  Anführungszeichen auf <AltGr .> und <AltGr -> zu legen, ergänzt 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 Einträge ermöglichen wortweises Springen auf der
  Kommandozeile mit Strg-Cursortaste. Als Anregung für eigene
  Ergänzungen 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 erläutern
  welche Symbole gültig 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 Betätigung das
  Zeichen zunächst zurückgehalten 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 darüber).


  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 ã,
  während ein <~> <a> weiterhin ~a anzeigt.

  Um <Compose> auf die an vielen neuen Tastaturen vorzufindenden
  zusätzlichen Tasten zu legen, kann man z.B. konfigurieren:



       keycode 127 = Compose



  Bei mir trägt diese Taste das Symbol "Quadrat mit Pfeil in der linken
  oberen Ecke". Die Taste mit dem Fenster-Symbol (früher: 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 für die Textkonsolen

  Damit die länderspezifischen Zeichen überhaupt auf dem Bildschirm
  dargestellt werden können, muß der entsprechende Zeichensatz für den
  Bildschirm geladen werden. Akzeptable Ergebnisse erzielt man in der
  Regel mit `lat1u-16.psf', einem 16-Punkt hohen UNIcode-Zeichensatz.
  Der zugehörige 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 für 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 Lösung ist allerdings aus verschiedenen Gründen sub-
  optimal.



  5.3.  Tastenbelegung von `XFree86'

  `XFree86' ermöglicht den Betrieb von Programmen, die das `X Window
  System' benötigen. In Verbindung mit einem sogennanten
  `Windowmanager', der das Look&Feel bestimmt, stellt es die grafische
  Benutzeroberfläche unter Linux zur Verfügung.

  Oft wird empfohlen, die Tastenbelegung des XFree86 durch die Datei
  ~/.Xmodmap oder mit dem Befehl xmodmap zu konfigurieren. Dies ist
  nicht erforderlich, sondern unnötig kompliziert. Tatsächlich ist nur
  ein Eintrag in der Konfigurationsdatei des XFree86 notwendig, um die
  <AltGr> Taste zu aktivieren. Die Vorgehensweise unterscheidet sich für
  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 tatsächlich `dead' - aber leider ganz, nicht
  nur `halb'.  Die Freigabe der Alt-Tasten muß manuell vorgenommen
  werden, dazu trägt 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 für eine Emulation der <Meta>-Taste (benötigen z.B. die
  Programme emacs und bash).


  5.3.3.  Version 3.2 und höher:

  Konfigurationsdateien: /etc/X11/XF86Config und /etc/XF86Config

  Hat man eine Konfigurationsdatei der Version 3.1 oder will man es sich
  besonders einfach machen, dann verfährt man wie oben beschrieben und
  ergänzt 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 Einträge 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 Benutzerführung).

  Empfehlenswert für 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
       ! Für 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 (unabhängig von der Zeit einer Sonnenuhr an dem
  betreffenden Ort). Bezugspunkt für die Einteilung ist die Universal
  Time, kurz UTC.

  Zu einer Zeitzone gehören bestimmte Regeln, wie z.B. die Umstellung
  von Sommer- auf Winterzeit. Linux kann diese Regeln automatisch
  berücksichtigen.

  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 für die deutsche Zeitzone in clock.sys ist


       CET-1CEST,M3.5.0/2,M10.5.0/3



  Der Treiber clock.sys ist z.B. erhältlich 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 ausgeführt und ist daher für die weiteren Betrachtungen
  ebenfalls relevant.

  Für die Umstellung von Sommer- auf Winterzeit gibt es zwei
  Möglichkeiten: manuell oder automatisch.



       Umstellung              manuell          automatisch
       ----------------------------------------------------
       CMOS-Uhr                Ortzeit          UTC
       Option für clock        -keine-          -u



  Die Zeitzone der CMOS-Uhr setzt man am sichersten während des Bootens
  im BIOS Setup. "UTC" ist die  Universal Time: im Winter eine, im
  Sommer zwei Stunden weniger.

  Welches Skript den Befehl clock ausführt (und demnach die Option '-u'
  enthalten kann) muß man dem Handbuch der eigenen Distribution
  entnehmen.


  Die eigentliche Zeitzone wird unabhängig 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 früher gebräuchliche "MET" sollte unter keinen Umständen
  weiterverwendet werden. Markus Kuhn schrieb mir:


       Die Datei /usr/lib/zoneinfo/MET existiert nur zwecks
       Rückwärtskompatibilität.  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. Außerdem wird dann in der neuesten
       Version der Zeitzonentabelle "Mitteleuropäische 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 für
       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 Unterstützung von
  landesspezifischen Einstellungen so weit genormt, man einen Großteil
  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. Papiergröße und Zeitzone; allerdings wären beide bei
  größeren Ländern schlecht mit einer Variable zu erfassen, so daß man
  sie außen vorgelassen hat.

  Der richtige Ort für 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
  unvollständiger 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 führt. 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
  "Ausreißer", die die Umgebungsvariable LANG nicht auswerten.


  6.1.  Außer Konkurenz ...


  6.1.1.  Zeichensätze ohne Umlaute

  Sowohl für die Textkonsole als auch für X11 existieren Zeichensätze
  (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 natürlich
  die Konfiguration der Programme nicht weiter, sondern es muß ein
  anderer (vollständiger) Zeichensatz gewählt werden.



  6.1.2.  Eigene Süppchen

  Konfigurationsdateien: ~/.Xresources und /etc/X11/Xresources

  Das  X-Window-System wartet mit einer eigenen
  Konfigurationsmöglichkeit für Locale auf. Diese muß man aber nur
  nutzen, wenn man für einzelne X-Programme die Locale anders setzen
  will, d.h. wenn man die Einstellungen in den Umgebungsvariablen
  überschreiben will.

  Anders ausgedrückt: durch Setzen der Locale über die X-Resourcen
  verkompliziert man in den meisten Fällen das Setup der eigenen Linux-
  Machine (und wer will das schon). Andererseits gibt es natürlich
  Fälle, in denen das evtl. notwendig ist (aber wer hat die schon).

  Gerüchten 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 Ausreißer

  Solange nicht ausdrücklich erwähnt, betreffen die Einstellungen alle
  Versionen eines Programms. Die vorzunehmenden Einstellungen sind durch
  Einrückung 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 außerdem noch nach `/etc/skel/', so erhält sie
  jeder neu angelegte Benutzer automatisch. Eine globale
  Konfigurationsdatei gibt es leider noch nicht.

  Vorsicht: Kommentare und Leerzeilen in dieser Datei können zu
  Problemen füren.



  6.2.2.  telnet

  Konfigurationsdatei: ~/.telnetrc

  Erscheinen beim telnet statt `äöü' die Zeichen `dv|', so muß man für
  jede Maschine einen Eintrag der Form:



       localhost
            set binary true



  anlegen. Denselben Effekt erreicht man mit der Option "-8". Eine
  globale Konfigurationsdatei für 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

  Gegenüber 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 für den `emacs' sind:



       /usr/lib/emacs/site-lisp/site-start.el       (global),
       ~/.emacs                                 (persönlich),
       /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 Einträge
  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, erhältlich 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.  Weiterführende Tips



  6.3.1.  emacs

  Der emacs kann in seinen Fähigkeiten 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 nützlicher Module:


     pc-mode
        Konfiguriert die Tastaturbelegung so, wie PC-Benutzer es gewohnt
        sind.  Keine Landesspezifischen Abhängigkeiten, 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 unverändert 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 während der Eingabe
        der Zeichen zu einem a mit der Schlange darüber (und auch als
        solches abgespeichert).


     AUCTeX
        AUCTeX ist eine leistungsfähige 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 erwähnten Pakete sind erhältlich 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 höher

  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

  Für 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 (für den Atari) wird
  daher nicht empfohlen.


  6.3.2.2.  Layout

  Folgendes Beispiel kann als simples Grundgerüst für deutsche Texte
  (hier: Artikel) verwendet werden:



       \documentclass[a4paper]{article}
           %  Die Option "a4paper" stellt als Papiergröße
           %  DinA4 ein. Alle anderen LaTeX-Pakete verlassen sich auf
           %  diese Einstellung.

       \usepackage{german}
           %  stellt Abkürzungen für 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 Wörtern mit Umlauten

       \usepackage[latin1]{inputenc}
           % gibt den Zeichensatz des Dokuments an und macht somit die
           % Eingabe von latin1-Zeichen möglich.

       \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, Großbritannien 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 Möglichkeit, in der
  zugehörigen 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
  gültig. Vermutlich werden dann rechtzeitig neue Trenntabellen zur
  Verfügung stehen.



  6.3.3.  Rechtschreibprüfung mit deutschem Wörterbuch

  Zur Prüfung von Rechtschreibfehlern steht unter Linux das Programm
  ispell zur Verfügung. Die meisten Distributionen bieten dieses zur
  Installation an, die zugehörige deutsche Wortliste liegt seltener bei.


  6.3.3.1.  Die Wortlisten


  Einen recht brauchbaren Grundstock für eine eigene Wortliste enthält
  das Paket "hk-deutsch2" von H. Knutzen. Es umfaßt 22 Dateien, die
  individuell zu einer eigenen Wortliste zusammengefaßt werden können.
  Die dazu notwendigen Schritte werden in dem beiliegendem README genau
  erklärt.

  Durch die individuelle Zusammenstellung werden die Wortlisten kleiner
  und somit die Rechtschreibprüfung beschleunigt.

  Es soll aber nicht verschwiegen werden, daß man diesen Listen in der
  Regel noch eine "eigene" Wörter hinzufügen muß (dies ist mit ispell
  automatisch möglich).

  Das Paket ist erhältlich 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 Wörterbuch wird mit der Option '-d'
  ausgewählt, also z.B.



       ispell -d german -T latin1 -w "äöüÄÖÜß" German-HOWTO.txt



  für das Deutsche Wörterbuch in der Datei /usr/dict/german.hash
  (Binärformat).

  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


  Nähere Informationen zu Papierformaten findet man unter der URL

       <http://www.ft.uni-erlangen.de/~mskuhn/iso-paper.html>


  Folgende Programme können 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 enthält 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 ausschließlich
  die Zeilenenden um, die Zeichen selbst werden nicht angepaßt.
  Gleiches gilt für die Optionen `conv=auto', bzw. `conv=text' des
  mount-Kommandos bzgl. des MS-DOS Dateisystems.


  7.2.2.  Die Zeichensätze

  Die Zeichensätze setzen sich wie folgt zusammen:



       Linux: ISO-LATIN1
       DOS:   IBMPC Charactersets CP 437, CP 850, ...
       Mac:   Mac-Eigengebräu



  Der erste Teil aller dieser Zeichensätze 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 verfügbar.

  GNU recode ist von jedem GNU-mirror erhältlich, also z.B. von

       <ftp://ftp.uni-koeln.de/packages/gnu/recode-3.4.tar.gz>



  7.3.  Drucken


  Der
     Treppenstufen
                  -Effekt
                         (engl. staircase)
                                          rührt
                                                von
                                                   den
                                                      oben
  beschriebenen
               Unterschieden
                            im
                              Textformat
                                        her.



  Die meisten Drucker besitzen ein kleines Mäuse-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 verstümmelt gedruckt, so liegt das nicht am Drucker oder
  am `ghostscript' (konvertiert PostScript für 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 für das Ende einer Datei (unter Linux). Das
  fällt ebenfalls in die Kategorie "kaputtes PostScript" (wird aber
  mittlerweile von den meisten Druckerfiltern abgefangen).



  8.  Programmierung



  8.1.  National Language Support (NLS)

  Für Programmierer unbedingt zu empfehlen ist das Paket `GNU gettext'.
  Es stellt eine Bibliothek zur Verfügung, die den Programmen zur
  Laufzeit den Zugriff auf länderspezifische Informationen erlaubt.

  Welche Schritte im Einzelnen erforderlich sind, um ein Programm zu
  internationalisieren, erläutert 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 können 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.  Erklärende Ü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 Menüs und
  Hilfe-Funktionen der Programme vornehmlich in Englisch geschrieben
  sind.
  Dieser Abschnitt soll das Verständnis englischen Orginal-Dokumentation
  erleichtern, indem der technische Zusammenhang der Vokabeln erläutert
  wird (wenn nötig).

  Im Internet gibt es noch einige interaktive Wörterbücher, 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           Gerät; der Zugriff auf Geräte erfolgt unter Linux
                     fast ausschließlich über Dateien, die sogennanten
                     Gerätedateien 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 für
                     eine offene Datei
  font             Zeichensatz
  host             Maschine, Computer, Rechner (wörtlich: 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 Größe nicht mehr
                     in die dafür vorgesehene Variable paßt
  parenthesis      runde Klammer
  path             Pfad, meist als Begriff für den kompletten
                     Verzeichnisnamen zu einer Datei gebraucht
  pipe             Röhre, Veranschaulichung der Weiterleitung von Daten
                     von einem zum nächsten Programm; das sogennante
                     `pipe-symbol' ist das Zeichen | (senkr. Strich)
  press            Drücken Sie (die Taste)
  quote            Anführungszeichen oder Zitat
  <!-- quoten = quotes benutzen = zitieren -->
  remote           im Sinne von "die Gegenseite der Verbindung"
  resolve          Ermittlung (Auflösung) der numerischen IP-Adresse,
                     die zu einem Maschinennamen gehört
  server           Computer, der anderen Computern Dateien oder
                     Dienstleistungen zur Verfügung stellt
  source           meist Begriff für 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 erfüllt der Stern * diese Funktion,
                     z.B. zur unvollständigen 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 Pâs <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
  Configurações do Linux para a Língua 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 referência de configuração do
  Linux e seus programas, teclados e fontes de caracteres, permitindo
  sua utilização mais confortável por pessoas que falem a Língua Por­
  tuguesa.
  ______________________________________________________________________

  Table of Contents



  1. Introdução

     1.1 Finalidades deste HOWTO
     1.2 Onde encontrar a versão mais atual
     1.3 Página oficial na WWW
     1.4 Como enviar colaborações

  2. Informações gerais

     2.1 Conjuntos de caracteres
     2.2 Modo texto versus Sistema de Janelas X

  3. Configuração do console (modo texto)

     3.1 Mapas de teclado
     3.2 Mapas de tradução 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 funções libc e aplicativos GNU

     4.1 Configurando o suporte internacional
     4.2 Problemas com a libc 5

  5. Configuração do X

     5.1 Configuração do xinit
     5.2 Configuração do XDM
     5.3 Compose
     5.4 Locale
     5.5 Geração de mapas com o XKeyCaps
     5.6 Contornando os limites do X
        5.6.1 Alteração da biblioteca Xlib
        5.6.2 Alteração no kernel do Linux
        5.6.3 Comparação entre as duas soluções

  6. Configuração dos vários 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 Separação silábica
           6.1.18.3 Uso de Font Encoding T1
           6.1.18.4 Edição de documentos
           6.1.18.5 Teste da configuração 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 eletrônico

  7. Ficheiros necessários

  8. Informações Adicionais

     8.1 Fontes de informação sobre Linux em Português
     8.2 Free Translation Project
     8.3 LIE-BR
     8.4 Versões de software testadas

  9. Observações finais

     9.1 Futuras adições a este documento
     9.2 Nota de Direitos de Autor
     9.3 Garantia (inexistência de) e nota de responsabilidade
     9.4 Agradecimentos

  10. Bibliografia comentada



  ______________________________________________________________________

  1.  Introdução

  À semelhança de outras línguas faladas na Europa, a Língua Portuguesa
  tem características especiais, como a utilização de caracteres
  acentuados, que tornam o seu suporte difícil, pouco intuitivo ou até
  mesmo impossível, por parte do software utilizado nos nossos
  computadores.

  Nossa língua assume particularidades em cada um dos países em que é
  falada e mesmo dentro de um único país como o Brasil, de dimensões
  continentais e com influências culturais de muitos outros povos. Este
  documento foi originalmente escrito por um português, mas agora é
  mantido por um brasileiro. Há uma mistura de sotaques que deve se
  manter por um bom tempo, pois não há razão para alterar o texto
  original senão para fazer de adições e correções, até por respeito ao
  primeiro autor. Termos ``estrangeiros'' desnecessários foram
  substituídos por correspondentes da Língua Portuguesa, preservando-se
  apenas os que já fazem parte do jargão da informática.


  1.1.  Finalidades deste HOWTO

  Este HOWTO é um guia de referência de configuração do sistema
  operativo Linux e seus programas, teclados e fontes de caracteres,
  permitindo sua utilização mais confortável por pessoas que falem a
  Língua Portuguesa. Como os programas mais antigos não foram desenhados
  com suporte a caracteres acentuados ou internacionalização, às vezes é
  preciso usar algum artifício que permita contornar o problema, mas o
  resultado nem sempre é totalmente satisfatório e em alguns casos chega
  ser frustrante. As dificuldades encontradas centram-se essencialmente
  em torno de quatro pontos:


  ·  a introdução de caracteres acentuados através do teclado, como seja
     a escrita de jo~ao em vez da sua forma correcta: joão;

  ·  a exibição dos mesmos na tela do computador. O suporte resume-se
     normalmente à correcta localização das teclas, nada mais;

  ·  o correto tratamento de convenções nacionais de formato de datas,
     horas e valores monetários;

  ·  a exibição de mensagens, títulos e demais informações dos programas
     em outra língua que não o Inglês, que é a língua original da
     maioria desses programas.

  Versões anteriores do Portuguese HOWTO concentravam-se em contornar as
  duas primeiras dificuldades mencionadas, de forma a fazer que, dentro
  do possível, tanto o sistema operativo como os programas nele
  utilizados aceitassem os caracteres acentuados e usassem os teclados
  com suporte para o Português.  Embora esse objetivo ainda seja
  perseguido, os problemas de teclado e caracteres já têm soluções
  satisfatórias, pelo menos para as aplicações mais usadas. As próximas
  versões deverão se dedicar mais aos dois últimos problemas.

  O texto contém uma já não tão breve discussão sobre o tratamento do
  teclado e das fontes de caracteres do console pelo Linux, bem como do
  suporte a várias línguas nacionais. O Sistema de Janelas X também é
  discutido, fazendo-se uma comparação entre ele e o modo de texto. Por
  fim, são fornecidas instruções para a configuração do sistema
  operativo e de diversos aplicativos importantes.

  O documento tem se tornado menos slackwariano, incluindo cada vez mais
  informações relativas a outras distribuições. Slackware e Caldera
  ainda se baseiam na versão 5 da biblioteca de funções do sistema para
  Linux (libc), enquanto Debian, Red Hat, TurboLinux, S.u.S.E e Stampede
  já suportam a versão 6 (que na verdade é a glibc versão 2). Esta nova
  versão da biblioteca está um passo adiante no suporte a
  internacionalização e localização.  A partir da versão 3.2 do
  Portuguese-HOWTO as particularidades de cada distribuição serão
  destacadas quando houver necessidade. A tentativa de tornar Debian uma
  distribuição ``de referência'' a partir da versão 3.0 do HOWTO
  fracassou miseravelmente porque o número de diferenças entre as
  distribuições é muito grande.

  A intenção original de não tentar concentrar toda a informação em um
  único texto, tratando apenas de alguns temas essenciais e fornecendo
  referências para outras fontes, também fracassou. O HOWTO em sua
  versão 3.1 já alcançava 38 páginas impressas em formato A4, o que está
  longe de poder ser chamado de sucinto. As principais razões para tal
  gigantismo são a necessidade de discutir diferenças entre as
  distribuições e a necessidade de fornecer informações mais detalhadas
  sobre aplicativos.

  Excetuando-se aspectos muito específicos do Linux, como a configuração
  do modo texto e do kernel, a maioria das informações contidas neste
  documento pode ser aplicada a outros sistemas Unix. Exemplos são as
  configurações do Sistema de Janelas X e de vários aplicativos, que
  foram aplicadas em Solaris 2.{5,6,7} e Digital UNIX 3.2. Os mapas de
  teclado para terminais X e estações de trabalho Sun foram criados e
  são usados em máquinas que rodam Solaris. O documento poderá um dia se
  tornar o ``Unix Portuguese HOWTO'', embora no momento não se tenha
  intenção ou meios de fazê-lo.


  1.2.  Onde encontrar a versão mais atual

  Os Linux HOWTO fazem parte do Projeto de Documentação Linux (Linux
  Documentation Project -- LDP). Os documentos do LDP são mantidos em
  servidores da Universidade da Carolina do Norte (UNC) e do Instituto
  de Tecnologia de Massachusetts (MIT), nos Estados Unidos da América, e
  podem ser obtidos via FTP anônimo nos seguintes endereços:

  ·  <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 também folhear os documentos HOWTO em formato HTML no endereço

  ·  <http://metalab.unc.edu/LDP/HOWTO>

  Muitas localidades mantêm cópias desses documentos. Deve-se dar
  preferência ao acesso à cópia mais próxima, para economizar o precioso
  tráfego internacional na Internet e também evitar a sobrecarga da
  máquina metalab.unc.edu. Uma lista completa dessas localidades pode
  ser obtida em

  ·  <http://metalab.unc.edu/LDP/mirrors.html>

  Eis uma lista dos endereços 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 estão disponíveis em diversos formatos: texto simples,
  PostScript, DVI, HTML, RTF e Lyx. O formato original é SGML e os
  demais são gerados usando o SGMLtools (maiores informações em
  <http://www.sgmltools.org/>).

  1.3.  Página oficial na WWW

  A página oficial do Linux Portuguese-HOWTO, assim como os diversos
  arquivos de configuração do sistema e programas aplicativos
  mencionados no texto, podem ser encontrados nos seguintes endereços:


  ·  Brasil:  <http://linusp.usp.br/~casantos/>

  ·  Portugal:  <http://linux.fe.up.pt/howto/>


  1.4.  Como enviar colaborações

  Toda a formatação deste HOWTO, incluindo a numeração das seções é
  feita pelo SGMLtools. Por isso, ao enviar sugestões ou correções,
  mencione os títulos das seções onde as alterações sugeridas devem
  ocorrer e não os números. Nunca refira-se a um parágrafo como sendo
  ``o terceiro da seção 3.1''; cite as palavras inicias do trecho a ser
  modificado.

  Envie sugestões e correções via correio eletrônico em texto simples,
  opcionalmente com acentuação no código ISO-8859-1.  Se o texto não for
  composto em um sistema *NIX, certifique-se de usar a codificação
  correta.  Todas as mensagens recebidas serão lidas, mas nem todas
  receberão resposta direta, devido à falta de tempo para tanto.

  Não envie documentos no formato proprietário 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 vídeo ou
  rede não serão respondidas. Para esse tipo de consulta é aconselhável
  procurar uma lista de discussão sobre Linux em Português ou acompanhar
  os grupos de discussão de Linux na USENET comp.os.linux.*.

  ``Flames'' terão o destino costumeiro: /dev/null.


  2.  Informações gerais

  2.1.  Conjuntos de caracteres

  Um conjunto de caracteres é definido de acordo com os símbolos
  constantes no alfabeto utilizado para escrita em uma ou mais línguas.
  A Organização Internacional de Normas (International Standards
  Organization - ISO) padronizou através da norma ISO-8859 vários 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 códigos zero a
  127 correspondem ao conjunto ASCII (American Standard Code for
  Information Interchange) e os códigos 160 a 255 são usados para
  caracteres nacionais.

  Para a língua portuguesa, recomenda-se o uso do conjunto ISO-8859-1,
  que compreende o alfabeto latino e letras acentuadas usadas pelas
  línguas do oeste da Europa e América. Este conjunto de caracteres
  também é frequentemente chamado de Latin-1 ou ISO Latin-1.

  Um padrão mais recente é o Unicode, definido pela norma ISO-10646, que
  permite definir caracteres cuja representação interna no computador
  utiliza mais de um byte (ou octeto na nomenclatura ISO). Todas as
  versões mais recentes de sistemas Unix suportam Unicode (ou pelo menos
  seus fabricantes alegam suportar).

  Além dos caracteres alfanuméricos e sinais de acentuação, é possível
  também gerar sinais semigráficos para desenho de linhas e bordas.
  Esses sinais podem aproveitar códigos não utilizados pelo conjunto
  oficial, tornando-os não portáveis.

  O Linux foi desenhado internamente de modo a facilitar a sua fácil
  configuração e extensão em tempo de execução, não constituindo o
  tratamento do teclado e fontes de caracteres excepção. Ele possui uma
  implementação ``nível 1'' do padrão 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 seção ``Man, groff, troff''.


  2.2.  Modo texto versus Sistema de Janelas X

  Alguns sistemas operativos, tais como MacOS, Microsoft Windows e NeXT,
  possuem interfaces gráficas próprias. No Linux, assim como na maioria
  dos sistemas compatíveis com Unix, é de uso corrente um ambiente
  gráfico criado para ser ``multiplataforma'': o X Window System, que
  também foi projetado para suportar diversos conjuntos de caracteres,
  idiomas e formatos de teclado, mas ainda não suporta totalmente o
  padrão Unicode e sim uma extensão do ISO-8859.


       A rigor o X Window System não é uma interface gráfica com o
       usuário, mas a combinação de um protocolo de comunicação com
       uma interface com programas aplicativos (API) sobre a qual
       se construíram várias interfaces gráficas.  Tanto o proto­
       colo quanto o Sistema de Janelas definem um conjunto de
       mecanismos e não políticas (elementos característicos da
       política de uma Interface Gráfica com o Usuário são menus,
       botões e caixas de diálogo).  O uso do termo ``XWindows'' é
       incorreto e deve ser evitado, dando-se preferência ao nome
       genérico ``X''.


  Existem muitas semelhanças entre os dois ambientes.  Ambos se baseiam
  em padrões internacionais para definição 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 seqüência
  compose-,-c gerará um c cedilhado.

  O tratamento do console é feito diretamente pelo sistema operativo e
  aplicações comuns não se envolvem com o processamento dos códigos de
  varredura do teclado, recebendo um caracter ou uma seqüência 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 -- são controlados por uma
  aplicação especial chamada servidor X. O pressionamento de uma tecla
  gera uma mensagem (chamada de evento) que é passada pelo servidor X à
  aplicação 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 máquinas diferentes. A máquina onde roda o servidor é
  chamada estação de trabalho ou terminal X e a máquina onde roda a
  aplicação (programa cliente) também é chamada de cliente.

  Foge ao escopo deste texto a discussão mais profunda do tratamento de
  eventos no X. Para maiores informações, sugere-se a consulta aos
  documentos mencionados na seção ``Leituras recomendadas'', mas é
  importante esclarecer que o evento enviado pelo servidor ao cliente
  não contém o código numérico da tecla, chamado keycode na terminologia
  do X.  Ao invés disso, é enviado um símbolo, chamado keysymbol ou
  keysym, obtido pela consulta a uma tabela de conversão mantida na
  memória do servidor.  Esta tabela pode ser modificada total ou
  parcialmente a qualquer momento por meio de requisições definidas no
  protocolo X.

  Existe um programa chamado xmodmap capaz de ler um arquivo contendo
  uma tabela de conversão keycode-->keysym e enviá-la, também na forma
  de mensagens no protocolo X, ao servidor. É responsabilidade do
  cliente e não do servidor interpretar o keysym, o que significa que a
  aplicação deve saber esperar mais um caracter ao receber uma ``tecla
  morta'' para compor uma letra acentuada.

  Desde a revisão 5 do X existe na bibliotaca de funções (Xlib) um
  mecanismo sofisticado de suporte à geração de caracteres em diversos
  códigos.  A função de tratamento de entrada de texto que já existia
  nas versões anteriores, chamada XLookupString, entretanto,  não
  processa as seqüências de acentos e letras de modo transparente às
  aplicações. Ao invés disso foi incluído um método de composição usando
  contextos de entrada (input contexts) por meio das funções
  XmbLookupString e XwcLookupString, cujo uso é responsabilidade da
  aplicação -- ou do seu programador, melhor dizendo -- mesmo no caso da
  tecla Compose.  Isto deve-se so fato de o X Consortium ter chegado à
  conclusão de que o sistema de mapeamento de teclas não tratava de
  forma satisfatória toda a imensa variedade de línguas escritas nas
  várias partes do mundo. Deste modo, decidiu-se que o ``peso'' relativo
  à gestão do teclado fosse transferido para as aplicações X, o que cria
  uma dificuldade quando usamos aquelas mais antigas, que não usam o
  novo método de tratar a entrada.

  Por essas razões é normalmente mais difícil conseguir acrescentar
  suporte à geração de caracteres acentuados em aplicativos que rodam
  sob o X, principalmente quando não se possui o código fonte.
  Aplicativos feitos para rodar apenas em modo texto, tais como vi e
  minicom dependerão totalmente dos recursos do emulador de terminal em
  uso quando rodando em uma janela do X. Se for usada uma versão atual
  do xterm ou rxvt o emulador fará o tratamento correto dos acentos.

  O francês Thomas Quinot, cansado de esperar uma solução melhor para o
  problema da acentuação no X, resolveu implementar uma modificação para
  a Xlib proposta por André D. Balsa, que adiciona suporte à acentuação
  direta conforme mostrado na seção ``Contornando os limites do X''.
  Isso permite usar aplicações como xfig ou xedit sem que seja
  necessário alterá-las. O truque parece funcionar apenas para
  caracteres do código ISO-8859-1 mas é suficiente para o Português e
  outras línguas. Como bem observa Balsa, a longo prazo todos os
  programas deverão ser modificados para usar os novos recursos do X,
  mas como a longo prazo estaremos todos mortos a solução de curto prazo
  de Quinot torna-se bastante atraente...


  3.  Configuração do console (modo texto)

  O documento de referência sobre a configuração do console do Linux é o
  Keyboard and Console HOWTO, de Andries Brouwer, que pode ser
  encontrado nos repositórios do LDP. Conforme lá descrito, a
  configuração da fonte de caracteres e mapa de teclado é feita usando o
  pacote KBD, encontrado em todas as distribuições de Linux.


  3.1.  Mapas de teclado

  Cada tecla do PC possui um código numérico. Ao pressionarmos uma delas
  o processador controlador do teclado envia ao computador esse código
  de varredura, também conhecido como scancode, junto com um sinal de
  que a tecla foi pressionada ou solta. As seqüências de eventos são
  então processadas pelo driver de teclado e armazenadas em uma fila de
  caracteres que é lida pelas aplicações por meio da chamada de funções
  do sistema operativo.

  Um mapa de teclado é um arquivo de texto que estabelace as
  correspondências entre o scancode de tecla e o caracter (ou seqüência
  de caracteres) a gerar quando ela for pressionada, chamado keycode.
  Por exemplo:

      # atribuição da tecla '-' do teclado numérico à tecla com código 74
      keycode  74 = KP_Subtract

      # atribuição da tecla '4' do teclado numérico à tecla com código 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



  Além das teclas alfabéticas, numéricas e de símbolos, existem outras
  chamadas modificadoras que permitem gerar códigos que não correspondem
  a nenhum sinal gráfico: Shift Control Alt e Meta. Esta última
  normalmente não é encontrada em teclados de PCs, apenas em estações de
  trabalho de fabricantes como Sun, SGI, HP e Digital (eles não gostam
  de ser chamados de ``DEC''). O editor de texto Emacs usa muito a tecla
  Meta.

  O arquivo de mapa permite também especificar teclas especiais chamadas
  ``teclas mortas'' (deadkeys). Quando pressionadas elas não 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 tradução de tela

  Um mapa de tradução de tela permite especificar qual o caracter X a
  ser exibido na tela, quando um programa deseja exibir um caracter Y.
  Desta forma, poderíamos fazer com que ao escrever o caracter com o
  código do c-cedilhado na tela, fosse na realidade exibido um outro
  caracter de código diferente mas cuja imagem na nossa fonte de
  caracteres correspondesse à imagem de um c-cedilhado.

  Este mapeamento é necessário apenas quando queremos usar uma fonte
  cujos caracteres não possuem códigos 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 alteração 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 também tem um comanto chamado
        showfont, que serve para mostrar as características de uma
        determinada fonte, mas não 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
        não provocará nenhum dano.

     Mapscr
        Permite carregar um mapa de tradução de tela. Suponhamos que
        exista o arquivo /etc/portugal.trad. Se executarmos o comando

            mapscrn /etc/portugal.trad


     então a partir deste momento as traduções lá definidas serão
     usadas.

     Loadunimap
        Carrega um mapa de tradução de Unicode para a fonte de tela. O
        mapa padrão, chamado ``def.uni'' considera que estamos usando a
        fonte normal do IBM-PC.  Este comando não é necessário quando
        usamos uma fonte com caracteres definidos no padrão Unicode,
        pois o programa setfont carrega automaticamente a tabela de
        mapeamento adequada. O comando a seguir carregará o mapa de
        tradução para as fontes latin-1:

            loadunimap lat1



  3.4.  Carregamento de uma fonte de caracteres

  O pacote KBD contém dois tipos de fontes com codificação latin-1:

  ·  as que já possuem uma tabela de mapeamento unicode, carregada
     automaticamente pelo programa setfont. Estas fontes têm nomes
     lat1u-*.psf;

  ·  as que não possuem tabela de mapeamento. Neste caso é preciso
     carregar uma com o programa loadunimap. Estas têm nomes lat1-*.psf
     (o ``u'' indica Unicode).

  Nas versões mais novas do KBD os arquivos são comprimidos com gzip.  É
  preciso carregar uma fonte que tenha os caractres latinos acentuados
  no padrão ISO 8859-1 e também os símbolos semigráficos. As fontes de
  nome iso01.* não possuem esses símbolos. A fonte mais recomendada é a
  lat1u-16.psf.

  As versões mais antigas do pacote KBD mantinham essas fontes no
  diretório /usr/lib/kbd/consolefonts, que foi trocado depois da versão
  0.92 por /usr/share/consolefonts. Dependendo da sua distribuição e do
  quanto ela esteja atualizada o diretório 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 desnecessário
      # com a fonte lat1u-16.psf.
      # loadunimap lat1u

      # Remova o comentário 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 não é Windows!


  3.4.3.  Red Hat

  Edite o arquivo /etc/sysconfig/i18n e veja se contém 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 língua correta durante a instalação não há nada
  mais a fazer. A configuração é feita extatamente como do Red Hat.


  3.4.5.  S.u.S.E.

  Edite o arquivo /etc/rc.config e procure uma linha que começa com
  ``FONT='' (linha 64, em minha máquina com S.u.S.E. verão 5.6) e
  coloque

      FONT=lat1u-16.psf



  Edite os scripts boot.setup e single contidos no diretório /etc/rc.d.
  Procure a linha contendo o comando /usr/bin/loadunimap e remova-a ou
  ponha no seu início um ``#'' para deixá-la como comentário. Veja
  comentários sobre este comando na seção ``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 é necessário carregar o mapa de teclado adequado. Até a
  versão 0.92 do pacote KBD esses mapas ficavam no diretório
  /usr/lib/kbd/keytables passando mais tarde para /usr/share/keytables.
  Dependendo da distribuição você terá um diretório ou outro. Os mapas
  para diversos tipos de teclados são 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 disponíveis no diretório
      # /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 faça o seguinte:

  ·  copie os arquivos com os mapas de teclado fornecidos (veja a seção
     ``Ficheiros necessários'') para o diretório /usr/share/keytables/.
     Não é necessário 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 seção ``Ficheiros necessários'')
  para o diretório /usr/lib/kbd/keytables/ (ou
  /usr/lib/kbd/keymaps/i386/qwerty/, a pertir do Red Hat 5.2). Não é
  necessário descomprimi-los.

  Edite o arquivo /etc/sysconfig/keyboard e coloque o nome do mapa a
  usar na variável KEYTABLE, como por exemplo

      KEYTABLE="abnt2"



  3.5.4.  Conectiva Red Hat Linux.

  O CRHL já vem com os mapas de teclado para Português. Se você
  selecionou o teclado correto durante a instalação, não há mais nada a
  fazer. Caso contrário, 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, português 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 seção ``Ficheiros necessários'')
  para o diretório /usr/lib/kbd/keytables/. Não é necessário
  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 não tem esta
  tecla, digite 'c). Verifique se todas as letras acentuadas, maiúsculas
  e minúsculas são 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 operações
  foi mal sucedida.

  Se ao invés de c-cedilha minúsculo aparecer um maiúsculo é provável
  que uma tabela de mapeamento Unicode incorreta esteja a ser carregada.
  Este problema ocorrerá na distribuição S.u.S.E. se não se fizerem as
  alterações nos scripts do sistema mencionadas anteriormente.

  3.6.  Verificando erros

  Mas, e se alguns dos caracteres continuarem a não 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 não
  segue a codificação ISO Latin-1 (é o caso da fonte padrão do console
  do PC). Teríamos então de convencer a tela a mostrar os caracteres
  certos em cada caso.

  Poderíamos recorrer ao comando mapscrn.  O arquivo com a tabela de
  tradução teria no entanto de ser criado por nós, seguindo um processo
  moroso de tentativa e erro até encontrar o caracter cuja imagem
  desejávamos. Ou, de uma forma mais fácil, poderíamos usar o comando
  showfont.

  Se usarmos a fonte de caracteres correta, o uso deste último comando
  será desnecessário. É até recomendável que não se use tal recurso,
  pois embora ele permita criar uma tabela de caracteres
  ``personalizada'' em um computador, será difícil que um documento
  acentuado produzido nessa máquina possa ser lido em outra que não
  tenha a mesma configuração.


  4.  Biblioteca de funções libc e aplicativos GNU

  A biblioteca padrão de funções do Linux suporta Internacionalização e
  Localização segundo o padrão POSIX (Portable Operating System
  Interface).  Trata-se de uma norma estabelecida pelo IEEE (Institute
  of Electrical and Electronics Engineers) para intercomunicação entre
  diferentes sistemas operativos. Existe também um padrão estabelecido
  pelo ANSI (American National Standards Institute) para a linguagem de
  programação C que permite escrever programas com suporte
  internacional.


  4.1.  Configurando o suporte internacional

  Resumidamente, podemos dizer que as funções que tratam informações
  dependentes da língua ou do país podem ter seu comportamento
  modificado, bastando para tanto estabelecer algumas variáveis de
  ambiente. E que funções são essas?  Podemos citar as de formatação de
  datas, valores monetários e mensagens de erro do sistema. Se você não
  sabe o que é uma variável de ambiente, sugiro que leia o manual com o
  comando

      man environ



  O padrão POSIX permite usar diversas variáveis de configuração, cada
  uma delas definindo o tratamento dado a um tipo de informação, a saber

     LC_COLLATE
        Define regras para comparação entre caracteres no alfabeto
        local. Por exemplo, a letra `ã' deve ser tratada como idêntica
        ao `a' no Português quando ordenamos alfabeticamente.


     LC_CTYPE
        Define regras para comparação entre caracteres maiúsculos e
        minúsculos. Se estivermos trabalhando com o código ASCII,
        sabemos que o código numérico de uma letra minúscula é 32 a mais
        do que a maiúscula correspondente, mas para uma letra acentuada
        esta regra não é válida!


     LC_MONETARY
        Muda o comportamento das funções de formatação de valores
        monetários e permite descobrir, por exemplo, o símbolo da moeda
        local, ou se usa ponto ou vírgula como separador de milhares e
        de casas decimais.


     LC_MESSAGES
        Estabelece a língua em que as mensagens serão apresentadas e
        como é uma resposta afirmativa ou negativa (S/N).


     LC_NUMERIC
        Estabelece o comportamento das funções de leitura/escrita de
        valores numéricos permitindo, por exemplo que usemos a vírgula
        decimal.


     LC_TIME
        Define a formatação de datas e horas.


     LC_ALL
        Define de uma só vez todas as categorias. Se usarmos LC_ALL, não
        precisaremos definir nenhuma das outras, a não ser que queiramos
        um comportamento diferente para aquele ítem específico.


     LANG
        Define de uma só vez todas as categorias, se LC_ALL não estiver
        definida.  Também é usada pelo comando man para compor os
        caminhos pelos quais ele procurará as páginas do manual. Veja as
        observações a respeito desta variável nas seções ``Locale'',
        ``Locale'' e ``Locale''.

  Maiores informações podem ser obtidas no manual do sistema com o
  comando

      man 7 locale


  O `7' no comando anterior é necessário para evitar confusão com uma
  função homônima da linguagem Perl. Note que as configurações acima
  afetam, em princípio, apenas as funções disponíveis na biblioteca de
  funções da linguagem C. Na prática, todos os programas que rodam em
  Linux usam aquela biblioteca, mas o sistema operativo não provê,
  catálogos de mensagens em diversas línguas para todos os programas.

  A identificação da língua e do local é feita por dois códigos de duas
  letras, separados por um sinal ``_''. Se omitirmos o código de país,
  assume-se o país padrão para a língua informada, mas deve haver um
  catálogo correspondente.  Deste modo, o código ``pt_PT'' significa
  Português de Portugal, enquanto ``pt_BR'' significa Português do
  Brasil. Escolher uma combinação língua/local basta então colocar em
  seu arquivo /etc/profile uma linha contendo



      LC_ALL="pt_PT"
      export LC_ALL


  Usuários brasileiros devem usar ``pt_BR'' ao invés de ``pt_PT''. Teste
  o resultado com os comandos a seguir (/inexistente é o nome de um
  arquivo que não 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 Português e cal deve mostrar um calendário
  de janeiro de 1999, com do se te qu qu se sá no cabeçalho dos dias da
  semana.

  Na distribuição Debian, certifique-se de ter instalado o pacote
  ``locales'', que pertence ao grupo ``admin''. O nome do arquivo que
  contém o pacote (na versão 2.0 da distribuição) é locales_2.0.7t-1.deb
  e em meu CD está no diretório debian/main/binary-i386/admin.

  4.2.  Problemas com a libc 5

  Até meados de 1997 todas as distribuições de Linux usavam a mesma
  biblioteca libc, que estava na versão 5, desenvolvida a partir de uma
  versão mais antiga da libc do projeto GNU. Esta biblioteca possuia
  suporte muito limitado à internacionalização e normalmente nenhum dos
  catálogos de locais era incluído na distribuição, ficando o inglês
  como língua padrão.

  A versão 6 da libc do Linux baseia-se na versão 2 da libc do projeto
  GNU. O suporte à internacionalização foi muito melhorado, além de
  incluir outros atributos que não interessam para os fins deste HOWTO.
  Se sua distribuição for a Debian versão 2, Red Hat versão 5 ou
  qualquer outra que use a nova libc, então não há mais nada a fazer
  além do descrito na seção anterior.

  Mas se você usa uma distribuição ainda baseada na libc 5 (Slackware,
  Caldera 1.x ou uma versão mais antiga de Debian ou Red Hat) é preciso
  instalar a coleção de locais. Não tente copiar a coleção de uma
  distribuição mais recente, pois os formatos dos arquivos são
  incompatíveis. Pegue na página do Portuguese HOWTO o arquivo locales-
  pt.tgz. Para instalá-lo na distribuição Slackware, basta (como usuário
  root) usar o comando

      installpkg locales-pt.tgz


  e para outras distribuições use o comando

      tar xzf locales-pt.tgz -C /



  Verifique se há dois subdiretórios do /usr/share/locale chamados pt_BR
  e pt_PT. Basta então configurar a variável de ambiente LC_ALL, como já
  descrito.



  5.  Configuração do X

  Quando o servidor X está ativo, ele coloca o teclado do computador em
  um modo de operação chamado raw (cru), em oposição ao modo normal,
  chamado cooked (isto mesmo: cozido). No modo raw o sistema operativo
  não processa seqüências acento-letra. O servidor X é uma daquelas
  raras aplicações que, por dever de ofício, tem que tratar o teclado
  ``em baixo nível''.

  O X vem equipado com um utilitário destinado à configuração do
  teclado, chamado xmodmap, que cumpre uma função correspondente à do
  comando loadkeys, ou seja, lê um arquivo de mapa de teclado do X,
  expecificando as equivalências 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 contrário do loadkeys, o xmodmap não possui um
  diretório padrão onde o arquivo é procurado.

  A configuração do X não interfere de forma alguma com a configuração
  do modo de texto.  De facto, é possível ter o seu X bem configurado, e
  no entanto não ter realizado qualquer tipo de configuração ao modo de
  texto, e vice-versa.  Outro ponto importante de se observar é que os
  códigos numéricos das teclas no X não correspondem aos do console. A
  tecla Backspace, por exemplo, tem o número 14 no console, e 22 no X
  (em um computador do tipo IBM-PC).

  As versões 3.2 e posteriores do XFree86 permitam definir dead-keys,
  mas o seu tratamento é responsabilidade da aplicação, conforme visto
  na seção ``Modo texto versus Sistema de Janelas X''. Há modos de
  contornar esta limitação e tornar o tratamento de dead-keys
  transparente às aplicações, conforme mostrado na seção ``Contornando
  os limites do X''.

  Dividimos a configuração em duas partes: Uma que deve ser feita antes
  do login do usuário e outra depois.


  5.1.  Configuração do xinit

  Junto com este documento são fornecidos vários mapas de teclado para
  uso no X. Para automatizar o processo de configuração do teclado basta
  copiar o arquivo adequado para o diretório /usr/X11R6/lib/X11/xinit,
  onde normalmente ficam os arquivos de início da seção de trabalho no
  X. Na distribuição Slackware esse diretório é um link simbólico para
  /var/X11R6/lib/xinit e na Debian e na Red Hat para /etc/X11/xinit.

  Nas distribuições Slackware e Red Hat, verifique se no referido
  diretório existe um arquivo chamado .Xmodmap. Se existir, copie o
  Xmodmap.<alguma-coisa>  para ele, ou faça um link.  Normalmente o
  arquivo de configuração 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 distribuição Debian o mapa de teclado padrão do X é
  /etc/X11/Xmodmap, basta copiar o mapa desejado para aquele arquivo.
  Ele será carregado pelo xinitrc, que por sua vez é um link simbólico
  para /etc/X11/Xsession, sempre que iniciar a seção de trabalho do
  usuário.


  5.2.  Configuração 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 seção
  de trabalho, o mapa de teclado não será carregado, o que pode criar
  problemas se o usuário usa caracteres como ``['' ou ``]'' em sua
  senha, pois nos teclados ABNT-2 e português esses símbolos são gerados
  por teclas cujos códigos numéricos não são os mesmos do teclado
  americano.

  É preciso fazer uma pequena alteração no arquivo de configuração
  Xsetup_0.  Esse arquivo deve estar no diretório
  /usr/X11R6/lib/X11/xdm, que na Slackware é um link simbólico para
  /var/X11R6/lib/xdm e /etc/X11/xdm na Debian e -- sujeito a confirmação
  -- RedHat. Eis o conteúdo 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 distribuição 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 usuário também for feito sempre via
  xdm, não é necessário mexer no xinitrc, como mostrado na seção
  anterior, já que o mapa de teclado será carregado antes do início na
  seção do usuário.


  5.3.  Compose

  Uma das coisas mais importantes a definir quando vamos utilizar
  acentuação por meio de dead-keys é o conjunto de regras de composição.
  Essas regras determinam, por exemplo que a composição do caracter
  ' com a letra e gerará um é.

  Ao contrário do console, no qual podemos definir as regras de
  composição no próprio mapa de teclado, no X essas regras são colocadas
  no arquivo /usr/X11R6/lib/X11/locale/???/Compose, onde ??? é a
  codificação em uso (no nosso caso, iso8859-1).

  Para facilitar o uso dos mapas para teclados que não têm o c-
  cedilhado, como o US+ (veja adiante) é conveniente definirmos uma nova
  regra de composição, permitindo que o Ç seja gerado pela seqüência 'C.
  Se não fizermos isso, seremos obrigados a digitar <dead_cedilla-C>,
  sedo o dead_cedilla produzido pela combinação AltGR-=, o que não é
  nada confortável. Além disso, no teclado americano somos obrigados a
  usar as aspas duplas para gerar o trema.

  O arquivo Compose fornecido foi feito procurando imitar ao máximo o
  comportamento do console e possui as seguintes facilidades para
  geração de caracteres:

  ·  C-cedilha: tecla Ç ou seqüência <acento-agudo>-C

  ·  Apóstrofo: tecla ' ou seqüências <acento-agudo>-<acento-agudo> e
     <acento-agudo>-<espaço>

  ·  Acento grave: seqüências <acento-grave>-<acento-grave> e <acento-
     grave>-<espaço>

  ·  Aspas: tecla " ou seqüência <trema>-<trema>

  ·  Trema: seqüência <trema>-<espaço>

  ·  Til: seqüências <til>-<espaço> e <til>-<til>

  ·  Circumflexo: seqüências <circumflexo>-<espaço> e
     <circumflexo>-<circumflexo>

  Para incluirmos as novas regras, basta aplicar uma alteração à
  definição original. O arquivo Compose.patch pode ser obtido via WWW na
  página do Portuguese HOWTO. Para aplicar a atualização, copie-o para o
  diretório /usr/X11R6/lib/X11/locale/iso8859-1/, faça uma cópia de
  reserva do Compose original e invoque o utilitário patch:

      cp -p Compose Compose.backup
      patch < Compose.patch



  Caso você prefira não aplicar o ``patch'', um arquivo Compose pronto
  também é fornecido. Lembre-se de fazer cópia do original antes de
  substituí-lo!

  5.4.  Locale

  Para os usuários brasileiros, pode haver mais uma alteração a fazer no
  X.  Conforme vimos na seção ``Biblioteca libc'', uma variável de
  ambiente (LANG ou LC_ALL) configura o suporte internacional existente
  na biblioteca de funções padrão do sistema (libc). A biblioteca de
  funções do X (Xlib) usa a variável LANG para identificar a língua em
  uso mas até a revisão 6.3, na qual é baseado o XFree86, não era
  incluída a combinação ``pt_BR'', correspondente a Português/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 três arquivos
  existentes no diretório /usr/X11R6/lib/X11/locale. Pegue o arquivo
  Xlocale.patch via WWW na página do Portuguese HOWTO. Para aplicar a
  atualização, copie-o para o diretório /usr/X11R6/lib/X11/locale, faça
  uma cópia de reserva dos arquivos a serem alterados e invoque o
  utilitário 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 não aplicar o ``patch'', arquivos prontos também são
  fornecidos. Lembre-se de fazer cópias dos originais antes de
  substituí-los!

  Em setembro de 1998 o fix-2 da revisão 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 funções de tratamento de input
  contexts da Xlib que provoca violações de acesso à memória. Uma das
  aplicações afetadas é o processador de textos LyX. Uma correção
  provavelmente será incluída no fix-4. O X11R6.4 deverá ser a base para
  a versão 4 do XFree86.


  5.5.  Geração de mapas com o XKeyCaps

  O programa XKeyCaps, criado por Jamie Zawinski é uma interface gráfica
  para o xmodmap, que mostra na tela o desenho de um teclado e permite
  modificar interativamente os símbolos 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 versão 2.43, já incoropra também suporte para o desenho
  brasileiro (ABNT2), uma contribuição de Andre Gerhard.



  5.6.  Contornando os limites do X

  Conforme foi explicado na seção ``Modo texto versus Sistema de Janelas
  X'', o tratamento de acentos deve ser feito pela aplicação, mas ainda
  há muitos programas que não levam isto em consideração, tais como
  Netscape Navigator/Communicator e Nedit. Como não é possível modificar
  muitos deles, é preciso encontrar outro tipo de solução.


  5.6.1.  Alteração da biblioteca Xlib

  Linux, assim como a maioria dos sistemas operacionais modernos, usa um
  sistema de vínculo de programas a bibliotecas de funções chamado
  ``ligação dinâmica'' (dynamic binding). Deste modo, podemos modificar
  o comportamento de um programa alterando uma dessas bibliotecas.
  Maiores informações 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 alteração para a biblioteca de funções do X
  (Xlib) introduzindo o tratamento de acentos na função XLookupString,
  Tudo que se tem a fazer é substituir o arquivo contendo esta bib­
  lioteca por outro, que pode ser obtido via internet no endereço


       <http://web.fdn.fr/~tquinot/dead-keys.en.html>


  Existem duas versões 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 não possuem tal atributo (Slackware,
  Caldera 1.x). Se você não sabe o que são threads não 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 não aparecer, seu
  sistema não suporta threads e o arquivo a obter é
  libX11-XF3.3.1.tar.gz. Tendo obtido o arquivo, copie-o para um
  diretório temporário e extraia seu conteúdo.  Mova o arquivo
  /usr/X11R6/libX11.so.6.1 para outro diretório, para preservá-lo. Não é
  suficiente renomeá-lo! Remova-o para um diretório cujo nome não 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
  usuário 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

  É aconselhável que a operação seja realizada quando nenhuma aplicação
  X estiver rodando. A seguir, edite o arquivo de configuração do
  servidor X, chamado XF86Config. Este arquivo fica no diretório /etc
  (Slackware) ou /etc/X11 (Debian, Red Hat). Procure a seção
  ``Keyboard'' e inclua a opção ``XkbDisable'', conforme mostrado a
  seguir:

      Section "Keyboard"
         Protocol        "Standard"
         XkbDisable
      EndSection



  A opção XkbDisable inabilita a extensão XKEYBOARD do servidor X, o que
  neste caso serve para sinalizar à função XLookupString que ela deve
  tratar os acentos. Se quisermos voltar ao comportamento normal, basta
  retirar a opção do XF86Config.

  Configure o mapa de teclado do X conforme explicado nas seções
  anteriores deste documento. Para testar o resultado, rode o programa
  xedit e digite alguns caracteres acentuados.


  5.6.2.  Alteração no kernel do Linux


       Esta seção é baseada em contribuição enviada por Bruno Bar­
       beri Gnecco e na documentação do diacrd. Podem haver ainda
       alguns erros e se alguém 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 operação do teclado, chamados raw e cooked. Estes modos de
  operação podem ser mudados com o programa kbd_mode, integrante do
  pacote kbd, o que não é recomendável fazer a não ser para restaurar o
  estado do console após um desastre com o servidor X, por exemplo. No
  modo raw o kernel não processa os diacríticos (acentos).

  Cedric Adjih criou uma alteração para o kernel que permitia tratar os
  acentos mesmo em modo raw, inicialmente voltada para o teclado de
  desenho francês.  Enéas Queiroz, André D. Balsa e Claudemir Todo Bom
  fizeram melhorias e o adaptaram para os teclados internacional,
  português 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 modificação 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 são lidos pelo programa
     diacrd, que processa as seqüências acento-letra e reescreve no
     /dev/rawkbd os caracteres acentuados na forma de códigos de
     varredura (scancodes) que normalmente não existem no teclado.

  ·  O kernel lê no /dev/rawkbd os códigos gravados pelo diacrd e os
     passa à aplicação, que no caso é o servidor X.

  ·  O servidor X mapeia os códigos de varredura para caracteres. Um
     mapa de teclado especial permite então gerar as letras acentuadas.

  O diacrd pode ser obtido via FTP anônimo no endereço


  <ftp://metalab.unc.edu/pub/Linux/system/keyboards>


  Há versões diferentes, de acordo com o tipo de teclado e, pelo menos
  por enquanto, não se pode reconfigurá-lo sem recompilar. Para fazer a
  instalação, de acordo com o arquivo ``README'', deve-se fazer o
  seguinte (pelo usuário root):

  ·  Obtenha o arquivo -.tar.gz correspondente a seu teclado. Extraia
     seu conteúdo, o que deverá criar um diretório chamado
     diacrd-<versão>.

  ·  Edite o arquivo diacrd.c e remova os comentários desejados, de
     acordo com suas preferências. Pode-se incluir capacidade de rodar o
     programa xmodmap e ejetar o CD-ROM sob controle do pressionamento
     de uma combinação de teclas.

  ·  Aplique a modificação 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 informações sobre compilação/instalação do kernel, leia o
  Kernel-HOWTO, disponível via Internet nos repositórios do LDP men­
  cionados na seção ``Onde encontrar a versão 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 seção ``Configuração do console'' como carregar um mapa com
  suporte à acentuação. O pacote diacrd vem com um arquivo chamada
  usintl.map, que corresponde ao nosso us+.map. Se seu teclado não 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 geração de acentos funcionar, é preciso tornar permanentes as
  alterações necessárias. 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 ativação do
       diacrd para a distribuição Debian ou Red Hat, por favor
       envie-o para que seja incluído aqui.


  Mais informações sobre o diacrd podem ser encontradas no ``Dead keys
  Mini-HOWTO'' de Claudemir Todo Bom, disponível em  <http://linux.uni­
  camp.br/docs/diversos/deadkeys.html>.


  5.6.3.  Comparação entre as duas soluções

  Em termos de resultados práticos, a Xlib modificada e o diacrd são
  equivalentes. Há porém algumas diferenças entre as duas soluções que
  merecem atenção.

  Diacrd exige uma alteração no kernel do Linux para resolver um
  problema que o kernel já resolve, o que não deixa de parecer um tanto
  redundante. A dependência de um processo de usuário (o daemon kerneld)
  é uma desvantagem, pois se esse programa deixar de funcionar perde-se
  o suporte à acentuação no X. Trata-se de uma solução ainda em
  desenvolvimento e, segundo o conteúdo da documentação que o acompanha,
  o ideal seria que todo o tratamento fosse feito pelo kernel, sem
  depender de outro programa.

  Até o momento da publicação deste HOWTO, o diacrd ainda não era
  compatível com a versão 2.2 do kernel do Linux.

  A solução via Xlib é, pelo menos em teoria, totalmente transparente às
  aplicações e permite reconfiguração em tempo de execução, bastando
  alterar o mapa de teclado do X e as regras de composição. Já o diacrd
  precisa ser recompilado se quisermos trocar o tipo de teclado, mas é
  possível que novas versões incorporem algum recurso de reconfiguração.

  O diacrd só funciona no teclado do próprio computador. Se quisermos
  usar um display remoto, seja um terminal X, seja um outro computador,
  não teremos suporte à acentuação. A troca da Xlib, por outro lado,
  enquadra-se plenamente na filosofia do X de que o servidor provê
  mecanismo, deixando a cargo da aplicação a definição de políticas.
  Exemplo da vantagem deste paradigma é poder usar as técnicas descritas
  na seção ``Configuração do X'' em outros sistemas operativos e com
  terminais X.

  A solução via Xlib parece-me mais ``limpa'' e é minha predileta, mas,
  como sempre, fica a critério do usuário ou do administrador do sistema
  qual alternativa escolher. De qualquer modo, sempre é bom lembrar qua
  ambas as soluções são remendos. Considerando-se a rápida evolução 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 necessário.


  6.  Configuração dos vários programas


  6.1.  Aplicativos

  A maioria das aplicações que rodam no Unix usa algum tipo de arquivo
  de configuração que o usuário coloca em seu diretório de trabalho
  (home) e cujo nome normalmente é .alguma-coisarc. Tanto quanto
  possível, tentei evitar que isso fosse necessário, pois além de dar
  mais trabalho ao usuário (e ao administrador da rede ;-) pode
  dificultar um pouco as coisas. Por exemplo, aqui no CPMet temos o
  diretório 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ó têm a partição 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 opção que muitos programas também oferecem é especificar em uma
  variável de ambiente o nome do arquivo de configuração ou o uso de
  arquivos padrão que normalmente ficam em um diretório /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 diretório
  ``HOME'' do usuário caso não exista uma variável de ambiente INPUTRC
  contendo o caminho para um arquivo de configuração.

  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 diretório home do
  usuário com o conteúdo acima, mas é muito difícil manter atualizados
  os arquivos de todos os usuários, principalmente quando eles são
  muitos.  Um inputrc mais completo pode ser obtido via WWW na página do
  Portuguese HOWTO. Ele contém opções para vários tipos de terminal e
  permite usar as teclas de movimento de cursor para percorrer o
  histórico de comandos (setas para cima e para baixo); ir para o
  primeiro e para o último comandos do histórico (teclas PageUp e Page­
  Down); posicionar o cursor na linha (setas para a esquerda e direita)
  e posicionar o cursor no início e no fim da linha (teclas Home e End).

  Para maiores informações 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 diretório do usuário, contendo as seguintes linhas:

      (set-input-mode nil nil 1)
      (standard-display-european t)
      (require 'iso-syntax)



  Para tornar esta configuração global, na distribuição Slackware
  coloque os comandos no arquivo /usr/lib/emacs/site-lisp/site-start.el.
  Na distribuição Debian o emacs executa todos os scripts contidos no
  diretório /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, não 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 configuração prontos podem ser obtidos via WWW na página
  do Portuguese HOWTO. Para Slackware, há um site-start-emacs.el, que
  deve ser copiado para o diretório /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 diretório /etc/emacs/site-start.d.

  Certifique-se de estar usando a versão 24-out-1998 ou mais recente do
  arquivo de mapa de teclado para o X, pois ela possui uma correção no
  tratamento das teclas modificadoras Alt e Meta, que são muito usadas
  pelo Emacs.


  6.1.3.  flex

  Especifique a opção -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 inglês fortune cookies, daí o nome).
  Eis algumas mensagens típicas:

      dROGA!!oNDE ESTA O cAPSLOCK??

      Mouse não 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
  repositório mantido no diretório /usr/games/fortunes (Slackware) ou
  /usr/share/games/fortunes (Debian). Neste diretório existem diversos
  arquivos com as ``fortunas'' e um arquivo índice para cada um deles,
  que possui a extensão .dat. O formato dos arquivos é muito simples:
  cada fortuna é composta de uma série de linhas de texto. As fortunas
  são separadas umas das outras por linhas contendo apenas um caracter
  %. Veja o trecho a seguir:



      O que são 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 Português, teremos que
  remover os arquivos existentes no diretório 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 página do Portuguese HOWTO.
  Não esqueça 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 informação: se o nome de um arquivo termina com o sufixo -o
  o fortune só o consulta se for chamado com a opção -o. Esses arquivos
  são os que contém mensagens cujo conteúdo pode ser considerado ofen­
  sivo por algumas pessoas, tais como

      Só não mando a sogra pro inferno, com pena do Diabo.


  Claro que existem coisas muito mais ofensivas por aí, mas este é um
  Linux HOWTO e não queremos realmente ofender ninguém, certo?


  6.1.5.  Ispell

  Dicionários para o Português de Portugal podem ser obtidos via WWW na
  página do Projecto Natura em
  <http://www.di.uminho.pt/~jj/pln/pln.html>. Para o Brasil, há uma
  versão compilada pelo Ueda: <http://www.ime.usp.br/~ueda/>.


       Eu gostaria de poder colocar maiores informações, mas ainda
       não tenho conhecimento suficiente sobre o Ispell e não posso
       ensinar o que não sei. Preciso de ajuda aqui.



  6.1.6.  JDK (inclui ICQJava)


       Esta informação é baseada em uma mensagem da qual guardei o
       conteúdo mas não o remetente. Peço desculpas e espero que
       perdoe a falha. Não testei pessoalmente a informação e peço
       que me escrevam confirmando tanto a correção quanto, se
       possível, a identidade do autor.


  O JDK utiliza fontes padrão que não suportam acentos. Isto quer dizer
  que letras com acentos são ignoradas e, geralmente, confundem o resto
  do texto.  Resolver isto é extremamente fácil:

  ·  entre no diretório 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 estarão aptos a lerem acentos! (fácil,
     não?)


  6.1.7.  Joe

  Invoque o joe com a opção -asis na linha de comando ou altere os
  arquivos de configuração para ativar tal opção. Na Slackware eles
  estão no diretório /usr/lib/joe. Tudo que se tem a fazer é remover o
  espaço em branco existente no início 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á disponível via WWW na página do Portuguese HOWTO, contendo
  configurações que permitem usar as teclas Home e End para movimentar o
  cursor para o início 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 seqüências
  de caracteres geradas por cada tecla e as ações 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


  Não esqueça de torná-lo executável:

      chmod 755 /usr/bin/lesspipe.sh



  Na distribuição Debian já existe um script /usr/bin/lesspipe (note a
  ausência da extensão .sh). Para os curiosos a respeito da referência a
  ``*.rpm'', embora na máquina em questão se use Slackware, é possível
  ter o utilitário RPM instalado também, 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 distribuição de Linux usa o GNU ls (todas as que eu conheço
  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
  opção.  Este programa cria uma interface gráfica através da qual
  editamos os documentos que serão depois formatados pelo LaTeX. O
  ambiente é quase-WYSIWYG (What You See Is What You Get - O que tu vês
  é o que tu obténs). LyX não roda apenas em Linux, mas em qualquer
  Unix. Maiores informações podem ser obtidas em


       <http://www.lyx.org>

  A partir da versão 1.0.1 do LyX já tem a interface com o usuário em
  Português, traduzida por Pedro Kröger, que também está traduzindo os
  manuais, junto com Roberto Mello. Estas traduções já fazem parte da
  distribuição oficial do LyX.

  Tendo o LyX instalado, é muito fácil criar documentos com acentuação
  em Português. Seguindo as seguintes regras:


  ·  Se o teclado foi configurado para ter dead keys usando um dos mapas
     aqui fornecidos, não é necessário fazer mais nada. Basta digitar o
     texto normalmente usando as seqüências de acentuação. A única
     exceção é o c-cedilha que não pode ser gerado usando a seqüência
     'c, pois o LyX gera um c com acento. Temos que usar a seqüência
     Compose-vírgula-c.

  ·  Se o teclado não foi configurado para ter dead keys ainda assim é
     possível acentuar no LyX. Selecione o menu Options/Keyboard. Na
     caixa de diálogo ``Key Mappings'', selecione no ítem
     Language/Primary a opção ``American''.  Com isto o LyX fará a
     composição dos caracteres acentuados usando regras semelhantes às
     das dead keys.

  ·  A vírgula será tratada como cedilha. Para obter um `Ç'digite ,C e
     para obter uma vírgula digite ,,. Cuidado! A seqüência ,<espaço>
     gerará uma cedilha isolada e não uma vírgula!

  ·  ~ ^ ' e ` serão tratados como acentos. Vale a mesma regra anterior:
     para obter apenas o acento, pressione a tecla duas vezes
     consecutivas.

  ·  : ; . / ? e - também serão tratados como acentos. ?a gerará um `å'
     e assim por diante.

  Para o LyX imprimir corretamente, é necessário que, ao criar um novo
  documento, sejam selecionados a língua e a codificação de caracteres
  adequadas. Crie um documento selecionando o menu File/New.  Depois
  selecione o menu Layout/Document. Na caixa de diálogo ``Document
  Layout'' selecione no ítem Language a opção ``brazil'' ou ``portuges''
  (sem o u mesmo); no ítem Encoding selecione ``latin1''.

  Veja a observação sobre o pacote algorithm na seção ``TeX e LaTeX''

  Uma observação final sobre o LyX: a versão atual (1.0.x) utiliza a
  biblioteca XForms para construir a interface com o usuário. Como essa
  biblioteca não tem suporte para acentuação, não é possível digitar
  letras acentuadas nas caixas de diálogo, somente no corpo do documento
  editado. Segundo os desenvolvedores, nas novas versões do LyX será
  possível escolher o tipo de interface ao compilar o programa, o que
  permitirá o uso de toolkits mais flexíveis. Já existe uma versão de
  LyX portada para o toolkit Qt, usado no KDE, chamada KLyX. Os autores
  são Matthias Ettrich -- autor original do LyX -- e Kalle Dalheimer.
  Para maiores informações, consulte via WWW:  <http://www-
  pu.informatik.uni-tuebingen.de/users/ettrich/>.


  6.1.11.  Man, groff, troff

  Pode-se usar a opção 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 informações 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 não será possível
  formatar satisfatoriamente manuais que contenham caracteres não
  pertencentes ao conjunto ASCII, como é o caso do ``man iso_8859_1''.
  Na distribuição Slackware, é preciso editar o arquivo
  /usr/lib/man.config e alterar as definições NROFF e NEQN, trocando a
  opção ``-Tascii'' para ``-Tlatin1'':

      NROFF           /usr/bin/groff -Tlatin1 -mandoc
      NEQN            /usr/bin/geqn -Tlatin1


  ou, se usarmos a variável de ambiente GROFF_TYPESETTER, podemos sim­
  plesmente eliminar a opção -Tascii. Na distribuição Debian não é
  necessário fazer nenhuma configuração para o man, bastando configurar
  GROFF_TYPESETTER e na Red Hat (incluindo Conectiva) o arquivo é
  /etc/man.config

  Groff também pode ser configurado para fazer a separação silábica em
  português, o que é muito útil se tivermos páginas de manual em
  Português. Isto é bastante simples, porque quando James Clarck pôs
  suporte a hifenização no groff ele usou o mesmo algoritmo de
  hifenização do TeX. Para ter hifenização em português, 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 página do HOWTO. Trata-se do
  arquivo pt8hyph.tex (ver seção ``TeX e LaTeX'') ao qual foi adicionado
  apenas um comentário.

  Ele deve ser copiado para o diretório /usr/share/groff/tmac/ ou
  /usr/lib/groff/tmac/, dependendo da distribuição. É conveniente criar
  um ``link'' simbólico para hyphen.br. Para usar esse arquivo, basta
  colocar no início do seu documento troff/groff as linhas a seguir:

      .if \n(.g \{\
      .hla pt
      .hpf hyphen.pt
      .\}


  O .if não é necessário para a acentuação, 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 opção ``Full 8 bits''
  ou ``ISO 8859-1''. Na versão 3.2.11 isso permite que sejam mostrados
  nomes de arquivos contendo caracteres acentuados, mas não foi possível
  digitar tais caracteres na linha de comando ou nas caixas de diálogo.


  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 também usar cores. Para maiores informações, 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 ativação dos comandos rodando dentro de um xterm,
  deve-se invocá-lo com a opção ``-m'' e passar a opção ``-xrm "*eight­
  BitInput: false"'' para o xterm. Se usarmos o rxvt então o minicom
  deve ser chamado com a opção ``-m'' e a tecla de ativação dos comandos
  será Alt. Fiz uma adaptação no script xminicom que pode ser obtido via
  WWW na página do Portuguese HOWTO.

  Segundo Arnaldo Carvalho de Melo, as versões mais recentes do Minicom
  suportam internacionalização. Suporte para o Português foi
  acrescentado pelo pessoal da Conectiva. O código fonte pode ser obtido
  na página do Jukka (atual mantenedor do Minicom) em

       <http://www.clinet.fi/~walker/minicom.html>



  6.1.14.  Netscape Communicator

  O Communicator, assim como muitas aplicações que utilizam toolkits
  baseados no X Toolkit (Xt), permite que se modifiquem muitas de suas
  características por meio de arquivos de configuração (X Resources). No
  caso específico do Communicator, pode-se criar um arquivo chamado
  Netscape no diretório /usr/X11R6/lib/X11/app-defaults contendo estas
  opções.

  Na distribuição 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 cópia do Netscape.ad.pt_BR pode ser obtida na página
  oficial do Portuguese-HOWTO. Para usá-lo, simplesmente copie-o para
  /usr/X11R6/lib/X11/app-defaults/Netscape, se sua distribuição não o
  possuir, mas fique atento que seu uso pode criar problemas com novas
  versões do programa.

  Maiores informações 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ô, alguém usa nn? Informação 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 diretório do usuário, contendo

      character-set=ISO-8859-1


  ou crie um arquivo geral de configuração contendo tal linha. Esse
  arquivo normalmente é /usr/local/lib/pine.conf ou /usr/lib/pine.conf

  A configuração também pode ser feita usando o próprio programa. No
  menu de entrada selecione as opções Setup/Configuration. Vá até o ítem
  ``character-set'' e preencha-o com ``ISO-8859-1''. Para maiores
  informações leia o manual do pine com o comando

      man pine



  6.1.17.  tcsh

  Nenhuma medida especial é necessária se for feita a correta
  configuração das variáveis de ambiente ``LANG'' e ``LC_ALL'', conforme
  mostrado mostrado na seção ``Biblioteca libc''.

  Tcsh tem suporte a internacionalização e na distribuição Debian há um
  pacote chamado tcsh-i18n com suporte para French, German, Greek and
  Spanish.


  6.1.18.  TeX e LaTeX


       Esta seção 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
  número de idiomas para o LaTeX. De acordo com o idioma selecionado ele
  define muitas coisa como, por exemplo, os títulos dos capítulos
  (Chapter, Capítulo, Kapitel) e o título das tabelas (Tabela, Table,
  Tabelle). Para usar o pacote, basta incluir no preâmbulo de seu
  documento LaTeX o comando


      \usepackage[portuges]{babel}

      ou

      \usepackage[brazil]{babel}



  Há diferenças 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 maiúscula ou minúscula.

  Pode-se misturar mais de um idioma no mesmo documento. Para Alemão e
  Português ficaria:



      \usepackage[german,brazil]{babel}



  Nesse caso a última opção (brazil) fica sendo o idioma corrente. Para
  mudar ao longo do texto, entre um e outro, use:


      \selectlanguage{german}

      [...]

      \selectlanguage{brazil}



  Isto é muito útil também quando queremos que uma palavra não seja
  separada.  Basta definir um novo idioma e usá-lo nas palavras que não
  podem ser separadas. Coloque no preâmbulo:


      \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.  Separação silábica

  Normalmente apenas os suportes a separação silábica para Inglês e
  Alemão são carregados.  Para configurar hifenização no teTeX, execute
  o utilitário texconfig, que na distribuição 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 variável 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 começa por %portuges e remova o %. Grave o
  arquivo e saia do editor. O texconfig atualizará diversos arquivos de
  configuração (não se assuste com a quantidade de mensagens que
  aparecem na tela).

  Se o nome da tabela de hifenização que consta no seu language.dat é
  pthyph.tex então provavelmente trata-se da versão 1.0, de 1987. A
  versão 1.2, de 1996, pode ser obtida via FTP anônimo em

       <ftp://ftp.tex.ac.uk/tex-archive/language/por­
       tuguese/pt8hyph.tex>

  Copie-o para o mesmo diretório onde se encontra o pthyph.tex, que
  dependendo de sua distribuição 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 não provê acesso
  direto a caracteres acentuados, (como é o caso do OT1, padrão do
  LaTeX) então o TeX gera estes caracteres sobrepondo o caracter base
  mais o acento. O algoritmo de hifenização, contudo, não hifeniza
  palavras formadas dessa forma.

  Se uma fonte já provê acesso direto a caracteres acentuados, como as
  de codificação T1, estes caracteres são usados diretamente sem
  prejuízo do algoritmo de hifenização.  O uso de encoding T1 é
  fundamental para a correta hifenização em Português.

  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
  preâmbulo do seu documento o comando


      \usepackage[T1]{fontenc}



  O antigo pacote t1enc não deve mais ser usado e existe hoje apenas por
  questões de compatibilidade com documentos antigos. O fontenc é mais
  atual, continua a ser mantido e é de uso mais geral, portanto
  preferível.


  6.1.18.4.  Edição de documentos

  Normalmente a introdução de caracteres acentuados no texto exige o uso
  de seqüências de escape bastante trabalhosas. Para gerar um ``ö''
  deve-se digitar \"o. Com babel pode-se digitar apenas "o, o que não
  deixa de ser inconveniente para ler o fonte do documento. Há um pacote
  chamado inputenc que permite especificar a codificação em que estão os
  caracteres de um documento. Lembre-se porém que se o seu documento for
  enviado para outro usuário que não possua o inputenc ele poderá não
  conseguir processá-lo, mas esse recurso já está disponível desde a
  liberação do LaTeX2e em dezembro 1994. Todas as distribuições de Linux
  atuais o incluem.

  Sugestão: uma configuração do GNU Emacs para gerar caracteres
  acentuados, própria 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 não requer o inputenc.  O uso da biblioteca `iso-cvt' faz
  a transformação de ISO-8859-1 (no buffer do Emacs) para o padrão 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, próprio para
  uso do pacote inputenc. Uma boa opção 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 código-fonte do GNU recode pode ser obtido via FTP anônimo em
  <ftp://prep.ai.mit.edu/pub/gnu/recode/recode-3.4.tar.gz> e em muitos
  espelhos do GNU mundo afora. A distribuição Debian tem um pacote
  pronto e outras também devem ter.


  6.1.18.5.  Teste da configuração do LaTeX

  Para testar a nova configuração 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{Introdução}

      Este documento pretende ser um guia de referência de configuração
      do \textbf{Linux} e seus programas, teclados e fontes de
      caracteres, permitindo sua internacionalização/utilização confortável
      por pessoas que falem a Língua Portuguesa.

      \end{document}



  Esse texto contém de propósito uma ``palavra'' bastante longa para
  forçar a separação silábica. Ele está disponível via WWW no arquivo
  exemplo.tex na página 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 configuração 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 não é suportado
  pelo babel, fazendo com que a lista de algoritmos saia com o título
  ``List of Algorithms'' e o título de cada um deles seja impresso como
  ``Algorithm #''.  Para evitar esse problema, coloque no preâmbulo de
  seu documento LaTeX, após o comando ``\usepackage{algorithm}'' o
  seguinte:


      \makeatletter
      \renewcommand{\ALG@name}}{Algoritmo}}
      \makeatother
      \renewcommand{\listalgorithmname}}{Lista de Algoritmos}}



  No teTeX 0.4 (versão 1.2h do portuges.ldf) o título do ambiente proof,
  encontrado nas classes amsbook, amsart, etc., sai como ``Proof.''.
  Para corrigir isso, coloque no preâmbulo de seu documento o comando


      \renewcommand{\proofname}}{Demonstra\c{c}\~ao}



  mas o mais recomendável é que se atualize a versão do teTeX.

  Usuários do LyX podem incluir esses comandos no preâmbulo do documento
  usando o menu Layout/LaTeX Preamble. Pode-se resolver o problema
  alterando o arquivo portuges.ldf que contém as definições necessárias
  ao Português, mas esta solução não é portável, pois exigirá que tal
  arquivo seja alterado em todas os computadores em que o documento deva
  ser processado.

  A licença do Babel não me permite distribuir o portuges.ldf separado
  do resto do pacote, mas para os interessados, coloquei à disposição na
  página do HOWTO um arquivo chamado portuges.ldf.patch que criei para o
  meu teTeX antigo (Slackware 3.4).  Para aplicar a atualização, copie-o
  para o diretório /usr/lib/teTeX/texmf/tex/generic/babel (Slackware),
  faça uma cópia de reserva do portuges.ldf original e invoque o
  utilitário 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
  diretório original ele será incluído no arquivo ls-R da próxima vez
  que o programa texhash for executado.  Isso não 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 discussão brasileira de usuários 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 página na WWW em  <http://biquinho.furg.br/tex-br/> por meio da
  qual se pode ler o histórico de mensagens. Também há referências para
  muitos documentos sobre LaTeX, alguns em Português e outros em Inglês.


  6.1.18.8.  LaTeX-demo

  Pode ser útil também um documento de exemplo para ter onde começar.
  Pensando nisso, Klaus Steding-Jessen preparou um pequeno documento em
  Português com o objetivo de ser um guia ``by example'' para o usuário
  de LaTeX iniciante e intermediário, que pode ser obtido via WWW em
  <http://biquinho.furg.br/doc/LaTeX-demo/>.

  Klaus ecreveu também uma série três 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 versão 8 suporta a acentuação por
  teclas mortas. Não é necessário nenhum procedimento especial. Como um
  entusiasta de software livre, entretanto, recomendo enfaticamente que
  se use o LyX, que já foi inclusive traduzido para nossa língua,
  conforme mencionado na seção ``LyX''.


  6.1.20.  Xemacs (antigo lucid emacs)


       Agradeço a colaboração de Judson Santos Santiago e Goedson
       Teixeira Paixão que ajudaram a identificar os problemas com
       o Xemacs.


  O Xemacs já tem suporte à acentuação direta no teclado usando ``dead
  keys'', mas há um erro na configuração original que o impede de
  reconhecer o acento circunflexo.  Este problema não ocorre se for
  usada a biblioteca Xlib aterada por Thomas Quinot, mencionada na
  seção ``Contornando os limites do X'', mas mesmo que não a usemos,
  basta colocar os seguintes comandos no seu arquivo de configuração
  .emacs:

      ;; Ajuste para fazer o acento circunflexo funcionar
      ;; Contribuição de Goedson Teixeira Paixao <gopaixao@dcc.ufmg.br>
      (require 'x-compose)
      (define-key global-map 'dead-circumflex compose-circumflex-map)



  Na distribuição Debian 2.0 o Xemacs 20.4 executa todos os scripts
  contidos no diretório /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. Não é necessário instalar
  o xemacs20-mule, que possui extensões para línguas que não usam o
  alfabeto romano. Os pacotes a instalar são os seguintes:


  ·  xemacs20-bin

  ·  xemacs20-nomule

  ·  xemacs20-support

  ·  xemacs20-supportel

  Se você instalou o Xemacs no Slackware ou outro Unix, à moda antiga
  (dowload, compilação, instação), então o arquivo a alterar é o site-
  start.el, que deve estar no diretório /usr/lib/xemacs/site-lisp ou
  /usr/local/lib/xemacs/site-lisp, dependendo de sua instalação.

  Observe que a partir da versão 20.3 o Xemacs usa uma variável especial
  para controlar o comportamento da tecla ``Delete'', não 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 configuração prontos podem ser obtidos via WWW na página
  do Portuguese HOWTO. Para Slackware, há um site-start-xemacs.el, que
  deve ser copiado para o diretório correto com o nome de site-start.el.
  Para Debian, há um 01portugues-xemacs.el que deve ser copiado para o
  diretório /etc/xemacs20/site-start.d.

  Certifique-se de estar usando a versão 24-out-1998 ou mais recente do
  arquivo de ``mapa de teclado'' para o X, pois ela possui uma correção
  no tratamento das teclas modificadoras Alt e Meta, que são muito
  usadas pelo Xemacs.


  6.2.  Rede local e Internet


  6.2.1.  FTP (File Transfer Protocol)

  Existem dois modos de transferência de arquivos: binary e ASCII, sendo
  este  utilizado para textos.  Deve-se tomar cuidado ao transferir um
  arquivo, pois o modo de transfêrencia ASCII remove o oitavo bit de
  cada caracter transmitido, o que terá como conseqüência a perda de
  todos os caracteres acentuados. Desta forma é aconselhado o envio de
  documentação em modo binary de forma a manter a integridade da mesma.

  Cuidado! Algumas versões mais antigas do pacote net-tools do Linux têm
  um cliente FTP que não reconhece corretamente quando o servidor remoto
  roda Unix. Deste modo ele não comutará o modo de transferência para
  binário automaticamente. Além disso, alguns servidores FTP também não
  fornecem a informação corretamente.  Certifique-se de digitar o
  comando bin antes de um get quando quiser que a transferência seja
  binária!


  6.2.2.  Correio eletrônico

  O mesmo tipo de restrições do FTP se aplica ao envio de documentos
  contendo caracteres acentuados através de correio eletrônico. Embora
  isto não aconteça em todos os sistemas em uso na internet, bastará que
  o correio enviado passe no seu trajecto por um sistema que não suporte
  8 bits de informação para que o nosso documento seja deturpado.

  Para que não 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 documentação em modo 8 bits.
  Exemplos de programas de correio eletrônico com suporte para MIME, são
  o Eudora e o Pine.

  Se o destinatário da mensagem não usa um agente com suporte para MIME,
  existe a opção de codificar os documentos com o utilitário UUENCODE.
  Para maiores informações a esse respeito, leia a documentação usando
  os comandos


      man uuencode
      man uudecode



  7.  Ficheiros necessários

  Atenção! Os mapas de teclado para o X fornecidos mapeiam a função 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 não possuir as teclas para Windows 95 então pode ser
  melhor restabelecer a distribuição padrão: edite o mapa e coloque um
  ponto de exclamação no início das linhas que definem os keycodes 64,
  113, 115, 116 e 117.

  Foram elaborados mapas com suporte à acentuação para seis modelos de
  teclado, tanto para uso no console quanto para o X. Eles podem ser
  obtidos via WWW em um dos repositórios da página do Portuguese HOWTO:


  ·  <http://linusp.usp.br/~casantos/>

  Ao instalar um dos mapas fornecidos, lembre-se de ler os comentários
  contidos neles, pois há informações importantes sobre opções de
  configuração e aproveitamento das teclas adicionais dos teclados
  padrão Windows 95.  As instruções para instalação estão nas seções
  ``Configuração do console'' e ``Configuração do X''.



     O mapa US+ (us+.map e Xmodmap.us+)
        Mapas para os teclados que seguem o padrão americano. Como não
        existem teclas especiais para gerar o c-cedilhado nem o trema,
        foi usado um pequeno truque: o c-cedilhado é gerado pela
        seqüência 'C.  No console pode-se fazê-lo com a seqüência AltGR-
        C.  O trema é gerado pela tecla ". Para gerar as aspas duplas é
        necessário digitar a seqüência "<espaço> e no console pode-se
        usar ""; opcionalmente pode-se usar AltGR-", o que não é uma
        solução muito confortável, mas funciona...

        Testados com teclados de várias marcas (e alguns sem marca :-).


     O mapa Portugal (pt.map e Xmodmap.pt)
        Mapas para teclados com desenho português. Esses teclados são os
        que possuem uma tecla com os caracteres « e ». Não são muito
        confortáveis, porque para gerar o símbolos @ [ ] { } e o trema é
        necessário 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, vêm com esses teclados. Eles também pode
        ser adquiridos avulsos e são fabricados pela UIS e Keytec (não
        confundir com Key Tronic).  Este desenho é o mais confortável de
        todos, pois tem a mesma distribuição dos acentos encontrada nas
        máquinas de escrever.

        Testado com teclados das marcas UIS e IBM.


     Sun Type 4 e Type 5 (Xmodmap.Sun4+ e Xmodmap.Sun5c+)
        Encontrados nas máquinas 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 não 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 distribuição de teclas seja idêntica à do
        Sun Type 4, os keycodes das teclas são diferentes. Esses
        teclados também não possuem o c-cedilhado, por isso foi usado o
        mesmo truque do mapa US+.  Apenas o mapa para o X é fornecido.

  A geração 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)               "-espaço
      ' (apóstrofo)           '' ou AltGR-' no mapa US+
      ` (grave)               `` ou AltGR-` no mapa US+
      ®                       compose-O-R
      ©                       compose-O-C
      -------------------------------------------------



  8.  Informações Adicionais

  8.1.  Fontes de informação sobre Linux em Português


     Grupo de Investigação Linux
        Grupo de usuários 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
        informações 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 São Paulo, Brasil, coordenado
        por Jorge L.  deLyra. Pode ser visitado em
        <http://linusp.usp.br/>.


  8.2.  Free Translation Project

  Programadores que quiserem desenvolver aplicações com suporte a mais
  de uma língua devem usar algum método de definir mensagens em tempo de
  execução, possivelmente usando uma biblioteca de funções 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 catálogo que é lido pelo programa ao
  iniciar. Há equipes de tradução responsáveis por cada língua.

  Há uma lista de discussão via emeil para cada equipe de tradução,
  rodando em um servidor provido pela <Linux International>. Para fazer
  contato com a equipe de tradução para Português, 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 não se destina ao esclarecimento de dúvidas de usuários!

  Mais informações podem ser encontradas na documentação do pacote
  gettext disponível via FTP anônimo em qualquer repositório de software
  do GNU.  Provavelmente sua distribuição já tem um pacote pronto para
  ser instalado, mas se você desejar, os fontes da versão mais recentes
  podem ser encontrados em

       <ftp://ftp.gnu.org/pub/gnu/>


  e o nome do arquivo a copiar é ``gettext-<versão>.tar.gz''.


  8.3.  LIE-BR


       A informação a seguir é baseada no conteúdo da página de
       apresentação 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 documentação em sua língua nativa: o
  português.  Essa lista é uma ramificação de outra maior, a LIE que
  visa a internacionalização do Linux e sua posterior tradução para
  todos os idiomas (português incluso).

  Resumo dos objetivos da lie-br:

  ·  contribuir para o projeto de internacionalização do Linux fazendo a
     parte relativa ao português para o Brasil;

  ·  internacionalizar programas, de modo a poderem ser usados nas
     línguas nativas de cada país, e não ficar preso ao idioma original
     ou ao inglês;

  ·  disponibilizar (sic) material em português para consulta e
     documentação;

  ·  aumentar o acervo de documentação disponível e, indiretamente,
     auxiliar no desenvolvimento iniciado pelo projeto LDP-BR.

  Mais informações podem ser encontradas na página WWW da lie-br, no
  endereço

       <http://lie-br.conectiva.com.br/>


  Ainda há uma quantidade enorme de documentos por traduzir. Se você tem
  bom domínio do Inglês e deseja colaborar, então primeiro leia as
  instruções na página mencionada e assine a lista ``lie-br'', enviando
  um emeil para <lie-br-subscribe@bazar.conectiva.com.br>. Não é preciso
  especificar o assunto (subject) nem colocar nada no corpo da mensagem.


  8.4.  Versões de software testadas

  Todas as informações presentes neste documento foram testadas nas
  seguintes versões de software:


  ·  Distribuições Slackware 3.2 (muito modificada), Debian 2.0, Red Hat
     5.2, Conectiva 3.0 (Guarani) e S.u.S.E. 5.6

  ·  XFree86 versões 3.3 a 3.3.3.1

  ·  Fvwm 2.0.46

  ·  Rxvt versão 2.4.5

  ·  Kernel versões 2.0.33 a 2.0.36

  ·  Kbd versões 0.92 a 0.96

  ·  GNU emacs versões 19.34 a 20.3

  ·  Less versões 321 e 332

  ·  GNU Bash versões 1.14.7 a 2.01.1

  ·  tcsh versões 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 versões 0.4 e 0.9-9

  ·  XEmacs versões 20.3 e 20.4



  9.  Observações finais

  9.1.  Futuras adições a este documento

  As próximas versões do HOWTO deverão conter, entre outros assuntos, os
  seguintes:

  ·  suporte à distribuição Caldera;

  ·  informações sobre compartilhamento de arquivos em rede usando NFS,
     SAMBA e Mars-NWE;

  ·  configuração de toolkits de interface gráfica: Qt, GTK, XForms, Tk
     (Tcl) e os baseados em Xt, como Motif, Lesstif, Xaw (*international
     ainda não está funcionando);

  ·  uma seção sobre desenvolvimento de programas;

  ·  referências ao Ispell (usá-lo para corrigir o próprio HOWTO :-);

  ·  informações sobre X/Open, XPG4 e POSIX, ou pelo menos ponteiros
     para elas.

     Aceitam-se voluntários para qualquer uma destas tarefas.

  Parece cada vez mais claro que as informações sobre configuração de
  aplicativos devem ser movidas para outro documento, independente do
  HOWTO. Na forma como ele está hoje já chega a quase quarenta páginas
  impressas e com a adição de outras distribuições e aplicações em breve
  chegará às 50. Um documento tão grande foge ao espírito de um HOWTO,
  que deve ser sucinto e concentrado em um assunto específico.
  9.2.  Nota de Direitos de Autor

  Este HOWTO teve como autor João Carlos Rodrigues Pereira, baseado em
  documentação escrita por José Bandeira além dos restantes HOWTO's do
  Linux.  Atualmente ele é mantido por Carlos Augusto Moreira dos
  Santos, com a colaboração de muitos outros.

  Os documentos HOWTO do Linux podem ser reproduzidos e distribuídos em
  todo ou em parte, segundo qualquer meio físico ou electrónico, desde
  que esta Nota de Direitos de Autor se mantenha intacta em todas as
  cópias dos mesmos.  A distribuição comercial é autorizada e
  encorajada, no entanto, o autor gostaria de ser notificado de tais
  ocorrências.

  Todas as traduções, trabalhos derivados, ou trabalhos agregando
  qualquer dos documentos HOWTO do Linux deverão estar abrangidos por
  esta Nota de Direitos de Autor, ou seja, não poderá ser imposta
  qualquer restrição adicional a trabalhos efectuados a partir de um dos
  documentos HOWTO do Linux nomeadamente no que diz respeito à sua
  distribuição.

  Exceções a estas regras poderam ser obtidas. Para tal, dever-se-á
  contactar o coordenador dos documentos HOWTO do Linux no endereço
  <linux-howto@metalab.unc.edu>.


  9.3.  Garantia (inexistência de) e nota de responsabilidade

  Apesar de ter sido feito o máximo esforço possível para que o conteúdo
  deste documento esteja correto, não há nenhuma garantia de que ele não
  possua erros, nem de que tenha algum tipo de utilidade ou aplicação
  comercial, técnica, educacional ou medicinal.  O autor não se
  responsabiliza por prejuízos decorrentes do seu uso. Em resumo: se a
  informação aqui contida quebrar seu computador em mil pedacinhos,
  junte tudo e cole, mas não reclame para mim!

  Documentos escritos por terceiros são de responsabilidade exclusiva
  deles e sua referência neste HOWTO não representa nenhum tipo de
  recomendação, abono ou garantia de suporte.


  9.4.  Agradecimentos

  Deixo aqui os meus agradecimentos a todos os que de alguma forma me
  ajudaram quer através das suas sugestões quer através de contribuições
  de outro tipo, em especial a


     João Carlos Rodrigues Pereira
        Autor original deste documento que agora mantenho. Nunca tive
        contato com ele, nem sei por onde andará.  Sua página no
        Departamento de Informática da Faculdade de Ciências da
        Universidade de Lisboa (http://caravela.di.fc.ul.pt/~jcrp/) não
        existe mais. Lembro-me de tê-la visto, anos atrás.

     Greg Hankins
        Ex-coordenador dos Linux HOWTO, por me permitir assumir a
        manutenção 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 informações,
  sugestões ou comentários que foram incluídas neste texto. Se alguém
  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 Kröger <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 são do primeiro autor:

     Carlos Ferreira
        Pela luta que trava pela defesa da lingua portuguesa, bem
        patente na sua Página Portuguesa disponível no URL:
        http://lila.dei.uc.pt/~cjrf/po/ [Nota do mantenedor atual: esta
        página não existe]

     João 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 documentação mais elucidativa que eu já li
        sobre o assunto.


  10.  Bibliografia comentada

  Esta seção ainda está incompleta e deve ser melhorada nas próximas
  versões.  Os HOWTOs mencionados aqui geralmente são distribuídos nos
  CDs de instalação e todas as distribuições possuem pelo menos alguns
  deles em pacotes prontos para instalar.  Na Slackwre esses pacotes são
  os da série F e os documentos ficam instalados no diretório
  /usr/doc/faq/howto e na Debian o diretório é /usr/doc/HOWTO. Eles
  também podem ser obtidos via WWW em
  <http://metalab.unc.edu/LDP/HOWTO/>.


     [BAL97] BALSA, André D. Linux and X11 internationalization
        Disponível via WWW em
        <http://wauug.erols.com/~balsa/linux/deadkeys/>

        Uma discussão sobre o problema da acentuação no X. Também contém
        referências para outros documentos que tratam de
        internacionalização.

     [BRO98] Brower Andries. The Linux Keyboard and Console HOWTO
        Disponível via WWW em
        <http://metalab.unc.edu/LDP/HOWTO/Keyboard-and-Console-
        HOWTO.html>.
        Descreve o tratamento teclado e console no Linux (kernel versão
        2.0) e tem várias referências ao X. Leitura obrigatória para
        quem quer entender a base do assunto.

     [GET94] Gettys, James et al. Xlib - C Language X Interface
        Cambridge, X Consortium, Inc., 1994. 473p.

        Referência definitiva sobre programação 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 didática
        introdução ao X e à programação com Xlib.

     [McC94] McCormack, Joel et al.X Toolkit Intrinsics - C Language
        Interface
        Digital Equipment Corporation/X Consortium, 1994.

        A referência básica 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.

        Descrição detalhada de como usar o Troff para formatação 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
        Disponível via WWW em
        <http://www.fdn.fr/~tquinot/index.en.html>

        A versão em inglês do artigo sobre a modificação da Xlib para
        dar suporte à acentuação independente da aplicação.

     [RAY98] Raymond, Eric S. The Linux XFree86 HOWTO
        Disponível via WWW em
        <http://metalab.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>.

        Descreve como obter, instalar e configurar o XFree86. Todas as
        distribuições de Linux já vêm com pacotes do XFree86 prontos
        para instalar, mas as informações sobre configuração 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 documentação que acompanhava as estações de trabalho
        Sun® e o sistema SunOS®, no tempo em que os fabricantes de
        computadores distribuiam documentação 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.
        Também explica onde obter fontes para o alfabeto Klingon, o que
        pode ser muito útil se o leitor for um habitante daquele Império
        ou admirador de Jornada nas Estrelas.  Depois das recentes
        aventuras espaciais do Linux, não duvido de mais nada...

        A respeito deste assunto é de fundamental importância saber que,
        segundo nosso consultor interestrelar Klaus Steding-Jessen,
        ``Klingon é o nome da raça e do seu idioma.  Kling é o nome do
        planeta.  Mas note que o Império Klingon é formado não apenas
        por esse planeta, mas por várias colônias, 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
        Contém as definições de constantes, funções e macros utilizadas
        por programas que fazem tratamento de teclado sob Linux.
        Normalmente esse arquivo é instalado com o pacote que contém o
        código fonte do kernel. As distribuições 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
        Contém as definições de constantes, funções e macros utilizadas
        por programas que fazem tratamento de teclado sob o X Window
        System.  Normalmente esse arquivo é instalado com o pacote que
        contém as bibliotecas de desenvolvimento de aplicações 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 táko 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. Introducción

     1.1 Empecemos por el principio...
     1.2 ¿Qué es linux?
     1.3 ¿Cómo conseguirlo?
     1.4 ¡Socorro! ¿Dónde están los manuales?

  2. Distribuciones

  3. Ayuda a la instalación de la distribución Slackware

     3.1 Instalación con UMSDOS
     3.2 Instalación en partición nativa de Linux.
        3.2.1 Preliminares
        3.2.2 Formateo de la partición.
        3.2.3 Instalación de los discos.
        3.2.4 Configuración

  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 electrónico

  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 Infovía: acceso a Internet desde casa
        5.6.1 ¿Qué es infovía?
        5.6.2 ¿Como conectar entonces?

  6. Direcciones útiles

     6.1 Direcciones electrónicas
        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 Bibliografía.

  7. Copyright



  ______________________________________________________________________

  1.  Introducción

  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 información puntual. Se tratarán de forma genérica todos los
  temas que puedan interesar al usuario de Linux, desarrollándolos en
  castellano o dando referencias a otras fuentes de información en
  nuestro idioma, así como orientación cuando tenga que acudir a otras
  HOWTO y en general a cualquier documento en inglés.

  Se distribuye integrado con el Linux Documentation Project en todos
  los foros de información Linux en Internet. Se actualiza
  periódicamente, pudiendo encontrar la última versión en Linux/España
  <http://www.cs.us.es/archive/linux.html>

  Notas del autor: Aunque puede ser interesante de por sí, traducir sin
  más información ya editada en inglés no es el objetivo de este
  documento, sino más bien servir de base al usuario hispanohablante y
  divulgar el Linux en nuestro idioma. Una ambición de quien escribe es,
  desde estas líneas, 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 (configuración del sistema y de
  las aplicaciones para trabajar en nuestro idioma, teclados, correo
  electrónico en español, etc). Un tercer objetivo será servir de agenda
  actualizada de direcciones españolas dedicadas a Linux, tanto para
  difusión de las distribuciones originales de software Linux como de
  desarrollos propios en español que se vayan publicando. Vaya desde
  aquí mi agradecimiento en esta primera versión para Antonio L. Delgado
  <mailto:antonio-luis.delgado@cs.us.es>, compañero de la Facultad de
  Informática de Sevilla, por prestarse a echar una mano redactando esta
  Howto en las calurosas tardes de Sevilla.

  Cualquier comentario, sugerencia para nuevos contenidos, rectificación
  de errores, crítica, etc. es no sólo bienvenido sino también esperado.
  Contacta por correo electrónico para todo lo que quieras.


  1.2.  ¿Qué es linux?



  Linux es una implementación del sistema operativo UNIX (uno más de
  entre los numerosos clónicos del histórico 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
  teóricamente 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 información y soporte
  técnico mútuo.  La versión original -y aun predominante- comenzó para
  PCs compatibles (Intel 386 y superiores), existiendo también en
  desarrollo versiones para prácticamente 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 más reciente en este momento es la
  versión para PowerMac <http://www.mklinux.org> (el PowerPC de Apple)
  basada en el microkernel Mach 3.0 y de la que ya hay una distribución
  para desarrolladores avalada directamente por Apple y OSF pero
  conservando el espíritu (gratuito, de libre distribución, etc) de la
  version original. Un servidor la acaba de probar hace unos días y se
  ha llevado una grata sorpresa (aún tendrá muuuchos fallos, pero para
  ser una primerísima versión y el poco tiempo que lleva en marcha, ha
  avanzado más de lo que me esperaba).

  1.3.  ¿Cómo conseguirlo?


  La primera fuente para conseguir el sistema Linux es la propia red
  Internet, y es donde estarán siempre las últimas versiones y las
  aplicaciones más actualizadas en muchos servidores de FTP anónimo.
  Otra vía muy frecuente, de interés para principiantes y para quienes
  no deseen o no puedan permitirse copiar tanta cantidad de información
  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 corazón del sistema es
  el mismo, aunque pueden tener externamente presentaciones y formas
  distintas de instalación. Hay revistas especializadas que tambión
  suelen incluir CDs con alguna versión de Linux. Hacia el final de este
  documento se relacionan diversas fuentes de Linux, tanto servidores
  públicos 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 núcleo del sistema, de aplicaciones, utilidades, manuales y
  documentación, etc. Es bueno estar al día, seguir con atención su
  evolución y aprovechar las mejoras que se incorporen, pero en la
  mayoría de los casos no vale la pena estar reinstalando software por
  el simple hecho de ser una nueva versión, 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 sacarán de
  apuros cuando agotemos nuestros propios recursos...


  1.4.  ¡Socorro! ¿Dónde están 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
  configuración, etc. es la orden 'man', que incluye la ayuda de
  referencia de Unix. Pero sólo es útil en ese ámbito, cuando ya se sabe
  más o menos lo se que busca, y sólo se necesita aclarar dudas
  concretas. Para todo lo demás la mejor fuente de información es, cómo
  no, la propia red. En ella están disponibles tanto libros completos
  (de los que algunas editoriales especializadas han publicado versiones
  en papel) como la colección "Linux HOWTO", de la que este documento
  forma parte. Hay una HOWTO para prácticamente cualquier tema. Su
  objetivo es cubrir, mediante manuales breves, concisos y específicos,
  cualquier duda que pueda surgir. Se actualizan permanentemente, y se
  distribuyen a través del denominado "Linux Documentation Project"
  (LDP) en Internet. La misma información se publica en muy diferentes
  formatos, orientados tanto a la búsqueda y consulta en línea como a su
  lectura convencional. Todas las versiones de Linux incluyen estos
  manuales (al menos la última edición 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 información


  El único elemento común a todas las versiones Linux es su kernel -el
  núcleo del sistema operativo-, que se desarrolla de forma coordinada y
  con actualizaciones sistemáticas. Sin embargo todo sistema operativo
  necesita, junto al núcleo del sistema, todo un conjunto de utilidades
  y herramientas de instalación, configuración 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 código
  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 recopilación, el software de cosecha
  propia que pueda aportar, una presentación más elaborada, gastos de
  distribución y soporte técnico al usuario).

  Algunas de las distribuciones más conocidas son:



     Slackware
        Esta distribucion es quizas de las más extendidas en todo el
        mundo y la más conocida en España, 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 método de instalación es asequible aunque lejos
        de las típicas y vistosas instalaciones a las que el usuario
        neófito esta acostumbrado en los sistemas comerciales.  Tiene
        diversos derivados comercializados bajo diferentes nombres (por
        ej. "Slackware Pro") que mejoran la instalación e incluyen
        manuales y bibliografía 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 instalación (en modo
        gráfico) y el cómodo 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 también
        sistemas basados en Red Hat, como Caldera Inc. y Pacific Hi-
        Tech. Aún poco conocida en Espaa pero pujante, sobre todo para
        principiantes. Sus creadores estan en  <http://www.redhat.com>.
        El mencionado sistema de gestión de componentes de software es
        obra suya, pero lo han ofrecido con carácter abierto y gratuito
        a los demás 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
        acérrimos 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 instalación de la distribución Slackware


  Este es un extracto de la Installation-HOWTO, orientada
  fundamentalmente a la instalación de Linux Slackware. Mucha de la
  información sobre instalacion de Slackware es aplicable a cualquier
  versión 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 básicamente dos formas:
  UMSDOS y Partición nativa. Cada una tiene sus ventajas e
  inconvenientes, pero como se verá es recomendable que todos los
  usuarios terminen usando el segundo método ya que es el más eficiente
  y el que mejor aprovecha las ventajas de Linux.


  3.1.  Instalación 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
  solución es UMSDOS. Permite crear, a partir de un directorio de MSDOS,
  toda la estructura que tendría un disco nativo de Linux. Cuando
  arranque el sistema, Linux emulará su disco a partir de la información
  en ese directorio. Es totalmente funcional, pero puede ser ligeramente
  más lento en ordenadores de gama media-baja y no aprovecha la gestión
  de disco nativo. Una gran ventaja es que si se libera disco en Linux,
  implícitamente estamos creando espacio que será aprovechable cuando
  arranquemos MSDOS, y viceversa. Además, el día que queramos
  deshacernos de Linux (¡poco probable!) o que simplemente nos decidamos
  a hacer una instalación completa, desinstalar ese Linux es tan
  sencillo como simplemente borrar sin contemplaciones el directorio
  C:\LINUX que creó desde MSDOS.


  3.2.  Instalación en partición nativa de Linux.


  Salvo la fase inicial en la que se preparan las particiones nativas o
  el UMSDOS, el procedimiento restante de instalación es básicamente el
  mismo.  Ya que puede ser el que provoque más dudas, centraremos estos
  consejos de instalación en la instalación con partición 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 ACOMPAñA 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 instalación es necesario que LINUX disponga de una partición
  distinta a la de MSDOS para trabajar. Si ya tiene algún sistema
  instalado, lo más frecuente es que sea una única partición DOS que
  ocupe todo el disco, por lo que reparticionar supone eliminar esa
  partición para volver a crearla asignándole menos disco para hacer
  sitio a Linux (o para dárselo totalmente, según la instalación
  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 partición 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 partición 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
  instalación de Linux.

  LEA LA DOCUMENTACION DE FIPS ANTES DE UTILIZARLO.

  Primero debe liberar en MSDOS el espacio que pretenda reservar para la
  nueva partición de Linux (y para el espacio de swap, como después se
  comentará). Después debe defragmentar la partición de DOS con la
  utilidad "defrag" que acompaña a las últimas versiones de DOS, o bien
  sus equivalentes de PCTools o Norton. Ahora puede correr el programa
  fips y crear una nueva partición 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 partición específica para swap, y "robar"
  ese espacio de disco bien a MSDOS o al propio Linux.


  3.2.2.  Formateo de la partición.

  Una vez añadida la nueva partición 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 instalación previa de
  MSDOS, toda la instalación se hará desde el propio Linux. Para
  arrancar necesitaremos dos disquetes (en algunas distribuciones como
  RedHat pueden ser tres), donde grabaremos tanto el núcleo 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 núcleo del sistema con el que arrancar. Como Linux
  es casi un sistema "a la carta", que puede llevar en el núcleo más o
  menos funcionalidades según nuestras necesidades, deberemos escoger
  entre los núcleos precompilados aquel que se adapte mejor a nuestro
  caso. En el futuro será recomendable que incluso recompilemos nuestro
  propio núcleo para personalizarlo aún más, añadir lo que falte y
  simplificar lo que sobre en nuestro caso. El siguiente disquete es el
  "root disk" o "ramdisk", que incluye el software mínimo que cargaremos
  en memoria para la instalación.

  En la distribución de Linux tendremos una serie de ficheros que
  constituyen "imágenes" de esos disquetes. Es decir, una vez elegidas
  qué diquetes necesitaremos, los crearemos a partir de esas imágenes,
  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 símbolo para
  hacer "login" (entrar en el sistema), mientras que RedHat arrancará
  directamente la aplicación de instalación. Utiliza el nombre "root"
  como nombre de usuario (es el super-usuario que administra el
  sistema). La primera vez no necesitarás 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 también una
  "cfdisk" con un interfaz más asequible, aunque iguales en lo básico.

  Si posees una partición de MSDOS, no te asustes, sigue adelante, no la
  vas a perder simplemente por entrar en fdisk, pero sí que debes tener
  precaución al añadir la partición linux sobre el espacio que le
  habíamos quitado a MSDOS, para no afectar a éste.

  Dentro de fdisk usa la opción 'n' para añadir nuevas particiones.
  Dalas de alta como particiones primarias (si ya tienes una particion
  de arranque con MSDOS, ésta será la partición 1 y a partir de ahí
  añadirás particiones Linux).  Es ahora el momento de añadir 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 cuánto swap necesitas. En caso de disponer de más 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 también en fdisk el
  uso que van a tener (tipo de partición), 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, tendrás 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 instalación de nuestro Linux. En el caso
  de Slackware, ese software de instalación 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 partición de swap y luego activarla
  para que empiece a complementar la RAM. Los comandos serían


  ______________________________________________________________________
    mkswap -c /dev/hdXX
    swapon /dev/hdXX
  ______________________________________________________________________



  donde /dev/hdXX sería el nombre de la partición que hemos definido
  como swap. Una vez hecho esto, Slackware ya aporta una utilidad de
  instalación que detectará las particiones creadas y procederá con el
  resto de la instalación con la aplicación "setup", que nos guiará
  durante toda la instalación con un sencillo interfaz de menús, que no
  requiere muchas explicaciones. Durante una de las etapas de la
  instalación 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.  Instalación de los discos.


  Slackware divide la distribución del sistema operativo en "series"
  temáticas, y a su vez cada una de ellas en directorios que se
  corresponden perfectamente con disquetes de 1.44Mb. Los discos
  esenciales serían los de la "Serie A", con los que el sistema ya es
  arrancable autónomamente desde el disco duro, aunque en la práctica
  lógicamente instalaremos también la "AP" (aplicaciones básicas), "N"
  (software de red, si vamos a conectarnos con cualquier modalidad), "D"
  (compiladores y librerías), "X" y "XAP" para el entorno gráfico
  XFree86.

  Por su parte RedHat organiza el software también en "paquetes"
  instalables de forma independiente y también agrupados por temas,
  aunque no sigue ningún esquema traducible en disquetes, por lo que las
  únicas vías de instalación son CDROM o directamente de la red.


  3.2.4.  Configuración



  Una vez cargados a disco los paquetes de software, la siguiente fase
  será la de configuración, 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 típicamente problematicos: el arranque del
  sistema (incluida la posibilidad de arrancar múltiples sistemas
  operativos desde distintas particiones o distintos discos) y la
  configuración de red

  Para instalar un método de arranque de Linux hay dos utilidades:
  "Lilo" y "Loadlin".  La primera es un pequeño programa que se instala
  en el "Master boot record" del disco duro o en la partición 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 cuestión de preferencias de cada cual.
  En el segundo caso podrí darnos algún error si hubiera algún 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 símbolo del sistema, evitando
  entrar en el modo gráfico.

  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
  documentación correspondiente (la de instalación de la propia
  distribución 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 partición correspondiente, y que debe usarlo en vez de continuar
  con una hipotética instalación. Lo único diferente es que se estaría
  usando el núcleo (kernel) del disquete en vez del instalado en el
  disco duro, pero a partir de ahí montará la partición del disco duro y
  usará todo lo ya instalado allí.

  Otro problema frecuente (solventado en la última version de RedHat
  pero no aún en Slackware) es que graba en el disco duro un núcleo
  genérico en vez del que hayamos usado en el "boot disk", que era
  precisamente el que habíamos elegido, por lo que es habitual que, si
  necesitamos algún controlador específico para algún 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 núcleo correcto. Si estas usando LOADLIN, simplemente dale como
  parámetro el fichero del núcleo correcto (es facil tener varios
  núcleos y elegir en cada caso el que interese). Seguir arrancando con
  el disquete como en el caso anterior sería también otra posibilidad
  para no perder ese CDROM, esa tarjeta, etc.


  4.  Españolización  de Linux


  Uno de los aspectos más 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 básico 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 electrónico (muchos sistemas solo respetan 7 bits, por lo que
  textos que podemos ver correctamente en nuestro ordenador
  probablemente se visualizarán de forma lamentable cuando los enviemos
  a otra persona. A continuación se mencionan algunas de las situaciones
  más frecuentes y cómo intentar solucionarlas.


  4.1.  Consola


   ...O cómo demonios poder usar acentos en nuestro propio ordenador


  Mediante el comando loadkeys se cargan las tablas de traducción del
  teclado.  Estas tablas traducen los códigos que se generan al pulsar
  las teclas a los que reciben los programas. Los ficheros que contienen
  estas tablas de traducción se encuentran en el directorio
  /usr/lib/kbd/keytables/ y el fichero que contiene el mapeado del
  teclado español se denomina es.map. Su objetivo es que si pulsamos una
  determinada combinación de teclas, aparezca en pantalla el carácter
  que tenemos pintado en nuestro teclado, y no su equivalente en el
  teclado que se usa en cualquier otro país.

  La llamada a este comando suele ser de la forma siguiente, que
  aparecerá en el arranque por defecto (en Slackware estaría
  en/etc/rc.d/rc.keymap):



       loadkeys /usr/lib/kbd/keytables/es.map

  Nota del autor: A igual configuración de teclado, más de una vez me
  han fallado los acentos por recompilar el núcleo, pero en el momento
  de escribir estas líneas aún 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 líneas 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 líneas 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


  Sería 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 parámetro -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 código 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 momentáneamente con el modificador -r desde la
        propia utilidad, pero sería 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 añadir a la
        variable LS_OPTIONS que probablemente ya tengas definida por
        defecto.

     mc Este clónico Norton tiene una opción Full 8 bits del submenú
        Display bits... bajo Options.

     nroff, groff
        Dispone de una opción -Tlatin1


  4.5.  Xwindow


  El entorno gráfico 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
  configuración. Existe también 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 método no es perfecto, ya que muchas aplicaciones
  bajo Xwindow tienen su propia forma de configuración 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 aplicación
  de la ventana de al lado.


  4.6.  Emulador de DOS (DOSEMU)


  La linea de configuración del teclado en /etc/dosemu.conf deberá
  incluir 'layout es-latin1' para poder usar la 'ñ' y las aperturas de
  interrogación y admiración. Una vez hecho esto, es posible cargar la
  configuración habitual con keyb sp desde el propio emulador de DOS, o
  bien ejecutar 'keybes2.com, una pequeña utilidad para el propio
  emulador disponible en varias de las direcciones habituales.


  4.7.  Correo electrónico


  Por último en relación con el uso del español en Linux, pero no menos
  importante, es poder leer y recibir por mensajería electrónica textos
  escritos en español sin deformar su contenido ni perder los acentos y
  símbolos propios.

  El problema se reduce a lo de siempre: el uso de caracteres especiales
  no incluidos en la tipografía básica sajona requiere trabajar con 8
  bits, pero aún hay muchos sistemas que siguen trabajando con 7 bits,
  lo que trunca o deforma mensajes escritos sin las debidas
  precauciones.

  En el estándar 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 garantías de que lo respete cualquier sistema que pueda
  recibir nuestros documentos. Una solución cada vez más extendida, y
  que permite a los usuarios escribir con libertad y enviar
  prácticamente cualquier información dejando todos esos detalles al
  software de gestión 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 través de
  cualquier sistema sin peligro de perder información. El inconveniente
  (cada vez menor a medida que este sistema se extienda más y más) es
  que si intentamos leer un mensaje con codificación 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 combinación
  de tipos de ficheros (documentos generados por procesadores de textos,
  gráficos, sonido, video, etc). Ni siquiera es necesario que ambos usen
  el mismo software. Basta con que ambos sean capaces de generar la
  codificación durante el envío, y de interpretarla en la recepción.



  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 hábil 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 convirtiéndose 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 más o menos fácil instalacion.

  En el nivel físico (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 atendía hasta entonces. De
  hecho lleva varios meses en uso ininterrumpido y sólo Linux ha sido
  capaz de hacer simultáneamente 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 ridículo. Nadie me garantiza que nunca me vaya a
  fallar, pero lo doy por modesta pero absolutamente victorioso en
  comparación con sistemas comerciales teóricamente superiores y con un
  coste mucho mayor.

  Otra situación en la que actualmente uso Linux es como servidor de
  Web, mail, FTP anónimo (de servicio público a la red) y servicios de
  salida a Internet para una red local de 2.100 usuarios, también con
  muy buenos resultados a pesar de la fuerte carga de trabajo contínuo
  las 24 horas.


  5.1.  Conectividad casera


  Algunas de las situaciones típicas en las que se puede aprovechar la
  capacidad de trabajo en red de Linux podrían ser:


  5.2.  Servidor de terminales


  ¿Quién no tiene en casa un PC (o algo peor) que se ha quedado antiguo
  pero que aún funciona? Cualquier ordenador con un puerto serie y algun
  software de emulación de terminal puede conectarse a un Linux,
  permitiendo varios usuarios trabajando simultaneamente. Para quien no
  lo haya hecho alguna vez, es la forma más simple de comprobar por sí
  mismo que Linux es un sistema 100% multiusuario y multitarea. Todos
  los recursos de memoria, disco, etc.  estarán 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 través 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 física por algo mas "decente" como una LAN
  ethernet o análogo, mejorarán las prestaciones como es lógico, pero la
  idea es la misma y el software de usuario son idénticos (lo que varía,
  claro esta, es la configuración 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 líneas serie la funcionalidad del
  TCP/IP). Así podemos dar servicio de acceso a Internet a los usuarios
  que se nos conecten por teléfono.


  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á también es
  habitual en empresas. Si tenemos una red local enganchada a su vez a
  un proveedor (académico o comercial), entonces una simple tarjeta de
  red y una simple configuración del sistema serán suficientes para
  conectar Linux, que actuará como un ordenador Unix cualquiera, con
  todas sus ventajas. De hecho en la red encontraremos más de un
  servidor que esconde un Linux en sus "entrañas", 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 serían:


  ·  Crea cuentas para los usuarios que realmente vayan a usarlo, y
     asígnales claves dificilmente adivinables (no hace falta
     complicarse la vida con claves imposibles, pero tampoco debes
     ponérselo fácil a los intrusos)

  ·  Hazte cargo de la clave del administrador root y procura mantenerla
     a salvo. Si la facilitas a alguien más, mentalízale para que la use
     con precaución (por otra parte también es una forma de aprender
     nociones básicas de administración 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
     podrías 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 tenías que hacer
     como super-usuario)

  ·  El sistema va dejando muchos mensajes registrando la actividad de
     los usuarios y del propio sistema en múltiples 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 básicos para moverte por el sistema, aprende a recoger
     la información que genere ese servicio, eliminar la inútil, 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 información desfasada despues de tanto tiempo)


  5.6.  Infovía: acceso a Internet desde casa



  5.6.1.  ¿Qué es infovía?


  Infovía es una red creada por Telefónica a la que los usuarios acceden
  desde cualquier punto de la red telefónica española 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 vía
  interesante de acceso, pero para evitar confusiones hay que tener
  presente que Infovía NO es Internet, sino un producto comercial de
  Telefónica. Aún despues de habernos conectado a Infovía 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 Infovía no es más 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 típico de configuración: Telefónica facilita su software
  gratuito para entornos comerciales típicos (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 básico es el pppd, que a través 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 conexión. También intervendrán
  varios ficheros de configuración (unos genéricos de Linux para
  cualquier conexión TCP/IP, otros característicos de las conexiones a
  través de PPP y modem, y por último alguno que usemos en el caso
  concreto de Infovía). Un detalle sobre versiones de software: un
  inconveniente en la evolución de Linux ha sido un cambio en la
  implementación del PPP que hace incompatible algunos pppd con algunas
  versiones del kernel. Si nuestro núcleo 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 núcleos más recientes.

  El listado siguiente es un ejemplo del fichero principal de
  configuración de pppd, en el que a su vez se hace referencia a varios
  ficheros que deberemos crear: identificación y clave facilitada por el
  proveedor de acceso, el guión de inicio de conexión, y el de cierre y
  cuelgue del modem. /dev/modem es un enlace (un "symbolic link") que
  usaremos como nombre genérico 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 líneas, una
  con el login (identificación de usuario) y otra con la clave. Para
  acceder a Internet deberemos introducir en ambos casos lo que indique
  el proveedor, mientras que si sólo vamos a navegar por Infovía (sin
  salir a Internet) es suficiente con poner infovia como usuario
  genérico e infovia como clave.

  /etc/ppp/infovia.chat contiene el guión que utilizará chat en su
  diálogo con el modem. Un ejemplo de su contenido podría 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 marcación por pulsos. Si fuera por tonos
  sustituir ATDP por ATDT. Además, si al número 055 de llamada a Infovía
  hubiera que añadir algún prefijo de centralita o cualquier otra
  marcación especial, no hay más que incluirlo en el listado. Por su
  parte el de cierre de conexión y reseteo del modem sería algo así:

  /etc/ppp/infovia-off.chat:

  ______________________________________________________________________
    TIMEOUT 3
    ''    '\r'
    '\r'  '+++\c'
    '\r'  ATH0
    OK    ATH0
    OK
  ______________________________________________________________________



  6.  Direcciones útiles



  6.1.  Direcciones electrónicas

  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/España <http://www.cs.us.es/archive/linux.html>
        En Sevilla, el servidor más 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 Informática <http://luna.gui.uva.es>
        En Valladolid, con mirrors de LDP/WWW, Slackware, Sunsite y
        manuales traducidos.

     Página 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/>
        Traducción del manual del sistema.
  6.1.2.  FTP Anonimo



  6.1.3.  Grupos de noticias



  6.1.4.  Listas de correo


  Aparte de las numerosísimas listas de correo en inglés (desde las más
  genéricas hasta las más especializadas en temas muy concretos), en
  España 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 información: 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 sabrás que existe un area R34.LINUX con bastante
  actividad (¡es una de las areas más animadas! ;^) Mucha de la
  información distribuida en Internet tiene su réplica en Fidonet,
  además del valioso soporte mútuo 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.  Bibliografía.


  ·  Linux Edición 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 García-Agulló <mailto:Gonzalo.Garcia-
  Agullo@jrc.es> 1996.  Elaborado a partir de experiencia propia y de
  información recopilada a través 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 distribución 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
  Görkem Çetin, gorkem@gelecek.com.tr
  v1.0, 21 September 1999

  Bu belge, Linux iþletim sistemi altýndaki Türkçe sorunlarýna çözüm
  getirmek amacýyla, mevcut Türkçe desteðinin nasýl kullanýlabileceðini
  anlatýyor.
  ______________________________________________________________________

  Table of Contents


  1. Giriþ

     1.1 Sürüm deðiþiklikleri

  2. HOWTO belgeleri

     2.1 Tüm HOWTO belgelerini nerede bulabilirim?
        2.1.1 Türkçe-NASIL belgeleri
           2.1.1.1 Diðer Türkçe kaynaklar

  3. Klavye ayarlarý

     3.1 Klavye tuþ takýmý yüklenmesi
     3.2 Bu tuþtakýmlarýný nerede bulabilirim?

  4. Metin ekran (konsol) yazýtiplerinin yüklenmesi

     4.1 Son düzeltmeler

  5. Çeþitli uygulamalarda Türkçe kullanýmý

     5.1 Pine
     5.2 Netscape
     5.3 KDE altýnda Türkçe
     5.4 kvt
     5.5 GNOME altýnda Türkçe

  6. Zaman dilimi ayarlarý

  7. X Window desteði

     7.1 X Window Türkçe yazýtiplerinin yüklenmesi
     7.2 X Window altýnda Türkçe klavye kullanýlmasý

  8. Yapýlacaklar



  ______________________________________________________________________

  1.  Giriþ

  Bu belge, Linux ve bazý özel durumlarda UNIX iþletim sisteminde Türkçe
  kullanabilmek için gereken eklemeler hakkýnda okuyucuyu bilgilendirmek
  için yazýldý. Türkçe'ye ait olan latin5, bir baþka adýyla ISO8859-9
  standardýnýn, Amerika ve bazý Avrupa ülkelerince kullanýlan latin1
  standardý ile ayný olmamasý nedeniyle sadece Linux deðil, hemen hemen
  tüm iþletim sistemlerinde bu sorunu fazlasýyla yaþýyor olmalýsýnýz.
  Ýleride ele alýnacak konular ile bu sýkýntýlarýn pek çoðunu
  atlatacaðýnýzý ümit ediyorum. Eðer metin ekranda, X Window altýnda
  Türkçe yazamýyor ve okuyamýyorsanýz, pine ve Netscape gibi
  uygulamalarda Türkçe karakterleri göremiyorsanýz bizi izlemeye devam
  edin.

  Bu belgedeki çözüm denemelerimi Red Hat Linux ile yaptým.  Çalýþmayan,
  eksik bilgi içeren ya da eklenmesinde fayda gördüðünüz bir bölüm
  gördüðünüzde gorkem@gelecek.com.tr adresine bir ileti yollamanýz
  yeterlidir. Özellikle diðer Linux daðýtýmlarýnda yapýlacak iþlemler
  farklý olabilir, bu nedenle çeþitli Linux daðýtýmlarýnda
  karþýlaþtýðýnýz çözümleri bana gönderebilirsiniz.



  1.1.  Sürüm deðiþiklikleri

  Sürüm 1.0 : Turkish-HOWTO'nun yazýlmasý. Hala belirli alanlarda Türkçe
  sorunlarý yaþadýðýmdan dolayý bu belgenin 1.0 sürümde kalmayacaðýný
  ümit ediyorum. Dosya, birtakým alanlarda eksiklikler içerebilir.
  Burada görmek istediðiniz ne varsa bana bir ileti gönderin. Tüm
  mektuplarýnýza cevap vermeye çalýþacaðým.



  2.  HOWTO belgeleri

  Linux'un HOWTO belgeleri, Linux meraklýlarý tarafýndan biraraya
  getirilmiþ ve hepsi belirli bir konuyu ele alan inceleme yazýlarýndan
  oluþuyor. Hem teorik, hem de pratik çözümler içeren bu belgeleri tüm
  Linux kullanýcýlarýnýn okumalarýný tavsiye ederim.


  2.1.  Tüm HOWTO belgelerini nerede bulabilirim?



  ·  Daðýtýmla birlikte : Eðer çalýþýr durumda bir Linux daðýtýmýnýz
     varsa, bazý durumlarda güncelliðini kýsmen yitirmiþ, ancak deðerli
     bilgiler içeren belgelere /usr/doc dizininden eriþebilirsiniz.
     Buradaki HOWTO dizini altýnda ise tahmin edebileceðiniz gibi HOWTO
     belgelerini bulabilirsiniz.

  ·  Eðer HOWTO belgelerini kurmamýþsanýz, ya da elinizde bir Linux
     daðýtýmý yoksa en yakýn sunsite arþivinden de bu belgeleri almanýz
     mümkün: www.metu.edu.tr/ldp/HOWTO <www.metu.edu.tr/ldp/HOWTO>


  2.1.1.  Türkçe-NASIL belgeleri


  Bazý HOWTO belgelerinin çevrilmesi sonucu oluþturulan Türkçe Linux-
  NASIL sayfalarýna www.linux.org.tr <http://www.linux.org.tr>
  adresinden ulaþabilirsiniz.


  2.1.1.1.  Diðer Türkçe kaynaklar


  ·  Türkiye Linux Kullanýcýlarý Grubu, www.linux.org.tr
     <http://www.linux.org.tr>

  ·  Gelecek Biliþim ve Ýletiþim 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 :


  Türkiye'de Linux ile ilgili çýkmýþ tüm yayýnlara www.gelecek.com.tr
  <http://www.gelecek.com.tr> adresinden ulaþabilirsiniz.



  3.  Klavye ayarlarý

  Bu bölümde, metin ekranda Türkçe yazmak için gerekli programlarý
  inceleyeceðiniz. Bunlardan ilki, bilgisayara Türkçe klavye tuþ takýmý
  haritasýný gösterecek olan loadkeys komutudur. loadkeys komutu ve
  uygun bir Türkçe klavye daðýlýmý haritasý yardýmýyla istediðimiz bir
  Türkçe klavyeyi (Q Türkçe, F Türkçe gibi) yükleyebiliriz.



  3.1.  Klavye tuþ takýmý yüklenmesi


  loadkeys komutunun kullanýmý çok basittir. Daðýtýmýnýzda bulunan ve
  /usr/lib/kbd/keymaps/i386 dizini altýna yerleþtirilmiþ olan klavye
  haritalarýndan bir tanesini seçin. Aslýnda klavye haritalarýnýn adýný
  bilmek zorunda deðilsiniz, burada kullanabileceðiniz dosyalarý ve ne
  tip bir klavyeyi yüklediklerini görebilirsiniz:



  ·  trq.map : Türkçe Q klavye

  ·  trf.map : Türkçe F klavye

  ·  tralt.map : Bu klavye ile, ALT tuþu ile birlikte bastýðýnýz bir
     karakterin karþýlýðý olan Türkçe karakter ekranda belirecektir.
     Örnek olarak ALT ve "c" karakterlerine bastýðýnýz zaman "ç", ALT ve
     "G" karakterlerine bastýðýnýzda ise "Ð" harfi görülecektir. Bu
     klavye daðýlýmý, Q klavyeye alýþkýn, ancak arada bir Türkçe yazmak
     isteyenler için ideal görününüyor. Ancak hýzlý kullanmak için biraz
     zaman istiyor.



  Þimdi loadkeys komutunu birkaç örnekte kullanalým:



       $ loadkeys trq.map                 (Türkçe Q klavye haritasýný yükle)
       $ loadkeys trf.map                 (Türkçe F klavye haritasýný yükle)
       $ loadkeys tralt.map               (Türkçe F klavye haritasýný yükle)



  Eðer normal US klavye haritasýna dönmek isterseniz, defkeymap klavye
  eþlem dosyasýný kullanýn.


       $ loadkeys defkeymap



  Yapýlan tüm iþlemler tüm sistemde etkin olacaktýr. Bir kullanýcý
  çalýþma yaptýktan sonra sistem kapanýncaya, ya da baþka bir klavye
  daðýlýmý yüklenince deðin klavye düzeni ayný kalýr.



  Not: Çoðu Linux daðýtýmlarýnda bulunan kbd paketi sistemde
  kullanýlabilecek klavye eþlem (daðýlým) dosyalarýný ve yazýtiplerini
  içerir. Son zamanlarda, diskten tasarruf saðlamak amacýyla hem
  yazýtipi, hem de klavye eþlem dosyalarý sýkýþtýrýlarak
  kullanýlmaktadýr. Bu tip sýkýþtýrýlmýþ dosyalarýn sonu .gz ile biter
  (örneðin trq.map.gz).  loadkeys ve setfont komutlarý herhangi bir
  sorunla karþýlaþmadan bu dosyalarý okuyabilecek ve gerekli iþlemleri
  yapacaktýr.



  3.2.  Bu tuþtakýmlarýný nerede bulabilirim?

  Eðer kullandýðýnýz daðýtýmda trq.map, trf.map ya da tralt.map klavye
  eþlem dosyalarýný bulamýyorsanýz ve yukarýdaki komutlarý iþlerken hata
  mesajý alýyorsanýz, ftp.gelecek.com.tr
  <ftp://ftp.gelecek.com.tr/pub/turkce> adresinden bu dosyalarý
  indirmeniz mümkündür.



  Dilediðiniz klavye düzenini, Red Hat daðýtýmýnda yeralan
  /etc/sysconfig/keyboard dosyasýna ekleyebilirsiniz. Kullanabileceðiniz
  dosya isimlerinden bazýlarý trq, trf ve tralt'týr.


  4.  Metin ekran (konsol) yazýtiplerinin yüklenmesi


  Metin ekranda Türkçe görebilmek için birkaç iþleme daha ihtiyacýmýz
  var. Bunlardan ilki Türkçe karakterleri içeren yazýtiplerinin
  yüklenmesi. Bir yazýtipini yüklemek için setfont komutunu
  kullanýyoruz.



       $ setfont latin5u-16.psf.gz



  Yukarýdaki komut /usr/lib/kbd/consolefonts dizini altýndaki
  latin5u-16.psf.gz yazýtipi dosyasýný yükledi. Bu dizin altýnda
  yeralan, ya da yukarýda belirttiðim ftp adresinden indirdiðiniz ve adý
  latin5 ile baþlayan tüm yazýtipleri Türkçe karakterler içerir. Birkaç
  deneme de siz yapýn. Özellikle latin5u-12 ve latin5u-14 dosyalarý daha
  küçük yazýtipi içerir ve ekranda ayný anda daha çok karakter
  görüntüleyerek çalýþma alanýnýzý geniþletir.



  Metin ekranda kullanabileceðiniz tüm Türkçe yazýtiplerini
  ftp.gelecek.com.tr <ftp://ftp.gelecek.com.tr/pub/turkce> dizini
  altýnda bulabilirsiniz.
  4.1.  Son düzeltmeler

  Atýlmasý gereken birkaç adým daha kaldý. Önce /etc/inputrc dosyasý
  içine aþaðýdaki satýrlarý ekleyin. Eðer dosya yoksa kendiniz
  oluþturun.



       set input-meta on
       set convert-meta off
       set output-meta on



  Ardýndan /etc/profile dosyasýnýn sonuna, aþaðýdaki satýrlarý ekleyin.



       export INPUTRC=/etc/inputrc



  Artýk rahatlýkla bash komut satýrý altýnda Türkçe yazabilir ve
  okuyabilirsiniz. Yukarýda yapýlan iþlemleri eðer /etc/rc.d/rc.local
  dosyasýna eklerseniz, herkes için tanýmlý bir klavye eþlem dosyasý ve
  yazýtipi yaratmýþ olursunuz:



       setfont latin5u-16.psf
       loadkeys trq.map.gz



  5.  Çeþitli uygulamalarda Türkçe kullanýmý



  5.1.  Pine


  Pine ile Türkçe ileti göndermek ve almak istiyorsanýz, .pinerc
  dosyasýnda, character-set deðiþkeninin karþýsýnda, aþaðýdaki
  deðiþikliði yapmanýz 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



  Yukarýdaki deðiþiklikleri yaptýktan sonra, pine ile kolayca Türkçe
  karakterler içeren e-posta yollayabilirsiniz.



  5.2.  Netscape


  Netscape'te yazýtipi seçimi için, Edit - Preferences - Appearance -
  Fonts - For the Encoding menüsüne gidin ve buradan ``Turkish
  (iso-8859-9)'' seçeneðini iþaretleyin. Daha aþaðýda yeralan ``Use my
  default fonts, overriding document-specified fonts'' seçeneðini
  iþaretlemeniz halinde ise Netscape, sadece sizin belirttiðiniz
  yazýtiplerini ekranda gösterecektir.  Yine de Netscape ile Türkçe
  yazýtiplerini görmekte sýkýntý çekerseniz View -> Encoding -> Turkish
  (ISO-8859-9) seçeneðini iþaretlemelisiniz.

  Genel kural olarak yazýtipini seçmenize izin veren tüm yazýlýmlarda
  Türkçe yazýtiplerini kullanabilirsiniz.



  5.3.  KDE altýnda Türkçe


  KDE pencere arayüzünün büyük bir kýsmý Türkçeye çevrildi. 1.0
  sürümünden itibaren gelen Türkçe desteði ile pek çok uygulama
  yazýlýmýný Türkçe çalýþtýrabiliyorsunuz.



  KDE altýnda, programlarýn Türkçe çalýþmasý ve mesajlarýn Türkçe
  çýkmasý için kcontrol programýný çalýþtýrýn. Sol tarafta yeralan
  Desktop - Language menüsü içinde ilk dil olarak Turkish'i seçin.
  Bundan sonra açacaðýnýz her KDE programý, eðer destekleniyorsa Türkçe
  çalýþacaktýr.



  5.4.  kvt


  kvt, KDE ile birlikte gelen bir terminal emülasyon programýdýr. kvt'de
  kullanacaðýnýz yazýtipini seçmek için, sýrasýyla


  ·  Seçenekler - Yazýtipi menüsüne girin.

  ·  Karakterler seçeneðinin yanýndaki düðmeden iso-8859-9 seçeneðine
     týklayýn.

  ·  Ýsterseniz boy, tür ve diðer seçeneklere de gözatabilir ve bunlarý
     deðiþtirebilirsiniz. Özellikle Courier yazýtipi en iyi görüntüyü
     saðlayacaktýr.

  ·  kvt'ye geri dönün.

  Artýk kvt altýnda Türkçe yazabilirsiniz. Ancak X Window'da henüz
  Türkçe karakterlerinizi tanýtmadýysanýz yukarýda yazýlanlarý yapmak
  mümkün olmaz.  Bunun için önce ``X Window Türkçe yazýtiplerinin
  yüklenmesi'' baþlýðý altýnda yeralan yönergeleri izleyin.



  kvt'nin yeni bir sürümünü kullanmanýz halinde, önce kvt'yi çalýþtýrýn,
  ardýndan farenin sað tuþuyla kvt üzerinde herhangi bir noktaya basýn.
  Yukarýdaki maddeleri sýrasýyla takip edin.



  5.5.  GNOME altýnda Türkçe

  GNOME masaüstü altýnda, özellikle gnome terminal altýnda
  yaþayabilmeniz muhtemel Türkçe karakter sorununa çözüm için, aþaðýdaki
  maddeleri uygulayýn:



  ·  Bir gnome terminal açýn. GNOME panelinin (ekranýn en altýnda)
     üzerinde yeralan ekran görüntüsü üzerine týklayabilirsiniz.

  ·  Settings - Preferences içine girin. Font karþýsýndaki kutucukta,
     halen kullanýlan yazýtipi yeralmaktadýr. Karþýsýndaki kutuya
     (Browse) týklayýn.

  ·  Filter sekmesine týklayýn. Charset bölümünden ISO8859-9'u seçin.
     Ok'i týklayýn.

  ·  Ok diyerek son pencereden de çýkýn. Þimdi gnome terminalde Türkçe
     karakterleri görebileceksiniz.



  6.  Zaman dilimi ayarlarý


  Türkiye, Greenwich'ten 2 saat ileride yeralan zaman dilimi kuþaðý
  içindedir. Bunu, bir e-posta aldýðýnýz zaman iletinin en üst kýsmýnda
  yeralan +02:00 iþaretinden de anlayabilirsiniz. Eðer hatalý bir zaman
  diliminde yeralýyorsanýz, yapýlmasý gereken iþlemler aþaðýdadýr.
  Alternatif olarak, Red Hat ve Mandrake daðýtýmlarýyla gelen timeconfig
  paketi zaman dilimini ayarlamanýz konusunda yardýmcý olacaktýr.



  Önce /etc/localtime saat ayarý dosyasýný silin:



       # rm /etc/localtime



  Ardýndan, bu dosyayý bir sembolik bað ile,
  /usr/share/zoneinfo/Europe/Istanbul dosyasýna baðlayýn.



       # ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/timeconfig



  timeconfig paketinde ise sadece ``Turkey'' seçeneðini iþaretleyin ve
  çýkýn.

  Eðer /etc/localtime dosyasý yoksa, baþta sendmail olmak üzere pek çok
  programda hoþ olmayan hata mesajlarý alýrsýnýz.


  7.  X Window desteði



  Metin tabanlý bir ekran altýnda Türkçe yazdýktan ve uygulamalarýmýzý
  Türkçe yazýtipleriyle kullanmaya baþladýktan sonra X Window altýnda
  nasýl Türkçe yazýlýr ve okunur, görelim.


  7.1.  X Window Türkçe yazýtiplerinin yüklenmesi


  Öncelikle yapmamýz gereken, Türkçe yazýtiplerinin X Window'a
  tanýtýlmasýdýr. X Window açýlýrken, hangi yazýtiplerini yükleyeceðini
  belirlemek amacýyla bazý öntanýmlý dizinlere bakar. Bu dizinler,
  /usr/X11R6/lib/X11/XF86Config dosyasýnda belirtilmiþtir.



  RPM paketlerini kurabileceðiniz bir daðýtým kullanmanýz halinde,
  Türkçe yazýtiplerini ve klavye harita ek dosyasýný yüklemiþseniz,
  iþiniz çok kolay. Bu dosyalarý yükleyip yüklemediðinizi bilmiyorsanýz
  aþaðýdaki komutu çalýþtýrýn.



       # 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



  Yukarýdaki satýrlara benzer bir çýktý almýþ olmanýz gerekiyor (sürüm
  numaralarý farklý olabilir). Eðer almadýysanýz Türkçe yazýtiplerini
  kurmamýþsýnýz demektir. Eðer Red Hat Linux kullanýyorsanýz, CD'yi
  sürücüye yerleþtirip sýrayla þu iþlemleri yapýn:



       # 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



  Yazýtiplerini ve klavye eþlem dosyasýný sisteminize kurduktan sonra
  bir sonraki adýma geçin.



  Þimdi, daha önce yarým býraktýðýmýz noktaya geri dönelim. X Window'un
  yükleyeceði yazýtiplerinin bulunduðu dizinler
  /usr/X11R6/lib/X11/XF86Config  dosyasýnda belirtiliyordu.



  Bu dosya içinde, aþaðýdakine



  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 satýrlar göreceksiniz.

  Bu satýrlarýn en baþýna, kurduðumuz Türkçe yazýtipleri neredeyse o
  dizinin adýný yazýyoruz. Red Hat Linux 6.0'dan itibaren Türkçe
  yazýtipleri /usr/share/fonts/ISO8859-9 dizinine kuruluyor. Bu dizin
  patikasýný XF86Config dosyasýnýn en üstüne ekleyelim. Tüm Türkçe
  yazýtipleri kurulmuþsa /usr/share/fonts/ISO8859-9 dizini altýnda
  aþaðýdaki dosyalarý görebilirsiniz:



       # 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 Türkçe yazýtiplerimizin bulunduðunu
  /usr/X11/lib/X11/XF86Config dosyasýnda 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" satýrý varsa, ekleme yapacaðýnýz
  üç satýrý da "FontPath   unix/:-1" satýrýnýn baþýna koymanýz
  gerekiyor.



  Þu anda yazýtiplerimizi sisteme tanýtmýþ durumdayýz. X Window
  açýlýrken önce en üstteki FontPath bilgileri okunacaktýr.

  Þimdi X Window'a girin. Netscape ile herhangi bir Türkçe dosyayý
  görüntüleyebilirsiniz.



  7.2.  X Window altýnda Türkçe klavye kullanýlmasý


  Sýra geldi klavye ayarlarýnýn yapýlmasýna. Red Hat ile birlikte,
  Türkçe klavye eþlem dosyalarý da geliyor. Bu dosyalar,
  /usr/X11R6/lib/X11/etc dizininde yeralýyorlar:



       # 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



  Yukarýdaki dosyalar sýrasýyla standart Amerikan klavye, alt Türkçe
  klavye, F klavye ve Q Türkçe klavyeye karþýlýk geliyor. X Window'a
  girerken bu klavyelerden bir tanesini aktif hale getirmemiz gerekiyor.
  Örnek olarak, Q Türkçe klavyenin, X Window açýlýrken etkin olmasý
  için, /home/kullanýcý-adý/.xinitrc dosyasýna aþaðýdaki satýrý
  eklemelisiniz.



       xmodmap /usr/X11R6/lib/X11/etc/xmodmap.trq



  .xinitrc dosyasýna, kullandýðýnýz pencere yönetecisini çalýþtýracak
  þekilde bir eklenti de yapmanýz gerekecektir. Bu eklentiyi de
  yaptýktan sonra dosyanýn son hali aþaðýdakine benzer bir hal alýr:



       xmodmap /usr/X11R6/lib/X11/etc/xmodmap.trq
       startkde



  Tabi siz startkde yerine istediðiniz pencere yöneticisini çalýþtýracak
  þekilde bir komut yazabilirsiniz.

  X Window'a girdikten sonra da klavye haritasýný deðiþtirmek mümkündür.
  Bunun için yukarýda örneði bulunan xmodmap komutunu doðrudan xterm
  altýnda çalýþtýrabilirsiniz.

  X Window altýnda kullanýlan klavye eþlem dosyalarýndan xmodmap.tralt,
  konsol ekranda kullanýlan tr.alt dosyasýndan biraz farklýlýk
  gösteriyor.  Konsol altýnda, herhangi bir Türkçe karakteri bastýrmak
  için ALT tuþunu kullanýrken, X Window altýnda ALT-GR tuþunu
  kullanmalýsýnýz.

  XFree86'daki güzel bir özellik de, konsolda kullanýlan klavye eþlem
  dosyasýnýn aynýsýnýn, X Window açýlýrken de kullanýlabilmesi. Bunun
  için, /usr/X11R6/lib/X11/XF86Config dosyasýnda,
       XkbDisable



  þeklinde bir satýrýn bulunmasý gerekir.



  8.  Yapýlacaklar


  Nefesimin yettiði bir noktada, uluslararasýlaþtýrma (i18n -
  internationalizaton) ve yerelleþtirme (l10n - localization) konularýna
  da girmek istiyorum. Bu sayede örneðin ayný kaynak kodu derleyerek,
  farklý diller için farklý tarih gösterimleri sunabilirsiniz. Bir dosya
  içinde sýralama yaparken "ç" karakterinin, "c"den hemen sonra
  gelmesini saðlayabilirsiniz. i18n sayesinde bir yazýlýmýn kullanýþlýðý
  çok artar. KDE gibi güzel bir masaüstü paketini þimdi Türkçe
  kullanabiliyorsanýz bunu i18n desteðine borçlusunuz.

  Bunlarýn yanýnda, sýrada Star Office'in Türkçe ayarlarýnýn yapýlmasý
  var. Saðolsun Sun Microsystems, Star Office'i serbest býrakarak Linux
  kullanýcýlarýnýn çok geliþmiþ bir ofis paketine sahip olmalarýna
  yardým etti. Bize de bu nimetten yararlanmak kaldý.

  Sevgi, saygý, Linux



D AKTUELL                           	aktuell
D VERALTET                          	veraltet
  11 de Octubre del 99.  mini-COMO: La abogacía 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 cómo la comunidad de
  Linux puede abogar efectivamente por el uso de Linux.
  ______________________________________________________________________

  Índice general


  1. Acerca de este documento

  2. Información sobre derechos reservados de autor.

  3. Introducción

  4. Información Relacionada

  5. Promoción del uso de Linux

  6. Normas de Conducta

  7. Grupos de Usuarios

  8. Relaciones con Distribuidores Comerciales

  9. Relaciones con los Medios de Comunicación

  10. Reconocimientos

  11. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Acerca de este documento


  Este es el COMO para la Defensa de Linux y tiene la intención 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 guías para defender a Linux durante las actividades del Día
  de la Red del 96 (NetDay96, http://www.netday96.com. Jon respondió
  positivamente a estas guías y observó que ellas eran la base de una
  lista de «normas de conducta» que podrían beneficiar la comunidad de
  Linux.

  Este documento está disponible en formato HTML y en su versión
  original en: http://www.datasync.com/~rogerspl/Advocacy-HOWTO.html.

  Nat Makarevitch nat@nataa.fr.eu.org tradujo este documento al francés:


  http://www.freenix.org/unix/linux/HOWTO/mini/Advocacy.html.

  Chie Nakatani jeanne@mbox.kyoto-inet.or.jp tradujo este documento al
  japonés: 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
  Portugués:
  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 serán bienvenidos.

  Si necesita saber más acerca del Proyecto de Documentación de Linux o
  acerca de los COMOs de Linux, siéntase libre de contactar (--  En el
  caso de la comunidad hispanoparlante, diríjase 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 perdóneme el haber sido tan
  desconsiderado. A pesar de que todavía tengo muchos otros compromisos,
  anticipo que comenzarán a demandarme menos tiempo y me permitirán
  ponerme al día 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.  Información 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 físico o electrónico sin permiso expreso del autor.

  Las traducciones igualmente son permitidas sin el permiso expreso si
  éstas incluyen una nota acerca de quién 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 acompañarse ya sea con una copia literal de este
  archivo o con un enlace a una copia literal.

  La redistribución comercial está permitida y es alentada; sin embargo,
  al autor le gustaría ser notificado de tales distribuciones.

  En resumen, deseamos promover la diseminación de esta información a
  través del mayor número posible de canales. Sin embargo, deseamos
  retener los derechos de autor de los documentos de COMO, y nos
  gustaría ser notificados de cualquier plan de redistribuir los COMOs.

  Más aún, queremos que toda la información provista en los COMOs sea
  diseminada. Si usted tiene preguntas, por favor contacte con el
  coordinador de los COMOs (en inglés), Joshua Drake,
  poet@linuxports.com.

  (-- Para temas relacionados con documentación en castellano, diríjase
  a http://www.insflug.org/colaboracion--)


  3.  Introducción


  La comunidad de Linux ha sabido por algún tiempo que para muchas
  aplicaciones, Linux es un producto estable, fiable, robusto (aún
  cuando no perfecto). Desafortunadamente, hay todavía 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 distribución
  de Linux han de lograr su máximo potencial, es crítico que lleguemos a
  los usuarios posibles y defendamos (siendo muy cuidadosos de no
  prometer demasiado) el uso de Linux para las aplicaciones apropiadas.

  La razón por la cual muchos productos comerciales han tenido éxito en
  el mercado no es tanto por la superioridad técnica como por las
  habilidades publicitarias de la compañía.

  Si usted goza con el uso de Linux y le gustaría 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 más acerca de Linux.


  4.  Información Relacionada


  Lars Wirzenius, antiguo moderador de comp.os.linux.announce y
  activista durante mucho tiempo de Linux, tiene también algunos
  pensamientos
  cómo promover el uso de Linux.

  Eric S. Raymond ha escrito un análisis, 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 términos
  «software libre» y «software disponible libremente» no son apropiados
  en todos los contextos. Para más información acerca del uso del
  término «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 técnicas 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 Día de la Red (NetDay) en alguna escuela local usando las
  ideas presentadas en la siguiente guía:  http://www.netday.org/how-
  to/.

  El propósito de Linux International, http://www.li.org es promover el
  desarrollo y el uso de Linux.

  El Linux Documentation Project (Proyecto para la Documentación de
  Linux)
  incalculable para los promotores de Linux.

  En el Linux Center Project, http://www.portalux.com/ tiene un índice
  temático 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 tópicos de
  interés para aquellos que utilicen Linux en un ambiente comercial de
  empresa privada.

  El propósito 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 número, por medio de la acción de
  alentar la reutilización 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 Misión Crítica,
  http://www.pckassa.com/mc-doc/ documenta implantaciones con éxito de
  sistemas existentes que tienen una gran carga y están corriendo 24
  horas al día.

  Existen algunas publicaciones en-línea 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-línea 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.  Promoción 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 sólo tenemos comentarios resplandecientes acerca de Linux, no
     estaríamos siendo honestos. A mí me encanta comentarle a la gente
     acerca de mis cuatro reinicializadas (de tres programadas) del
     sistema en tres años.


  ·  Si alguien tiene un problema que Linux puede resolver, ofrézcase
     para proporcionarle referencias a la información apropiada (páginas
     web, artículos de revistas, libros, consultores, etc....). Si no ha
     llevado a cabo la solución propuesta, exprésese en tal sentido.

  ·  Si se encuentra disponible para hacer presentaciones acerca de
     Linux regístrese en http://www.ssc.com/linux/lsb.html.

  ·  Ofrezca su ayuda a quien esté comenzando a usar Linux. Hágale un
     seguimiento para asegurarse que pudo usar el sistema de manera
     efectiva.

  ·  Algunas personas todavía creen que Linux y sistemas similares
     operan únicamente en modo texto. Hágalos conscientes de la
     disponibilidad de aplicaciones gráficas como Gimp,
     http://www.gimp.org/.

  ·  Trate de responder a algún novato de las listas de noticias. Busque
     las preguntas difíciles, puede ser el único que responda,
     aprendiendo mucho en el proceso. Sin embargo, si no se tiene la
     confianza de poder responder con la solución correcta, busque a
     alguien más que sí pueda.

  ·  Busque pequeñas firmas desarrolladoras de software y ofrézcales
     realizar una presentación acerca de Linux.

  ·  Si la oportunidad se presenta, haga una presentación al grupo de
     Informática de su empleador.

  ·  Si necesita una aplicación que no esté soportada por Linux,
     contacte con el vendedor y pídale una versión 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 ecuación.

  ·  La disponibilidad de soporte es, frecuentemente mencionada, una
     preocupación cuando se considera la adopción de Linux.  Compañías
     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
     distribución típica de Linux. Adicionalmente, el COMO Linux
     Consultants HOWTO, http://sunsite.unc.edu/LDP/HOWTO/Consultants-
     HOWTO.html incluye un listado de compañías 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 producción de software de código abierto tiene
     lugar en un ambiente de colaboración 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 núcleo de linux, http://www.linuxhq.com/.

  ·  Póngase de pie y déjese contar! Regístrese en el Contador de Linux:
     http://counter.li.org/.

  ·  Comunique los esfuerzos exitosos en la promoción 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.  Dónelos a alguien interesado en Linux, una biblioteca
     pública o un club escolar de computación. Un libro y su CD-ROM
     sería muy apropiado para una biblioteca. En todo caso, por favor
     asegúrese de no violar derechos de autor al hacer público el CD-
     ROM. Informe también 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 retribución económica que ellos reciban a
     cambio de sus esfuerzos.

  ·  Aliente a los sitios basados en Linux a que registren su sitio en
     la página de Powered by Linux
     http://sunsite.unc.edu/LDP/powered.html y sugiérales 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 documentación

  ·  creando trabajo artístico

  ·  suministrando asesoría como administrador

  ·  sugeriendo mejoras

  ·  proporcionando soporte técnico

  ·  contribuyendo con programas

  ·  donando equipo

  ·  dando apoyo financiero.






  6.  Normas de Conducta



  ·  Como representante de la comunidad de Linux, participe en las
     listas de distribución de correo y las discusiones de los grupos de
     noticias con actitud profesional. Huya del uso de lenguaje vulgar y
     las ofensas personales. Considérese a sí mismo como miembro virtual
     de la corporación, teniendo al Sr. Torvalds como director de la
     misma. Sus palabras podrán 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 sólo proveerá
     conocimiento profundo a los lectores; también 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 dejémoslo 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
     acción.

  ·  Céntrese en lo que Linux tiene para ofrecer. No hay necesidad de
     vejar a la competencia. Contamos con un producto bueno y sólido 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.

  ·  Refiérase a cualquier otro producto por su propio nombre. No se
     gana nada intentando ridiculizar una compañía o sus productos
     usando «ortografías creativas». Si esperamos respeto por Linux,
     entonces debemos respetar los demás productos.

  ·  Dé crédito a quien es debido. Linux es tan sólo el núcleo. Sin los
     esfuerzos del proyecto GNU, MIT, Berkeley y muchos otros muy
     numerosos para ser mencionados, el núcleo de Linux no sería útil
     para la mayoría.

  ·  No insista en que Linux es la única respuesta para una aplicación
     particular. Así como la comunidad de Linux venera la libertad que
     Linux les provee, las soluciones únicas basadas en Linux coartaría
     a otros su libertad.


  ·  Habrá casos en los que Linux no es la respuesta. Sea el primero en
     reconocerlo y ofrezca otra solución.


  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 región, inicie uno.

  ·   El COMO User Group HOWTO, http://sunsite.unc.edu/LDP/HOWTO/User-
     Group-HOWTO.html cubre muchos aspectos relativos a la creación de
     un grupo de usuarios y discute la importancia de la abogacía 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 comunicación locales.

  ·  Ofrézcase como voluntario para configurar un sistema Linux que
     satisfaga las necesidades de alguna organización local comunitaria.
     Por supuesto, el proceso de instalación debe incluir el
     entrenamiento para que el usuario de la comunidad pueda usar el
     sistema, igualmente provéalos de una adecuada documentación para el
     mantenimiento del sistema.

  ·  Discuta el COMO de la Abogacía por Linux en una reunión. Promueva
     discusiones y aliente la propuesta de nuevas ideas.


  8.  Relaciones con Distribuidores Comerciales



  ·  Cuando contemple la compra de hardware, pregúntele 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. Aliéntelos 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 donación 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 aplicación que no sea soportada en Linux, contacte
     el distribuidor comercial y pídale una versión nativa en Linux.


  9.  Relaciones con los Medios de Comunicación



  ·  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 artículo con tales características, por favor envíe la siguiente
     información relativa al artículo a clippings@li.org:


  ·  Nombre de la publicación

  ·  Dirección donde se pueda contactar al editor

  ·  Nombre del autor

  ·  Dirección donde se pueda contactar al autor

  ·  Título del artículo

  ·  Número de la página donde el artículo comienza

  ·  URL si el artículo se encuentra disponible en Internet

  ·  Un resumen del artículo, incluyendo su opinión.


  ·  Si usted cree que Linux no recibió un trato justo en algún
     artículo, revista o columna de prensa, envíe los detalles,
     incluyendo la anterior información, a li@li.org para que la
     respuesta apropiada sea enviada al editor. Si usted contacta al
     editor personalmente, sea profesional y asegúrese 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, encargándose de las traducciones al castellano de los Howtos,
  así como de la producción de documentos originales en aquellos casos
  en los que no existe análogo en inglés, centrándose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Diríjase a la sede del Insflug para más información al respecto.

  En élla encontrará siempre las últimas versiones de las traducciones
  «oficiales»:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  en los que estamos trabajando incesantemente.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase 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 tecnología adaptativa con
  Linux, en particular, usar tecnología adaptativa para hacer Linux
  accesible a aquellos que no pueden usarlo de otra forma. También cubre
  áreas en las que Linux puede usarse dentro de soluciones de tecnología
  adaptativa más generales.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Política de distribución

  2.      Comparación de Linux con otros sistemas operativos

  2.1.    Comparación general

  2.2.    Disponibilidad de tecnología adaptativa

  2.3.    Usabilidad inherente

  3.      Invidentes

  3.1.    Ver la pantalla con mala visión

  3.1.1.  SVGATextMode

  3.1.2.  Sistema X Window

  3.1.2.1.        Diferentes resoluciones de pantalla

  3.1.2.2.        Aumento del tamaño 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 tamaño

  3.1.4.1.        LaTeX / TeX

  3.1.5.  Impresión de texto grande

  3.2.    Ayudas para aquellos que no pueden utilizar salida visual

  3.2.1.  Terminales Braille

  3.2.2.  Síntesis 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 oído

  4.1.    Campanas visuales

  5.      Problemas físicos

  5.1.    Imposibilidad de usar un ratón/puntero

  5.1.1.  Imposibilidad de usar un teclado

  5.1.1.1.        Otros dispositivos de entrada (sólo sistema X Window)

  5.1.2.  Controlar hardware físico 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 repetición automática

  5.3.3.  Macros / Mucha entrada, pocas pulsaciones de teclas

  5.3.4.  Teclas persistentes

  6.      Temas generales de programación

  6.1.    Intente proporcionar múltiples 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.    Documentación 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 electrónico

  7.2.1.  La lista linux-access  (inglés)

  7.2.2.  La lista linux-blind  (inglés)

  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.  Compilación 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 núcleo 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 síntesis 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.  Introducción

  El objetivo de este documento es servir como una introducción a las
  tecnologías disponibles para hacer Linux utilizable por personas que,
  por diversas discapacidades, habrían tenido problemas con ello. En
  otras palabras, los grupos destinatarios de estas tecnologías son:
  invidentes, discapacitados visuales, sordos y discapacitados físicos.
  En el momento en que se descubran nuevas tecnologías o informaciones
  serán incluidas.

  La información aquí mostrada no es sólo para estas personas (aunque
  posiblemente sea el objetivo principal) sino también para permitir a
  los desarrolladores de Linux percatarse de las dificultades
  relacionadas.  Posiblemente el mayor problema es que, actualmente, muy
  pocos desarrolladores de Linux están al tanto de los factores y de
  varias sencillas formas de hacer la vida más fácil a los
  implementadores de estos sistemas. Esto, sin embargo, ha cambiado
  notablemente desde la aparición de este documento, por un lado se ha
  reducido el trabajo potencial de recopilar información 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, envíeme cualquier comentario o información adicional, u
  ofertas de ayuda a
  una lista de correo en un futuro, o pasar directamente a manos de un
  hipotético 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 envía un
  correo a la access-list o a la blind-list, posiblemente lo lea y añada
  información útil al documento. Si no, por favor, envíe una copia de
  cualquier cosa interesante a la dirección de correo electrónico
  anterior.

  El correo por el método 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 electrónico será
  unas semanas más rápido.
  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 dirección si no se trata de correo personal. Es más probable que
  así se llegue a una respuesta adecuada.

  1.1.  Política de distribución

  El Accesibilidad-COMO tiene copyright © de Michael De La Rue.

  El Accesibilidad-COMO puede ser distribuido, a su elección, bajo los
  términos de la Licencia Pública GNU (GPL) versión 2 o superior, o los
  del Proyecto de Documentación Linux (LDP).  Estas licencias deberían
  estar disponibles en el lugar del que sacó este documento. Por favor,
  tenga en cuenta que los términos de LDP no permiten la modificación
  (salvo la traducción), por lo que las versiones modificadas deberán
  ser distribuidas bajo la licencia GPL.

  2.  Comparación de Linux con otros sistemas operativos

  2.1.  Comparación general

  El mejor sitio para saber más 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 incluirían el
  hecho de que este sistema está equipado internamente con un completo
  soporte para trabajo en red, lo que proporciona acceso total a
  Internet.  Más generalmente, los usuarios son atraídos por el completo
  entorno de desarrollo incluido. También, a diferencia de la mayoría de
  los Entornos Gráficos de Usuario (GUI)  modernos, la parte gráfica 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-gráfico.
  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 comparación es posiblemente menos favorable y
  no tan clara. Personas con necesidades muy específicas y complejas
  encontrarán que el completo sistema de desarrollo incluido permite
  soluciones razonablemente personalizadas. Sin embargo, la mayor parte
  del software que existe en otros sistemas está todavía empezando a
  estar disponible. Se está llevando a cabo más desarrollo en casi todas
  las direcciones.

  2.2.  Disponibilidad de tecnología adaptativa

  Prácticamente no hay nada comercial disponible específicamente para
  Linux.  Hay una notable cantidad de software de libre distribución que
  puede ser útil para la adaptación, por ejemplo, una aplicación de
  síntesis de voz, o algún programa de control por voz. También hay una
  serie de paquetes de libre distribución 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 mayoría de su
  software orientado a línea de comandos. Esto está cambiando y casi
  todo está disponible con una apariencia gráfica. Sin embargo, debido a
  que en sus orígenes fue un sistema operativo de programadores, todavía
  se escriben programas orientados a línea de comandos, que cubren casi
  todas las nuevas áreas de interés. Para el discapacitado físico, esto
  significa que es fácil construir programas personalizados que se
  ajusten a sus necesidades. Para los invidentes, esto debería hacer
  fácil el uso con una herramienta de síntesis de voz o un terminal
  Braille en un previsible futuro.

  El sistema de múltiples consolas virtuales de Linux hace práctico 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 programación, y debería ser adaptable. Sin embargo, en
  la práctica, los programas adaptativos disponibles hasta ahora han
  sido más 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 debería 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 síntesis de voz).
  Todavía tengo que verlo. Dudo que funcionase en la práctica porque el
  software de síntesis de voz disponible para Linux no es lo
  suficientemente bueno. Para un discapacitado físico, la limitación
  todavía está en la carestía del hardware de entrada de datos.

  3.  Invidentes

  Voy a usar dos categorías 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 visión

  Aquí hay varios problemas diferentes. A veces el aumento de tamaño
  puede ser útil, pero ahí no se acaba todo. A veces las personas no
  pueden percibir la acción, otras no pueden ver el cursor hasta que se
  mueve. Esto requiere una gama de técnicas, la mayoría de las cuales
  están siendo añadidas 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
  fácil de aumentar una determinada zona de la pantalla, pero se puede
  variar su tamaño 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 aún un conjunto de
  características 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 pulsación de una tecla puede cambiar entre ellas permitiendo
  ver texto difícil de leer.

  En el fichero /etc/XF86Config, hay una entrada en la sección de la
  pantalla (screen) con una línea 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 resolución), será capaz de tener un
  aumento de tamaño de hasta el 400% cambiando entre los diferentes
  modos, utilizando CTRL+ALT+'+' (del teclado numérico) y CTRL+ALT+'-'
  (del teclado numérico)

  Moviendo el ratón por la pantalla podremos situarnos en la zona que
  nos interese. Para más detalles sobre la configuración véase la
  documentación que se incluye con el servidor X XFree86.

  3.1.2.2.  Aumento del tamaño 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 tenía que haber algo mejor que xmag,
  bueno, pues es éste. Véase la sección ``xzoom''.

  Otro programa disponible es puff. Está específicamente orientado hacia
  los discapacitados visuales. Proporciona características como una caja
  alrededor del puntero del ratón de forma que sea más fácil
  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 algún tipo de interacción entre xpuff y el manejador de
  ventanas que hace difícil su uso. Cuando se utiliza con fvwm, no
  responde a la pulsación de ninguna tecla, sin embargo esta situación
  se evita usando twm.

  El último programa que he visto trabajar es el dynamag. De nuevo éste
  tiene características específicas como la capacidad de seleccionar una
  determinada zona de la pantalla y monitorizarla, refrescando la imagen
  aumentada a intervalos regulares de pocas centésimas de segundo o
  varios segundos. Dynamag es parte de la distribución UnWindows. Véase
  la sección ``UnWindows'' para más detalles.
  3.1.2.3.  Cambiar la fuente de pantalla

  Las fuentes de pantalla deberían 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 línea en el fichero .Xdefaults del directorio
  propio. Añadiendo las líneas 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.

  Debería haber forma de cambiar esto de manera más general, para que
  todo aparezca con la fuente aumentada. Esto se podría 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 envíe los detalles de
  cómo 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 (líneas horizontal y vertical desde el borde de
     la pantalla).

  ·  cursores parpadeantes (cursores que se iluminan al pulsar una
     tecla).

  No conozco ningún programa que proporcione específicamente un cursor
  de hilos. Puff, mencionado en la sección anterior, proporciona una
  caja destelleante alrededor del cursor que puede hacer
  considerablemente más fácil su localización.

  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. Conviértalos a formato XBM y ejecute

               xsetroot -cursor ficherocursor.xbm cursor-negro.xbm

  Realmente, si conoce el uso de máscaras, 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 aplicación
  actual.  Para ampliar la información, véase el X Big Cursor mini-
  HOWTO, de Joerg Schneider schneid@ira.uke.de.

  3.1.3.  Audio

  Mientras el usuario tenga la capacidad de oír, la entrada de audio
  puede ser muy útil para crear un entorno más amigable y comunicativo.
  Para una persona con mala visión, las indicaciones de audio pueden
  ayudar a localizar el cursor (véase ``UnWindows''). Para un modo
  consola utilizando Emacspeak (véase ``Emacspeak''), los iconos de
  audio disponibles proporcionarán características muy útiles.

  La configuración del audio en Linux está explicada en el Sonido-Como
  (véase ``Documentación de Linux''). Una vez que el sonido está
  configurado, se pueden producir salidas de audio con el comando play
  incluido en la mayoría de las versiones de Linux.  Esta es la forma de
  utilizar mi versión de UnWindows.

  3.1.4.  Texto de gran tamaño

  Imprimir en gran tamaño en Linux es bastante fácil. Hay varias
  técnicas.

  3.1.4.1.  LaTeX / TeX

  LaTeX es un sistema de preparación de documentos extremadamente
  potente.  Puede ser utilizado para imprimir documentos de casi
  cualquier naturaleza en tamaño 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 más detalles, véase el libro de LaTeX, disponible en cualquier
  librería. Hay también un gran número de introducciones disponibles en
  Internet.

  3.1.5.  Impresión de texto grande

  Casi todas las impresiones en Linux utilizan postscript, y Linux puede
  dirigir casi cualquier impresora usándolo. Yo imprimo el material de
  enseñanza 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
  además tenga dificultades auditivas, la voz no es siempre útil, así
  que el Braille siempre va a ser importante.

  Si pudiese elegir, ¿qué elegiría? Este es un buen tema de debate. El
  lenguaje (la voz) es rápido 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 serán necesarios
  auriculares para trabajar sin molestar a otros y evitar ser escuchado
  (no disponible para todos los programas de síntesis de voz).

  El Braille es mejor para aplicaciones en las que una disposición
  precisa es importante (por ejemplo en hojas de cálculo).  También
  puede ser algo más conveniente si se quiere comprobar el principio de
  una frase cuando se llega al final. El Braille es, sin embargo, mucho
  más caro y lento para leer texto.  Obviamente, cuanto más use el
  Braille, más rápido lo hará. El grado II de Braille es difícil de
  aprender, pero casi merece la pena debido a su mayor rapidez. Esto
  significa que si no utiliza Braille durante algún 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 líneas de
  Braille. Teniendo en cuenta que un terminal tiene 80 caracteres de
  ancho y normalmente 40 de largo, están 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. Véase la sección ``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
  automáticamente. 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 están dispuestos a
  soportar más si la información 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 petición.  Véase la sección ``Terminales Braille dirigidos
  por software''.

  El otro paquete que conozco es el Braille Enhanced Screen.  Está
  diseñado para trabajar en sistemas UNIX así como Linux. Esto debería
  permitir al usuario acceder a una terminal Braille con muchas
  características útiles, como la capacidad de ejecutar diferentes
  programas en distintas 'terminales virtuales' al mismo tiempo.

  3.2.2.  Síntesis de voz

  La síntesis 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 síntesis de voz de
  libre distribución para Linux no son, como se sabe, lo suficientemente
  buenas como para usarlas como único medio de salida.

  La alternativa es la síntesis 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 características
  similares, como email. Aunque con programas que no entiende actúa
  solamente como un lector de texto plano (similar al de IBM para PC),
  con los que si entiende puede proporcionar un control mucho más
  sofisticado. Véase la sección ``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 podría cambiar si alguien con
  conocimientos básicos para programar el núcleo quisiera.  Esta forma
  de arranque implica que es imposible para la mayoría de los
  dispositivos Braille obtener información 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 podrán leer los
  mensajes en la pantalla. La mayoría del software y el hardware todavía
  tendrán que esperar a que el sistema esté completamente listo. Esto
  hace que el hecho de administrar un sistema Linux sea difícil, pero no
  imposible, para una persona con discapacidades visuales. Sin embargo,
  una vez que el sistema está listo, se puede hacer un desplazamiento
  hacia atrás pulsando (en el dispositivo de teclado por defecto)

               SHIFT+RePag

  Hay un sistema Braille que puede utilizar la consola directamente,
  llamado Braillex. Está diseñado para leer directamente de la memoria
  de pantalla. Desafortunadamente el desplazamiento normal del terminal
  se tropieza con esto. Si está usando un núcleo superior al 1.3.75,
  sencillamente teclee

               linux no-scroll

  en el prompt de LILO o configure LILO para que lo haga
  automáticamente. Si tiene una versión anterior de Linux, vaya a la
  sección ``''.

  Otra cosa útil que se puede hacer es utilizar sonidos para indicar
  cuándo 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 distribución para Linux llamado xocr. En principio, si fuese
  suficientemente bueno, este programa permitiría a los discapacitados
  visuales leer libros normales hasta cierto punto (la precisión del OCR
  nunca es suficiente...). Sin embargo, de acuerdo con la documentación,
  este programa necesita una preparación para reconocer la fuente en
  particular que se va a utilizar y yo no tengo ni idea de cómo va este
  programa ya que no tengo el hardware para probarlo.

  3.3.  Empezando con Linux

  Empezar a aprender Linux puede parecer difícil 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
     también puede ir aprendiendo sobre la marcha. Vea más abajo.

  ·  Si proviene de un entorno MS-DOS, lea el DOS2Linux Mini-HOWTO
     (véase ``Documentos HOWTO de Linux'').

  El Emacspeak HOWTO de Jim Van Zandt jrv@vanzandt.mv.com cubre esto con
  más detalle (véase ``Documentos HOWTO de Linux'').

  Si planea usar Emacspeak, debería saber que Emacspeak no le enseña
  Emacs, así que sería 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
  ejecutándose, proporciona una ágil interfaz ante el rico conjunto de
  documentación en línea incluyendo las 'info pages', y hace más fácil
  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 día' - T.V. Raman

  Otra opinión 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 debería ser la plataforma perfecta desde la que manejar un
  dispositivo Braille. Hay varias herramientas de formateo destinadas
  específicamente para un dispositivo de anchura fija. Un dispositivo
  Braille puede ser conectado al puerto serie utilizando los mecanismos
  de impresión estándar de Linux. Para más información, véase el Linux
  Printing HOWTO.

  Hay un paquete de software de libre distribución de la 'National
  Federation for the Blind' americana disponible para Linux que actúa
  como un traductor multilingue de grado II, llamado NFBtrans. Véase la
  sección ``NFBtrans''.

  4.  Problemas de oído

  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 algún programa
  les envía un código especial. Normalmente esto se usa para conseguir
  la atención del usuario y para poco más.  La mayoría 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 configuración pulsando el botón
        central del ratón mientras se tiene pulsada la tecla CTRL, o
        poniendo una línea con

     (sin las comillas, claro!) en el fichero .Xdefaults del directorio
     propio.

     la consola
        la consola es ligeramente más compleja. Por favor vea el Visual
        Bell Mini HOWTO de Alessandro Rubini, disponible con el resto de
        documentación Linux (véase ``Documentación de Linux'').
        Generalmente la configuración se tiene que hacer para cada
        aplicación, o si no, cambiando el mismo núcleo de Linux.

  5.  Problemas físicos

  Muchos de estos problemas tienen que considerarse individualmente. Las
  necesidades del individuo, las formas en que puede generar una entrada
  y otros factores varían 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 ratón/puntero

  La movilidad limitada puede hacer difícil usar un ratón.  Para algunas
  personas, un dispositivo trackball puede ser una buena solución, 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 debería ser un problema (véase la sección ``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 diseñado para
  el uso sin puntero y la mayoría de las cosas pueden hacerse así. Yo
  mismo lo hago así cuando pierdo mi ratón (¡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 ratón persistentes, que se supone que están presentes en la versión
  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 adaptación como punteros
  bucales. Esto requiere una configuración especial del teclado.  Véase
  la sección ``Configurar especialmente el teclado''.

  5.1.1.1.  Otros dispositivos de entrada (sólo sistema X Window)

  Para algunos, el teclado no se puede usar en absoluto, y solo están
  disponibles dipositivos señaladores. En este caso, no hay posible
  solución para la consola Linux, y deberán 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 señalador
  en caracteres (todavía no lo he visto) entonces cualquier dispositivo
  señalador podría ser usado sin un teclado.

  Hay un cierto número de dispositivos que merecen ser considerados para
  tal entrada, como pantallas táctiles, o punteros oculares.  Muchos de
  estos necesitarán que se escriba un manejador de dispositivo para
  ellos. Esto no es terriblemente difícil si la documentación necesaria
  está disponible, pero requiere a alguien con buen nivel de
  programación en C. Véase la Linux Kernel Hacker's Guide y otro
  material de referencia sobre el núcleo para más información. Una vez
  listo, debería ser posible utilizar estos dispositivos como un ratón
  normal.

  5.1.2.  Controlar hardware físico desde Linux

  El principal grupo de interés es el Linux Lab Project.  Generalmente,
  la mayor parte del hardware GPIB (un interfaz estándar para el
  equipamiento científico, también conocido como el bus IEEE)  puede ser
  controlado. Esto da mucho potencial a proyectos de accesibilidad muy
  ambiciosos. Por lo que yo sé, todavía 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 más interesante, aunque no está disponible para
  uso comercial sin un acuerdo previo.  Véase el Linux Software Map para
  más detalles (véase ``Documentoación de Linux'').

  5.3.  Configurar especialmente el teclado

  5.3.1.  Sistema X Window

  El último servidor X que viene con Linux incluye numerosas
  características que pueden ayudar en la entrada de datos. Estas
  características incluyen StickKeys, MouseKeys, RepeatKeys, BounceKeys,
  Slowkeys y TimeOut. Estas permiten la adaptación del teclado a las
  necesidades del usuario.  Se proporcionan como parte de la extensión
  XKB en versiones de X superiores a la 6.1. Para averiguar su versión y
  comprobar si tiene la extensión instalada, puede probar

               xdpyinfo -queryExtensions

  5.3.2.  Librarse de la repetición automática

  Para quitar la repetición 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 sería en los ficheros de login, .profile o

               setterm -repeat off

  Para librarse de la repetición automática 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 más 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
  número de comandos con el menor número de teclas pulsadas.  Para
  usuarios de la interfaz de comandos (bash/tcsh), se debería mirar las
  páginas 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 después).  Para información 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 característica que permite a alguien
  que solo pueda pulsar un botón 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 información sobre
  cómo preparar esto, véase el Linux Keyboard HOWTO, especialmente la
  sección 'Solo puedo usar un dedo para escribir' (sección 15 en la
  versión que tengo yo).  - Información por Toby Reed.

  6.  Temas generales de programación

  La mayoría de los puntos que merecen tener en cuenta son los mismos
  cuando se escribe software diseñado para ser de utilidad para la
  accesibilidad que cuando se intenta seguir un buen diseño.

  6.1.  Intente proporcionar múltiples interfaces

  Si su software es utilizable sólo mediante una interfaz gráfica, puede
  llegar a ser muy difícil usarlo por alguien que no ve. Si es
  utilizable sólo mediante línea de comando, alguien que no pueda
  teclear tendrá muchos problemas.

  Proporcione atajos de teclado así como el uso del puntero X normal
  (generalmente el ratón). Entonces puede estar casi seguro de que los
  usuarios podrán generar pulsaciones de teclado de un modo u otro.

  6.2.  Haga el software configurable.

  Si es sencillo cambiar las fuentes, entonces las personas podrán
  cambiarlas a una que puedan leer. Si se puede cambiar el esquema de
  colores, será más probable que la gente que tenga problemas para
  distinguirlos pueda usarlo. Si se pueden cambiar las fuentes
  fácilmente, entonces los personas con discapacidades visuales
  encontrarán su software más útil.

  6.3.  Pruebe el software con los usuarios

  Si un cierto número de personas cada una con diferentes tipos de
  problemas de accesibilidad prueban su software, será más fácil señalar
  fallos específicos. Obviamente, esto no será práctico para todo el
  mundo, pero siempre puede valer como indicación.

  6.4.  Diferencie la salida

  En la medida de lo posible, haga que cada parte del programa sea
  claramente identificable. Dé un formato específico a los mensajes de
  error para poder identificarlos. Bajo X, asegúrese 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 podría. Esto podría posibilitarle una
  liberación sobre las dependencias económicas 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 compañía compre los
  derechos) como al rechazo de la gente para la que pudiera trabajar
  (algunas compañías 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 protección frente a un abuso comercial
  mediante licencias más específicas como la Licencia Pública de GNU, o
  la Licencia Artística.

  7.  Otras informaciones

  7.1.  Documentación de Linux

  La documentación de Linux es necesaria para su uso, y la mayoría de
  los documentos aquí mencionados deberían estar incluidos en las
  versiones recientes de Linux, en cualquier distribución.

  Si quiere conseguir la documentación de Internet, hay varios lugares.
  Estos deberían tener un reflejo en la mayoría de los lugares de
  descarga FTP más 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 explicación 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 réplica.
  7.1.2.  El Meta PUF (preguntas de  uso frecuente) de Linux

  Lista de otras fuentes de información, mucho más completa que esta. El
  Meta PUF está disponible en
  ftp://sunsite.unc.edu/docs/howto/translations/spanish/MetaFaq-Como y
  en sus servidores réplica.

  7.1.3.  El mapa de software para Linux (Linux software map, LSM)

  Es la lista de software disponible para Linux en Internet. La mayoría
  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 búsquedas sobre él.  También está disponible en forma de
  fichero de texto en todos los demás lugares FTP mencionados en
  ``Documentación de Linux''.

  7.1.4.  Los COMOs (HOWTOs) de Linux

  Los COMOs son la principal documentación de Linux. Este Accesibilidad-
  COMO es un ejemplo.

  El servidor web del Proyecto de Documentación de Linux (Linux
  Documentation Project, LDP) que genera esta información es
  http://sunsite.unc.edu/mdw/linux.html. Hay además algunas compañías
  que los proporcionan en forma de libro. Contacte con un distribuidor
  local de Linux para más detalles.

  Los COMOs de Linux estarán en el directorio HOWTO en cualquiera de los
  lugares FTP mencionados en la sección ``Documentación de Linux''.

  7.1.5.  El PUF de Linux

  Es una lista de 'preguntas de uso frecuente' con sus respuestas, que
  debería resolver las dudas más 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 ``Documentación de Linux''.

  7.2.  Listas de correo electrónico

  Hay dos listas específicas de Linux, que yo conozca, cubriendo estos
  temas. Hay algunas más que merece la pena consultar, que cubren el uso
  del ordenador más generalmente. Ocasionalmente, si se envía un mensaje
  a estas listas, ocurrirá que yo lo lea y pueda incluir más información
  en el Accesibilidad-COMO, así que no es necesario que me envíe otra
  copia a mí, a menos que sea urgente.

  7.2.1.  La lista linux-access  (inglés)

  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 estén de algún modo
  discapacitados o bien quieran ayudar a hacer Linux más accesible'.
  Para subscribirse, envíe 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  (inglés)

  Es una lista de correo que cubre el uso de Linux por usuarios
  invidentes.  Hay una importante recopilación de software importante y
  útil en los archivos de la lista. Para subscribirse, envíe 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 rápidamente, debido a su propia naturaleza. Si está
  leyendo este documento en una versión antigua, algunos de estos
  lugares estarán desfasados. La versión original que mantengo en la web
  no debería pasarse más de un mes o dos sin actualizar, así que
  referénciela, por favor.

     Documentación 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, descárguelos de uno de los
        principales lugares FTP de Linux. Si se produce un exceso de
        tráfico, tendré que quitar estas páginas y cambiarlas a algún
        otro sitio.

     El proyecto de documentación y desarrollo BLINUX
        http://leb.net/blinux/ 'El propósito del proyecto de
        documentación y desarrollo BLINUX es servir de catalizador que
        avive y acelere el desarrollo del software y la documentación
        que permitirá al usuario invidente utilizar su propia estación
        de trabajo Linux'.

     Página web de Emacspeak
        http://cs.cornell.edu/home/raman/emacspeak/emacspeak.html

     Página no oficial de BRLTTY
        http://www.sf.co.kr/t.linux/new/brltty.html

     Yahoo (uno de los mayores catálogos de Internet)
        http://www.yahoo.com/Society_and_Culture/Disabilities/Adaptive_Technology/

     El proyecto Linux Lab
        http://www.fu-berlin.de/~clausi/
     Las páginas 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 señala 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 versión original del BRLTTY.
  Este soporte se ha interrumpido. Si tiene uno y quiere utilizarlo con
  Linux podría ser posible usando dicha versión 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 electrónico: 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 técnico: +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 sección están sacadas directamente del mapa de
  software para Linux (LSM) que se puede encontrar en cualquier servidor
  del proyecto de documentación Linux y que lista la práctica 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 además incluye características
  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, añadiendo información
  nueva a una carta. Emacs está, de hecho, más allá de cualquier editor
  de texto normal, y por eso es mucho más ú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 razón de que Emacs sea el mejor entorno para Emacspeak es que puede
  entender la organización de la pantalla e interpretar inteligentemente
  el significado de, por ejemplo, un calendario, que de otra forma no
  sería más que una embrollada matriz de números. El creador del paquete
  se las arregla para manejar completamente su propia máquina Linux,
  llevando toda la administración desde Emacs. También lo usa para
  controlar una amplia variedad de software y dispositivos directamente
  desde su máquina.

  Emacspeak se incluye en la distribución Debian de Linux, y aparece
  como contribución en la Slackware. Esto significa que está disponible
  en varias de las distribuciones de Linux con formato CDROM. A la fecha
  de publicación de este documento la versión debería ser la 5 o
  superior, pero en el momento de escribir estas líneas, solo dispongo
  de la versión 4 para examinar.

  ·  Título: Emacspeak - interfaz de salida de voz para Emacs

  ·  Versión: 4.0

  ·  Fecha: 30 Mayo 96

  ·  Descripción: 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 opción 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 información hablada sobre cualquier
     cosa que se haga.  Su capacidad dependerá de cómo 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 (versión 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 (véase ``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. Envíeles cualquier comentario.

  Los autores están dispuestos a añadir soporte para más dispositivos,
  así que si usted posee uno, piense en ponerse en contacto con ellos.
  Seguramente necesitarán información sobre la programación del
  dispositivo, así que si puede contactar con el fabricante de su
  dispositivo y conseguirla, será más fácil que le puedan ayudar.

  Una breve lista de características (de su fichero LEAME) que le
  interesará

  1. Completa implementación de las facilidades estándar de revisión de
     pantalla.

  2. Una amplia gama de características añadidas opcionales, que
     incluyen cursor parpadeante y letras de imprenta, congelación de la
     pantalla para una lectura tranquila, enlaces de hipertexto,
     capacidad de localización del texto marcado, etc.

  3. Guía inteligente del cursor. Esto permite un fácil movimiento del
     ratón en editores de texto, etc. sin mover las manos de la pantalla
     Braille.

  4. Función 'Cortar y Pegar', particularmente útil para copiar nombres
     de fichero largos, comandos complejos, ...

  5. Ayuda en línea.

  6. Soporte de múltiples códigos Braille.

  7. Diseño modular, que permite una relativa facilidad para la adición
     de manejadores de otros dispositivos Braille, o incluso portarlo a
     otras plataformas tipo Unix.

  ·  Título: BRLTTY - Software de acceso a un sistema UNIX para personas
     invidentes mediante un terminal Braille software

  ·  Versión: 1.0.2, 17 Septiembre 96

  ·  Fecha: 17 Septiembre 96

  ·  Descripción: BRLTTY es un demonio que proporciona acceso a una
     consola UNIX para una persona invidente mediante un terminal
     Braille software (véase el fichero LEAME para una explicación
     completa). BRLTTY sólo 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 (núcleo 1.1.92 o superior) sobre un PC o un DEC
     Alpha.

     No soporta X/gráficos.

     Dispositivos Braille soportados (sólo 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 versión de firmware??).

  ·  Licencia: GNU Public License

  8.3.  screen

  screen es una parte estándar 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 síntesis 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 síntesis de voz de libre
  distribución sería 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 encantaría 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 configuración 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 sección que se está leyendo. Como alternativa, se puede mover una
  pequeña caja por la pantalla, aumentando su contenido y permitiendole
  buscar la zona que desea ver. xzoom también está disponible en formato
  rpm, en los lugares de descarga de Red Hat, haciendo muy fácil su
  intalación.

  ·  Título: xzoom

  ·  Versión: 0.1

  ·  Fecha: 30 Marzo 96

  ·  Descripción: xzoom puede aumentar (un número entero de veces),
     rotar (un múltiplo 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. Sólo soporta modos de 8 bits. Probado
     únicamente en Linux 1.3.* con el manejador XSVGA 3.1.2. Necesita la
     extensión XSHM.

  ·  Licencia: libre distribución.

  8.7.  NFBtrans

  NFBTrans es un programa de traducción Braille multigrado distribuido
  por la 'National Federation for the Blind' en los E.E.U.U. Es de libre
  distribución, con la esperanza de que alguien lo mejore. Los idiomas
  soportados son inglés americano, inglés, español, ruso, esperanto,
  alemán, hebreo bíblico (!) y griego clásico, pero se pueden añadir
  otros solamente con añadir una tabla de traducción.  También soporta
  temas de ordenadores y matemáticas. 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/

  Después de descargarlo, será necesario compilarlo.

  8.7.1.  Compilación de NFBTrans en Linux

  He enviado este parche al responsable del NFBTrans y dice que lo ha
  incluido, así que si consigue una versión 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

  Después 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 debería 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 configuración por defecto, el paquete no funcionará en Linux
  porque utiliza algunas características de las máquinas Sun. Sin
  embargo, algunas utilidades funcionan y yo me las he arreglado para
  portar la mayoría de las demás, así que este paquete podría ser
  interesante para algunos. Mi versión va a ser incorporada al original,
  o si no, estará disponible en los archivos BLINUX (véase ``Referencias
  en la WWW'').  La única utilidad que todavía no funciona es la
  utilidad de configuración.

  En mi versión 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
  podría hacer esto cuando el puntero llegue al borde superior izquierdo
  de la pantalla.

  8.8.1.  dynamag

  dynamag es una lupa de pantalla. Véase la sección sobre lupas de
  pantalla (``Aumento del tamaño de la pantalla''). Este programa me
  funcionó en la distribución normal.

  8.8.2.  coloreyes

  coloreyes facilita encontrar el puntero del ratón. Consiste en un par
  de ojos que miran siempre en la dirección del puntero (como xeyes).
  Esto no funciona en la distribución normal, pero parece que la versión
  de prueba sí que lo hace.

  8.8.3.  border

  border es un programa que detecta cuándo el puntero del ratón ha
  llegado al borde de la pantalla y produce un sonido diferente
  dependiendo del borde del que se trate. La versión disponible utiliza
  un sistema de sonido específico 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
  posición de todas las ventanas (programas) mostrados en la pantalla X.
  un-twm es una versión 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 versión distribuida no funciona en Linux
  porque, como border, se basa en las capacidades de audio de Sun. Por
  supuesto, yo tengo una versión 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 visión normal pueda hacer en
  la consola, incluida la instalación. Sin embargo tiene un problema con
  el desplazamiento del núcleo normal de Linux, por lo que hace falta
  parchearlo. Véase ``Parchear el núcleo''.

  9.1.1.  Braillex

  Braillex es un terminal diseñado 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 debería 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 sección ``Parchear el núcleo''. Una vez hecho, el Braillex se
  convierte en una de las mejores formas de usar Linux, ya que permite
  acceder a toda la información que una persona sin problemas de visión
  pudiera leer. Otras terminales no comienzan a funcionar hasta que el
  sistema está completamente arrancado.

  El Braillex está disponible en dos versiones según la disposición de
  los caracteres, 80x1 ó 40x2), y hay un modelo, el IB 2-D, que tiene
  además una barra vertical para mostrar información sobre todas las
  líneas de la pantalla (usando 4 puntos programables por línea).

  ·  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 línea. Cada carácter tiene 8 puntos que se combinan
  (arriba/abajo) para representar una letra. Por defecto, Brailloterm
  muestra la línea en la que se encuentra el cursor.  Puedo usar
  funciones de Brailloterm para ver cualquier línea de la pantalla.' -
  Jose Vilmar Estacio deSouza jvilmar@embratel.net.br

  Jose continúa diciendo que el terminal también 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 núcleo
  para que funcione. Véase la sección ``Parchear el núcleo''.

  ·  Precio: unos 23.000 marcos alemanes / 15.000 dólares USA (un par de
     millones de pesetas)

  ·  Fabricante: Kommunikations-Technik Stolper GmbH

  ·  Distribuidores: ????

  9.1.3.  Parchear el núcleo para Braillex  y Brailloterm

  Posiblemente esto se pueda aplicar a otros terminales que lean
  directamente la memoria de pantalla para funcionar bajo MS-DOS.
  Envíeme un mensaje para confirmar cualquier terminal que le funcione.
  Esto no es aplicable y provocará la pérdida de algunas características
  para aquellos terminales manejados por software BRLTTY.

  He oído que este parche se aplica a todos los núcleos versión 1.2.x.
  Debería funcionar también en núcleos 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 versión 1.3.68 al menos).

  Desde la versión 1.3.75, el parche ya no hace falta porque el núcleo
  puede configurarse para que no haya desplazamiento con 'linux no-
  scroll' como parámetro del LILO. Véase el Boot Prompt HOWTO para más
  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 líneas de código anteriores en un fichero de texto (por
     ejemplo, patch-file)
  2. cambie al directorio drivers/char de las fuentes de su núcleo

  3. ejecute

               patch < patch-file

  4. compile su núcleo como de costumbre.

  Después de aplicar estos parches, debería 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
  línea de la función scrup, que más o menos estará por la línea 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 núcleo más moderno con el desplazamiento
  completamente deshabilitado (en lugar de la solución de los
  parámetros), utilice el siguiente parche. Esto no funciona para
  núcleos 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 operación de estos terminales están 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 envíe la salida. Por el
  momento hay dos conocidos programas para Linux. BRLTTY (véase la
  sección ``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 estándar 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. Sólo se ha confirmado que
  funcione la ABT340 por el momento. Por favor, envíe información 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 información necesaria para ello.

  9.2.3.1.  Powerbraille

  Hay 3 modelos, el 40, el 65 y el 80. Sólo 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
  también 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

  Más portable que un terminal. Podría, sin embargo, usarse con el
  BRLTTY versión 0.22 (pero no con versiones más nuevas) como si se
  tratase de un terminal Braille normal.  Desafortunanadamente, muchas
  de las características del CombiBraille no se pueden usar con Braille
  Lite. Esto significa que debería evitarse su uso en la medida de lo
  posible.

  ·  Precio: 3.395 dólares (unas  600.000 pesetas)

  ·  Fabricante: Blazie Engineering

  9.3.  Herramientas de síntesis de voz

  Normalmente se conectan al puerto serie de un PC. Entre sus cualidades
  están:

  ·  Etiquetas Braille en los componentes

  ·  Varias voces para permitir que que cada parte de un documento sea
     fácilmente distinguible

  ·  Uso con auriculares (no disponible en todos los modelos)

  El mayor problema es la calidad del lenguaje. Esto es mucho más
  importante para alguien que usa la síntesis de voz como su fuente
  principal de información que para alguien que únicamente está
  jugueteando. Por esta razón, T.V. Raman únicamente recomienda DECTalk.
  Sería bueno disponer de alternativas aceptables.

  9.3.1.  DECTalk Express

  Es un dispositivo hardware de síntesis 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 dólares (millón y medio largo de pesetas)

  ·  Fabricante: Digital Equipment Corporation

  ·  Distribuidores: Varios. Me gustaría conocer detalles únicamente de
     aquellos que tengan soporte específico para Linux y con
     distribución internacional, por favor. Si no es el caso, póngase en
     contacto con organizaciones locales, la misma empresa Digital o las
     páginas 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 dirección
  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 interés en la utilización 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 información
  encontrada en Internet, en buscadores como Yahoo y Alta Vista de
  Digital.  La mayoría de la información referente a paquetes de
  software ha sido hallada de la misma forma. También se ha recopilado
  información de los folletos del Royal National Institute for the
  Blind. T.V. Raman, autor del Emacspeak ha contribuido con comentarios,
  información y textos, además de ponerme en contacto con personas que
  conoce en Internet.

  Kenneth Albanowski kjahds@kjhads.com ha proporcionado el parche
  necesario para el Brailloterm e información sobre él.

  Roland Dyroff de S.u.S.E. GmbH (creadores y sistribuidores de S.u.S.E
  Linux (ingés/alemán)) ha examinado KPS Stolper GmbH a petición mía y
  ha conseguido detalles de hardware e información sobre el Brailloterm.

  Las mayores y más 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
  número de correcciones así como información suplementaria sobre
  algunos temas.

  Los participantes en las listas blinux y linux-access han contribuido
  en este documento proporcionándome información.

  Mark E. Novak del centro Trace R&D http://trace.wisc.edu  me guió
  hacia numerosos paquetes de software e información que yo no conocía.
  Además me dió ideas sobre la estructura del documento que yo he
  incorporado parcialmente y sobre lo que debería haber hecho más.

  También han contribuido Nicolas Pitre y Stephane Doyon.

  Numerosas personas han contribuido con comentarios en información.
  Las contribuciones específicas están referenciadas en el documento.

  Esta versión fue especialmente creada para el libro de RedHat Dr.
  Linux, ya que yo y otros autores del LDP fuimos avisados de su
  inminente publicación. Esto es de agradecer, debido a que información
  errónea o desfasada dura mucho más en un libro que en Internet.

  Sin duda, usted también ha contribuido y no le he mencionado. No se
  preocupe, fue un accidente. Lo siento. Avíseme y le añadiré a la
  siguiente versión.

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Bash Prompt COMO
  Giles Orr, giles@interlog.com
  Traducido por Iosu Santurtún, iosu@bigfoot.com
  v0.60, 7 de Enero de 1999, Traducción 12 de Junio de 1999

  En este documento se comenta la creación y el manejo de prompts de
  terminales en modo texto y X, incluyendo secuencias estándar de escape
  que proporcionan el nombre de usuario, el directorio actual de tra­
  bajo, la hora, etc. Se hacen sugerencias más complejas sobre cómo mod­
  ificar las barras de título de las terminales X, cómo usar funciones
  externas para proporcionar información en el prompt, y cómo usar col­
  ores ANSI.
  ______________________________________________________________________

  Índice general



















































  1. Introducción y «administrivia»

     1.1 Requerimientos
     1.2 Cómo usar este documento
     1.3 Traducciones
     1.4 Problemas
     1.5 Comentarios y sugerencias
     1.6 Créditos
     1.7 Copyright y demás

  2. (TT

     2.1 ¿Qué es
     2.2 ¿Qué puede aportar la manipulación 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 título 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 dinámico con color según 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 inútil

  11. Anexo: El INSFLUG



  ______________________________________________________________________



  1.  Introducción y «administrivia»

  1.1.  Requerimientos


  Será necesario el bash. La versión por defecto de la práctica
  totalidad de distribuciones LiNUX es la 1.14.7, que es una versión
  bien conocida y de confianza. Actualmente se encuentra disponible la
  versión 2.0 (incluso superiores): yo llevo usando la 2.0 algún tiempo,
  pero la mayoría del código aquí presentado debería funcionar bajo la
  1.14.7. Si conozco alguna incompatibilidad, lo mencionaré. Se puede
  comprobar la versión del bash mediante el comando echo $BASH_VERSION.
  En mi máquina responde 2.02.1(1)-release.

  La experiencia en programación shell puede venir bien, pero no es
  esencial: cuanto más se sepa, más complejos serán los prompts que se
  puedan crear. Presupongo un conocimiento básico de la programación
  shell y utilidades unix a lo largo de este tutorial. Sin embargo, mis
  propios niveles de programación shell son limitados, así que doy gran
  cantidad de ejemplos y explicaciones que pueden parecer innecesarias
  para el programador experimentado.


  1.2.  Cómo usar este documento



  Se incluyen muchos ejemplos y textos aclaratorios. Su utilidad variará
  según la persona de la que se trate. Esto ha crecido lo suficiente
  como para que una lectura completa pueda resultar difícil; se
  recomienda leer únicamente las secciones que se necesite, volviendo
  hacia atrás las veces que sea necesario.


  1.3.  Traducciones


  A fecha de 6 de Enero de 1999, existen traducciones al japonés (Akira
  Endo, akendo@t3.rim.or.jp) y alemán (Thomas Keil, thomas@h-
  preissler.de).  ¡Gracias a ambos! Las URL serán incluidas cuando estén
  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
  mayoría son detalles de poca importancia. Échele un vistazo únicamente
  si llega a algún punto conflictivo.


  ·   Algunas características de bash (tales como funciones matemáticas
     dentro de $(()), entre otras) son opciones en tiempo de
     compilación. Si está usando una distribución binaria, como la que
     viene en las distribuciones estándar de LiNUX, tales
     características deberían estar incluidas. Pero si está trabajando
     en otro sistema, merece la pena recordar esto si no funciona algo
     que debería hacerlo. Algunas notas acerca de esto en Learning the
     Bash Shell, págs 260-262

  ·  El manejador de terminal screen no siempre funciona con colores
     ANSI.  Desafortunadamente no soy un experto en screen. Mi versión
     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 estándar en terminales X. Esto no
     parece ser un problema en la consola.

  ·  Los ficheros Xdefaults pueden redefinir colores. Mire en
     ~/.Xdefaults las líneas 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 tubería no funciona con bash 2.02.

  ·  Las secuencias de escape ANSI de movimiento del cursor no están
     implementadas en todas las terminales X. Esto se comenta en su
     propia sección.

  ·

     Se pueden crear «pseudo-gráficos» bastante agradables utilizando
     una fuente VGA en lugar de las estándar 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 están utilizando.

  ·  Ha aparecido bash 2.02+ que incorpora nuevas características, y
     cambia algunos comportamientos.  Lo que funcionase bajo la versión
     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 más popular), no obstante, comuníqueme cualquier
  incompatibilidad que encuentre.

  La última versión de éste documento debería estar siempre disponible
  en
  http://www.interlog.com/~giles/bashprompt.html. Compruébelo y siéntase
  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 agradecería
  cualquier comentario sobre ello.



  1.6.  Créditos


  En la creación de este documento he tomado prestado mucho del proyecto
  BashPrompt, disponible en http://bash.current.nu.


  Otras fuentes han sido:


  ·  mini-COMO acerca del Título de las xterm de Ric Lister, disponible
     en
  ·  Prompts ANSI de Keebler, disponible en

  ·  Cómo 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

  También han sido de inmensa ayuda numerosas conversaciones y e-mails
  de Dan, un compañero del Georgia College & State University, cuyo
  conocimiento sobre unix sobrepasa el mío 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 edición, la segunda apareció en 1997).


  1.7.  Copyright y demás


  Este documento es copyright ©1998-1999 de Giles Orr. Se anima a su
  distribución, aunque no debería modificarse este documento (véase la
  sección ``Comentarios y Sugerencias'' para todo lo referente a ponerse
  en contacto conmigo:  he venido añadiendo los cambios sugeridos por
  los lectores desde hace mucho).  Póngase en contacto conmigo si está
  interesado en realizar una traducción, 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 estándar de línea de comandos en la
  mayoría de las máquinas LiNUX. Potencia la interactividad, soportando
  edición en línea de comando, capacidad de completar o recordar
  automáticamente un comando, etc. También soporta prompts configurables
  - la mayoría de la gente se da cuenta de esto, pero no saben hasta qué
  punto.


  2.2.  ¿Qué puede aportar la manipulación del prompt ?


  La mayoría 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 máquina en la que se está trabajando y alguna indicación
  acerca del directorio de trabajo actual. Toda esta información es
  útil, pero se puede ir mucho más allá: se puede mostrar todo tipo de
  información (número de «tty», hora, fecha, carga, número de usuarios,
  tiempo sin reiniciar ...) y el prompt puede usar colores ANSI, ya sea
  por razones puramente estéticas, o para remarcar cierta información.
  También se puede manipular la barra de título de una xterm para
  reflejar parte de esta información.


  2.3.  ¿Por qué molestarse ?


  Además de una apariencia bonita, en ocasiones es útil seguir la pista
  de cierta información del sistema. Una idea que sé que gusta a la
  gente es que es posible poner los prompts de diferentes máquinas en
  diferentes colores. Si se tienen varias terminales X abiertas en
  diferentes máquinas, o si se tiende a olvidar en qué máquina se está
  trabajando y se borran ficheros equivocados, encontrará en esta una
  buena forma de recordar en qué máquina 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 (También
  existen las cadenas PS3 y PS4. Estas nunca están a la vista del
  usuario medio (vea la página del manual sobre bash si está interesado
  en su propósito).

  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 sólo afecta a la
  sesión actual, y los cambios desaparecen cuando termina).  Si se desea
  hacer permanentes estos cambios, modifique su ~/.bashrc, y añada la
  nueva definición de PS1. Si tiene permisos de root, puede mirar en
  /etc/profile y modificar allí la línea 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 línea 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 más sencillo sería el de un sólo carácter, como:



              [giles@nikola giles]$ PS1=$
              $ls
              bin   mail
              $




  Esto demuestra la mejor manera de experimentar con prompts básicos:
  introduciéndolos en la línea de comando. Nótese que el texto
  introducido por el usuario aparece inmeditamente después del prompt.
  Yo prefiero usar



              $PS1="$ "
              $ ls
              bin   mail
              $




  que fuerza un espacio después del prompt, haciéndolo más 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 página 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 más 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 carácter de campana ASCII (07)

  ·  \d la fecha en formato día mes día (p.ej., mar may 26)


  ·  \e caracter de escape ASCII (033)

  ·  \h el nombre del host hasta el primer «.»

  ·  \H el nombre del la máquina completo (FQDN)


  ·  \n caracter de nueva línea

  ·  \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 versión de bash (p.ej., 2.0)

  ·  \V la versión del paquete del bash, versión + patch-level (p.ej.,
     2.00.0)

  ·  \w el directorio actual de trabajo

  ·  \W el nombre base del directorio actual de trabajo

  ·  \! el número del comando actual en el histórico

  ·  # el número de comando del comando actual

  ·  \$ si el UID efectivo es 0, un #; en otro caso, $

  ·  \nnn el caracter correspondiente al número 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 habíamos 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 mayoría de las
  distribuciones LiNUX. Pero yo quería 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, según la persona o distribución en
  distintos lugares. Los más comunes son /etc/profile, /etc/bashrc,
  ~/.bash_profile, y ~/.bashrc.  Johan Kullstam, johan19@idt.net
  escribe:


  La cadena PS1 debería 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 página
  del manual de bash indica que la presencia o ausencia de PS1 es una
  buena manera de saber si uno está en una sesión 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
  vía startx, la variable PS1 se elimina en el proceso, dejándole con el
  prompt por defecto.

   Una solución es lanzar las xterm y las rxvt con la opción -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 definición de PS1 en .bashrc. Este fichero
  se lee cada vez que se inicia bash y es donde deberían aparecer las
  cosas interactivas (p.ej. PS1)

   Por lo tanto se llega a la conclusión de que PS1= ...(blah)...
  debería 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á después)
  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.  Después he usado date +%H%M para mostrar la hora en un
  formato que me gusta más. Pero aparece en una línea 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 método
  mostrado a continuación resulta en superposición 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 línea final, permitiendo que el prompt aparezca en una sola
  línea. Al final, uso el comando unset para eliminar la variable de
  entorno PROMPT_COMMAND.

  Nótese que uso la convención $(<comando>) para la sustitución de
  comandos, es decir



              $(date +%H%M)




  significa «sustituye la salida de date +%H%M aquí».  Esto funciona en
  bash 2.0+. En alguna versión 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
  convención a lo largo de este documento.  Si utiliza una versión
  anterior de bash, normalmente podrá sustituir los $() por las
  comillas. Si la sustitución 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


  También 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. Además será preferible usar un
  comando rápido ya que se va a ejecutar cada vez que el prompt aparezca
  en pantalla, y retrasa la aparición 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 dólar de
  la sustitución 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 significaría que mostraría siempre la
  misma hora, sin importar cuanto tiempo se ha usado el prompt. La
  contrabarra protege los contenidos de $() de la interpretación
  inmediata del shell, por lo que date es llamado cada vez que se genera
  un prompt.

  LiNUX incluye muchas utilidades de pequeño tamaño como date, grep o wc
  que permiten la manipulación de datos. Si se encuentra en la situación
  de crear una combinación compleja de estos programas dentro del
  prompt, podría ser más fácil 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 línea de prompt PS1, y es una
  buena idea evitarlo creando scripts.

  Un ejemplo de un pequeño shell script usado dentro de un prompt es el
  siguiente:




         #!/bin/bash
         #     lsbytesum - suma del número 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 más eficiente, pero
  desafortunadamente, la explicación de funciones en detalle va más allá
  de este documento), o como scripts en mi directorio /bin, que se
  encuentra en mi variable PATH. Utilizándolo 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 máquina, la hora y el directorio actual en la mayoría de mis
  prompts. Con la excepción de la hora, son cosas muy normales de
  encontrar en un prompt, y la hora es posiblemente la adición más
  común. 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 mínimo 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 tamaño de éste drásticamente
  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 histórico de comandos de forma intensiva (cosa que los
  adictos al bash no solemos hacer), así que la primera cosa en el
  prompt es el número del histórico. 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/tubería (nótese que se
  muestra inútil para cualquier comando que se ejecuta dentro del
  prompt; se puede solucionar capturándolo en una variable). Finalmente,
  «\$» es un símbolo de dólar 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 después 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 habría usado sed o tr - no porque sean mejor, sino porque me
  resultan más familiares. Probablemente existan más formas.  Torben
  además rodea sus cadenas PS1 con comillas simples. lo que evita que el
  bash interprete inmediatamente las contrabarras, así no tiene que
  escaparlas como yo había dicho.

  NOTA: existe un bug conocido en bash 2.02 que provoca que el comando
  jobs no retorne nada a una tubería. 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 código en el entorno es
  aterradora, ya que el entorno del DOS era pequeño, y no creció bien
  exactamente.  Posiblemente haya límites prácticos 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 están
  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 función de shell (teniendo en cuenta
  que no pueda expresarse de manera sencilla como un alias). Si la gente
  se preocupa por la memoria no deberían estar usando bash. bash es uno
  de los programas más grandes que ejecuto en mi máquina LiNUX (aparte
  de Oracle).  Ejecute top algún 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 día 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 preocupación
  de desbordarlo.

  Me arriesgo a la censura de los gurús de unix cuando digo esto (por el
  delito de supersimplificación), pero las funciones son básicamente
  pequeños shell scripts que se cargan en el entorno con el propósito de
  una mayor eficiencia. Citando a Dan de nuevo: las funciones shell son
  lo más eficiente. El procedimiento es similar a un source de un shell
  script pero con el ahorro de las operaciones entrada/salida, ya que la
  función se encuentra ya en memoria. Las funciones shell se cargan
  típicamente del .bashrc o .bash_profile dependiendo de si se las
  quiere en el shell inicial o en los sucesivos subshells también.

  Compárese esto con la ejecución 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 cómo ejecutarlo, en el caso de un shell script debe
  arrancarse un shell con el nombre del script como argumento. Comparado
  con una función shell, cualquier cosa aparte de la ejecución de las
  sentencias, puede considerarse una sobrecarga innecesaria.



  4.  Manipulaciones de la barra de título 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 colocación errónea del cursor en el
  código de edición de línea, ya que no conoce el tamaño real del
  prompt.  Las secuencias de escape además deben ir precedidas de \033[
  en bash anteriores a la versión 2, o por \033[ o \[e en versiones
  posteriores.

  Si se intenta cambiar la barra de título 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 función que puede ser añadida al ~/.bashrc. Entonces se
  podrá invocar a la función mediante su nombre. La función, como la
  cadena PS1, se almacena en el entorno. Una vez que la función ha dado
  valor a la cadena PS1, se puede eliminar la función 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 comtinuación
  (contrabarras, \)  en la definición del prompt, para permitir
  continuarlo a lo largo de varias líneas. Esto mejora la legibilidad,
  haciendo más fácil modificarlo o depurarlo.

  Lo he definido como una función 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 más complejos, resulta más y
  más tedioso teclearlos en la línea de comando, y más práctico
  situarlos en algún 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 creación 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>@<máquina>:<directorio> en la barra de título de la Xterm.
  Esto es particularmente útil para xterm minimizadas haciéndolas más
  rápidamente identificables. El resto de material de este prompt
  debería ser familiar de prompts previos que hemos creado.

  El único percance que puede darse manipulando la barra de título de la
  xterm de esta forma ocurre cuando se ingresa en un sistema en el que
  no se ha preparado la barra de título: la xterm continuará mostrando
  la información del sistema anterior que tenía la barra de título
  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, también deben aparecer, seguidos además
  de una m minúscula.

  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 líneas como XTerm*Foreground:
  BlanchedAlmond. Esto puede comentarse colocando un ! delante. Por
  supuesto, depende de qué emulador de terminal esté usando. Este es el
  lugar más 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
  código 34 no se retorna nunca al color habitual, por lo que cualquier
  texto que se teclee después del prompt será del mismo color que el
  prompt.  Este es también un azul oscuro, así que combinarlo con el
  código 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 tenía 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




  También 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 códigos
  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 ningún 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 permitía 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 estándar, 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 más fácil trabajar así. La variable GRAD1 es una
  comprobación 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  Marrón        \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  Púrpura       \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 más útil para interfaces de usuario a pantalla
  completa generados por shell scripts, pero también 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 códigos no están presentes en muchos emuladores de
  terminal. Los únicos que conozco que los soportan son xterm y nxterm,
  a pesar de que la mayoría de los emuladores de terminal están basados
  en el código 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 línea de código en el prompt (está más
  claro lo que hace si el prompt está bastantes líneas más abajo que el
  tope superior de la terminal)




       echo -en "\033[7A\033[1;35m BASH \033[7B\033[6D"




  Esto debería mover el cursor 7 líneas 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 demostración 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 línea 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 varíe de tamaño el terminal). Esto NO funcionará en los emuladores
  de terminal que he mencionado que no aceptan guardar y recuperar la
  posición 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 línea del terminal.

  Véase la sección ``Prompt con Reloj Elegante e Inútil'' para un uso
  más extensivo de estos códigos.


  5.3.  Movimiento del cursor con tput


  Como ocurre con muchas cosas en unix, hay más de una forma de
  conseguir los mismos objetivos. Una utilidad llamada tput puede
  también usarse para mover el cursor por la pantalla, o devolver
  información acerca del estado del terminal. tput es menos flexible que
  las secuencias de escape ANSI para el posicionamiento del cursor: sólo
  se puede mover el cursor a una posición absoluta, no se puede mover
  con relación a la posición actual. Yo no uso tput, así que no voy a
  explicarlo en detalle. Consulte la página 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 opción -e le indica a echo que habilite la interpretación
  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 estándar linux. Queda avisado de que algunas de
  estas secuencias de escape tienen extraños efectos en el terminal, y
  no he intentado evitarlos. Los caracteres de dibujos de líneas y
  bloques (que nos resultan tan familiares a los usuarios de
  WordPerfect)  utilizados masivamente en el proyecto Bashprompt están
  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 garantía."
       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



  También 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 información 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.:
  también como ..., alias ....--)

  BadLandZ). El paquete se encuentra en sus primeras betas, pero
  proporciona una manera simple de usar múltiples 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 mayoría 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
  mayoría de los sistemas).


  7.2.  Cambio de fuentes en una xterm


  Para usar algunos de los prompts más 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 distinción entre estos y las que Linux suele
  incluir, aunque claramente soportan diferentes conjuntos de
  caracteres.

  Las xterm estándar soportan un alfabeto extendido, incluyendo muchas
  letras con tildes. En las fuentes VGA todo esto se reemplaza con
  caracteres gráficos (líneas, puntos, bloques...). Si alguien puede
  explicar esto con más detalle, que se ponga en contacto conmigo e
  incluiré la explicación aquí.

  (--  N. del T.:
  que tenga caracteres gráficos y además incluya vocales acentuadas y
  eñes, 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). Después
  asegurarse de que son ficheros .pcf o .pcf.gz. Si son ficheros .bdf
  viene bien el comando bdftopcf (mirar la página 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 podrían variar en otras distribuciones). Desde
  el directorio en cuestión 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 más 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
  página del manual correspondiente o mediante la opción --help de línea
  de comando. En los emuladores de terminal más 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 página 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 cómo crear las variables
  de entorno PS1, o cómo incorporar las cadenas PS1 y PS2 a funciones
  que podían 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 también
  telnet y Xterms, dependiendo de cómo estén 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 función de
  ejemplo elite de arriba) escribiendo source elite seguido de elite
  (suponiendo que el fichero de la función elite se encuentre en el
  directorio de trabajo). Esto es engorroso, y deja una función extra
  (elite) en el espacio de entorno --si quiere limpiar el entorno, se
  hace con unset elite--. Esto parece un buen candidato para un pequeño
  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 función
  llamada callbashprompt en el entorno, y, mientras no se documente, no
  puede usarse para cargar ningún 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 función solicitada, carga la función
  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 dinámico con color según la carga del sistema

  9.1.  Un ejemplo de «prueba de concepto»


  Esto es una «prueba de concepto» más que un prompt bonito: cambio de
  colores en el prompt dinámicamente. 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 función del entorno. Si examina el código, notará que
  los colores ($COLOUR_HIGH y $COLOUR_LOW) se ponen mediante un código
  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 código
  completo. Le agradecería 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
  aparición del prompt en un PII-400 monousuario, así que no lo
  recomendaría para un P-100 multiusuario... Tómelo como una idea, más
  que como un prompt práctico.



























































    #!/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
  tamaño debido a que tenía un $PWD, así que escribí este prompt que
  ajusta su tamaño a la anchura exacta del terminal, con el directorio
  de trabajo en la línea 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 línea 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 inútil


  Este es posiblemente el prompt más atractivo (e inútil) que he creado.
  Debido a que muchos emuladores de terminal X no implementan las
  funciones de salvar y restaurar la posición del cursor, la alternativa
  cuando se sitúa 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 línea
  desde el prompt hasta el reloj. Es necesaria una fuente VGA.

  Nota: hay una sustitución en este código, que puede que no se muestre
  bien al pasar de SGML a otros formatos: he tenido que sustituir el
  carácter de pantalla pro el código \304; normalmente habría incluido
  la secuencia \304, pero ha sido necesaria la sustitución 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 línea 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 guión largo si se utiliza
       # una fuente VGA) es \304, pero la corté y pegué aquí porque
       # Bash sólo hace una sustitución, 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 función
    #   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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones «oficiales»:  www.insflug.org. Asegúrese de comprobar
  cuál es la última versión disponible en el Insflug antes de bajar un
  documento de un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  que estamos trabajando incesantemente para añadir.

  Se proporcionará también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase 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. Básicamente el BitchX es el ircII con los scripts
  integrados en el código fuente C, lo que lo hace más eficiente, además
  de dotarle de muchas funcionalidades.
  ______________________________________________________________________

  Índice General:

  1.      Instalación

  2.      Comandos

  3.      Comandos Básicos

  3.1.    Envío/Recepción de ficheros.

  3.2.    Gestión 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.  Instalación

  Lo primero, dónde conseguir el BitchX. La mayoría 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).

  Después 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 línea

       #undef LATIN1

  por

       #define LATIN1

  Además 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 dirección del servidor al que nos vamos a conectar.

  ·  server list: más direcciones alternativas de servidores.

  ·  switches:

  ·  -H hostname: En el caso de estar en una máquina 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 configuración ($HOME/.bitchxrc) después de
     que nos hayamos conectado al servidor.

  ·  -p port puerto del servidor al que nos vamos a conectar.

  Hay más comandos, (si los quieres consultar pon BitchX -?), pero estos
  son los principales.

  Después 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 quisiéramos conectarnos por el puerto
  6668 pondríamos irc.arrakis.es:6668 ó irc.arrakis.es -p 6668

  3.  Comandos Básicos

  Los comandos se introducen anteponiendo un / y después el comando.
  Algunos comandos son:

  ·  /join #canal: este se usa para entrar en un canal (por ejemplo,
     /join #linux).

     El ``#''no es un capricho mío, 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 información sobre un usuario del irc.

  ·  /who #canal: nos dice quién 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''.
     También podemos darle al Tab y empezarán 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 tendrás 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 dirección 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 más 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 estés.

  ·  /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 dándole a la tecla Supr.

  ·  /v #canal: hace un version a todas las personas que estén en el
     canal.

  ·  /ver: igual que el /v.

  ·  /email nick: nos dice la dirección de e-mail de nick (para eso nick
     tiene que tener configurado su cliente de irc)

  ·  /quit: termina la conexión.

  ·  /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.  Envío/Recepción de ficheros.

  Para el envío/recepción 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 están enviando o recibiendo
     por dcc.

  ·  /dcc send nick fichero: le envía a nick el fichero.

  ·  /dcc get nick: recibe el fichero de nick (se puede configurar la
     recepción automática mediante el comando /set auto_dcc on (hay
     muchas cosas que se pueden configurar poniendo simplemente /toggle)

  ·  /dcc close #N: corta el envío/recepción 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 envíe el paquete número N.

  ·  /ctcp nick resend #N: pide a nick que reenvíe el paquete pero
     comenzando por donde se cortó (muy útil si te están 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 opción.

  3.2.  Gestión de Ventanas

  Todo lo que podamos hacer con clientes gráficos 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
  básicos 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 actúan 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 pequeñita en
  la parte de abajo en donde me saldrán 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 más 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 más 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
  están ocultas lo mas cómodo es usar Alt-# siendo # un número 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 sección 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 conexión con un servidor basta
  con poner /server -SERVIDOR.

  Poniendo /server nos da la lista de servidores (lista que o bien se le
  pasa como parámetro al arrancar o al compilarlo; ver el fichero
  /include/config.h).

  4.  El .bitchrc y los alias.

  Es el fichero de configuración del BitchX, en él podemos meter
  nuestros alias o las variables que queramos. Es util (por ejemplo)
  para que funcionen las teclas de función en las X. Para hacerlo
  tenemos que añadir:

       /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. También 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 pequeña).

       /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.

  También es útil poner la lista de notify en este fichero, se haría
  añadiendo 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 continuación.

  ·  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 automáticamente las
     direcciones numéricas.

  ·  auto_reconnect ON-OFF cuando se corta la conexión 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 opción.

  ·  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 automático cuando hacemos un
     /whois.

  ·  beep ON-OFF activa o desactiva los beeps.

  ·  beep_always ON-OFF pita siempre.

  ·  beep_max NUM número máximo 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 contraseña para acceder al bot.

  ·  cdcc_flood_after NUM número de máximos mensajes del tipo cdcc.

  ·  cdcc_flood_rate NUM velocidad máxima 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 número de caracteres para mostrar el nombre
     del canal (0 para infinito).

  ·  client_information fija la información 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 número máximo de clones.

  ·  cmdchars establece con qué carácter 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 máximo después del cual nos
     desconecta si no hay respuesta del servidor (en segundos).

  ·  continued_line CADENA cadena con la que nos indica que un línea se
     sale de la pantalla.

  ·  ctcp_delay NUM tiempo de espera antes de mandar/aceptar un ctcp.

  ·  ctcp_flood_protection ON-OFF activa la protección anti-flood.

  ·  ctcp_flood_ban ON-OFF banea al que hace un ctcp-flood.

  ·  ctcp_verbose ON-OFF nos muestra toda la información en los ctcp .

  ·  ctoolz_dir DIR directorio donde están los scripts (normalmente en
     $HOME/.BitchX).

  ·  dcc_autoget ON_OFF activa la recogida automática de los DCC.

  ·  dcc_autorename ON-OFF si al enviarnos un fichero por dcc este ya
     existe lo renombra automáticamente.

  ·  dcc_bar_type NUM tipo de barra de estado para los dcc.

  ·  dcc_block_size NUM tamaño de los paquetes del dcc (normalmente 2049
     bits).

  ·  dcc_dldir DIR directorio donde guarda los dccs.

  ·  dcc_fast ON-OFF emula el formato rápido de dcc del mirc.

  ·  dcc_get_limit NUM número máximo de dcc simultaneos.

  ·  dcc_max_autoget_size TAMAÑO tamaño máximo de fichero para los dcc.

  ·  dcc_queue_limit NUM número máximo de dcc en espera, una vez
     superado este número de peticiones se le dice al que pide un dcc
     que lo intente más tarde.

  ·  dcc_send_limit NUM número máximo de dcc que se envían
     simultáneamente.

  ·  dcc_uldir DIR directorio por defecto que usa para buscar ficheros
     cuando los enviamos por dcc.

  ·  debug NUM activa la información 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 tamaño 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 eñes).

  ·  exec_protection ON-OFF activa la protección de ejecución de
     Comandos mediante el comando exec ORDEN.

  ·  flood_after NUM número máximo de mensajes después 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 protección 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 número 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 inserción o sobre escritura.

  ·  inverse_video ON-OFF muestra caracteres de video inverso.

  ·  joinflood ON activa la protección contra joinfloods.

  ·  joinflood_time NUM tiempo mínimo en segundos entre cada join para
     que no salte la alarma anti-flood.

  ·  kickflood ON-OFF activa la protección contra kickfloods.

  ·  kickflood_time NUM tiempo mínimo 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 máximo número 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 sesión.

  ·  logfile FICHERO fichero donde se guarda el log(normalmente en
     IrcLog).

  ·  max_deops NUM número de deops seguidos a partir de los cuales se
     considera que alguien está haciendo flood.

  ·  max_idlekicks NUM número de mensajes de idle seguidos a partir de
     los cuales se considera que alguien está haciendo flood.

  ·  max_server_reconnect NUM número máximo de intentos de conexión 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 protección contra nickfloods.

  ·  nickflood_time NUM tiempo mínimo en segundos entre un cambio de
     nick y otro para que no salte la alarma anti-flood.

  ·  nick_completion ON activa la finalización automática de nicks.

  ·  nick_completion_char CARACTER carácter usado como separador en el
     nick completion.

  ·  nick_completion_type NUM tipo de nick completion.

  ·  notify_level ALL nivel de notificación.

  ·  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 protección contra
     floods.

  ·  pubflood ON-OFF activa la protección contra floods para los public.

  ·  pubflood_time N fije el tiempo (en minutos) que dura el ignore
     después de un public flood.

  ·  realname NOMBRE nombre real (el que sale al hacer un whois).

  ·  reason_type N tipo de razón (si está a 1 utiliza las del fichero
     $HOME/.BitchX/BitchX.reasons.

  ·  reverse_status ON-OFF muestra la información 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 número de lineas que se guardan en el buffer.

  ·  send_away_msg ON-OFF indica si se envían 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 parámetros que se le pasan al shell al ejecutar
     un exec.

  ·  shell_limit N número máximo de shells que se pueden ejecutar
     simultáneamente.

  ·  shitlist ON-OFF mantiene una lista de personas non-gratas :) .

  ·  shitlist_reason CADENA razón 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 día 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 número máximo 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 información de usuario.

  ·  window_quiet ON-OFF permite hacer scroll.

  ·  word_break CADENA fija la separación 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 título en las xterms.

  ·  _cdcc_close_idle_sends_time N cierra un cdcc al pasar N segundos
     sin responder.

  Los parámetros más 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 Informáticos.

  ·  mercurio.irc-hispano.org Mundivía - 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 algún server europeo.

  ·  irc.linpeople.org: servidor dedicado únicamente al linux.

  8.  Netiqueta :)

  Hay una serie de normas básicas para estar en el irc, en algunas redes
  (véase 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 frías a la gente a privados, si preguntas en el canal se entera
     más gente con lo que te pueden contestar más 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 gustaría ;).

  ·  Pásatelo 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 mínima ...).

  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 Ramón 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.
  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  CDROM-COMO
  Jeff Tranter, jeff_tranter@pobox.com
  Fernández Moro, uov00655@correo.uniovi.es
  v1.12, 1 November 1997

  Esta es la traducción 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 intención no es otra que la
  de capacitar a los usuarios noveles a un nivel básico y aligerar la
  correspondencia en los grupos de noticias de Usenet y listas de
  correo.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Fuentes de Información

  1.2.    Repaso Histórico

  1.3.    Versiones nuevas de este documento

  1.4.    Contacto con el autor

  1.5.    Política de Distribución

  2.      La Tecnología CD-ROM

  3.      Hardware Soportado

  3.1.    Unidades ATAPI

  3.2.    Unidades SCSI ( Small Computer Systems Interface )

  3.3.    Unidades Propietarias

  3.4.    Unidades Vía Puerto Paralelo

  3.5.    Unidades Alternativas

  4.      Instalación

  4.1.    Instalación del Hardware

  4.2.    Configuración y Construcción del Núcleo

  4.3.    Creación de los Ficheros de Dispositivo ( device files ) y
  Ajuste de los Parámetros 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 Núcleo

  4.5.    Montando, Desmontando y Extrayendo

  4.6.    Problemillas

  4.6.1.  Primero: Asegúrese de haber arrancado con el núcleo recién
  compilado

  4.6.2.  Segundo: Compruebe que los controladores estén incluidos en el
  núcleo.

  4.6.3.  Tercero: Compruebe que el núcleo detecta la unidad durante el
  arranque

  4.6.4.  Cuarto: Compruebe si puede leer información 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 más Frecuente (PUFs)

  6.1.    ¿Cómo 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.    ¿Cómo puedo exportar un CD-ROM a otra máquina vía NFS?

  6.4.    ¿Es posible arrancar Linux desde un CD-ROM?

  6.5.    ¿Cómo puedo leer la información 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.   ¿Cómo he de interpretar los mensajes de error del núcleo
  referentes al CD IDE?

  6.14.   ¿Cómo puedo comprobar la velocidad de mi CD-ROM?

  6.15.   Mi CD-ROM dejó de funcionar después de completar la
  instalación de Linux

  6.16.   No puedo leer los ficheros ocultos

  6.17.   ¿Dónde se encuentra la documentación 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.  Introducción

  Este es el CDROM-COMO. Pretende ser una guía de referencia rápida,
  abarcando todo lo que Vd. necesita saber para poder instalar y
  configurar una unidad de CD-ROM bajo Linux. También se da respuesta a
  las preguntas más comunes acerca de el CD-ROM, y se incluyen notas de
  referencia a otras fuentes de información relacionadas con las
  aplicaciones del CD-ROM y su tecnología.

  1.1.  Fuentes de Información

  La mayor parte de esta información proviene de los archivos de código
  y documentación suministrados con el núcleo 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 Histórico

     Versión 1.0
        Primera versión de este documento disponible al público.

     Versión 1.1
        A partir de la versión 1.1.20 del núcleo, queda soportada de
        manera explícita la unidad CDU33A; Reveal FX; acerca de la
        lectura de pistas de audio; versiones alfa de algunos
        controladores (drivers); añadida la sección Problemillas; otros
        añadidos de menor importancia.

     Versión 1.2
        A partir del núcleo 1.1.33, el sistema de ficheros ISO-9660 ha
        de ser montado en modo sólo-lectura; queda aclarado que la SB16
        SCSI sí está soportada, mientras que las unidades Aztech no lo
        están; referencias a los programas photocd y xpcd; comentarios
        acerca de la nueva característica de auto-extracción del
        controlador SBPCD.

     Versión 1.3
        Notas sobre la auto-extracción del controlador SBPCD a partir
        del núcleo 1.1.49; acerca de los discos XA y su identificación.

     Versión 1.4
        Traducciones de este documento a otros idiomas; el SBPCD ofrece
        soporte para unidades IBM y Longshine; versión alfa del
        controlador para unidades Aztech; controlador CDU-33 sin auto-
        prueba, y con soporte para PhotoCD y audio; soporte para más de
        2 unidades SCSI; nuevo controlador para unidades IDE; se
        recomienda comprobar las posiciones de los jumpers de la unidad;
        control de la auto-extracción del controlador SBPCD a través de
        las funciones ioctl(); lista de los controladores con soporte
        para multi-sesión; pregunta acerca de el piloto parpadeante de
        la CDU-33.

     Versión 1.5
        Esta nueva versión del documento viene con retraso (he estado
        ocupado); el documento se sitúa bajo licencia pública GPL;
        nuevos controladores; más información sobre configuración y
        problemas; montones de enlaces a documentos HTML; otros cambios
        de menor importancia.

     Versión 1.6
        Enlace al programa eject (extracción); parche para los permisos
        de ficheros; enlace a la página Web de Creative Labs; referencia
        al FTP y FAQs de ATA/EIDE; nótese que muchas de las unidades
        Creative Labs y Mitsumi más recientes son EIDE; supermount; la
        lista de unidades con soporte para la lectura de CD-Audio está
        obsoleta, con relación al cdda2wav; escritura de CDs; unidad
        EIDE multi-disco.

     Versión 1.7
        Nueva versión del núcleo; muchos de los archivos README (léame)
        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 día son IDE/ATAPI; se añade un apartado
        sobre el soporte Plug and Play (Enchufar y Listo) e
        identificación de la velocidad de la unidad; cierre de las
        listas de correo vger; otros pequeños añadidos, miscelánea.

     Versión 1.8
        Por qué el CD-ROM deja de funcionar después de finalizar la
        instalación 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;  nótese la carencia de soporte para unidades vía
        puerto paralelo; el último núcleo estable es el 2.0; miscelánea
        y añadidos de menor importancia.

     Versión 1.9
        Han sido eliminadas una serie de cuestiones muy antiguas y
        actualmente obsoletas; nueva dirección de correo electrónico del
        autor; ya está disponible la traducción al Chino; enlaces a
        puntos donde encontrar los paquetes de software más recientes;
        más información en el libro multimedia; correcciones de sintaxis
        y ortografía.

     Versión 1.10
        Queda aclarado que las nuevas unidades Aztech son ATAPI; CDU31A
        como controlador modular; opción de mount para la lectura de
        ficheros ocultos; nueva URL de la página web del libro;
        correcciones sintácticas y ortográficas.

     Versión 1.11
        Unidades vía puerto paralelo; controlador bpcd;  nueva URL de la
        traducción al Chino; controlador alternativo CR-56x; CDs de
        arranque; la API del CDROM; la Guía Linux Multimedia (Linux
        Multimedia Guide) ya está disponible en Francés y Japonés.

     Versión 1.12
        Traducción 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 serán enviadas periódicamente
  al grupo de noticias comp.os.linux.answers . También se subirán a
  varios puntos de ftp anónimo, incluído
  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 también 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 más de 6
  meses, es probable que haya disponible una versión más reciente a
  través de Internet.

  La traducción al Francés 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 traducción al Japonés 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 traducción al Chino de este documento (en código BIG-5), realizada
  por Yung-kang Wu (yorkwu@ms4.hinet.net) se encuentra en
  http://linux.ntcic.edu.tw/~yorkwu/linux/howto/cdrom/.

  La traducción 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 también 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 confío a Vd, lector o lectora, la utilidad y provecho de este COMO.
  Si tiene alguna sugerencia, corrección o comentario, por favor,
  hágamelo saber, jeff_tranter@pobox.com, e intentaré incluirlo en una
  futura revisión.

  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, envíeme la
  información detallada de su problema. Por favor, no me consulten sobre
  la utilización 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 dirección postal. Considere también la posibilidad de hacer una
  donación al Linux Documentation Project (Proyecto de Documentación de
  Linux).  Contacte con el coordinador de los HOWTOs de Linux, Greg
  Hankins (gregh@sunsite.unc..edu), para más información al respecto.

  1.5.  Política de Distribución

  Copyright 1995-1997 Jeff Tranter.

  Este COMO se distribuye gratuitamente; Vd. puede redistribuirlo y/o
  modificarlo bajo los términos de la GNU General Public License, tal
  como ha sido publicado por la Free Software Foundation; a partir de la
  versión 2 de dicha Licencia, o (a su elección) posteriores.

  Este documento se distribuye con la esperanza de que será de utilidad,
  pero sin garantía alguna; carece de licencia mercantil o de beneficio
  particular. Consulte la GNU General Public License para más detalles.

  Puede obtener una copia de la GNU General Public License escribiendo a
  la la siguiente dirección: Free Software Foundation, Inc., 675 Mass
  Ave, Cambridge, MA 02139, USA.

  2.  La Tecnología 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 tecnología del CD-ROM no es tan
  incomprensible como el manual de instrucciones de su unidad.

  CD-ROM es el acrónimo de Compact Disc Read-Only Memory. Es un medio de
  almacenamiento masivo de datos que se sirve de un láser óptico para la
  lectura de unas oquedades microscópicas que están 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 más popular.

  La capacidad de almacenamiento de un disco compacto es de unos 650
  megabytes, o el equivalente a algo más de 500 discos de 3.5" de alta
  densidad... algo así como la friolera de unas 250.000 páginas de texto
  mecanografiado.

  Las unidades de primera generación (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 cuádruple velocidad (4x, a 600Kb/seg.) y así... A la
  hora de escribir este documento, ya se están 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
  través de la tarjeta de sonido, u otro medio similar. Algunos CDROM
  permiten la extracción de los datos de audio en formato digital.

  Los CD-ROM suelen venir formateados con el sistema de ficheros
  ISO-9660 (también llamado High Sierra). En dicho formato, los nombres
  de ficheros siguen el estándar del DOS (es decir, 8+3 caracteres). Una
  extensión del mismo, denominada Rock Ridge Extensions, se vale de una
  serie de campos indefinidos dentro del estándar ISO-9660 para poder
  dar soporte a los nombres de ficheros más largos e informaciones
  adicionales que se utilizan en Unix (p.e. permisos de lectura,
  escritura y ejecución, enlaces simbólicos, etc).

  El PhotoCD es un estándar desarrollado por Kodak para almacenar
  imágenes fotográficas en CDROM. Con las aplicaciones adecuadas, Vd.
  podrá ver las imágenes, manipularlas, imprimirlas, etc. La posibilidad
  de añadir datos a un PhotoCD a posteriori se conoce como multi-sesión.

  Las grabadoras de CD-ROM (CD-R) van siendo (poco a poco) cada vez más
  asequibles para nuestros bolsillos. Utilizan un sistema diferente y
  disponen de un hardware muy complejo para realizar la grabación, pero
  los discos resultantes son legibles con cualquier unidad de CDROM.

  En el futuro, se desarrollarán nuevas tecnologías que multiplicarán la
  capacidad de almacenamiento de los dispositivos actuales.

  3.  Hardware Soportado

  A continuación se listan los controladores (drivers) e interfases que
  actualmente son soportados por Linux. Dicha información esta basada en
  el último núcleo estable, que a la hora de escribir este documento va
  por la versión 2.0.31. También se encuentran disponibles los núcleos
  de desarrollo 2.1.x, pero su estabilidad no está garantizada.

  Los datos que siguen a continuación son válidos únicamente para
  sistemas Linux funcionando sobre plataformas Intel y compatibles.
  Aunque en su mayor parte debería poder extrapolarse a procesadores
  basados en otras arquitecturas, no tengo de ello información ni
  experiencia de primera mano.

  3.1.  Unidades ATAPI

  ATAPI (ATA Packet Interface) es un protocolo diseñado para controlar y
  gestionar dispositivos de almacenamiento masivo. Está basado en la
  interfase ATA (AT Attachment), que es la denominación oficial según el
  estándar 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. Además de ser hoy en día la
  interfase de más amplia difusión, ofrece unas prestaciones similares a
  la SCSI sin tener que desembolsar grandes cantidades de dinero en una
  controladora y cables especiales.

  En el núcleo de Linux viene incluido un controlador que debería
  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 múltiples unidades. Algunas desventajas del SCSI son la
  necesidad de una controladora y cables que resultan relativamente
  caros...

  Cualquier CDROM SCSI con un tamaño de bloque (block size) de 512 o
  2048 bytes debería 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 más información.

  Algunos CDROM vienen con una controladora propietaria cuya interfase
  no es 100% SCSI compatible (p.e. sin soporte para más unidades SCSI en
  el bus).  Es probable que dichas unidades no funcionen bajo Linux.

  3.3.  Unidades Propietarias

  Sí que están 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, también están disponibles. El
  precio de dichas unidades suele ser más bajo que el de las SCSI. Su
  desventaja estriba en la imposibilidad de expansión y falta de
  estandarización.

  Cuidado: hay interfases propietarias que vienen catalogadas
  erróneamente 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 continuación tenemos una lista de las unidades propietarias que
  sabemos que Sí son soportadas bajo Linux. Los controladores
  correspondientes están disponibles en las últimas versiones de
  desarrollo del núcleo o bien como parches: en
  ftp://sunsite.unc.edu/pub/Linux/kernel/patches/cdrom/. Revise asimismo
  los ficheros README que incluidos en la distribución del núcleo;
  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. También podemos encontrarla con el nombre de Procomm.

  4. Este controlador sólo 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 núcleo 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 versión alfa que se puede obtener
     vía
     ftp://sunsite.unc.edu/pub/Linux/kernel/patches/cdrom/lmscd0.4.tar.gz

  7. También la podemos encontrar con el nombre de Radio Shack.

  8. Existen dos controladores. "mcd" es el original. "mcdx", el más
     moderno, soporta más características (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 núcleo no soporta alguna de las unidades referidas probablemente
  necesite actualizarse a una versión mas reciente.

  Si su unidad no coincide con ninguno de los modelos señalados, más aun
  si ésta es de reciente adquisición y de cuádruple velocidad o más, es
  muy probable que emplee la interfase IDE/ATAPI, que ya hemos comentado
  en el apartado anterior. Uno de los errores más 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 están dejando de producir
  unidades de interfases propietarias para seguir el estándar ATAPI/IDE.

  3.4.  Unidades Vía Puerto Paralelo

  La única unidad de estas características que está soportada
  actualmente en el núcleo de Linux es la MicroSolutions Backpack.

  Hay también disponibles controladores para muchas más unidades, en
  forma de parches del núcleo o como módulos cargables. Mas información
  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.  Instalación

  La instalación de un CD-ROM bajo Linux incluye los siguientes pasos:

  1. Instalar el hardware

  2. Configurar y recompilar el núcleo

  3. Crear los ficheros de dispositivo (device files) y ajustar los
     parámetros temporales de arranque (boot time parameters)

  4. Arrancar con el nuevo núcleo

  5. Montar la unidad

  Vamos a seguir paso a paso este proceso:

  4.1.  Instalación del Hardware

  Siga detenidamente la guía de instalación del fabricante o consiga que
  su distribuidor, o algún amigo, le instale la unidad. Los detalles
  variarán dependiendo de si la unidad es interna o externa, y según el
  tipo de interfase empleada. Linux no requiere ningún tipo de
  instalación especial.  Asegúrese de ajustar correctamente los jumpers
  (puentes) de la unidad y/o de la interfase; algunos controladores del
  núcleo proporcionan información 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 limitación desaparece con los núcleos más
  recientes).

  4.2.  Configuración y Construcción del Núcleo

  Para instalar Linux desde un CDROM, seguramente emplee un disco
  llamado "boot" y otro llamado "root" (o similares) que vienen
  incluidos en la distribución. 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 través 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á
  más información sobre la instalación de Linux.

  Si ha adquirido una distribución de Linux en CDROM, seguramente
  incluirá las instrucciones precisas para su instalación (impresas en
  el folletín de la caja y/o en algún fichero del disco).

  Una vez que Linux ha sido instalado, probablemente querrá recompilar
  el núcleo. Hay varias razones para ello:

  ·  para el habilitar el soporte del CDROM  y demás hardware

  ·  para actualizarse a una nueva versión del núcleo

  ·  para liberar recursos de memoria, minimizando el tamaño del núcleo

  Consulte el http://sunsite.unc.edu/LDP/HOWTO/Kernel-HOWTO.html o su
  traducción al castellano, el
  http://www.insflug.org/howtos/online/kernel/Kernel-Como.html para más
  información 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, serán 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 opción:

       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 interés y utilidad consultar el
  http://sunsite.unc.edu/LDP/HOWTO/Sound-HOWTO.html;  o su traducción,
  http://www.insflug.org/howtos/online/sonido/Sonido-Como.html.

  Luego, continúe con el procedimiento habitual de compilación e
  instalación del núcleo. No arranque el nuevo núcleo hasta que haya
  creado los ficheros de dispositivo y ajustado los parámetros
  temporales de arranque, tal y como se describe en la siguiente
  sección.

  El sistema de ficheros ISO-9660 y la práctica totalidad de los
  controladores se pueden compilar como módulos 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, recomendaría incluir los controladores de CD-ROM compilados
  en el núcleo.  Para más información acerca de cómo utilizar los
  módulos, le vuelvo a referir al
  http://www.insflug.org/howtos/online/kernel/Kernel-Como.html.

  Si su núcleo no soporta alguna de las unidades detalladas, quizás
  debería actualizarse a una versión más reciente.

  Si necesita alguno de los controladores que no vienen incluidos con el
  núcleo, 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 núcleo por medio de
  menús: make menuconfig. Y otro basado en las X11: make xconfig. Los
  tres métodos proporcionan las indicaciones oportunas.

  4.3.  de los Parámetros Temporales de Arranque Creación de los
  Ficheros de Dispositivo ( device files ) y Ajuste

  El núcleo utiliza los ficheros de dispositivo para identificar el
  controlador con el que va a trabajar. En una distribución de Linux
  estándar, dichos ficheros de dispositivo se crean durante el proceso
  de instalación. En la distribución Slackware hay una utilidad de
  configuración por medio de menús que incluye la configuración del CD-
  ROM. Casi todos los sistemas cuentan con el script /dev/MAKEDEV. O
  puede seguir el procedimiento que se detalla a continuación. Si emplea
  alguno de los métodos anteriores, también le sera de gran utilidad
  confrontar sus ficheros de dispositivo con la información de esta
  sección.

  Para crear los ficheros de dispositivo, tendrá que introducir desde el
  la línea de comandos las órdenes adecuadas para su unidad. Esta tarea
  habrá de ser realizada en modo root (superusuario). Téngase en cuenta
  que algunas distribuciones utilizan nombres distintos a los citados
  para los dispositivos de CD-ROM.

  También es recomendable que cree un enlace simbólico a la unidad; así,
  le será más fácil acordarse. Por ejemplo, para una unidad IDE que sea
  el segundo dispositivo y se halle conectada a la interfase secundaria,
  el enlace se haría 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 simbólico) 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 mayoría 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 demás parámetros. Casi todos
  los controladores soportan alguna opción en la línea de comandos del
  núcleo, desde la cual se transfiere dicha información al controlador.
  Esta operación podemos realizarla de manera interactiva o, más
  frecuentemente, a través del gestor de arranque (boot loader). Si
  utiliza LILO, deberá añadir el comando append, tal y como sigue, en el
  fichero /etc/lilo.conf:

       append = "sbpcd=0x230,SoundBlaster"

  Consulte la documentación de LILO para mas información.

  A continuación se detallan los aspectos relativos a los diferentes
  controladores, incluyendo los ficheros de dispositivo, los parámetros
  de arranque y las posibilidades de éstos. Es probable que sólo
  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

  Línea de comandos del núcleo:

       sbpcd=<direccion-E/S>,<tipo-de-interfase>

  El primer parámetro es la dirección base del dispositivo (p.e.
  0x230), y el tipo-de-interfase podrá ser "SoundBlaster", "LaserMate",
  o "SPEA".  Consulte el archivo sbpcd.h para más información acerca del
  tipo de interfase empleada. Con sbpcd=0 desactivará la auto-prueba,
  así como la unidad.

  Creación 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 utilizarán por orden
  los números 1, 2 y 3 (en vez de 0). Con más de un controlador, los
  archivos de dispositivo tendrán como número máximo 26, 27, y 28, así
  hasta un máximo de cuatro controladores (osea, 16 CDROM en total;
  afortunadamente, suele ser suficiente para la mayor parte de los
  usuarios :-).

  Más información acerca de este controlador en el archivo sbpcd.

  Si ha comprado su CDROM recientemente, no presuponga que ha de emplear
  este controlador sólo 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

  Línea de comandos del núcleo:

       sonycd535=<direccion-E/S>

  donde direccion-E/S es la dirección base del controlador (p.e..
  0x320).  También 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 más antiguas del controlador usan como mayor de dispositivo
  21; compruebe si el fichero de dispositivo está correctamente fijado.

  Antiguamente, este controlador se distribuía como parche, pero ahora
  se incluye en el núcleo estándar. Para más información, 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

  Línea de comandos del núcleo:

       cdu31a=<direccion-E/S>,<interrupcion>,PAS

  El primer número es la dirección base E/S de la tarjeta (p.e. 0x340).
  El segundo es el número de interrupción empleada (0 para polled E/S).
  El tercer parámetro, opcional, deberá ser "PAS" si la unidad esta
  conectada a una tarjeta Pro-Audio Spectrum 16; si no, déjese en
  blanco.

  Si carga el controlador como módulo, el formato variará ligeramente.
  Para cargarlo, mediante el comando modprobe o insmod, los parámetros
  serán:

       cdu31a_port=<direccion-E/S> cdu31a_irq=<interrupcion>

  La dirección base de E/S es imprescindible. El número de interrupción
  es opcional.

  Fichero de Dispositivo:

       mknod /dev/cdu31a b 15 0

  Para más información, consulte el fichero cdu31a.

  También puede visitar la página de Jeffrey Oxenreider
  (zureal@infinet.com), donde se describen los problemas más 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

  Línea de comandos del núcleo:

       aztcd=<direccion-E/S>

  tarjeta (p.e. 0x340).

  Fichero de Dispositivo:

       mknod /dev/aztcd0 b 29 0

  Téngase 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 núcleo IDECD (ATAPI).

  Para mas información, 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

  Línea de comandos del núcleo:

       gscd=<direccion-E/S>

  Fichero de Dispositivo:

       mknod /dev/gscd0 b 16 0

  Más información en el archivo gscd y en la página 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 más antiguo para unidades Mitsumi. Quizás
  prefiera probar otro más reciente, mcdx, que ofrece más prestaciones,
  aunque probablemente sea menos estable.

  Línea de comandos del núcleo:

       mcd=<direccion-E/S>,<irq>

  y el número de la interrución IRQ.

  Fichero de Dispositivo:

       mknod /dev/mcd b 23 0

  Encontrará más información 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 más reciente para unidades Mitsumi. El antiguo,
  seguramente más estable, es el mcd.

  Línea de comandos del núcleo:

       mcdx=<direccion-E/S>,<irq>

  y el número 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.

  Más información 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

  Línea de comandos del núcleo:

       cm206=<direccion-E/S>,<interrupcion>

  0x340) y el segundo, el canal de interrupción.

  Fichero de Dispositivo:

       mknod /dev/cm206cd b 32 0

  Más información 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

  Línea de comandos del núcleo:

       optcd=<direccion-E/S>

  0x340).

  Fichero de Dispositivo:

       mknod /dev/optcd0 b 17 0

  Más información 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

  Línea de comandos del núcleo:

       sjcd=<direccion-E/S>,<interrupcion>,<dma>

  sjcd=0x340,10,5).

  Fichero de Dispositivo:

       mknod /dev/sjcd b 18 0

  Lea el archivo sjcd para más información.

  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

  Línea de comandos del núcleo:

       bpcd=<direccion-E/S>

  Fichero de Dispositivo:

       mknod /dev/bpcd b 41 0

  Este controlador se incluye con la versión 2.1 del núcleo.  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 línea de comandos del núcleo específica para cada tipo de
  controladora SCSI. Más información en el documento
  http://sunsite.unc.edu/LDP/HOWTO/SCSI-HOWTO.html.

  Sí se soportan múltiples unidades (el número máximo de dispositivos
  dependerá de la capacidad del bus). Determine los ficheros de
  dispositivo con un numero máximo de 11 y los mínimos 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 característica y
  funcionarán con el programa cdda2wav o readcdda (empleando la
  interfase SCSI genérica del núcleo).

  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 línea de comandos del
  núcleo será de la forma:

       hdx=cilindros,cabezas,sectores,wpcom,irq
         o
       hdx=cdrom

  "hd", para la "siguiente" unidad (en dicha secuencia). Sólo son
  imprescindibles los tres primeros parámetros (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 más de 2 dispositivos o más de una
  controladora IDE. Por lo general, basta con pasar la línea de comandos
  correcta desde LILO. Cómo hacer esto se explica en el archivo
  /usr/src/linux/Documentation/ide-cd. Léalo atentamente.

  El soporte para múltiples dispositivos IDE ha ido mejorando con las
  últimas versiones del núcleo. Si tiene problemas con su antiguo
  núcleo, le puede ser de ayuda actualizarlo.

  Algunas controladoras IDE presentan problemas de hardware que el
  controlador del núcleo es capaz de solucionar. Para ello deberá
  introducir más parámetros adicionales. Le remito a la documentación.

  4.4.  Arrancando el Núcleo

  Ahora ya puede reinicializar el sistema con el nuevo núcleo. Debería
  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 rápido para poder
  leerlos, puede revisarlos tecleando dmesg o tail /var/adm/messages.

  Si no ha identificado la unidad, algo falla. Consulte la sección ``''.

  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 simbólico
  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 más opciones. Consulte la página mount(8) del
  manual.

  Puede añadir una línea en archivo /etc/fstab para que el CD-ROM se
  monte automáticamente al arrancar o para especificar los parámetros a
  emplear cuando se monte; consulte la página 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 ningún 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 botón de extracción; también
  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 automáticamente el CD-ROM cuando se
  desmonta, e introducir la bandeja cuando se monta. Esta característica
  puede desactivarse a la hora de compilar el núcleo, o bien mediante
  los comandos adecuados.

  Es posible que no pueda montar ningún CD-ROM después de haber
  reproducido un disco de audio. Debe antes enviar un comando "stop"
  mediante un programa reproductor de CDs. Esto sólo 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
  extraíbles, incluyendo CD-ROM. Lo puede encontrar vía ftp:
  ftp://sunsite.unc.edu/pub/Linux/patches/diskdrives/.

  4.6.  Problemillas

  Si después de seguir las instrucciones detalladas, aún 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: Asegúrese de haber arrancado con el núcleo recién
  compilado

  Puede verificar la fecha del núcleo para asegurarse de estar corriendo
  el núcleo 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 construcción y compilación
  del núcleo, es que todavía esta corriendo la versión 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.  núcleo.  Segundo: Compruebe que los controladores estén 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 número mayor es 22.

  Asegúrese de que también 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. creía haber compilado no
  aparece, es que algo ha ido mal durante el proceso de configuración
  y/o construcción del núcleo. Tendrá que comenzar de nuevo.

  4.6.3.  Tercero: Compruebe que el núcleo detecta la unidad durante el
  arranque

  Cerciórese de que el CD-ROM fue detectado durante el proceso de
  arranque del núcleo. Debiera leer algún 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 están bien conectados. Si dispone
  de jumpers para las direcciones, verifique sus posiciones (p.e.  drive
  0 si sólo 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 línea 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 más frecuente) para poder introducir los
  parámetros 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.

  También 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. Inténtelo 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 ningún
  controlador disponible bajo Linux. Para más información al respecto,
  lea las Referencias que encontrará al final de este documento.

  4.6.4.  Cuarto: Compruebe si puede leer información desde la unidad

  Vamos a intentarlo. Los siguientes comandos deberían provocar el
  encendido de la lucecita de la unidad (si la hay, claro) y no debería
  haber mensajes de error. Utilice el fichero de dispositivo adecuado
  para su unidad y asegúrese 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 núcleo se está comunicando con la unidad y
  puede pasar a la siguiente comprobación.

  Si no, puede que haya algún error en el fichero de dispositivo.
  Asegúrese de que éste se encuentra en el directorio /dev y que sus
  números 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,
  evalúela 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 parámetros "-t iso9660" y la opción
  "-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, asegúrese de que las
  instrucciones del archivo /etc/fstab son correctas.  Si ha cargado el
  demonio syslog, es probable que haya mensajes de error del núcleo que
  no ha visto.  Pruebe con "dmesg":

       dmesg
       SBPCD: sbpcd_open: no disk in drive

  Quizás hay algún mensaje de error en los ficheros en /var/adm/,
  dependiendo de cómo 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 reproducción de CDs de audio. Es
  posible que no todos los programas sean compatibles con su unidad.
  Pruebe con otra aplicación, 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 código 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. Asegúrese 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. Más información al respecto en
  http://www.insflug.org/howtos/online/sonido/Sonido-Como.html.

  4.6.7.  Nada, Que sigue fallando...

  Si aún 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 núcleo.

  ·  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 versión del núcleo

  ·  contactar con su distribuidor (del equipo)

  ·  contactar con el distribuidor del CD-ROM

  ·  enviar un mensaje al responsable del controlador del núcleo (busque
     en el archivo /usr/src/linux/MAINTAINERS)

  ·  enviarme un mensaje

  ·  cargar el Emacs y teclear Esc-x doctor :-)

  5.  Aplicaciones

  En esta sección se describen brevemente algunas de las aplicaciones
  relacionadas con el CD-ROM que hay disponibles para Linux. Vea también
  el Mapa de Software de Linux (LSM).

  5.1.  Reproductores de CDs de Audio

  Hay muchos programas que sirven para la reproducción de discos
  compactos, bien a través de unos auriculares, o por la tarjeta de
  sonido.

     Workman
        reproductor en modo gráfico bajo las X11 con soporte para base
        de datos de CDs y otras muchas características.

     WorkBone
        reproductor interactivo en modo texto

     xcdplayer
        sencillo reproductor basado en las X11

     cdplayer
        sencillo reproductor desde la línea 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 línea de comandos

  Alguno de estos programas vienen diseñados para utilizar algún fichero
  de dispositivo concreto (p.e. /dev/cdrom). Deberá introducir el
  adecuado como parámetro, o bien crear un enlace simbólico en el
  directorio /dev. Si la salida se realiza desde el CDROM a una tarjeta
  de sonido, quizás 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 imágenes
  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 conversión
  de archivos de PhotoCD a mapa de pixels (pixmap). Se encuentra
  disponible vía ftp en ftp://ftp.gwdg.de/pub/linux/hpcdtoppm o bien
  incluído en el paquete de utilidades PBM (Portable Bit Map) ,
  disponible en muchos bancos de archivos (búsquelo por "pbm" o
  "netpbm").

  photocd, un programa de Gerd Knorr, kraxel@cs.tu-berlin.de para la
  conversión de PhotoCDs en archivos de mapa de bits: Targa, Windows y
  OS/2.

  Del mismo autor es el programa xpcd, basado en las X11, diseñado para
  la gestión de imágenes de PhotoCD. Vd. puede seleccionar las imágenes
  con el ratón, hacer previsualizaciones en una pequeña ventana y cargar
  la imagen en alguna de las cinco resoluciones posibles. También puede
  cargar un determinado área de la imagen: ftp://ftp.cs.tu-
  berlin.de/pub/linux/Local/misc/.

  ImageMagick permite la manipulación de archivos de imágenes, también
  soporta el formato PhotoCD. Lo puede encontrar vía ftp
  ftp://ftp.x.org/contrib/applications/ImageMagick/.

  5.3.  mkisofs

  Con el paquete mkisofs, de Eric Youngdale's, podrá crear una partición
  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, característica para la cual un sistema
  multitarea como Linux está particularmente bien dotado.

  5.4.  Utilidades ISO-9660

  Aquí encontrara algunas utilidades para la verificación del sistema de
  ficheros ISO-9660 en discos formateados. Le será de gran interés a la
  hora de hacer comprobaciones de CDs que puedan estar defectuosos.
  Puede conseguir el paquete vía ftp ftp://ftp.cdrom.com/pub/cdrom/ptf/.
  Está escrito por Bill Siegmund y Rich Morin.

  6.  Respuestas a las Preguntas de Uso más Frecuente (PUFs)

  6.1.  ¿Cómo hacer que cualquier usuario (no root) pueda montar y
  desmontar los CDs?

  Prácticamente todos los comandos mount soportan la opción user.
  Introduciendo una línea 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 podrán ser ejecutados, los
  archivos de dispositivo se ignorarán...); esto puede resultar
  demasiado restrictivo en algunos casos.

  Otra opción es conseguir el paquete usermount, que habilita para los
  usuarios normales el montado y desmontado de dispositivos extraíbles,
  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 código 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 algún 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 continuación:

       umount /cdrom
       umount: /dev/hdd: device is busy
       fuser -v /cdrom
                            USER       PID ACCESS COMMAND
       /mnt/cdrom           tranter    133 ..c..  bash

  6.3.  ¿Cómo puedo exportar un CD-ROM a otra máquina vía NFS?

  Para ello es preciso añadir una línea al archivo /etc/exports.  Para
  más detalles, consulte la página man exports(5).

  6.4.  ¿Es posible arrancar Linux desde un CD-ROM?

  Para instalar Linux, el método más común es utilizar un disco de
  arranque.  Algunas distribuciones vienen preparadas para arrancar el
  núcleo de Linux utilizando un CDROM directamente desde el DOS.

  Michael Fulbright (msf@redhat.com) explica cómo, con un CDROM, la ROM-
  BIOS y una unidad ATAPI es posible arrancar directamente desde el CD.
  La última version de mkisofs también soporta la creación de dichos
  CDRoms.  Para ello, se ha tenido que añadir una serie parches para
  soportar el estándar de discos de arranque El Torito.

  6.5.  ¿Cómo puedo leer la información 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 rápido desarrollo que están experimentando las
  unidades de CD-ROM, es casi imposible hacer una lista completa de los
  modelos que soportan la extracción digital de audio. Lo mejor será que
  consiga la última versión de paquete cdda2wav y lea la documentación.

  Para más información al respecto, visite la página web
  http://www.tardis.ed.ac.uk/~psyche/cdda/ y las FAQ de alt.cdrom
  (sección 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 añadir la opción
  -noleaf al comando find.  Consulte la página del manual find(1) para
  más detalles.

  (Hoy en día 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 aplicación gráfica diseñada para la
  utilización 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 también 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 sólo-lectura. Con alguno de
  los núcleos más antiguos se podía montar CDROM para lectura/escritura;
  los intentos de escribir datos en el CDROM eran ignorados. Esto ha
  sido corregido a partir del núcleo 1.1.33, con el que los CDROM han de
  montarse como de sólo-lectura (con la opción -r del comando mount).

  6.9.  ¿Por qué se abre la bandeja de la unidad cuando apago el sis­
  tema?

  A partir de la versión 1.1.38 del núcleo, el controlador sbpcd realiza
  automáticamente la extracción del CD al ser desmontado. Al apagar el
  sistema, se desmonta el CD, lo que provoca su extracción. Esta
  característica resulta de utilidad a la hora de cambiar los CDs. Si la
  bandeja está abierta, cuando monte un CD se cerrará automáticamente.

  He comprobado que esto ocasiona algunos problemas al utilizar algunos
  programas (p.ej. el cdplay y el workbone). A partir del núcleo 1.1.60
  es posible controlar dicha característica por medio de software. Un
  programa de ejemplo viene incluído con el archivo de documentación del
  sbpcd (o también 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 núcleo no soportan discos XA, pero
  seguramente podrá encontrar algún parche para añadir dicho soporte en
  alguno de los múltiples 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 visualización de la "Tabla de Contenidos" (Table of
  Contents) (TOC).  Compile, instale y arranque de nuevo el núcleo.
  Ahora, cada vez que monte un disco, podrá leer la información 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
  también que se trata de un disco XA.

  (gracias a Eberhard Moenkeberg por esta información)

  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 dañado o es defectuoso

  4. Lo ha insertado del revés :-)

  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 opción "Probe all LUNs on each SCSI device" durante la
  configuración del núcleo. Al menos un usuario ha tenido que
  incrementar el valor SCSI timeout en el controlador del núcleo. Las
  intercambiadoras Nakamichi MBR-7 de 7 discos y la Pioneer de 12 discos
  funcionan correctamente.  También están soportadas las
  intercambiadoras multi-disco EIDE/ATAPI. El soporte implementado para
  algunas unidades (utilizando la función CDROM_SELECT_DISC ioctl) con
  el núcleo 2.0 resulta un tanto rudimentario. En el archivo de
  documentación del controlador del núcleo IDE-CD viene incluído el
  código fuente de un programa para seleccionar el plato, o también
  puede utilizar una versión 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í ocurría con
  la edición de InfoMagic de Marzo de 1995.

  El siguiente parche, cortesía 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 edición de InfoMagic Developers CD-ROM Set de Marzo de 1995 se
  plantean una serie de problemas con la información almacenada en
  directorios cuyos permisos quedan restringidos al root.

  1. En el Disco1 los valores de propietario/grupo están fijados con los
     valores 5101/51 y tienen permiso de escritura (?)

  2. El Disco2 y 3 vienen con permisos rwx para root y ningún permiso
     para grupo/usuario. ¡Sólo 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 común, estos
  arreglos cambian los permisos de todos los directorios del CD. El
  parche que viene a continuación sólo 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 quedarán fijados
  como r-xr-xr-x, y los valores de propietario/grupo serán los indicados
  a través de las opciones uid y gid del comando mount.

  Para aplicarlo:

        cd /usr/src/linux/fs/isofs
        patch < parche

  dependiendo de su versión del núcleo).

  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 más recientes del núcleo (a
  partir de la 2.0). Consulte también la sección referente a los
  ficheros ocultos.

  6.13.  al CD IDE?  ¿Cómo he de interpretar los mensajes de error del
  núcleo 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 envía a una salida las informaciones, en vez de
  gastar espacio del núcleo 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 núcleo.

  6.14.  ¿Cómo puedo comprobar la velocidad de mi CD-ROM?

  He aquí un método. 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 cuádruple, 2.5 segundos...etc

  El valor más 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 más exacto (los datos no se
  almacenan). Lo mejor sería ejecutar varias veces el comando y, a
  continuación, hallar la media.

  6.15.  Linux Mi CD-ROM dejó de funcionar después de completar la
  instalación de

  Lo más 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 instalación 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
  núcleo 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 núcleo que acaba de
  instalar es un núcleo "genérico" sin soporte para CD-ROM. Puede
  comprobarlo siguiendo los pasos detallados en la sección ``'' (p.e.
  empiece comprobando el archivo /proc/devices).
  La solución pasa por recompilar el núcleo, asegurarse de incluir los
  controladores necesarios para su unidad y todo lo demás (p.e.
  controlador SCSI, sistema de ficheros ISO-9660). Consulte
  http://www.insflug.org/howtos/online/kernel/Kernel-Como.html.

  Si ha pasado alguna opción desde la línea de comandos al disco de
  arranque (boot disk) (p.e. "hdc=cdrom"), deberá añadirla a su fichero
  de configuración de arranque (/etc/lilo.conf).

  6.16.  No puedo leer los ficheros ocultos

  Algunos CDs tienen archivos que están determinados como ``ocultos''.
  Normalmente, no son visibles. Si monta el CD-ROM con la opción
  ``unhide'', deberían de hacerse accesibles (esto parece no estar
  documentado en lugar alguno).

  6.17.  ¿Dónde se encuentra la documentación de la API del CDROM?

  Si pretende escribir su propia aplicación, p.e. un reproductor de CDs,
  necesitará entender la API (Interfase para la Programación de
  Aplicaciones) del Linux.

  En un principio, los controladores de CD-ROM usaban sus propias
  funciones ioctl() para dar soporte a las características específicas
  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 idénticas,
  sí tenían mucho que ver.

  Recientemente ha surgido una iniciativa encabezada por David van
  Leeuwen (david@tm.tno.nl) dirigida a la estandarización 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 núcleo ya lo soportan. Se espera que para futuras
  versiones del núcleo (3.0?) todos los controladores de CDROM empleen
  la API estándar.

  En mi libro, Linux Multimedia Guide (Guia Linux Multimedia), entro en
  detalle acerca de la programación de unidades de CDROM, especialmente
  de cara a las funciones de audio. Vea la sección ``''.

  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 extensión 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
  información!

  Las FAQs de los siguientes grupos de usenet se envían periódicamente 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 también encontrara información 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 más de una docena de compañías 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 homónima en
  castellano, es.comp.os.linux) también son una valiosa fuente de
  información.

  Existe un gran archivo de software e información 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 compañía precursora del protocolo IDE, ofrece
  información sobre dicho protocolo en su FTP:
  ftp://fission.dt.wdc.com/pub/standards/atapi.

  Página Web dedicada a multimedia:
  http://viswiz.gmd.de/MultimediaInfo/. Creative Labs tiene su Web en
  http://www.creaf.com/.

  El Proyecto de Documentación de Linux ha dado como fruto muchos libros
  sobre Linux, como la Linux Installation and Getting Started.  Puede
  conseguirlos vía FTP, o también comprarlos impresos. La traducción 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 máximo interés: 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 cómo subscribirse, envíe 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 reeestructuración).

  Consejo final: Si desea aprender mucho más sobre multimedia bajo Linux
  (en concreto sobre aplicaciones y programación 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 versión original en Inglés, como las
  traducciones al Francés y Japonés. Para más detalles, puede telefonear
  al 800-998-9938 de Norte América, consultar la pagina Web
  http://www.ora.com/catalog/multilinux/noframes.html o también mi
  página personal http://www.pobox.com/~tranter/.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Impresión Como
  Grant Taylor gtaylor@cs.tufts.edu y Brian McCauley
  (B.A.McCauley@bham.ac.uk
  Traducción: Francisco Escarpa escarpa@impronta.es

  Una guía de cómo imprimir y ver documentos bajo el sistema operativo
  Linux.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Prepárense los impacientes.

  3.      Puertos y dispositivos

  4.      LPR

  4.1.    ¿Qué necesita?

  4.2.    ¿Cómo imprimir con Linux?

  4.3.    Impresión remota e impresión 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: juntémoslo todo

  4.6.4.  Y de la impresión remota, ¿qué?

  4.6.5.  Socorro: no funciona.

  4.6.6.  ¿Dónde 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 fácil.

  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 impresión a nuestro antojo.

  4.7.2.  ' lpc ' y ' lpq ' advierten : " missing daemons "

  4.7.3.  Impresión sobre red (notas adicionales)

  4.8.    Los filtros de impresión

  4.8.1.  Los filtros de salida

  4.8.2.  Depuración de filtros

  4.8.3.  Filtros Mágicos

  4.8.4.  Los usuarios de HP estamos de suerte

  5.      ¿CÓMO SE IMPRIME ... ?

  5.1.    Texto Llano

  5.1.1.  pr

  5.2.    PostScript

  5.2.1.  Ghostscript

  5.3.    Mi impresora sólo 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 ; páginas 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.      Visualización

  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.  Introducción

  Esta es la versión española del Printing-HOWTO de Linux. Éste
  documento forma parte de la segunda generación 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 cómo administrar los distintos
  aspectos de impresión 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 conexión en red.... Aunque
  pueden encontrarse estos documentos en los lugares más insospechados,
  su "domicilio" oficial es:

  ftp://sunsite.unc.edu/pub/linux/docs/Howto (-- Igualmente, la mayoría
  de los mirrors de Sunsite contendrán 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

  Envíen los comentarios, errores detectados y sugerencias a Brian y
  Grant a printing@god.ext.tufts.edu (versión en inglés) o a Francisco
  Escarpa para la traducción española (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 impresión y
  visualización bajo Linux, incluyendo la última versión de este
  documento (en inglés). Para acceder, envíe un mensaje de correo
  electrónico 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 traducción se ha reelaborado ligeramente el documento
  original, eliminado repeticiones, reducido los detalles particulares
  de cada programa al mínimo imprescindible, remitiendo al lector a la
  documentación correspondiente, y añadiendo alguna pequeña novedad
  conocida.  Agradeceremos las sugerencias, notificación de errores y
  demás.

  2.  Prepárense los impacientes.

  Usted ya conoce UNIX, y ya tiene configurado el sistema (o se lo han
  configurado) y desea con toda urgencia imprimir: Hágalo con la orden:

       lpr fichero

  y por su impresora saldrán las tan ansiadas páginas. 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 físico 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, común 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 través de los
  dispositivos ttyS* (Consulte el Serie-Como, en http://www.insflug.org
  para más información)

  Utilice los dispositivos /dev/ttyS? (o /dev/ttys? si lo prefiere) para
  conectar una impresora por línea serie. No utilice /dev/cua?.

  En algunos sistemas, puede haber enlaces simbólicos 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 pésima praxis. (lea la página man 'ln' para más información ).

  Recuerde que NO puede simultáneamente tener soporte para impresora y
  para comunicaciones vía 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
  impresión y de comunicaciones como módulos independientes, que se
  cargarán 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 envían distintas clases
  de documentos, más o menos dignamente.
  Unix resuelve estos problemas mediante un conjunto de programas, los
  servidores de impresión, 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 impresión: "lp" en UNIX System V
  (AT&T), y "lpr", en los U*X BSD, y Linux. En este documento sólo se
  hablará del segundo sistema; el sistema lp no es de dominio publico, y
  no conocemos ninguna versión que lo sea; de todos modos, ambos tienen
  hoy día 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 capítulos concretos.

  Dicen los que saben que lp es más robusto, pero a la hora de trabajar
  en red lpr se destaca por varios cuerpos.

  4.1.  ¿Qué necesita?

  Asumimos que usted sabe cómo editar un archivo de texto bajo Linux, y
  tiene los conocimientos básicos sobre permisos y propiedad de
  archivos.

  También suponemos que su sistema Linux funciona sin tropiezos. Si
  desea imprimir en máquinas remotas, deberá además tener configurado y
  funcionando el soporte de red (vea en NET-3-HOWTO (-- N. del Revisor:
  ver sección ``''--) ).

  Revise las páginas de manual de los comandos chmod y chown para más
  información.

  4.2.  ¿Cómo imprimir con Linux?

  El camino más corto en UNIX (y bajo Linux), es enviar los datos a
  imprimir directamente al dispositivo adecuado. El siguiente comando
  envía un listado del directorio a la primera impresora en paralelo
  (hablando en DOS, LPT1:):

              ls > /dev/lp1

  El problema de este método 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. Podríamos ejecutar el comando simplemente en
  segundo plano, pero no adelantaríamos mucho. Además, deberá tener
  privilegios de superusuario.

  Un remedio mejor es crear un área tampón (spool), es decir, guardar
  los datos a imprimir en un fichero temporal, y arrancar un proceso en
  segundo plano que envíe los datos a la impresora, y gestione las
  incidencias que se presenten.

  Esencialmente, así funciona Linux. Para cada impresora, se define un
  área tampón, donde cada trabajo pendiente se almacena en un fichero.
  Un proceso en segundo plano (llamado el demonio de impresión) analiza
  metódica y constantemente los ficheros tampón, buscando nuevos datos a
  imprimir.  Cuando aparece alguno, son enviados a la impresora
  apropiada; cuando más 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 impresión".

  En el caso de impresión remota, los trabajos se gestionan localmente,
  como cualquier otro, pero el demonio de impresión lo envía a través de
  la red hacia el ordenador o impresora destino.

  La información que el demonio de impresión necesita para su trabajo
  (el dispositivo físico, el tampón de datos, la máquina e impresora
  remota ...)  se almacenan en un fichero llamado "printcap", que
  describiremos más tarde.

  En lo sucesivo, el término "impresora" se referirá a una máquina
  lógica definida en /etc/printcap. El concepto "impresora física" o
  "trasto", define la cosa que mancha papel. Es perfectamente posible
  describir múltiples entradas en /etc/printcap que se refieren a un
  sólo trasto, pero por caminos tortuosos. No se preocupe, lo
  aclararemos al describir printcap.

  4.3.  Impresión remota e impresión local.

  La impresión remota nos permite enviar trabajos de impresión desde una
  máquina, 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 máquina debe ser accesible por otros
  ordenadores.

  Imprimimos localmente cuando usuarios de nuestra máquina envían
  trabajos a una impresora conectada directamente a la misma.

  4.4.  Los programas importantes

  El sistema de impresión de Linux se sustenta en cinco programas, que
  deberían estar donde aparecen en el siguiente listado, propiedad de
  root, y grupo lp (o daemon, según 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 impresión. /sbin/lpd es el demonio de impresión.

  OJO: Los directorios, permisos y propiedad de los ficheros pueden
  diferir a los de su sistema, aunque no deberían ser MUY distintos.
  Hay páginas de manual que explican con detalle todas estas órdenes y
  que debería consultar para ampliar información.

  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 opción -P impresora en la línea de órdenes.

  4.4.1.  La orden lpr

  Con lpr se envía un trabajo a la impresora. Este se copia en el
  tampón, donde el demonio de impresión lo encuentra, y lo envía a la
  impresora física. Si no le suministra un fichero, lpr usará la entrada
  estándar.

  4.4.2.  La orden lpq

  lpq muestra los trabajos pendientes para la impresora deseada ("lp"
  por defecto). lpq muestra el número de cada trabajo, que lo identifica
  para cualquier proceso posterior.

  Muestra también 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 número indica su orden en la cola de impresión.

  4.4.3.  La orden lprm

  lprm elimina un trabajo de la cola, es decir, borra los ficheros en
  espera en el directorio tampón. Puede indicar específicamente 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 línea 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 tampón 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 diálogo. con "?"
  obtenemos ayuda. Advierta que algunas funciones de lpc están
  reservadas para el superusuario.
  4.5.  Los directorios fundamentales.

  Realmente, sólo hay un directorio importante: el área de tampón donde
  se almacenan los datos a la espera de que lpd decida qué hacer con
  ellos. Sin embargo, un sistema típico debería configurarse en varios
  directorios, uno para cada impresora, lo que facilita notablemente el
  mantenimiento. En la mayoría de las instalaciones, /var/spool/lpd es
  el directorio tampón 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,
  debería crear dos directorios, por ejemplo /var/spool/lpd/PJL-16-ps y
  /var/spool/lpd/PJL-16-hpgl.

  Los directorios temporales deberían 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 sería:

       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.

  Además de los programas ya tratados, cada directorio temporal debe
  contener como mínimo estos cuatro ficheros: ".seq" , "errs" , "lock" y
  "status". Deberán 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 página de manual
  para printcap, y el hecho de que muchos printcap están generados por
  programas, o por gente cuya manera de despreciar al género humano es
  omitir comentarios que ayuden a su compresión. Desde aquí hacemos un
  llamamiento para que su fichero printcap sea tan legible como sea
  posible.

  Cada entrada de printcap describe una impresora. Mejor aún, cada
  entrada de printcap provee una denominación lógica para un dispositivo
  físico, y describe cómo deben los datos ser enviados y manejados por
  él.

  Por ejemplo, una entrada de printcap definirá qué puerto vamos a usar,
  qué directorio tampón, qué proceso deben soportar los datos, qué clase
  de errores debemos notificar, qué volumen de datos se permiten enviar
  como máximo, o limitar el acceso de ciertos dispositivos.

  Además, 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. Tendría
  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 enviarán 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 ningún dato al puerto.

  4.6.1.  Los campos de /etc/printcap .

  Un ejemplo típico de entrada en /etc/printcap podría 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
  excepción del primer campo, que describe la impresora. Los campos
  pueden tener tres tipos de valores - Texto, lógico y numérico, en los
  que nos extenderemos más adelante.

  La primera línea de la entrada determina el nombre y alias de la
  impresora. La impresora por defecto debería llamarse "lp"; por
  ejemplo, si la impresora del ejemplo anterior es la única que tenemos,
  la primera línea sería:

       # 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 práctico. Ojo:
  Sólo podemos tener una impresora llamada "lp".

  Los siguientes campos son los más comunes, y los más 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 impresión. 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 excepción de las pruebas de configuración del
     dispositivo.  Cuando configure una impresora remota con los campos
     rm y rp , debería poner ":lp=:" en /etc/printcap, indicando que no
     está asignada a ningún dispositivo local.. No deje este campo en
     blanco a menos que use una impresora remota, o el demonio de
     impresión se quejará amargamente, si no especifica un dispositivo
     de impresión.

  ·  lf guarda un registro de los errores de impresión.  Cualquier
     fichero que especifique deberá existir antes de su uso, o no se
     registrarán las incidencias.

  ·  if indica el nombre del filtro de impresión a ejecutar. Los filtros
     son programas que reciben datos por la entrada estándar, y los
     devuelven procesados por la salida estándar.

     Un empleo típico 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 página
     de códigos sin necesidad de cambiar la configuración de la
     impresora cada vez que la usemos entre UNIX y DOS.

     Cuando se especifica un filtro de entrada, el demonio de impresión
     no envía los datos pendientes al dispositivo especificado. En su
     lugar, arranca el filtro y asigna el fichero temporal a la entrada
     estándar, y el dispositivo de impresión como salida estándar.

  ·  rm y rp controlan el destino de la impresión remota. Enviar el
     documento a imprimir a una impresora remota es tan fácil como
     indicar el anfitrión en rm, la impresora correspondiente en rp, y
     asegurarse que lp está vacío. Fíjese en que los datos se tamponan
     localmente antes de ser enviados, y que le ejecutará cualquier
     filtro que especifique.

     Una entrada típica de /etc/printcap en la máquina local
     (pera.huerta.net)  para trabajar sobre la impresora picapapel, en
     la estación rábano.huerta.net (remota), sería:

     picapapel:lp=:rm=rábano.huerta.net:rp=picapapel:sd=/var/spool/lpd/picapapel:

     En la máquina remota necesitará que /etc/hosts.equiv o
     /etc/hosts.lpd contenga la línea pera.huerta.net; Tenga cuidado con
     los permisos de acceso. Vea el punto ``Y de la impresión remota,
     ¿qué?''.

  ·  sh y sf: Portadillas y separadores. Salvo que haya mucha gente
     distinta usando su impresora, probablemente no estará interesado en
     las páginas separadoras de trabajos. Las páginas de fin de trabajo
     son particularmente molestas cuando se trabaja con procesadores de
     texto, que componen páginas completas, por lo que si especificamos
     sf, tendremos al final de cada trabajo una página en blanco.

     sf es muy útil, sin embargo, si usamos la impresora para listar
     directorios, ficheros en crudo ..., asegurándonos que el trabajo
     sale completo de la impresión. 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 tamaño del tampón de datos, señalando una cantidad en
     bloques de 1 K ( 1024 bits ). Si mx=0, el límite viene dado por el
     espacio disponible en disco. Recuerde que lo que limitamos es el
     tamaño del tampón, no la cantidad de datos impresos.

     Si intentamos sobrepasar el límite, 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 (imágenes, por ejemplo);
  para impresoras ps, no suele tener mucho interés, pues un volumen
  pequeño de datos en formato ps pueden generar una notable cantidad de
  papel impreso.

  Podemos sustituir el límite de mx escribiendo en cada directorio
  tampón un fichero llamado "minfree" que contiene el espacio mínimo
  disponible que permita aceptar trabajos, en forma de fichero texto con
  el número de bloques mínimos disponibles. Normalmente, suele ser un
  enlace con el original en /var/spool/lpd, ya que es inusual que cada
  impresora deba tener un mínimo diferente.

  4.6.2.  Probemos /etc/printcap  con un ejemplo

  El siguiente guión de shell es un filtro de entrada muy simple. Sólo
  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, ahorrándonos las quejas del demonio especificando un
  dispositivo de impresión.

       #!/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
  continuación de línea "\" al final de cada una, excepto la última (de
  hecho, cada entrada en /etc/printcap es una sola línea):

       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 aparecerán
  impresoras sin nombre, no logrará volcar los trabajos, y se acumularán
  en cola generosamente)

  4.6.3.  Valor y al toro: juntémoslo 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 tampón 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 tampón 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 tampón.
     Use por ahora el filtro de prueba anterior. Asegúrese 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--.

  ·  Séptimo: Compruebe que rc.local (normalmente en /etc/rc.d/)
     contiene la línea /sbin/lpd, y añádala si no está. Esto hace que
     arranque el demonio de impresión 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.  Debería
     contener un listado del directorio, con un encabezado.

  ·  Décimo: 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
     suprímalo si no va a utilizar ninguno.

  ·  Once: Reinicie el sistema, o mate el demonio de impresión y
     arránquelo, ya que lpd sólo 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 añadir nuevas impresoras, sólo tendrá que repetir la entrada de
  printcap, con las modificaciones pertinentes a cada dispositivo.

  4.6.4.  Y de la impresión remota, ¿qué?

  Como primer paso, cualquier máquina 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 línea. Es preferible el segundo,
  reservando el primero para proporcionar mayores permisos de acceso, lo
  que debería 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: sólo autorizará el acceso a la impresora a
  los usuarios asignados al grupo admin. Puede también limitar el acceso
  a aquellos usuarios con cuenta en su sistema utilizando el campo
  lógico :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 modificación de /etc/printcap acarrea
  matar el demonio de impresión 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 impresión, el
     cable, y que la impresora física 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 tampón 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 impresión:

  ·  lpd no está arrancado: Vea si rc.local tiene una línea /sbin/lpd;
     si no, añádala y reinicie el sistema. Puede arrancarlo a mano con
     /sbin/lpd como root.

  ·  lpd está funcionando: 5

  5. Compruebe que el filtro de impresión especificado en if funciona.
     (filtro < datos >salida)

  ·  El filtro no funciona: corríjalo, y pruebe de nuevo

  ·  El filtro funciona: 6

  6. Ejecute "lpc status".

  ·  Aparecen más 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.

  ·  sólo 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 líneas, en escalera:
     Necesita un filtro de entrada. Vea ``Efecto Escalera''

  ·  El fichero no se imprime completo: Elimine el límite en mx con
     :mx#0: en /etc/printcap.

  Si tras este rastreo sus dificultades continúan, 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 módulos 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 añadiendo en la configuración de arranque:

       ifconfig lo localhost
       route add localhost

  4.6.6.  ¿Dónde puedo encontrar un printcap  para la impresora xxxxx?

  Si ha leído 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 léase este documento completo.

  4.6.7.  El "efecto escalera", bajo control.

  Mientras que en *DOS el indicador de nueva línea se compone de los
  caracteres CR y LF (retorno de carro y salto de línea), UNIX termina
  las líneas con LF. Esto hace que, si en una impresora configurada para
  *DOS imprimimos un documento UNIX, obtendremos una sucesión de líneas,
  que acabarán marchándose inmediatamente por el margen derecho del
  papel.

  Tenemos dos vías para corregirlo: Reconfigurar la impresora para que
  interprete LF como CR+LF, algo molesto si alterna entre *DOS y Linux,
  o añadir un filtro de impresión, que lo haga sobre la marcha.

  Ofrecemos dos: uno general, y el otro específico 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 carácter

  ^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
  tampón 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 fácil.

  Primero hemos de ver si lpd se queja enviando un error acerca de
  ioctl(TIOEXCL). Si es así, deberíamos conseguir una versión de lpd que
  lo acepte (lpd-590p2, por ejemplo).

  Necesitaremos configurar dos grupos de campos, además de la velocidad
  de transferencia br (Observación: Configurar el campo ":fc:" puede
  puentear el valor del campo ":br#:", así que asegúrese de configurar
  los dos correctamente).

  Cada campo puede tener bits activados y desactivados. Se debe empezar
  desactivándolos con los campos ":fc#*:" y ":xc#*:", para activarlos
  posteriormente con ":fs#*:" y ":xs#*:".

  Configurar br#; es obvio: ":br#9600:

  Es muy fácil traducir la configuración de stty a los campos de
  /etc/printcap. Consulte la página de manual de stty para obtener más
  información.

  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 configuración 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 configuración del puerto al que está
  conectado el equipo.

  Una vez tengamos la configuración 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 sección 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 transmisión)
  coinciden con una de las líneas del listado producido por stty. ¿Ve
  qué fácil?

  Estos campos, en stty, van precedidos por un guión (-). 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, podría usar
  directamente ":fc#0177777:".

  Ahora repita el mismo proceso para las opciones sin guión en la salida
  de stty. En el ejemplo, los bits importantes son CS8 (0000060), HUPCL
  (0002000) y CREAD (0000200). Considere también los indicadores para la
  velocidad de transmisión (en mi caso 0000015).  Súmelos; en este caso,
  tendremos 0002275: el valor del campo :fs#*: (En mi caso, ":fs#02275:"
  funciona).

  Haremos lo mismo con la siguiente sección de termios.h, que comienza
  con "c_lflag bits". En mi caso, no he necesitado ningún 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 página adecuada del manual,
  pero si le persiguen los problemas de configuración, puede evitar que
  lpd establezca la configuración del puerto, haciendo que su impresora
  no presente un dispositivo normal (vea la sección ``'').

  El proceso a seguir es el siguiente:

  1. el campo :lp: de /etc/printcap deberá apuntar a /dev/null1 (créelo
     con mknod /dev/null1 c 1 3), porque no queremos a /dev/null sólo
     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. Asegúrese 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 tampón, y algo debería
     imprimirse si el paso 3 funcionó.

  Ahora, si el proceso con if funciona, y cree que la configuración del
  printcap original es la correcta, vuelva a revisar la configuración
  del puerto, las etiquetas de termios.h ... Si aún no funciona,
  probablemente lpd tiene un defecto, y deba obtener una versión nueva.

  4.6.10.  Impresoras que no son dispositivos simples.

  Piense en una impresora conectada de algún modo tortuoso a nuestra red
  ...  ---agárrese: está enchufada a un ordenador con el que sólo
  podemos comunicarnos mediante correo electrónico---

  Para imprimir a través de lpr, el campo :lp: debería 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 explícitamente 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; también hay quien cree en los Reyes Magos.

  4.7.  Trucos y problemas

  4.7.1.  lpr -i  o como modificar la impresión a nuestro antojo.

  La opción -i envía argumentos al filtro de impresión. Ante todo,
  necesitamos un filtro instalado en printcap para que la opción filtro.
  Si quisiera un filtro que permitiera configurar su impresora sobre la
  marcha, podríamos 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 explícitamente 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 impresión se desactiva, o la cola se vacía, 'lpq' es bastante
  más escandaloso, gritando "Warning: no daemon present", aunque, de
  hecho, no hay condición de error.  Si el demonio está ausente cuando
  hay entradas en la cola, y no ha sido explícitamente detenido,
  probablemente se debe a un fallo en algún filtro. Fíjelo 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 "característica" es
  muy rara en versiones posteriores a lpd-590p2.

  4.7.3.  Impresión sobre red (notas adicionales)

  Dado que la máquina que alberga la impresora física 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 canónicos,
  o direcciones IP. Si no está seguro del nombre completo de una
  máquina, puede incluir todos sus alias conocidos.

  Por motivos de seguridad, es preferible que las máquinas que sólo
  deban tener acceso a la impresora queden restringidas a
  /etc/hosts.lpd.

  Si el servidor de impresión no ejecuta un sistema de impresión tipo
  BSD ( UnixWare, HP-UX versión 10 ,...), debería ser posible trabajar
  con él, teniendo en cuenta que los ficheros de autorización pueden
  variar notablemente, cambiando en cada sistema.

  Si aún 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 impresión

  Los filtros en UNIX, son meramente programas (y como tales deben tener
  permisos de ejecución) que leen la entrada estándar y escriben sobre
  la salida estándar, 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
  estándar 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 línea invoca al intérprete de comandos que lo interpretará.
  Podemos usar csh, bash, perl, tcl, etc...; va por gustos.

  En la segunda línea usamos gs como filtro, indicando que la entrada es
  STDIN ( el guión del final ), y la salida, STDOUT (-sOutputFile=-).
  Lea la página de manual de 'gs' para más detalles.

  Es buena práctica guardar los filtros de entrada en el directorio
  tampón de la impresora en la que se usan (o en /var/spool/lpd/ ),
  aunque las buenas maneras recomienden camas separadas para datos y
  programas.

  Más difícil aún:

       #!/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 impresión remota con lpr, el filtro deberá encontrarse en
  la máquina remota; LPRng obvia este inconveniente.

  4.8.1.  Los filtros de salida

  Son como el goto en 'C', se pueden usar, pero realmente, es difícil
  encontrar aplicaciones para ellos. Dado que cualquier comando de
  iniciación 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.  Depuración 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 línea de comandos
  consiste en incluir la línea

       echo $* >> /tmp/filter-log

  cerca del principio del guión. Recuerde incluir en la primera línea
  que son ejecutables por todo el mundo.

  4.8.3.  Filtros Mágicos

  Tienen de especial estos programas que son capaces de identificar la
  familia de los datos a imprimir a partir de patrones característicos
  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 mágico adecuado y tres filtros no mágicos podemos imprimir
  cosas como esta:

       # lpr -d fich1.dvi fich2.dvi.Z fich3.ps fich4.tex.gz

  Un buen sitio para encontrar filtros mágicos 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 deberían usar como filtros de salida.

  Un ejemplo: el siguiente filtro mágico 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 desazón 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 ningún 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 sólo 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 fácil 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, definición, 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 impresión.

  5.  ¿CÓMO SE IMPRIME ... ?

  Ya sabemos con qué imprimimos bajo Linux. Ahora haremos una visita a
  los programas más normales para generar el texto a imprimir usualmente
  disponibles. Advierta que la mayor parte de los programas de impresión
  bajo otros UNIX pueden ser muy fácilmente adaptados a Linux.

  5.1.  Texto Llano

  Bajo Linux, (como cualquier otro U*X), lo más fácil es imprimir texto
  llano. Cualquier editor estándar de UNIX (vi, emacs), o alguno más
  sofisticado (nedit, jed, .. ) le producirán tantas arrobas de letras
  como desee.

  Además, la mayor parte de los programas que a continuación se
  describen son capaces de generar documentos en texto llano, con las
  órdenes adecuadas.

  5.1.1.  pr

  La mayoría de los ficheros de texto llano en U*X tienen tendencia a
  ser un mar de caracteres, sin saltos de página ni nada que permita un
  documento mínimamente presentable.

  pr surgió para obviar este inconveniente. Procesando el documento a
  través de pr, se le añaden cabeceras y/o pies, números de página,
  márgenes superior e inferior... Como cualquier otra utilidad UNIX, pr
  tiene dos o tres millones de opciones, debidamente reseñadas en la
  página 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, situación 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
  versátil 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
  versión de ghostscript están debidamente relacionados en la
  documentación del programa; puede obtenerse una relación con la orden
  'gs -help'.

  gs se ha convertido en utilidad estándar en la mayoría 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 distribución "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 instalación mínima de los binarios de gs y algunos otros programas
  necesarios para imprimir la documentación de Linux está disponible en

  ftp://sunsite.unc.edu/pub/Linux/apps/tex/texmin/texmin-*.tar.z

  Esta distribución no contiene ningún tipo de letra PostScript (ni las
  necesitará para imprimir ficheros .dvi).

  La documentación 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 versión, más dispositivos soportados. En
  la documentación incorporada se describe el procedimiento para
  desarrollar nuevos dispositivos si fuera necesario.

  gs puede imprimir en la mayoría 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
  opción, al no soportar normalmente la resolución por defecto de
  300x300.

  5.3.  Mi impresora sólo trabaja con PostScript

  Si su impresora sólo 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 más de una página 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 página en formato PostScript a lpr.

  5.3.2.  a2ps, enscript, nenscript

  A partir de un texto ascii llano, a2ps produce una página debidamente
  formateada, con cabeceras, pies, números de página ... 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 versión que tengo, al
  menos) genera un fichero ps que no tiene acentos, eñes .., al no
  definir una tabla tipográfica para ellos. En cambio, nenscript si lo
  hace. --)

  5.3.3.  gslp

  Incluida en la distribución 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 programación, más que un conjunto de
  órdenes de impresión). Hay un ejecutable en la distribución que evita
  dar estos rodeos.

  5.3.4.  Utilidades para PostScript

  Existen cientos de pequeños 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
  académico, es que antes o después uno se acaba topando con Él. TeX es
  un sistema de formateado de textos (-- Nota del revisor:
  Procesador de Documentos--) . Funciona de modo análogo a un
  compilador: El código fuente corre a través del programa tex, y
  obtenemos un fichero .dvi, independiente del dispositivo, que
  normalmente debe ser procesado de nuevo para obtener un documento
  impreso. La altísima 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ª edición, que analiza en detalle
  la versión más 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 través de gs, o directamente
  en la máquina adecuada. La mayoría de las distribuciones de Linux
  incluyen este paquete.

  La orden

       dvips -f1 fich.dvi | lpr

  es típica. dvips responde tanto a los argumentos de la línea de
  comandos como al fichero de configuración "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 apreciarán esta característica.

  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 información 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 además '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 elección.

  Hay otros programas que leen y formatean info desde un fichero
  texinfo.  Están disponibles en ftp://prep.ai.mit.edu/pub/gnu/

  5.6.  *roff ; páginas man

  Si hay un generador de documentos virtualmente universal es troff, y
  sus primos cercanos, debido a que las páginas de manual se escriben
  para ellos. Las órdenes de formato de documentos serán
  ¿sorprendentemente?  familiares para los (no se si aún queda alguno
  vivo) forofos de las versiones más populares de Wordstar.

  La orden para imprimir las páginas de manual es

       man -t <comando> | lpr

  groff traduce la página a PostScript, que se procesa sin mayores
  problemas, como ya sabemos. Obtendremos así una página impresa muy
  aparente. Esto, sin embargo, depende mucho del programa 'man' que
  viene con su sistema. Si el suyo no lo permite, consiga la versión
  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
  página 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

  Estándar emergente donde los haya, los papás de PostScript han
  desarrollado un formato de documentación 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
  versión está en

  http://www.contrib.andrew.cmu.edu/usr/dn0o/xpdf/xpdf.html

  5.8.  Tipos

  (Esta sección contiene información no específica a los dispositivos).
  La información pertinente al dispositivo X11 de gs (y ghostview) se
  incluye en el apartado de visualización.
  Todas las versiones de gs vienen provistas de un surtido de tipos de
  dominio público, 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. Sitúelos (normalmente *.pc?)
  en lib/ghostscript/fonts/, y añada al fichero
  [...]/ghostscript/Fontmap' líneas del estilo

       /Courier            (com_______.pfb) ;

  En el servidor de correo de impresión 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
  información útil acerca de tipos de impresión.

  La conversión entre familias de tipos es delicada. gs incluye
  herramientas para generar tipos escalables a partir de mapas de bits
  (cuanto más grandes, mejor).

  groff tiene también 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 páginas
  de manual. Eche un ojo también al logical fontutils en
  ftp://prep.ai.mit.edu/pub/gnu/.

  5.9.  Documentos para fax.

  Aunque no parezca el lugar más adecuado para su reseña, ¿qué hacemos
  al enviar un fax más 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-módem. Todos
  los programas mencionados contienen utilidades que permiten
  transformar las distintas clases de documentos al formato necesario.
  Además, gs (también 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 gestión de transmisión de datos debe hacerla el
  ordenador anfitrión vía el programa de fax. Esto hace que en
  condiciones de sincronización crítica, el control se vuelve casi
  imposible. Los fax de clase 2 son más caros, pero mucho menos
  propensos a dar guerra. No confunda la 'clase' y el 'grupo'. Deberá
  tener, por supuesto, un fax-módem 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, según el tipo
  de llamada, si activar el fax, o presentar un login. Permite la
  emisión de faxes a través de una red, y tiene un zurillón de
  utilidades. Se configura vía 'configure', y para un ordenador aislado
  es un tanto mastodóntico. La versión actual (4.0 beta 018, según
  escribo ) puede encontrarse en:  http://www.vix.com/hylafax/

  5.9.2.  mgetty+sendfax

  mgetty+sendfax controla sólo fax de clase 2, y puede también actuar
  como contestador automático, si el módem 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 conexión 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.  Visualización

  Hubo un tiempo en que a alguien se le ocurrió el concepto de la
  "oficina sin papeles"; no haría falta manejar papel impreso durante el
  tránsito de documentos. Qué falta de vista. ¿Cómo podríamos 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 materialización.

  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 páginas individuales, o grupos de
  ellas para su posterior impresión. La distribución oficial está en

  ftp://prep.ai.mit.edu/pub/gnu/ghostview-*.tar.gz

  Fácil de construir, ghostview necesita gs para ser ejecutado.  Las
  últimas versiones utilizan las fuentes estándar de X Window,
  facilitando la legibilidad en las condiciones de baja resolución 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 más información de la documentación que acompaña al
  programa, y en la correspondiente página de manual.

  6.1.2.  gspreview

  Tenemos aquí otro interfaz para ghostscript. Más sencillo que
  ghostview, carece del millón 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
  mayoría 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 opción si su equipo no dispone de
  memoria suficiente ( 8 Mb recomendados para ello ). No se preocupe,
  también hay solución.

  6.2.1.  Ghostscript, de nuevo

  Ghostscript incluye en su distribución dispositivos para control del
  soporte físico de los PC; no es una buena solución para UN*X; Las
  últimas distribuciones, sin embargo, incluyen soporte para librerías
  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 vídeo deseado, según los valores que
  aparecen en el fichero de vgalib vga.h.

  Si no lo tiene en su distribución, puede obtener el parche en el
  servidor de correo de impresión, 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 España,
  ftp://sunsite.rediris.es es un mirror inmejorable.--) ).

  6.2.2.  dvgt

  Permite la visualización de ficheros .dvi bajo la librería svgalib, o
  en diferentes clases de terminales gráficas, incluyendo vt, tek, o un
  PC corriendo MS-Kermit. Disponible en sunsite.

  7.  Copyright

  Salvo otra disposición, los documentos COMO de Linux están registrados
  por sus autores respectivos. Los documentos COMO de Linux pueden ser
  reproducidos y distribuidos en todo o en parte, en cualquier medio
  físico o electrónico. Las traducciones y similares están permitidos
  sin necesidad de permiso expreso.

  La redistribución comercial está permitida y recomendada; sin embargo
  a los autores les gustaría tener conocimiento de tales distribuciones.

  Resumiendo: Nos gustaría promover la distribución de esta información
  a través del mayor número de canales posible. Sin embargo, nos
  gustaría retener los derechos de autor de los documentos COMO, y ser
  informados de cualquier plan para su redistribución.

  Si tiene dudas, contacte con Greg Hankins (-- En cuanto a coordinación
  de traducciones al castellano, ver sección ``''--) 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Cortafuegos COMO
  David Rudder, drig@execpc.com
  Traducido por Carlos García Arques cgarcia@isabel.dit.upm.es
  Traducción v0.2, 13 de Agosto de 1996

  El objetivo de este documento es enseñar las bases de la instalación
  de un cortafuegos mediante un PC y Linux. También trata la instalación
  y el uso de Servidores Proxy, dispositivos estos con los que se con­
  sigue un mayor nivel de acceso a la Internet desde detrás de un corta­
  fuegos. Titulo original: "Firewalling and Proxy Server HOWTO" Título
  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.      Introducción

  1.1.    Realimentación

  1.2.    Renuncia de Responsabilidad

  1.3.    Propiedad Intelectual

  1.4.    Las Razones para Escribir Esto

  1.5.    Por Hacer

  1.6.    Lecturas de Interés

  2.      Cortafuegos: Conceptos Básicos

  2.1.    Inconvenientes de los Cortafuegos

  2.2.    Servidores Proxy

  3.      Configuración

  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.      Instalación del Servidor Proxy

  5.1.    Configuración 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 comunicación directa, y uno para la
  comunicación a través del servidor proxy. Socks viene con
  instrucciones de cómo sockificar un programa, así como con un par de
  programas ya sockificados. Si se usa la versíon sockificada para
  conectar con algún sitio al que se tiene acceso directo, socks
  cambiará automáticamente a la versión para acceso directo (la normal).
  Por esta razón 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 dirección del servidor (192.168.2.1 en nuestro
  caso) en el campo SOCKs  del menu Proxys .  Todas las aplicaciones
  necesitarán algún retoque independientemente de cómo manejen la
  existencia de servidores proxy.

  5.5.2.  MS Güindous con el Trumpet Winsock

  5.6.    Cómo conseguir que el Servidor Proxy funcione con UDP

  5.7.    Inconvenientes de los Servidores Proxy

  6.      Configuración Avanzada

  6.1.    Una gran red con énfasis en la seguridad

  6.1.1.  Configuración de la Red

  6.1.2.  El Servidor Proxy

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Los cortafuegos han adquirido gran popularidad de un tiempo a esta
  parte como el último grito en seguridad en la Internet. Como la
  mayoría de las cosas que la adquieren, con la popularidad han llegado
  los malentendidos.  En este Howto se cubrirán las bases de lo que es
  un cortafuegos, cómo configurar uno, qué servidores proxy hay, cómo
  configurarlos, y las aplicaciones de esta tecnología fuera del campo
  de la seguridad.

  1.1.  Realimentación

  Todo apoyo o crítica a este documento será bienvenido. Estoy buscando
  con especial interés críticas de la gente que usa Macintoshes, ya que
  la información que tengo de ellos es escasa. ¡¡¡POR FAVOR, COMUNICADME
  CUALQUIER INEXACTITUD EN ESTE DOCUMENTO!!! Soy humano, y puedo cometer
  errores. Si encontráis 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 dirección de correo electrónico es drig@execpc.com

  1.2.  Renuncia de Responsabilidad

  Este documento intenta ser una introducción al funcionamiento de los
  cortafuegos y servidores proxy. No soy, ni pretendo ser, un experto en
  seguridad. Soy simplemente un tipo que ha leído mucho y al que le
  gustan los ordenadores más que al resto de la gente. NO SOY
  RESPONSABLE DE NINGÚN DAÑO 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 párrafo anterior, excepto donde dice escribir,
  que debe leerse traducir. Y donde dice experto en seguridad léase
  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 físico o electrónico, siempre que este anuncio de
  copyright se mantenga en todas las copias. La redistribución comercial
  está permitida y se anima a ella.  No obstante, al autor le gustaría
  ser informado de cualquiera de tales distribuciones.

  Todas las traducciones, trabajos derivados, o trabajos de recopilación
  que incorporen cualquier Howto de LiNUX, deben estar cubiertos por
  este copyright. Esto es, no se puede producir ningún trabajo derivado
  de un Howto e imponer restricciones adicionales a su distribución.
  Pueden ser autorizadas excepciones a estas reglas bajo ciertas
  condiciones. Por favor, contacte con el coordinador de los Howtos de
  LiNUX en la dirección que se da más abajo.

  Resumiendo, queremos promover la diseminación de esta información a
  través de todos los cauces posibles. No obstante, deseamos mantener la
  propiedad intelectual de los Howtos, y nos gustaría ser advertidos de
  cualquier proyecto de redistribución de los Howtos.

  Para cualquier pregunta, por favor, contacte con David Rudder
  drig@execpc.com

  1.4.  Las Razones para Escribir Esto

  Hubo muchos artículos en comp.os.linux.* a lo largo de, más o menos,
  el año pasado pidiendo ayuda sobre cortafuegos. Parecía como si nadie
  fuera a contestarlos. Supuse que la razón era que nadie sabía cómo.
  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 cómo hacer esto en un Macintosh

  ·  Aprender sobre diferentes paquetes de TCP/IP para Güindous

  ·  Encontrar un buen servidor proxy de UDP que funcione con LiNUX

  1.6.  Lecturas de Interés

  ·  La documentación del juego de herramientas de TIS

  ·  El Howto del NET-2

  ·  PPP-Como

  ·  El Howto de la Ethernet

  ·  El MINIHowto de las Múltiples Ethernets

  ·  Networking with LiNUX

  ·  La guía del administrador de red TCP/IP de O'Reilly and Associates

  Las herramientas para cortafuegos de TIS traen una colección de
  documentos que se encuentran entre los mejores que he leído sobre
  cortafuegos y asuntos relacionados. En la sección ``'' se habla más de
  las herramientas de TIS.

  2.  Cortafuegos: Conceptos Básicos

  Cortafuegos es el término que se emplea para referirse a una franja de
  bosque que se limpia de árboles, vegetación, 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 lógico que protege una red privada del resto de la red
  (pública). 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 reenvío 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 reenvío 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 métodos más comunes, como el bombardeo de emails, o el
  nefasto "Gusano de Internet", simplemente no podrá alcanzarla. Con
  esto se consigue una protección 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. Básicamente, reducen el uso de
  la Internet al que se podría hacer desde un terminal. Tener que entrar
  en el cortafuegos y desde allí realizar todo el acceso a Internet es
  una restricción muy seria. Programas como Netscape (pronúnciese
  Nescafé), que requieren una conexión directa con la Internet, no
  funcionan desde detrás de un cortafuegos. La solución 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 detrás de un cortafuegos. Funcionan abriendo un socket
  en el servidor y permitiendo la comunicación con la Internet a través
  de él.  Por ejemplo: si mi ordenador, drig, estuviera dentro de la red
  protegida y quisiera ver el Web con Netscape, pondría un servidor
  proxy en el cortafuegos. El servidor proxy estaría configurado para
  hacer que las peticiones de conexión de mi ordenador al puerto 80 de
  otra máquina, se conectara a su puerto 1080, y él mismo establecería
  una conexión con el puerto 80 de la máquina deseada. A partir de
  entonces reenviaría todos los datos de esa conexión a la otra máquina.

  Quien haya usado TIA o TERM se ha encontrado este concepto antes. Con
  estos dos programas se puede redirigir un puerto. Un amigo tenía 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 revés. 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 través de ellos.

  3.  Configuración

  3.1.  Requerimientos de Hardware

  Para nuestro ejemplo, el ordenador es un 486-DX66 con 8 Megas de RAM,
  una partición para Linux de 500 Megas, y una conexión PPP a un
  proveedor de Internet a través de un módem de 14.400 bps . Ese es
  nuestro linux básico.  Para convertirlo en un cortafuegos le añadimos
  una tarjeta Ethernet NE2000. Con ella queda conectado a tres PC'es con
  Güindous 3.1 y Trumpet Winsock, y a dos Sun'es con SunOs. La razón 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 . Además tenemos una red Ethernet que conecta el LiNUX y el
  resto de los ordenadores. Lo primero, debemos recompilar el núcleo con
  las opciones apropiadas. En este momento yo echaría un vistazo al
  Kernel-Como, al Ethernet-HOWTO, y al NET-3-HOWTO.  Luego teclearía
  "make config":

  Las opciones requeridas son:

  1. Habilitar el Soporte de Red

  2. Habilitar la opción de red TCP/IP (TCP/IP Networking)

  3. Deshabilitar el reenvio de paquetes IP (CONFIG_IP_FORWARD)

  4. Habilitar la opción 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 núcleo y rearrancamos la
  máquina.  Las interfaces deberían ser reconocidas en la secuencia de
  arranque para que todo estuviera bien. Si no, habría 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 máquinas, no necesitamos usar direcciones
  reales. Una buena elección 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 petición al
  exterior. De modo que, en esta configuración, sólo se necesita una
  dirección IP real. Las otras se pueden elegir libremente y de ninguna
  manera afectarán a la red.

  Asignamos la dirección IP real al puerto serie del cortafuegos que
  usamos para la conexión PPP. Asignamos 192.168.2.1 a la tarjeta
  Ethernet del cortafuegos. Asignamos a las otras máquinas de la red
  protegida cualquier dirección 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
  estén conectados a nuestra red local. Si no funciona es que el PPP
  está mal configurado. Tendríamos que volver a leer el Net-3-HOWTO y a
  probar.

  Ahora probaremos a hacer pings entre las máquinas de la red protegida.
  Todas deben ser capaces de hacer ping a las demás. Si no fuera así,
  habría que leer de nuevo el Net-3-HOWTO y trabajar en la red un poco
  más.

  Ahora, todas las máquinas de la red protegida deben ser capaces de
  hacer pings al cortafuegos. Si no, vuelta atrás. Recuerda: deberían
  ser capaces de hacer ping a la 192.168.2.1, no a la dirección PPP.

  Entonces probaremos a hacer ping a la dirección 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 núcleo. Al haber asignado a la red protegida la
  dirección 192.168.2.0 ningún paquete será encaminado a ella por la
  Internet, pero, en cualquier caso, es más seguro tener el reenvío 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 máquinas de la red protegida
  desde el cortafuegos. Llegados a este punto, no debería haber
  problemas.

  Ya tenemos una disposición de cortafuegos básica.

  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
  configuración del así llamado "superservidor" (inetd), que arranca un
  buen número de demonios servidores cuando les llega una petición.

  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 sólo rlogin, o viceversa.

  Para desactivar un servicio basta con poner un # al comienzo de la
  linea que se refiera a él.  Después hay que mandar una señal SIG-HUP
  al proceso inetd tecleando "kill -HUP <pid>", donde <pid> es el número
  de proceso de inetd. Esto hará que inetd relea su fichero de
  configuración (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 ningún software aparte
  del núcleo de LiNUX y los programas básicos 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 consideración. Ahora les
  daremos un rápido repaso.

  4.2.  El juego de herramientas para cortafuegos de TIS

  TIS ha sacado una colección de programas para facilitar la realización
  de cortafuegos. Básicamente, los programas hacen lo mismo que el
  paquete Socks, pero tiene una estrategia de diseño 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 configuración 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 explícitamente.

  Con las herramientas TIS, se arranca un demonio para el Web y otro
  para el Telnet, y se escribe un fichero de configuración para cada
  uno. Después de haber hecho eso, el resto de formas de acceso a
  Internet siguen prohibidas hasta que se configuren explícitamente. 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 fácil 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 más acceso a la Internet del que
  se quería. Con las herramientas TIS, la gente del interior tiene
  solamente el acceso que el administrador del sistema quiera que
  tengan.

  Socks es más fácil de configurar, más fácil 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 protección 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 quién
  tiene acceso a nuestra máquina y a qué servicios, así como registrar
  las conexiones. También ofrece detección básica de impostores.

  El limitador de TCP no se cubre de manera más 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 dirección IP.

  ·  Sólo controla la máquina en la que está instalado, y por lo tanto
     no sirve para una red. Los cortafuegos pueden proteger todas las
     máquinas cualquiera que sea su arquitectura. El limitador de TCP no
     funciona en Macintoshes ni en MS Güindouses.

  5.  Instalación 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 configuración en ese
  directorio, se llama "socks-conf". Debemos descomprimir y
  desempaquetar los ficheros en un directorio de nuestro ordenador, y
  seguir las instrucciones de cómo compilarlo. Yo tuve un par de
  problemas compilándolo. 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 añadir el servidor
  proxy al /etc/inetd.conf. Se debe añadir 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.  Configuración del Servidor Proxy

  El programa socks necesita dos ficheros de configuración distintos.
  Uno en el que se le dice qué accesos están 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 máquinas Ún*x. Las máquinas DOS y,
  presumiblemente, las Macintosh encaminarán por sí mismas.

  5.2.  El Fichero de Control de Acceso

  Con socks4.2 Beta, el fichero de acceso se llama "sockd.conf".
  Debería contener dos tipos de líneas: las de permiso, que contienen
  "permit" y las de prohibición, que contienen "deny". Cada linea tendrá
  tres palabras:

  ·  El identificador (permit/deny)

  ·  La dirección IP

  ·  El modificador de dirección

  El identificador es o permit (permitir) o deny (denegar). Debería
  haber uno de cada.

  La dirección IP se compone de cuatro octetos según la típica notación
  de puntos: p.ej. 192.168.2.0 .

  El modificador de dirección es también un número de cuatro octetos.
  Funciona como una máscara de red. Hay que verlo como 32 bits (unos o
  ceros). Si el bit es uno, el bit correspondiente de la dirección que
  se comprueba debe coincidir con el bit correspondiente del campo de
  dirección IP.
  Por ejemplo, si la línea es:

       permit 192.168.2.23 255.255.255.255

  entonces, admitirá sólo direcciones IP en las que coincidan todos los
  bits de 193.168.2.23, esto es, sólo ella misma. La línea:

       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 debería tener la
  línea:

       permit 192.168.2.0 0.0.0.0

  dado que permitiría cualquier dirección.

  Así que, primero, permitimos todas las direcciones que queramos
  permitir, y después prohibimos el resto. Para permitir a cualquiera
  del rango 192.168.2.xxx, las líneas:

       permit 192.168.2.0 255.255.255.0
       deny 0.0.0.0 0.0.0.0

  funcionarán perfectamente. Observa los primeros "0.0.0.0" en la linea
  de prohibición. Con un modificador de 0.0.0.0, el campo de la
  dirección IP no importa. Se suele poner todo ceros porque es fácil de
  teclear.

  Se puede poner más de una línea de cada clase.

  También se puede autorizar o denegar el acceso a determinados
  usuarios.  Se consigue gracias a la autentificación del protocolo
  ident. No todos los sistemas soportan ident (incluyendo al Trumpet
  Winsock) de modo que no profundizaré en ello. La documentación 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 fácil confundirlos.

  El fichero de rutado tiene la función de decir a los clientes de socks
  cuándo usar socks y cuándo no. Por ejemplo, en nuestra red la máquina
  192.168.2.3 no necesita usar socks para comunicarse con la 192.168.2.1
  (el cortafuegos), ya que tiene una conexión directa vía Ethernet. La
  127.0.0.1, dirección de "vuelta atrás" (que representa a una máquina
  ante ella misma), está definida automáticamente. 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,
  dirección, y modificador. Generalmente, dado que esto también 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 poniéndolo 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, dirección, y
  modificador. Nuestro ejemplo tendría:

  direct 192.168.2.0 255.255.255.0

  Con lo que iría directamente a cualquier máquina de la red protegida.

  La entrada sockd dice cuál es la máquina 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 sólo usamos un servidor
  proxy, pero se puede tener muchos para admitir una carga mayor y
  conseguir redundancia frente a fallos.

  La dirección IP y el modificador funcionan como en los otros ejemplos.
  Especifican a qué direcciones se va a través de los servidores.

  5.4.  El Servicio de Nombres tras el Cortafuegos

  Instalar un Servicio de Nombres detrás de un cortafuegos es
  relativamente simple. No hay más que instalar el servidor de DNS en la
  máquina que hace de cortafuegos. Luego se hace que todas las máquinas
  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 comunicación directa, y uno para la comunicación a través del
  servidor proxy. Socks viene con instrucciones de cómo sockificar un
  programa, así como con un par de programas ya sockificados. Si se usa
  la versíon sockificada para conectar con algún sitio al que se tiene
  acceso directo, socks cambiará automáticamente a la versión para
  acceso directo (la normal). Por esta razón 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 dirección del
  servidor (192.168.2.1 en nuestro caso) en el campo SOCKs  del menu
  Proxys .  Todas las aplicaciones necesitarán algún retoque independi­
  entemente de cómo manejen la existencia de servidores proxy.  Unix

  5.5.2.  MS Güindous con el Trumpet Winsock

  El Trumpet Winsock lleva incorporada la gestión de servidores proxy.
  En el menú "setup" se debe poner la dirección 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.  Cómo conseguir que el Servidor Proxy funcione con UDP

  El paquete socks sólo 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 diseñado 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 líneas, 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 número de máquinas 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
  envío directo de correo a los ordenadores de dentro. Estos
  inconvenientes pueden parecer pequeños, pero consideremos los
  siguientes casos:

  ·  Te has dejado un informe que estás haciendo en tu ordenador que
     está dentro de la red protegida por el cortafuegos. Estás 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
     preferirías que el correo llegara directamente a tu máquina.
     Confías plenamente en el administrador de tu sistema, pero, aún
     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 conexión con la máquina
  cliente y manda la información por ella. Un servidor proxy no lo
  permitirá, así que el FTP no funciona especialmente bien.

  Además, un servidor proxy es lento. Debido a la gran sobrecarga, casi
  cualquier otro medio de lograr acceso será más rápido.

  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 deberías 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 más rápido, permiten mejores conexiones, y proveen un mayor nivel
  de acceso a la red interior desde la Internet. Los servidores proxy
  están 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 instalación.

  6.  Configuración Avanzada

  Hay una configuración que me gustaría mostrar antes de dar por
  terminado este documento. La que acabo de comentar bastará seguramente
  para la mayoría de la gente. Sin embargo, pienso que el próximo
  ejemplo mostrará una más avanzada que puede resolver algunas dudas.
  Si tienes preguntas que trascienden lo cubierto hasta aquí, o
  simplemente estás 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 líder de la Vigésimo Tercera
  Hermandad de la Discordia de Milwaukee. Te gustaría 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
  discípulos según el nivel en que están. Obviamente, querrás proteger
  ciertas partes de la red de los discípulos que no están en ese nivel.

  Renuncia de Responsabilidad: No soy miembro de la Hermandad de la
  Discordia. No conozco su terminología, 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 enseña a cualquiera.
     Básicamente es un rollo patatero sobre Eris, Diosa de la Discordia,
     y un montón de chorradas más.

  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 también Jehová.

  3. Adepto. Aquí es donde se encuentra el verdadero plan. En este nivel
     se guarda toda la información de cómo la Sociedad de la Discordia
     va a dominar el mundo gracias a un diabólico, aunque jocoso, plan
     que implica a Newt Gingrich, los Cereales Wheaties, O.J. Simpson, y
     quinientos cristales de cuarzo erróneamente etiquetados como de 6,5
     MHz.

  6.1.1.  Configuración de la Red

  Las direcciones IP se disponen así:

  ·  Una dirección es 192.168.2.255, que es la de difusión y por lo
     tanto no utilizable.

  ·  23 de las 32 direcciones IP se asignan a las 23 máquinas accesibles
     desde la Internet.

  ·  Una dirección IP extra es para una máquina LiNUX en esa red.

  ·  Una dirección IP extra es para otra máquina 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, sólo 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 habitación separada.
  Se utilizan Ethernets de infrarrojos, de tal manera que son
  completamente invisibles desde la habitación 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 máquinas 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
  dirección 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 también está deshabilitado en los dos
  LiNUXes.  El router no encaminará paquetes con destino 192.168.2.xxx a
  menos que se le diga explícitamente, así que la Internet en ningún
  caso podría acceder al interior. La razón 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 simbólicos pueden hacer que se compartan los
  ficheros comunes entre todos. Con esta configuración 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 diabólicos propósitos, 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 están
  detrás de sendos cortafuegos, luego es necesario instalar servidores
  proxy para ellas.

  Las dos redes se configurarán de forma muy parecida. Ambas tienen las
  mismas direcciones IP asignadas. Añadiré un par de requisitos para
  hacerlo más 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. Están
     formándose, y la adquisición de ese tipo de información podría
     resultar dañina.

  Así, el fichero sockd.conf en el LiNUX de los iniciados tendrá esta
  línea:

       deny 192.168.2.17 255.255.255.255

  y en la máquina de los adeptos:

       deny 192.168.2.23 255.255.255.255

  Y, el LiNUX de los iniciados tendrá esta línea

       deny 0.0.0.0 0.0.0.0 eq 80

  Que dice que se deniegue a todas las máquinas el acceso al puerto
  igual (eq) a 80, el puerto del http. Esto aún permitirá el acceso a
  otros servicios, sólo impedirá el acceso al Web.

  Además, ambos ficheros contendrán:

       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á más 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á más o menos:

       deny 192.168.2.23 255.255.255.255
       permit 192.168.2.0 255.255.255.0

  Con esto todo debería estar configurado correctamente. Cada red está
  aislada como corresponde, con el grado apropiado de interacción. Todo
  el mundo debería 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  DNS COMO
  Nicolai Langfeldt janl@math.uio.no Traducción: Pedro Pablo
  Fábrega Martínez pfabrega@arrakis.es Julio 1997
  v1.3.2, 3 Junio 1997

  COMO ser un administrador DNS en poco tiempo.
  ______________________________________________________________________

  Índice General:

  1.      Preámbulo

  1.1.    Rollo Legal

  1.2.    Créditos y solicitud de ayuda.

  1.3.    Dedicatoria

  2.      Introducción.

  3.      Servidor de nombres de ``sólo 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 teoría a secas.

  4.2.    Nuestro propio dominio

  4.3.    Relajémonos

  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.      Configuración de Conexiones Automáticas vía telefónica

  8.      PUFs Preguntas de Uso Frecuente (FAQ)

  8.1.    ¿Cómo uso DNS desde dentro de un cortafuegos ( firewall )?

  8.2.    ¿Cómo 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.    ¿Cómo configuro un servidor de nombres secundario?

  8.6.    Quiero que bind  se ejecute cuando me desconecto de la red.

  8.7.    ¿Dónde almacena su caché el servidor de nombres? ¿Hay alguna
  forma de controlar el tamaño del caché?

  8.8.    ¿Salva named  el caché entre reinicios? ¿Puedo guardarlo?

  9.      Cómo hacerse un gran admin  DNS.

  10.     Traducción

  11.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Preámbulo

     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, distribúyalo libremente, pero mantenga el mensaje de
  copyright.

  1.2.  Créditos y solicitud de ayuda.

  Quiero dar las gracias a Arnt Gulbrandsen, quien leyó los borradores
  para este trabajo dedicándole mucho de su tiempo y proporcionando
  muchas y muy útiles sugerencias. También 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
  envía un E-mail, por favor asegúrese de que su dirección de remitente
  es correcta, recibo un montón de E-mail. Asimismo, por favor lea la
  sección de las PUF (``PUFs'') antes de enviarme un mail.

  Si quiere traducir este COMO, por favor notifíquemelo 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.  Introducción.

  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 máquinas y el
  software que mapea los nombres a números IP. Este documento COMO trata
  de cómo definir tales conversiones usando un sistema Linux. Una
  conversión es simplemente una asociación entre dos cosas, en este caso
  un nombre de máquina, como ftp.linux.org y el número IP de la máquina,
  199.249.150.4.

  El DNS es, para los no iniciados (Vd. ;-), una de las áreas mas opacas
  de la administración de una red. Este COMO tratará de aclarar algunas
  cosas.

  Este documento describe cómo 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 máquina
  más solicitados, obteniéndolas de servidores externos.--) , y
  continuaremos con la configuración de un servidor DNS primario para un
  dominio. Para configuraciones más complejas puede consultar la sección
  de PUF (``'') de este documento. Si lo que busca no está descrito
  allí, necesitará Documentación Real.  Volveremos a lo que es la
  Documentación Real en el último capítulo.

  Antes de empezar, debe configurar su sistema convenientemente, de
  forma que pueda hacer telnet desde y hacia su máquina, efectuando
  satisfactoriamente toda clase de conexiones de red, especialmente
  telnet 127.0.0.1 entrando en su propia máquina (compruébelo ahora).
  También 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 configuración y no funciona en red, el NET-2 HOWTO explica
  como hacerlo. Léalo.

  Si está usando SLIP o PPP necesitará que funcionen correctamente. Lea
  el PPP-COMO si no es así.

  Cuando digo ``su máquina'' quiero decir la máquina en la que está
  intentando configurar DNS. No cualquier otra máquina que pueda tener
  en su red.

  Supongo que no está detrás de cualquier clase de cortafuegos
  (firewall) que bloquee peticiones de nombres. Si necesita una
  configuración especial, vea la sección 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
  mayoría 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 más voluminosos fuentes en
  ftp://ftp.vix.com/pub/bind, bien de los subdirectorios de versión
  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 demás obtendrán
  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 funcionarán (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 después si no funciona
        podrá volver al principio.

  3.  Servidor de nombres de ``sólo cacheo''.

  Un primer ataque a la configuración DNS, muy útil para los usuarios de
  conexiones telefónicas.

  Un servidor de nombres de ``sólo 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
  próxima vez que lo necesite.

  Lo primero que necesita es el archivo llamado /etc/named.boot.  Este
  archivo es leído 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 carácter no blanco. Se supone que estos
        caracteres NO están en el archivo.  Borre cualquier espacio
        inicial de los archivos que corte y pegue de este COMO.

  La línea directory indica a named dónde buscar los archivos. Todos los
  archivos indicados a continuación serán 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 debería 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 raíz en el mundo. Este
  archivo cambiará a lo largo del tiempo y tiene que ser mantenido y
  actualizado con una cierta regularidad.  Vea la sección de
  mantenimiento (``'') para saber cómo mantenerlo actualizado. Este
  archivo está descrito en la página man de named, pero esto es, IMHO
  (-- In My Honest Opinion, EMMO o En Mi Modesta Opinión en
  castellano.--) , más apropiado para gente que ya comprende named.

  La siguiente línea de named.boot es la línea primary.  Explicaré su
  uso en un capítulo 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 continuación 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 línea `search' especifica en qué dominios se buscaría para
  cualquier nombre de máquina a la que quiera conectar. La línea
  `nameserver' especifica la dirección de su servidor de nombres, en
  este caso su propia máquina, ya que es ahí donde named se estará
  ejecutando. Si quiere una lista de varios servidores ponga una línea
  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
  continuación 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), después sunsite.unc.edu.su-dominio.edu, y finalmente
  sunsite.unc.edu. Puede que no quiera poner demasiados dominios en la
  línea search, lleva su tiempo el efectuar las búsquedas.

  El ejemplo supone que pertenece al dominio subdominio.su-dominio.edu,
  su máquina probablemente se llame su-maquina.subdominio.su-
  dominio.edu. La línea search no debería contener su TLD (Top Level
  Domain o Dominio de Nivel Superior, `edu' en este caso).  Si necesita
  conectar frecuentemente con máquinas de otro dominio, puede añadir ese
  dominio a la línea 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, dése cuenta de la falta de puntos al final de estos
  nombres de dominio.

  Lo siguiente, dependiendo de su versión de la librería 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 dónde obtener
  las diferentes clases de tipos de datos, y de cuál archivo o base de
  datos.  Generalmente contiene comentarios útiles al comienzo, que por
  cierto debería considerar leer ahora. Después busque la línea que
  comienza por hosts:, debe leerse:

       hosts:      files dns

  Si no hay una línea que comience por `hosts:' póngala. Eso indica que
  los programas deben mirar primero en el fichero /etc/hosts , y después
  comprobar DNS de acuerdo con resolv.conf.

  3.3.  /etc/host.conf

  Probablemente contiene varias líneas, una de ellas debería comenzar
  con order y tendría que parecerse a lo siguiente:

  order hosts,bind

  Si no hay una línea order tiene que incluirla.  Esto le indica a las
  rutinas de resolución 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 están documentados en
  la página de manual resolv (8) (haciendo man 8 resolv)  en la mayoría
  de las distribuciones Linux. Esta página de manual es de obligada
  lectura IMHO, y todos, especialmente los administradores DNS, deberían
  leerla. Hágalo ahora, si se dice a sí mismo ``lo haré más tarde''
  entonces nunca lo hará.

  3.4.  Arranque de named

  Después de todo esto, ya es hora de iniciar named.  Si está utilizando
  una conexión telefónica, conéctese 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
  sección PUF (``''). Ahora ya puede comprobar su configuración. 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) debería 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 equivocación.
  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 atrás y compruébelo 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 máquina
  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 máquina pat.uio.no.
  Contactará con alguna de las máquinas 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 línea ``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
  información de la caché puede no estar actualizada. Entonces informa
  de este peligro (de modo un tanto eufemístico) con Non-authorative
  answer:. Cuando nslookup dice esto la segunda vez que pregunta por una
  máquina, es un signo seguro de que named almacena la información en la
  caché y que está funcionando. Ahora puede salir de nslookup usando el
  comando exit.

  Si es un usuario de conexiones telefónicas, (ppp, slip) por favor lea
  la sección sobre conexiones telefónicas (``''), hay algunas
  advertencias para Vd.

  Ahora ya sabe cómo configurar un servidor de nombres de ``sólo
  cacheo''.  Tómese 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 teoría a secas.

  Antes de comenzar realmente con esta sección, voy a dar un poco de
  teoría sobre cómo funciona DNS.  Y lo va a leer porque será mejor para
  Vd.  Si no quiere, al menos debería echar un vistazo rápido. Deje el
  repaso cuando sepa lo que debe incluir en su archivo named.boot.

  El DNS es un sistema jerárquico. La raíz se escribe como `.' y se
  denomina `root'. Debajo hay cierto número de Dominios de Nivel
  Superior (Top Level Domains, TLDs), los más conocidos son ORG, COM,
  EDU y NET, pero hay muchos más.

  Cuando se busca una máquina, la pregunta procede recursivamente en la
  jerarquía comenzando desde arriba. Si quiere localizar la dirección 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 raíz.

            > server c.root-servers.net.
            Default Server:  c.root-servers.net
            Address:  192.33.4.12

  Pone el tipo de petición (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 búsqueda
  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 quién 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 máquina no son sensibles a mayúsculas/minúsculas, pero
  como yo uso el ratón 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
  información que haya encontrado mientras profundizaba en la búsqueda,
  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. También está anidado como los dominios nombre de la máquina
  cuando conocemos su dirección IP. Una cosa importante aquí es observar
  que que las direcciones IP están escritas en orden inverso en el
  dominio in-addr.arpa. Si tiene la dirección de máquina 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 inversión de números puede ser confusa los 2 primeros años.

  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 máquinas 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 línea 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 línea nombra al archivo pz/127.0.0
  como definición 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 jerarquía 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 notación especial que simboliza el origen, y
  como la columna dominio para este archivo indica 0.0.127.in-addr.arpa.
  La primera línea realmente significa:

              0.0.127.IN-ADDR.ARPA. IN      SOA ...

  NS es el RR Name Server (Servidor de Nombres), e indica a DNS qué
  máquina 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 preámbulo 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 dónde proviene (una
  máquina llamada linux.bogus), quién es el responsable de su contenido
  (hostmaster@linux.bogus), qué versión 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 quién efectúa 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 línea, primary,
  en named.boot:

       primary               linux.bogus                     pz/linux.bogus

  Observe que continúa 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 inglés 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 máquina actual con un registro A. No es legal tener un
  registro CNAME para la máquina mencionada en el registro SOA. Su
  nombre no necesita ser ns, podría ser cualquier nombre legal de
  máquina. A continuación, en hostmaster.linux.bogus deberá aparecer
  algo como hostmaster@linux.bogus; esto sería un alias de email, o una
  cuenta de correo, donde la(s) persona(s) que realizan el mantenimiento
  de DNS deberían leer con frecuencia el correo. Cualquier email
  respecto del dominio será mandado a la dirección aquí indicada. El
  nombre no tiene por que ser hostmaster, puede ser cualquier dirección
  email legal, pero la dirección 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 también mail.linux.bogus o
  mail.friend.bogus.  El número que precede a cada nombre de máquina es
  la prioridad del RR MX.  El RR con el número más bajo (10) es aquel al
  que el correo será enviado primero.  Si este falla, puede ser mandado
  a otro con un número más 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 línea

              linux.bogus     preference = 10, mail exchanger = mail.linux.bogus.linux.bogus

  está equivocada. Debería 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 línea

            @               MX      10 mail.linux.bogus     ; Intercambiador de Correo Primario

  no tiene punto. O tiene demasiados linux.bogus.  Si un nombre de
  máquina no termina en punto en un archivo de zona, el origen es
  añadido a su final. Así,

       @               MX      10 mail.linux.bogus.    ; Intercambiador de Correo Primario

  o

       @               MX      10 mail                 ; Primary Mail Exchanger

  serán correctos. Yo prefiero la última forma, hay que escribir menos.
  En un archivo de zona el dominio debería 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
  debería haber puntos después de los nombres de dominio. No tiene ni
  idea de cuantas veces un '.' por estar o por no estar ha hecho fallar
  toda una configuración y ha confundido horrorosamente a la gente...

  Una vez hecha esta puntualización, he aquí el nuevo archivo de zona,
  con algo de información extra también:

  ;
  ; 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 máquina, 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 máquina 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, sólo pueden referirse a registros A.

       fulanito  CNAME   richard                 ; ¡¡¡NO!!!

  siendo correcto tener

       fulanito  CNAME   ns                      ; ¡¡¡SI!!!

  También es importante observar que CNAME no es un nombre de máquina
  legal para direcciones de correo: webmaster@www.linux.bogus es una
  dirección email ilegal dada en la configuración 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 quizás algunos otros también, 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 haría 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 sólo:

            > 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 dirección 127.0.0.2. Parece correcto
  también.

  4.3.  Relajémonos

  Desde luego, este dominio es falso, y como tal son todas sus
  direcciones, y quizás, desafortunadamente sea un poco confuso. Para un
  ejemplo real de dominio vea la siguiente sección.

  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 explicación 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 sólo como lectura de referencia. Si quiere
  experimentar, hágalo 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 podrían diferir de los que encuentre si
  pregunta ahora al servidor de nombres LAND-5. También tenga en mente
  eliminar los espacios iniciales ;-).

  5.1.  /etc/named.boot  (o /var/named/named.boot )

  Aquí encontramos la líneas primary para las dos zonas que necesitamos:
  la red 127.0.0.0 y también la subred 206.6.177 de LAND-5. Una línea
  primary para la zona de redirección (forward) land-5.com de land-5.
  Observe también que en lugar de situar los archivos en un directorio
  llamado pz, como hago en este COMO, él los sitúa 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 varía 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 básico, el registro obligatorio SOA, y el registro que mapea
  127.0.0.1 a localhost. Se requieren ambos. No debería haber ninguno
  más en este fichero. Probablemente nunca se necesitará actualizarlo,
  salvo que cambien su servidor de nombres o la dirección 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. También podemos ver que tiene una máquina 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 número de serie en
  el formato habitual yyyymmdd con el número de serie de hoy añadido;
  esta es probablemente la sexta versión del archivo de zona del 20 de
  Septiembre de 1996.  Recuerde que el número de serie debe
  incrementerse monótonamente, aquí hay sólo un dígito para las series
  de hoy, así que después de 9 ediciones tendrá que esperar hasta mañana
  antes de poder editar el el archivo de nuevo. Considere el uso de dos
  dígitos.

  @       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 números IP. Usar tal convención puede simplificar el
  mantenimiento significativamente, pero puede resultar un poquito
  impersonal.

  5.5.  /var/named/zone/206.6.177

  Comentaré este archivo después.

       @               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 resolución inversa es la parte de la configuración que
  parece crear más dolores de cabeza. Se usa para encontrar el nombre de
  la máquina a partir de su dirección IP. Ejemplo: suponga que está en
  un servidor irc y acepta conexiones de clientes irc.  El servidor irc
  es noruego y sólo quiere aceptar conexiones de clientes de Noruega y
  otros países escandinavos. Cuando se produce una conexión de un
  cliente, la librería C es capaz de indicar el número IP de la máquina
  conectada porque el número IP del cliente está contenido en todos los
  paquetes que se pasan a través de la red. Ahora puede llamar a una
  función llamada gethostbyaddr que busca el nombre de la máquina dada
  su dirección IP.

  gethostbyaddr interrogará a un servidor DNS el cual efectuará una
  búsqueda DNS para la máquina. Suponiendo que la conexión cliente viene
  de ws_177200.land-5.com, la dirección IP que la librería C proporciona
  al servidor irc será 206.6.177.200. Para encontrar el nombre de la
  máquina necesitamos encontrar 200.177.6.206.in-addr.arpa. El servidor
  DNS primero encuentra los servidores arpa., después los servidores in-
  addr.arpa., a continuación 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 explicación de cómo
  buscar prep.ai.mit.edu, esto es ligeramente ficticio.

  Volviendo al ejemplo del servidor irc.  El servidor irc sólo acepta
  conexiones de los países 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 conexión. Si no hubiese habido
  resolución inversa de 206.2.177.200 mediante la zona in-addr.arpa el
  servidor habría sido incapaz de de encontrar el nombre y habría tenido
  que comparar 206.2.177.200 con *.no, *.se y *.dk, es decir, cifras con
  nombres, ninguna de las cuales concordaría.

  Algunas personas le dirán que la resolución inversa sólo 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 aceptarán conexiones de máquinas de las cuales no son capaces de
  resolver el nombre. Por tanto el mapeo inverso de máquinas es de hecho
  obligatorio.

  6.  Mantenimiento

  Manteniéndolo en funcionamiento.

  Hay una tarea de mantenimiento que tiene que realizar con named,
  además de mantenerlo en funcionamiento. Esta tarea es mantener el
  archivo root.cache actualizado. La forma más fácil es usar dig,
  primero ejecute dig sin argumentos, conseguirá root.cache de acuerdo
  con su propio servidor.  Entonces pregunte a alguno de los servidores
  raíz listados con

       dig @rootserver

  Podrá observar que la salida se parece terriblemente al archivo
  root.cache excepto por un par de números extras. Esos números no
  ocasionan problemas. Guárdelo en un archivo

       dig @rootserver . ns > root.cache.new

  y sustituya el antiguo root.cache con él.

  Recuerde reiniciar named después de sustituir el archivo caché.

  Al Longyear me envió este script que puede ser ejecutado
  automáticamente para actualizar root.cache, instale una entrada en el
  crontab para ejecutarlo una vez al mes y olvídese.  El script supone
  que trabaja con correo y que el alias de mail hostmaster está
  definido. Debe editarlo para ajustarlo a su configuración.

  #!/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á
  también disponible mediante ftp en Internic. Por favor NO utilice ftp
  para actualizar root.cache, el método anterior es mucho más amistoso
  con la red.

  7.  Configuración de Conexiones Automáticas vía telefónica.

  Esta sección explica cómo he dispuesto las cosas para automatizarlo
  todo.  Mi método puede que no se adapte completamente al suyo, pero
  puede obtener ideas de algunas de las cosas que he hecho. También, uso
  ppp para marcar, mientras que mucha gente usa slip o cslip y por tanto
  casi toda su configuración puede ser distinta a la mía.  Pero el
  programa de slip dip debería 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 línea

            domain uio.no

  Eso me asegura que no tengo que esperar a que la librería de
  resolución 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 automáticamente a la red ejecuto un script llamado
  ppp-on:

       #!/bin/sh
       echo llamando...
       pppd

  pppd tiene un archivo llamado options que indica las características
  de la conexión. Una vez que mi conexión ppp está activa pppd llama a
  un script llamado ip-up (este está descrito en la página 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 conexión
  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 dirección IP que he recibido para mi nombre de host
  (roke). Vd. deberá usar en su lugar el nombre de su máquina. 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 algún programa intente resolver un nombre. Si está usando
  conexiones telefónicas debería iniciar named cuando se conecte y
  matarlo cuando se desconecte. Pero por favor lea la sección 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 línea

       forwarders 1.2.3.4 1.2.3.5

  en el archivo named.boot.  Deje también vacío el archivo root.cache.
  Esto disminuirá el tráfico IP que origina su máquina.  Esto es
  especialmente importante si paga por cada byte que circule por el
  cable. Tiene el valor añadido de evitarle el deber del mantenimiento;
  no tiene porqué actualizar un archivo root.cache vacío.

  8.  PUFs Preguntas de Uso Frecuente (FAQ)

  En esta sección incluyo algunas de las preguntas más frecuentes
  realizadas relativas a DNS y este COMO. Y las respuestas :-) Por
  favor, lea esta sección antes de enviarme correo electrónico.

  8.1.  ¿Cómo 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?  ¿Cómo 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 rotación 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 también
  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 estarán en /usr/sbin.

  8.5.  ¿Cómo configuro un servidor de nombres secundario?

  Si el servidor primario tiene la dirección 127.0.0.1, ponga la
  siguiente línea 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 máquina que hace masquerading aquí. Tengo dos
  archivos root.cache, uno llamado root.cache.real que contiene el
  servidor de nombres raíz 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 efectúo 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 máquinas 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 tamaño del caché?  ¿Dónde almacena su
  caché el servidor de nombres? ¿Hay alguna

  El caché se almacena en memoria completamente.  No se escribe en disco
  en ningún 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 tamaño
  de ninguna forma ni por ningún 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.  Cómo hacerse un gran admin  DNS.

  Documentación y herramientas.

  Existe Documentación Real. En línea e impresa. Se requiere la lectura
  de esta documentación para seguir los pasos de pequeño a gran admin
  DNS. En formato impreso el libro estándar 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 también una sección 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 línea 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 definición de protocolos y
  diversos retoques o hacks de DNS (éstos y la mayoría, si no todas las
  referencias mencionadas arriba, están también contenidas en la
  distribución de bind).  No he leído la mayoría, pero tampoco soy un
  gran admin DNS.  Arnt Gulbrandsen, por otra parte ha leído el BOG y
  está extasiado con él :-). El grupo de noticias comp.protocols.tcp-
  ip.domains es sobre DNS. En suma, hay un gran número de RFCs sobre
  DNS, las más 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.  Traducción

  Este documento ha sido traducido por

  Pedro Pablo Fábrega Martínez, pfabrega@arrakis.es

  Si encontráis mejoras, añadidos o fallos, de cualquier tipo,
  indicádmelo para mejorar el documento.

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Diald Como
  Andrés Seco AndresSH@ctv.es
  v1.0, 15 de Febrero de 2000

  Este documento trata de mostrar varios escenarios típicos de uti­
  lización de Diald para facilitar su puesta en marcha.  Los escenarios
  presentados varían desde una conexión para uso personal en un equipo
  conectado mediante módem 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.      Introducción

  1.1.    Objetivos

  1.2.    Nuevas versiones

  1.3.    Agradecimientos

  2.      Copyright y renuncia de responsabilidad

  3.      Descripción rápida del funcionamiento de Diald

  4.      Notas sobre la identificación en el momento de la conexión

  4.1.    Usuario y contraseña - Login y password

  4.2.    PAP - Password Authentication Protocol

  4.3.    CHAP - Challenge Authentication Protocol

  5.      Notas sobre la resolución de nombres DNS

  6.      Conexión mediante módem 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.    Realización de la llamada

  6.4.    Archivo de comandos de inicio de la conexión

  7.      Conexión mediante modem y PPP de un puesto aislado a varios
  ISPs no simultáneamente

  7.1.    Nota sobre la entrega de correo mediante un servidor de
  reenvío (relay host)

  7.2.    Archivos de comandos para automatizar la creación 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.      Conexión 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.     Más información

  11.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  1.1.  Objetivos

  Este documento trata de mostrar varios escenarios típicos de
  utilización de Diald para facilitar su puesta en marcha.

  Los escenarios presentados varían desde una conexión para uso personal
  en un equipo conectado mediante módem 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:

  ·  Conexión mediante módem y PPP de un equipo aislado a un proveedor
     de servicios de internet (ISP).

  ·  Conexión mediante módem y PPP de un equipo aislado a varios
     proveedores de servicios de internet (ISPs) no simultáneamente.

  ·  Conexión mediante módem y PPP de un proxy/firewall a un proveedor
     de servicios de internet (ISP).

  En sucesivas versiones de este documento se cubrirán otros escenarios,
  como múltiples instancias de Diald en ejecución, uso de lineas RDSI y
  lineas usadas tanto para generar llamadas como para recibirlas.

  Anteriormente, existía un Diald-mini-Como realizado por Harish Pillay
  h.pillay@ieee.org, que presentaba una conexión a un ISP usando
  autentificación basada en chat (login y password previos al arranque
  de pppd, sin usar PAP ni CHAP).

  En el documento se incluirán ficheros de configuración de ejemplo que
  servirán para la puesta en marcha. Para obtener el máximo rendimiento
  y usar todas las características de los programas que se utilizarán
  será necesario leer la documentación adjunta a cada programa y
  reconfigurar dichos ficheros de configuración que se incluyen como
  ejemplos.

  Así mismo, los directorios en los que se sitúan los ficheros de
  configuración pueden variar dependiendo de la distribución Linux que
  se use. Si en la distribución de Linux que usted usa algún fichero se
  encuentra en directorio diferente al indicado, por favor, hágamelo
  saber para incluir una nota al respecto.

  1.2.  Nuevas versiones

  La ultima versión 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 Documentación 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 términos 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 información y otros contenidos en este documento son lo mejor de
  mis conocimientos. Sin embargo, he podido cometer errores. Así que
  debería determinar si desea seguir las instrucciones que se encuentran
  en este documento.

  Nadie es responsable de cualquier daño en sus ordenadores y cualquier
  otra pérdida por el uso de la información contenida aquí.

  EL AUTOR Y MANTENEDORES NO SON RESPONSABLES DE CUALQUIER DAÑO
  INCURRIDO A CAUSA DE ACCIONES TOMADAS EN BASE A LA INFORMACIÓN
  CONTENIDA EN ESTE DOCUMENTO.

  Por supuesto, estoy abierto a todo tipo de sugerencias y correcciones
  sobre el contenido de este documento.

  3.  Descripción rápida 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 documentación original lo llaman proxy interface). Diald
  monitoriza este interfaz y cuando llegan paquetes hacia él, lanza la
  conexión ppp, espera a que se establezca y cambia la dirección 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 conexión ppp,
  mantenerla activa, hacerla caer o no hacer nada, y en caso de que
  hayan sido paquetes para tener en cuenta, cuánto tiempo debe estar
  levantado el interface después de que haya llegado el paquete.

  Finalmente, si no hay más tráfico y se acaba el tiempo de espera que
  el último de los paquetes enviados estableció, Diald finaliza la
  conexión.

  Asimismo, es posible controlar los días y horas a los que se puede
  conectar y los que no, de modo que se puedan aprovechar tarifas bajas
  u horarios de bajo tráfico.

  Hasta aquí, la descripción es válida tanto para la versión 0.16.5 de
  Diald como para las posteriores, pero las versiones posteriores a esta
  también 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, contabilización
  avanzada de paquetes transmitidos, mejor integración 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 física) en vez de slip,
  conexiones de backup y algunas otras funcionalidades.

  4.  Notas sobre la identificación en el momento de la conexión

  Siempre que nos conectemos a un proveedor de acceso a internet, será
  necesario enviar un nombre de usuario y una contraseña. Para ello hay
  diversas posibilidades que nos vendrán impuestas por el proveedor.

  Además de las 3 opciones expuestas, también es posible que la conexión
  no necesite autentificación (normalmente cuando el destino de la
  llamada es otro ordenador también nuestro y no deseamos autentificar).

  4.1.  Usuario y contraseña - Login y password

  Actualmente no es un método muy utilizado en entornos de acceso a
  internet.

  La identificación se realiza antes de lanzar el demonio pppd, y es el
  propio programa marcador, normalmente chat, el que envía los
  identificadores de usuario y clave. Este envío 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 contraseña antes de lanzar pppd podría 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 _Contraseña_

  Las 2 ultimas lineas son las que definen el nombre del usuario y la
  contraseña y cuando deben ser enviadas (después de recibir «ogin» y
  «assword» respectivamente. No se suelen poner las primeras letras de
  dichas palabras para no preocuparse de que unos servidores las envíen
  en mayúsculas y otros en minúsculas).

  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 autentificación de nuestra
  conexión, durante el establecimiento de la sesión LCP de PPP se
  negociará dicho protocolo, es decir, una vez establecida la conexión
  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 envía la clave sin cifrar,
  como texto libre, por lo que puede ser leída por alguien que analice
  la linea de transmisión.

  Ejemplo de contenido de /etc/ppp/pap-secrets:

       _NombreUsuario_ * _Contraseña_

  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 autentificación de nuestra
  conexión, durante el establecimiento de la sesión LCP de PPP se
  negociará dicho protocolo, es decir, una vez establecida la conexión
  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 más seguro que PAP, ya que nunca se envía la
  clave por la linea de transmisión sin cifrar. En su lugar, el equipo
  que realiza la autentificación envía un identificador aleatorio con el
  que codificar la clave en el lado del cliente para después enviar esta
  clave codificada.

  Ejemplo de contenido de /etc/ppp/chap-secrets:

       _NombreUsuario_ * _Contraseña_

  Es posible que un proveedor de acceso en ocasiones utilice PAP y en
  otras ocasiones utilice CHAP, por lo que es común definir en ambos
  sitios el usuario y la clave a utilizar.

  5.  Notas sobre la resolución de nombres DNS

  En todas las conexiones a un ISP es necesario configurar la resolución
  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
  traducción 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 dirección del propio servidor (o la dirección
  del interfaz loopback, 127.0.0.1) y este además incluya un servidor de
  nombres DNS que a su vez realizará las traducciones de nombres a
  direcciones IP poniéndose en contacto con otros servidores DNS.

       #Fichero /etc/resolv.conf para resolución 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 documentación al respecto, pero una
  aproximación rápida puede obtenerse en el DNS-Howto
  (http://www.linuxdoc.org/HOWTO/DNS-HOWTO.html) cuenta con una
  traducción en http://www.insflug.org/documentos/DNS-Como/.

  6.  Conexión mediante módem y PPP de un puesto aislado a un ISP

  De forma esquemática, serán necesarios los siguientes pasos previos:

  ·  Tener montado el paquete Diald. Lo más rápido será montar el que la
     distribución de Linux que usemos incluya.

  ·  Configurar la resolución de nombres DNS (fichero /etc/resolv.conf).

  ·  Comprobar que es posible establecer una conexión con el ISP. Si la
     distribución incluye utilidades para configurar una conexión, será
     más rápido usarlas (pppconfig en Debian, kppp si usas KDE, etc). Si
     tiene problemas para establecer la conexión, 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 sección ``Más información'' si busca traducciones de
     dichos documentos.

  ·  Establecer los nombres de usuario y contraseña 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 configuración de Diald
     (/etc/diald/diald.options para la versión 0.16.5 de Diald y
     /etc/diald/diald.conf para las demás).

  ·  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 ejecución) 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 ejecución).

  ·  Preparar los archivos de establecimiento de rutas
     /etc/diald/addroute y /etc/diald/delroute si se quieren utilizar
     (deben tener permiso de ejecución). 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
     instalación 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 algún cambio en el fichero de configuración 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 módem. Opción device.

  ·  Velocidad del módem. Opción speed.

  ·  Nombre del usuario para la conexión ppp. Opción pppd-options.

  ·  Temporizadores de reintentos.

  ·  Horario de conexión 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 ejecución simultanea.

  ·  Decidir si se usan los filtros estándar o personales. Opciones
     include.

       ##########################
       # /etc/diald/diald.options

       # Dispositivo donde esta conectado el módem
       device /dev/ttyS0

       # Archivo de log de diald
       accounting-log /var/log/diald.log

       # Cola de monitorización de diald
       #fifo /var/run/diald/diald.fifo

       # Depuración activada al máximo
       # Activar la depuración disminuye el rendimiento
       #debug 31

       # Usamos PPP sobre la linea de transmisión
       mode ppp

       # Direcciona IP de mi equipo (al conectar se modifica automáticamente con
       # la IP asignada por el ISP)
       local 127.0.0.5

       # Direccion IP del equipo remoto (al conectar se modifica automáticamente
       # 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 serán asignadas en el momento del
       # establecimiento de la conexión
       dynamic

       # Si la conexión se cae, restablecerla solo si hay trafico de salida
       two-way

       # Cuando la conexión 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 información
       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 opción llamada ip-goingdown para
       # ser lanzado al finalizar pero cuando todavía está activo el enlace.
       ip-up /etc/diald/ip-up
       #ip-down /etc/diald/ip-down

       # Scripts usados para establecer la comunicación y pararla
       connect "/etc/diald/diald.connect"
       #disconnect "/etc/diald/diald.disconnect"

       # Usar bloqueo UUCP
       #lock

       # Conectamos a través de módem. ATENCIÓN: No especificar estas opciones
       # en las opciones para PPP, ya que entrarían 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 información 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 también 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.
  #          "Infovía Plus" (España) 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 sección debe estar antes de los filtros.
  # El comando restrict es experimental y puede cambiar en futuras versiones
  # de diald (esta sintaxis es para la versión 0.16)
  # Solo usar en horario nocturno para plan
  # Bononet Noche (España-Telefónica)
  # 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 tarificación
  # (primeros segundos cobrados de una vez, unidad de tarificación en
  # segundos, tiempo en segundos para comprobar desconexión)
  #impulse 0,0,0
  # Bononet Noche (España-Telefónica) 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 estándar
  #include /etc/diald/standard.filter
  # o Filtros personales
  include /etc/diald/personal.filter

  6.2.  Fichero de filtros personal

  La manipulación de este fichero debe ser realizada de forma muy
  cuidadosa.  Es en este fichero en el que se decide cuándo y porqué se
  trata de levantar el enlace, mantenerlo, tirarlo o ignorarlo,
  dependiendo del tipo de tráfico.

  En general, el fichero de filtros standard de Diald es suficiente para
  la mayoría de los casos, aunque quizá sea poco restrictivo en
  determinados entornos. El personal.filter que se muestra a
  continuación tiene algunas correcciones sobre el original de la
  versión 0.16.

  En sucesivas versiones de este documento se presentarán otros ejemplos
  más restrictivos comentados.

  # /etc/diald/personal.filter
  # Las reglas de filtrado a continuación son las mismas que las de
  # standard.filter con las siguientes correcciones:
  #
  # Cambio de 10 minutos por 4 en "cualquier otra conexión TCP".
  # Añadido 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.  Realización de la llamada

  Fichero /etc/diald/diald.connect (debe tener permiso de ejecución):

       /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 teléfono:

       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 conexión

  Debe tener permiso de ejecución.

  Este archivo puede ser usado para multiples tareas (sincronizar la
  hora del equipo, lanzar la entrega de la cola de impresión, la
  recuperación 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, dirección
  IP local, dirección 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.  Conexión mediante modem y PPP de un puesto aislado a varios ISPs
  no simultáneamente

  En muchas ocasiones, un ordenador aislado no se conecta solo a una
  red, si no que es común acceder a diferentes redes o a Internet
  mediante diferentes proveedores de acceso. En estos casos, modificar
  los ficheros de configuración cada vez que se desea acceder a un sitio
  diferente puede resultar incómodo.

  La solución propuesta aquí consiste en mantener diferentes juegos de
  ficheros de configuración para cada conexión 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 reenvío
  (relay host)

  Tanto si su correo electrónico usa un Agente de Transferencia de
  Mensajes local con un servidor SMTP de reenvío (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
  reconfiguración de este servidor de relay, ya que los proveedores de
  acceso normalmente comprueban el origen de las conexiones que reciben
  y sólo aceptan mensajes si el buzón del destinatario está en uno de
  los dominios que gestiona directamente este servidor de relay o si la
  dirección IP del cliente que inicia la conexión 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, anónimos, enmascaramiento del origen, etc.).

  En los ejemplos que se ponen a continuación se mostrara cómo hacer
  este cambio en los ficheros de configuración de Smail suponiendo una
  sencilla configuración en la que todos los mensajes con destino fuera
  del equipo local se entregan a un servidor smtp de reenvío (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 creación 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 almacenarán los archivos de comandos para
  automatizar el cambio y los subdirectorios con los juegos de ficheros
  de configuración para cada uno de los proveedores.

  Con el archivo de comandos siguiente se crea este directorio y se
  introducen en el los ficheros de configuración de Diald, chat, pppd y
  Smail con los que se esté trabajando actualmente, y que serán 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 configuración
  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 parámetro, 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
  parámetro 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 simbólicos para evitar tener archivos duplicados. Así mismo,
  mediante enlaces simbólicos, en caso de necesitar hacer algún 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.  Conexión 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 conexión compartida con tareas de
  proxy/cache de páginas 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 fantástica 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 conexión 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).

  Básicamente, 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
  configuración 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
  configuración 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 corrección tras la instalación de
  este paquete. Se trata de cambiar el orden de ejecución 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 simbólico 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 según 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
  continuación son para kernels de la versión 2.2, mediante ipchains,
  pero no son válidos para kernels de las versiones 2.0. Para estos
  ultimos habría que traducir dichos comandos a su equivalente en el
  antiguo comando ipmasq.

  Además, vamos a suponer que la interface ethernet del equipo tiene la
  dirección 192.168.1.1 con máscara de 16 bits, es decir, 255.255.0.0.

  El fichero /etc/ppp/ip-up sería 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 sería 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 configuración 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 más 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 versión 2.0.

  9.  Programas y versiones utilizados

  Para el desarrollo de esta documentación he utilizado las siguientes
  versiones de diald:

  ·  Diald 0.16.5 - La ultima versión que mantuvo el autor original de
     diald.

  ·  Diald 0.99.3 - La ultima versión aparecida hasta el momento de la
     primera redacción de este documento.
  Y las siguientes versiones de pppd:

  ·  pppd 2.3.5

  La versión 0.16.5 de Diald es seguramente la más extendida, y la que
  se incluye directamente con muchas de las distribuciones de linux. Es
  suficiente en la mayoría de los casos y resulta muy estable, aunque,
  sin duda, las más modernas versiones, aunque se encuentran en
  desarrollo, incluyen funcionalidades muy interesantes.

  10.  Más información

  La documentación 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 Página Oficial de Diald: http://diald.sourceforge.net/

  ·  Descarga de nuevas versiones:
     ftp://diald.sourceforge.net/pub/diald/

  ·  Página anterior de Diald: http://diald.unix.ch

  ·  Página antigua de Diald hasta la versión 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 dirección Majordomo@vger.rutgers.edu.

  Existen también múltiples documentos RFC (Request For Comments) que
  detallan cómo 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 información sobre las RFCs en RFC-INFO@ISI.EDU.

  Y también pueden resultar de ayuda los «Comos» siguientes:

  ·  DNS-HOWTO - http://www.linuxdoc.org/HOWTO/DNS-HOWTO.html
     (traducción: http://www.insflug.org/documentos/DNS-Como/)

  ·  Firewall-HOWTO - http://www.linuxdoc.org/HOWTO/Firewall-HOWTO.html
     (traducción: http://www.insflug.org/documentos/Cortafuegos-Como/)

  ·  IP-Masquerade-HOWTO - http://www.linuxdoc.org/HOWTO/IP-Masquerade-
     HOWTO.html (traducción: 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
     (traducción: http://www.insflug.org/documentos/Redes-En-Linux-
     Como/)

  ·  PPP-HOWTO - http://www.linuxdoc.org/HOWTO/PPP-HOWTO.html
     (traducción: http://www.insflug.org/documentos/PPP-Como/)

  ·  Serial-HOWTO - http://www.linuxdoc.org/HOWTO/Serial-HOWTO.html
     (traducción: http://www.insflug.org/documentos/Serie-Como/)

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos,
  así como de la producción de documentos originales en aquellos casos
  en los que no existe análogo en inglés, centrándose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Diríjase a la sede del Insflug para más información al respecto.

  En ella encontrará siempre las últimas versiones de las traducciones
  «oficiales»:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  en los que estamos trabajando incesantemente.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  «Cartel» Insflug, cartel@insflug.org.

  Cómo pasar de DOS/Windows a Linux
  Por Guido Gonzato BORRAMEguido@ibogeo.df.unibo.it (Elimine
  el BORRAME)
  Traducido por David Marín Carreño, davefx@bigfoot.com
  v1.3.2 22 de Febrero de 1999. Traducción: 8 de Junio de
  1999.

  Este documento Cómo está dedicado a todos los (pronto ex-)usuarios de
  DOS y Windows que acaban de decidir pasarse a Linux, el clónico gratu­
  ito de UNIX. El propósito 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.      Introducción

  1.1.    ¿Es Linux adecuado para usted?

  1.2.    Ya está. Ahora cuénteme más.

  1.2.1.  Conceptos introductorios

  1.2.2.  Obtención de ayuda

  1.3.    Convenciones

  2.      Para el Impaciente

  3.      Encontrándose con bash

  4.      Ficheros y Programas

  4.1.    Ficheros: Nociones preliminares

  4.2.    Enlaces simbólicos

  4.3.    Permisos y Propiedades

  4.4.    Ficheros: órdenes equivalentes

  4.5.    Ejecución de programas: Multitarea y Sesiones

  4.6.    Ejecución de programas en sistemas remotos

  5.      Gestión 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.    Administración de dispositivos en «modo DOS»

  6.2.    Administración de dispositivos en «modo UNIX»

  6.3.    Copias de seguridad

  7.      ¿Qué pasa con Windows?

  8.      Personalización del sistema

  8.1.    Ficheros de inicialización del sistema

  9.      Ficheros de inicialización de programas

  10.     Trabajo en red: conceptos

  11.     Un poco de programación

  11.1.   Rutinas del Intérprete de Comandos: Ficheros .BAT con
  esteroides

  11.2.   Sus programas en C

  12.     El restante 1%

  12.1.   Utilización de tar  y gzip

  12.2.   Instalación de aplicaciones

  12.3.   Trucos imprescindibles

  12.4.   ¿Dónde encontrar aplicaciones?

  12.5.   Unas cuantas cosas que Usted no podía hacer

  12.6.   Practicando UNIX bajo DOS/Windows

  12.7.   Extensiones comunes y programas relacionados

  12.8.   Conversión de ficheros

  12.9.   Entornos ofimáticos gratuitos

  13.     Fin, por ahora

  13.1.   Copyright

  13.2.   Agradecimientos

  13.3.   Traducción

  14.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  1.1.  ¿Es Linux adecuado para usted?

  ¿Quiere pasar del mundo DOS (esta definición incluye Windows) a Linux?
  Buena idea: Linux es técnicamente 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
     fácil de instalar y configurar; es notablemente inestable; su
     rendimiento es pobre; los bloqueos del ordenador son frecuentes.

  ·  Linux ejecuta StarOffice, mucho software técnico y unos pocos
     juegos; puede ser difícil de instalar y configurar; es sólido como
     una roca; rinde al máximo; los bloqueos de la máquina son muy
     raros.

  De usted depende el decidir qué necesita. Linux le da potencia, pero
  lleva algún tiempo aprender a aprovecharla. Es decir, si necesita
  software comercial, o si no le apetece aprender órdenes y conceptos
  nuevos, sería mejor que buscara en otra parte. Sepa que muchos novatos
  lo dejan debido a las dificultades iniciales.

  Se está trabajando para hacer Linux más facil de usar, pero no espere
  ser un experto en Linux a menos que lea mucha documentación y lo use
  durante al menos unos meses. Linux no le dará resultados instantáneos.
  A pesar de estas advertencias, tengo un 100% de seguridad en que si
  usted es el usuario correcto, entonces encontrará en Linux su Nirvana
  informático. Por cierto, Linux + DOS/Win pueden coexistir sin
  problemas en la misma máquina.

  Requisitos previos para la lectura de este Cómo. Asumiré que:

  ·  conoce las órdenes y conceptos básicos del DOS;

  ·  Linux, posiblemente con el sistema X Window (X11 para abreviar),
     está adecuadamente instalado en su ordenador;

  ·  su intérprete de órdenes (el equivalente de COMMAND.COM) es bash;

  A menos que se especifique lo contrario, toda la información de este
  trabajo está dirigida al antiguo DOS. Hay información 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 también de que este trabajo no es ni una guía de
  configuración ni un manual completo para los no iniciados.

  La última versión de este documento está disponible en muchos formatos
  en ftp://sunsite.unc.edu/pub/Linux/docs/howto.

  1.2.  Ya está. Ahora cuénteme más.

  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á ejecutándose. Acaba de introducir su nombre y su
  contraseña, y ahora está mirando a la pantalla pensando...  ¿Y ahora
  qué?

  Bien, no se desespere. Puede hacer casi las mismas cosas que solía
  hacer con DOS/Win, y muchas más. Si estuviera ejecutando DOS/Win en
  lugar de Linux, realizaría 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;

  ·  configuración 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 más 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 mojándose los pies. Desde aquí le
  animo a experimentar y «jugar» con Linux: a menos que entre como
  usuario «root», no puede llegar a dañar el sistema de esa manera. Unos
  cuantos conceptos:

  ·  Primero, cómo 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 después <Ctrl-Alt-Supr>. Nunca
     apague o reinicie el ordenador directamente: podría dañar el
     sistema de ficheros;

  ·  Al contrario que en DOS o Windows, Linux tiene mecanismos de
     seguridad intrínsecos, 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 sección ``Permisos''. DOS y Windows, por el contrario, le
     dejarían 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 máquina. Si usted trabaja
     con su propio PC, también será root. Trabajar como root es
     peligroso: cualquier error puede dañar 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: prácticamente cada característica y aplicación
     puede ser configurada mediante uno o más archivos de configuración.
     La complejidad es el precio a pagar por la potencia;

  ·  La redirección y el entubamiento (piping) son características
     «secundarias» de DOS. En Linux pasan a ser muy importantes y mucho
     más potentes. Se pueden enlazar órdenes para ejecutar tareas
     complejas.  Le recomiendo sobremanera que aprenda a usarlas.

  1.2.2.  Obtención de ayuda

  Hay muchas maneras de conseguir ayuda con Linux. Las más importantes
  son:

  ·  Leyendo la documentación Aunque el documento CÓMO que está leyendo
     puede servir como introducción a Linux, hay unos cuantos libros que
     debería leer: Linux: Instalación y Primeros Pasos de Matt Welsh
     (http://sunsite.unc.edu/mdw/LDP/gs/gs.html), la Guía 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
     versión traducida. Mantenga un sentimiento de culpabilidad hasta
     haber leído al menos uno de ellos;

  ·  La documentacion de los paquetes instalados en la máquina puede
     encontrarse usualmente en los directorios bajo /usr/doc/;

  ·  Para conseguir ayuda acerca de las «órdenes internas» del
     intérprete 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 página del manual («man») correspondiente a orden.
     Alternativamente, teclee info orden, lo cual mostrará la página
     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 más adecuado para conseguir ayuda
     es Usenet, en el foro news:comp.os.linux.setup. Por favor, no me
     envíe mensajes solicitando ayuda, porque tengo bastante trabajo.

  1.3.  Convenciones

  A lo largo de este documento, los ejemplos seguirán 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 redirección a fichero_redir es
  opcional.

  Desde ahora «LPM» significa «para más información Lea las Páginas del
  Manual».  No puedo dejar de recordar lo importante que es leer la
  documentación. «DosWin» significa «DOS/Windows».

  Cuando el simbolo de la línea 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                     olvídelo
  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 más que una tabla de órdenes, continúe con las secciones
  siguientes.

  3.  Encontrándose con bash

  Buenas noticias: con Linux usted escribe mucho menos en la línea de
  órdenes, porque el intérprete bash escribe por usted siempre que sea
  posible, y goza de muy buenas características de edición de línea.
  Para empezar, la tecla flecha-arriba llama a las últimas líneas
  ejecutadas; pero aún hay más. Pulsar <TAB> completa los nombres de
  ficheros y directorios, por lo que teclear

       $ ls /uTABloTABbTAB

  es como teclear

       $ ls /usr/local/bin

  Si hubiera ambigüedades, como al teclear

       $ ls /uTABloTABiTAB

  bash para porque no sabe si usted se refiere a /usr/local/info o a
  /usr/local/include.  Proporcione más 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 línea,
  <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 intérprete 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, están guardados en directorios y algunos son ejecutables,
  y entre éstos, la mayoría tiene opciones en la línea de órdenes.
  Incluso puede utilizar comodines, redirección y tuberías. Sólo hay
  unas pocas diferencias:

  ·  Bajo DOS, los nombres de ficheros están 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 más largos (hasta 255 caracteres), y con más
     de un punto en ellos: por ejemplo,
     Este_es.un.nombre_de.fichero.MUY.largo.  Fíjese que he utilizado
     tanto mayúsculas como minúsculas: en efecto...

  ·  Las mayúsculas y las minúsculas 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 /opción.  En
     Linux se obtienen con -opción o --opción.  Ejemplo: dir /s se
     convierte en ls -R. Fíjese en que muchos programas DOS (como PKZIP
     o ARJ) utilizan opciones de tipo Unix.

  Ahora puede saltar a la sección ``de equivalencias'', pero yo de usted
  seguiría leyendo.

  4.2.  Enlaces simbólicos

  Unix tiene un tipo de fichero que no existe bajo DOS: el enlace
  simbólico.  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 simbólicos son /usr/X11, que apunta a
  /usr/X11R6; /dev/modem, que apunta a /dev/ttyS0 o a /dev/ttyS1.

  Para crear un enlace simbólico:

       $ 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 (sólo-lectura), y S (sistema).  Sólo H y R
  tienen sentido bajo Linux: los ficheros ocultos comienzan con un
  punto, y los de sólo lectura, tienen activado el permiso r, pero nada
  más.

  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 información restante a un
  lado (el libro de Matt esta ahí para ese propósito), sólo 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 demás usuarios (leer, ejecutar).

  Esa es la razón 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 <quiénXperm> <fichero>

  donde quién podría 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 (ejecución).

  Ejemplos:

  $ chmod u+x fichero

  esto habilita el permiso de ejecución para el propietario del fichero.
  Atajo: chmod +x fichero.

       $ chmod go-wx fichero

  esto quita el permiso de escritura y de ejecución para todo el mundo
  menos al usuario.

       $ chmod ugo+rwx fichero

  esto le da a todo el mundo el permiso de lectura, escritura y
  ejecución.

       $ 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 dueño.
  Normalmente, se encontrará con archivos suid del root; estos son, a
  menudo, ficheros importantes del sistema, como el servidor X.

  Una manera más corta de referirse a los permisos es con números: 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 difícil, pero con
  algo de práctica el concepto se domina.  root, el administrador y
  superusuario, puede cambiar los permisos de los ficheros de todo el
  mundo. Hay mucha más información 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 redirección y de tuberías:

  < > >>  |

  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 más inteligente bajo Linux: * equivale a todos los ficheros
     excepto los ocultos; .* equivale a todos los ficheros ocultos; *.*
     equivale sólo a aquellos ficheros que tienen un punto en medio del
     nombre, seguido de otros caracteres; p*r equivaldría tanto a peor
     como a por;  *c* equivaldría tanto a pecado como a peca.

  ·  Cuando utilice more, pulse espacio para ir leyendo a través del
     fichero, q o Ctrl-C para salir. less es más intuitivo y permite
     utilizar las teclas del cursor;

  ·  No hay UNDELETE, así que piénselo dos veces antes de borrar
     cualquier cosa;

  ·  Además de los < > >> del DOS, Linux tiene el operador 2> para
     redirigir los mensajes de error (stderr); más aún, el operador 2>&1
     redirige stderr a stdout (la salida estándar), mientras que 1>&2
     redirige stdout a stderr;

  ·  Linux tiene otro comodín: 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.  Ejecución de programas: Multitarea y Sesiones

  Para ejecutar un programa, escriba su nombre tal y como lo haría bajo
  DOS.  Si el directorio ---vea la sección ``Directorios''--- donde el
  programa está guardado está incluido en la variable de entorno PATH
  ---sección ``Inicialización''--- el programa comenzará a ejecutarse.
  Excepción: 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 típico de una línea de órdenes:

       $ orden [-o1 [-o2] ... [-on]] [par1 [par2] ... [parn]]  [< input] [> output]

  donde -o1, ..., -on son las opciones del programa, par1, órdenes en la
  línea de órdenes:

       $ orden1 ; orden2 ; ... ; ordenN

  Esto es todo acerca de ejecutar órdenes, pero es fácil ir un paso más
  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. Más
  aún, Linux permite tener varias sesiones abiertas simultáneamente: es
  como tener muchos ordenadores en los que trabajar a la vez.

  ·  Para cambiar a la sesión 1..6 de las consolas virtuales, presione
     <ALT-F1> ... <ALT-F6>

  ·  Para comenzar una nueva sesión 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 sólo el root puede hacer.

  ·  Para acabar una sesión, teclee exit. Si hay trabajos parados (ver
     más abajo), será avisado.

  ·  Para lanzar un proceso en segundo plano, añada un '&', al final de
     la línea de órdenes:

  $ nomprog [-opciones] [parametros] [< input] [> output] &
  [1] 123

  ·  el intérprete de órdenes identifica el proceso con un número de
     trabajo (p.e. [1]; ver más abajo), y con un PID (123 en nuestro
     ejemplo).

  ·  Para ver cuántos procesos hay, teclee ps ax. Esto generará una
     lista de procesos actualmente en ejecución.

  ·  Para matar (finalizar) un proceso, teclee kill <PID>.  Puede que
     necesite matar un proceso cuando no sepa cómo cerrarlo de la manera
     correcta...  ;-). A veces, sólo podrá matar un proceso con kill
     -SIGKILL <PID>.

     Además, el intérprete 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 cuántos trabajos hay, teclee jobs. Aquí los trabajos son
     identificados por su número de trabajo, no por su PID.

  ·  Para parar un proceso ejecutándose en primer plano pulse <CTRL-C>
     (no siempre funciona).

  ·  Para suspender un proceso ejecutándose en primer plano, pulse
     <CTRL-Z> (ídem al anterior).

  ·  Para mandar un proceso suspendido al segundo plano (convirtiéndolo
     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 puñado de
  ficheros, compilar un programa, y descomprimir un fichero
  simultáneamente, y todavía tener la línea de órdenes a su disposición.
  Inténtelo con Windows, sólo para ver la diferencia de prestaciones
  (siempre que no se le cuelgue, claro).

  4.6.  Ejecución de programas en sistemas remotos

  Para ejecutar un programa en una máquina remota cuyo nombre es
  maquina.remota.edu, teclee:

       $ telnet maquina.remota.edu

  Tras introducir su nombre de usuario y contraseña, arranque su
  programa favorito. Obviamente, debe tener una cuenta en la máquina
  remota.

  Si tiene X11, puede incluso ejecutar una aplicación X en un ordenador
  remoto, mostrándolo en su pantalla de X. Supongamos maquina.remota.edu
  la máquina X remota y sistema.linux.yo su máquina 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 después teclee:

       $ xhost +maquina.remota.edu
       $ telnet maquina.remota.edu

  ·  tras introducir su nombre y contraseña, 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 intérprete de órdenes remoto).

  Y.. ¡voila! Ahora programa se iniciará en maquina.remota.edu y se
  mostrará en su máquina. Aunque mejor no intente esto con un módem,
  porque sería demasiado lento para poder utilizarse. Además: es un
  método muy inseguro: por favor, lea el «mini-COMO de Aplicaciones X
  Remotas» en http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps.

  5.  Gestión de Directorios

  5.1.  Directorios: Nociones preliminares

  Hemos visto las diferencias entre los ficheros de DOSWin y Linux.
  Entre directorios, bajo DOSWin el directorio raíz 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 también tienen permisos. Lo que hemos visto en la
  sección ``Permisos'' también 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
  (según 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 vacío.  Para
     borrar un directorio y todos sus contenidos, use rm -rf (bajo su
     propia responsabilidad).

  ·  El carácter ~ es un atajo para el nombre de su directorio personal.
     Las órdenes cd o cd ~ le llevarán 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.  Administración 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 distribución), podrá también acceder a la
  partición 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.  Administración 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 operación
  denominada «montaje» (mounting). Cuando se acaba de utilizar el disco,
  antes de extraerlo, debe «desmontarlo» (unmount).

  Físicamente, 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 más 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, móntelo 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
  solía 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 sólo 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
  también 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 incómodo 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*
       # # asegúrese de que el dispositivo CD-ROM es el adecuado
       # chmod 666 /dev/hdb ; chmod 666 /dev/fd*

  ·  añadir en /etc/fstab las siguientes líneas:

       /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 información 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 más simple para hacer
  una copia de seguridad multivolumen (como root) es:

       # tar -M -cvf /dev/fd0H1440 /directorio_a_guardar

  Asegúrese 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 gráfico X Window, o X11, para
  abreviar. Al contrario que Windows o el Mac, X11 no fue diseñado para
  facilitar el uso o para lograr una mejor apariencia, sino para
  proporcionar utilidades gráficas 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 más 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 más. El gestor de ventanas es
     normalmente llamado por un fichero denominado .xinitrc;

  ·  Su gestor de ventanas puede ser configurado de manera que las
     ventanas actúen 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 ratón está sobre ella («focus»). También, el lugar
     de emplazamiento de las ventanas en la pantalla puede ser
     automático o interactivo: si un marco extraño aparece en lugar de
     su programa, haga click con el botón izquierdo del ratón donde
     quiera que aparezca;

  ·  La mayor parte de las acciones pueden configurarse editando uno o
     más ficheros de configuración. Lea la documentación de su gestor de
     ventanas; el archivo de configuración 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 más básicas son
     aquellas que usan los controles (widgets) Athena (con aspecto 2D;
     xdvi, xman, xcalc); otras usan Motif (netscape), otras aún usan
     Tcl/Tk, Xforms, Qt, Gtk, y otra más. 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 línea de texto utilizando
     el ratón y pulsa <RETROCEDER>, esperará que la línea desaparezca,
     ¿verdad? Esto no sucede con aplicaciones basadas en Athena, pero
     sucede con aplicaciones basadas en otros controles;

  ·  El cómo funcionen las barras de desplazamiento y el cambio de
     tamaño 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 botón 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 raíz»); no hará falta decir que el menú puede ser
     configurado. Para cambiar la apariencia de la ventana raíz, utilice
     xsetroot o xloadimage;

  ·  El portapapeles sólo puede contener texto, y se comporta de manera
     extraña. Cada vez que selecciona texto, se copia automáticamente al
     portapapeles: vaya a cualquier sitio y pulse en botón central del
     ratón para pegarlo. Hay una aplicación, xclipboard, que proporciona
     varios portapapeles;

  ·  Arrastrar y soltar es una opción, y está disponible solamente si
     usted utiliza aplicaciones X11 que la permitan.

  Para ahorrar memoria, uno debería utilizar aplicaciones que usaran las
  mismas bibliotecas, pero esto es difícil de hacer en la práctica.

  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. Pruébelos: no echará de menos su
  escritorio Windows nunca más.

  8.  Personalización del sistema

  8.1.  Ficheros de inicialización 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 inicialización, algunos de los
  cuales no deberían ser modificados hasta que usted supiese con
  seguridad lo que está haciendo. De todos modos, estos son los más
  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
  automáticamente un programa tras iniciar una sesión, 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 (fíjese en que es un fichero oculto), se
  leerá tras el inicio de sesión y se ejecutarán 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 línea en su /etc/profile le proporcionará el equivalente de
  PROMPT $P$G;

       export PS1="\w\\$ "

  9.  Ficheros de inicialización de programas

  Bajo Linux, casi todo puede ser configurado de acuerdo con sus
  necesidades. La mayoría de los programas tienen uno o más ficheros de
  inicialización 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á podría ser interesante para usted el documento «Cómo
  configurar Linux» http://sunsite.unc.edu/mdw/HOWTO/Config-HOWTO.html.

  10.  Trabajo en red: conceptos

  No solo está disponible bajo Linux un «Acceso telefónico a redes»,
  sino que también es más estable y más rápido. El nombre clave es
  «PPP», el protocolo empleado para conectarse a Internet utilizando
  módems.  Necesita un núcleo que de soporte a PPP y una herramienta que
  marque y realice la conexión.

  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 aplicación de
  Internet se ejecuta el programa de conexión, bajo Linux el proceso es
  al revés.  Primero se conecta, y después se lanza la aplicación. Un
  programa llamado diald proporciona el acceso usual. Instalar y
  configurar una red solía ser una de las cosas más difíciles 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 máquina
  Linux aparezca como un Windows NT/9x en una red local de máquinas
  Windows. La palabra mágica es Samba: no el baile brasileño, sino una
  implementación del protocolo SMB para Linux. Visite
  http://samba.anu.edu.au/samba.

  11.  Un poco de programación

  11.1.  Rutinas del Intérprete de Comandos: Ficheros .BAT con
  esteroides

  Si ha utilizado ficheros .BAT para crear atajos de largas líneas de
  orden (yo solía hacerlo), el objetivo puede ser obtenido insertando
  las líneas de alias convenientes (ver ejemplo de más arriba) en el
  profile o en el encantará el lenguaje de Script (guionado) que el
  shell pone a su disposición: es tan potente como el viejo Qbasic (o
  más).  Tiene variables, estructuras como while, for, case, if-then-
  else, y montones de nuevas características: puede ser una buena
  alternativa a un lenguaje de programación «de verdad».

  Para escribir una rutina (script) ---el equivalente a un fichero ASCII
  estándar 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 difícil de usar.
  No voy a explicar cómo 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 después el texto;

  ·  para borrar caracteres, teclee ESC y después `x';

  ·  para salir de vi sin guardar, pulse ESC y después :q!

  ·  para guardar y salir, pulse ESC y luego :wq

  joe es un buen editor para novatos: llámelo 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 sección
  ``Dónde encontrar aplicaciones'' para ver dónde conseguir estos
  editores.

  Escribir rutinas bajo bash es una materia tan extensa que requeriría
  un libro para abarcarla toda, y no voy a profundizar más allá en este
  tema.  Sólo daré un ejemplo de script, del cual se pueden extraer las
  reglas básicas:

       #!/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 también
  están a su disposición otros lenguajes como FORTRAN, Pascal, Lisp,
  Basic, Perl, awk...

  Suponiendo que usted sepa C, hay un par de guías 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
  acompañan a sus análogos bajo DOS: no tiene IDE, ni ayuda en línea, ni
  debugger integrado, etc... Es sólo un rústico compilador de línea de
  órdenes, muy potente y eficiente. Esto es lo que debe teclear para
  compilar el típico 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 librería al programa, añada la opción
  -lnombre_de_librería. Por ejemplo, para enlazar la librería math:

       $ gcc -o mathprog mathprog.c -lm

  (-lnombre_libreria fuerza a gcc a enlazar la librería
  /usr/lib/libnombre_librería.a; por lo tanto -lm enlaza
  /usr/lib/libm.a).

  Bien. Pero cuando su programa está compuesto por varios ficheros de
  código fuente, necesitará usar la utilidad make. Supongamos que ha
  escrito un evaluador de expresiones: su código 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 lío! ¿Cómo
  se puede compilar calc.c?

  Debe escribir un fichero llamado Makefile, el cual muestra al
  compilador las dependencias entre los ficheros de código fuente y los
  ficheros de código 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. Guárdelo 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 páginas man, sección 3; por ejemplo:

       $ man 3 printf

  Hay muchas librerías disponibles por ahí; entre las primeras que
  deseará usar están las ncurses (efectos en modo texto) y svgalib,
  (gráficos para consola). Si se siente suficientemente valiente para
  atacar la programación bajo X (no es tan difícil), hay muchas
  bibliotecas que harán mucho más fácil 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 estándar.

  Muchos editores pueden actuar como IDE. emacs y jed, por ejemplo,
  proporcionan marcado de sintaxis, indentación automática, 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 más que un 1%, en realidad...

  12.1.  Utilización 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, sólo
  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
  debería ser utilizado nunca más, o usando gzip:

       $ compress <fichero>
       $ gzip <fichero>

  eso crea un fichero comprimido con la extensión .Z (compress) o vez.
  Para descomprimir, use:

       $ compress -d <fichero.Z>
       $ gzip -d <fichero.gz>

  LPM.

  Hay también utilidades unarj, zip y unzip (compatibles con ARJ y
  PK??ZIP). Los ficheros con la extensión .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 también:

       $ tar -cvzf <fichero.tar.gz>

  12.2.  Instalación de aplicaciones

  Antes de nada: instalar paquetes es trabajo del root. La mayoría de
  las aplicaciones Linux se distribuyen como ficheros .tar.gz, que
  contienen, típicamente, 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 después el fichero README o INSTALL. En la mayoría de los
  casos, la aplicación se distribuye en código fuente, por lo que deberá
  compilarla; a menudo, será suficiente teclear make y después make
  install.  Si el archivo contiene una rutina configure ejecútela
  primero.  Obviamente, necesitará el compilador gcc o g++.

  Algunos archivos deben ser desempaquetados desde el directorio raíz;
  é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

  Visión de pantallas anteriores: presionar <MAYÚS + RE PÁG> (la tecla
  gris) le permite volver atrás unas cuantas páginas, dependiendo de la
  memoria de vídeo 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 más abajo; en las X, haga click y
  arrastre para seleccionar el texto en una ventana xterm, después haga
  click en el botón central (o con los dos a la vez si tiene un ratón de
  dos botones) para pegar.  También hay un xclipboard (portapapeles de
  X) (de momento, sólo para texto); no se confunda por su muy baja
  velocidad de respuesta.

  Usar el ratón: instale gpm, el controlador de ratón para la consola.
  Haga click y arrastre para seleccionar texto, entonces haga un click
  con el botón derecho para pegar el texto seleccionado. Funciona a
  través de diferentes consolas virtuales.

  Mensajes del núcleo: échele un vistazo a /var/adm/messages o
  /var/log/messages como root para ver lo que el núcleo le dice,
  incluyendo los mensajes de inicio. La orden dmesg también es útil.

  12.4.  ¿Dónde encontrar aplicaciones?

  Si se está preguntando si puede reemplazar su vieja y fiable
  aplicación DOS/Win con una aplicación 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 «Página de Utilidades y Aplicaciones para Linux»
  http://www.xnet.com/~blatura/linapps.shtml, y la página «oficial» de
  Linux http://www.linux.org.

  12.5.  Unas cuantas cosas que Usted no podía hacer

  Linux puede hacer muchas cosas que eran difíciles o imposibles de
  hacer con DOS/Windows. Esta es una pequeña 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 sólo 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 línea de data.dat cuyo segundo campo
  contenga la cadena «abc».

  ·  cron es útil para realizar tareas periódicamente, en una fecha y
     hora determinadas. Escriba man 5 crontab.

  ·  find (vea también sección ``Directorios: equivalencia de órdenes'')
     es una de las órdenes más potentes y útiles. Se utiliza para
     encontrar ficheros que tengan unas determinadas características y
     para realizar acciones en ellos. Un uso general de find es:

       $ find <directorio> <expresión>

  donde <expresión> incluye los criterios de búsqueda y las acciones.
  Ejemplos:

       $ find . -type l -exec ls -l {} \;

  encuentra todos los ficheros que son enlaces simbólicos y muestra a
  quién apuntan.

       $ find / -name "*.old" -ok rm {} \;

  encuentra todos los ficheros que ajusten con el patrón 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 "geología" *.txt

  lista todos los ficheros *.txt que contengan la palabra «geología». La
  variante zgrep trabaja con ficheros comprimidos con gzip. LPM;

  ·  Las expresiones regulares son un método complejo pero muy potente
     de efectuar operaciones de búsqueda en un texto. Por ejemplo,
     ^a[^a-m]X{4,}txt$ se ajusta a una línea que comienza con `a',
     seguida de cualquier carácter excepto los del intervalo a-m,
     seguido de 4 o más `X', y terminado en `txt'. Puede utilizar
     expresiones regulares con editores avanzados, less, y muchas otras
     aplicaciones.  man grep para una introducción.

  ·  script <fichero_script> vuelca los contenidos de la pantalla en
     fichero_script hasta que teclee la orden exit.  Es útil para
     depuración;

  ·  sudo permite a usuarios efectuar algunas tareas propias del root,
     como por ejemplo, formatear y montar discos; LPM);

  ·  uname -a le da información 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 más 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 versión
  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 instalación, 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 distribución para que refleje su instalación, y ponga
  estos ficheros en su directorio de usuario (de la partición 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 más exóticas (como las de fuentes, etc.), aquí tenemos
  una lista de las extensiones más usuales:

  ·  1 ... 8: páginas de manual. Léalas con groff -Tlatin1 -man
     <file.1>.

  ·  arj: archivo hecho con arj.

  ·  dvi: fichero de salida producido por TeX (ver más 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 páginas de
     manual). Consiga info.

  ·  lsm: Fichero Linux Software Map. Es un fichero de texto ASCII plano
     que contiene la descripción 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 gráfico.

  ·  Z: archivo hecho con compress.

  ·  zip: archivo hecho con zip. Consiga zip y unzip.

  12.8.  Conversión de ficheros

  Si necesita intercambiar ficheros de texto entre DOS/Win y Linux,
  tenga en cuenta del problema de «fin de línea». Bajo DOS, cada línea
  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 línea
  acabará con un carácter `M' de extraña apariencia. un fichero de texto
  Linux bajo DOS aparecerá como una sóla línea kilométrica sin párrafos.
  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 líneas 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 sólo-texto contienen caracteres acentuados,
  asegúrese de que están hechos bajo Windows (con NotePad) y no bajo
  DOS; si no, todas las letras acentuadas aparecerán como caracteres
  extraños.

  Para convertir ficheros del Word o WordPerfect a texto plano, la
  cuestión es más dificil, pero aún 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 ofimáticos 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 también leer y escribir ficheros de Word y
  Excel, aunque la conversión no es siempre perfecta. Visite
  http://www.stardivision.com.

  Otro buen paquete es Corel WordPerfect, del cual está disponible para
  descarga una edición gratuita. ¿Debería decir más? 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 aún
  limitado, y que se espera que practique más con Linux para usarlo
  cómodamente. Pero si todo lo que quería hacer era conseguir un puñado
  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 más acerca de él (todo el mundo lo hace). ¡Apuesto lo que
  sea, también, 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 físico o electrónico, siempre y cuando este
  aviso de copyright se mantenga en todas las copias. Se permite y se
  anima a la redistribución comercial; sin embargo, al autor le gustaría
  ser notificado de cualquier distribución.

  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 distribución.
  Se pueden conceder excepciones a estas reglas bajo ciertas
  condiciones;  por favor, contacte con el coordinador de los COMO de
  Linux en la dirección dada más abajo.

  En resumen, deseamos promocionar la dispersión de esta información a
  través de cuantos canales sea posible. Sin embargo, deseamos retener
  el copyright de los documentos COMO, y nos gustaría 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 vía e-mail.

  13.2.  Agradecimientos

  "CÓMO 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: Instalación 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
  información contenida en el mismo debe ser utilizada bajo su propia
  responsabilidad.  En ningún caso el autor será responsable de
  cualquier daño resultante del uso de este documento.

  Los comentarios son bienvenidos. Para cualquier duda, sugerencia,
  crítica, etc., siéntase libre de contactar conmigo.

  Disfrute de Linux y de la vida,

  Guido   =8-)

  13.3.  Traducción

  «CÓMO pasar de DOS/Win a LINUX» fue traducido por David Marín Carreño,
  davefx@bigfoot.com, como un pequeño grano de arena más dentro del
  Proyecto INSFLUG. Para más información, vea la sección ``''.

  He intentado una traducción fidedigna del documento original de Guido,
  aunque en algunos lugares haya actualizado información o cambiado
  algunas expresiones por otras más adecuadas a la jerga en nuestro
  idioma.

  Si desea plantear alguna duda, sugerencia o crítica, pues tampoco dude
  en contactar conmigo.

            |   |   |  _|   David Marín Carreño (aka DaveFX)
             \  |  /  /
              |/____\|      Estudiante de Ingeniería en Informática.
             /_|_/\_|_\     Traductor de documentos Línux.
             \| (__) |/     Madrid. España.
             / \____/ \
            (____  ____)    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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Cómo pasar de DOS a Linux.
  Por Guido Gonzato guido@ibogfs.df.unibo.it
  Carreño, davefx@bigfoot.com
  v1.0, 11 de diciembre de 1996. Traducción: 8 de marzo de
  1998.

  Este documento Como está dedicado a todos los (¿próximamente anticua­
  dos?) usuarios de DOS que acaban de decidir pasarse a Linux, el
  clónico gratuito de UNIX para ordenadores x86. Dadas las similitudes
  entre DOS y Unix, el propósito 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.  Introducción

  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 solución para todos, incluso aunque sea
  técnicamente superior a muchos sistemas operativos comerciales. Usted
  se beneficiará inmensamente de Linux si lo que necesita es software
  para programar, Internet, TeX... software técnico 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 fácil de usar y configurar como Windows o
  el Mac, así que prepárese para trastear un poco. Después de estos
  avisos, déjeme decir que confío al 100% en que usted pertenece a la
  clase de usuario que encontrará en Linux el Nirvana informático. Está
  hecho para usted. Y recuerde que, de todos modos, Linux y DOS/Windows
  pueden coexistir en la misma máquina.

  1.2.  Requisitos previos para la lectura de este Como

  Asumiré que:

  ·  conoce los comandos y conceptos básicos 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 guía es sólo un paso incompleto. Para más
     información, busque en el Linux, Instalación y Primeros Pasos de
     Matt Welsh y en la Guía del Usuario de Linux de Larry Greenfield.
     Ambas, en versión inglesa, disponibles en
     ftp://sunsite.unc.edu/pub/Linux/docs/LDP y, traducidos al
     castellano, en la página del proyecto LuCAS:
     http://www.infor.es/LuCAS

  1.3.  Ya está. Ahora cuénteme más.

  Supongo que acaba de instalar Linux y los programas que necesita en su
  ordenador, que ya tiene una cuenta propia (si no la tiene aún, ¡teclee
  adduser ahora mismo!) y que Linux está ejecutándose. 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 solía
  hacer con DOS, y muchas más. Si estuviera ejecutando DOS en lugar de
  Linux, estaría 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 más de 100 comandos disponibles:
  lo mismo, hasta cierto punto, sucede con el Linux.

  Unas pocas cosas que señalar antes de continuar:

  ·  primero, cómo 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 después Ctrl-Alt-Supr. Nunca apague o
     reinicie el ordenador directamente: el sistema de ficheros podría
     dañarse.

  ·  al contrario que en DOS, Linux tiene mecanismos de seguridad
     intrínsecos, 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
     Sección ``''). Sólo 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 también será root). DOS,
     por el contrario le dejaría machacar todos los contenidos de su
     disco duro.

  ·  si está realmente animado a experimentar, inténtelo usted mismo:
     seguramente no podrá hacer ningún daño. Puede conseguir alguna
     ayuda escribiendo en la línea de comandos ($ es el símbolo de la
     línea de comandos estándar, # es el de root);

       $ help

  Esto le porporcionará ayuda acerca de bash; puede conseguir infor­
  mación acerca de un comando concreto escribiendo:

  $ man comando

  el cual, si tiene instaladas las páginas man, ejecutará la página de
  manual man asociada al comando. También 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 redirección y piping, o entubamiento, más
     potentes que bajo DOS.  Los comandos simples pueden agruparse para
     realizar tareas complejas. ¡Use estas características!

  ·  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 redirección a fichero_redir es
  opcional.

  ·  desde ahora LPM significa para más información Lea las Páginas 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 más que una tabla de comandos, continúe 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, están guardados en
  directorios y algunos son ejecutables, y entre éstos , la mayoría
  tiene opciones en la línea de comandos. Incluso puede utilizar
  comodines, redirección y tuberías como en DOS. Sólo hay unas pocas
  diferencias:

  ·  bajo DOS, los nombres de ficheros están 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 más largos (hasta 255 caracteres), y con más
     de un punto en ellos: por ejemplo,
     Este.es.un.nombre.de.fichero.MUY.largo.  Dése cuenta de que he
     utilizado tanto mayúsculas como minúsculas: en efecto...

  ·  Linux es sensible a las mayúsculas y las minúsculas 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
     sería 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 gurruño ~. 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 /opción. En
     Linux se obtienen con -opción o --opción.  Ejemplo: dir /s se
     convierte en ls -R. Fíjese en que muchos programas DOS (como PKZIP
     o ARJ) utilizan opciones de tipo Unix.

  Puede ahora saltar a las Sección ``'', pero yo de usted seguiría
  leyendo.

  2.2.  Enlaces simbólicos

  Unix tiene un tipo de fichero que no existe bajo DOS: el enlace
  simbólico.  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 simbólicos son /usr/X11, que apunta a
  /usr/X11R6; /dev/modem, que apunta a /dev/cua0 o a /dev/cua1, según
  donde esté el módem.

  Para crear un enlace simbólico:

       $ 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 (sólo-lectura), y S (sistema).  Sólo H y R
  tienen sentido bajo Linux: los ficheros ocultos comienzan con un
  punto, y los de sólo 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 información restante a un
  lado (el libro de Matt esta ahí para ese propósito), sólo 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 demás 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 podría 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 (ejecución).

  Ejemplos:

       $ chmod u+x fichero

  esto habilita el permiso de ejecución para el propietario del fichero.
  Atajo: chmod +x fichero.

       $ chmod go-wx fichero

  esto quita el permiso de escritura y de ejecución para todo el mundo
  menos al usuario.

       $ chmod ugo+rwx fichero

  esto le da a todo el mundo el permiso de lectura, escritura y
  ejecución.

       $ 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 más corta de referirse a los permisos es con números: 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 difícil, pero con
  algo de práctica el concepto se domina.

  root, al ser superusuario, puede cambiar los permisos de los ficheros
  de todo el mundo. Hay mucha más información 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 redirección y de tuberías:

  < > >>  |

  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 más inteligente bajo Linux: * equivale a todos los ficheros
     excepto los ocultos; .* equivale a todos los ficheros ocultos;  *.*
     equivale sólo a aquellos ficheros que tienen un punto en medio del
     nombre, seguido de otros caracteres; p*r equivaldría tanto a peor
     como a por;  *c* equivaldría tanto a pecado como a peca.

  ·  cuando se usa more, pulse espacio para ir leyendo a través del
     fichero, q o Ctrl-C para salir. less es más intuitivo y permite
     utilizar las teclas del cursor;

  ·  no hay UNDELETE, así que piénselo dos veces antes de borrar
     cualquier cosa;

  ·  además de los < > >> del DOS, Linux tiene el operador 2> para
     redirigir los mensajes de error (stderr); más aún, el operador 2>&1
     redirige stderr a stdout (la salida estándar), mientras que 1>&2
     redirige stdout a stderr;

  ·  Linux tiene otro comodín: 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.  Ejecución de programas: Multitarea y Sesiones

  Para ejecutar un programa, escriba su nombre tal y como lo haría bajo
  DOS.  Si el directorio (Sección ``'') donde el programa está guardado
  está incluido en la variable de entorno PATH (Sección ``''), el
  programa comenzará a ejecutarse. Excepción: 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 típico de una línea de comandos:

       $ comando -o1 -o2 ... -on par1 par2 ... parn  < input > output

  donde -o1, ..., -on son las opciones del programa, par1, comandos en
  la línea de comandos:

       $ comando1 ; comando2 ; ... ; comandoN

  Esto es todo acerca de ejecutar comandos, pero es fácil ir un paso más
  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. Más
  aún, Linux permite tener varias sesiones abiertas simultáneamente: es
  como tener muchos ordenadores en los que trabajar a la vez.

  ·  Para cambiar a la sesión 1..6:

       $ Alt-F1 ... Alt-F6

  ·  Para comenzar una nueva sesión sin dejar la actual:

       $ su - <mi_nombre_de_usuario>

  Ejemplo:

       $ su - root

  Esto es útil, por ejemplo, cuando se necesita montar un disco (Sección
  ``''): normalmente, sólo root puede hacer eso.

  ·  Para acabar una sesión:

       $ exit

  Si hay trabajos parados (ver más abajo), será avisado.

  ·  Para lanzar un proceso en primer plano:

       $ nomprog [-opciones] [parametros] [< input] [> output]

  ·  Para lanzar un proceso en segundo plano, añada un ampersand: &, al
     final de la línea de comandos:

       $ nomprog [-opciones] [parametros] [< input] [> output] &
       [1] 123

  el shell o intérprete de comandos identifica el proceso con un número
  de trabajo (p.e. 1; ver más abajo), y con un PID (123 en nuestro ejem­
  plo).

  ·  Para ver cuántos procesos hay:

       $ ps -a

  Esto generará una lista de procesos actualmente en ejecución.

  ·  Para matar un proceso:

       $ kill <PID>

  Puede necesitar matar un proceso cuando no sabe cómo 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>

  Además, el intérprete 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 cuántos trabajos hay:

       $ jobs

  aquí los trabajos son identificados por su número de trabajo, no por
  su PID.

  ·  Para parar un proceso ejecutándose en primer plano (no siempre
     funciona):

       $ Ctrl-C

  ·  Para suspender un proceso ejecutándose en primer plano:

       $ Ctrl-Z

  ·  Para mandar un proceso suspendido al segundo plano (convirtiéndolo
     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
  número de trabajo, y no a un PID. Usando estos comandos puede for­
  matear un disco, comprimir un puñado de ficheros, compilar un pro­
  grama, y descomprimir un fichero simultáneamente, y todavía tener la
  línea de comandos a su disposición. Inténtelo con el DOS. Inténtelo
  con Windows, sólo 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 máquina remota cuya dirección 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 máquina remota.

  Si tiene X11, puede incluso ejecutar una aplicación X en un ordenador
  remoto, mostrándolo en su pantalla de X. Supongamos remote.bigone.edu
  la máquina X remota y local.linux.box su máquina 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
  máquina. Aunque mejor no intente esto en una línea ppp.

  3.  Gestión de Directorios

  3.1.  Directorios: Nociones preliminares

  Hemos visto las diferencias entre los ficheros de DOS y Linux. Entre
  directorios, bajo DOS el directorio raíz 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 también tienen permisos. Lo que hemos visto en la
  Sección ``'' también 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 (según 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 vacío.  Para
     borrar un directorio y todos sus contenidos, use rm -R (bajo su
     propia responsabilidad).

  2. el carácter ~ es un atajo para el nombre de su directorio de
     usuario. Los comandos cd o cd ~ le llevarán 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 métodos de almacenamiento.

  4.1.  Administración de dispositivos

  Nunca habrá pensado acerca de ello, pero el comando de DOS FORMAT A:
  hace mucho más de lo que parece. De hecho, cuando ordene el comando
  FORMAT:

  1. Formateará físicamente 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 continuación se explica cómo preparar un disco (necesitará
  iniciar una sesión como root):

  ·  Para formatear un disquete estándar 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 sólo 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 solía 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
  también 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 incómodo 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

  ·  añadir en /etc/fstab las siguientes líneas:

       /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, después 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 cómo se manejan disquetes, etc. un par de líneas bastan
  para ver cómo hacer una copia de seguridad. Hay muchos paquetes que
  pueden servirle, pero lo más simple para hacer una copia de seguridad
  multivolumen (como root) es:

       # tar -M -cvf /dev/fd0H1440 /directorio_a_guardar

  Asegúrese 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.  Personalización del Sistema

  5.1.  Ficheros de inicialización 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 inicialización, algunos de los
  cuales no deberían ser modificados hasta que usted supiese con
  seguridad lo que está haciendo. De todos modos, estos son los más
  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
  automáticamente un programa tras iniciar una sesión, 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 (fíjese en que es un fichero oculto), se
  leerá tras el inicio de sesión y se ejecutarán 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 Inicialización de Programas

  Bajo Linux, casi todo puede ser configurado de acuerdo con sus
  necesidades. La mayoría de los programas tienen uno o más ficheros de
  inicialización con los que puede trastear, a menudo llamados que
  querrá modificar son los de configuración del gestor de ventanas para
  X-Window.  Si utiliza el fvwm2 serán:

       /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 Programación

  7.1.  Los Scripts del Shell: Ficheros .BAT  con esteroides

  Si ha utilizado ficheros .BAT para crear atajos de largas líneas de
  comando (yo suelo hacerlo), el objetivo puede ser obtenido insertando
  las líneas de alias convenientes (ver ejemplo de más arriba) en el
  profile o en el .profile. Pero si sus ficheros .BAT son más
  complicados, le encantará el lenguaje de Script que el shell pone a su
  disposición: es tan potente como el Qbasic (o más). Tiene variables,
  estructuras como while, for, case, if-then-else, y montones de nuevas
  características: puede ser una buena alternativa a un lenguaje de
  programación "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
  estándar 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 difícil de usar.
  No voy a explicar cómo usarlo, porque no me gusta y no lo uso. Vea el
  manual "Linux: Instalación y Primeros Pasos" de Matt Welsh (aunque
  sería mejor utilizar otro editor tal como joe o emacs para X).  Baste
  decir aquí unos comandos muy básicos:

  ·  para insertar texto, pulse i y después el texto;

  ·  para salir de vi sin guardar, pulse ESC y después :q!

  ·  para guardar y salir, pulse ESC y luego :wq

  Escribir scripts bajo bash es una materia tan extensa que requeriría
  un libro para abarcarla toda, y no voy a profundizar más allá en este
  tema.  Sólo daré un ejemplo de script, del cual se pueden extraer las
  reglas básicas:

  #!/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... también
  están disponibles.

  Suponiendo que usted sepa C, hay un par de guías 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
  acompañan a sus análogos bajo DOS: no tiene IDE, ni ayuda en línea, ni
  debugger integrado, etc... Es sólo un rústico compilador de línea de
  comandos, muy potente y eficiente. Para compilar el típico 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 librería al programa, añada la opción
  -lnombre_de_librería. Por ejemplo, para enlazar la librería math:

       $ gcc -o mathprog mathprog.c -lm

  (-lnombre_libreria fuerza a gcc a enlazar la librería
  /usr/lib/libnombre_librería.a; por lo tanto -lm enlaza
  /usr/lib/libm.a).

  Bien. Pero cuando su programa está compuesto por varios ficheros de
  código fuente, necesitará usar la utilidad make. Supongamos que ha
  escrito un evaluador de expresiones: su código 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 lío! ¿Cómo
  se puede compilar calc.c?

  Debe escribir un fichero llamado makefile, el cual muestra al
  compilador las dependencias entre los ficheros de código fuente y los
  ficheros de código 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, guárdelo 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 páginas man, sección 3; por ejemplo:

       $ man 3 printf

  Hay muchas librerías disponibles por ahí; entre las primeras que
  deseará usar están las ncurses, para manejar efectos en modo de texto,
  y svgalib, para hacer gráficos. Si se siente suficientemente valiente
  para atacar la programación 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
  fantásticas librerías que hacen de la programación bajo X algo
  realmente fácil. Más aún, 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.  Gestión de Memoria Virtual

  Aunque Linux puede ejecutarse en teoría con sólo 2 megas de RAM,
  cuanto más se tenga, más 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

  Añada la última línea en /etc/rc.d/rc.local para hacer que el fichero
  de memoria virtual esté disponible la siguiente vez que arranque, o
  añada esta línea en /etc/fstab:

       /swapfile   swap   swap   defaults

  8.2.  Utilización 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, sólo
  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
  debería ser utilizado nunca más, o usando gzip:

       $ compress <fichero>
       $ gzip <fichero>

  eso crea un fichero comprimido con la extensión .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)
  también están disponibles. Los ficheros con la extensión 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 también:

       $ tar -cvzf <fichero.tar.gz>

  8.3.  Instalación de aplicaciones

  Antes de nada: instalar paquetes es trabajo del root. Algunas
  aplicaciones Linux se distribuyen como ficheros .tar.gz o .tgz,
  preparadas específicamente para que sean descomprimidas desde el
  directorio raíz / escribiendo el siguiente comando:

       # gzip -dc <fichero.tar.gz> | tar xvf -

  Los ficheros se descomprimirán en el directorio adecuado, el cual será
  creado ``al vuelo''. Los usuarios de la distribución 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 demás paquetes no deberían ser instalados desde /; típicamente, el
  paquete contendrá un directorio llamado nombrepaquete/ y un montón de
  ficheros y/o subdirectorios dentro de nombrepaquete/. Una buena regla
  es instalar todos esos paquetes bajo /usr/local.

  Además, 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

  ·  Terminación de comandos: presionando TAB mientras teclea un comando
     completará la línea 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 ambigüedad.)

  ·  Visión de pantallas anteriores: presionar MAYÚS + RE PÁG (la tecla
     gris) le permite volver atrás unas cuantas páginas, dependiendo de
     la memoria de vídeo 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 más abajo; en las X, haga click y
     arrastre para seleccionar el texto en una ventana xterm, después
     haga click en el botón central (o con los dos a la vez si tiene un
     ratón de dos botones) para pegar. También hay un xclipboard
     (portapapeles de X) (de momento, sólo para texto); no se confunda
     por su muy baja velocidad de respuesta.

  ·  Usar el ratón: instale gpm, el controlador de ratón para la
     consola. Haga click y arrastre para seleccionar texto, entonces
     haga un click con el botón derecho para pegar el texto
     seleccionado. Funciona a través 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, dónde encontrarlas. Ya que usted sabe cómo
  navegar por la red y cómo utilizar archie y ftp, sólo le daré tres de
  las más importantes direcciones para Linux: ftp://sunsite.unc.edu/,
  ftp://tsx-11.mit.edu/, y ftp://nic.funet.fi/. Por favor, use el mirror
  más cercano.

  ·  at le permite ejecutar programas a una hora y fecha especificados.

  ·  awk es un lenguaje simple pero potente de manipulación 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 información 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 también la sección ``'') es uno de los comandos más
     potentes y útiles. Se utiliza para buscar ficheros que se ajusten a
     unas determinadas características, y realizar acciones sobre ellos.
     El uso general de find es:

       $ find <directorio> <expresion>

  donde expresion incluye criterios de búsqueda y acciones. Ejemplos:

  $ find . -type l -exec ls -l {} \;

  busca todos los ficheros que son enlaces simbólicos y dice a dónde
  apuntan.

       $ find / -name "*.old" -ok rm {} \;

  busca todos los ficheros que se ajusten a lo especificado y los borra,
  pidiéndole antes confirmación.

       $ 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 científicos;

  ·  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 manteniéndolos ejecutables
     (similar a PKLITE);

  ·  joe es un excelente editor. Invocándolo 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 impresión, use lpq; para quitar un fichero de
     la cola de impresión, use lprm;

  ·  mc es un maravilloso gestor de ficheros, clon del comandante
     norton;

  ·  pine es un simpático programa gestor de correo electrónico;

  ·  script fichero_script copia a fichero_script lo que aparece en
     pantalla antes de ejecutar el comando exit. Util para depuración;

  ·  sudo permite a los usuarios ejecutar algunas funciones del root
     (p.e. formatear y montar discos; LPM);

  ·  uname -a da información 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 más exóticos (como los de fuentes, etc.), aquí tenemos
  una lista de los más usuales:

  ·  1 ... 8: páginas de manual. En el extraño caso en que aún no lo
     tenga, consiga man.

  ·  arj: archivo hecho con arj. Use unarj para descomprimirlo.

  ·  dvi: fichero de salida producido por TeX (ver más abajo).  Use xdvi
     para visualizarlo; Use dvips para transformarlo en un fichero
     PostScript (.ps).

  ·  gif: fichero gráfico. Consiga seejpeg, xpaint o zgv para
     visualizarlo.

  ·  gz: archivo comprimido con gzip.

  ·  info: archivo info (Algo así como una alternativa a las páginas de
     manual). Consiga info.

  ·  jpg, jpeg: fichero gráfico. Consiga seejpeg o zgv.

  ·  lsm: Fichero Linux Software Map. Es un fichero de texto ASCII plano
     que contiene la descripción 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 tenía fuentes
     corruptas y estaba incluido en algunas versiones de la distribución
     Slackware.

  ·  texi: fichero texinfo, a partir del cual se pueden producir tanto
     archivos TeX como info. Consiga texinfo.

  ·  xbm, xpm, xwd: fichero gráfico. 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 aún
  limitado, y que se espera que practique más con Linux para usarlo
  cómodamente. Pero si todo lo que quería hacer era conseguir un puñado
  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 más acerca de él ---todo el mundo lo hace---. Apuesto,
  también, 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 físico o electrónico, siempre y cuando este
  aviso de copyright se mantenga en todas las copias. Se permite y se
  anima a la redistribución comercial; sin embargo, al autor le gustaría
  ser notificado de cualquier distribución.

  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 distribución.
  Excepciones a estas reglas pueden ser concedidas bajo ciertas
  condiciones;  por favor, contacte con el coordinador de los COMO de
  Linux en la dirección dada más abajo.

  En resumen, deseamos promocionar la dispersión de esta información a
  través de cuantos canales sea posible. Sin embargo, deseamos retener
  el copyright de los documentos COMO, y nos gustaría 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 vía 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: Instalación 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
  información contenida en el mismo debe ser utilizada bajo su propia
  responsabilidad.  En ningún caso el autor será responsable de
  cualquier daño resultante del uso de este documento.

  El correo es bienvenido. Para cualquier duda, sugerencia, crítica,
  etc., siéntase libre de contactar conmigo.

  Disfrute de Linux y de la vida,

  Guido   =8-)

  10.1.  Traducción

  "CÓMO pasar de DOS a LINUX" fue traducido por David Martín Carreño,
  davefx@bigfoot.com, como un pequeño grano de arena más dentro del
  Proyecto INSFLUG. Para más información, vea la sección ``''.

  He intentado una traducción fidedigna del documento original de Guido,
  aunque en algunos lugares haya actualizado información o cambiado
  algunas expresiones por otras más adecuadas a la jerga en nuestro
  idioma.

  Si desea plantear alguna duda, sugerencia o crítica, pues tampoco dude
  en contactar conmigo.

  David!! 3B-)

  11.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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.    ¿Cuál es la última versión de dosemu y dónde puedo
  conseguirla?

  1.3.    ¿Dónde puedo seguir el desarrollo?

  1.4.    ¿Qué documentación hay disponible para dosemu?

  1.5.    ¿Cómo puedo incluir cambios o adiciones al HOWTO?

  1.6.    Copyright

  2.      Compilando e instalando dosemu

  2.1.    ¿Dónde están las instrucciones sobre la instalación?

  2.2.    Los diez principales problemas durante la compilación e
  instalación de dosemu.

  2.3.    ¿Cómo puedo crear un ejecutable simple (sin librerías)?

  2.4.    ¿Cómo puedo crear archivos binarios en formato ELF?

  2.5.    ¿Cómo puedo compilar dosemu en una máquina con poca memoria?

  2.6.    ¿Cómo puedo acelerar la compilación?

  2.7.    ¿Cómo puedo compilar de forma no interactiva?

  2.8.    Más trucos de compilación de Marty...

  2.9.    ¿Es necesario compilar dosemu como root ?

  2.10.   El Makefile  está en un bucle infinito...

  3.      Configuración del Disco Duro

  3.1.    ¿Cómo 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.    ¿Dónde está los controladores del ratón compatible con el de
  Microsoft?

  4.2.    ¿Por qué no funciona el controlador del ratón?

  4.3.    ¿Por qué anula dosemu el COM4 ?

  4.4.    ¿Cómo utilizo dosemu sobre los puertos serie?

  4.5.    ¿Cómo puedo cambiar entre dosemu y una shell sobre la línea
  serie?

  4.6.    ¿Cómo puedo hacer que funcionen los puertos paralelos?

  5.      Múltiples usuarios y sesiones sin-interactividad

  5.1.    ¿Puedo utilizar dosemu en un sistema multiusuario?

  5.2.    ¿Cómo puedo ejecutar comandos del dos de forma no interactiva?

  6.      dosemu y Netware

  6.1.    ¿Cómo 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 emulación ansi?

  8.      dosemu y MS-Windows 3.1

  8.1.    ¿Es posible ejecutar MS-Windows 3.1 bajo dosemu?

  9.      Vídeo 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.    ¿Cómo puedo hacer que funcione correctamente mi tarjeta de
  vídeo Trident/Actix/otra?

  9.4.    ¿Por qué no funciona el software de mi tarjeta de sonido con
  dosemu?

  10.     Otro Hardware

  10.1.   ¿Cómo puedo hacer que trabaje mi dispositivo xxxxx bajo
  dosemu?

  11.     Problemas y soluciones

  11.1.   Dosemu se ha caído y ahora no puedo escribir nada.

  11.2.   He activado la memoria EMS en el dosemu.conf  pero no ayuda.

  11.3.   ¿Cómo 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.   ¿Cómo puedo hacer que dosemu se ejecute más rápido?

  11.7.   Mi unidad de CDROM tiene problemas a la hora de leer algunos
  archivos bajo dosemu.
  11.8.   ¿Cómo puedo ver los datos de salida de la depuración (
  debugger )?

  11.9.   ¿Por qué aparecen duupliicaadoos mis pulsaciones de teclado?

  12.     Contribuyendo al proyecto dosemu

  12.1.   ¿Quién es el responsable de dosemu?

  12.2.   Quiero ayudar. ¿Con quién 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 características especiales del kernel de Linux y del
  procesador 80386 para correr MS-DOS en lo que podría llamarse una
  ventana del DOS o Dos box".

  Dicha ventana, una  combinación 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 tamaño de palabra y los modos de
     direccionamiento del "modo real" de la familia de procesadores
     iAPX86 mientras que se ejecute entre los límites 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 están acostumbradas a tener control.

  ·  La habilidad de proporcionar servicios propios del MS-DOS a través
     de los servicios nativos del Linux; por ejemplo, dosemu puede
     proporcionar un disco duro virtual pertenececiendo éste a la
     jerarquía de directorios de Linux.

  1.2.  ¿Cuál es la última versión de dosemu y dónde puedo conseguirla?

  La versión más 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 recién salidas (pre-release) también están
  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 más recientes del
  kernel de Linux. Además, incluyen nuevas características.  Recuerde
  que es código en fase ALPHA, de forma que puede tener bugs serios y
  muy poca información sobre las nuevas características.

  1.3.  ¿Dónde puedo seguir el desarrollo?

  Si quiere seguir el desarrollo de dosemu, debería considerar
  subscribirse a linux-msdos-digest.

  Para ello, envíe un mensaje a  majordomo@vger.rutgers.edu con el
  siguiente comando en el cuerpo de su mensaje electrónico:

       subscribe linux-msdos-digest su_nombre@su.direccion.electronica

  Si alguna vez desea darse de baja de esta lista de correo, (mailing
  list), envíe 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é documentación hay disponible para dosemu?

  El manual del dosemu (dosemu.texinfo) escrito por Robert Sanders no ha
  sido actualizado durante algún tiempo, pero todavía es una buena
  fuente de información. Se distribuye con dosemu.

  La "Guía de principiantes de dosemu" ("Dosemu Novice's Altering
  Guide") también llamada DANG es el mapa de carreteras de los
  entresijos de dosemu.

  Está diseñada para los aventureros, aquellos que desean modificar el
  código 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 versión más
  reciente puede encontrarse en ftp://dspsun.eas.asu.edu/pub/dosemu.

  Y también, por supuesto, están los PUFs y COMOs (-- En cuanto a
  traducciones, ver la sección ``''--)

  de dosemu. Pero esto ya lo sabe, ¿no?. ;-) También se anuncian de vez
  en cuando en la lista de correo. La versión más reciente puede
  encontrarla en ftp://dspsun.eas.asu.edu/pub/dosemu.

  1.5.  ¿Cómo puedo incluir cambios o adiciones al HOWTO?

  El método mas usual es editar el fichero (-- Referido al HOWTO
  original en inglés--) , 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 información de cualquier
  forma serán aceptada. Creando el fichero diff lo hace más fácil para
  para el editor del HOWTO. :-)

  1.6.  Copyright

  Unless (-- Nota del traductor: A continuación expongo el texto sobre
  el copyright en su versión original para respetar las condiciones que
  éste impone, su traducción se acompaña a continuación.--) 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 están 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 físico o electrónico, con tal de que la nota sobre el copyright
  se mantenga en todas las copias. Las distribuciones comerciales están
  permitidas y alentadas; sin embargo, al autor le agradaría 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 distribución 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
  dirección dada más adelante.

  Resumiendo, nos gustaría promover la difusión de esta información a
  través del mayor número de canales posibles. Sin embargo, nos gustaría
  mantener el copyright en los documentos COMO, y sería 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.  ¿Dónde están las instrucciones sobre la instalación?

  Las instrucciones sobre la instalación se pueden encontrar en el
  archivo "QuickStart", incluido en la distribución.

  2.2.  instalación de dosemu.  Los diez principales problemas durante
  la compilación e

  1. Olvidar leer el fichero QuickStart.

  2. Intentar compilar con un kernel anterior al 1.1.45.

  3. Tener mal la ubicación del código 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 estén
     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.  ¿Cómo puedo crear un ejecutable simple (sin librerías)?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escribía lo siguiente:

  Si quiere crear un ejecutable con QMAGIC, defina STATIC en el
  Makefile. De otra manera habrá una combinación de librería/ejecutable.

  2.4.  ¿Cómo puedo crear archivos binarios en formato ELF?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escribía lo siguiente:

  Si quiere hacer archivos binarios ELF, defina ELF en el "Makefile".
  Necesitará compilar e instalar las librerías slang de forma separada,
  Slang trabaja bien como archivo binario compartido en formato ELF.

  2.5.  ¿Cómo puedo compilar dosemu en una máquina con poca memoria?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escribía lo siguiente:

  Si tiene problemas al compilar porque desbordamiento del swap, debe
  añadir CFLAGS+=-fno-inline después 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.  ¿Cómo puedo acelerar la compilación?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escribía lo siguiente:

  La optimización predeterminada es -O2. Puede editar el fichero
  Makefile para usar -O (compilará un poco más rápido/lento).

  2.7.  ¿Cómo puedo compilar de forma no interactiva?

  Marty Leisner (leisner@sdsp.mc.xerox.com) escribía lo siguiente:

  Si define do_DEBUG en el Makefile, obtendrá un make -Wall -g, sin-tex
  y de forma no interactiva.

  2.8.  Más trucos de compilación de Marty...

  Marty Leisner (leisner@sdsp.mc.xerox.com) escribía lo siguiente:

  Necesita haber compilado el kernel en su sistema para obtener la
  versión actual. Si no es así, debe modificar a mano la variable
  KERNEL_VERSION en nivel más alto del Makefile. El número es de la
  forma "nmmmppp", donde "n" es la versión, "mmm" es la versión 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 más 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" también 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) añade:

  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) escribía (4/12/95) lo
  siguiente:

  Nos hemos encontrado con esto en ciertas ocasiones, normalmente cuando
  la fecha de algún fichero tenga algo que ver. Algunas personas lo
  arreglan con una versión más nueva del kernel, mientras que otros
  (incluido yo) hacen un "make realclean" y después un "make most".

  3.  Configuración del Disco Duro

  3.1.  ¿Cómo utilizo mi disco duro con dosemu?

  Lo primero, monte sus particiones del dos como subdirectorios de
  Linux.  Por ejemplo, debería crear un directorio en Linux tal como
  /dos

       mkdir -m 755 /dos

  y añadir una línea como la siguiente:

          /dev/hda1       /dos     msdos   umask=022

  en su /etc/fstab. (En este ejemplo, el disco duro está montado sólo
  lectura. Puede montarlo como lectura/escritura reemplazando "002" por
  "000" y utilizando la opción -m 777 con mkdir). Ahora haga un mount
  /dos.  De forma que pueda añadir una línea como la siguiente:

         lredir d: linux\fs/dos

  en el archivo AUTOEXEC.BAT en su hdimage (léase los comentarios
  respecto a LREDIR más 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
  localización del directorio del dos (/dos en nuestro ejemplo).

  Tim Bird (Tim_R_Bird@Novell.COM) expone que los usuarios de LREDIR
  deberían 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 física.  Por este
  motivo, es más seguro que el archivo autoexec.bat de la unidad
  redireccionada y de la unidad física (imagen del disco) sean el mismo.

  Robert D. Warren (rw11258@xx.acs.appstate.edu) informaba (4/28/94) de
  lo siguiente:

  Tengo una pequeña 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 línea 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 intérprete 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) añade (8/11/95)
  que:

  Resulta útil el hacer:

       install=C:\subst.exe g: c:

  antes de eso, de forma que todavía 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 través
  del redireccionador (lredir o emufs). Sin embargo, mucha gente han
  podido hacerlo simplemente descomentando la línea:

     disk { wholedisk "/dev/hda" }        # 1st partition on 1st disk

  en el fichero de configuración del dosemu.

  Otros lo han conseguido utilizando

          disk { partition "/dev/hda1" }

  Si su partición del dos ya está montada con permiso de escritura e
  intenta ejecutar dosemu con acceso a la partición 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 resultarían 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
     partición 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 partición 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) también comentaba (3/27/94)
  lo siguiente:

  "¡¡...utilice 6.2 si lo tiene!! Tan sólo asegúrese 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?  ¿Dónde está los controladores del ratón compatible
  con el de

  Tom Kimball (tk@pssparc2.oc.com) escribía (11/24/93) lo siguiente:

  Hay bastante gente que asegura haber utilizado un controlador de ratón
  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 ratón?

  Mark Rejhon (mdrejhon@magi.com) comentaba (4/7/95) lo siguiente:

  Si inicializa el controlador del ratón y se cuelga (debería tomar unos
  30-60s), intente especificar el puerto COM en el que está el ratón, en
  la línea de comando del controlador del ratón.

  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 todavía anula el
  COM4 (0x2e8, IRQ 5). 0x2e8 no están en ports{} en la configuración.
  Yo tengo que ejecutar setserial /dev/cua3 irq 5 después 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 línea "allowvideoportaccess on" en la configuración e irá
  bien.  Cuando tenga problemas luego con el vídeo, intente activar
  rangos de direcciones de entrada/salida más selectivos (ej. 40-43).

  4.4.  ¿Cómo utilizo dosemu sobre los puertos serie?

  4.5.  ¿Cómo puedo cambiar entre dosemu y una shell sobre la línea
  serie?

  John Taylor (taylor@pollux.cs.uga.edu) comentaba (5/25/94) lo
  siguiente:

  Utilizo el núcleo de Linux 1.1.13 y quisiera señalar una gran
  característica que debería mantenerse (IMHO (-- In My Honest Opinion,
  algo así como EMMO, En Mi Modesta Opinión--) ).  Con la versión 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 añadiendo otra shell unix, y conmutar entre ambas
  (DOS / UNIX). Esto permite que dosemu pueda ser usado a través de una
  línea serie cómodamente, ya que el cambio entre shells es muy fácil.

  4.6.  ¿Cómo puedo hacer que funcionen los puertos paralelos?

  Dennis Flaherty (dennisf@flaherty.elk.miles.com) comentaba (3/2/95)
  que:

  El dosemu.conf tiene líneas al final para redireccionar impresoras a
  lpr o a un archivo. Si quiere tener acceso directo, descomente las
  líneas de emulación, y añada la línea

       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.  Múltiples 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 más 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 línea 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 tendrán que preocuparse por el directorio en
  el que estén cuando ejecuten dosemu, y el archivo hdimage no
  necesitará ser cambiado cada vez que instale una versión nueva de
  dosemu.

  Si hace esto para un dosemu multiusuario, querrá entonces crear el
  archivo hdimage de sólo 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 "público" y/o un directorio "privado" (un
  subdirectorio en el directorio home de cada usuario).

  Nota: Los usuarios deben también crear un fichero de configuración
  personal llamado ~/.dosrc (con el mismo formato que el
  /etc/dosemu.conf) para ejecutar su copia personal del dos.

  5.2.  ¿Cómo puedo ejecutar comandos del dos de forma no interactiva?

  He estado tentado de escribir un artículo sobre esto durante bastante
  tiempo, pero no me he puesto todavía 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 línea de comandos (o por elección de un menú, etc...)
  sin modificar el emulador actual. (Se asume que su partición del dos
  está ya montada bajo Linux).

  Supongamos que quiere ejecutar wp60.exe con los parámetros "wp60
  d:\doc\paper.txt".  Debería hacer algo parecido a "dosrun wp60
  d:\doc\paper.txt".  "dosrun" debería ser un script que tendría que

  1. Editar/modificar/recrear el autoexec.bat de su partición del dos y

  2. Simplemente ejecutar dosemu (ej., "dos -C >/dev/null".

  El paso 1 debería guardar de alguna manera todo lo que normalmente
  tenga puesto en el autoexec.bat (ej., mouse.com) y en la última línea
  deberá poner "wp60d:\doc\paper.txt".

  En la parte del dosemu, y con antelación, deberá modificar el archivo
  config.sys (situado en el archivo hdimage) de forma que

  1. Utilice emufs para acceder a la partición 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 específico para esa sesión. 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 partición
  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 imágenes
  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 pequeño truco para conseguir que

       echo $* > $DOSTMP/startup.bat

  realmente funcione (un pequeño programa en C que cambie las '/' por
  dos utilizando cr/lf y añadiendo ^Z al final de archivo), cree
  archivos de arranque, enlaces y demás 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 partición 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
  actúen como filtros de impresión.

  6.  dosemu y Netware

  6.1.  ¿Cómo 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 través del
  controlador de paquetes (packet driver). El controlador reside en la
  interrupción 0x60, y cumple con las normativas usuales.

  Aún 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 según lo descrito en sus documentación (pdipx es
     otro método)

  7. Cargue netx

  8. Disfrute del acceso netware :-)

  Si necesita algún 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, quizás para
  acceder a Netware en la red a través de un cliente NETX, tengo un
  controlador (Silly Interrupt Generator) para añadir 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 dirección
  (jmaclean@fox.nstn.ns.ca) y le pasaré algunas direcciones.

  ¿Quiere accesos múltiples de dosemu a Novell?

  1. Compile la actual versión (pre-release) de dosemu

  2. Siga las indicaciones de ./v-net/dosnet.README

  3. Continúe 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 distribución de dosemu y debería también poderse encontrar en la
  dirección 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. Sólo recuerde utilizar ctrl-alt-Fn para ir a una
  Consola Virtual (VC), y así poder utilizar aplicaciones de Linux
  (dosemu es una aplicación más). Yo casi siempre tengo cargado el WP5.1
  en una sesión 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, debería 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 líneas establecen las teclas de retroceso (backspace) y borrado
  respectivamente.

  4. Haber configurado la línea 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 características complejas de texto
  que dosemu utiliza.  De esta forma no se necesita que la opción
  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 líneas establecen las teclas de retroceso (backspace) y borrado
  respectivamente.

  4. Configure la línea 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 también puedo crear un alias "dosxterm" a
  "term -fn vga -title dosxterm -geometry 80x25 -sl 25"

  Si utiliza el método xrdb, todo lo que tiene que hacer es ejecutar
  "xterm -name dosxterm"

  7.3.  ¿Funciona correctamente la emulación 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 líneas, sin embargo resulta
  difícil utilizar el modo de 50 líneas en una resolución de 1024x768 (a
  menos que utilice fuentes más pequeñas y una pantalla mayor. El modo
  de 43 líneas se ajustará a la ventana del xterm para utilizar 43
  líneas.

  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!!!                 *
  ****************************************************************************

  Cómo, ¿todavía sigue leyendo?  Bueno, es posible ejecutar WINOS2 (la
  versión modificada de Windows 3.1 que OS/2 utiliza) bajo dosemu.

  Hay muchos problemas conocidos. Windows es propenso a colgarse y
  podría llevarse los datos consigo. Los programas extensos no
  funcionarán. El ratón iría más lentamente, etc., etc., etc. En otras
  palabras, todavía no está preparado para el uso diario. Se sabe de
  muchas tarjetas de vídeo que dan problemas (vería una bonita pantalla
  blanca).

  Los grupos de programas tenderán a desaparecer. Básicamente, es una
  pena.

  Por otro lado, si se muere de ganas de ver la pequeña pantallita del
  Windows ejecutándose bajo Linux y ha leído 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 (asegúrese de que la opción 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.  Vídeo 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 versión
  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
  versión 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 gráficos de la VGA,
  en el archivo /etc/dosemu.conf. Si ha podido ejecutar programas
  gráficos 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 vídeo, y por ello a dejar a la tarjeta de vídeo en un
  estado en el cual es difícil luego de recuperar) entonces puede seguir
  adelante y tratar de ejecutarlo.

  Dése cuenta, sin embargo, de que tendrá que desactivar el sonido del
  juego. (Alguien tendrá que trabajar en la emulación de las tarjetas de
  sonido para que podamos evitar esto). También debe comprender que el
  juego irá un poco más lento, debido a la multitarea de Linux. De forma
  que el juego debería ejecutarse entre un 5 y 100 por ciento de su
  velocidad.  Normalmente, la velocidad está en un 50 por ciento en la
  versión actual del dosemu y se espera que se vaya mejorando dentro de
  poco.

  Quien sabe, a lo mejor igual funciona. ¡Por favor envíe 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 información 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

  También debería estar disponible en forma de paquete pre-compilado en
  su distribución 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 vídeo grabado.

  9.3.  Trident/Actix/otra?  ¿Cómo puedo hacer que funcione correcta­
  mente mi tarjeta de vídeo

  La pantalla fluctúa violentamente, muestra el mensaje de inicio de la
  BIOS de vídeo 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 máquina se colgaba cuando merodeaba
  la BIOS de vídeo 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 sólo
  lectura para dosemu, que puede encontrar todavía en la última versión.
  Ahora utilizo:

          ports { readonly 0x42 }

  de esta forma se ejecutará dosemu más lentamente, pero con mayor
  seguridad.

  Tim Shnaider (tims@kcbbs.gen.nz) también comentaba (1/18/94) que:

  Una forma de arreglar esto es utilizar el programa GETROM para volcar
  su BIOS de VÍDEO a un archivo y editar luego el archivo de
  configuración en el directorio /etc/dosemu. Aquí está mi línea sobre
  el vídeo:

          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 versión 0.52 de dosemu necesita añadir la siguiente línea a su
  archivo dosemu.conf
        ports  { 0x1ce 0x1cf 0x238 0x23b 0x23c 0x23f 0x9ae8 0x9ae9 0x9aee 0x9aef }

  La misma placa mostrará un error pero podrán trabajar bien los
  programas que utilicen gráficos.

  9.4.  ¿Por qué no funciona el software de mi tarjeta de sonido con
  dosemu?

  Hannu Savolainen (hsavolai@cs.Helsinki.FI) escribía (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
  aplicación. Ú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.  ¿Cómo 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 más lejos he conseguido que
  funcionen mi sistema de correo de voz y mi scanner (a medias). Aquí
  está cómo lo he hecho:

  1. Mire en su manual si la placa utiliza algún puerto.  Si el manual
     le indica algunos, póngalos en el archivo de configuración, en la
     línea "ports". Recuerde que algunas veces necesitará tener
     bastantes puertos en una fila, y el primero debe ser el único
     documentado.

  2. Inténtelo. Si no funciona, o bien no tiene un manual (o contiene
     tan poca información 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 números de puertos que
  debería haber. Pruebe a añadir éstos a las líneas de puertos e intente
  cargar dosemu de nuevo.

  3. Si todavía produce errores entonces será que necesita
     interrupciones. Busque la interrupción que utilice la tarjeta y
     hágase con el archivo SIG.tgz (Silly Interrupt Generator) de algún
     lugar de ftp://tsx-11.mit.edu.  Instálelo 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 caído y ahora no puedo escribir nada.

  Daniel Barlow(jo95004@sable.ox.ac.uk) comentaba (4/8/95) lo siguiente:

  Si no tiene acceso a través de un terminal o de una red por el que
  pueda entrar, no le queda más remedio que pulsar el botón de reset. Si
  todavía 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 automáticamente "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 "?  ¿Cómo 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 Hernández (aldy@sauron.cc.andrews.edu)  comentaba (7/8/94) lo
  siguiente:

  Debe deshabilitar la caché de vídeo 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 vídeo en mi BIOS AMI. Ahora dosemu se
  ejecuta bien en mi sistema.

  11.6.  ¿Cómo puedo hacer que dosemu se ejecute más rápido?

  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 través de métodos heurísticos. Este
  método 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 carácterística 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 añadido
  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 conversión.
  Introduzca la opción "-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 )?  ¿Cómo puedo ver los datos de salida de la depu­
  ración

  Daniel Barlow(jo95004@sable.ox.ac.uk) comentaba (4/8/95) lo siguiente:

  En el caso de la versión 0.60 de dosemu, los datos de salida del
  debugger se redireccionan a un archivo especificado en la línea de
  comandos.

  Utilice "dos -D+a -o /tmp/debug" para volcar los datos de salida del
  debugger al archivo /tmp/debug. No debería 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 después de haber toqueteado algunos
  valores del stty, se me duplicaban los caracteres al escribir. ¡Ahora
  ya he descubierto cuál es la razón!

  Sólo 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 liberación de una tecla parecen realmente
  eventos de pulsación.

  Por tanto, es preciso desactivar el procesamiento de entrada cuando se
  usen códigos de pulsación en modo consola (No debe ser muy buena idea
  hacerlo en líneas tty).

  12.  Contribuyendo al proyecto dosemu

  12.1.  ¿Quién 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 quién 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 acompaña a los
  paquetes del FEddi+bt, y el que tienes ante tí está basado en la
  versión 0.5.
  ______________________________________________________________________

  Índice General:

  1.      Créditos

  2.      Introducción

  3.      Instalación del FEddi

  3.1.    Instalación del usuario fido .

  3.2.    Paquetes necesarios

  3.3.    Configuración/instalación del mailer .

  3.4.    Comprobación y manejo.

  4.      Instalación del Binkley.

  4.1.    Configuracion/instalacion del caller

  4.2.    Problemas

  4.3.    ``Templates''.

  5.      Mensajes-colaboraciones-trucos

  5.1.    futility

  5.2.    Petición de ficheros ( FREQ ).

  5.3.    Direcciones usuales.

  5.4.    Scripts y útiles.

  5.5.    Automatización: El área personal.

  5.6.    Unos cuantos `trucos' para los que no gustan de RTFM o no
  saben inglés.

  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 conclusión.

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Créditos

  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 adaptación 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.  Introducción

  Hola futuro contertulio con feddi y bt :-)

  Si te has decidido a instalar este paquete, toda mi enhorabuena. No es
  muy complicado, sólo puede que tengas problemas de permisos. Los
  fuentes incluídos en este paquete ya han sido parcheados para que
  funcionen un poco mas fino.

  Tanto fmbedit como bt tienen pequeños problemas, no seas muy criticón
  y piensa que no has pagado nada por ellos. Contribuye, si corriges
  errores, no te los quedes para ti, compártelos, envíame parches o
  comentarios, de esta forma haremos que este soft vaya a más. Un
  consejo: no lo uses desde X, la base de datos de terminales no está
  muy fina, me he propuesto corregirla, seguro que un día lo pondré como
  parche :-) (Antes decía que sería el próximo :-DDDDDDDDDDD)

  Tengo que agradecer :

  ·  Alfonso Belloso : 2:344/17.2 (si me acuerdo bien)

  ·  Jose Luis Sanchez : 2:346/207.17 (Este seguro)

  ·  Pablo Gómez : 2:341/43.12 (Correcciones en este fichero y los
     scripts para la automatización del área personal)

  ·  Javier Ruberte : 2:346/401.50

  ·  Jose Carlos Gutierrez : 2:341/45.17 (Scrits de compilación de
     nodelist)

  ·  Carlos Terrón : 2:345/402.23 (Parche para que ftoss reconozca
     mayúsculas/minúsculas)

  Al final de este fichero encontrarás unos cuantos mensajes, todos
  enviados con feddi, con algunos trucos.

  3.  Instalación del FEddi

  3.1.  Instalación 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 línea :

       fido::2004:300::/home/fido:/bin/bash

  ·  fichero /etc/group

     Incluye la siguiente línea :

       fido::300:uucp,fido,root

  3.2.  Paquetes necesarios

  Necesitas :

  ·  perl, haz

       ls /usr/bin/perl

  Si no existe, instálalo, discos D

  ·  ncurses, haz

       ls /usr/lib/libncurses.a

  Si no existe, instálalas, discos D

  3.3.  Configuración/instalación del mailer .

  Vete al directorio /FEddi-0.9pl5

  1. Edita el fichero Makefile, en la variable SRCDIR pon el path donde
     estén tus fuentes, ej:

       SRCDIR=/root/trabajo/mailer/FEddi-dev

  2. En la línea NODEPRG = añade 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 instalación 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 :

  Créate esos directorios y haz lo siguiente:

       chown -R fido.fido fnet

  9. Fichero de configuración ~/.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 : Según 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 más.

  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.  Comprobación 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 tratarás siempre tu correo en entrada, ftoss crea
  automáticamente los folder correspondientes a tus áreas.

       fmbedit

  Si todo va bien tendrás 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 tratarás siempre tu correo en salida.

  4.  Instalación 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

  deberás 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, sólo tienes que adaptarlo a tus
  necesidades y quitar los (numerito).

  ·  (1), línea que vas a utilizar 1 COM1, 2 COM2, etc... (*)

  ·  (2), velocidad del puerto, 19200 si es una 16450

  ·  (3), cadena de inicialización 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 abrirás /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 sólo lo harás esta vez, la próxima vez que entres como fido ya
  tendrás la variable BINKLEY inicializada)

  4. Ejecuta

       bt

  4.2.  Problemas

  Si tienes problemas, seguro que son de permisos o path mal definidos,
  revísalos.

  1. El error más común es :

       cannot re-open logfile

  El propietario normalmente es : usuario.uucp.

  Los permisos : 664

  2. Otro error bastante común :

     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

  Solución:

       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 sólo tienes que ejecutar los comandos, ya vistos, para
  tratar el correo.

  Si durante la transmisión del PRIMER fichero tienes la impresión 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, podrás 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.  Petición 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.  Automatización: 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 recién 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
  inglés.

  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 verás 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 conversación, en función
     de su Re:, deberás pulsar la tecla Tab, verás un listado similar al
     que aparece en el punto anterior. Si le sigues dando, irás
     cambiando las referencias a los mensajes enlazados.

     Sabrás que existen múltiples mensajes enlazados (esto es lo que
     hace el futility link) por un mismo Re: por unos códigos amarillos
     que aparecerán 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 envío 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;
     podrás ``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 ejecútalo 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 línea
     BoxType a 3:

       [...]
       BoxType 3
       [...]

  6.  Despedida y conclusión.

  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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Ftp Anónimo COMO
  Rodolfo García Peñas, kix@mad.servicom.es
  v1.0-Sayaka, 1 Septiembre 1998

  Este COMO describe cómo instalar, configurar y mantener un servidor
  ftp de una manera fácil y rápida.
  ______________________________________________________________________

  Índice General:

  1.      Editor.

  1.1.    Copyright y cosas de esas.

  1.2.    Dedicatorias ;-).

  1.3.    Colaboraciones.

  1.4.    Realización.

  2.      Requisitos.

  3.      Instalación.

  4.      Configuración.

  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.      Configuración avanzada.

  9.1.    El archivo ftpaccess .

  9.1.1.  Mensajes.

  9.1.2.  Información del servidor de ftp.

  10.     Accesos.

  10.1.   Modificación 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 García (anda!! si soy yo!!),
  pero simplemente para mantener una misma línea de trabajo me gustaría
  que si hay que hacer modificaciones de algo, se me indique y yo muy
  gustosamente lo haría. Esto permitirá que dentro de 2 años 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, pérdidas, ... 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 España, en especial a Ismael
  Olea, Paco Pepe Pukka :-) (ehh y a su preciosa Viki :-P), a Juan José
  Amor Iglesias y a Ramón Gutiérrez/, 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 compañeros 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.  Realización.

  Para editar este COMO, no he seguido nada, lo he escrito desde el
  principio con lo que sabía, con mi poca experiencia y mirando manuales
  y demás. Una vez escrito, lo he complementado, ajustado,... con la FAQ
  sobre ftp anónimo 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.  Instalación.

  La instalación 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 fácil, buscamos donde tenemos el paquete, y
  ejecutamos lo siguiente:

       dpkg -i "nombre de paquete"

  En mi caso, sería:

       dpkg -i wu-ftpd-academ_2.4.2.16-9.deb

  Una vez realizado esto, se nos preguntarán 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 anónimo
  en este momento. Nosotros indicaremos que sí, puesto que queremos una
  configuración de este tipo, pero si no la deseamos decimos que no y no
  ocurre nada más.

  Al decir que sí, nos pregunta de nuevo:

       Enter the name of the FTP home directory: [/home/ftp]

  Debemos indicar dónde 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 raíz 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á cómo
  configurarlo para activar o desactivar esta cuestión.

  Con todo esto, tendríamos 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 distribución, no se
  preocupe, posteriormente se indicará cómo 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 anónimo, 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.  Configuración.

  La configuración de un ftp es cosa fácil, pero debemos estar atentos
  por la seguridad del sistema.

  4.1.  Cuenta de usuario.

  Lo primero será añadir el usuario ftp, que en Debian se ha creado;
  pero deberíamos repasar como está, en RedHat también aparece, pero en
  SlackWare no se crea. Para ello editaremos el archivo /etc/passwd y
  miraremos si tenemos una línea parecida a esta:

       ftp:*:100:101::/home/ftp:/bin/false

  Si no fuera así, la crearíamos.

  1. ftp:  sería el nombre de usuario. (Fíjese que siempre es ftp, sin
     distinción 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 función de ejecutar el demonio.

  3. 100:      UID de usuario, puede variar.

  4. 101: Grupo del usuario, que es variable también.

  5. /home/ftp:  Este es el directorio raíz del ftp para el usuario
     anonymous. Si en este campo apareciera "/" compartiríamos todo
     nuestro linux, muy inseguro. En el caso de usuarios del sistema, el
     directorio home sería el del usuario en cuestión.

  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, asegurándonos
     de que exista. Si no es así, la creamos:

       #!/bin/sh
       exit 1

  Los permisos recomendables para este fichero son rwxr-xr-x.

  Además, esta shell ha de aparecer listada en el fichero /etc/shells,
  por lo que la habremos de añadir 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 válido, el usuario aparecerá en su
  directorio $HOME, y podrá acceder a aquellas partes del sistema a las
  que tendría acceso por shell.

  Si no queremos que acceda al servidor por ftp, añadiremos 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 además deberá tener en cuenta que la restricción 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 raíz del ftp (/home/ftp) debe ser propiedad del usuario
  root y con acceso de escritura prohibido al resto de usuarios, pero sí
  de ejecución 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 serán 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 sólo ejecución 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 ejecución 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 sólo lectura (modo 111).

  Tanto el archivo group como el archivo passwd de este directorio deben
  contener la información mínima posible. Un ejemplo claro sería:

  passwd:

       root:*:0:0:root::
       ftp:*:10::Anonymous FTP::

  group:

       root::0:
       staff:::

  El archivo pathmsg es un archivo de información para el usuario cuando
  introduce algún carácter 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 mío 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 coñas y demás, es ``algo'' más inteligible que en inglés.

  El archivo ld.so.cache contiene los nombres de las librerías
  necesarias, recomiendo no tocarlo si no es necesario.

  6.4.  /home/ftp/lib

  El directorio /home/ftp/lib donde las librerías son contenidas, debe
  tener propiedades de solo ejecución (d--x--x--x). En el interior
  encontraremos librerías y links a las mismas. Debemos tener en cuenta
  que deben tener permisos de sólo 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 alojarán los archivos que
  queremos compartir.  Su propietario debería ser ftp, y los accesos
  serán de ejecución 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 deberían estar controlados, para ello usaremos
  un directorio concreto para las subidas. La recomendación 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 máquina. 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 ejecución (como es un
  directorio, realmente es permiso de acceso al directorio) y de
  escritura, pero no de lectura. Esto se hace para que sólo personas
  autorizadas vean el contenido de este directorio. Si quisiéramos que
  fuera un directorio para compartir ficheros, solo tendríamos que
  añadir la propiedad de lectura.

  Por otro lado, tendremos que editar un archivo de configuración para
  que todo esté perfecto. Este archivo se verá en la parte de
  configuración avanzada.

  7.  El arranque.

  En este momento el demonio de ftp estaría 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
  línea 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 demás. Un ejemplo
  sería:

       -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.  Configuración avanzada.

  Hasta este punto tendríamos un ftp seguro y totalmente funcional, pero
  el ftp nos permite muchas mas cosas, me referiré al del wu-ftpd en
  especial, los demás 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 configuración 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 información. Podemos
  encontrarlos de tres tipos, pero todos se configuran en este archivo.

  El primero es el que recibimos nada más conectar con el servidor de
  ftp, que suele ser de tipo informativo. Es indicado por una línea 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 más autorizarnos con el
  servidor, y va indicado por esta línea:

       message /welcome.msg            login

  Teniendo en cuenta que la / indica el directorio raíz 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 línea 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 añadir un tipo de mensaje para otras
  acciones deseadas.

  9.1.2.  Información del servidor de ftp.

  Es importante que los que accedan a nuestro servidor puedan indicarnos
  cualquier error. Para ello, debemos dejar una dirección de correo
  electrónico bajo una línea 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 número máximo de intentos de conexión (logins) fallidos
  permitidos por el servidor como seguridad, aunque en el caso del ftp
  anónimo no sería fundamental. Para ello escribiremos la línea
  siguiente en el archivo ftpaccess:

       loginfails X

  Donde X es el número de intentos.

  Por otro lado podemos restringir el dominio de acceso, que puede ser
  local a la máquina, remoto a la máquina o los dos. Se indica bajo unas
  líneas 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 anónimos 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 máquina servidora, los invitados y el
     anónimo.

  3. La tercera permite un acceso total para los mismos usuarios y para
     toda la red.

  Podemos restringir también el número máximo de usuarios que pueden
  acceder simultáneamente. Esto es necesario para no sobrecargar la
  máquina, la línea telefónica, la red,...  Tenemos una restricción para
  cada tipo de acceso, un ejemplo sería:

       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 líneas local y remota
  estaban comentadas. Si por algún motivo intenta entrar un usuario más
  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.  Modificación de archivos.

  Un tema importante es permitir o no la modificación de las propiedades
  de los archivos. Por ello el archivo ftpaccess dispone de unas líneas
  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 están
  desactivadas.

  10.2.  Archivos no bajables.

  Existirán 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 tendríamos la
  siguiente línea en el archivo ftpaccess:

       # estos ficheros no son bajables
       noretrieve /etc/passwd /etc/group
       noretrieve core

  La primera línea 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 información 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 líneas muy especiales:

       upload  /home/ftp   *               no
       upload  /home/ftp   /pub/incoming   yes     ftp     daemon  0666 nodirs

  La primera línea indica que las subidas a /home/ftp, en cualquiera de
  sus directorios, no están permitidas.

  La segunda indica específicamente que las subidas a
  /home/ftp/pub/incoming están 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, tendríamos grandes
  problemas.

  Con todo esto, todo el ftp estará perfectamente configurado, pero aun
  así, existen más opciones, como indicar alias escribiendo :

               alias   incoming:       /pub/incoming

  El usuario al poner cd incoming pasara automáticamente a
  /pub/incoming, pero básicamente este archivo ya estaría perfecto.
  10.4.  El archivo ftpconversions .

  Este archivo es muy útil para bajar archivos que no están comprimidos
  o empaquetados. En casos como el wu-ftpd es muy conveniente poner
  comandos como gzip, gnutar, compress,... compilados y enlazados de
  forma estática, 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 están 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, después 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 línea 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 línea puede estar partida !!!  Espero que se entienda, si
  hay dudas, por favor indíquemelas.

  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 límite 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.  Asegúrese 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 anónimo no es más 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 anónimo 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 más seguridad debería compilar todo usted mismo, de forma
  estática.

  12.  Archie.

  El servicio Archie es un simple buscador de archivos sobre máquinas
  con ftp. Podemos buscar un archivo que necesitamos usando este
  servicio sobre cientos de máquinas de todo el mundo de una forma
  rápida y efectiva al 100%. Por otro lado podemos incluir nuestro
  servidor en un buscador Archie (sólo 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 cómo 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
  apaño que arrastra el lastre de la página de códigos de IBM.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Preparando las VT

  3.      Adaptando terminfo

  3.1.    Probando si funciona

  3.2.    Nota sobre slang

  3.3.    Nota sobre reset

  4.      Más gaitas

  4.1.    Variables de entorno

  4.1.1.  less

  4.1.2.  LANG, LC_CTYPE , etc...

  4.2.    isprint

  4.3.    Configuración 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 gráficos no aparecen correctamente

  5.4.    ¿Cómo se quita esto?

  6.      Sobre este documento

  6.1.    Agradecimientos

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Las distribuciones de Linux que conozco traen por defecto la misma
  fuente que el DOS (página de códigos 437). Para hacer que el sistema
  funcione como si la fuente fuera ISO, se emplea un extraño ``remapeo''
  para hacer que al representarse determinado carácter, no salga por
  pantalla el que en la fuente ocupa dicha posición.

  Para saber si este es el caso de tu sistema, mira el siguiente
  carácter:

  Á

  Si estás viendo una A mayúscula con acento agudo, este documento no te
  hace falta. Si ves un cuadrado, te puede interesar. Por supuesto lo
  anterior se aplica si estás mirando este documento en su versión texto
  desde la consola, o bien la versión html desde el lynx. Si lo estás
  viendo desde X o leyendo una versión impresa, deberías ver la A en
  cualquier caso.

  También puedes probar man iso_8859_1 desde la consola (según tu
  distribución y de si instalaste el manual o no, es posible que no
  tengas esta página) y comprobar si los caracteres mostrados se
  corresponden con su descripción y si ves correctamente todos ellos. Es
  muy posible que gran parte aparezcan como cuadrados en vez de
  corresponderse con la descripción 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 pérdida de símbolos
  gráficos, y que si se hace bien, seguiremos viendo los cuadraditos en
  nuestras aplicaciones favoritas (mc, slrn, etc.).La única pega es que
  las líneas horizontales no salen unidas, cosa que creo que se debe a
  que la VGA sólo 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 carácter 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 más cómodo es
  añadir 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 línea que contiene setleds no es necesaria para el propósito de
  este documento, pero sería 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 automáticamente 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 sección ``introducción''.  Ahora
  deberías ver correctamente el carácter.  Recuerda que el echo sólo
  tiene efecto sobre la terminal en la que se teclea, por lo que tendrás
  que teclearlo en la misma en la que estás leyendo esto.

  3.  Adaptando terminfo

  La definición para la terminal de Linux que trae ncurses está pensada
  para usar los códigos de la cp437. Esto provocará que al cambiar de
  fuente veamos letras en vez de los símbolos gráficos. Afortunadamente
  esto no es difícil de solucionar cambiando la definición de terminal
  en /usr/lib/terminfo/l/linux.

  NOTA: si tu distribución de Linux es antigua, es posible que la
  definición de terminal esté en /usr/lib/terminfo/c/console. Teclea

       $ echo $TERM

  para saber cuál 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 distribución de Linux es antigua, es posible que el
  equivalente a infocmp se llame untic.

  NOTA2: asegúrate de estar en la consola normal (modo texto). Si estás
  en un xterm, será ésta la información que se vuelque al fichero.

  Guarda el fichero linux.original.tic por si es necesario volver a
  restaurar la definición original, y edita los cambios sobre linux.tic.
  Éstos son los siguientes:

  ·  Busca las siguientes entradas y bórralas:

  ·  smacs

  ·  rmacs

  ·  acsc

     IMPORTANTE: Las entradas están delimitadas por comas y puede haber
     varias en una misma línea. Ten cuidado en borrar sólo las entradas
     que se mencionan arriba.

  ·  Añade las siguientes líneas:

               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 debería estar listo el sistema.

  3.1.  Probando si funciona

  Seguramente tendrás el Midnight Commander. Ejecútalo 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 opción Full 8 bits. Asegúrate de pasar por el Ok o
  darle con el ratón. ¿Mejor ahora? Vuelve a entrar en el menú y graba
  los cambios con Save setup.

  En caso de que estés leyendo esto con lynx, debes saber que en las
  fuentes de este navegador viene una página que te será muy útil para
  ver los cambios que has realizado. Dicha página se llama
  iso8859-1.html, y si estás 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 cuáles
  son los caracteres gráficos leyendo terminfo, sino que usan unos
  predeterminados (si la terminal es linux). Si tu versión de esta
  librería es anterior, puedes actualizarte cogiendo la última versión
  de ftp://space.mit.edu/pub/davis/slang.

  Algunos programas que usan slang son slrn, jed y lynx (si se compila
  con esta opción).

  3.3.  Nota sobre reset

  Algo que no sé cómo evitar es que al ejecutar reset los carateres
  vuelvan a ser ``remapeados'' como si la fuente fuese la cp437. El
  único apaño que se me ocurre es incluir esta línea en /etc/profile o
  en el .profile del usuario:

       alias reset='reset ; echo -ne "\033(K"'

  4.  Más gaitas

  Mientras esperamos el día en que las distribuciones de Linux traigan
  las diferentes definiciones de locale para su internacionalización,
  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 gráficos
  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 gráficos 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 alfabético, etc. Desgraciadamente que yo sepa aún no
  están implementadas en las distribuciones habituales de Linux. De
  todas formas puedes añadir esto:

       export LANG=es_ES

  4.2.  isprint

  Esta es la función del sistema que decide si un carácter es imprimible
  o no.  Si la distribución soportase locale, debería funcionar bien,
  pero tal como está ahora la cuestión, sólo 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 continuación 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 compílalo
  con

       $ gcc -s -o prueba prueba.c

  y pruébalo así:

       $ export LC_CTYPE=ISO-8859-1
       $ ./prueba

  Seguramente saldrán todos los caracteres como no imprimibles. Por si
  acaso asegúrate antes probando con otros valores de LC_CTYPE, tales
  como es_ES, fr_FR, pt_PT, etc. Para saber más posibles valores de
  LC_CTYPE, consulta el fichero locale.alias, que tendrás (si instalaste
  X) por /var/X11R6/lib/locale o algún otro directorio similar.

  Si, y sólo 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 línea 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.  Configuración de algunos programas

  4.3.1.  dosemu

  Si arrancamos dosemu en modo texto, los caracteres que ocupen una
  posición mayor que el 127 ya no se verán bien. Para remediarlo se
  puede habilitar el acceso a la VGA, con lo que dosemu usará el juego
  de caracteres de nuestra tarjeta gráfica, que es del tipo IBM, por lo
  menos si usamos Linux en un ix86. Esto se consigue poniendo lo
  siguiente en el fichero de configuración (generalmente
  /etc/dosemu.conf):

       video { vga  console  graphics }

  También es conveniente que tengamos las siguiente opción:

       keyboard {  layout es-latin1  keybint on  rawkeyboard on  }

  Con esto y el programa keybes.com de Pedro Maicas, no debería haber
  ningún problema para ver y teclear los caracteres mayores de 127.

  4.3.2.  pine

  Se puede cambiar la configuración desde el propio programa, o bien
  editar el siguiente cambio en el fichero ~/.pinerc:

       character-set=ISO-8859-1

  Desde la versión 3.92, Pine ya permite poner artículos con 8 bits en
  los grupos de noticias (en el correo dependerá de la versión de
  sendmail y de cómo esté configurado). Para habilitar esta opción,
  añadir enable-8bit-nntp-posting a la lista feature-list del fichero
  mencionado.

  Existe también un fichero que efectúa cambios globales (para todos los
  usuarios del sistema). El fichero se llama pine.conf, y su ubicación
  depende de la distribución que usemos.

  4.3.3.  ELM

  Añadir lo siguiente a ~/.elm/elmrc:

       charset=ISO-8859-1
       displaycharset=ISO-8859-1
       textencoding = 8bit

  También se pueden hacer estos cambios para todos los usuarios. Basta
  añadir lo mismo al fichero general de configuración, que en la
  Slackware está en /var/lib/elm/elm.rc.

  4.3.4.  TIN

  Añadir 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 edición de este fichero es innecesaria.

  5.  Problemas

  A ver qué has hecho mal ahora... };-)

  5.1.  La fuente no se carga al arrancar

  Asegúrate 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, añade a este
  último lo siguiente:

       if [ -r /etc/rc.d/rc.font ]; then
         . /etc/rc.d/rc.font
         fi

  rc.font debería tener permiso de ejecución (chmod +x rc.font).

  5.2.  El teclado funciona mal en VT(no.)

  Asegúrate 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 gráficos no aparecen correctamente

  El cambio propuesto para terminfo está pensado para la fuente
  lat1-xx.psf (donde xx representa la resolución: 8, 10...).  Otras
  fuentes, como iso01.f16, no tienen caracteres gráficos (compruébalo
  ejecutando showfont). Y otras pueden tenerlos en diferentes posiciones
  (como las iso01a).Si estás en el segundo caso, puedes cambiar la
  entrada acsc de terminfo incluyendo los valores en octal para los
  diferentes símbolos gráficos. Consulta man terminfo para conocer la
  sintaxis.

  5.4.  ¿Cómo se quita esto?

  No puedo creer que me hagas esto. Pero en fin, si has seguido los
  pasos correctamente, no deberías tener problemas en dar marcha atrás.
  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 habrás conseguido una de estas dos cosas:

  1. Adaptar la fuente de tu sistema al estándar ISO (más o menos) en
     vez de usar un sistema propietario, recuperando unos cuantos
     símbolos muy convenientes o...

  2. Descuajeringar totalmente tu configuración.

  Si estás en el primer caso y tienes alguna idea más a este respecto
  que te gustaría compartir, no dudes en escribirme a ulusa@frodo.com
  (Fidonet: 2:343/143.30)

  Si estás en el segundo, no te molestes en escribirme. Mi ego no lo
  soportaría.

  En caso de que estés leyendo este documento localmente y quieras ver
  la última versión, es posible que esté en

  http://www.arrakis.es/~ulusa/linux/fuente_ISO-COMO.  extensión

  donde extensión puede ser:

  ·  html: versión html.

  ·  sgml.gz: fuente sgml comprimida.

  ·  dvi.gz: fichero dvi comprimido.

  ·  ps.gz: fichero PostScript comprimido.

  También 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 algún
  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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Grabadoras de CD - Como
  Leandro Terrés, lord_lt@retemail.es
  v1.6.1, 21 de Noviembre de 1999

  Introducción al uso de Grabadoras de CD-R, CD-RW y DVD bajo Linux, así
  como descripción del uso de los programas necesarios. Este documento
  se diferencia del Creación-CDRoms-Como por su enfoque, más centrado en
  el uso de distintos tipos de grabadoras, y las últimas novedades soft­
  ware. Es conveniente que también lea el Creacion-CDRoms-Como, enfocado
  más en la plataforma SCSI, que profundiza más en los aspectos técnicos
  de la tecnología CD-R y en sus posibilidades.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Aportaciones

  2.      Grabadoras soportadas

  3.      Configuración del Kernel

  3.1.    Configurar el Kernel para grabadoras SCSI

  3.1.1.  Activación y desactivación 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 genéricos

  4.2.    Dispositivos de bloque

  4.3.    Notación estándar

  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 creación de las imágenes

  6.1.1.  mkisofs

  6.1.2.  mkhfs

  6.1.3.  mkhybrid

  6.1.4.  mke2fs

  6.2.    Software de extracción de audio

  6.2.1.  readcdda

  6.2.2.  cdda2wav

  6.3.    Software de grabación

  6.3.1.  cdrecord

  6.3.1.1.        Parámetros 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 subcódigos.

  7.1.    cdrecord 1.8

  7.2.    CD Builder

  7.3.    cdrdao

  7.3.1.  Copia al vuelo de CD-ROMs.

  7.3.2.  Extracción y grabación de imágenes DAO con cdrdao.

  7.3.3.  Scripts que acompañan 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 después 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 (sólo de datos) directamente sin
  ningún 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 genérica sobre CD-R o CD-RW?

  8.8.    He grabado un CD de Audio, pero al escucharlo sólo se oye un
  zumbido horripilante...

  8.9.    Problemas con más de un dispositivo en controladoras SCSI NCR

  8.10.   ¿Como se crea un CD Mixto?

  8.11.   ¿Como se graba un CD multisesión?

  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.      Créditos

  10.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Este documento pretende guiar al usuario, de forma que sepan qué
  tienen que hacer y cómo solucionar los posibles problemas que puedan
  plantearse a lo largo del camino de la grabación de CDRoms.

  Se da una pequeña explicación sobre los sistemas de ficheros para los
  CDs (todo a su tiempo) y de cómo se usan los programas más 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 detrás de otro, para ampliar
  conocimientos, que resultará beneficioso a la hora de buscar posibles
  irregularidades, fallos o errores en la elaboración de este documento
  o en lo que se refiere a conceptos en Linux en sí.

  Y ya por último indicar que hasta la versión 1 de este documento
  explicaremos cómo se graban CDs normales, pero para la siguiente
  versión, 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 algún sitio) o
  adición de detalles; siendo además amablemente incluido como
  colaborador. (Ver sección ``Créditos'')

  Para hacerlo sólo tiene que o bien utilizar el sistema en línea de
  Insflug, http://www.insflug.org/comos/comos.php3 de adición 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 añadiduras al mismo, para que toda la comunidad
  Linux se beneficie de él. Las felicitaciones y enhorabuenas también
  son bien recibidas ;-).

  2.  Grabadoras soportadas

  Podemos dividir el soporte a una grabadora bajo LiNUX en tres
  aspectos:

  1. Que Linux tenga soporte genérico para el bus del que cuelga la
     grabadora.

  2. Que el software específico de grabación soporte la utilización de
     dicho bus para grabar.

  3. Que además de lo anterior, el software específico de grabación
     soporte la grabadora en concreto.

  Respecto al punto 1, Linux soporta genéricamente 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 excepción de las grabadoras SCSI, con
  las que además es preciso que la controladora SCSI esté soportada por
  Linux, hoy en día 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 cuestión dependerá enteramente de que cdrecord la
  soporte o no; a grosso modo, podemos afirmar que casi todas las
  grabadoras están 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 documentación de
  cdrecord:  vea la sección ``cdrecord''.

  Aun en el caso de que su grabadora no estuviera soportada, le quedaría
  la opción de crear las imágenes bajo Linux, y grabarlas bajo cualquier
  otro sistema operativo.

  3.  Configuración 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 más 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 cómo 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 librerías no podrá compilar los programas
  respectivos.

  Podrá recurrir en última instancia al viejo programa de configuración,
  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 (módulo) el los lugares en donde
  corresponda en el prompt, ya que éste no permite volver hacia atrás;
  si quiere hacerlo tiene dos opciones, una pulsar Control+C y cancelar
  la configuración 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 cómo configurar el núcleo 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 más 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 configuración 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 informática 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 más 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 más.
  Puede saber qué controladora tiene mirando simplemente los manuales,
  mirando el chip principal de la tarjeta o el nombre del controlador de
  windows (sólo en última instancia).

  Si el controlador no corresponde exactamente al modelo que aparece en
  el kernel, seguramente funcionará con alguno de los que lleva
  genéricos para varios tipos de controladoras con las mismas
  características. Puede compilar como módulo las que más se parezcan al
  suyo y luego ir probando los módulos hasta que dé con el que
  corresponda. Si al cargar algún módulo 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 configuración del kernel y entramos en
  SCSI Support, lo que luego nos dejará señalar las demás opciones que
  son para dar soporte genérico, y a unidades de CD-ROM, Discos Duros y
  cintas, de las cuales nos interesa el soporte genérico, 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 también 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 módulo, es decir, poniendo m en
  lugar de y, ya que le permitirá cargar/descargar a voluntad todos los
  módulos 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 módulo, la controladora inicializará
  y escaneará los dispositivos de nuevo sin necesidad de reiniciar el
  ordenador para detectarlos; si la tiene interna, añada el soporte
  directamente en el kernel y se ahorra trabajo en cargar los módulos.

  Tenga en cuenta no obstante, que si carga, descarga, y vuelve a cargar
  el módulo sin reiniciar el equipo, la controladora recibirá un número
  de host distinto, y los parámetros que tengamos para cdrecord
  configurados no serán válidos.

  Si no puede descargar el soporte SCSI por tener otros dispositivos
  dependiendo de él (porque su disco duro raíz sea SCSI, por ejemplo, o
  por no poder tenerlo como módulo por las razones que sean) también
  puede activar y desactivar dispositivos a voluntad, incluidas
  grabadoras, cintas, escáneres, etc. sin necesidad de descargar el
  módulo. vea la sección ``Activación y desactivación 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 módulo solo le dejará seleccionar como módulo 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 módulos.
  Una vez recompilados los nuevos módulos, previa configuración, sólo
  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 están ya, a través de un script que se puede
  encontrar junto a los programas de grabación, así como con el script
  /dev/MAKEDEV, o bien el que trae el X-CD-Roast (sección ``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 módulo, sólo tendrá que cargar los
  módulos SCSI en el siguiente orden:

  1. Módulo scsi_mod.o que es el driver principal del que cuelgan todos:

       insmod scsi_mod

  2. Seguido del módulo de soporte para SCSI genérico (proporciona el
     interfaz ASPI Advanced SCSI Programming Interface, para poder
     grabar CDs, o usar algunos programas con unidades de cinta,
     escáneres, 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 corresponderán 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 estén.

  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 genéricos /dev/sgX.

  Si instala X-CD-Roast podrá usar los dispositivos /dev/sr0 hasta
  /dev/sr15; también puede usarlos en lugar de los dispositivos
  /dev/scdX, que usan otros programas, como cdrecord. Estos son los
  nuevos dispositivos que se usarán 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 módulos sea automática. Si tiene dudas sobre esto, lea el Kernel-
  Como para mejor referencia. Si ya tiene una distribución con el kernel
  2.2.XX no se cargará el kerneld, el propio kernel hace las funciones
  del kerneld.

  Lea también la sección ``Configuración del kernel para grabadoras
  IDE'' porque explico algunas cosas más 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.  Activación y desactivación de dispositivos SCSI al vuelo

  La forma más limpia de hacer que el kernel active o desactive sin
  necesidad de resetear el sistema, o cargar/descargar módulos, dando
  igual si está compilado el soporte como módulo o no, es mediante el
  siguiente método.

  El activar o desactivar dispositivos SCSI a voluntad sin necesidad de
  demasiados aspavientos puede ser más práctico 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 método soporte
  conexión/desconexión 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 sólo tiene uno; no confundir canal con
  conector) el 4 especifica el ID SCSI, y el último 0 el LUN. (Ver
  sección ``Notación estándard'')

  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 específico
  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 razón, no es tan sencillo configurar del Kernel para las
  grabadoras IDE. Lo primero es aplicar una pequeña modificación al
  Kernel, sólo necesario si tiene una grabadora Regrabable HP como las
  7100 o 7110 o superiores.

  La modificación, 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 línea:

       #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 cómo hacer funcionar estas grabadoras con la versión antigua de
  cdrecord, es decir, la 1.5, aplicándole un serie de parches al
  programa y al kernel.

  Una vez realizada la modificación 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 emulación SCSI que sólo
  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 específicos de los SCSI; de esta forma, con la
  emulación lo que hacemos es que se puedan enviar este tipo de comandos
  a través 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
  auténtica.

  De la misma forma, windows lo que hace es emular SCSI con las IDE, lo
  que le trae una pequeña 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, más que las
  SCSI, pero en linux con la emulación la carga parece menor, o al menos
  no se nota de forma excesiva; lo único recomendable es dejar un puerto
  IDE para ella sola, según recomiendan los fabricantes; lo mas común
  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 música mientras se graba el
  CD, si tiene botón de reproducción, 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 sección 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 módulo, hay un
  fallo en la configuración para la emulación SCSI a la hora de incluir
  el soporte genérico 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 dándole vueltas a lo mismo).

  Gracias a este procedimiento ahora nuestra grabadora y/o lectora/as
  aparecerán 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 pequeña interferencia con el DMA,
  aunque no suele ser muy común. Es decir, deje el disco duro sólo para
  la grabación.

  Otra cosa a tener en cuenta es que si no tiene un disco con extracción
  por DMA como un Fast ATA o Ultra DMA desactive del kernel el soporte
  para el chip Intel Tritón (I/II), ya que si hará interferencia el DMA
  con la emulación y dejará el controlador colgado, obligándole a
  resetear el ordenador con ese botón que se tiene algo olvidado la
  gente de linux.  (Mirar en el apartado ``Preguntas de Uso Frecuente'')
  para más 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 cómo Linux es capaz de usarlas, ¿Cómo? Gracias cdrecord y a
  los desarrolladores del kernel que han introducido como novedad de los
  núcleos 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
  configuración necesaria para que reconozca nuestra unidad externa, que
  se describe a continuación:

  Lo primero de todo es reiniciar el ordenador y entrar en la
  configuración 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
  configuración del kernel en Floppy, IDE, and other block devices y
  seleccionar como módulo el parámetro Parallel port IDE device support.
  Seguidamente seleccionar, al menos, también como módulos los
  siguientes:

  ·  Parallel port ATAPI CD-ROMs

  ·  Parallel port generic ATAPI devices

  ·  Shuttle EPAT/EPEZ protocol

  De esta forma ya tenemos los módulos para hacer funcionar la grabadora
  como unidad lectora; si lo prefiere puede incluirlo en el kernel, pero
  primero asegúrese de que funciona bien como módulo antes.

  Seguidamente procedemos a la recompilación e instalación de los
  módulos en su lugar, y sin necesidad de reiniciar (a no ser que se
  actualice partes no compiladas como módulos)  ejecute depmod -a para
  crear las dependencias de los módulos a fin de poder cargarlos con
  modprobe, kerneld o kmod.

  Comenzamos por cargar el modulo paride, el epat, y por último el
  módulo 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 módulo 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
  extracción de audio asiduamente, le recomiendo que lea la sección
  ``¿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 módulo 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 simultáneamente (genial ¿¿¿no??? ;-)).

  Como todavía no ha caído en mis manos una grabadora de este tipo no he
  podido hacer pruebas ni nada por el estilo, los detalles de la
  configuración 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 colaboración de la comunidad linuxera a fin de completar
  este apartado con lo que más 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 partición
  o en un disco, sino, en un fichero. ¿Cómo? ¿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 opción en el kernel como módulo
  entramos en la configuración del kernel mediante make menuconfig, y
  accedemos al menú Floppy, IDE, and other block devices; justo tras
  Additional Block Devices se encuentra la opción Loopback device
  support la cual recomiendo seleccionar como módulo, y si en el menú
  principal Filesystems tiene seleccionada la opción Kernel automounter
  support al montar el archivo, este módulo se cargará automáticamente;
  si la opción anterior está como módulo deberá cargarlo a mano, sino no
  se cargará automáticamente ningún modulo y nos dará error.  Para
  cargarla manualmente deberemos teclear: insmod loop.

  También 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, créelos 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 imágenes ISO9660 son de sólo 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 automáticamente lo
  debe detectar.

  Si tiene pensado hacer imágenes 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 inclúyalos como módulos, que el
  kernel se ocupará de cargarlos cuando sea necesario. El resto de
  Codepages y NLSs recomiendo que los ponga como módulos si decide
  activarlos, aunque los más utilizados son los mencionados
  anteriormente.

  4.  Nomenclatura de dispositivos SCSI

  Este es un tema para el que convendría que leyera el SCSI-Howto, pero
  como no hay disponible traducción, haré una breve introducción,
  necesaria para poder especificar parámetros necesarios al software que
  usaremos.

  Básicamente, para lo que necesitamos, hemos de saber de la existencia
  de los dispositivos de bloque, /dev/scdX o /dev/srX, y los
  dispositivos genéricos, /dev/sgX:

  4.1.  Dispositivos genéricos

  En lo que a nosotros atañe, 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 cómo 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 genérico, utilizará comandos ASPI.

  El dispositivo genérico 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 línea Host: scsi0 Channel: XX Id: XX Lun: XX
  de cada dispositivo; concretamente Id:.

  El sistema asigna dinámicamente 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 dinámicamente, 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 serían:

       00 ---> /dev/sga
       01 ---> /dev/sgb
       02 ---> /dev/sgc
       03 ---> /dev/sgd
       04 ---> /dev/sge

  Ahora, la grabadora sería /dev/sge en lugar de /dev/sgd como antes.

  Con lo que queremos decir que hay que tener mucho cuidado con la
  adición 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.  Notación estándar

  En entornos *nix existe cierta notación para identificar dispositivos
  SCSI:

       Numero_Bus_SCSI,ID_SCSI_dispositivo,LUN_dispositivo

  El LUN es un parámetro 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 sería el dispositivo SCSI del sistema
  0,4,0.

  5.  Sistemas de ficheros

  Este apartado está dedicado a explicar algunas cosas para
  familiarizarle con la grabación de CDs, de modo que le sea mas fácil y
  rápido elaborarlos.

  Una breve explicación sobre los sistemas de ficheros de los CD-ROMs,
  para que pueda elegir cuál es el más conveniente en cada momento o CD:
  como ya sabrá, se sigue un estándar para que todos los ordenadores
  puedan leer los CD-ROMs sin ningún problema, para eso se creó el
  ISO9660 que especifica el estándar.

  Pero dentro de ese estándar existen algunas variantes, o más
  concretamente extensiones, que permiten ampliar las posibilidades
  originales del ISO9660, como son los nombres largos o incluso sistemas
  de arranque y ciertas cosas más.

  5.1.  Joliet y Romeo

  Estos sistemas fueron diseñados por Microsoft para su plataforma
  Windows 95/NT. Permiten sistemas de archivos tipo VFAT pero con la
  limitación 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 sólo Joliet--- Necesita tener dicho soporte en el kernel: hasta
  el kernel 2.0.34 no lo había, aunque es posible tenerlo gracias a
  parches para el kernel que se encuentran en Internet. Estos mismos
  parches permiten ver también particiones con FAT32, el sistema de
  archivos que usa la OSR2 de Windows 95 que le posibilita tener
  particiones de hasta 4 TeraBytes, limitación inexistente en el sistema
  de ficheros de Linux, ext2, que desde su aparición soporta
  precisamente 4 TeraBytes ;)

  Para los que estén usando un kernel de la serie 2.2.x, decirles que
  tanto el soporte Joliet como de FAT32 vienen «de serie», y no tienen
  más que compilar o cargar módulos cuando se necesite si el kernel no
  los carga automáticamente.

  5.2.  Rock Ridge (High Sierra)

  Esta extensión se ideó para la plataforma UNIX, por lo que recoge una
  serie de características y ventajas de las que nos podemos beneficiar
  más 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 simbólicos y
  demás aspectos típicos 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 transcripción en forma
  de ficheros llamados TRANS.TBL, que aparecerán 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 foráneo, otras por sus controladores, la transcripción 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
  también hay un programa para crear imágenes con este sistema de
  ficheros para que podamos grabar CDs a nuestros amigos los del mac.

  Sobre las características de este sistema de ficheros no puedo decir
  nada, puesto que de momento no las sé. Si alguien conoce las
  características de este sistema por favor, envíemelas a mi dirección
  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 también se puede
  usar en los CD-ROM normales, de hecho el Adaptec DirectCD usa este
  sistema de ficheros. Las características 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 común 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
  versión 1.5 del sistema UDF .

  Para más información, consulte estas páginas web:  http://www.osta.org
  para obtener toda la información 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,
  también hay utilidades para crear CDs con el sistema UDF.

  Lo que todavía no he conseguido es copiar un sistema UDF a mi
  regrabable y poder grabar en él. Si alguien sabe cómo 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 típico de CDRoms,
  lo cual no significa que no pueda hacerse.

  Consulte la sección ``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 explicación de cómo hacer un CD arrancable con este sistema
  se describe en la sección 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 estén las últimas versiones de desarrollo,
  por ello procuro además dar en la sección de cada uno la dirección
  origen.

  Aquí hago una descripción de los programas que vamos a necesitar para
  elaborar nuestros propios CDs, con ellos haremos las imágenes y las
  grabaremos; podremos comprobar la diversidad que hay y las ventajas
  que nos proporcionan.

  Sólo voy a describir las últimas versiones de estos programas, que
  aunque en algunos casos están en fase alpha o de desarrollo (sólo
  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 creación de las imágenes

  La parte más 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 sólo eso, la imagen nos permite comprobar que
  el CD va a salir como nosotros queremos, pudiendo evitar errores y
  ciertas cosas más, difícilmente detectables en el momento de la
  grabación si la generamos al tiempo de grabar.

  Además, podemos montar las imágenes para comprobar cómo 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 imágenes, si continúa leyendo, luego explico cómo podrá hacer
  CDs sin necesidad de hacer imágenes.

  6.1.1.  mkisofs

  Puede obtener este programa de
  ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs.

  La última versión estable disponible es la 1.11 y la de desarrollo es
  la 1.12b5.

  Este es el principal programa que usaremos para crear nuestras
  imágenes, ya que está hecho especialmente para hacer imágenes ISO9660
  a las que añadir extensiones Rock Ridge, o imágenes Joliet (sólo
  versiones 1.12).

  Puede también 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 (sólo versión 1.12).

  Esta explicación está basada en la versión 1.12a5, de la cual sólo voy
  a indicar los parámetros que son más utilizados.

  La sintaxis de este programa y su uso se explica a continuación:

     -a o -all-file
        Este parámetro 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 mayoría de editores *nix.

     -A o -appid
        Este parámetro indica un comentario sobre la aplicación 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
        parámetro se identifica como APPI= especificando lo que quiera
        poner mientras tenga una extensión no superior a 128 caracteres.
        En versiones anteriores a la 1.12 se debe especificar en la
        línea de comandos con el comentario entre comillas.

     -b o -eltorito-boot
        Este parámetro sirve para indicarle el nombre y la ruta del
        archivo que contiene la imagen de arranque que será usada para
        hacer un CD arrancable según el estándar El Torito. De esta
        forma creamos un CD arrancable para aquellas BIOS que acepten
        arrancar desde CD-ROM. La imagen debe tener un tamaño 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 teóricamente, por culpa
        generalmente de la controladora, no del estándar.

     -c o -eltorito-catalog
        Con este parámetro, que está ligado al anterior para hacer CDs
        arrancable, se especifica dónde se creará en el CDROM el archivo
        del catálogo para el arranque del CD-ROM. Por defecto lo crea en
        el directorio raíz de la imagen

     -f o -follow-links
        Con este parámetro 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 estén 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 parámetros.

     -i Sirve para añadir archivos que no estén en el directorio o
        subdirectorio que hayamos indicado para hacer la imagen, para su
        adición a la imagen del CD. Esta opción está temporalmente
        deshabilitada, y parece ser que da problemas, por lo que está en
        espera de ser reescrita.

     -J Gracias a esta opción podremos crear CDs con sistema de ficheros
        Joliet. No incluida en versiones anteriores a la 1.12.

     -l Gracias a este parámetro 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 parámetro indicamos un patrón de archivos que no
        queramos incluir en el CD, que puedan encontrarse dentro de
        algún 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 opción indicamos el nombre que le queremos dar al
        fichero, incluida su ruta, que contendrá la imagen, o el fichero
        de dispositivo correspondiente a la partición donde queremos
        volcarla.

        El volcar las imágenes (sólo de datos) a partición es muy
        recomendable para equipos lentos; dicha partición no ha de tener
        formato alguno, por ello la lectura es más rápida, ocurre como
        con la partición de swap.

        Si utilizamos volcado a partición, 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 partición equivocada, o se irá a hacer gárgaras...

     -p o -preparer
        Este es complementario al parámetro -A, con él podremos indicar
        el autor del CD, Tiene una extensión máxima de 128 caracteres.
        Corresponde al parámetro PREP= en el archivo

     -print-size
        Muestra por pantalla el tamaño estimado que ocupará la imagen,
        sin hacer nada más.

     -P o -publisher
        Especifica el editor del CD. Su longitud máxima 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 opción principal para generarlo, manteniendo los permisos
        tal y como estén.

     -r Esta opción 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 opción generamos los archivos de transcripción,
        llamados TRANS.TBL en cada directorio del CD-ROM, que contendrán
        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 opción -l los archivos tendrán
        nombres de 32 caracteres y no de 8+3.

     -v Nos muestra la ayuda y la versión del programa. Y mientras se
        genera la imagen nos va mostrando el porcentaje de la imagen
        generada y una estimación de tiempo para terminar. Muy útil.

     -V Esta opción nos permite darle un nombre de volumen al CD para
        identificarlo. En el archivo .mkisofsrc se especifica con el
        parámetro VOLI= con una extensión máxima de 32 caracteres.

     -x Esta opción nos permite excluir un directorio específico que se
        encuentre dentro de la ruta de origen. Puede excluir hasta un
        máximo de 1000 directorios, ojo que hay que especificar el
        parámetro antes de cada directorio, tantas veces como
        directorios a excluir haya:

          mkisofs ... -x estedirectoriono -x yestetampoco -x nieste

  Estos son los parámetros más utilizados, si quiere más información o
  más posibilidades siempre puede consultar la página del manual. Ahora
  unos pocos ejemplos de cómo funcionan algunos parámetros:

  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
  identificación, el editor y la aplicación del CD, hay dos métodos, uno
  consiste en crear un archivo llamado .mkisofsrc en nuestro directorio
  personal.  Recuerdo que este archivo sólo sirve para la versión 1.12,
  con una sintaxis como ésta:

     VOLI=
        El nombre de volumen.

     PUBL=
        Cualquier cosa que quiera poner, normalmente un pequeña
        descripción del CD.

     PREP=
        Aquí puede poner sus datos o cualquier cosa para identificar el
        CD como suyo.

     APPI=
        Aquí puede poner una descripción del objetivo de este CD o su
        destino.

  O bien puede especificarlo en la línea de comandos así:

       mkisofs -a -R -l -T -V "Volumen" -P "descripción CD" -p  "preparador" \
        -A "Aplicación" -o imagen.iso /ficheros

  Este único comando se ha introducido en dos líneas, detrás del
  carácter \ 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 cómo 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 identificación que tiene cada archivo en el disco.

  Un ejemplo de cómo 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 descripción *.o y core con la opción -m, la
  opción -f indica que los enlaces que se encuentren serán 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 sólo se puede hacer en la versión 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
  según 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

  Nótese que a los parámetros -b y -c le especificamos lo que parece un
  path absoluto, pero el directorio /cdboot no se encuentra en el
  directorio raíz de su disco duro, sino que en realidad es un
  subdirectorio de /master;  esto es así porque mkisofs para este
  parámetro se sitúa 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 homólogo para el sistema de ficheros de los mac, HFS, no lo he
  llegado a probar todavía pero seguro que funciona bien. Su uso es muy
  sencillo y no tiene mucha complicación.

  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 versión usa código del
  mkisofs 1.12 para mejor soporte de Joliet. La ayuda parece exactamente
  la del mkisofs, salvo que incluye las siguientes opciones para añadir
  el sistema de ficheros de los mac:

     -g o -apple
        Añade la extensión ISO9660 de Apple, para la compatibilidad con
        el estándar.

     -h o -hfs
        Crea el sistema HFS híbrido para la extensión ISO9660.

     -probe
        Prueba todos los archivos para el sistema Unix/HFS.

     -mac-name
        Crea todos los nombres según 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

  ¿Cómo? ¡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
  podrán leerse en sistemas que no dispongan de algún tipo de soporte
  para leer este tipo de sistema de archivos, básicamente Linux.

  Su utilidad dependerá de la creatividad de cada uno ;)

  Para ello, hay que seguir el siguiente procedimiento:

  1. Primero hay que calcular el tamaño máximo que podemos usar en una
     imagen para aprovechar la mayor cantidad de datos en el CD es fácil
     y es una operación sencilla en la que intervienen dos programas y
     en la que no hay ni que sacar la calculadora.

     Primero utilizamos el cdrecord en su versión de desarrollo 1.8 de
     la siguiente forma:

  # cdrecord -v dev=3,0 -atip
  Cdrecord release 1.8a29 Copyright (C) 1995-1999 Jörg 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 información 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 tamaño máximo de la imagen que puede ser grabada en
  el CD. Si se fijan el tamaño concuerda con un CD 80 minutos que corre­
  sponde exactamente a 702 MegaBytes absolutos del tamaño de la imagen.

  2. Crear un fichero imagen vacío; 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á confirmación:

       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 réplica 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 sólo lectura:

       mount -t ext2 -o ro /dev/cdrom /mnt/cdrom

  si queremos incluirlo en /etc/fstab, habrá que indicar además de su
  tipo de sistema de ficheros, y de ser sólo 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 extracción de audio

  Aviso: La mayoría 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 estándar 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á más que un
  horripilante ruido, similar al sonido de una televisión 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 extracción 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 más veces posteriormente a lo
  largo del documento, quiero recalcar, y que necesitará especialmente
  con los extractores, es el del dispositivo genérico SCSI, que es
  explicado en la sección ``Dispositivos genéricos''.

  6.2.1.  readcdda

  Este programa es un poco difícil 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 sección ``X-CD-Roast''.

  No hay página man disponible, y tampoco certifico que los comandos que
  aquí explico correspondan a la versión que Vd. pueda conseguir; no
  obstante lo expongo aquí por su excepcional calidad y fiabilidad. Eso
  sí, sólo funciona con dispositivos SCSI.

  Su sintaxis es un poco pesada, pero como decía 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 genérico de la unidad con la que
        vamos a extraer.

     -B dispositivo
        Dispositivo de bloque de la unidad con la que vamos a extraer,
        son válidos 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 grabación

     -S Velocidad de extracción.

     -v imprimir información 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, sería:

       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 más reciente, y permite extraer de CDROMs IDE si
  éstos soportan extracción. Puede obtenerlo de
  ftp://ftp.gwdg.de/pub/linux/misc/cdda2wav/. También se puede encontrar
  incluido en el mismo paquete de las últimas versiones de cdrecord.

  Comentaré sólo las opciones más habituales:

     -D Dispositivo genérico 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 simbólico 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 Extracción a calidad CD: muestreo a 44100Hz, 16 bits estéreo.
        Esta es la opción 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 número
        Velocidad de extracción.

     -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 información alguna mientras se realiza el proceso de
        extracción.

  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 patrón 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 más 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 opción -O wav por defecto serán Little
  Endian.

  En la versión 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 sólo 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 sección ``DAO con cdrecord''.

  Existe una variante del cdda2wav, llamada cdparanoia, de rendimiento
  muchísimo menor, pero que como su nombre indica, es muy paranoica con
  la calidad de las pistas extraídas, puede resultar útil con CDs muy
  estropeados.

  6.3.  Software de grabación

  6.3.1.  cdrecord

  La página principal de cdrecord es

  Puede obtenerlo por FTP de ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/.

  Este programa es más 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 emulación SCSI activada, por supuesto) y SCSI,
  incluyendo más opciones como el soporte para regrabables y sus
  comandos específicos, como borrar un CD-RW, una partición, etc.

  Permite visualizar las tablas de contenido (TOC, Table Of Contents),
  que es donde se almacena la información sobre las pistas y el tamaño
  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 multisesión o al hacer un
  CD normal o de CD-Audio.

  También puede grabar pistas CDI, en modo normal de datos data 1 y data
  2, multisesión xa1 y xa2 de datos, y audio.

  Otra función muy útil es que puede realizar ciertas pruebas a la
  unidad para comprobar sus capacidades y compatibilidad, etc.

  Los comandos que más nos pueden interesar se detallan a continuación:

     -version
        Muestra la versión del programa. Recomendada la versión 1.6.1
        final, las que llevan a despues del número son alphas y no es
        recomendable usarlas. Para unidades tanto IDE como SCSI se
        recomienda la 1.8aXX.

     -v Muestra información mientras se ejecuta el programa para conocer
        el estado de la grabación (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 situación 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 sólo si se emplea
        por ejemplo un lector múltiple de CDs, en donde 0 identificaría
        a la primera bandeja, 1 a la segunda, etc).

        Un ejemplo frecuente sería 0,4,0 para el primer bus SCSI, el ID
        SCSI 4 y el LUN de todo dispositivo no múltiple, 0.  Si usamos
        la emulación SCSI o una unidad de puerto paralelo, siempre será
        0,0,0.

     -dummy
        Con este parámetro indicamos que vamos a hacer un test de la
        unidad y del sistema, simulando una grabación para comprobar si
        se realiza adecuadamente. Durante este test el láser de la
        grabadora está desactivado por lo que no correremos el riesgo de
        perder un CD.

     -multi
        Esta opción es para indicar que vamos a hacer un CD multisesión,
        es decir con varias pistas de datos. Este parámetro 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 parámetro -data
        para este fin.

     -msinfo
        Esta opción nos permite ver la información que hay grabada en un
        CD multisesión o con al menos una pista, mientras el CD no se
        haya cerrado.

     -toc
        Muestra información sobre la tabla de contenidos del CD, este
        parámetro puede ser usado tanto en las grabadoras como en los
        lectores.

     -fix
        Esta opción es para cerrar un CD que no se haya cerrado antes,
        si después de haber grabado los datos no se ha escrito la tabla
        de contenidos. De momento esto no funciona con las unidades
        TEAC.

     -nofix
        Esta opción, usada en la línea 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 además datos. Los CDs
        de datos sin cerrar no pueden ser usados por unidades lectoras.

     -load
        Esta opción es para cerrar la bandeja, luego sale del programa.

     -eject
        Esta opción permite expulsar el CD una vez grabado, hay unidades
        como las Philips o las Yamaha que deben hacer esto.

     speed=X
        Esta opción es para indicarle a la unidad la velocidad a la que
        debe grabar. El número especifica el multiplicador de 150Kb/s
        para datos y 172Kb/s para audio.

     blank=opcion
        Esta opción borra un CD-RW y sale, o bien borra antes de
        continuar con una grabación. Sólo puede ser usada por unidades
        regrabables y con discos CD-RW. Las opciones se describen a
        continuación:

     ·  help Muestra la ayuda.

     ·  all Borra totalmente un disco. Esta opción tarda bastante
        tiempo.

     ·  disc o disk Borra un disco totalmente.

     ·  fast o minimal Borrado rápido 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 sesión.

     fs=
        Esta opción 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 número seguido de b para indicarle bytes, k para
        kilobytes, m para megabytes.

        Por defecto tiene un buffer de 4 Mb. La recomendación para el
        tamaño del buffer es de entre 4 y 32 Megas, debiendo ser como
        mínimo igual al tamaño de buffer interno de la grabadora y como
        máximo no superior a la mitad de la RAM física del ordenador.

        Lo normal es que no necesite poner más de 8 MB que es lo que yo
        recomiendo. Si aún así aparecen mensajes como fifo empty count,
        tiene problemas de configuración o hardware. Ej: fs=8m.

     driver=
        Esta opción es para especificarle un driver concreto; para ver
        la lista de todos los drivers simplemente especifique
        driver=help. Si no se indica opción, cdrecord tratará de
        encontrar el driver más apropiado para la unidad. Si no lo
        consigue, tendrá que indicárselo; sepa que si el driver no es
        absolutamente compatible corre un riesgo muy grande de perder el
        CD.

     -checkdrive
        Esta opción busca el driver que corresponda a su unidad y
        termina la ejecución.

     -prcap
        Esta opción imprime las posibilidades de las unidades que
        cumplan el estándar SCSI-3/mmc y sale.

     -inq
        Esta opción hace un examen de la unidad, imprime los resultados
        en pantalla y sale.

     -scanbus
        Esta opción examina el bus SCSI en busca de unidades. Sirve para
        buscar nuestra unidad.

     -reset
        Esta opción resetea el bus SCSI donde se esté nuestra grabadora.

     -audio
        Detrás de esta opción se indican los nombres de los archivos de
        sonido que serán grabados como pistas de audio, siempre y cuando
        los archivos tengan una calidad de muestreo 44.100 Khz a 16
        Bits, estéreo en alguna variante PCM; si no son así, serán
        rechazados por cdrecord.  Acepta formato CDDA (tanto .cdda como
        .cdr son extensiones válidas), .wav, .au y .raw.

        cdrecord, si no se le especifica lo contrario, asume que el
        orden de palabra es Big Endian, y convertirá automáticamente a
        Little Endian si detecta que la grabadora lo necesita.

     -data
        Tras de esta opción 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 opción
        viene por defecto, lo que quiere decir que si no la indicamos
        grabaremos de esta forma.

     -mode2
        Si esta opción esta presente, todas las pistas de datos que la
        sigan se grabarán en modo 2.

     -xa1
        Si esta opción esta presente, todas las pistas que la sigan se
        grabarán en modo XA 1.

     -xa2
        Si esta opción esta presente, todas las pistas que la sigan se
        grabaran en modo XA 2.

     -cdi
        Si esta opción esta presente, todas las pistas que la sigan se
        grabaran en CDI.

  Estos son los comandos que más se usan, para ampliar información 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 demás 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 explicación 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 multisesión XA 1 y
  las siguientes pistas serán 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 estéreo). Y al final no será
  escrita la TOC por lo que para hacerlo tenemos la siguiente línea:

       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 hacía falta especificar el parámetro
  -data, que es el asumido por defecto.

  Las nuevas opciones que incluye el ``cdrecord 1.8'' se describen en su
  sección.

  6.3.1.1.  Parámetros 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 dónde se encuentra la
  grabadora, o la velocidad de grabación ya que generalmente grabará
  casi siempre al máximo de velocidad.

  Para no tener que especificarlo siempre en la línea de comandos,
  cdrecord provee la posibilidad de establecer dichos parámetros 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
  grabación por defecto, a menos de que se especifique lo contrario
  mediante parámetros de la línea de comandos, va a ser a doble
  velocidad (2x) y el buffer de datos FIFO sea de 16 megabytes.

  Estableceríamos dichas variables de entorno mediante la inserción,
  generalmente en el fichero /etc/profile, de las siguientes líneas,
  suponiendo que utilice bash como intérprete de comandos:

       CDR_SPEED=2
       CDR_DEVICE=0,4,0
       CDR_FIFOSIZE=16m
       export CDR_SPEED CDR_DEVICE CDR_FIFOSIZE

  Dichas variables no estarán 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 más 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 mínimo retraso en la
  transferencia de datos puede ocasionar que no se grabe el CD
  correctamente a pesar de que durante la grabación 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 grabación, peligro
  de hacer un CD desde el que no se pueda leer ningún 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 operación sólo 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 operación:

       mkisofs -r -T -l -print-size -f /files

  la cual nos facilitará un número, este número se lo deberemos de pasar
  en un parámetro al cdrecord para que nos reconozca el tamaño de la
  imagen a grabar, ya que si no, cdrecord no tiene forma de saber cuál
  es el tamaño de la imagen. De esta forma, si por ejemplo, mkisofs nos
  mostrará la siguiente línea:

       Total extents scheduled to be written = 290699

  Para que cdrecord reconozca el tamaño 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 multisesión:

       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

  Nótese que no especificamos ni la localización SCSI de la grabadora,
  ni la velocidad de grabación, 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 ejecución, y en este caso concreto establecemos la máxima
  posible.

  Se preguntará por qué en la opción tsize del cdrecord multiplico por
  2048 la cantidad dada por el mkisofs. La razón es muy simple, a partir
  de la version 1.6.1 y 1.8 de cdrecord, hay que pasarle el tamaño en
  bytes de la imagen, y debido a que realiza la multiplicación él mismo,
  sólo lo tenemos que multiplicar por el tamaño de cada sector de un CD
  y listo.

  Use esto con cuidado.

  Y para terminar voy a indicar cómo 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 Jörg 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 cómo acceder a nuestra grabadora tendremos
  que especificar el parámetro 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
  versión 1.6, esta última es capaz de usarla. También es muy
  recomendable hacer pruebas de grabación para comprobar que no haya
  falta velocidad en el puerto paralelo antes de proceder a la grabación
  final de CD-ROMs.

  6.3.2.  cdwrite

  Puede obtener este programa (y casi todos los relativos a creación de
  CDs) de ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/.

  Este programa era el más utilizado hasta hace un par de años mas o
  menos, (y el único que había). 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 excepción 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 fácil de usar.

  Por defecto cdwrite busca /dev/cdwriter como dispositivo por defecto
  de la grabadora, por lo que si hace un enlace simbólico del
  dispositivo /dev/sgX a /dev/cdwriter con el dispositivo de acceso
  genérico correspondiente, (vea sección ``Dispositivos genéricos'') se
  ahorrará un parámetro más que poner.

  cdwrite necesita que se le especifique el tamaño en bytes de la imagen
  que va a grabarse; para saberlo, usamos el programa isosize (lo
  podemos encontrar dentro del paquete de distribución 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 tamaño es 382060544, parámetro que le
  especificaremos posteriormente con -b.

  podemos usarlo también con CD-Roms o particiones, si hemos generado la
  imagen directa a una partición en lugar de a fichero:

       isosize /dev/sda1
       634986355

  Si hemos volcado la imagen generada por mkisofs en la primera
  partición del primer disco SCSI (con la opción -o /dev/sda1).

  Algunos ejemplos de cómo 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 grabación; 382060544 es el tamaño del
  CD en cuestión, 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 parámetro -s indica
  la velocidad de grabación (equivale al speed=2 del cdrecord), el
  parámetro -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 están los parámetros -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 sólo se
  escuche un desagradable ruido.

  Consulte la sección ``Software de extracción de audio''.

  No podrá hacer CDs multisesión con este programa. Para hacer CDs
  multisesión tendrá que usar las opciones que lleva el mkisofs para
  este fin, generando una imagen multisesión.

  6.3.3.  cdrdao

  Parece ser que se ha conseguido que este programa haga lo que se
  quería, copiar CDs al vuelo, incluso los mixtos, de música, y
  ohhhhhhh, de ¡Playstation!.  No dejéis de ver la sección 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 más 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 automáticamente, además de
  funcionar correctamente y sin problemas. Con él puede configurar y
  hacer las imágenes de CD fácilmente sin necesidad de ir a la línea de
  comandos, así como extraer pistas de audio y volver a grabarlas
  gracias a sus modificaciones del readcdda y playcdda (que sólo 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 extracción
  de pistas CDDA o de CD-Audio.

  Puede hacer una copia directa de CD a CD, siempre que sean sólo 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 características 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
  versión 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 más peculiar sin duda es que esta escrito íntegramente en
  java; su desarrollo es muy rápido.

  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 más que nada para la preparación de audio
  que posteriormente va a ser grabado con cdrecord o cdwrite desde la
  línea de comandos. Provee una interfaz tipo ncurses. Sólo 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 pequeñas, de consola, pero muy útiles a la
  hora de comprobar y verificar CDs. Estas pequeñas 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 (sección ``X-CD-
  Roast'') como en el de cdrecord (``cdrecord'').

  Por ejemplo, sdir nos puede ayudar a saber el tamaño total de un
  directorio y sus subdirectorios lo cual resulta muy útil cuando
  queremos evaluar y calcular el tamaño 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 sólo eso, este pequeño 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 vídeo CD, etc; por último, con isodetect podemos ver la etiqueta
  del volumen de un CD así como los comentarios de los mismos.

  Descripción de las utilidades:

     sdir
        este programa muestra la capacidad de un directorio con sus
        subdirectorios. Los parámetros a pasarle son directorios.

     isodetect
        programa para ver el volumen, el editor, el publicador y la
        aplicación 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 dónde realizar la búsqueda; por defecto busca en
        /dev/cdrom. Si no se indican mas parámetros 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 aplicación.

        Sólo se puede indicar un comando a la vez con -d. Este programa
        se puede encontrar en el paquete X-CD-Roast (sección ``X-CD-
        Roast'').
     cdinfo
        excelente y pequeña 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 versión 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 pequeña utilidad nos servirá para encontrar posibles
        errores en las imágenes. 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
        (sección ``X-CD-Roast'').

  7.  Software DAO y generadores de subcódigos.

  7.1.  cdrecord 1.8

  Puede obtener la última alpha del servidor FTP
  ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha/.

  Descripción de los nuevos comandos para la nueva versión:

     -useinfo
        Utiliza los archivos de extensión .inf sobreescribiendo las
        opciones por defecto.

     -atip
        Muestra la información referente al CD y sale. Esta información
        tambien la ofrecia la version anterior pero sólo cuando se
        disponia a grabar.

     -dao
        Graba el medio en Disc-At-Once.

  Ejemplo de como se usa la opción -atip se tiene en la sección
  referente a crear un sistema ext2 con el ``mke2fs'' en un archivo.

  Para usar la opción -useinfo necesitamos primero haber extraido con el
  cdda2wav un CD-Audio al disco duro sin poner la opción -H.

       cdrecord -v dev=0,3,0 fs=16m speed=4 -useinfo *.wav

  Pues sí, cdrecord tambien graba en DAO, pero sólo a partir de la
  versión de desarrollo 1.8a20. La forma de usar cdrecord es
  prácticamente la misma solo que para usar las características de la
  grabación en DAO ha de tener una grabadora que soporte MMC y utilizar
  la opción -dao; salvo esto, puede usarlo como haría normalmente.

  Cuando utilizemos esta opción 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
  grabación. Gracias a esta opción 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 aplicación, con entorno gráfico en X-Window, que permitirá
  generar escaletas (cue sheets para la creación de CDs, así como de
  subcódigos, 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 código del CDParanoia para realizar la
  extracción de audio.

  Echándole un vistazo a la documentación se puede ver qué unidades
  están soportadas; tanto unidades grabadoras, incluyendo modelos SCSI e
  IDE, como unidades lectoras que hayan sido probadas sin problema.

  También se pide que si su unidad está soportada para extraer Audio con
  cdparanoia, pero no con cdrdao, le envíe la información que se obitene
  de ejecutar el comando cdparanoia -v a la dirección 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 código fuente. En el mismo paquete se
  encuentran otras utilidades bastante interesantes que comentaré
  seguidamente una vez explicados los comandos de esta utilidad.
  La última versión, recomendada y realmente funcional, la 1.1.3, se
  puede obtener de http://www.ping.de/sites/daneb/cdrdao.html.

  Descripción de los comandos del programa:

     Utilización 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 pequeña descripcion de la información del
        archivo TOC extraido previamente.

     ·  toc-size Muestra el número 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 información 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 simbólico 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
        específico para la grabadora.
     ·  --source-driver (id) Forzamos al programa a usar un controlador
        específico 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 láser desactivado, en
        modo de simulación o prueba.

     ·  --multi No cierra el CD, para poder crear un CD multisesión.

     ·  --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 (número) Expecifica el tamaño del buffer (min. 10).

     ·  --session (número) Selecciona la sesión 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 (número) nivel de paranoia para la extracción de
        audio (0..3).

     ·  --reload Relee el disco si es necesario para grabar.

     ·  --force Fuerza la ejecución de la operación.

     ·  -v (número) Expecifica el nivel de muestra de datos.

     ·  -n (número) No hace una pausa después de grabar.

  De aqui hay que comentar que el comando copy sólo se usa para copiar
  un CD directamente, si tenemos una imagen y la queremos copiar hay que
  usar el comando write. Un tamaño muy recomendado del buffer es 64, y
  de ahí en adelante, aunque con 64 creo que es más que suficiente.

  7.3.1.  Copia al vuelo de CD-ROMs.

  Ahora una breve descripción de lo que más 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 opción --fast-toc realiza una lectura rápida 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 parámetro, leerá la TOC
  de forma rápida y empezará enseguida a copiar. El resto de parámetros
  no necesitan de una explicacion más detallada.

  Es recomendable que cuando se copie un CD de música o mixto se utilice
  de la siguiente manera con la opción --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 opción --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 más 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á más 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.  Extracción y grabación de imágenes 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 información 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 información TOC. El indicarle la
  opción --datafile con el nombre de la imagen es sólo para
  identificarla, por si tenemos más 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.

  También 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 más laborioso que copiarla con el
  cdrecord.

  7.3.3.  Scripts que acompañan 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 código 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 automática la extracción de los
  archivo Debido a la falta de algunos archivos en la distribución 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 distribución perl con módulos 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 extracción 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 función, 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 parámetros 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 extraído

       write-psx cd1

  7.3.5.  A tener en cuenta

  Hay más posibilidades pero las descritas anteriormente son las que son
  más faciles de usar y que más nos pueden interesar. En próximas
  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 grabación al vuelo.

  ATENCION: Durante la utilización del programa para la duplicación 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 grabación 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 simulación 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 tamaño 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 grabación 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 tamaño.  No tiene porque
  asustarse, es completamente       normal. Otra de las ventajas que he
  podido apreciar es que ofrece mucha información sobre el CD antes de
  realizar el proceso de grabación.

  8.2.  disco duro deje de funcionar durante unos segundos.  Me sale un
  mensaje muy parecido al siguiente después de que el

  Me sale este mensaje después 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 Tritón (I/II) DMA, ya que su disco duro no soporta extracción
  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 extracción
  DMA para ese disco, (con las unidades de CD-ROM que no lo soporten
  también) tiempo suficiente para que el CD pueda salir dañado al no
  llegarle constantemente los datos.

  En el caso de estar emulando dispositivos SCSI es rotundamente
  necesario desactivar dicha opción en el kernel ya que en el momento en
  que pase, el bus se quedará colgado al hacer interferencia el
  controlador IDE y la emulación 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 partición 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 cómo se hace es

       cat /dev/cdrom > imagenCD.iso

  o

       dd if=/dev/cdrom of=imagenCD.iso

  una vez hecho esto sólo 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 sección ``¿Se
  puede usar la grabadora para leer o extraer?'').

  8.4.  ¿Se puede copiar de CD a CD (sólo de datos) directamente sin
  ningún problema?

  Efectivamente se puede copiar de CD a CD sólo de datos sin ningún
  problema, pero eso sí, (el típico 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í, hágale 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 cómo se hace una copia directa desde la
  unidad lectora a la grabadora (IDE en este caso), y si se da cuenta,
  el parámetro -isosize es para forzar al programa grabador a que
  determine primero el tamaño 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 grabación 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 duplicación de tipo DAO (Disk At Once) y
  OTH (On The Fly).  Por supuesto, la unidad grabadora ha de soportarlo,
  además del programa; además, el lector de CDRom ha de estar soportado
  por el programa para poder extraer las pistas.

  Ver sección ``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. ¿Cómo? ¿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 grabación basado en la pista 0. Esta pista está grabada como de
  datos y es errónea desde el punto de vista del estándar 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 razón de usar un programa tipo DAO/OTH para hacer este tipo
  de copias.

  software/grabadora/lector que soportase duplicación DAO, como ahora lo
  hay.  Ver sección ``¿Puedo duplicar un CD mixto o de audio?''.

  8.7.  ¿Hay alguna FAQ genérica sobre CD-R o CD-RW?

  Sí. En ella puede consultar desde qué tipo de CD-R vírgenes son mejor
  para qué cosa hasta qué grabadora es la más recomendable, o cuáles 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 inglés, aunque puede aprovechar el traductor de
  Altavista: http://babelfish.altavista.digital.com/cgi-bin/translate.

  La traducción es un poco burda, pero menos da una piedra... :).

  8.8.  zumbido horripilante...  He grabado un CD de Audio, pero al
  escucharlo sólo se oye un

  Consulte la sección ``Software de extracción de audio'', Ha utilizado
  el orden de palabra binaria endian equivocado para grabar ficheros de
  audio.

  8.9.  Problemas con más 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 configuración 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 tenía sólo la grabadora y estos tres parámetros
  activados efectivamente el sistema se colgaba.  Posteriormente adquirí
  una unidad lectora SCSI para poder realizar duplicaciones directas,
  pero en las duplicaciones aparecían 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 caía.

  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 cuál fue mi sorpresa al ver que no
  sólo había 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 más 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 más de
  uno; familiarícese 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 algún 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 imágenes. Recomiendo usarlas en las copias de CD mixtos y CD
  Plus.

  8.11.  ¿Como se graba un CD multisesión?

  ATENCION: No es posible crear CDs Multisesion con formato Joliet.

  El asunto de un CD multisesión es complicadillo. Si comenzamos con que
  hemos grabado una imagen digamos de 200 MB y también queremos grabar
  otra de otros 200 MB a continuación no podremos, es decir, primero
  tendremos que grabar una, y después crear la segunda imagen con unas
  opciones que tenemos que sacar de cdrecord, pasándoselas a mkisofs
  como muestra el ejemplo:

       cdrecord dev=4,0 -msinfo

  Para obtener el número que hace falta, es decir, la información
  multisesión del CD. Sólo funciona con CDs que hayan sido grabados con
  la opción -multi. Entonces le pasamos a mkisofs el número 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, también se ha incluido el parámetro -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 parámetro -multi para que sea multisesión.

  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 común 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 básica desde
  un directorio en el que no hayan archivos. Grabamos las pistas de
  audio y la imagen básica 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 información de multisesión del CD y
  hacemos la imagen y la grabamos de la misma forma que está explicada
  en la sección ``¿Como se crea un CD Multisesión?''.

  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 solución es leer bien el archivo README que acompaña al
  programa y comprobar si su unidad está realmente soportada en la lista
  que acompaña.  Si realmente no está tiene la posibilidad de enviar un
  mail al autor para que añada 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, dedicación que cada uno pueda
  aportar a la creación/desarrollo de algún programa DAO (Disk-At-Once)
  para la duplicación de CD-ROMs, ya que es muy costoso y trabajoso la
  creación o duplicación 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.  Créditos

  Éste documento ha sido escrito por Leandro Terrés lord_lt@retemail.es
  tras leer varios documentos en inglés, 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 incorporación propia y pruebas
  que he ido haciendo, a base de perder algún que otro CD con grabadoras
  IDE, que es la parte más actual por la que se ha hecho éste documento.

  Éste documento es propiedad intelectual de Leandro Terrés como parte
  del Insflug, y del LDP (Linux Documentation Proyect). Para cualquier
  modificación, añadidura, traducción, etc. póngase en contacto con el
  autor.

  Colaboraciones, añadiduras y correcciones:

  ·  Jorge de Diego Rodríguez, toke@toke.net por su inestimable ayuda en
     la finalización del apartado sobre las grabadoras IDE/ATAPI por
     puerto paralelo.

  ·   Revisión, reestructuración, formateo y ampliación (SCSI,
     extracción de audio), Francisco J.  Montilla, pacopepe@insflug.org

  a los que desde aqui doy mis más sinceras gracias por la ayuda
  prestada.

  10.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones «oficiales»:  www.insflug.org. Asegúrese de comprobar
  cuál es la última versión disponible en el Insflug antes de bajar un
  documento de un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  que estamos trabajando incesantemente para añadir.

  Se proporcionará también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase 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 ESPAÑOL.
  Original de Ambrose Au, ambrose@writeme.com
  Original v1.2, 10 de noviembre de 1997; traducción, 20 de
  noviembre

  Este documento describe cómo activar la función IP Masquerade en un
  servidor Linux, permitiendo conectar a Internet, mediante su máquina
  Linux, ordenadores que no tienen registrada una dirección IP de Inter­
  net.
  ______________________________________________________________________

  Índice General:

  1.      Introducción.

  1.1.    Introducción.

  1.2.    Prólogo, retrospectiva y créditos.

  1.3.    Copyright & Disclaimer.

  2.      Conceptos básicos.

  2.1.    ¿Qué es IP Masquerade?

  2.2.    Estado actual

  2.3.    ¿Quién puede beneficiarse de IP Masquerade?

  2.4.    ¿Quién NO necesita IP Masquerade?

  2.5.    ¿Cómo funciona IP Masquerade ?

  2.6.    Requerimientos para usar IP Masquerade en Linux 2.x

  3.      Configuración de IP Masquerade.

  3.1.    Cómo compilar el núcleo para dar soporte IP Masquerade.

  3.2.    Asignación de direcciones IP en la red privada

  3.3.    Configuración de las OTRAS máquinas.

  3.3.1.  Configuración de Windows 95.

  3.3.2.  Configuración de Windows para Trabajo en Grupo (3.11).

  3.3.3.  Configuración de Windows NT.

  3.3.4.  Configuración de sistemas basados en UNIX.

  3.3.5.  Configuración DOS usando el paquete NCSA Telnet.

  3.3.6.  Configuración de sistemas basados en MacOS usando MacTCP

  3.3.7.  Configuración de sistemas basados en MacOS usando Open
  Transport.

  3.3.8.  Configuración de red Novell usando DNS.

  3.3.9.  Configuración de OS/2 Warp.

  3.3.10. Configuración de otros sistemas.

  3.4.    Configuración de la política de IP Forwarding.

  3.5.    Comprobación de IP Masquerade.

  4.      Otras características 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 configuración.

  4.3.1.  Clientes que funcionan

  4.3.2.  Clientes que NO funcionan

  4.3.3.  Plataformas/SO testeados como las OTRAS máquinas.

  4.4.    Administración de cortafuegos IP con ipfwadm .

  4.5.    IP Masquerade y llamada bajo demanda ( Dial On Demand ).

  4.6.    Reenvío de paquetes ipautofw .

  5.      Varios.

  5.1.    Obtención de ayuda.

  5.2.    Agradecimientos.

  5.3.    Referencias.

  6.      Anexo de la traducción.

  6.1.    Traducción.

  6.2.    Anexo: El INSFLUG

  6.3.    Fuentes de información en español

  6.4.    Recursos de Linux y distribuciones.

  6.5.    Cómo colaborar

  7.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción.

  1.1.  Introducción.

  Este documento describe cómo activar la función IP masquerade en un
  servidor Linux, permitiendo conectar a Internet, mediante su máquina
  Linux, ordenadores que no tengan registrada una dirección IP de
  Internet.  Es posible conectar sus máquinas 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 más usual.

  Este documento está pensado para usuarios de núcleos 2.0.x. Los
  núcleos en desarrollo 2.1.x no son tratados.

  1.2.  Prólogo, retrospectiva y créditos.

  Encuentro muy confuso, como nuevo usuario, configurar IP masquerade en
  los núcleos 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 sección básica para que usuarios
  experimentados puedan crear más documentación. Si piensa que no estoy
  haciendo un buen trabajo, siéntase libre de decírmelo 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 siéntase libre de enviarme cualquier crítica o comentario a
  ambrose@writeme.com si algo de lo aquí explicado le parece erróneo, o
  si echa algo de menos. ¡Su inestimable comentario podrá influenciar el
  futuro de este COMO!

  Este COMO está pensado para ser una guía rápida a fin conseguir que el
  IP Masquerade funcione en el plazo de tiempo más corto posible.

  Podrá encontar las últimas novedades, así como mayor información en
  las páginas web de IP Masquerade Resource http://ipmasq.home.ml.org/
  que mantengo. Si tiene alguna pregunta técnica sobre IP Masquerade,
  por favor entre en la Lista de Correo de IP Masquerade en lugar de
  enviarme correo electrónico, mi tiempo es limitado, y los
  desarrolladores de IP_Masq están más capacitados para responder a sus
  preguntas.

  La última versión de este documento se puede encontrar en IP
  Masquerade Resource, el cual también contiene las versiones HTML y
  PostScript:

  ·  http://ipmasq.home.ml.org/

  ·  Por favor consulte http://ipmasq.home.ml.org/index.html#mirror,
     réplica de estas páginas.

  1.3.  Copyright & Disclaimer.

  ** Nota del traductor ** : Aunque se traducen los términos de la
  licencia sólo se hace con carácter 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 términos de la GNU General
  Public License.

  La información 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 debería
  determinar si quiere seguir la información de este documento.

  Nadie será responsable de daño alguno sufrido por sus ordenadores y
  cualesquiera otras pérdidas ocasionadas por el uso de la información
  contenida en este documento. Esto es:

       EL AUTOR (y el TRADUCTOR) NO SE RESPONSABILIZA DE NINGÚN
       DAñO SUFRIDO DEBIDO A LAS ACCIONES REALIZADAS BASADAS EN
       ESTE DOCUMENTO.

  2.  Conceptos básicos.

  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
  módem) también pueden conectarse a Internet, incluso aunque no tengan
  una dirección IP oficial asignada.

  Esto permite a un conjunto de máquinas acceder transparentemente a
  Internet ocultas tras la máquina 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 más difícil que romper un buen filtro de paquetes
  basado en cortafuegos (suponiendo que no existan fallos en ninguno).

  2.2.  Estado actual

  IP Masquerade está todavía en etapa experimental. De todas formas, los
  núcleos a partir del 1.3.x tienen ya soporte interno incorporado.
  Muchos particulares y empresas lo están usando, con resultados
  satisfactorios.

  Se ha comprobado que los Navegadores de páginas web y telnet funcionan
  bien sobre ip_masq. FTP, IRC y Real Audio funcionan con ciertos
  módulos cargados. Otras variedades de audio por red como True Speech e
  Internet Wave también funcionan. Algunos usuarios de la lista de
  correo incluso lo intentaron con software de vídeo-conferencia.
  Incluso ping funciona ahora, con el nuevo parche ICMP.

  Por favor diríjase a la sección ``'' para ver la lista completa de
  programas soportados.
  IP Masquerade funciona bien con 'máquinas 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.  ¿Quién puede beneficiarse de IP Masquerade?

  ·  Si tiene un servidor Linux conectado a Internet, y

  ·  si tiene algunos ordenadores con TCP/IP conectados con esa máquina
     Linux en una subred local (LAN) , y/o

  ·  si su servidor Linux tiene más de un módem y actúa como un servidor
     PPP o SLIP conectando a otros,

  ·  los cuales no tienen asignada una dirección IP oficial. (Estas
     máquinas son representadas por OTRAS máquinas presentes).

  ·  Y por supuesto, si quiere que esas OTRAS máquinas estén en Internet
     sin gastar dinero extra :)

  2.4.  ¿Quién NO necesita IP Masquerade?

  ·  Si su máquina es un servidor Linux aislado conectado a Internet,
     entonces es inútil usar ip_masq, o

  ·  si ya tiene direcciones asignadas a sus OTRAS máquinas, entonces no
     necesita IP Masquerade,

  ·  y por supuesto, si no le gusta la idea de una salida gratuita a
     Internet.

  2.5.  ¿Cómo funciona IP Masquerade ?

  De la PUF de IP Masquerade por Ken Eves:

  Representación de la configuración más 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 vía SLIP o PPP usando el
  modem1. Tiene asignada la dirección IP 111.222.333.444. En esta
  configuración ese modem2 permite a las personas que llaman entrar e
  iniciar una conexión SLIP/PPP.

  El segundo sistema (el cual no tiene porqué usar Linux) llama al
  servidor Linux e inicia una conexión SLIP o PPP. No tiene asignada una
  dirección IP en Internet así que usa 192.168.1.100 (ver abajo).

  Con ip_masquerade y el rutado configurado adecuadamente la máquina
  OTRA puede interactuar con Internet como si estuviera realmente
  conectada (con unas pocas excepciones).

  Citando a Pauline Middelink:

  No olvide mencionar que OTRA debería tener al servidor Linux como su
  pasarela (si es la ruta por defecto o sólo una subred no importa). Si
  la OTRA no puede hacer esto, la máquina Linux debería hacer un proxy
  arp para todas las direcciones de rutado, pero la configuración del
  proxy arp va más 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 máquina OTRA que mi servidor Linux es su pasarela.

  ·  Cuando un paquete llega a la máquina Linux desde OTRA, le asignará
     un nuevo número de puerto origen, y pega su propia dirección 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 máquina Linux, si el
     número de puerto es uno de esos asignados arriba, obtendrá el
     puerto original y la dirección ip, repondrá la cabecera del paquete
     y lo enviará a OTRA.

  ·  El servidor que envía el paquete nunca notará la diferencia.

  Un ejemplo de IP Masquerading

  el ejemplo típico 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. También
  hay algo al otro lado de su conexión IP que le suministra la
  información de Internet y además otros sistemas con los que está
  interesado en intercambiar información.

  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 máquina Linux (-- N. del
  T.
  Mejor dicho, el interfaz ethernet de la máquina Linux--) tiene la
  dirección 192.168.1.1 y los demás tienen direcciones de esa misma red.

  Las tres máquinas 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 máquinas 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 conexión 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 están siendo enmascarados.

  2.6.  Requerimientos para usar IP Masquerade en Linux 2.x

  Por favor diríjase a http://ipmasq.home.ml.org/ para información más
  actualizada, es difícil actualizar este COMO con frecuencia.

  ·  Fuentes del núcleo 2.0.x, disponibles en
     ftp://ftp.kernel.org/pub/linux/kernel/v2.0/

     (Sí, tendrá que compilar su núcleo con ciertos soportes... Se
     recomienda el último núcleo estable)

  ·  Módulos cargables del núcleo, preferiblemente 2.0.0 o superior
     disponibles en

     (modules-1.3.57 es lo mínimo 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 Guía del Administrador de
     Redes Linux.

  ·  Conexión 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 Infovía, el Infobia-Como,
     http://www.insflug.org

  ·  Ipfwadm 2.3 o más reciente, disponible en
     información sobre requerimientos de versiones en
     http://www.xos.nl/linux/ipfwadm/

  ·  Puede opcionalmente aplicar parches de IP Masquerade para habilitar
     otras funcionalidades. Dispone de más información acerca de esto en
     http://ipmasq.home.ml.org/ (estos parches aplicados a todos los
     núcleos 2.0.x)

  3.  Configuración de IP Masquerade.

  Si su red privada contiene información vital, piénselo 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.  Cómo compilar el núcleo para dar soporte IP Masquerade.

  Por favor, diríjase a http://ipmasq.home.ml.org/ para información más
  actualizada, es difícil actualizar este COMO frecuentemente.

  ·  Lo primero de todo, necesita las fuentes del núcleo
     (preferiblemente la última versión estable, 2.0.0 o superior).

  ·  Si es la primera vez que compila el núcleo, no se asuste. De hecho
     es bastante fácil y está perfectamente documentado en el Kernel-
     Como http://www.insflug.org.

  ·  Descomprima las fuentes del núcleo 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 núcleo 2.0.x (asegúrese de que
  hay un directorio o un enlace simbólico llamado linux).

  ·  Aplique los parches apropiados. Desde que están saliendo parches
     nuevos, los detalles no serán incluidos aquí. Por favor busque en
     IP Masquerade Resources para información más actualizada.

  ·  Consulte el Kernel-Como y el fichero README de los fuentes del
     núcleo para más instrucciones sobre la compilación.

  ·  Aquí están 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 código experimental ip_masq compilado en
  el núcleo.

         * Enable loadable module support
           CONFIG_MODULES

  le permitirá cargar módulos.

         * 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 opción que necesite para su configuración
        específica.

  ·  Después de compilar el núcleo, debería de compilar e instalar los
     módulos:

       make modules; make modules_install

  ·  Luego debe añadir unas pocas líneas al fichero /etc/rc.d/rc.local
     (o en el apropiado) para cargar los módulos requeridos, que residen
     en /lib/modules/2.0.x/ipv4/, automáticamente durante el arranque:

               .
               .
               .
       /sbin/depmod -a
       /sbin/modprobe ip_masq_ftp
       /sbin/modprobe ip_masq_raudio
       /sbin/modprobe ip_masq_irc

  (u otros módulos como ip_masq_cuseeme, o ip_masq_vdolive si ha apli­
  cado parches)

     Nota:
        También puede cargar los módulos manualmente antes de usar
        ip_masq, pero no use kerneld para esto, NO funcionará.

  3.2.  Asignación de direcciones IP en la red privada

  Como todas las OTRAS máquinas no tienen dirección oficial asignada,
  debe haber una forma correcta de adjudicar direcciones para esas
  máquinas.

  De la FAQ IP Masquerade:

  Hay un RFC (#1597) en el cual están las direcciones IP para ser usadas
  en una red no conectada a Internet. Hay 3 bloques de números
  reservados específicamente 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: Sección 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 más que un simple número de red de clase A,
  mientras que el segundo bloque es un conjunto de 16 números de red de
  clase B contiguos y el tercer bloque un conjunto de 255 números de red
  de clase C contiguos.

  Así, si está usando una red de clase C, debería de nombrar a sus
  máquinas 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 máquina 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 dirección de EMISIÓN
  (Broadcast) respectivamente, las cuales están reservadas. Evite usar
  estas direcciones en sus máquinas.

  3.3.  Configuración de las OTRAS máquinas.

  Además de asignar una dirección IP apropiada a las máquinas, también
  debería de poner la apropiada de la pasarela (gateway). En general,
  esto es coser y cantar. Simplemente introduzca la dirección de su
  servidor Linux (usualmente 192.168.1.1) como la dirección de la
  máquina pasarela.

  Como Servidor de Nombres, puede añadir algún DNS disponible. El más
  obvio debería ser el que esté usando su máquina Linux. También puede
  añadir opcionalmente algún sufijo de dominio de búsqueda.

  Después de que haya reconfigurado esas direcciones, recuerde reiniciar
  los servicios apropiados o reiniciar su sistema.

  Las siguientes instrucciones de configuración suponen que está usando
  una red de clase C con 192.168.1.1 como dirección de su servidor
  Linux. Por favor, tenga en cuenta que 192.168.1.0 y 192.168.1.255
  están reservadas.
  3.3.1.  Configuración de Windows 95.

  1. Si no ha instalado todavía la tarjeta de red y el correspondiente
     controlador de dispositivo (driver), hágalo ahora.

  2. Vaya a 'Panel de Control'/'Red'.

  3. Añada 'Protocolo'/'Microsoft'/'TCP/IP'  si no lo tiene.

  4. En 'Propiedades'/'TCP/IP', vaya a 'Dirección IP' y ponga la
     dirección IP 192.168.1.x, (1 < x < 255), y como máscara de subred
     255.255.255.0.

  5. Añada 192.168.1.1 como su pasarela en 'Puerta de enlace (Gateway)'.

  6. En 'Configuración DNS'/'Orden de búsqueda del servidor DNS' añada
     el DNS que usa su servidor Linux (usualmente está en
     /etc/resolv.conf).  Opcionalmente, puede añadir el apropiado sufijo
     de búsqueda de dominio.

  7. Deje las otras opciones como están, salvo que sepa lo que está
     haciendo.

  8. Pulse 'Aceptar' en todas las cajas de diálogo y reinicialice el
     sistema.

  9. Haga un Ping a la máquina Linux para comprobar la red:

     (Esto sólo comprueba la conexión local, todavía 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 máquinas de su red local.
     Hay un ejemplo llamado HOSTS.SAM en el directorio c:\windows.

  3.3.2.  Configuración de Windows para Trabajo en Grupo (3.11).

  1. Si no ha instalado la tarjeta de red y el controlador, hágalo
     ahora.

  2. Instale el paquete TCP/IP 32b si todavía no lo tiene.

  3. En 'Principal'/'Configuración de Windows'/'Configuración de la
     Red', pulse en 'Controladores'.

  4. Marque 'Microsoft TCP/IP-32 3.11b' en la sección

  5. Ponga la dirección IP 192.168.1.x (1 < x < 255), y la máscara 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', añada la información mencionada en el PASO 6 de la
     sección ``'', 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 búsqueda de
     servidores, similar al mencionado en el PASO 10 de la sección ``''
  9. Pulse 'OK' en todas las cuadros de diálogo y reinicialice el
     sistema.

  10.
     Haga un Ping a la máquina Linux para comprobar la conexión de red:
     'Archivo/Ejecutar', ponga: ping 192.168.1.1

     (Con esto sólo comprueba la conexión de la red local, todavía no
     puede hacer un ping al resto del mundo.)

  3.3.3.  Configuración de Windows NT.

  1. Si no ha instalado su tarjeta de red y el controlador, hágalo
     ahora.

  2. Vaya a 'Inicio'/'Panel de Control'/'Red'

  3. Añada 'Protocolo TCP/IP y Componentes Relacionados' desde el menú
     'Protocolos' mediante el botón 'Agregar' si no tiene todavía el
     servicio TCP/IP instalado.

  4. En el área bajo 'Protocolos de red', seleccione

  5. En 'Configuración TCP/IP', seleccione el adaptador de los
     instalados adecuado, por ejemplo: [1]Novell NE2000 Adapter. Luego
     ponga la Dirección IP 192.168.1.x (1 < x < 255), como Máscara de
     Subred 255.255.255.0 y como Pasarela 192.168.1.1.

  6. No use la 'Configuración DHCP Automática' 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 información apropiada mencionada
     en el PASO 6 de la sección ``''. Haga click en

  8. Vaya a la sección 'Dirección WINS', y active las opciones búsqueda
     de LMHOSTS' si está usando un fichero de búsqueda de servidores,
     similar al mencionado en el PASO 10 de la sección ``''

  9. Pulse 'Aceptar' en todos los cuadros de diálogo y reinicialice el
     sistema.

  10.
     Haga un Ping a la máquina Linux para comprobar la conexión de red:
     ('Inicio/Ejecutar'), ponga: ping 192.168.1.1.

     (Esto sólo comprueba la conexión de la red local, todavía no puede
     hacer un ping al mundo exterior.)

  3.3.4.  Configuración de sistemas basados en UNIX.

  1. Si no ha instalado la tarjeta de red y recompilado su núcleo con el
     controlador adecuado, hágalo ahora.

  2. Instale la red TCP/IP, así como el paquete de herramientas de red,
     si no lo ha hecho todavía.

  3. Ponga en la DIRECCIÓN 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. Añada su DNS y búsqueda 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 conexión
     con la máquina pasarela.

     (Esto sólo comprueba la conexión de la red local, todavía no puede
     hacer un ping al mundo exterior.)

  3.3.5.  Configuración DOS usando el paquete NCSA Telnet.

  1. Si no ha instalado la tarjeta de red, hágalo 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 dirección
     hardware en 0x300 (Su configuración 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, debería de poner hardware=packet, interrupt=10,
     ioaddr=60

  7. Debería de tener al menos especificada una máquina 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 especificación para el servicio de nombre de dominio:

  name=dns.dominio.com ; hostip=123.123.123.123; nameserver=1

  Nota: sustituya la información sobre el DNS por la que use en su
  servidor Linux.

  9. Salve su fichero config.tel

  10.
     Haga un telnet a la máquina Linux para comprobar la conexión de
     red: telnet 192.168.1.1

  3.3.6.  Configuración de sistemas basados en MacOS usando MacTCP

  1. Si no ha instalado en controlador de su tarjeta ethernet, ahora
     podría ser un buen momento para hacerlo.

  2. Abra el MacTCP control panel. Seleccione el controlador de red
     adecuado (Ethernet, NO EtherTalk) y pulse el botón 'More...'.

  3. Bajo 'Obtain Address:', pulse 'Manually'.

  4. Bajo 'IP Address:', seleccione class C del menú desplegable. Ignore
     el resto de esta sección de la caja de diálogo.

  5. Rellene con la información adecuada, la 'Domain Name Server
     Information:'.

  6. Bajo 'Gateway Address:', introduzca 192.168.1.1

  7. Pulse 'OK' y sálvelo. En la ventana principal en MacTCP control
     panel, introduzca la dirección 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 diálogo
     indicando que reinicie el sistema, hágalo.

  9. Puede hacer un ping a la máquina Linux para comprobar la conexión
     de red. Si tiene el programa freeware MacTCP Watcher, pulse en el
     botón Linux(192.168.1.1) en la caja de diálogo que se despliega.
     (Esto solamente comprueba la conexión de la red local, y todavía 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 máquinas de su red local.
     Este archivo podría existir ya en su System Folder, y podría
     contener algunas entradas de ejemplo (comentadas) que puede
     modificar de acuerdo a sus necesidades.

  3.3.7.  Configuración de sistemas basados en MacOS usando Open Trans­
  port.

  1. Si no ha instalado el controlador adecuado de la tarjeta ethernet,
     ahora sería un buen momento para hacerlo.

  2. Abra el TCP/IP Control Panel y elija 'User Mode

  3. Elija 'Configurations...' del menú File.  Seleccione su
     configuración 'Default' y pulse el botón es una configuración
     especial) en el diálogo 'Duplicate Configuration', éste
     probablemente contendrá algo como 'Default copy'. Luego pulse el
     botón 'OK', y el botón 'Make Active'

  4. Seleccione 'Ethernet' del desplegable 'Connect via:'.

  5. Seleccione el elemento apropiado del desplegable de reselecionar su
     configuración 'Default' y salir. Yo uso

  6. Introduzca la dirección 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 dirección 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 introducción de valores
     incorrectos puede dar lugar a comportamientos erróneos. Si no está
     seguro, lo mejor es que los deje en blanco, sin marcar o sin
     seleccionar.  Borre la información de esos campos, si es necesario.
     Hasta donde sé, no hay forma de decirle al sistema, a través de los
     diálogos TCP/IP, que no use un archivo de Hosts alternativo
     previamente seleccionado. Si Vd sabe cómo, me interesaría.  Marque
     '802.3' si su red requiere tramas del tipo 802.3.

  12.
     Pulse el botón 'Options...' para estar seguro de que el TCP/IP está
     activo. Yo uso la opción 'Load only when needed'. Si usa y quita
     aplicaciones TCP/IP con frecuencia sin reiniciar su máquina, puede
     que al deshabilitar esta última opción prevenga/reduzca los efectos
     de la administración de memoria. Con esta opción deshabilitada las
     pilas del protocolo TCP/IP están siempre cargadas y disponibles
     para su uso. Si está habilitada, las pilas TCP/IP se cargarán
     automáticamente cuando se necesiten y se descargarán cuando no.
     Estos procesos de carga y descarga hacen que la memoria de su
     máquina se fragmente.

  13.
     Puede hacer un ping a su servidor Linux para comprobar la conexión
     de red. Si tiene el programa freeware MacTCP Watcher, pulse el
     botón 'Ping' , e introduzca la dirección de su servidor Linux
     (192.168.1.1) en la caja de diálogo que aparece.  (Esto sólo
     comprueba su conexión de la red local, todavía 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 máquinas de su red local. Este fichero puede ya
     existir o no en la System Folder. Si es así, debería 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 página 33 de RFC 1035).  Una vez haya creado el
     fichero, abra el TCP/IP control panel, pulse el botón '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 botón 'Save' pasa salvar los cambios que ha hecho.

  16.
     Los cambios tendrán efecto inmediatamente, pero reinicializando el
     sistema no pierde nada.

  3.3.8.  Configuración de red Novell usando DNS.

  1. Si no tiene instalado el controlador apropiado de su tarjeta
     ethernet, ahora sería 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 mío)

       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 línea. Esto se puede hacer usando Netware 3.1x o 4.x

  3.3.9.  Configuración de OS/2 Warp.

  1. Si no tiene instalado el controlador de su tarjeta Ethernet, ahora
     sería un buen momento para hacerlo.

  2. Instale el protocolo TCP/IP, si todavía no lo tiene.

  3. Diríjase a Programms/ TCP/IP (LAN) / TCP/IP Settings.

  4. En 'Network' añada su dirección TCP/IP y ponga como máscara de red
     (Netmask) 255.255.255.0

  5. En 'Routing' presione 'Add'. Ponga el Type en 'default' y teclee la
     dirección IP de su servidor Linux en el campo 'Router Address'.
     (192.168.1.1).

  6. Ponga la misma dirección 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 máquina.

  9. Debe de hacer un ping al servidor Linux para comprobar la
     configuración 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.  Configuración de otros sistemas.

  Se deberían 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 configuración a
  ambrose@writeme.com.

  3.4.  Configuración de la política de IP Forwarding.

  Llegados a este punto ya debería de tener instalados el núcleo y demás
  paquetes requeridos, así como los módulos cargados. También, la
  dirección IP, la pasarela, y el DNS deberían estar configurados en
  todas las OTRAS máquinas.

  Ahora, la única cosa que queda por hacer es usar ipfwadm para reenviar
  los paquetes apropiados a la máquina 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 sección ``'' y las páginas man de
  ipfwadm para más 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 números dependiendo del tipo de su
  subred, e yyy.yyy.yyy.yyy es su dirección 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 , tendría 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 podría añadir bien -V 192.168.1.1 o bien -W eth0
  para asegurar que los paquetes enmascarados vienen a través del
  interfaz del sistema apropiado. Si quiere estar seguro a conciencia
  (también conocido como paranoia justificable) entonces querrá hacer
  esto.

  Puesto que bootp solicita paquetes que vienen sin una dirección IP
  válida el cliente no sabe nada sobre ello, para gente con un servidor
  bootp en la máquina 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

  También puede hacerlo máquina por máquina. Por ejemplo, si quiere que
  la 192.168.1.2 y la 192.168.1.8 tengan acceso a Internet, pero no las
  otras máquinas, debería 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 máscara de red en lugar del valor,
  por ejemplo: 192.168.1.0/255.255.255.0

  Lo que parece ser un ERROR común es poner como  primer comando :

       ipfwadm -F -p masquerade

  NO haga que su política por defecto sea masquerading de esta forma
  alguien puede manipular su ruta y será capaz de entrar a través su
  pasarela, ¡¡usándola para enmascarar su identidad!!

  De nuevo, puede añadir estas líneas al fichero /etc/rc.local, o al
  fichero rc que prefiera, o hágalo manualmente cada vez que necesite
  ip_masq.

  Por favor lea la sección ``'' para una guía detallada de ipfwadm.

  3.5.  Comprobación de IP Masquerade.

  Después de todo este duro trabajo, es la hora hacer un intento.
  Asegúrese de que la conexión a Internet del servidor Linux está bien.

  Puede intentar navegar por algún sitio web de '¡¡¡INTERNET!!!' en sus
  OTRAS máquinas, y ver si lo consigue. En su primer intento le
  recomiendo usar una dirección IP en vez de un nombre de máquina,
  porque la configuración 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 página 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 están totalmente acreditadas por la gente que invierte su tiempo en
  hacer que esta maravillosa prestación funcione.

  4.  Otras características de IP Masquerade y soporte de programas.

  4.1.  Problemas con IP Masquerade.

  Algunos protocolos no funcionarán adecuadamente con masquerading
  porque presuponen cosas sobre números de puerto; --o lo impiden datos
  cifrados en sus cadenas de información sobre direcciones y puertos--
  estos últimos protocolos necesitan un proxy específico en el código
  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 práctica estándar 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 réplicas)--. Si desea tener algún nivel de autorización en
  conexiones entrantes puede usar TCP wrappers o Xinetd sobre redir (0.7
  o superior) para permitir sólo direcciones IP específicas, o usar
  alguna otra herramienta. El TIS Firewall Toolkit es un buen lugar para
  buscar herramientas e información.

  Se puede encontrar más detalles en http://ipmasq.home.ml.org.

  4.3.  Programas cliente soportados y otras notas de configuración.

  La siguiente lista no será mantenida durante más tiempo.
  remítase a http://masqapps.home.ml.org para saber qué aplicaciones
  funcionan a través de un servidor Linux con IP masquerading y a
  http://ipmasq.home.ml.org/ para más detalles.

  Generalmente, las aplicaciones que usan TCP y UDP deberían de
  funcionar.  Si tiene alguna sugerencia sobre aplicaciones que no son
  compatibles con IP Masquerade, por favor envíeme correo electrónico
  con el nombre del cliente y una breve descripción.

  4.3.1.  Clientes que funcionan

  Clientes Generales

     HTTP
        todas las plataformas soportadas, navegadores web.

     POP & SMTP
        todas las plataformas soportadas, clientes de correo
        electrónico.

     Telnet
        todas las plataformas soportadas, sesión remota.

     FTP
        todas las plataformas soportadas, con el módulo ip_masq_ftp.o
        (no todos los servidores funcionan con ciertos clientes; por
        ejemplo algún 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),
        navegación 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 módulo ip_masq_irc.o

     Clientes Gopher
        todas las plataformas soportadas.

     clientes WAIS
        todas las plataformas soportadas.

  Clientes Multimedia

     Real Audio Player
        Windows, envío de audio por red, con el módulo ip_masq_raudio
        cargado.

     True Speech Player 1.1b
        Windows, envío de audio por red.

     Internet Wave Player
        Windows, envío de audio por red.

     Worlds Chat 0.9a
        Windows, programa Cliente-Servidor 3D de conversación.

     Alpha Worlds
        Windows, programa Cliente-Servidor 3D de conversación.

     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 conexión, 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 módulo 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 sección ``'')

  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, sólo funciona si
        es cliente pero no servidor.

     Socket Watch
        usa ntp - protocolo de tiempo por red.

     Linux net-acct package
        Linux, paquete de administración de cuentas de red.

  4.3.2.  Clientes que NO funcionan

     Intel Internet Phone Beta 2
        Conecta pero la voz viaja en una dirección (sale) sólo.

     Intel Streaming Media Viewer Beta 1
        No puede conectar con el servidor.

     Netscape CoolTalk
        No puede conectar con el lado opuesto.

     talk, ntalk
        no funcionarán - requieren que sea escrito un proxy en el
        núcleo.

     WebPhone
        No puede funcionar por el momento (asume direcciones no
        válidas).

     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 código 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 máquinas.

  ·  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.  Administración de cortafuegos IP con ipfwadm .

  Esta sección proporciona una guía más exhaustiva del uso de ipfwadm.

  Esta es una configuración para un sistema de cortafuegos/masquerade
  detrás de un enlace PPP con la siguiente dirección PPP estática. 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 también como ruta
  relleno y/o masquerading.  ¡Todo aquello no explícitamente 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 tráfico 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 "añadir" a los valores existententes de la
  norma, así cualquier restricción necesita venir antes de las normas
  generales. Por ejemplo (sin probar):

  Usando normas -I. Probablemente es la más rápida pero sólo detiene las
  máquinas locales, el cortafuegos puede todavía acceder a sitios
  "prohibidos". Por supuesto le puede interesar permitir esa
  combinación.

       # 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. Más lento porque los paquetes van primero a través
  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 más lento que -I y esto todavía solo
  detiene a las máquinas enmascaradas (por ejemplo: las internas), el
  cortafuegos puede todavía 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 más 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 elección es
  más que otra cosa personal y de documentación.

  4.5.  IP Masquerade y llamada bajo demanda ( Dial On Demand ).

  1. Si le gustaría activar su red automáticamente 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 máquinas clientes e iniciar una sesión web, telnet o
     ftp.

  4. diald detectará peticiones entrantes, luego llamará a su ISP y
     establecerá la conexión.

  5. Hay un tiempo de espera que ocurrirá con la primera conexión. Esto
     es inevitable si esta usando un módem analógico. El tiempo dado
     para establecer el enlace entre el módem y la conexión PPP causará
     que su programa cliente termine. Esto puede ser evitado si esta
     usando un conexión RDSI. Todo lo que necesita hacer es terminar el
     proceso actual en el cliente y reiniciarlo.

  4.6.  Reenvío de paquetes ipautofw .

  ftp://ftp.netis.com/pub/members/rlynch/ipautofw.tar.gz es un
  transportador genérico de TCP y UDP para masquerading de Linux.
  Generalmente para utilizar un paquete que requiera UDP necesitará
  cargar un módulo específico de ip_masq; ip_masq_raudio,
  ip_masq_cuseeme, ... ipautofw actúa de una forma más genérica, enviará
  cualquier tipo de tráfico incluído aquel que los módulos específicos
  no envían. Esto puede crear un agujero de seguridad si no se
  administra correctamente.

  5.  Varios.

  5.1.  Obtención de ayuda.

  Por favor NO INTENTE enviarme correo electrónico 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 página web. En su lugar, para enviar sus dudas
  diríjase 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/ debería de tener suficiente información
     para montar IP Masquerade.

  ·  Unirse a la lista de correo de IP masquerade (recomendado)

     Para suscribirse, envíe un mensaje electrónico con el tema
     "subscribe" (sin comillas) a masq-request@indyramp.com

     Para desubscribirse, envíe un correo electrónico 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
     núcleos 2.x (si está usando un núcleo 1.3.x ó 2.x)

  ·  http://ipmasq.home.ml.org/ipmasq-HOWTO-1.2.x.txt si está usando un
     núcleo antiguo.

  ·  http://www.indyramp.com/masq/ip_masquerade.txt contiene algo de
     información general.

  ·  http://www.xos.nl/linux/ipfwadm/ contiene las fuentes, binarios,
     documentación, y otra información 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 también tiene
     mucha información útil sobre las redes en Linux.

  ·  http://www.caldera.com/LDP/HOWTO/ISP-Hookup-HOWTO.html (-- N del T:
     y
     del T:
     información de como conectar su servidor Linux a Internet.

  ·  http://www.caldera.com/LDP/HOWTO/Ethernet-HOWTO.html es una buena
     fuente de información sobre montar una LAN con ethernet.

  ·  También 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 núcleo.

  ·  Otros http://www.caldera.com/LDP/HOWTO/HOWTO-INDEX-3.html

  ·  Envíe correo al grupo de noticias de USENET:
     comp.os.linux.networking

  5.2.  Agradecimientos.

  ·  Gabriel Beitler, gbeitler@aciscorp.com contribuyó en la sección
     ``'' (Configuración de Novell)

  ·  Ed Doolittle, dolittle@math.toronto.edu sugirió la opción -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 sección ``'' (Configuración de Windows 95).

  ·  Ken Eves, ken@eves.com por la PUF que proporcionó información
     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 versión de IP Packet Filtering e IP Masquerading HOWTO, el cual
     hace de este HOWTO un documento mejor y con más profundidad técnica
     en las secciones ``'', ``'', y otras.

  ·  Keith Owens, kaos@ocs.com.au proporcionó una excelente guía de
     ipfwadm en la sección ``'' corrigió la opción 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 ``'' (configurción de MacTCP y Open Transport).

  ·  Harish Pillay, h.pillay@ieee.org proporcionó la sección ``''
     (llamada bajo demanda usando diald).

  ·  Mark Purcell, purcell@rmcs.cranfield.ac.uk proporcionó la sección
     ``'' (ipautofw)

  ·  John B. (Brent) Williams, forerunner@mercury.net proporcionó la
     sección ``'' (configuración Open Transport)

  ·  Enrique Pessoa Xavier, enrique@labma.ufrj.br en la sugerencia de
     configuración de bootp.

  ·  A los desarrolladores de Masquerade por esta gran prestación:

  ·  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, hágamelo saber)

  ·  A todos los usuarios que enviaron críticas y sugerencias a la lista
     de correo, especialmente a los que informaron de errores en la
     documentación y los clientes que son soportados y los que no.

  ·  Pido disculpas si no he incluido información que algún 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 información que me
     envían en el COMO.  Le agradezco su esfuerzo, y espero que
     comprenda mi situación.

  5.3.  Referencias.

  ·  PUF de IP masquerade por Ken Eves.

  ·  Archivos de la lista de correo de IP masquerade por Indyramp
     Consulting.

  ·  Página de ipfwadm de X/OS.

  ·  Diversos COMOs de Linux sobre redes.

  6.  Anexo de la traducción.

  6.1.  Traducción.

  La traducción ha sido realizada por XosÉ Vázquez, en el grupo INSFLUG.
  Agradezco a Pablo Fábrega pfabrega@arrakis.es el repaso que le ha dado
  a este documento en busca de errores. Le agradecería que me enviase
  las imperfecciones que contenga este documento.  Críticas no
  constructivas a > dev/null :-)

  6.2.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  6.3.  Fuentes de información en español

  ·  http://slug.ctv.es/SLUG, grupo de usuarios de Linux.

  ·  http://www.infor.es/LuCAS LuCAS, las guides y otros documentos en
     español.

  ·  http://mercury.chem.pitt.edu/~angel/LinuxFocus/Castellano/ Revista
     Linux Focus en castellano.

  ·  Linux en México: 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/, páginas del manual
     (man) en español.

  ·  es.comp.os.linux, grupo de noticias de linux en español.

  ·  Á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.

  ·  Distribución Debian: http://www.es.debian.org

     ftp://ftp.de.debian.org/debian

  ·  Distribución RedHat http://www.redhat.com

     ftp://ftp.redhat.com/pub/redhat

  ·  Distribución Caldera, http://www.caldera.com

     ftp://ftp.caldera.com/pub/

  ·  Distribución Slackware http://www.slackware.org

     Walnut Creek CDROM http://www.cdrom.com

     ftp://ftp.cdrom.com/pub/linux
  ·  El hogar del núcleo, Kernel Org http://www.kernel.org y LinuxHQ
     http://www.linuxhq.com (información 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.  Cómo colaborar

  Existen diferentes proyectos de hispanohablantes relativos a la
  traducción de documentación y programas.

  Si quiere colaborar en algún proyecto es *IMPRESCINDIBLE* que se ponga
  en contacto, con su coordinador :

  ·  INSFLUG, www.insflug.org, traducción de COMOs coordinado por
     Francisco José Montilla, pacopepe@insflug.org.

  ·  LuCAS, traducción de libros coordinado por Juan José Amor
     jjamor@ls.fi.upm.es o en fido 2:341/12.19

  ·  Páginas man, traducción de páginas del manual coordinado por Miguel
     Angel Sepúlveda sepulved+@pitt.edu

  ·  GÑU en español, http://slug.ctv.es/~emelero/, españolización de los
     paquetes de GNU coordinado por Enrique Melero.

     b182@mail.fh-wuerzburg.de

  ·  Grupo de hispanización de Debian, traducción de documentación 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 pequeña 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 algún veterano de ifmail y compañía tiene sug­
  erencias que hacerme. Pues venga, las espero todas en
  jjamor@ls.fi.upm.es o en mi dirección de fido, 2:341/12.19.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      El proceso del correo de Fido en Unix

  2.1.    ¿Qué programas hay que configurar entonces?

  3.      Correo privado (NETs)

  3.1.    Notación «Internet» de las direcciones de Fidonet

  3.2.    Configuración de Sendmail

  3.3.    Configuracion de Sendmail usando macros M4

  3.4.    Configuración de Ifmail

  3.5.    ¿Enviamos un NET?

  3.6.    Acceso de otros usuarios al NET

  3.7.    Traducción automática de códigos ISO a IBM-PC

  4.      Áreas públicas (ECHO)

  4.1.    Retocar ifmail

  4.2.    Activar las áreas en el INN

  4.3.    Otros ficheros de configuración de INN

  4.4.    Intentemos empaquetar y desempaquetar los mensajes

  4.5.    Y probemos a llamar al Boss

  4.6.    Cómo añadir á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.  Introducción

  Me gusta el riesgo. Eso me animó hace tres años a hacerme punto de
  Fidonet por la vía difícil (FrontDoor + FastEcho + GoldED). Luego me
  dio por los sistemas operativos de línea de comandos (Unix sin
  ventanas, ya me entendéis ;-) ). 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 método fácil ...

  Pero configurar el sistema de correo bajo Unix es como mil veces más
  difícil 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 documentación que cada aplicación
  trae, juntarlo todo armoniosamente y finalmente lograr que funcione.
  Confieso que eso me hizo echarme atrás en varias ocasiones... hasta
  que vino la ayuda del cielo.

  Ramón Gutiérrez, antiguo moderador de la (mejor) área de Fidonet,
  R34.LINUX, me pasó todos sus ficheros de su configuración, 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 cómo hacerse punto bajo MS-DOS,
  que igual le interesa a alguien que aun no lo haya hecho ... lo tenéis
  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 buzón del usuario, /var/spool/mail/usuario. Y para
  escribir un NET se usan los programas de correo habituales, eligiendo
  una dirección 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 demás irán 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 entregárselos 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
  artículo, é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 envío al nodo de Fido.

  2.1.  ¿Qué programas hay que configurar entonces?

  Vamos a tener que aprender a tocar la configuración de unos cuantos
  programas.  De la sección anterior se deducen los siguientes:

  ·  Paquete ifmail. Hay que configurar tanto la parte de empaquetado
     (ifpack, iftoss), como la de traducción Internet <-> FidoNet, como
     la del programa de llamada (ifcico).

  ·  Sendmail.

  ·  Servidor de News (INN).

  ·  Además, necesitaréis 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 más el tin).

  O sea, además de entender de qué va esto de hacerse punto (que no es
  poco) habrá que entendérselas con el críptico sendmail.cf y con los
  ficheros de INN.  Si además 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 consigáis enviar y recibir NETs,
  mejor que no paséis la página. Bien, sigamos.

  3.1.  Notación «Internet» de las direcciones de Fidonet

  Antes de entrar en los ficheros de configuración, tengo que haceros
  ver cómo una dirección de Fidonet se expresa en Internet. Es
  importante para las siguientes secciones, así como para saber escribir
  un NET.

  Bien, empecemos. Como sabéis, una dirección de Fidonet contiene
  información de zona, región, net, nodo y opcionalmente punto. Esto se
  nota así: ZONA:REGIÓN_Y_NET/NODO o ZONA:REGIÓN_Y_NET/NODO.PUNTO.

  Por ejemplo, mi dirección de punto es 2:341/12.19 y la del nodo de mi
  BBS, 2:341/12 (nodo que llamamos Boss).

  En Internet, una dirección de nodo se notará como:

       fNODO.nREGION_Y_NET.zZONA.fidonet.org

  o bien:

       pPUNTO.fNODO.nREGION_Y_NET.zZONA.fidonet.org

  Así, mi máquina será conocida en Fidonet como:

       p19.f12.n341.z2.fidonet.org

  Y yo, como usuario de mi máquina 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.  Configuración de Sendmail

  Sobre sendmail podía 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 configuración típica, con conexión a Internet y Fidonet, e
  incluso una pequeña Intranet local.

  Supongamos que vuestra máquina se llama DRAGON, y vuestro dominio
  ficticio (de Intranet) lo habéis llamado, MICASA.ES. Aquí tenéis un
  fichero sendmail.cf que os servirá para mandar correo de la siguiente
  forma:

  ·  usuario@dragon.micasa.es: Entregar directamente al buzón local.

  ·  usuario@micasa.es: Entregar directamente al buzón local (dragon es
     la máquina maestra del dominio micasa.es :-) ).

  ·  usuario@otramaquina.micasa.es: Entregar directamente a la máquina
     remota (se supone que la otra máquina 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 máquina 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 algún problema...

  Por otra parte, si recibís este documento en un formato distinto al
  original (SGML) puede que los caracteres de tabulación que existen en
  sendmail.cf se hayan convertido en espacios. Por desgracia, así no os
  funcionará el fichero, de modo que tendréis que convertir a mano, los
  separadores de las reglas a tabuladores.

  En la línea referente al nodo del proveedor (donde aparece la IP del
  mío, 212.106.192.135) debéis poner la IP del vuestro, claro :-). En la
  línea referente a Fidonet, debéis codificar el nombre del nodo al que
  llamáis. En mi caso, 2:341/12 se traduce a f12.n341.z2 (observad la
  línea del fichero sendmail.cf. Como véis, esto hace la función del
  fichero route.fe en FastEcho u otro procesador de correo de Fido bajo
  DOS: esta línea determina entregar todos los NETs vía el nodo
  elegido). Además, si no tenéis Internet o red local propia, podéis
  comentar las líneas correspondientes de la regla 0.

  Además, debéis modificar la línea "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, debéis reiniciar el
  demonio. Lo mejor es que lo matéis y lo relancéis de nuevo (enviarle
  la señal SIGHUP no funciona en todas las versiones). Hasta que no
  hagáis esto, tu nuevo sendmail.cf no será reconocido. Podéis comprobar
  que lo habéis logrado lanzando el demonio y a continuación ejecutar
  telnet al puerto 25. Debéis ver una referencia a la versión del
  sendmail.cf, BS-3.3 en la línea 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 tenéis algún 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 darán
  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 mayoría de los usuarios de Unix prefieren configurar el sendmail
  con las colecciones de macros M4 que incluye. Reconozco que es la
  forma más flexible y a la vez fácil de entender para configurar este
  programa. Eso sí, si el fichero presentado en la sección anterior os
  vale, mejor es que os saltéis esta sección o posiblemente os volveréis
  locos (¡y no quiero que nadie me acuse de contagiaros nada!).

  Lo que viene a continuación es una contribución recibida de Roberto
  Suárez 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 configuración de sendmail para ifmail puede ser hecha mediante un
  fichero de éstos, y de hecho es lo más fácil. Un fichero sendmail-
  ifmail.mc (el nombre es indiferente) podría ser éste que pongo a
  continuación. Está casi copiado del que viene en el paquete
  ifmail-2.14-tx8.8.tar.gz, de Pablo Saratxaga. La «primera versión» que
  hice se la mandé al propio Pablo para que la revisara, y en su
  contestación me mandó un fichero .mc completísimo y muy bien explicado
  que es el que pongo aquí. Así que todo el mérito es suyo :-) Yo sólo
  me limito a transcribir lo que me mandó él (si hay algún fallo en los
  comentarios o en las explicaciones, eso sí que será obra mía O:-))

  Los datos son imaginarios, necesitarás cambiarlos para tu
  configuración. Otra cosa: este fichero lo he probado con sendmail
  8.9.1; con la versión 8.8.x hay un par de líneas que no funcionan. De
  todos modos, si tienes una distribución más 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 estás conectado a Internet las 24 horas del día
  define(`SMART_HOST',            ``[smtp.de.tu.proveedor.com]'')

  dnl ### La dirección 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, déjalo así;
  dnl ### cámbialo 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 conexión 24h a Internet; si tienes
  dnl ###  este tipo de conexión, puedes quitar estas líneas)
  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 línea que viene a continuación define dos ficheros
  dnl ### de alias para sendmail; el segundo (/etc/mail/majordomo)
  dnl ### sólo hace falta si usáis majordomo como gestor de listas
  dnl ### de correo; como no es mi caso (y tampoco el de la mayoría
  dnl ### de la gente), he cambiado la línea 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 través del mailer
  # smtp.z2.fidonet.org, www.z2.fidonet.org, etc
  CFfidonet ns ns2 mail smtp www ftp

  # Esto es un pequeño 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 rutarán a través del FIDO_SMART_HOST
  R$* < @ $+ .ftn . > $*                  $#ftn $@ FIDO_SMART_HOST $: $1 < @ $2 .ftn > $3

  # Si no tienes conexión permanente a Inet, comenta esta línea
  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 línea 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 fácilmente 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
  distribución 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 líneas 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 máquina. La
  tercera línea («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 máquina conectada directamente a Inet,
  los nombres locales no serán reales). Por ejemplo, el mío 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
  través 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 través del nodo 13:348/1, que en
  formato Inet es f1.n348.z13. Esto sólo hace falta para rutas
  alternativas a las normales, ya que todo el correo, por defecto, se
  encaminará a través del smtp que hayas definido (en el caso de correo
  Inet) o a través de tu uplink (en el caso del correo para fidonet.org
  y demás redes FTN). Otro ejemplo: suponiendo que además de ser punto
  de Fido, eres punto de FiCNet y de SubNet:

  En realidad, en mi caso (y en el de la mayoría, me imagino) no harían
  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 sólo tienen un verdadero sentido cuando
  rutéis varias redes a distintos uplinks. En el resto de los casos,
  podéis pasar sin ellas. Sólo que me pareció una cosa interesante :-)
  Quizás 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, sólo tenéis que hacer:

       makemap hash mailertable < mailertable

  (suponiendo que estáis 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 línea no es para el correo Fido, sino más bien para el de Inet.
  Sirve para enmascarar el correo saliente con vuestra dirección de
  Inet, en vez de la dirección local. Supongamos que el usuario que usas
  es «robe» (como es mi caso :-)), y tu dirección de Internet es «rss-
  trgn@usa.net» (como también es mi caso :-)). Crearías 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
  máquina para Inet, será reescrito de tal forma que parezca que procede
  de rss-trgn@usa.net. Sí, también aparecerá así en el «From» del correo
  Fido que envíes, pero no te preocupes: ifmail se encargará de que el
  campo «Reply-To» vaya con tu dirección 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 líneas 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 más que crear un fichero «.procmailrc» con las recetas adecuadas
  en tu directorio, sin el «.forward» que haría falta en otro caso.
  Además, en las versiones 8.9.x de sendmail, el fichero .forward no
  está muy bien visto, con lo que te ahorrarías 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 línea, y si usáis Sendmail 8.9.x (mi caso), podéis 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 también controla
  aspectos de relay. Un fichero de ejemplo (el que me mandó P.S. O:-))
  sería é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 demás:

  makemap hash access < access

  ·  Kpirateo hash -o /etc/pirateo

  Esta línea 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 dirección de Inet no salga al mailer y
  luego vuelva, sino que se entregue directamente en la máquina. 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 dirección
  Mail.Delivery.Subsystem@<dirección de tu uplink>. Durante una semana o
  así, hubo un net que «rebotaba» constantemente entre mi uplink y mi
  máquina con una dirección parecida, y era rechazado por ambos
  extremos. Añadiendo una línea:

       Mail.Delivery.Subsystem@f105.n348.z13.fidonet.org       postmaster

  Se conseguiría que este tipo de correo fuera al postmaster, es decir,
  al root, y no molestara a mi ya atribulado Sysop :-) Pero bueno, como
  decía antes esto no lo he probado todavía ... y no tengo ganas de
  crear un pequeño caos para probarlo, sinceramente ;-)

  En fin ... como antes, recomiendo encarecidamente que creéis un
  fichero como éste con vuestra dirección email. En una instalación de
  ifmail que he estado haciendo recientemente, sendmail buscaba esta
  dirección 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 algún fallo que tuve al
  configurar ifmail o sendmail, no porque en realidad haga falta todo
  esto O:-)

  Después de todo esto, hay que compilar el fichero sendmail-ifmail.mc
  que habéis 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 atención y la ayuda que me ha
  brindado en la confección de este capítulo :-)

  Nota: Este capítulo ha sido escrito por Roberto Suárez Soto, a quien
  podéis localizar para lo que sea en rss-trgn@usa.net.

  3.4.  Configuración 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 usáis RedHat os aconsejo que empecéis por instalaros
  el paquete rpm de ifmail (versiones tx) que podréis encontrar en
  cualquier mirror de sunsite.unc.edu. Si no usáis RedHat, aun os debo
  recomendar el ifmail versión tx en formato tar, ya que está mucho
  mejor preparado para FidoNet que el ifmail original. Una vez instalado
  podréis configurar vuestros ficheros, que estarán en /etc/ifmail.

  Básicamente 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.  Tenéis otras que son del estilo de las de FrontDoor (o incluso
  más sencillas).  Aquí os dejo un fichero ejemplo config comentado para
  que hagáis 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 estáis deseando de ver que lo que habéis configurado sirve
  para algo. Yo también: si no os funciona, pasar al siguiente capítulo
  sería inútil...

  Bien, en principio, enviar un NET es tan simple como coger vuestro
  programa de correo preferido y escribirlo. Ya sabéis, utilizando una
  dirección de Fido al estilo Internet.

  Una prueba que podéis hacer es mandarte un NET a ti mismo, para que os
  hagáis la idea de cómo 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 Pérez.

  Para enviar el NET, dirigid el mensaje a
  Juan.Perez@p89.f12.n341.z2.fidonet.org. Podrán 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 estén 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 habéis olvidado de instalar ifmail, o no
  lo habéis hecho correctamente (problemas de permisos, etc).

  3. El mensaje no se os es devuelto, pero se os queda en la cola de
     Internet (lo veréis porque aparece en el comando mailq, indicando
     que está encolado por algún 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!, después de arreglarlo, no os olvidéis 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í (deberíais 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 vía ifmail, o sea, que ha entrado en un
  paquete de Fido. Eso lo comprobaremos ahora.
  Si habéis conseguido que se entregue el correo a ifmail, podéis
  comprobar que se ha creado un paquete mirando el directorio
  /var/spool/ifmail/fidonet. Allí deberíais 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 podéis ver cómo 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 máquina 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
  sección de este documento). Si ifunpack aparenta no hacer nada, probad
  a ejecutar cambiar la extensión del fichero (de .out a .pkt) en el
  directorio /var/spool/ifmail/inb y reejecutad ifunpack de nuevo. El
  comportamiento depende de la versión que hayáis instalado.

  Una vez hechas estas pruebas, vamos a intentar llamar al Boss. Para
  ello, mandadle un mensaje como hemos hecho antes. A continuación, os
  recomiendo que copiéis el script ifpoll que viene en la documentación,
  en el directorio donde están los binarios de ifmail. Este script está
  para empaquetar los mensajes y llamar cíclicamente a tu Boss hasta
  conseguir una conexión.

  Editad el fichero ifpoll, poniendo los datos de vuestro nodo. En
  particular, necesitaréis tocar las líneas 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, tenéis 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 tendréis que poner
  al principio del fichero anterior, las siguientes líneas, 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 preocupéis por el teléfono del Gate de Europa: el encaminamiento
  previsto en esta configuración impedirá cualquier llamada que no sea a
  vuestro boss local.

  A continuación, ejecutad ifpoll. Vigilad los logs del sistema.
  Empezarán a aparecer mensajes. Os muestro aquí un log de conexión
  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 véis, se parece mucho a un log de conexión de FrontDoor. Así que
  supongo que lo entenderéis.

  Si todo va bien, en el log aparecerá, después de la llamada, la parte
  correspondiente al desempaquetado: vigilad el log, pues igual surge
  algún error. De momento, como no habéis configurado las news, todos
  los mensajes de ECHO se perderán, pero sí se entregarán los NETs. Todo
  esto lo veréis con claridad en los logs.

  Mucho ojo: vuestro sistema es desde ahora mismo una pasarela entre
  Internet y FidoNet. O sea, si alguien envía un mensaje al usuario UUCP
  de vuestro sistema, ifmail entenderá que la primera línea 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 típico 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 capítulo.

  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 dirección
  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 mío 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 relación 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 relación 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 través 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
  característica, 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 modificáis el fichero /etc/aliases, no os olvidéis de ejecutar a
  continuación el comando newaliases.

  3.7.  Traducción automática de códigos ISO a IBM-PC

  Como sabéis, en sistemas Unix se utiliza la tabla de códigos
  ISO-8859-1 para extender el ASCII a caracteres especiales del idioma,
  como acentos y eñes. En cambio, en sistemas basados en MS-DOS se suele
  utilizar la tabla de la ROM del IBM-PC.

  Posteriormente contaré cómo programar automáticamente la conversión
  para las áreas de ECHO. Ahora os diré cómo conseguir ésta en los Nets,
  un asunto que tenía 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 añadir a vuestros
  mensajes nuevas cabeceras, usad algún programa de correo avanzado como
  Pine). Esta cabecerá hará que ifmail (versión tx) los convierta
  automáticamente de códigos ISO a IBM-PC. En caso de recibir mensajes
  de fuera, siempre que se incluya la cabecera de Fido CHRS: IBMPC 2 se
  producirá automáticamente una conversión a vuestra tabla ISO.

  4.  Áreas públicas (ECHO)

  Preparáos, porque viene lo peor :-) No obstante, si habéis 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 más
  moderno, INN. La gente dice que C-News es más sencillo. Si elegí INN
  es porque viene como paquete estándar de la distribución RedHat de
  Linux.

  Uno y otro, utilizan ficheros de configuración parecidos. INN es más
  potente pero más lioso cuando hay problemas. Intentaremos ver cómo
  configurarlo todo para recibir el correo de Fido en las news. Antes,
  os recomiendo que os iniciéis en el mundo de los servidores de News.
  Una lectura interesante es la guía de administración de redes, de Olaf
  Kirch, que también ha traducido el proyecto LuCAS.

  Si instaláis el paquete de la distribución de RedHat, os meterá
  archivos de configuración en /etc/news, ficheros de grupos activos en
  /var/lib/news y os creará el directorio /var/spool/news con algún
  contenido.

  4.1.  Retocar ifmail

  En el capítulo anterior nos olvidamos de las áreas de ECHO, con lo que
  teníamos el fichero de áreas vacío. Vamos a rellenarlo ahora.

  Para ello, añadid líneas como esta:

       AVISOS.R34                fido.r34.avisos             fido

  En cada línea, 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 distribución que le vamos a dar (en
  general, se le da fido frente a world que se le da a los grupos de
  USENET).

  Si usáis la versión tx de ifmail, y escribís con acentos y eñes, os
  recomiendo esta línea 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 exportarán con códigos 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 tenéis que tener en cuenta esto, ya que como os
  dije, la cabecera de FIDO CHRS es interpretada automáticamente por
  vuestro ifmail y prácticamente cualquier otro procesador de correo
  Fido bajo Unix.

  Una ultima cosa: aseguráos de que el usuario que ejecuta ifmail (fnet,
  fido o el que sea) también pertenece al grupo news. Si no es así,
  podría fallar el envío de mensajes de ECHO al no poder acceder a
  ficheros generados por el gestor de news elegido.

  Nota: En versiones más recientes de ifmail-tx existen dos parámetros
  del fichero /etc/ifmail/config que establecen las traducciones de
  tabla de caracteres por defecto. Comprobad si en vuestra versión
  original del fichero aparecen los parámetros:

  ______________________________________________________________________
  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 línea a añadir sería:

       fido.r34.avisos 0000000001 0000000001 y

  Además, si la añadimos al fichero /var/lib/news/newsgroups como sigue:

       fido.r34.avisos            Avisos de R34

  tendremos la descripción visible en programas lectores como tin o xrn.

  Ojo, no borréis de /var/lib/news/active o /var/lib/news/newsgroups las
  áreas predefinidas (test, control, junk, to y puede que alguna más) ya
  que posiblemente la versión que hayáis instalado del inn las necesite
  y no funcione si desaparecen.

  4.3.  Otros ficheros de configuración 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 líneas:

     ___________________________________________________________________
     localhost:
     dragon.micasa.es:
     ___________________________________________________________________

  2. expire.ctl : Fichero para expiración automática de artículos.
     Permite borrar los artículos más antiguos. No me voy a extender
     aquí en cómo 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 recibáis 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 asignéis a la entrada Organization: será el que se
     utilice como línea Origin en Fidonet.
  4. nnrp.access: Este fichero debe dar autorización total de lectura y
     escritura de artículos, al menos a vuestra máquina. Lógico, ¿no?.
     Valdrán unas líneas como:

     ___________________________________________________________________

     localhost:Read Post:::*
     dragon.micasa.es:Read Post:::*
     ___________________________________________________________________

  Si queréis podéis cambiar la palabra dragon por * y así daréis acceso
  a todas las máquinas de vuestro dominio local. Será muy interesante si
  tenéis varios sistemas en red local. :-)

  5. newsfeeds: Este es el fichero más importante. Es con el que se
     decide qué grupos se exportan, y a qué nodo. Es el que permite, que
     podáis tener grupos locales, grupos de news en USENET (que se
     exportarán al servidor de news de vuestro proveedor, mediante SUCK)
     y áreas de Fido (que se exportarán 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 configuración antigua, podéis
  empezar por llamar al script anterior pero con el parámetro stop.)

  Una vez hecho esto, escribid con un lector de News en algún grupo
  existente. Si escribís a un grupo de Fido deberá generarse un fichero
  f12.n341 (o con otro nombre, según sea vuestro Boss) en el directorio
  /var/spool/news/out.going. Dicho fichero contiene referencias al
  mensaje que acabáis de escribir. Si lo hacéis a un grupo de USENET,
  aparecerá un fichero news.proveedor.es, y si lo hacéis 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 documentación de ifmail hay un script muy bueno
  para empaquetar los mensajes para Fido y prepararlos para su envío.
  Dicho script se llama send-ifmail y podéis instalarlo en /etc/news.
  Según qué paquete de ifmail hayáis 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 hagáis que el
  usuario de ifmail (fnet) pertenezca también al grupo news, y así os
  ahorraréis algunos problemas con los permisos.

  La ejecución 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 continuación ifpack se producirá el fichero definitivo,
  comprimido, de nombre 0155000c.XY0 siendo XY las iniciales del día de
  la semana en Inglés. Este fichero quedará en el directorio
  /var/spool/ifmail/fidonet/.

  Finalmente, cuando se llame a ifcico (vía 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
  parámetro 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 más o menos graves. Puede deberse a una
     configuración incorrecta.

  2. Que se entreguen al grupo junk de news. Eso significa que INN no
     reconoce los grupos, y se debe a que hay algún problema con la
     definición de los grupos activos, o los nombres que figuran en el
     fichero de áreas. También, con un paquete procedente del Boss,
     puede deberse a algún 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 configuración 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 habéis completado los pasos anteriores, empaquetando y
  desempaquetando correo de prueba, dirigid mensajes a las áreas locales
  de tu BBS y algún 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 algún 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 envía,
  pero no genera ningún error.

  Esto me ha producido especiales dolores de cabeza con el envío de
  mensajes ECHO: ifmail los ignoraba sin decir nada. Esto era porque no
  había 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é más decir. Si funciona, enhorabuena. Si no va, creo
  que los logs deberían daros suficiente información como para
  solucionarlo. Sé que es complicado (¡a mí me lo váis a decir!) y que
  hay muchos archivos de log para vigilar, pero poco más podemos hacer
  que trabajar cada uno por su cuenta...

  4.6.  Cómo añadir áreas nuevas

  Recordaréis que con FastEcho (bajo DOS) se podía tener creación
  automática de áreas cuando llegaba algún mensaje para áreas no
  definidas. Aquí aun no lo he conseguido, con lo que el proceso de
  suscripción al área conllevará algunas operaciones manuales:

  ·  Añadir el área al fichero /etc/ifmail/Areas, con la notación
     indicada antes.

  ·  Añadir el grupo de news al fichero /var/lib/news/active como se ha
     indicado antes.

  ·  Añadir el grupo de news al fichero /var/lib/news/newsgroups como se
     ha indicado antes.

  Si el área es de USENET, en lugar de añadirla al fichero Areas de
  ifmail, hay que añadirla, por ejemplo, al de configuración de SUCK.

  4.7.  Algunas ideas sobre Suck

  Suck es posiblemente el programa más 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 integración de Internet (news) con
  Fido (áreas de ECHO). Así de paso soy coherente con haberos facilitado
  la conexión entre el correo de Internet y el de Fido, con sendmail.

  Por el momento, suck no se distribuye como paquete de mi distribución
  (RedHat). Ignoro si se distribuye como parte de otras como Debian o
  Slackware, pero voy a suponer que os habéis bajado el archivo con las
  fuentes, y concretamente la versión que yo uso (suck-3.4.1.tar.gz).
  ¿Os parece antiguo y no lo encontráis? Pues lo siento, este es uno de
  los programas que ya ofrecen toda la funcionalidad de interés en una
  versión de principios de 1997, así que en ningún momento me ha
  parecido necesario migrar a otra más reciente.

  Lo primero que tenéis que hacer es descomprimirlo y en el directorio
  que os va a generar, ejecutar el script de preparación 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 más avispados habrán notado que hay en la distribución un
  directorio llamado «Spanish.docs». ¡Sí!, en efecto, trae toda la
  documentación (incluidas las páginas del manual) traducidas a nuestro
  idioma. De modo que no deberá liaros mucho este programa ...

  Básicamente, configurarlo es tan simple como crear un fichero con los
  grupos que quieres bajarte (un grupo por línea, seguido de un número
  0, que suck alterará cada vez que contacte con el servidor de noticias
  de vuestro proveedor). Por ejemplo, este fichero podría ser:

  ______________________________________________________________________
  comp.os.linux.announce 0
  es.comp.os.linux 0
  esp.comp.so.linux 0
  ______________________________________________________________________

  Este fichero deberíais guardarlo entre las librerías 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 mío se
  llama /var/lib/news/sucknewsrc.noticias.ibernet.es.

  Luego, hay que ejecutar los programas que trae con una serie de
  parámetros de forma que, primero se conecte al servidor de noticias de
  vuestro proveedor y recoja las noticias pendientes introduciéndolas en
  un directorio temporal (tal como /var/spool/news/in.coming/tmp). A
  continuación 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 debería enviar los
  artículos que habéis escrito vosotros al servidor de noticias de
  vuestro proveedor. Esto se hará correctamente si se ha configurado
  bien el archivo /etc/news/newsfeed.

  Lo más 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.  Además,
  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
  máquina.  Cuando ésta no forma parte permanente de Internet, los
  artículos podrían ser rechazados. Este script es una simple orden de
  sed que elimina las líneas 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 acompañe!

  4.8.  Un lector de noticias para Fido

  Ya os dije antes que para leer las áreas de ECHO valía 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 más cómodos y adecuados para esta
  red... Es cierto que se anuncia desde hace tiempo un GoldED para
  Linux, pero muy probablemente manejará bases de mensajes clásicas 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 además se han
  añadido mejoras orientadas a Fido: coloración automática de las
  acotaciones, respuestas personalizadas, líneas de cabecera X-Comment-
  To que a ifmail le sirven para dirigir un mensaje público a una
  persona, etc.

  Instaláos esa versión y fijáos en los ficheros de configuración que
  trae de ejemplo para Fido. Acabará siendo vuestro lector preferido, ya
  veréis :-)

  4.8.1.  Slrn

  Además de tin, también 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 «puntuación», que marque con puntuación máxima
  los mensajes dirigidos a ti. Estos mensajes aparecerán con un símbolo
  de admiración («!») a la izquierda.

  Para esto, hace falta añadir unas líneas 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 crearíamos un fichero .slrn-score tal que así:

  ______________________________________________________________________
  [fido.*]
  score: 9999
  X-Comment-To: Perico\ Delos\ Palotes
  ______________________________________________________________________

  La primera línea especifica el ámbito de la puntuación (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 sección sobre slrn ha sido escrita por Roberto Suárez Soto,
  a quien podéis localizar para lo que sea en rss-trgn@usa.net.

  5.  Referencias

  Voy a dar aquí algunos enlaces de Internet donde podéis encontrar más
  información sobre el tema.

  ·  ftp://sunsite.rediris.es/pub/Linux/system/Mail/transport/fido/, un
     servidor de ftp donde encontraréis 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 podréis 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 cómo hacerse punto de Fidonet con el
     software bajo MS-DOS.

  ·  http://lucas.hispalinux.es/, servidor principal del Proyecto LuCAS,
     donde encontrarás todo tipo de documentación sobre Linux en nuestro
     idioma.

  ·  Si sigues teniendo problemas después de leer todo esto ;-) aun hay
     más documentación sobre ifmail:
     ftp://svpop.com.dist.unige.it/pub/Linux/ILS/Ifmail-HOWTO.tar.gz. Lo
     siento, aun nadie lo ha traducido al castellano... ¿quién se anima?
     ;-)

  Si queréis 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 Jiménez Jiménez, quien, siendo el punto de Fidonet
     2:345/207.7, me dedicó un extenso mensaje acerca de cómo había
     configurado su sistema. Actualmente esa dirección pertenece a otra
     persona, y no sé qué ha sido de Ángel :-(

  ·  A Ramón Gutiérrez Camus, que fue quien me pasó sus ficheros de
     configuración con los que empecé a trabajar.

  ·  A Urko Lusa, quien también se ha montado un tinglado parecido y me
     ha dado algunos consejos (y además es un experto en mezclar
     armoniosamente los juegos de caracteres para que todo el mundo se
     entienda :-) ).

  ·  A Roberto Suárez Soto, quien ha escrito un par de capítulos de este
     documento.

  ·  A todos aquellos que me han pasado desde la primera versión del
     documento, allá por Abril; sus sugerencias que han contribuido a
     ampliarlo.

  ·  Al Centro de Cálculo de la Facultad de Informática de la
     Universidad Politécnica de Madrid, por poner a nuestra disposición
     un fichero de configuración del sendmail que más o menos parecía
     fácil de entender y modificar.

  ·  A Pablo Saratxaga, quien ha hecho las versiones tx de ifmail.

  ·  Y, por supuesto, a Enrique López, 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 más :-)

  7.  Historial de revisiones

  Este documento está vivo. ¡Se mueve! :-) A continuación os muestro la
  historia de revisiones que ha sufrido este documento, para vuestra
  información:

  ·  Rev. 1.1 a 1.7: Versiones iniciales de ifmail-COMO, poco a poco fui
     añadiendo mi experiencia personal con los distintos paquetes de
     software, haciendo el documento cada vez mayor :-) La revisión 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 tenían
     comportamiento ligeramente distinto. En esta versión se reflejaron
     estos cambios.

  ·  Rev. 1.9: Fue presentada el 25 de diciembre de 1998. Se añaden
     nuevas secciones aportadas por Roberto Suárez Soto, y se mejoran
     las demás.

  ·  Rev. 1.10: Presentada el 6 de diciembre de 1999. Se realizan
     algunas correcciones estilísticas recomendadas por el grupo
     INSFLUG, al tiempo que se actualiza el documento con nuevas
     peculiaridades detectadas en el software utilizado para la versión
     6.0 de RedHat.  Es el documento para el nuevo milenio :-)

  8.  Notas sobre el Copyright y todo eso

  Este documento es ... Copyleft, faltaría más ;-) Puede ser distribuido
  libremente bajo licencia GNU. En consecuencia, podéis modificar lo que
  queráis excepto esta sección que habla de los autores. De todas
  formas, si lo modificáis será positivo decírmelo si queréis que
  vuestra aportación la vea más 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
  Suárez Soto, tal como se indica en las correspondientes secciones.

  El documento forma parte del LDP español, también 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 distribución es
  http://www.insflug.org. Su principal réplica se encuentra en
  http://lucas.hispalinux.es/.

  Aunque este COMO ya tiene de todo lo que quería ponerle, aun no lo voy
  a considerar terminado. Principalmente porque tendrá fallos que me
  tenéis que comentar los lectores. Además, siempre estará abierto a
  ampliaciones que queráis proponer. Eso sí, prefiero que las
  ampliaciones me las deis hechas :-)

  Por último, declino toda responsabilidad acerca de los daños 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 informático; así como sobre vuestra cordura. Tampoco
  me hago responsable de ningún 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 información básica sobre el sistema
  operativo Linux, incluyendo una explicación de Linux, una lista de
  características, algunos requerimientos y algunos recursos.
  ______________________________________________________________________

  Índice General:

  1.      Introducción a Linux

  2.      Características de Linux

  3.      Hardware

  3.1.    Configuración mínima

  3.2.    Configuración usable

  3.3.    Hardware soportado

  4.      Una lista incompleta de Programas Portados y Otro Software

  5.      ¿Quién usa Linux?

  6.      Obtener Linux

  6.1.    FTP anónimo

  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.  Introducción a Linux

  Linux es una reimplementación completamente gratuita de las
  especificaciones POSIX, con extensiones de SYSV y BSD (lo cual
  significa que parece Unix pero no proviene del mismo código fuente
  base), que está disponible tanto en su versión 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 público, ni es "shareware". Es software
  gratuito, usualmente denominado freeware, y tú puedes proporcionar
  copias a otros pero también debes dar los fuentes con éstas o hacer
  posible su obtención de la misma forma. Si tú redistribuyes una
  modificación estás legalmente obligado a proporcionar los fuentes de
  ésta. Vease la "GNU Public License" para más detalles. Una copia está
  incluida en los fuentes de Linux o puedes obtenerla vía ftp de
  prep.ai.mit.edu en /pub/gnu/COPYING

  Linux es gratuito en la versión actual y seguirá siéndolo en el
  futuro.  Debido a la naturaleza del copyright de GNU, al que Linux
  está sujeto, sería ilegal no hacerlo así. No obstante es importante
  saber que es perfectamente legal cobrar por distribuir Linux, mientras
  se incluya el código fuente; para ampliar este punto remítase a la
  GPL.

  Linux se ejecuta en máquinas 386/486/Pentium con bus ISA, EISA, PCI o
  VLB. MCA (bus propietario de IBM) no está actualmente soportado por la
  falta de documentación, aunque hay algunos parches disponibles para
  ciertas máquinas.

  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 también 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" (más conocida como
  Multia), y algunas otras plataformas.

  Linux está siendo rápidamente portado a Sun Sparc.

  Versiones para otras máquinas, incluyendo MIPS, PowerPC y PowerMAC
  están en camino y se está haciendo algún progreso. No te asustes, pero
  si estás interesado y puedes contribuir, puedes perfectamente
  encontrar otros desarrolladores que querrán trabajar contigo.

  A partir de la versión 1.0 que data de Marzo de 1994, Linux ya no es
  una versión de prueba (una beta). Aún hay errores en el sistema y
  nuevos errores irán apareciendo y serán solucionados con el tiempo.
  Como Linux es un proyecto de desarrollo abierto, todas las nuevas
  versiones que vayan apareciendo estarán disponibles para el público,
  sean o no estables. Sin embargo, para ayudar a la gente a discernir si
  la una versión 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 corrección de algún error. Por lo tanto de
  la versión 1.2.2 a la 1.2.3 sólo hay corrección de errores, pero
  ninguna característica nueva. Las versiones 1.x.y con x impar son
  betas para los desarrolladores, pudiendo ser inestables y hasta
  colgarse, y están siendo ampliadas continuamente con nuevas
  posibilidades.  Las actuales versiones de desarrollo son las numeradas
  1.3.x, y la más reciente versión estable es la 1.2.13.

  De cuando en cuando, mientras el núcleo de desarrollo actual se
  estabiliza, será "congelado" como el nuevo núcleo y el desarrollo
  continuará en una nueva versión de desarrollo del kernel.

  La mayor parte de las versiones de Linux, betas o no, son bastante
  estables, y podrás continuar usándolas si hacen lo que tú quieres y no
  pretendes estar a la última. Un site tuvo un ordenador corriendo bajo
  la versión 0.97 con un nivel de parcheado (patchlevel) 1
  (originalmente del verano de 1992) sin un sólo error o cuelgue.
  (Habría durado más si el bruto del operador no hubiese confundido el
  transformador de la fuente con una aguja de descarga de electricidad
  estática...). Otros han informado de actualizaciones con un año de
  retraso. Un site sigue teniendo un ordenador corriendo Linux 0.99pl15s
  desde que fue inicialmente arrancado hace más de 600 días.

  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 versión
  actualmente en desarrollo es siempre pública (con un retraso de una o
  dos semanas) para que cualquiera pueda usarla. El resultado es que en
  cualquier momento que se añada una nueva funcionalidad y salga a la
  luz la nueva versión, ésta casi siempre tendrá errores, pero serán
  detectados y corregidos rápidamente, a menudo en cuestión de horas, ya
  que mucha gente trabaja en ello.

  En contraste, el modelo centralizado y cerrado significa que hay sólo
  una persona o un equipo trabajando en el proyecto, y sólo publican
  software que ellos piensan que esté trabajando bien. A menudo esto
  conlleva largos periodos de tiempo entre versiones, largas esperas
  para la corrección de errores y un desarrollo más lento. Por supuesto
  que la última versión de este tipo de software es a menudo de mejor
  calidad para el público, pero la velocidad de desarrollo es
  normalmente mucho más lenta.

  A 8 de Febrero de 1996, la actual versión estable de Linux es 1.2.13,
  y el nuevo árbol de desarrollo, 1.3.x, está actualmente por la versión
  1.3.60. ¡No uses núcleos de la serie 1.3.x a menos que quieras meterte
  en su desarrollo y no te preocupe que tu máquina se venga abajo una
  vez tras otra!.

  2.  Características de Linux

  ·  multitarea: varios programas (realmente procesos) ejecutándose al
     mismo tiempo.

  ·  multiusuario: varios usuarios en la misma máquina al mismo tiempo
     (¡y sin licencias para todos!).

  ·  multiplataforma: corre en muchas CPUs distintas, no sólo Intel.

  ·  funciona en modo protegido 386.

  ·  tiene protección de la memoria entre procesos, de manera que uno de
     ellos no pueda colgar el sistema.

  ·  carga de ejecutables por demanda: Linux sólo lee de disco aquellas
     partes de un programa que están siendo usadas actualmente.

  ·  política de copia en escritura para la compartición de páginas
     entre ejecutables: esto significa que varios procesos pueden usar
     la misma zona de memoria para ejecutarse. Cuando alguno intenta
     escribir en esa memoria, la página (4Kb de memoria) se copia a otro
     lugar. Esta política de copia en escritura tiene dos beneficios:
     aumenta la velocidad y reduce el uso de memoria.

  ·  memoria virtual usando paginación (sin intercambio de procesos
     completos) a disco: una partición o un archivo en el sistema de
     archivos, o ambos, con la posibilidad de añadir más áreas de
     intercambio sobre la marcha (se sigue denominando intercambio, es
     en realidad un intercambio de páginas). Un total de 16 zonas de
     intercambio de 128Mb de tamaño máximo pueden ser usadas en un
     momento dado con un límite teórico 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.

  ·  librerías compartidas de carga dinámica (DLL's) y librerías
     estáticas también, por supuesto.

  ·  se realizan volcados de estado (core dumps) para posibilitar los
     análisis post-mortem, permitiendo el uso de depuradores sobre los
     programas no sólo en ejecución sino también tras abortar éstos por
     cualquier motivo.

  ·  casi totalmente compatible con POSIX, System V y BSD a nivel
     fuente.

  ·  mediante un módulo de emulación de iBCS2, casi completamente
     compatible con SCO, SVR3 y SVR4 a nivel binario.

  ·  todo el código fuente está disponible, incluyendo el núcleo
     completo y todos los drivers, las herramientas de desarrollo y
     todos los programas de usuario; además todo ello se puede
     distribuir libremente. Hay algunos programas comerciales que están
     siendo ofrecidos para Linux actualmente sin código fuente, pero
     todo lo que ha sido gratuito sigue siendo gratuito.

  ·  control de tareas POSIX.

  ·  pseudo-terminales (pty's).

  ·  emulación de 387 en el núcleo, de tal forma que los programas no
     tengan que hacer su propia emulación matemática. Cualquier máquina
     que ejecute Linux parecerá dotada de coprocesador matemático. Por
     supuesto, si tu ordenador ya tiene una FPU (unidad de coma
     flotante), será usada en lugar de la emulación, pudiendo incluso
     compilar tu propio kernel sin la emulación matemática y conseguir
     un pequeño ahorro de memoria.

  ·  soporte para muchos teclados nacionales o adaptados y es bastante
     fácil añadir nuevos dinámicamente.

  ·  consolas virtuales múltiples: varias sesiones de login a través de
     la consola entre las que se puede cambiar con las combinaciones
     adecuadas de teclas (totalmente independiente del hardware de
     video).  Se crean dinámicamente y puedes tener hasta 64.

  ·  soporte para varios sistemas de archivo comunes, incluyendo
     minix-1, Xenix y todos los sistemas de archivo típicos 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 ningún
     comando especial para usar la partición 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 añadido al núcleo de desarrollo y
     estará en la próxima versión estable.

  ·  un sistema de archivos especial llamado UMSDOS que permite que
     Linux sea instalado en un sistema de archivos DOS.

  ·  soporte en sólo lectura de HPFS-2 del OS/2 2.1

  ·  sistema de archivos de CD-ROM que lee todos los formatos estándar
     de CD-ROM.

  ·  TCP/IP, incluyendo ftp, telnet, NFS, etc.

  ·  Appletalk disponible en el actual núcleo de desarrollo.

  ·  software cliente y servidor Netware disponible en los núcleos de
     desarrollo.

  3.  Hardware

  3.1.  Configuración mínima

  La siguiente es posiblemente la mínima configuración sobre la que
  Linux puede trabajar: 386SX/16, 2 Mb RAM, disquetera de 1.44 Mb o de
  1.2 Mb y cualquier tarjeta gráfica soportada (más teclado, monitor y
  demás, por supuesto). Esto debería permitirte arrancar y comprobar si
  trabaja en el ordenador, pero no serás capaz de hacer nada útil.

  Para hacer algo, necesitarás además algo de espacio en disco duro
  también, 5 o 10 Mb serán suficientes para una configuración minimísima
  (con sólo los comandos más importantes y quizás una o dos pequeñas
  aplicaciones instaladas, como por ejemplo un programa de terminal).
  Esto es aún muy, muy limitado, y muy incómodo, 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.  Configuración usable

  Si vas a ejecutar programas de computación intensiva, como gcc, X y
  TeX, probablemente querrás un procesador más rápido que el 386SX/16,
  pero incluso eso sería suficiente si fueras paciente.

  En la práctica necesitas al menos 4 Mb de RAM si no usas X, y 8 Mb en
  caso contrario. Además, si quieres tener muchos usuarios al mismo
  tiempo o ejecutar muchos programas grandes (compiladores por ejemplo)
  al mismo tiempo también, querrás más de 4 Mb de memoria RAM. Puede
  trabajar con menor cantidad de memoria (debería de hacerlo incluso con
  2 Mb), pero usaría memoria virtual (usando el disco duro como una
  memoria lenta) y eso sería tan lento como para calificarlo de inútil.

  La cantidad de disco duro que necesites depende del software que
  pienses instalar. El conjunto de utilidades típicas 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 más completo
  consigue la Slackware, MCC o Debian, y asume que necesitarás entre 60
  y 200 Mb, según lo que eligas instalar y la distribución de que se
  trate. Añade 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 pequeña. Adquiere al menos 200 Mb,
  preferiblemente 500 Mb o más, y no te arrepentirás.

  Añade más memoria, más disco duro, un procesador más rápido y otras
  cosas según tus necesidades, deseos y cartera para sobrepasar lo
  simplemente usable. En general, una gran diferencia frente a DOS es
  que con Linux, añadir memoria supone una grandísima diferencia,
  mientras que con DOS más memoria no supone tanta mejora. Esto por
  supuesto tiene algo que ver con los 640 Kb que pone por límite 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 deberían valer;
        los 286 no funcionan ni lo harán jamás). Además, una versión
        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. Más 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:
        Teóricamente hasta 1 Gb, aunque jamás ha sido probado hasta este
        extremo. Algunas personas (incluido Linus) han notado que
        añadiendo memoria sin incrementar el caché al mismo tiempo su
        máquina se ha ralentizado extremadamente, por ello si añades
        memoria y encuentras tu máquina más lenta prueba a ponerle más
        caché. Por encima de 64Mb de ram se requiere un parámetro de
        arranque, ya que la BIOS no puede detectar más que 64 Mb por su
        implementación.

     Almacenamiento de datos:
        Las unidades tipo AT (IDE, controladores de disco duro de 16
        bits con MFM o RLL, o ESDI) son soportadas, como también 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)
        también son soportadas. Adaptadores SCSI soportados: Adaptec
        1542, 1522, 1740 y la serie 27xx, controladoras Buslogic vía
        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
        también son soportadas.  Bastantes unidades de CD-ROM tienen
        soporte también, 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 gráficos y X hay soporte para (al menos) VGA normal,
        algunas tarjetas super-VGA (la mayoría 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 mayorías de las placas
        LANCE, adaptadores de bolsillo d-link, PPP, SLIP, CSLIP, PLIP
        (Parallel Link IP) y más.

     Serie:
        La mayoría 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 también), Stallion (la
        mayoría 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 ratón 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 modificación o
  sólo 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 básicos Unix :
        ls, tr, sed, awk y más (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
        más.

     Entornos gráficos:
        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 más.

     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 más.

     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 línea de modem), Seyon (popular programa de
        comunicaciones bajo X) y diversos paquetes de fax y correo de
        voz (usando ZyXEL y otros modems) están disponibles. Por
        supuesto, los logins remotos vía línea serie son soportados.

     News y correo electrónico:
        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 más. 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 centésima 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.  ¿Quién usa Linux?

  Linux está disponible gratuitamente, y a nadie se le pide que registre
  sus copias ante ninguna autoridad, por lo tanto es difícil conocer
  cuánta gente usa Linux. Diversos negocios están 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 más leídos en Internet, por ello el
  número estará situado sobre varios centenares o miles, los grandes
  números son difíciles de averiguar. De todas formas, un alma brava,
  Harald T. Alvestrand, ha decidido intentarlo y te pide que si usas
  Linux le envíes 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). También está contando votos
  del tipo "I don't use Linux" (no uso Linux) por alguna razón. El manda
  sus cuentas a comp.os.linux.misc

  6.  Obtener Linux

  6.1.  FTP anónimo

  Matt Welsh ha sacado una nueva versión de su guía Installation and
  Getting Started, la versión 2.1.1. Además, el Linux Documentation
  Project (LDP) ha "publicado" varios otros libros en diversos estados
  de desarrollo y estos están disponibles en
  sunsite.unc.edu:/pub/Linux/docs/LDP. Mantente atento a
  comp.os.linux.announce

  Al menos los siguientes sites de ftp anónimo 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 más 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 estás 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 más populares distribuciones de Linux. La Red Hat y la Debian
  están también 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 administración
  centralizada. Por ello no hay una versión oficial que nadie pueda
  señalar y decir "Eso es Linux". Al contrario, hay varias
  distribuciones, que son más 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 deberías 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 cómo resolver la mayor parte de los
  problemas comunes (durante la instalación o en otro momento).

  8.  Status legal de Linux

  Aunque Linux es suministrado con el código fuente completo, es
  software con copyright, no de dominio público. Sin embargo está
  disponible gratuitamente bajo la "GNU Public License" (GPL). Ver la
  GPL para más información. Los programas que corren en Linux tienen
  cada uno su propio copyright, aunque muchos de ellos usen la GPL
  también. 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 debería estar allí).

  9.  Noticias sobre Linux

  Una revista mensual, llamada Linux Journal, apareció hace más de un
  año. Incluye artículos destinados a casi cualquier nivel y pretende
  ser de ayuda a todos los usuarios de Linux. La subscripción por un año
  cuesta $22 en U.S., $27 en Canada y Méjico, y $32 en cualquier otro
  país, pagables en moneda USA. Las solicitudes de subscripción pueden
  ser enviadas por email a subs@ssc.com, por fax a +1-206-782-7191, por
  teléfono a +1-206-782-7733 o por correo a Linux Journal, PO Box 85867,
  Seattle, WA 98145-1867 USA. SSC tiene una clave PGP pública disponible
  para encriptar tu correo y proteger el número de tu tarjeta de
  crédito; haz finger a info@ssc.com para obtener la clave.

  Hay diversos grupos de noticias (newsgroups) de Usenet para discusión
  sobre Linux además de diversas listas de correo. Ver la Linux FAQ para
  más información sobre las listas de correo (deberías 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, corrección de
  errores, etc).

  El grupo de noticias comp.os.linux.answers es un grupo de noticias
  moderado al que se envían 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 discusión sobre la administración de un sistema
  Linux.

  El grupo de noticias comp.os.linux.development.system es un grupo de
  noticias no moderado dedicado específicamente a la discusión sobre el
  desarrollo del núcleo de Linux. Las únicas cuestiones sobre desarrollo
  de aplicaciones que deben ser discutidas aquí son aquellas que están
  íntimamente ligadas al núcleo. Todas las demás cuestiones de
  desarrollo son probablemente genéricas 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 discusión sobre el desarrollo de
  aplicaciones en relación con Linux. No está para discutir sobre el
  lugar en el que se puede conseguir una aplicación para Linux, ni para
  discusión entre aquellos que quieren aplicaciones para Linux.
  El grupo de noticias comp.os.linux.hardware es para preguntas de
  hardware específicas de Linux.

  El grupo de noticias comp.os.linux.networking es para preguntas
  específicas 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 discusión que no esté cubierta en
  las temáticas de los anteriores grupos.

  Por norma, no reenvíes entre los grupos de noticias de Linux. El único
  reenvío que es aceptable es un envío ocasional de un grupo no moderado
  a comp.os.linux.announce. La razón para dividir comp.os.linux en
  varios grupos es reducir el tráfico en cada uno. Aquellos que no sigan
  esta regla serán fulminados sin piedad...

  Linux está en el Web (World Wide Web, WWW, W3, etc). La dirección 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 más cosas están 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 están
  siendo consideradas para la serie de desarrollo 1.3.x. Tras un año de
  Linux 1.0 estable, Linux 2.0 ocupó ese papel. Ahora, una nueva versión
  estable de Linux (mejor dicho, de Linux 2.0, antes que de Linux 1.4)
  continuará esa tradición.

  Hay mucho código para escribir e incluso más documentación todavía.
  Por favor únete a la lista de correo linux-doc@vger.rutgers.edu si
  quieres contribuir a la documentación. Manda un mensaje a
  majordomo@vger.rutgers.edu con una única línea 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, escríbeme 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 versión PostScript es
  INFO-SHEET.ps, en el mismo directorio.

  12.  Legalidad

  Las marcas registradas pertenecen a sus propietarios. No hay garantía
  sobre la información en este documento. Usalo y distribúyelo a tu
  libre albedrío.  El contenido de este documento es de dominio público,
  pero por favor, sea educado y proporciona información sobre cualquier
  cita.

  13.  Nota del traductor

  Hola, soy Iván 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 interés y que comprendas que aún hay mucho por traducir
  y más aún por escribir.

  He intentado ajustarme totalmente al original de Michael K. Jonhson y
  he revisado la traducción un par de veces. No obstante aún puede
  quedar algo por pulir o se me ha podido colar alguna errata, de cuya
  responsabilidad me hago cargo, pero jamás de sus consecuencias.

  Para cualquier comentario, errata o consulta sobre la traducción,
  acude al área R34.LINUX de FidoNet o contacta conmigo por NetMail a la
  dirección 2:345/425.25 de la misma red.

  Un saludo, Iván Casado.

  14.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 guía rápida de configuración y puesta
  en funcionamiento de procedimientos para conectarse a Internet a
  través de Infovía mediante enlaces ppp. También puede aplicarse a
  casos de acceso "directo" sin mediar Infovía, o a través de retenet.
  Así mismo, describiré un método tal vez no muy ortodoxo pero sí sen­
  cillo y eficiente para recoger y mandar el correo a través de este
  tipo de conexiones.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Requisitos.

  2.1.    Hardware

  2.1.1.  Módems

  2.1.2.  Configuración del módem

  2.2.    Software

  3.      Conexiones a través de Infovía.

  3.1.    Método ``A''

  3.2.    Método ``B''

  4.      Conexiones sin mediar Infovía.

  5.      Gestión de Correo de Internet.

  5.1.    Método ``A'' o fácil y güindosero  ;-).

  5.2.    Método ``B''.

  5.2.1.  Requisitos

  5.2.2.  Configuración del sistema.

  5.2.2.1.        popclient

  5.2.2.2.        fetchmail

  5.2.2.3.        sendmail

  5.2.3.  Cómo escribir

  5.2.4.  Procedimiento.

  5.3.    Método ``C''.

  6.      Agradecimientos

  7.      Copyright

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  En este documento intentaré explicar un par de métodos 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 conexión.

  No soy ni pretendo ser un gurú en LiNUX. Lo que aquí se describe lo he
  extraído de correo que generosamente me enviaron en su momento
  usuarios de Fidonet e Internet, y he probado, experimentado, y buscado
  la forma más sencilla y fácil de hacerlo, ya que me consta que una de
  las cosas que más ilusión hace a los recién llegados es precisamente
  conectarse a Internet a través de LiNUX --- cosa que por cierto, se
  realiza mucho más eficientemente en este sistema operativo que en
  otros, al obtenerse soporte directo del núcleo o kernel del sistema,
  sin tener que recurrir a ``chapuzas'' para ello.---

  La motivación por tanto, que me ha llevado a hacer este documento ha
  sido el ponerlo a disposición de los demás (y por que ya estaba
  cansado de forwardear una y otra vez los mismos mensajes que
  previamente había recibido ;-) y como agradecimiento y granito de
  arena a toda la comunidad LiNUX.

  Si encuentra cualquier error de concepto, u opina que el método se
  puede mejorar, o simplemente quiere hacer alguna aportación a este
  documento, no dude en ponerse en contacto conmigo. Estaré encantado de
  saberlo.

  2.  Requisitos.

  2.1.  Hardware

  2.1.1.  Módems

  Está claro: :) además del ordenador, un módem. En cuanto al tipo de
  módem, siempre he recomendado lo mismo: Externo. Un módem interno sólo
  tiene razón de ser en la poco probable situación de no poseer UARTs
  rápidas (16550A). Si este no es su caso, la mejor apuesta será siempre
  (hablando de módems por RTC (-- Red Telefónica Conmutada, en oposición
  a la reciente RDSI--) ) un módem externo, de cuanta mejor reputación
  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 excepción.

  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
  fabricación 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 día 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 lógicas a través 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

  ·  Módems con chip Rockwell RPI

  ·  También he recibido últimamente frecuentes preguntas de
     propietarios de módems de chip PCTEL HSP, que desafortunadamente,
     no podrán beneficiarse de las capacidades de conexión de Linux,
     debido a que pertenece a la funesta categoría de winmodems.

  Resumiendo: NADA de winmodems, a ser posible NO internos, y nada de
  PnP.

  2.1.2.  Configuración del módem

  Un problema frecuente es el hecho de que ``el módem 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 módem
  interno, en la típica configuración 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 módem para que su puerto interno pase a ser el COM2
     (/dev/ttyS1 en Linux); la configuración en Linux por defecto para
     este puerto es irq 3, dirección base 0x02f8. Así pues, si el módem
     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 módem admite (por jumpers,
     nada de PnP!) al menos cambiar la IRQ que usará el puerto interno
     del módem, 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
     núcleo. 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
     módem (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
     módem.

  4. Una vez nos hemos asegurado de que el hardware está empleando los
     recursos que debe, hemos de decírselo al software. Si hemos
     conseguido poner el puerto interno del módem como COM2 (¡y hemos
     desactivado el de la placa!), no hay más que hacer, todo lo que
     sigue está pensado para ese caso. Una respuesta típica del comando
     setserial sería:

        ~]# 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 módem, (COM4) deberemos decírselo a Linux cada vez que lo
     arranquemos (incluyendo el comando en el script de arranque
     /etc/rc.serial, si nuestra distribución es una Slackware, o en
     /etc/rc.d/rc.serial si es RedHat). Si le hemos puesto en la IRQ 10,
     y tenemos un módem superior a 22.8 Kbps, el comando (o la línea a
     poner en dicho script) sería:

       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 parámetro -v hará que el comando devuelva la información de config­
  uración final del puerto.

  Si se continúa 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

  Básicamente, lo único necesario es tener soporte ppp ya por parte del
  núcleo o kernel o por módulos, en cuyo caso son necesarios tener
  cargados shlc.o y ppp.o, mediante por ejemplo la orden:

       modprobe ppp

  existen métodos más 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. Téngase en cuenta que
  si se emplea un kernel posterior al 1.3.95 ha de utilizarse una
  versión 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 distribución del kernel contienen un módulo de
  compresión ppp, bsd_comp.o, que por problemas de copyright no puede
  ser compilado sino es como módulo, ni cargado automáticamente por
  kerneld. El uso de este módulo mejora el rendimiento de la conexión,
  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 personalización 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 solución muy elegante, pero funciona :-).

  Para conectarse a un ISP (Internet Service Provider, o Proveedor de
  Acceso a Internet) a través de nuestra queridísima Infovía, pueden
  utilizarse los métodos que a continuación describo:

  3.  Conexiones a través de Infovía.

  3.1.  Método ``A''

  1. Fichero /etc/resolv.conf.
     corriente, en que obtengamos nuestra dirección por asignación
     dinámica, se ha de conocer la dirección en notación decimal del
     servidor de nombres o nameserver del ISP que nos proporciona
     acceso.  Esta información se la ha de proporcionar su ISP, y
     generalmente será de la forma 194.xxx.yyy.zzz. (En la posición 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 dirección de correo email, es decir,
     todo lo que se encuentra tras la arroba. En mi caso,
     pacopepe@insflug.org sería por tanto insflug.org.

     Una vez conocemos estos datos, editamos (con vi, por ejemplo) el
     fichero /etc/resolv.conf, de modo que añadimos:
     /etc/resolv.conf

       domain insflug.org
       nameserver 194.xxx.yyy.zzz

  2. Elaboramos el fichero /etc/ppp/options (Sólo 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 línea +ua
  /etc/ppp/infoviappp y añadiendo:

       +pap
       user id@dominio

  Así, utilizará en su lugar el fichero /etc/ppp/pap-secrets para la
  autentificación:

       infovia         *       infovia
       id@dominio      dominio clave

  Para más información sobre pap-secrets ver apartado correspondiente de
  la sección ``''.

  /dev/ttySX es el fichero de dispositivo correspondiente al puerto
  donde tengamos el módem, 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 módem, con la orden:

       ln -s /dev/ttyS1 /dev/modem

  Siempre que el COM2 sea el que esté usando el módem. 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
  serían:

  ·  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 contraseña
  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 más 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

  quedarían establecidos los permisos.

  5. Ejecutar, como root, pppd. Al momento se escuchará marcar al módem,
     y una vez establecida la conexión, se escuchará actividad por parte
     del disco duro; también, en el caso de poseer un módem externo, se
     observará las luces de cd, sd y tr encendidas o parpadeando; en
     caso de ser interno, podemos constatar que la conexión 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.

     También podemos observar el proceso de conexión conmutando a otra
     VC, y tecleando la orden

       tail -f /var/log/messages

  lo cual nos mostrará, en caso de problemas, los fallos que están ocur­
  riendo. Un proceso de conexión normal aparecería 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 conexión podemos emplear el script que suele
     acompañar 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 conexión con métodos
  ``civilizados'' como el script ppp-off.

  Uno puede hacerse un ppp-off rudimentario mediante el comando:

  killall pppd

  Si se quiere saber más sobre los comandos de este script, consulte el
  comando chat y la documentación sobre pppd.

  3.2.  Método ``B''

  El mismo que el empleado para conectar sin mediar Infovía, descrito en
  la sección ``Conexiones sin mediar Infovía.'' a excepción de:

  1. Fichero /etc/ppp/pap-secrets, que quedaría así:

       infovia               *                  infovia
       id@dominio            *                  su_password

  donde id@dominio sería, en mi caso, pacopepe@insflug, es decir, su
  dirección email sin el .es del dominio perteneciente a España.

  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 sección ``Método ``B'''', punto número 4.

  Como se puede observar, lo único que varía es que se añade la línea
  referente a Infovía.

  2. Cambiar la variable NUMERO del script /usr/local/bin/infovia por
     055, como corresponde a Infovía.

  4.  Conexiones sin mediar Infovía.

  En el caso de que tengamos acceso directo a un servidor, los scripts y
  ficheros necesarios serían 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 número de su Proveedor.

  ·  En id@dominio tendrá que poner su dirección email sin el

     Este script ha de ser ejecutable, por lo que tenemos que otorgarle
     permisos de ejecución, 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 sería la situación más ``estándar''.

  2. Fichero /etc/ppp/pap-secrets

       id@dominio            *                  su_password

  nuevamente, se aplica lo dicho en la sección ``Método ``B''''.

  3. Fichero /etc/resolv.conf
     aquí se aplica lo mismo que en la sección ``Método ``A'''' punto
     número 1.

  4. A partir de aquí, se aplica lo mismo que en la sección ``Método
     ``A'''', punto 5, a excepción de que por supuesto, no ha de
     ejecutarse pppd, ya que lo hacemos ejecutando el script
     /usr/local/bin/infovia.

  5. ATENCIÓN usuarios de RedHat
     Si el sistema LiNUX que tiene instalado pertenece a una
     distribución RedHat, deberá tener en cuenta lo siguiente:

  ·  En el script /usr/local/bin/infovia deberá modificarse las líneas
     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 localización de dichos ficheros en RedHat está en esos
  directorios.

  ·  Para ciertos programas que hacen uso del módem, como el binkley, y
     otros, resulta inocuo y muy conveniente crear el enlace o symlink
     siguiente:

       ln -s /var/spool /usr

  Para obtener una visión más completa y detallada en lo que a ppp se
  refiere, recomiendo hacerse con la traducción del PPP-Como, realizada
  por Rafael Agundo, ragundo@bitmailer.net. En la sección ``Insflug'' se
  detallan los servidores donde obtenerlo.

  5.  Gestión de Correo de Internet.

  A continuación describiré dos métodos para gestionar el correo en el
  caso que nos ocupa, una máquina aislada, con conexiones esporádicas a
  su Servidor de Acceso a Internet. El método B es desde luego, poco
  ortodoxo y se puede mejorar mucho, por lo que una colaboración en lo
  que a configuraciones ``ideales'' de red de este tipo de máquinas será
  harto agradecida.

  5.1.  Método ``A'' o fácil y güindosero  ;-).

  Instalar, usar y configurar Netscape, Mosaic u otro navegador con
  capacidad de gestionar correo, news, etc.

  Como me consta que la inmensa mayoría de los que empiezan a usar Linux
  o bien no poseen una cantidad desmesurada de RAM, ni les sobra disco
  duro como para sacrificar más de 6 megas en el Netscape, y además
  desean aprender a usar métodos más *nixeros y eficaces de gestión de
  correo, propongo el siguiente (más fácil de configurar incluso que el
  netscape) método:

  5.2.  Método ``B''.

  5.2.1.  Requisitos

  1. Popclient. Se precisa instalar el paquete Popclient. En caso de que
     la versión de éste use perl, se deberá instalar este último
     también.

  2. popclient se ha quedado desfasado últimamente, siendo fetchmail el
     que más se emplea ahora por ser más seguro.

  3. Sendmail+IDA. No, no os asustéis ;-) El sendmail+IDA, que viene en
     la inmensa mayoría de las distribuciones, lo tendremos configurado
     con editar dos líneas.

  5.2.2.  Configuración del sistema.

  1. Crear una cuenta en la máquina con el mismo identificativo que se
     tenga en el Proveedor. Por ejemplo, mi identificativo o login en mi
     ISP es pacopepe, cosa fácilmente deducible debido a mi dirección 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 dándole 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 sería
        /var/spool/mail/probancio.

     <servidor_POP>
        Aquí ha de ponerse la dirección de vuestro servidor POP; en mi
        caso (y suele ser común) pop03.insflug.org.

  Nota: Al elaborar el script prescindiremos de los signos ``<'' y
  ``>''; en el ejemplo están simplemente para resaltar los parámetros 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 línea de comandos la
  contraseña del ISP, (con -p) para ello ha de usarse el fichero
  ~/.poprc, en el que podemos definir otros parámetros de compor­
  tamiento, como el que mantenga los mensajes en el servidor (keep) en
  caso de que estemos de pruebas, o por cualquier otra razón.

  Iñigo González nexus@adv.es recomienda usar versiones del popclient
  superiores a la 3.0b6, además de sugerir el uso de un programa fil­
  trador de correo como procmail, para lo que deberemos añadir al
  comando getmail el parámetro -m procmail.

  5.2.2.2.  fetchmail

  En caso de usar fetchmail, un cliente muy potente y cuya documentación
  es bastante clara y precisa, la configuración 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
        sería el nombre del la máquina servidora de correo vía pop del
        proveedor que utilicemos;

     pop3
        sería el protocolo a emplear, ya que fetchmail soporta otros
        también, 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
  podrían ser accesibles las contraseñas, e incluso el programa  se
  negaría a funcionar:

       chmod 600 .fetchmailrc

  fetchmail ofrece una serie de prestaciones adicionales, como
  temporización, reenvío, funcionamiento en modo daemon etc... Es un
  cliente muy potente y recomendable en cuanto a seguridad se refiere.

  En caso de emplearlo, no haría falta el script getmail, bastaría con
  invocar a fetchmail a secas.

  5.2.2.3.  sendmail

  1. Modificación 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 línea que dice algo
     así como daemon sendmail .... en RedHat, o /usr/sbin/sendmail -bd
     -q 15m en Slackware, y modificarla, editándola 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. Modificación de /etc/sendmail.cf. Aquí buscaremos una línea 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 dirección de
  correo, en mi caso insflug.org:

  # who I masquerade as (null for no masquerading)
  DMinsflug.org

  Con esto, lo que hemos hecho es básicamente, "enmascarar" nuestra
  dirección en la máquina propia; supongamos que nuestra máquina se
  llama beastie.insflug.org y enviamos un mensaje sin la modificación
  anterior; el mensaje llegará correctamente a su destino, pero no podrá
  ser respondido, ya que la dirección de retorno no existirá, al figurar
  la de nuestra propia máquina, que en nuestro caso ficticio sería
  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 máquina con el mismo login que en
  nuestro ISP (probancio en este caso); la línea DS... hace que sendmail
  rute todos los mensajes salientes hacia internet a través de nuestro
  servidor SMTP, que hace de servidor de relevo hacia internet.
  Podríamos no decirle nada, y dejar que se encargara de contactar y
  enviar directamente con el servidor de correo entrante de cada
  dirección, pero eso haría más lento el envío de los correo, además de
  que es mucho más rápida la transferencia con nuestro ISP, al no tener
  que salir a internet siquiera.

  DM... cambia los from de nuestros mensajes por nuestra verdadera
  dirección en el ISP.

  5.2.3.  Cómo escribir

  Para responder o escribir nuestro correo podremos usar cualquier
  programa escritor de correo, los simples como mail o mailx, un poco
  más completos como el facilísimo elm, o pine, el modo de correo del
  versátil 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 conexión PPP con nuestro servidor, con cualquiera de
     los métodos descritos en las secciones ``Conexiones sin mediar
     Infovía'' o ``Conexiones a través de Infovía''. 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 parámetro -q viene de
  queue o la ``cola'' de correo pendiente por salir).
  Por supuesto, los procedimientos para establecer la conexión y
  recoger/mandar correo se pueden automatizar escribiendo scripts
  sencillos, pero eso lo dejo ya al gusto y según las circunstancias de
  cada uno.  Estaré encantado de recibirlos, a fin de incluirlos en la
  próxima versión de este COMO.

  5.3.  Método ``C''.

  Empleando clientes de correo capaces de enmascarar al usuario/dominio,
  podemos prescindir de la fase de configuración del enmascaramiento de
  dominio del sendmail. El cliente de correo (MUA (-- Mail User
  Application, aplicación de gestión de correo a nivel usuario)--) mutt,
  puede hacer esto, a nivel tanto de dominio como de usuario, entre
  otras muchas prestaciones que harán las delicias de los amantes del
  modo texto: gestión pgp integrada, threads, color... Un cliente muy
  recomendable. Su servidor de ftp primario es:

  ftp://ftp.cs.hmc.edu/pub/me/mutt

  Es posible también prescindir de la ``chapucilla'' de tener que
  emplear el mismo usuario que en el proveedor empleando un MTA (-- Mail
  Tranfer Agent, Agente de Gestión de transferencia de Correo--) de
  configuración más flexible y cómoda que sendmail, como el prometedor
  qmail, fácilmente obtenible en Internet, que además 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 más 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
  Simón, 2:345/102.36 y Miguel Cruz por los scripts a través de infovía,
  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 Terrón por sus correcciones, a Juan Manuel Villar Navarro
  juanma@gaps.ssr.upm.es por sus apuntes sobre popmail, y a Iñigo
  González nexus@adv.es por las sugerencias sobre procmail, y a Jesús
  Fuentes Saavedra jesus.fuentes@etsi.uva.tel.es por el detalle del
  bsd_comp, y tantísimas otras cosas...

  A Antonio Verdejo García aka wait_man, wait_man@hotmail.com por su
  lista de winmodems y tantas otras críticas 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 electrónica, sujeto a las siguientes condiciones:

  1. La notificación del copyright y esta licencia debe preservarse
     completa en todas las copias, tanto completas como parciales.

  2. Cualquier traducción o trabajo derivado debe de ser aprobado por el
     autor por escrito antes de su distribución.

  3. Si se distribuye el Trabajo parcialmente, deben de incluirse
     instrucciones para poder obtener la versión completa (en forma
     impresa o electrónica), así como los medios para conseguirla.

  4. Pueden ser reproducidas pequeñas porciones como ilustraciones para
     revistas o citas para otros trabajos sin esta notificación de
     permiso si se cita apropiadamente su procedencia.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Cómo Intentar configurar un servidor de news con INN+SUCK
  Autor: Pedro P. Fábrega Martínez, pfabrega@arrakis.es
  Versión 1.1 Fecha 8-98

  Este documento explica como configurar un servidor de news en su
  máquina Linux. Está enfocado para las personas que usan Linux en casa
  y les gustaría tener un pequeño servidor local. También 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 mayoría de las cosas las
  podría aplicar también. Por último, se supone que quien pretende
  instalar inn+suck tiene ya ciertos conocimientos no elementales.
  ______________________________________________________________________

  Índice General:

  1.      Descargo

  2.      Introducción

  2.1.    Descripción

  2.1.1.  inn

  2.1.2.  suck

  2.2.    ¿Dónde puedo conseguirlos ?

  3.      Método

  3.1.    configuración 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.

  Además no se asume ningún tipo de responsabilidad de ningún daño
  ocasionado por estas instrucciones.

  Por ejemplo, si te cabreas porque no sale, pegas un puñetazo, este
  hace saltar por la ventana un bolígrafo, que al darle al operario de
  teléfonos se le cae la escalera, esta golpea unos cables de alta
  tensión, se produce un sobrecarga de la línea, la sobrecarga calienta
  el sistema de refrigeración de la central nuclear y se produce una
  explosión termonuclear, yo, no quiero saber nada, que quede claro.

  2.  Introducción

  2.1.  Descripción

  Para instalar un servidor de news en su equipo Linux, usando este
  método, 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
  también de una serie de utilidades, a alguna de las cuales haremos
  referencia en este documento. Además, 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 configuración.

  2.1.2.  suck

  Para realizar la comunicación 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 versión y no había intenciones de sacar ninguna nueva.

  Este paquete dispone de todo lo que es necesario para obtener news de
  un servidor NNTP remoto, y enviar artículos 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á diseñado para alimentarse de 10,000
  grupos y 3GB de artículos al día.

  2.2.  ¿Dónde puedo conseguirlos ?

  INN forma parte de prácticamente todas las distribuciones de Linux.
  Sólo tiene que seleccionarlo como uno más de los componentes de la
  instalación o instalarlo con la utilidad de paquetes que tenga su
  distribución 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 réplicas que puede encontrar en http://www.isc.org/inn.html. Por
  ejemplo :

  ftp://ftp.xlink.net/pub/mirror.inn/

  La versión 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
  réplica de Sunsite.

  3.  Método

  3.1.  configuración de INN

  Una vez que INN está instalado necesitamos los ficheros de
  configuración de INN. Estos ficheros de configuración están
  normalmente en /usr/lib/news, pero esto puede depender de la
  distribución. 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. Compruébelo en su
  caso, y también que existan el usuario news y el grupo news.

  A continuación vemos los ficheros que necesitan alguna modificación:

  3.1.1.  inn.conf

  Voy a poner un listado de mi inn.conf, que además 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 artículos no se envían más de una vez al mismo sitio. De
  esta forma cualquier artículo que tenga noticias.servidor-isp.es o
  news.servidor-isp.es no se enviarán. Como son dominios registrados,
  estamos seguros de que ningún otro sitio inserta estas cabeceras.

  La segunda línea indica qué artículos se enviarán a este sitio
  *,!mios.* quiere decir que se enviarán a news.servidor-isp.es todos
  los salvo los de aquellos grupos que empiezan por mios.. El segundo
  /!mios significa que los artículos con una cabecera Distribution de
  ``mios'' tampoco se enviarán 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 artículo se escribirán en este
  fichero. La n significa nombre de path relativo, la m es el Message-ID
  del artículo.

  Ahora en nuestro servidor, cada artículo 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 envío a los
  distintos hosts añadiendo unas simples líneas como las siguientes (ojo
  esto no son los permisos de fichero, lea más 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 más, en
  consecuencia ponemos un comentario al resto de las líneas (usando un #
  al principio de línea).

  Otro detalle. Si el fichero contiene claves no debería 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 artículos
  de los grupos selecconados hacia nuestro host. Una vez en nuestro host
  estos artículos se le envían 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, tendría 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 información 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 líneas 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 número de artículo más alto que se ha usado
     en el grupo.

  ·  El tercero es el número de artículo 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 número de artículo más bajo es mayor que el más alto,
  entonces no hay artículos en el grupo. Para facilitar el trabajo, los
  campos numéricos tienen una longitud fija, añadiéndosele ceros. Este
  fichero, aunque se puede editar, es mejor gestionarlo con ctlinnd.

  Cuando instalamos el servidor necesitamos estas cuatro líneas. Más
  tarde veremos como añadir más 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 configuración es correcta.

  Como puede que las distintas distribuciones usen cada una de ellas su
  propia ubicación, 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 ejecución. Ahora tiene que añadir grupos
  de noticias. Los grupos de noticias se añaden con ctlinnd, que añadirá
  una entrada al fichero active. No intente añadir grupos manualmente.

  Para un sólo 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.

  También 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 dirección 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.
  Cómo instalarlo

  1. Ejecutamos el script ./configure

  2. Modifique suck_config.h - hay un montón de cosas configurables

  3. Compílelo:  (make , make install)

  4. Defina un sucknewsrc con los grupos que quiera cargar del servidor
     (Si ya está INN en funcionamiento use la opción -A -hl localhost y
     se generará el sucknewsrc). En comentarios se especifica algo más.

  5. Edite el fichero sample/get.news.innxmit, ponga su servidor de
     noticias y asegúrese de que los path son correctos. La ejecución de
     suck para bajar artículos del servidor y el envío de los artículos
     locales se hacen mediante este script. Cópielo en en el path de
     ejecución 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 documentación 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 artículos posteados localmente.

  4.  Comentarios

  4.1.  sucknewsrc

  Este fichero contiene información sobre qué grupos de noticias se
  deben transferir desde el servidor remoto de noticias + el mensaje más
  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 artículos caducan, que expiran.
  De esto se encarga script news.daily. El fichero expire.ctl describe
  la duración de los artículos. Veamos algunos ejemplos de este fichero:

       /remember/:20

  Esta línea le dice a expire que mantenga las entradas de los artículos
  en history al menos 20 días.

       *:A:1:7:21

  Esta es la línea por defecto. Indica que por defecto, un articulo se
  tenga un mínimo de un día, la expiración es 7 días (se aplica si no
  hay cabecera Expires), y el máximo que es mantenido el artículo que
  son 21 días.

       local.*:A:1:14:28

  Esta línea sólo se aplica a los grupos local. Por defecto los
  artículos permanecerán 14 días, 28 como máximo.

  Tiene que tener en cuenta que las línea de expire.ctl deben tener las
  entradas mes primero y las más específicas 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 artículos se guardan en /var/spool/news. Debe prever
  espacio de almacenamiento. Esto habrá que estudiarlo para cada caso en
  particular. Si va a bajar sólo 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 partición 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 línea corresppondiente a nntp
  en /etc/inetd.conf y reiniciar inetd con la señal 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

  etcétera.

  4.5.  Autor

  El autor de este mini-como es Pedro Pablo Fábrega Martínez
  (pfabrega@arrakis.es)

  Este mini-como una recopilación de documentos disponibles en internet
  y de mi propia experiencia.

  También 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 groserías pueden redirigirse directamente a /dev/null

  4.6.  Derechos de Autor

  Este documento está a disposición de cualquiera bajo los términos
  indicados en la licencia pública 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 distribución.

  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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Kernel-Como
  Brian Ward, bri@blah.math.tu-graz.ac.at
  Traducción de Juan José Amor, jjamor@ls.fi.upm.es
  Revisión 2.1, 22 de Diciembre de 1996

  Lo que sigue es una guía detallada de la configuración del núcleo,
  cubriendo detalles de compilación y de actualizaciones.  El traductor
  ha intentado respetar el documento original, aunque no ha podido evi­
  tar añadir cosas de su propia cosecha, sobre todo en lo que respecta a
  opciones aún no documentadas.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    ¡Lea esto primero!

  1.2.    Sobre el estilo

  2.      Preguntas y respuestas importantes

  2.1.    Pero, ¿qué hace el núcleo?

  2.2.    ¿Por qué puedo necesitar actualizar el núcleo?

  2.3.    ¿Qué hardware nuevo soportan los nuevos núcleos?

  2.3.1.  Anexo de la revisión.

  2.4.    ¿Qué versión de gcc  y libc  necesito?

  2.5.    ¿Qué es un módulo cargable?

  2.6.    ¿Cuánto espacio en disco necesito?

  2.7.    ¿Cuánto se tarda en compilar?

  3.      Cómo configurar el núcleo.

  3.1.    Obtención de los fuentes.

  3.2.    Descompresión de los fuentes

  3.3.    Configuración del núcleo

  3.3.1.  Anexo de la revisión 2.1.

  3.4.    Continuación

  3.4.1.  Emulación 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.  Comunicación 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 carácter ( Character devices )

  3.4.11. Tarjeta de sonido ( Sound card )

  3.4.12. Otras opciones de configuración

  3.4.13. Kernel hacking

  3.5.    ¿Y ahora qué? (El fichero Makefile ).

  4.      Compilación del núcleo

  4.1.    Limpieza y dependencias

  4.2.    El momento de compilar

  4.3.    Otras opciones del ` make '

  4.4.    Instalación del núcleo

  5.      Parchear el núcleo

  5.1.    Aplicación 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 típicos

  7.1.    make clean

  7.2.    Núcleos muy lentos o muy grandes

  7.3.    El núcleo no compila

  7.4.    El nuevo núcleo 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 símbolos 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 función de cortafuegos no funciona en el núcleo 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 después de la actualización

  8.      Notas sobre la actualización a la versión 2.0.x

  9.      Módulos

  9.1.    Instalación de las utilidades asociadas

  9.2.    Módulos distribuidos con el núcleo 1.2.2

  10.     Otras opciones de configuración.

  10.1.   Opciones generales

  10.2.   Opciones de red

  11.     Consejos y trucos

  11.1.   Redirección de la salida de compilación o parcheado.

  11.2.   Instalación condicional del núcleo

  11.3.   Actualizaciones del núcleo

  12.     Otros documentos COMO  que pueden serle útiles

  13.     Miscelánea

  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.  Introducción

  Esta es la versión 0.75 del documento ``Kernel-HOWTO'' original. La de
  la traducción es la 2.1 ¿Debe Vd. leer este documento? Bien, veamos si
  tiene alguno de los siguientes síntomas:

  ·  ``¡Jo! El dosemu-0.99.9 requiere el núcleo 1.8.193 y yo estoy aún
     con el 1.2.3''

  ·  Hay un manejador (driver) que sólo está en los núcleos más
     recientes y Vd. lo necesita.

  ·  Vd. realmente no tiene ni idea de cómo se compila el núcleo.

  ·  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 estándares, pero por si acaso...
  También se asume que conoce la organización 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
  información es importante, y no cambiará a menos que reparticione el
  disco, añada uno nuevo, reinstale el sistema o similar.

  La última versión de producción del núcleo que se conoce ahora mismo
  es la 2.0.10 (-- 2.0.27 es la última versión estable al día de hoy, 22
  de Diciembre de 1996.--) , de manera que nuestros ejemplos irán para
  esa versión.

  Se intenta que tampoco dependa mucho de esto, pero si Vd. usa una
  versión distinta habrá siempre algunas diferencias, ya que el núcleo
  está en continuo desarrollo. Esto no debe crear problemas, si acaso un
  ligero despiste al principio.

  Hay dos versiones de las fuentes del núcleo de Linux: las de
  producción y las de desarrollo. Las versiones de producción empezaron
  a numerarse en la 1.0.x y siempre se nombran con número 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 versión
  ASCII de este documento, no verá diferencia alguna). Los comandos son
  entrecomillados (con ` ') lo que causa un problema con la puntuación:
  al acabar frases con un comando, el estilo americano pone el punto
  dentro de las comillas, lo que confundirá a algún lector creyendo que
  hay que teclear también el punto (algo de sentido común, aunque en
  realidad pretenden que el ``sentido común'' sea solo el estilo
  americano de puntuación). Esto se soluciona no poniendo tal punto,
  aunque no sea correcto ortográficamente. Por ejemplo, pondremos `make
  config' y no `make config.'

  2.  Preguntas y respuestas importantes

  2.1.  Pero, ¿qué hace el núcleo?

  El núcleo de Unix actúa 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.
  Además, proporciona una interfaz portable para que los programas
  hablen fácilmente con su hardware.

  Realmente, el núcleo hace más cosas, pero las anteriores son las más
  importantes.

  2.2.  ¿Por qué puedo necesitar actualizar el núcleo?

  Los núcleos nuevos normalmente ofrecen la posibilidad de entenderse
  con más accesorios hardware (o sea, incluyen más manejadores), se
  ejecutan más rápidamente, son más estables o corrigen errores de otras
  versiones. Mucha gente se actualiza el núcleo para poder usar nuevos
  manejadores que necesitan o librarse de ``bugs'' de la versión que
  usaban.

  2.3.  ¿Qué hardware nuevo soportan los nuevos núcleos?

  Véanse 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 distribución estándar, pero no todo,
  pues algunos son módulos cargables en ejecución (como manejadores de
  PCMCIA) y se mantienen y distribuyen por vías distintas.

  2.3.1.  Anexo de la revisión.

  Actualmente, muy pocos módulos (los no-oficiales) no están incluidos
  en los fuentes oficiales del kernel. Prácticamente, 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 traducción.  --) :

               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é versión de gcc  y libc  necesito?

  Linus recomienda una en el fichero README de las fuentes del núcleo.
  Si no la tiene, probablemente tenga que actualizarse las librerías
  libc, algo que tampoco es difícil.

  2.5.  ¿Qué es un módulo cargable?

  Hay partes del código del núcleo que no se enlazan directamente en el
  núcleo. Se compilan por separado y luego se incorporan al núcleo 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 día
  la tendencia es modulizar todos los controladores posibles, salvo
  aquellos estrictamente necesarios para arrancar (ext2, ide, o SCSI,
  según 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.  ¿Cuánto espacio en disco necesito?

  Depende de su configuración. La versión 2.0.10 del núcleo 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 configuración 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 añadimos las fuentes comprimidas,
  serán 36 MB. En otro sistema con menos cosas puede ocupar menos.
  Además, un núcleo nuevo tendrá por lo general muchos más ficheros que
  el antiguo, con lo que debe asegurarse de que hay espacio de disco
  suficiente (además, con los precios que tienen ahora los discos, me
  puedo permitir el recomendarle que se compre un disco nuevo para el
  Linux).

  2.7.  ¿Cuánto se tarda en compilar?

  Para mucha gente, se tarda ``muchísimo''. 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 núcleo 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 televisión (o lo que se le
  ocurra (-- O ponerse a hacer cualquier cosa; para eso estamos en
  multitarea :-) --) )  mientras se compila el núcleo. Otra posibilidad
  es compilarlo en un PC más rápido que el suyo, de algún amigo.

  3.  Cómo configurar el núcleo.

  3.1.  Obtención de los fuentes.

  Se pueden obtener las fuentes por FTP anónimo de
  ftp://ftp.funet.fi/pub/OS/Linux/PEOPLE/Linus/, en un ``mirror'' (-- En
  España contamos con el veloz y magnífico ftp://sunsite.rediris.es--) o
  en otros servidores.  Típicamente tienen el nombre linux-x.y.z.tar.gz,
  donde x.y.z es el número de versión. Las versiones se encuentran en
  directorios v1.1, v1.2 y v1.3 (-- Y 2.0 y 2.1--) . El número mayor es
  el de la última versión, en este caso versión 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

  ·  España: 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.  Descompresión 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 versión
  actual x.y.z la puede obtener con el comando uname -r).  Es importante
  que antes de descomprimir las nuevas fuentes no haya ningún directorio
  /usr/src/linux.

  Ahora, en /usr/src, descomprima las fuentes con

       tar xvfzp linux-x.y.z.tar.gz

  (si sólo tiene un fichero .tar, sin .gz, elimine la z del comando
  tar). Los contenidos del fichero se expandirán en /usr/src/linux. Vaya
  ahora a ese directorio y lea el fichero README. Encontrará una sección
  ``INSTALLING the kernel''. Siga las instrucciones que allí se digan
  (aunque en las siguientes líneas le diremos cómo tiene que hacer casi
  todo esto).

  3.3.  Configuración del núcleo

  Nota: Este texto es parcialmente una repetición 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 configuración 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 revisión 2.1.

  Si los fuentes que posee son superiores al 2.0.x, existen dos métodos
  bastante más agradables e interactivos de llevar a cabo la
  configuración; invocando desde modo texto, en el mismo directorio
  mencionado anteriormente

       make menuconfig

  Iniciará un colorido programa (escrito con lxdialog) muy agradable y
  bastante más funcional que el make config a secas, para llevar a cabo
  la configuración 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 módulo. 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 gráfico programa de selección
  y configuración del kernel bajo X Window ;-).

  Aquí seguro que sabrá manejarse a golpe de ratón sin problema alguno;
  las opciones modularizables tendrán tres casillas posibles a rellenar:
  y indica que se incluirá en la parte monolítica del kernel; m que lo
  hará como módulo, y n que no será seleccionado.

  3.4.  Continuación

  Ahora  (-- Lo que sigue está dirigido a los usuarios (¿masoquistas?
  del make config, si emplea make menuconfig o make xconfig encontrará
  mucho más intuitiva la configuración, si bien debe leer a continuación
  qué significan las opciones.--) se trata de contestar las preguntas,
  normalmente con sí (`y')  o no (`n'). Los manejadores de dispositivos
  incorporan, además, la opción de módulo (`m'), opción interesante
  puesto que no incorpora el manejador al núcleo en tiempo de
  compilación, sino que se hace durante la ejecución del mismo, cuando
  sea necesario (por ejemplo, cargar el módulo PPP solo cuando vayamos a
  usar el módem).

  Algunas otras opciones obvias o poco importantes no son descritas
  aquí.  Vea la sección ``'' para descripciones de otras muchas.

  Además, cuando configure el núcleo 2.0.x, podrá poner la opción `?',
  lo que le dará una breve descripción de la misma.

  3.4.1.  Emulación de coprocesador ( Kernel math emulation )

  Si no tiene coprocesador matemático (o un 486), debe contestar `y' a
  esto.  Si tiene coprocesador y contesta `y' la emulación será
  instalada pero no usada; funcionará, pero le ocupará memoria
  innecesariamente. Además, he oído que la emulación 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 opción específica 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 más que el
  antiguo. Se supone que los nuevos manejadores mejoran también
  velocidad y fiabilidad, en especial si dispone de dispositivos EIDE.

  3.4.3.  Soporte de redes ( Networking support )

  En principio, contestaría afirmativamente si la máquina 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. Después 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 más de
  16 MB de RAM. Contestar `y' en el caso (raro) de que tenga uno de
  éstos.

  3.4.5.  Comunicación 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 núcleos, la opción era "Usar el parámetro -m486 en
  el compilador" (Use -m486 flag for 486-specific optimizations)

  Tradicionalmente, esto era una optimización compatible con todos los
  chips, aunque más rápido en la CPU elegida (y en todo caso, ocupaba
  algo más). Actualmente, esto puede no ser cierto, con lo que deberá
  elegir siempre la CPU que tenga (aunque la versión de 386 funcionará
  en todas las máquinas).

  3.4.7.  Soporte SCSI ( SCSI support )

  Si tiene dispositivos SCSI, conteste `y'. Se le preguntarán entonces
  más cosas: soporte de CD-ROM, discos y qué clase de adaptador utiliza.
  Vea el documento SCSI-HOWTO para más 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 versión del sistema extendido, pero ya no
  se usa. No necesita seleccionarla.

  Second extended - Este es el sistema más usado. Seguramente lo usará
  Vd. también. Seleccione `y'. (-- Ojo con seleccionarlo como módulo;
  aunque se puede, el sistema de ficheros en el que esté su partición /
  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 - Selecciónelo si quiere acceder desde Linux a sus particiones
  de MS-DOS o quiere montar disquetes de ese sistema.

  umsdos - Este sistema permite añadir a un sistema MS-DOS las
  características típicas de Unix como nombres largos o enlaces. Sirve
  para quienes quieran instalar Linux en la partición DOS, pero nada
  más.

  /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 núcleo, 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 máquina está en red y quiere acceder a sistemas de
  ficheros remotos con NFS, conteste `y' a esta pregunta.

  ISO9660 - Típico en los CD-ROMs. Si tiene un CD-ROM, seleccione esta
  opción.

  OS/2 HPFS - En el momento de escribir esto, el soporte HPFS es de sólo
  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 edición del Howto original (Rev. 2.1):

  quota support - Selecciónelo si quiere administrar el espacio que
  consumen en disco los usuarios del sistema; necesitará además 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 sólo funcionará
  sobre sistemas de ficheros ext2.

  mandatory lock support: Cambia el algoritmo para proporcionar un
  sistema de bloqueos más seguro, a fin de evitar la corrupción de
  ficheros por parte de las aplicaciones en los accesos a disco
  simultáneo. 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 característica.

  vfat. En conjunción con el sistema de fichero fat o msdos nos
  permitirá acceso a las particiones de w95, con soporte de nombres
  ``largos'' y demás. En el momento de escribir esto, se desconoce si
  soportará la ``nueva'' fat32 del recién aparecido w95-OSR2.

  SMB filesystem support: En conjunción con el paquete samba (--  Cuyo
  COMO está disponible en castellano, mire en la sección ``'' para más
  información.--) nos permitirá montar volúmenes compartidos por
  clientes de red NetBios.

  SMB w95 bug workaround - :-) qué decir... corrije un bug que
  experimentan los volúmenes 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 sólo lectura.

  Esta opción contiene otras dos opciones adicionales relacionadas con
  las tablas de partición de los discos según provengan de uno u otro
  *nix.  Escoja el menú en línea help para mayor información.

  NCP filesystem support - Permite montar volúmenes 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 dinámicamente, 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 módulo no oficial que permite acceso a sistemas de
  ficheros NTFS, usados por wNT, su autor es Martin von Löwis,
  loewis@informatik.hu-berlin.de. Su nivel de soporte es ciertamente
  rudimentario todavía, pero siempre es bueno saberlo...

  más información 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 línea; la palabra que sigue a `type' es el tipo de
  sistema usado. En este ejemplo, los sistemas raíz (/) y /usr usan el
  sistema ``second extended'', además usamos sistema ``proc'' y hay
  montado un disquete MS-DOS.

  Para saber qué sistemas de ficheros usa en el núcleo actual puede
  teclear `cat /proc/filesystems' siempre y cuando tenga al menos
  soporte proc.

  Otros sistemas de ficheros más raramente usados ocupan también mucho.
  Quizás le interese meterlos como módulos (vea la correspondiente
  sección, y vea también la sección ``'' para saber por qué no se
  recomiendan núcleos que ocupen mucho).

  3.4.10.  Manejadores de tipo carácter ( Character devices )

  Aquí se activan los manejadores para impresoras (por puerto paralelo),
  ratones de bus, ratones PS/2 (usado también en muchos trackballs de
  los portátiles), algunos manejadores de cintas y otros.  Conteste
  según su hardware.

  Nota: ``Selection'' es un programa que le permite usar el ratón para
  cortar y pegar texto entre consolas virtuales, fuera de las X-Window.
  Actualmente no es una opción de configuración, sino un estándar.

  Nota 2: `Selection' está bastante obsoleto. Es mucho mejor el programa
  ``gpm'' (-- General Purpose Mouse support, Soporte Genérico 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 oír el ladrido del `biff', conteste `y' y
  después otro programa de configuración le preguntará acerca de la
  tarjeta de sonido que tiene. Una observación: cuando le pregunte si
  quiere instalar la versión completa del manejador, conteste `n' y
  ahorrará memoria, aunque tendrá que elegir qué características desea
  incluir. Le recomiendo aquí que lea el Sonido-Como (-- Disponible en
  castellano, obviamente--)

  donde encontrará mucha más información.

  3.4.12.  Otras opciones de configuración

  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 más 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 anónimo en:

  ftp://sunsite.unc.edu/pub/Linux/kernel/config/krnl_cnfg_hlp.x.yz.tgz

  donde x.yz se refiere a la versión del núcleo.  En las últimas
  versiones (2.0.x) se incluyen estos documentos entre los ficheros de
  las fuentes del núcleo (directorio Documentation/...).

  3.4.13.  Kernel hacking

  Traducción del fichero README de Linus:

  La configuración ``kernel hacking'' suele dar lugar a un núcleo más
  grande y/o lento, y puede hacerlo menos estable al configurar algunas
  rutinas especiales para encontrar errores del núcleo (kmalloc()).
  Para un núcleo de ``producción'' 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
  núcleo 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 podrán cambiarse con el comando
  `rdev' una vez que el núcleo esté compilado.

  4.  Compilación del núcleo

  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 demás de la versión anterior.
  No olvidar este paso.

  4.2.  El momento de compilar

  Después de preparar dependencias, puede ejecutar `make zImage' o `make
  zdisk' (esta es la parte que tarda más tiempo). `make zImage'
  compilará el núcleo y lo dejará comprimido en arch/i386/boot/zImage
  junto a otros ficheros. Con `make zdisk' el nuevo núcleo se copiará
  además en el disquete que esté puesto en la disquetera ``A:''.
  `zdisk' es interesante para probar núcleos; si explota (o simplemente
  no hace nada) se quita el disquete de la disquetera y podrá arrancar
  el núcleo antiguo. Además sirve para arrancar si borró accidentalmente
  el núcleo del disco duro. También puede usarlo para instalar nuevos
  sistemas simplemente volcando el contenido de un disco en otro (``¡¡
  todo esto y más !! Ahora, ¿cuánto pagaría?'').

  Los núcleos recientes están comprimidos, con una `z' comenzando su
  nombre. Un núcleo comprimido se descomprime automáticamente al ser
  ejecutado.

  4.3.  Otras opciones del ` make '

  Con `make mrproper' hará una limpieza mucho más ``intensa''.  Suele
  hacer falta cuando se actualiza (parchea) el núcleo. Pero esta opción
  borra también su fichero de configuración del núcleo, así que guarde
  una copia del correspondiente fichero .config si cree que le interesa.

  La opción `make oldconfig' intentará configurar el núcleo con un
  fichero de configuración anterior (-- A partir del 2.0.xx no es
  necesario, make recuerda la última configuración--)

  evitando todo el proceso del `make config'. Si no ha compilado
  anteriormente el núcleo o no tiene un fichero de configuración
  anterior, no lo elija pues normalmente querrá algo que se salga de la
  configuración por defecto.

  Para compilación con módulos, vea la sección correspondiente.

  4.4.  Instalación del núcleo

  Una vez que tenga un nuevo núcleo 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 núcleo ejecutando
  LILO, quedando listo para rearrancar, pero esto solo funcionará si
  LILO está bien configurado para su sistema: el núcleo es /vmlinuz,
  LILO está en /sbin y la configuración 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 configuración tiende a
  confundir a la gente. Observe el fichero de configuración (estará en
  /etc/lilo.conf o en /etc/lilo/config para versiones más antiguas), y
  vea cuál es la configuración actual. El fichero de configuración será
  como éste:

       image = /vmlinuz
               label = Linux
               root = /dev/hda1
               ...

  La línea `image =' apunta al núcleo instalado actualmente. Casi
  siempre es /vmlinuz. `label' es el identificador usado para
  seleccionar qué sistema arrancar, y `root' es el disco o partición a
  usar para el directorio raíz. Haga una copia de seguridad de su
  antiguo núcleo y copie en /vmlinuz o donde diga el fichero anterior el
  fichero zImage que haya generado el proceso de compilación.  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 más sobre la configuración de LILO, o no tiene LILO,
  obtenga la versión más reciente de su servidor FTP favorito y siga las
  instrucciones que le acompañan.

  Para arrancar uno de sus antiguos núcleos, copie las líneas anteriores
  incluyendo `image = xxx' al principio del fichero de configuración 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 línea en el fichero
  con `delay=x' donde x son las centésimas de segundo que LILO esperará
  antes de arrancar con la primera opción, de modo que pueda
  interrumpirse (con la tecla SHIFT) y seleccionarse qué núcleo desea
  arrancar (tecleando la etiqueta (label) asignada).

  Inciso de la revisión 2.1

  Una forma muy cómoda de llevar todo el tema del LILO, si lo tenemos
  instalado, y las compilaciones, etc, es añadir 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 continuación con
  lo cual lo hacemos todo automágicamente.

  La órdenes make modules; make modules_install compilarán los módulos
  que hayamos seleccionado, y los instalarán. No olvidar ejecutar depmod
  -a en cuanto hayamos arrancado con dicho núcleo.

  En caso de que estemos compilando por segunda vez una misma versión de
  núcleo, y hayamos variado el número de módulos a compilar, es posible
  que la ejecutar make dep nos encontremos con un mensaje de error; esto
  se debe a que los antiguos módulos que no hayamos compilado ahora no
  son borrados. Pueden borrarse tranquilamente.

  5.  Parchear el núcleo

  5.1.  Aplicación de un parche

  Las actualizaciones incrementales del núcleo se distribuyen como
  parches (-- No tomar con sentido peyorativo el término ``parche'', no
  se trata de un ``remiendo'', o ``chapuza'', lo que hacemos al
  ``parchear'' es modificar directamente los fuentes del núcleo,
  incluyendo las variaciones que se hayan introducido.ver el comando
  diff y patch para más referencias.--) Por ejemplo, si tiene la versión
  1.1.45 y ve que existe un parche `patch46.gz', con ese fichero podrá
  actualizarse a la 1.1.46.  Debería antes de nada guardar una copia del
  árbol de directorios de las fuentes del núcleo 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á rápida (o lentamente, depende del
  ordenador) una serie de mensajes que le dicen que se intentan aplicar
  los cambios, cuáles tienen éxito y cuáles no.  Normalmente, esto irá
  bien y no habrá que preocuparse de tanto mensaje, aunque con la opción
  -s solo saldrán los mensajes de error.

  Inciso de la revisión 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 más un montón de parches; para evitarse el tener que parchear
  uno a uno, puede invocar lo siguiente desde la línea 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 línea 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 tendrán
  extensión `#'. Con el comando find encontrará fácilmente los ficheros:

       find . -name '*.rej' -print

  imprime todos los ficheros .rej que están 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 más en el comando patch. Con -s, como hemos
  dicho, se suprimen todos los mensajes salvo los errores. Si guarda las
  fuentes del núcleo en otro lugar que no sea /usr/src/linux, con patch
  -p1 se parchearán las cosas limpiamente. Otras opciones de interés se
  encuentran bien documentadas en las páginas man.

  5.2.  Si algo va mal

  El problema más común es que una ejecución de patch intente modificar
  el fichero `config.in' y no parezca quedar bien, porque haya hecho
  cambios en él de acuerdo con su máquina. 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 líneas.  Edítelo, 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
  versión actual. Si responde `y', intentará degradar sus fuentes, y
  normalmente fallará, obligándole 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

  Después de algunos parches, los ficheros .orig empezarán a abultar
  mucho. Por ejemplo, si estamos ya con el núcleo 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 método ``más seguro pero más pesado'':

  find . -name '*.orig' -print0 | xargs --null rm --

  5.4.  Otros parches

  Hay otros parches (los llamaremos ``no estándares'') que si se
  aplican, probablemente provocarán que los parches de Linus no
  funcionen correctamente, teniendo que retroceder, corregir las fuentes
  o el parche, instalar de nuevo las fuentes, o una combinación de lo
  anterior.

  inciso de la R. 2.1: Existe una página con información 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 algún
  dispositivo esotérico o implementación reciente. Tenga en cuenta, no
  obstante, que la mayoría serán para el kernel actual de desarrollo,
  aunque puedan aplicarse algunos ( eiste otra página en la misma
  localización citada anteriormente) en el kernel de producción.

  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 núcleos. Como
  ahora muchos manejadores se pueden cargar como módulos, los parches ya
  son menos necesarios.

  6.  Paquetes adicionales

  El núcleo de Linux tiene más características no documentadas en el
  código; éstas se utilizan normalmente vía parches no estándares.
  Algunas características se listan a continuación.

  6.1.  kbd

  La consola de Linux tiene más prestaciones que las conocidas, como
  cambiar las fuentes, cambiar el modo de vídeo, 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 están las fuentes del núcleo.

  6.2.  util-linux

  Rik Faith, faith@cs.unc.edu recopiló una gran colección 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 núcleo. Como dice Rik,
  no lo instale sin pensarlo, instalarlo todo sin necesidad puede
  causarle después algunos problemas.

  6.3.  hdparm

  Son programas hechos con el núcleo oficial, para optimizar y jugar con
  con los parámetros del disco duro, distribuyéndose por separado.

  7.  Problemas típicos

  7.1.  make clean

  Si su nuevo núcleo hace cosas raras, puede ser que se le olvidara
  hacer `make clean' antes de compilar. Los síntomas suelen ser extraños
  cuelgues, problemas de E/S... asegúrese también de hacer `make dep'.

  7.2.  Núcleos muy lentos o muy grandes

  Si su núcleo consume mucha memoria, o la compilación 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 típico 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 cuánta memoria ocupa su núcleo comparando los valores
  obtenidos al ver el fichero /proc/meminfo, o con el comando dmesg o el
  log de los mensajes del núcleo, 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 núcleo no compila

  Si no compila, puede ser por un fallo de parcheo, u otro tipo de
  corrupción en los ficheros fuente. Además, la versión de gcc puede no
  ser correcta o los propios ficheros de #include. Asegúrese que los
  enlaces simbólicos necesarios (descritos en el fichero README de
  Linus) existen. En general, cuando un núcleo estándar no se puede
  compilar, es porque hay algún problema serio en el sistema, y será
  necesario reinstalar algunos programas.

  También puede suceder que le den errores compilando el núcleo 1.2.x
  con un gcc ELF (2.6.3 o superior). Se puede intentan arreglar
  añadiendo las siguientes líneas 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 solución 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 núcleo 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 raíz (/)
  tiene, dónde está y su tipo (por ejemplo, ext2 o minix). En este
  ejemplo, también hay que saber dónde están los ficheros de /usr, en
  otra partición.

  En el siguiente ejemplo, / es /dev/hda1, y el sistema con las fuentes
  del núcleo 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, según el
  caso) se verá en otro ejemplo.

  En primer lugar, arranque con un disquete de instalación o de rescate,
  y monte el sistema de ficheros que contenga el núcleo 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 núcleo 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 núcleo 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 núcleo está en el
  directorio raíz (por ejemplo /vmlinuz), puede usarlo para un disquete
  de arranque. Suponiendo las condiciones anteriores, haríamos los
  cambios siguientes en el ejemplo anterior: /dev/hda3 por /dev/hda1 (el
  sistema raíz), /mnt/src/linux por /mnt, y `if=zImage' por
  `if=vmlinuz'. El resto puede ignorarse.

  Usar LILO con discos grandes (de más de 1024 cilindros) puede dar
  problemas. Le recomendamos que lea el mini-HOWTO sobre LILO para más
  información. (-- Así como el Discos-Grandes-mini-Como, disponible en
  castellano, ver sección ``''.--)

  7.6.  Mensaje de aviso: ` warning: bdflush not running '

  Es un problema muy importante. Desde la versión 1.0 del núcleo (20 de
  Abril de 1994), hay un programa, `update' que, periódicamente, vuelca
  al disco la caché de buffers del sistema. Obtenga las fuentes de
  `bdflush' (está donde se distribuyen las fuentes del núcleo) e
  instálelas (quizás deba usar mientras lo hace el núcleo antiguo).
  Después del rearranque, se instalará en memoria como `update' y ya no
  habrá más avisos.

  7.7.  Salen mensajes sobre símbolos 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 añadiendo las siguientes líneas 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 núcleo 1.2.x con librerías 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 más común es tener el dispositivo en una interfaz IDE sin
  compañía 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 núcleos 1.2.x no saben
  manejar esto (tener, en la práctica, tres IDE).

  En las versiones 1.3.x se empieza a intentar soportar esto, pero está
  en desarrollo y en todo caso no incluye autodetección. 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 debería funcionar.

  Si por el contrario hay en total tres interfaces, obtenga un núcleo
  1.3.x (por ejemplo, el 1.3.57 lo incluye) y lea el documento
  drivers/block/README.ide, donde encontrará más información.

  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 función de cortafuegos no funciona en el núcleo 1.2.0

  Actualícese 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.
  Además, deberá hacer una entrada en terminfo.

  7.13.  Algunas cosas no compilan después de la actualización

  El núcleo incluye ciertos ficheros #include (acaban en referencian con
  la línea:

       #include <linux/xyzzy.h>

  Normalmente, hay un enlace simbólico `linux' de
  /usr/include al directorio /usr/src/linux/include/linux.  Si no existe
  tal enlace, o apunta a un lugar incorrecto, muchas cosas compilarán
  mal. Por ejemplo, el problema es obvio si borró las fuentes del núcleo
  porque le ocupaban mucho. Otro problema puede tener relación 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á más cómodo
  descomprimir las fuentes del núcleo añadiendo la opción -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 actualización a la versión 2.0.x

  La versión 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 información muy
  importante sobre esto, como lo referente a los paquetes que debe
  actualizar (gcc, libc...).

  9.  Módulos

  Los módulos del núcleo cargables le permitirán simplificar la
  configuración del núcleo y ahorrar memoria. Sirven para añadir
  dinámicamente nuevos soportes de sistemas de ficheros o manejadores, a
  un núcleo que ya está corriendo.

  9.1.  Instalación de las utilidades asociadas

  Estas utilidades están disponibles allí donde esté el núcleo, como
  modules-x.y.z.tar.gz. Elija el que corresponda a su núcleo.
  Descomprímalo con `tar zxvf modules-x.y.z.tar.gz', cambie al
  directorio que crea (modules-x.y.z), léase el fichero README, y siga
  las instrucciones de instalación (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 más
  detalle.

  insmod inserta un módulo en el núcleo arrancado. Generalmente los
  módulos son ficheros .o; el manejador ejemplo es drv_hello.o, con lo
  que para insertarlo se usaría `insmod drv_hello.o'. Para ver los
  módulos cargados, pruebe lsmod. La salida será como ésta:

        blah# lsmod
        Module:#pages:Used by:
        drv_hello1

  `drv_hello' es el nombre del módulo, que usa una página (4k) de
  memoria, y no hay módulos que dependan de él en este momento. Para
  quitar el módulo, teclee `rmmod drv_hello'. Vea que rmmod necesita el
  nombre del módulo, no del fichero. Ese nombre lo obtiene al listar los
  módulos instalados. Las otras utilidades de módulos se encuentran
  documentadas en los manuales on-line.

  Inciso de la revisión 2.1

  Tres cosas relativas a módulos:

  ·  Siempre que compile un kernel nuevo, y sus correspondientes módulos
     (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 módulos, es invocar el comando

       depmod -a

  ·  Desde la aparición de kerneld, el andar insertando y retirando
     módulos de memoria a mano no se estila mucho, en su lugar es
     kerneld quien se encarga de esto. Para hacer uso de él, asegúrese
     de responder sí al soporte kerneld durante la configuración del
     núcleo, y llámelo desde los scripts de inicialización del sistema,
     que están típicamente en /etc/rc.d/rc.x.

     Sigue pudiendo cargar módulos a voluntad; el comando recomendado es
     modprobe modulo, que tendrá en cuenta las dependencias entre
     módulos, cargando todos los necesarios (como por ejemplo el módulo
     slhc en el caso de que queramos cargar el módulo ppp.)

     Atención: El soporte de compresión CCP (bsd_comp) no está incluído
     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 después 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.  Módulos distribuidos con el núcleo 1.2.2

  Algunos sistemas de ficheros, manejadores SCSI y de tarjetas de red,
  así como otras utilidades son cargables como módulos. Para usarlos, lo
  primero, no incluirlos en el núcleo principal (al compilarlo, no decir
  que `sí' al manejador correspondiente durante el `make config').
  Luego se arranca ese núcleo (-- Esto es obsoleto en el caso de los
  núcleos 2.0.x, recuérdelo; 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á módulos 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 versión del
  núcleo.

  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 cargaría el módulo con insmod (-- Mejor
  modprobe, que como hemos comentado, tendrá en cuenta las dependencias
  entre módulos que ha generado depmod -a, cargándolos todos.--) y se
  descargaría al finalizar. Esto ahorrará unos 50K de memoria en la
  operación normal del núcleo. Notar que el sistema Minix siempre deberá
  estar dentro del núcleo (no como módulo) si se quiere hacer un
  disquete de rescate con él.

  10.  Otras opciones de configuración.

  Esta sección contiene información sobre otras opciones de
  configuración 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 opción. Más información 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
  también pretende conseguirlo (-- De hecho, es el estándar 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
  información de versión en los símbolos de los módulos): en el pasado,
  los módulos se recompilaban con cada nuevo núcleo. Si responde
  afirmativamente, podrá usar módulos de otra versión. Para más detalle,
  consulte el fichero README.modules.

  Enable loadable module support Responda que sí a esto si pretende
  hacer uso de los módulos cargables en tiempo de ejecución.

  Kernel daemon support (e.g. autoload for modules)Esto es absolutamente
  necesario si pretende hacer uso de kerneld. En breve se dispondrá de
  una versión en castellano del Kerneld Mini-HOWTO. Ver sección ``''.

  10.2.  Opciones de red

  Se describen en el documento NET-2-HOWTO (o NET-algo-HOWTO).

  11.  Consejos y trucos

  11.1.  Redirección de la salida de compilación 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 línea 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 teclearía,

        (comando) >[2=1] | tee (fich)

  11.2.  Instalación condicional del núcleo

  Hay más métodos para probar un nuevo núcleo que no sea usar un
  disquete. A diferencia de otros Unix, LILO puede arrancar cualquier
  fichero con el núcleo que se encuentre en el disco (-- Así como montar
  particiones de disco distintas según 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 documentación de
  LILO para más detalle).  Puede tener al final de /etc/lilo.conf una
  línea 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 selección 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 núcleo elegido.

  Si desea tener varios fuentes de núcleos distintos en el disco
  (¡cuidado!, le puede suponer muchos megas), lo normal es tener cada
  versión x.y.z en el directorio /usr/src/linux-x.y.z y ``seleccionar''
  o activar cada núcleo sin más que redefinir el enlace simbólico
  /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).
  Asegúrese que /usr/src/linux no es ya un directorio, sino como mucho
  antiguos enlaces simbólicos. De otro modo, el resultado del anterior
  comando no será el esperado.

  11.3.  Actualizaciones del núcleo

  Russell Nelson, nelson@crynwr.com lleva una lista que resume los
  cambios en las nuevas versiones del núcleo. Son breves pero
  interesantes antes de decidirse por instalar una nueva versión. Se
  puede encontrar por FTP anónimo en ftp://ftp.emlist.com/pub/kchanges o
  a través del URL:

  http://www.crynwr.com/kchanges

  12.  Otros documentos COMO  que pueden serle útiles

  ·  Sonido-Como (-- Aquellos cuyo nombre incluya la palabra ``Como''
     están 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 portátiles

  ·  ELF-HOWTO: ELF: qué es, cómo migrar...

  ·  Hardware-HOWTO: revisión del hardware soportado por Linux

  13.  Miscelánea

  13.1.  El autor

  El autor y encargado de mantener el original de este documento en
  Inglés es Brian Ward bri@blah.math.tu-graz.ac.at. Envíenme cualquier
  comentario, añadidos o correcciones que considere oportunos. En
  particular, lo que más 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 página 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 envía
  alguna consulta, trate de ser lo más claro y detallado posible en su
  mensaje. Por ejemplo, si se trata de hardware que no funcione, trate
  de explicarme con el máximo detalle la configuración de que se trata.
  No se preocupe si hace preguntas simples, puesto que si no se la
  pregunta a nadie ¡nunca tendría respuesta!. Agradeceré también las
  sugerencias.

  Si me escribe y no obtiene respuesta en mucho tiempo (digamos, más de
  tres semanas), puede que accidentalmente haya borrado su mensaje (lo
  siento, inténtelo 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 máquinas 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 también de Intel (todo esto es una
  lista de lo que conozco, pero ciertamente no es una recomendación para
  su equipo, aunque si quiere, puede preguntarme :-) ).

  La versión -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
  disposición para resolver problemas que estén en mi mano, y sobre
  todo, aceptar sugerencias sobre esta traducción, perteneciente al
  proyecto LUCAS (LinUx en CAStellano) coordinado por Ramón Gutiérrez.
  Actualmente, se han preparado versiones SGML, HTML y ASCII.

  Nota de la revisión 2.1: Ver la sección ``''. Me sumo a las propuestas
  anteriores. A partir de esta revisión, 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 comparación 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 electrónico y también en el WWW:

  http://lml.ls.fi.upm.es/~jjamor.

  13.2.  Pendiente de hacer

  La sección ``'' es pequeña. Espero poderla agrandar gracias a sus
  sugerencias.

  Lo mismo para la sección ``''.

  Hay que añadir más información acerca de recuperación de cuelgues y
  errores.

  13.3.  Colaboraciones

  Se incluyó una pequeña 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
  añadidos.

  nat@nataa.frmug.fr.net (Nat Makarevitch): mrproper, tar -p.

  boldt@math.ucsb.edu (Axel Boldt): recopiló descripciones de
  configuraciones del núcleo en la red, luego me envió la lista.

  lembark@wrkhors.psyber.com (Steve Lembark): sobre múltiples 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): traducción al Francés.

  simazaki@yu-gate.yamanashi.ac.jp (Yasutada Shimazaki): traducción al
  Japonés.

  jjamor@lml.ls.fi.upm.es (Juan José Amor Iglesias): traducción al
  Castellano. ;-)

  donahue@tiber.nist.gov (Michael J Donahue): errores tipográficos,
  ganador de la ``sliced bread (-- Proviene de la popular expresión
  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
  documentación de libre distribución.

  dak@Pool.Informatik.RWTH-Aachen.DE (David Kastrup): El tema del NFS.

  La gente que me ha enviado correo con preguntas y problemas también 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
  también intactas para respetar los términos 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 categoría de ``versiones
  modificadas''.

  Garantías: 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 día. Con este
  mismo propósito se recomienda también a los traductores que contacten
  con el autor.

  14.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.


El presente directorio contiene las traducciones efectuadas hasta ahora al
castellano; existen más documentos cuya traducción está en marcha. 

Recomendamos encarecidamente que haga uso de las versiones *.ps o *.dvi
(para imprimir) o *.html. Las que están 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 sección incompleta en los
Indices Generales. 

Además, es una pena usar ASCII plano disponiendo de las otras versiones, y
esa es precisamente la razón 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 técnicas para
  hacer de linux un sistema mas fácil 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.      Introducción

  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.    Cómo puedo hacer que el sistema no ejecute el fsck en cada
  arranque? Dale Lutz, dal@wimsey.com

  2.4.    Cómo evitar fsck's causados por "device busy" al arrancar. Jon
  Tombs, jon@gtex02.us.es

  2.5.    Cómo imprimir una página con margen para hacer agujeros. Mike
  Dickey, mdickey@thorplus.lib.purdue.edu

  2.6.    Un método para buscar a través de árboles de ficheros una
  expresión regular dada, Raul Deluth Miller, rockwell@nova.umd.edu

  2.7.    Un script para limpiar después 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.    Cómo configurar xdm's chooser para seleccionar host. Arrigo
  Triculzi, a.triulzi@ic.ac.uk

  4.      La traducción

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Bienvenido al Linux Tips HOWTO, un lugar donde encontrar rápidas
  respuestas a preguntas no cubiertas en howtos mas específicos sobre
  linux.  En el Tips Howto, también encontrarás pequeñas y elegantes
  artimañas para hacer el uso y administración de un sistema Linux
  todavia mas fácil. No obstante, como esta es sólo la segunda versión
  del Tips Howto, el número de ayudas es aún muy pequeño. La próxima
  versión 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 rápida 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 característica
  del GNU make versión 3.70 que no me gusta. VPATH actúa raramente si le
  das un path absoluto. Existe un patch extremadamente sólido que
  arregla esto, el cual se puede obtener de Paul D. Smith,
  psmith@wellfleet.com. Él también pone la documentación y el patch
  después de cada revisión del GNU make en el servidor de newsgroups al
  cual tengo acceso.

  2.3.  arranque? Dale Lutz, dal@wimsey.com Cómo puedo hacer que el sis­
  tema no ejecute el fsck en cada

  ¿Cómo 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 solución
  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 añade sólo-lectura al setup del linux en
  tu fichero de configuracion del lilo (normalmente /etc/lilo.conf)

  2.4.  Tombs, jon@gtex02.us.es Cómo 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 :

  Añade 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 razón,
  shutdown falla al matar todos los procesos y desmontar los discos,
  éstos estarán igualmente limpios al arrancar. Me ahorra un montón de
  tiempo al arrancar.

  2.5.  Cómo imprimir una página con margen para hacer agujeros. Mike
  Dickey, mdickey@thorplus.lib.purdue.edu

       #!/bin/sh
       # /usr/local/bin/print
       # una muestra de impresión 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
  método para buscar a través de árboles de ficheros una expresión

  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 después de usar programas que crean ficheros

  Aquí tenéis un sencillo script que desciente recursivamente un
  directorio borrando ficheros de auto-grabado y backup de emacs,
  ficheros .o, y ficheros .log de TeX. También 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 partición como una partición dos, y crea el fichero de
     swap del Windows en ella, pero no ejecutes windows todavía. (Hay
     que mantener el fichero de swap completamente vacío de momento,
     para poder comprimirlo bien).

  2. Arranca linux y graba la partición en un fichero.  Por ejemplo, si
     la partición 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. Añade 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

  Asegúrate de añadir una entrada para la partición de swap en el
  fichero /etc/fstab

  5. Si tu paquete init/reboot soporta /etc/brc o /sbin/brc añade lo
     siguiente a /etc/brc, si no, haz lo mismo a mano cuando quieras
     arrancar dos u os/2 y quieras convertir la partición de swap a la
     versión dos/windows:

       swapoff -av
       zcat /etc/dosswap.gz | dd of=/dev/hda8 bs=1k count=100

  Ten en cuenta que esto sólo escribe los 100 primeros bloques en la
  partición. He averiguado empíricamente que esto es suficiente.

  ¿Cuáles 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 automático, tienes que hacerlo a mano,
  y enlentece el proceso de rearrancar unos nanosegundos :-)

  3.2.  Cómo 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 líneas en la
     sección de startup:

       /usr/bin/X11/xdm
       exec /usr/bin/X11/X -indirect hostname

  2. Edita /usr/lib/X11/xdm/Xservers y comenta la línea que arranca el
     servidor en el terminal. p.ej, que comienza por 0:

  3. Rearranca la máquina y ya está todo.

  He añadido é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 razón puedes dejar un
  -nodaemon después de la línea de xdm. esto NO funciona para versiones
  posteriores.

  4.  La traducción

  La presente traducción ha sido realizada por Javier Gracia, FidoNet:
  2:343/143, componente del INSFLUG.

  En caso de querer colaborar en las diversas traducciones que se están
  llevando a cabo, ponte en contacto con:

  ·  Francisco José Montilla, pacopepe@insflug.org para el INSFLUG:
     www.insflug.org para colaboración en la traducción y autoría de
     COMOs, FAQs (PUFs en castellano).

  ·  LuCas, traducción de las guías (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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Guía de usuario de Linuxdoc-SGML
  Por Matt Welsh. Puesta al día por Greg Hankins, greg.hank­
  ins@cc.gatech.edu
  Montilla, pacopepe@insflug.org
  v1.5, 8 Marzo 1996

  Este documento es una guía 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 sólo fuente SGML. Esta guía documenta el paquete Linuxdoc-SGML en
  su versión 1.5.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Acerca de este documento.

  1.2.    ¿Por qué SGML?

  1.3.    Cómo funciona.

  2.      Instalación.

  2.1.    Instalación 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 Códigos ISO 8859-1

  3.      Redacción de Documentos con Linuxdoc-SGML

  3.1.    Conceptos Básicos

  3.2.    Caracteres Especiales

  3.3.    Entornos Code y Verbatim

  3.4.    Estructura Global del Documento.

  3.4.1.  El Preámbulo

  3.4.2.  Párrafos y Secciones

  3.4.3.  Finalizando el documento

  3.5.    Referencias Cruzadas

  3.6.    Fuentes (Tipográficas)

  3.7.    Listados

  3.8.    Más Información.

  4.      Anexo a la Traducción al Castellano.

  4.1.    Aspectos Importantes del SGML-LaTeX en Castellano

  4.1.1.  Tildes, Eñes, Etc.

  4.1.2.  Tamaño del Papel.

  4.1.3.  Los títulos de las Tablas de Contenidos, Bibliografía, etc.

  5.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Esta es una guía de usuario para el sistema de procesado de
  documentación linuxdoc-SGML, concebido para producir información
  relativa a LiNUX.  Consiste en una Definición 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 específico con d ocumentación relativa a
  LiNUX.

  linuxdoc-sgml no pretende ser un sistema genérico de procesado de
  documentación.  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 documentación genérico; He manipulado sus posibilidades con
  este propósito.

  Si se percibe una falta de generalidad en el sistema, se debe a esta
  razón. No hay nada que limite linuxdoc-SGML a la producción de
  documentación sobre LiNUX, pero todo lo producido con este sistem a
  tendrá un aspecto característico. Si se desea que la apariencia sea
  distinta, sugiero que se emplee un sistema más generalizado como el
  QWERTZ DTD, en combinación con las herramientas Linuxdoc-SGML.

  Uno de los objetivos de este sistema es hacer fácil la producción de
  documentos en distintos formatos. Hasta ahora, la mayoría de la
  documentación LiNUX había sido producida a través de edición manual.
  Un sistema como groff puede ocuparse del formate o para una versión
  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, házmelo saber, por favor! La idea es que no hagan
  falta demasiadas triquiñuelas para producir documentos agradables en
  múltiples formatos.

  El autor debe de tener que hacer lo mínimo posible.

  1.1.  Acerca de este documento.

  Este documento fue escrito usando el DTD linuxdoc-sgml. Contiene más o
  menos todo lo que se necesita saber para escribir documentos SGML con
  este DTD (definición de tipo de documento). Véase 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 específicamente
  para su posterior transformación 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 estándar
  proporciona DTDs para libros , artículos, y otras clases de
  documentación genérica.

  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 sección, subsección, un párrafo, o simplemente
  algo menor como texto remarcado. A diferencia del LaT eX, no obstante,
  estos elementos no son en modo alguno intrínsecos al SGML en sí mismo.
  La definición de documento linuxdoc-sgml viene a definir elementos muy
  similares a su equivalentes en LaTeX ---tiene secciones, subsecciones,
  ``entornos'' de texto y d emás---. 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 más al LaTeX.

  No dejarse confundir por esta analogía. SGML no es un sistema de
  formateo de documentación. No existe un ``formateador SGML'' en sí
  mismo.  El fuente SGML es sólo convertido a otros formatos para su
  procesado.  Además, el SGML por sí mismo lo únic o que hace es
  especificar la estructura del documento. No existen dispositivos o
  ``macros'' intrínsecos 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.  Cómo funciona.

  He aquí cómo procesar un documento con SGML y cómo funciona el DTD
  linuxdoc-sgml. Primero, se necesita una definición 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 propósitos.  El DTD únicamente configura la
  estructura del documento. Una pequeña porción 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 artículo consiste
  en una página de portada (titlepag), un encabezamiento opcional,
  (header); una tabla de contenidos opcional también, (toc), listado de
  figuras y de tablas opcionales (lof y lot), cualquier número de
  párrafos (p), y secciones principales (sect) apéndices opcionales
  (appendix), bibliografía (biblio) y notas al pie (footnote ).

  Como puede observarse, el DTD no menciona nada acerca de cómo debería
  de formatearse el documento, o sobre el aspecto que debería 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
  documentación. 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 más 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
  específico, 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. También
  devuelve un formato más esplícito de tu documento, con todos las
  ``macros'' y demás elementos expandidos, lo cual es inteligible para
  sgmlasp, la siguiente fase del proceso.

  sgmlsasp es el responsable de la conversión de la salida de sgmls a
  otro formato (como LaTeX). Lleva a cabo esta tarea usando archivos
  sustitutivos, que describen cómo 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 tendría
  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 analogías apropiadas para los elementos SGML en el
  nuevo formato. En la práctica, 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 más fácil de hacer que escribir analizadores individuales y
  traductores para varios tipos de formatos de salida; SGML proporciona
  un sistema genérico de conversión 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 haría normalmente. Posteriormente
  daré en este documento ejemplos y mostraré los com andos empleados
  para llevar a cabo la traducción y formateo. Todo puede ser llevado a
  cabo desde la línea de comandos.

  Pero primero, debo describir cómo instalar y configurar el software.

  2.  Instalación.

  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 versión 1.5 pueden encontrarse en:

  ftp://ftp.cc.gatech.edu/pub/people/gregh/linuxdoc-sgml.

  Puede obtener información 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. Además de este paquete, se necesitarán 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 versión 1.08 ó 1.09. Aparentemente, parte del
     tratamiento de los márgenes en groff se encuentra en estado de
     perfeccionamiento de versión en versión; ambos funcionarán, pero se
     obtendrán 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 funcionarán.
     Puedes obtener esto de ftp://prep.ai.mit.edu/pub/gnu.

     Hay una versión binaria para LiNUX en
     ftp://sunsite.unc.edu/pub/Linux/utils/text También.  Necesitarás
     groff para producir texto ASCII simple a partir tus documentos
     SGML.  (TeX/LaTeX se emplearán para obtener bonitas copias impresas
     en PostScript y dvi).

  2. TeX y LaTeX. Estos están disponibles más o menos, en todos lados;
     no debería de haber problema en conseguirlo e instalarlo. (Hay una
     distribución de binarios en sunsite.unc.edu). Por supuesto, sólo 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. Están disponibles también 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.  Instalación del software

  Los pasos necesarios para la instalación y configuración 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
     residirán 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
     instalación.

     Si todo va bien, estarás 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 revisión genérica de cómo formatear el
  documento a lo s distintos formatos.  Para ver una lista completa de
  opciones, consultar las páginas man

  2.2.1.  Obteniendo texto plano como salida.

  Si se quiere obtener texto plano como resultado, emplear el comando:

       % sgml2txt foo.sgml

  Nótese que he limitado la conversión de groff para la salida de texto
  simple.  Es decir, he quitado los encabezamientos de página, cambiado
  los márgenes, y demás. 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 páginas 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 (vía dvips) emplea la opción -p:

       % sgml2latex -p foo.sgml

  O puedes producir un fichero DVI usando el parámetro -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 demás
  ---un archivo por cada sección del documento.  Ejecuta tu navegador
  WWW en foo.html, que es el archivo cabecera.  Asegurarse de que todos
  los ficheros HTML correspondientes al documento están en un
  directorio, ya que se referencian unos a otros con URLs locales.  Los
  iconos referenciados en la salida HTML están localizados en
  $LINUXDOCLIB/icons. Estos deberán ser copiados también a la
  localización final de los documentos HTML. $LINUXDOCLIB está definida
  al comienzo de los scripts de con versión SGML.

  Si empleas sgml2html sin el parámetro -img, los documentos HTML
  tendrán las etiquetas ``previous'', ``next'', y ``table of contents''
  para la navegación. Puedes saltarte esa configuración 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 sección del documento.

  2.2.7.  Comprobando la sintaxis del SGML

  Si lo único que quieres es comprobar si habría errores en la
  conversión del SGML emplea el script sgmlcheck. Por ejemplo:

       % sgmlcheck foo.sgml

  2.3.  Tabla de Códigos 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, eñes, etc;
  basta con escribirlos como tales en los fuentes, y emplear el
  parámetro sgml2html)--) Para hacer u so de esta propiedad, pasar al
  script el parámetro -l, por ejemplo:

       % sgml2txt -l foo.sgml

  Puedes emplear los caracteres ISO 8859-1 en los fuentes, serán
  transformados en los códigos de escape apropiados de cada tipo de
  formato.

  3.  Redacción de Documentos con Linuxdoc-SGML

  Para la mayoría, redactar documentación empleando la Definición 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
  sección, expondré en una introducción la redacción de documentación
  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. Sólo 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 Básicos

  Examinando los fuentes del documento ejemplo, te percatarás de que hay
  una serie de ``etiquetas'' enmarcadas con paréntesis en ángulo (-- N.
  del T.
  ``símbolos de mayor/menor q ue''--) (< y >). Una etiqueta especifica
  simplemente el comienzo y final de un elemento, siendo un elemento
  algo como una sección, párrafo, una frase con texto en tipografía
  cursiva (itálica), un ``item'' de un listado , y demás. 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 región 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 también, deberás usar el método
  ``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 razón por la que verás 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 sección, empleas la etiqueta
  de <sect>; de todos modos, la etiqueta de finalización de la sección
  (que podría aparecer al final del cuerpo de la sección propiamente,
  ¡no justo tras el título de la sección!) es opcional e implícito
  cuando se da comienzo a otra sección 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 mayoría de caracteres especiales, por lo que
  paginando $LINUXDOCLIB/rep/latex/general  sería un buen sitio donde
  comenzar. $LINUXDOCLIB está definido al comienzo de los scripts de
  conversión.

  Obviamente, los paréntesis en ángulo son por sí mismos caracteres
  especiales en los fuentes SGML. Hay otros a los que prestar atención.
  Por ejemplo, digamos que quisieras teclear una expresión que contenga
  paréntesis en ángulo, como esta: <foo>. Para obtener el paréntesis en
  ángulo izquierdo (o de apertura)tendrás que emplear el elemento &lt;
  que es una macro que se expandirá al carácter de paréntesis en ángulo
  actual. Por tanto, en el fuente tecleé:

  Generalmente, lo que comience con un símbolo 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 carácter especial, no obstante, en algunos casos es
  necesario. Los más utilizados son:

  ·  Usar &amp; con el ``ampersand'' (&),

  ·  Usar &lt; para el símbolo menor que (<),

  ·  Usar &gt; para el símbolo mayor que (>),

  ·  Usar &etago; para el el símbolo menor que con una barra inversa
     (</)

  ·  Usar &dollar; con el símbolo de dólar ($),

  ·  Usar &num; con la almohadilla (#),

  ·  Usar &percnt; con el símbolo 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 tratábamos el asunto de los caracteres especiales, debí
  mencionar también el ``entorno'' verbatim empleado para incluir texto
  literal en la salida (preservando los espacios, sangrías, y demás). 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. Específicamente, deberás 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,
     podría ser posible ocultar el formateador de texto subyacente
     enteramente, pero el analizador no soporta esta característica
     todavía.)

  El entorno code es mayormente como el entorno verb, a excepción de las
  líneas horizontales que son añadidas al texto que enmarca, como aquí:

  ______________________________________________________________________
  He aqui un entorno code de muestra.
  ______________________________________________________________________

  Deberás 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 tipográfica 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 algún carácter
  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 excepción de que no se
  selecciona como fuente tipográfica por defecto tt. Por tanto, puedes
  emplear quote para menciones que no requieren interacción 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 cómo
  definir un documento.

  3.4.1.  El Preámbulo

  En el ``preámbulo'' del documento, se definen aspectos como la
  información del título, y el estilo del documento. Para un documento
  de tipo Howto (-- N. del T.
  tendría 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 deberán ir más o menos en ese orden. La primera línea
  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.

  también; no he retocado éstos para su uso con Linuxdoc-SGML.

  Las etiquetas title, author, y date (-- N. del T.  deberían resultar
  obvias.  La etiqueta date incluye el número de versión y la última
  fecha de modificación 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 preámb ulo, para que
  el título, resumen, y tabla de contenidos estén todos ahí y tengan una
  apariencia similar.

  3.4.2.  Párrafos y Secciones

  Tras el preámbulo, 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 demás)

  ·  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 demás.

  Tras la etiqueta sect (o sect1, sect2, etc.) vendrá el nombre de la
  sección. Por ejemplo, al comienzo de este documento, tras el
  preámbulo, viene la etiqueta:

       <sect>Introduccion

  Y al comienzo de esta sección (Párrafos y Secciones), está la
  etiqueta:

       <sect2>Parrafos y Secciones.

  Tras la etiqueta de sección, se comienza el cuerpo de la sección. 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
  título de la sección, y que estás listo para comenzar con el cuerpo. A
  partir de ahí, los párrafos siguientes se comienzan con una línea en
  blanco (tal y como se haría en TeX). Por ejemplo,

       He aqui el final del primer parrafo.

       Y aqui comenzamos este nuevo.

  No hay razón para usar etiquetas <p> al comienzo de cada párrafo;
  únicamente al comienzo del primer párrafo 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 fáciles. Por ejemplo, si queremos definir una referencia
  cruzada a cierta sección, necesitarás etiquetar esa sección con un
  nombre, como sigue:

       <sect1>Introduccion<label id="sec-intro">

  Ahora ya se podrá referir a esa sección en cualquier lugar del texto
  empleando la expresión:

       Ver seccion <ref id="sec-intro" name="Introduccion"> para una introduccion.

  Esto sustituirá la etiqueta ref con el número de sección etiquetado
  como sec-intro. El argumento name para ref es necesario para
  transformaciones a groff y HTML. La definición 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
  número.

  Por ejemplo, esta sección es la ``Cross-references''.

  Existe también 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 demás. 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 cuestión será añadido actualmente al documento HTML.

  El argumento opcional name especifica el texto que será anclado al URL
  (para la conversión HTML) o que dará nombre como descripción del URL
  (para LaTeX y groff). Si no se incluye ningún parámetro 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 creación 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 (Tipográficas)

  En esencia, las mismas fuentes soportadas por LaTeX lo son por
  Linuxdoc-SGML.  Nótese de todos modos, que en la conversión a texto
  ASCII (vía groff) se prescinde de la información relativa a fuentes.
  Por tanto, podrán emplearse las fuentes todo lo que se quiera, con el
  beneficio correspondiente en la conversión a LaTeX. Pero no basarse en
  las fuentes para hacer comprender algo concreto en la versión ASCII.

  Particularmente, la etiqueta tt descrita anteriormente puede ser
  empleada para obtener una fuente de tipo ``máquina de escribir'' de
  anchura constante, que deberá emplearse en todas las direcciones e-
  mail, nombres de máquina, 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.

  Recuérdese que sólo se puede hacer uso de este método abreviado si el
  texto englobado no contiene barras.

  Se pueden conseguir otras fuentes; bf para obtener negrita y em para
  obtener cursiva. Bastantes más tipos de fuentes son soportados
  también, pero no las recomiendo, porque al convertir esos documentos a
  otros formatos como el HTML podr ían no ser soportados. La negrita,
  tipo máquina de escribir, y cursiva (-- N. del T.

  deberían 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 también; ver
  el documento de ejemplo para más detalles.

  Un listado descrip es ligeramente diferente, y también ligeramente más
  feo, pero podrías 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.  Más Información.

  ·  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 fórmulas matemáticas, tablas, figuras, y demás. No recomiendo
     emplear la mayoría de estas prestaciones en los HOWTOs sobre LiNUX
     debido a que no saldrían bien en las versiones de texto ASCII.

     Si deseases escribir documentación genérica 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 documentación similar.

  ·  Las herramientas originales QWERTZ de Tom Gordon pueden obtenerse
     en:

  ·  Más información acerca de SGML puede encontrarse en las siguientes
     páginas WWW:

     1. SGML en la web

     2. Página 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 dirección de correo es:  linuxdoc-sgml@via.ecp.fr.

  ·  Se puede obtener más información 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 diseños casi
     automáticamente. Acelera el aprendizaje del LaTeX y hace que
     diseños complicados sean fáciles e intuitivos.

  4.  Anexo a la Traducción al Castellano.

  4.1.  Aspectos Importantes del SGML-LaTeX en Castellano

  4.1.1.  Tildes, Eñes, Etc.

  Para que aparezcan las tildes, eñes y demás caracteres tipográficos
  típicos del castellano que no sean ``caracteres especiales'' basta
  como escribirlos como tales en el fuente (para ello, deberás cargar el
  mapa de teclado español, es.map, cosa q ue se suele configurar con el
  programa de instalación de LiNUX), que el editor los soporte (para vi
  no hacen falta más configuraciones) y pasarle el parámetro `-l' al
  script de conversión utilizado; (actualmente, sólo soportan esta
  opción sgml2la tex, sgml2html, y sgml2txt).

  4.1.2.  Tamaño del Papel.

  Este no es un aspecto crucial, pero no está de más saberlo. Para que
  los documentos a LaTeX se formateen en un tamaño de papel A4, típico
  en nuestro país, basta con que al script de conversión se le pase el
  parámetro `-a'. También se puede especificar est o a dvips con la
  opción `-a4'.

  4.1.3.  Los títulos de las Tablas de Contenidos, Bibliografía, etc.

  Este era un aspecto bastante molesto del LaTeX, el que se generasen
  automáticamente los títulos de las macros toc, lof, lot, biblio,
  etc... con los títulos en inglés; esto está solucionado empleando el
  paquete babel que suele veni r incluido con LaTeX, y que en lo que a
  nosotros atañe, da soporte a castellano, catalán y gallego.

  Para hacer uso del mismo basta con ejecutar texconfig, y configurar
  las ``hyphenation tables'', generalmente editando desde el shell de
  configuración de texconfig el archivo languaje.dat, en el que se ha de
  descomentar el patrón perten eciente al español; al salir de texconfig
  tendréis el LaTeX configurado para funcionar en castellano.
  Personalmente, dejo solamente el patrón perteneciente al español, y no
  tengo problemas, no sé si dará problemas dejando varios.

  Después es necesario editar el fichero &LINUXDOCLIB/rep/latex/mapping
  y añadir en las definiciones de cada DTD (article, etc), ``spanish'',
  de modo que quedaría 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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.      Introducción

  2.      El fuente

  3.      Algunos ejemplos

  3.1.    Esto es una subsección

  3.1.1.  Esto es una subsubsección

  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.  Introducción

  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 también LaTeX,
  HTML y texinfo.

  2.  El fuente

  El observar el fuente de este fichero será instructivo para mostrar
  cómo usar varias de las estructuras del paquete Linuxdoc-SGML. Debe
  leerse también Linuxdoc-SGML, Guía de usuario, del archivo guía.sgml.

  Los fuentes son y parecen similares al LaTeX, como puede verse. Los
  párrafos se separan mediante líneas 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 serán empleados en el
  fuente.  Primero, descendamos a una subsección:

  3.1.  Esto es una subsección

  Como reza en la cabecera. Nótese que se precisa usar el comando p para
  comenzar el cuerpo de la sección, tras el comando sect1. He aquí una
  subsubsección:

  3.1.1.  Esto es una subsubsección

  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 sección
  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 código 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 también este:

       ______________________________________________________________________
       Este es un ejemplo de entorno ''code''
       ______________________________________________________________________

  El entorno tscreen simplemente define un tamano de fuente pequeño,
  indentandolo de forma agradable. No es necesario para definir un
  entorno verb or code, pero sugiero que se haga así.

  La Linuxdoc-SGML, Guía 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 sección ha sido
  marcada con el comando label; el uso de ref nos proporciona una
  referencia cruzada, como la que hay en en ''Ver sección ``''''para mas
  señas.

  Hasta ahora, las referencias cruzadas no funcionaban en la
  transformación de nroff para texto ASCII simple.

  3.4.  Empleo de fuentes

  Quieres fuentes, y las tenemos. Por supuesto no aparecen como son en
  la versión 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 fáciles. Simplemente, emplee el elemento
  itemize con el comando item, como se observa aqui:

  ·  Esto es un listado

  ·  No hay nada excitante en ello.

  ·  También se soportan múltiples elementos.

  ·  Nuevamente, no nos sorprende.

     1. Listados enumerados con enum también 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 debería cambiar o añadir algo a este
  documento.

  4.  Notas del Traductor

  Para que las tildes, eñes y demás elementos tipográficos
  característicos de nuestro idioma aparezcan al procesarlos, es preciso
  pasar el parámetro 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.
  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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. Traducción: Diciembre 1999

  Este texto, describe el hardware, software y procedimientos necesarios
  para comprimir y escuchar archivos MP3 bajo Linux
  ______________________________________________________________________

  Índice general


  1. Introducción.

  2. Derechos de autor de este documento.

  3. Dónde obtener este documento.

  4. Reconocimientos.

  5. Renuncia de responsabilidad.

  6. Requisitos de hardware en cuanto a rendimiento.

  7. Requisitos de software

  8. Configuración de su sistema.

     8.1 Configuración para la captura analógica de audio.
     8.2 Configuración del CD-ROM para la captura de audio.
     8.3 Configuraciones adicionales.

  9. Codificación desde la entrada de audio.

  10. Codificación desde el CD-ROM.

  11. Escuchando MP3s

  12. Críticas, comentarios y sugerencias.

  13. Notas de la traducción al castellano.

  14. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Introducción.


  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 versión en inglés 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 físico o electrónico, en tanto esta declaración de los
  derechos de autor acompañe al documento en todas sus copias. Se
  permite y alienta también, la redistribución comercial, en cuyo caso,
  el autor quisiera recibir información respecto a estas.

  Cualquier traducción, 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 distribución. Se
  permitirá la excepción a estas reglas bajo ciertas condiciones;
  contáctese con el coordinador del HOWTO, en la dirección que se indica
  más abajo. En breve, quisiéramos promover la difusión de esta
  información a través de tantos medios como sea posible. Pero de todos
  modos, retendremos los derechos de autoría 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.  Dónde obtener este documento.


  La versión original más reciente de este documento puede obtenerla en
  el LDP (Linux Documentation Project) en: http://metalab.unc.edu/LDP/.

  La versión en castellano más 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 también a los autores de otros HOWTOs cuyo trabajo, sirvió de
  referencia al mío:

  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 información 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 dueños, a menos que se
  especifique expresamente lo contrario. La sola mención, no pretende
  afectar la validez de cualquier marca comercial o marca registrada.

  La mención de productos o marcas de fábrica, no implica garantías de
  ningún tipo. Se le recomienda hacer copias de seguridad de su sistema,
  antes de realizar cambios o instalaciones importantes, además 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
  mínimo, una máquina con procesador de tipo Pentium.

  Si está usted por codificar audio desde una fuente analógica, 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 relación señal-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
  desempeño, pero la Live tiene una relación S/R bastante superior,
  suficiente para un trabajo semi-profesional. Recuerde la vieja máxima
  del procesamiento de datos: «¡Si entra basura, sale basura!».

  Cuando grabe señales analógicas de audio a su disco duro,
  procedimiento conocido como d2d o Direct-To-Disk (Directamente al
  disco), el rendimiento de su disco e interface serán críticos. Si
  utiliza un sistema basado en tecnología IDE, modo 4 o Ultra-DMA,
  procure que sean tan veloces como pueda en su tasa de transferencia.

  La solución ideal sería 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 podrán
  alcanzar velocidades de 8.3 MB/s a 33 MB/s para Ultra-ATA, pero
  recuerde que esos son sólo valores de pico. Los valores promedio son
  bastante menores. Si puede hacerse con un disco SCSI AV, hágalo. 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 búfer para los casos en que el
  desempeño de las cabezas se vea excedido por las necesidades de
  transferencia.

  Si su disco no cumple con las especificaciones de arriba, su grabación
  estará plagada de ruidos y saltos, en las partes en que el disco no
  haya podido escribir la señal digitalizada. Si piensa dedicarse a
  grabar sucesos irrepetibles, como recitales en vivo, será mejor que
  invierta en tecnología SCSI.

  Otra causa de fallos en la escritura directa al disco, es un sistema
  sobrecargado. Las tareas corriendo en segundo plano pueden frenar
  momentáneamente al sistema. Se recomienda correr tan pocas tareas en
  segundo plano como se pueda, en particular servicios basados en redes.
  Para más información acerca de la configuración de los servicios de
  red, así como scripts de inicio, refiérase a las guías del
  Administrador de Redes y Administrador del Sistema.

  El trabajo de la memoria de intercambio puede enlentecer también el
  sistema, así que lo mejor será que instale tanta memoria RAM como
  pueda; le recomiendo 32Mb como mínimo, pero de seguro le vendría bien
  un poco más.

  Para los que quieren obtener lo máximo de sus sistemas, optimizar el
  kernel probablemente no sea una mala idea.

  Si bien las especificaciones de hardware de más arriba, le dejarán
  ante un equipo mínimamente decente para sus trabajos de codificar
  información de audio, no dude experimentar con equipos más viejos/más
  pequeños, si no tiene nada mejor a mano.

  Es un buen desafío para un sysadmin, lograr resultados satisfactorios
  de un equipo más pequeño.

  Otro factor importante es el cableado de audio. Los cables y
  conectores baratos, de baja calidad, producirán como resultado,
  grabaciones de calidad pobre. Si su tarjeta admite el uso de
  conectores RCA, prefiéralos. Usar conectores dorados, y mantener los
  cables de audio apartados de los de alimentación o datos, ayudará a
  evitar interferencias y elevar la calidad (si no tiene más remedio,
  crúcelos 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 información 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 extracción 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
  línea de la placa de audio. Regule el volumen de los auriculares hasta
  que no note distorsión.

  Aunque ni los niveles de salida ni la impedancia de la toma de
  auriculares son iguales a los de línea, 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 portátiles.  minidiscs portátiles,
  etc. De todos modos, sólo debe ser utilizado como último recurso,
  cuando no haya otro medio.

  Para obtener información detallada acerca de cómo configurar su placa
  de sonido, sería muy aconsejable la lectura del Sound-HOWTO (Su
  traducción, Sonido-COMO está disponible en
  http://www.insflug.org/documentos/Sonido-Como).


  7.  Requisitos de software


  Convertir las señales 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 continuación 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, acción conocida
     como rippeo o extracción:

     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


  ·  Necesitaría también un programa de mezcla (it/mixer/); Xmixer
     funciona muy bien, y se incluye con la mayoría de las
     distribuciones.


  8.  Configuración de su sistema.


  Esta sección, describirá los conceptos básicos para preparar un
  sistema Linux, para grabar sonido desde la entrada correspondiente, o
  desde el lector de CD-ROM.

  Basaré esta descripción en mi sistema Linux Intel, corriendo RedHat
  5.2, pero el asunto de la distribución que se use, no hace diferencia.
  Trabajaré en breve, sobre la versión para plataformas Sparc. (Si tiene
  éxito con este COMO, hágamelo 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, cubrirán el tema de hacer funcionar la tarjeta
  de sonido, mucho mejor de lo que podría hacerlo yo aquí.


  8.1.  Configuración para la captura analógica 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 Línea. a Entrada de Línea). La
  mayoría de los sistemas de audio, posee un conector de salida de
  línea. El nivel de los conectores de línea, es un estándar que
  especifica el voltaje y la corriente que puede emitir un dispositivo.
  Si mal no recuerdo, se trata de 500mA para sistemas domésticos y semi-
  profesionales, y 750mA, para equipamientos profesionales. Supongo que
  el estándar en tarjetas de sonido, ronda los 500mA, pero las tarjetas
  más nuevas, puede que se adhieran al segundo estándar. No habrá mucha
  diferencia a menos que trabaje con niveles de señal muy altos.

  Los niveles de Línea, 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, deberían poder conectarse sin problemas.

  Los tocadiscos (giradiscos) o bandejas, debido a que poseen un nivel
  de salida distinto (Phono) pueden tener algún tipo de problema. Lea
  más adelante para obtener mas información.

  También podría 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 grabación a Ent. de Línea, Salida de Linea a Entrada de
  Cinta del amplificador de potencia. Esta configuración 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 señal.

  Micrófonos en la entrada de Micrófono. Los voltajes generados por los
  micrófonos, suelen ser mucho menores que los de línea, así que si
  planea conectar su Micro a la entrada de línea, puede que jamás grabe
  nada en absoluto.

  ¡¡ATENCIÓN, hacer las cosas al revés, es decir, conectar señales con
  nivel de Línea en la entrada de Mic., puede dañar seriamente su
  tarjeta de sonido!!

  Los tocadiscos o giradiscos (España), bandejas o tornamesas (Latino-
  América) proporcionan un tipo de señal de salida denominada Phono, y
  la diferencia de este tipo de señal no radica sólo en en nivel de la
  misma, sino en su impedancia y en un tipo especial de ecualización
  posterior necesaria (RIAA). Si conecta un tocadiscos directamente a
  una toma de línea, no sólo puede dañar el sistema, sino que la
  grabación será pésima. 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 Línea 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 selección de fuente de grabación: conecte la toma Tape
  Out en lugar de Rec out a la entrada de línea 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 grabación (rec out selector).

  ·  Si no tiene amplificador con entrada Phono, puede utilizar una
     pequeña mesa de mezclas, que tenga entrada Phono, y llevar la
     salida maestra a la entrada de línea del PC. No obstante, la
     calidad de la preecualización RIAA de las mismas, así como su
     relación señal ruido suele dejar bastante que desear.

  ·  Existen preamplificadores con ecualización RIAA, que proporcionan
     señal de linea a partir de una de Phono.

  Así mismo cuanto mejor sea la calidad de la cápsula/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
  línea (Line In). Las guitarras van por Línea, pasando por una Caja de
  Inyección, usada para elevar la señal a nivel de Linea).

  Antes de conectar nada a su tarjeta de sonido, cerciórese de que los
  niveles de volumen de todo, estén al mínimo, y si se tratase de
  micrófonos, que estén apagados, o bien, lejos de los
  parlantes/altavoces.


  8.2.  Configuración del CD-ROM para la captura de audio.


  Preparar el sistema para extraer el audio de sus CDs, es en realidad
  un procedimiento bastante fácil.

  Si puede oír los CDs que reproduce, a través de los
  parlantes/altavoces y/o el amplificador que conecta a su tarjeta de
  sonido, es muy posible que pueda también 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
  grabación suene bastante fuerte, pero sin saturar. Yo utilizo mi oído.
  Con el tiempo, sabrá cuáles 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 serán los menos, y también 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 saltarán de repente a otro punto del disco mientras grabe.

  Si precisa información respecto a cómo conectar múltiples discos en un
  sistema Linux, sírvase leer el Multi-Disk-HOWTO, de Stein GJoen. Puede
  ayudarle.


  9.  Codificación desde la entrada de audio.



  Antes que nada, cerciórese de que cuenta con espacio suficiente en el
  disco duro. Tenga en cuenta que las grabaciones en calidad CD, 44.1
  KHz, 16 bit estéreo, 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 específica a wavrec. -t 60 indica cuanto
  tiempo se debe grabar, en segundos.

  La tercera opción, especifica la calidad de grabación (48000 es la
  frecuencia de muestreo DAT, 44100 es la correspondiente a la calidad
  del CD).

  La ultima opción, indica la trayectoria y archivo destino.

  Para ver la lista completa de parámetros, ejecute waverec --help, o
  lea la página del manual correspondiente.

  Este procedimiento, producirá un archivo WAV. A continuación,
  necesitará comprimirlo a formato MP3.

  Use bladeEnc, con los siguientes parámetros en su linea de comandos:



       /usr/local/bin/bladeenc [fuente] [destino] -br 256000




  La opción -br, indica el ratio de bits por segundo, en este caso, la
  he fijado al máximo (256Kbps). La trayectoria al ejecutable bladeenc,
  puede ser diferente también en su sistema.

  Como anteriormente, para conocer el conjunto completo de opciones de
  bladeenc, acompáñelo con el parámetro --help. En realidad de momento
  no es un parámetro válido, pero le mostrará la lista de opciones de
  todos modos.


  10.  Codificación desde el CD-ROM.


  De nuevo, asegúrese 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 líneas de mayor interés son:

  $cdcap = system("cdparanoia", $count, "/mnt/mp3/tmp/cdda.wav");

  Esta línea llama al extractor de audio (ripper), cdparanoia.  Aquel
  convierte la información de audio en crudo del CD, a un archivo en
  formato WAV.

  Estoy usando cdparanoia, pero si quiere usar CDDA2WAV, la linea de
  comando sería:

  $cdcap = system("cdda2wav", $count, "/mnt/mp3/tmp/cdda.wav");

  Los parámetros que siguen, son $count: el número 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 más 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 más arriba es muy básico, y
  carece de ciertas habilidades, como control de errores, etc. Mejórelo
  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 más populares para Linux son Xaudio y Xmms
  (conocido desde el principio como X11amp).

  Hay enlaces a sus respectivos sitios en internet, en la sección ``''

  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 fácil de usar.

  Las opciones de xaudio pueden verse con el parámetro -help. (xaudio
  -h).

  Para reproducir una pista MP3, intente


       xaudio pista.mp3




  Para reproducir un directorio,



       xaudio *.mp3




  Ambos programas están acompañados por un archivo README. (LÉAME)


  12.  Críticas, comentarios y sugerencias.


  Aparece hardware y software nuevo  continuamente. Si utiliza alguna
  versión más moderna de los programas, o hardware que se lista en este
  documento, o puede agregar cualquier cosa en esta área, por favor
  envíe su Información para incluírla, a phil@websentric.com, y la
  incluiré en futuras versiones.

  Y ahora diviértase con sus MP3!


  13.  Notas de la traducción al castellano.


  La primera versión del MP3-Como, ha sido realizada por Ariel Graneros
  larocka@yahoo.com, para su revisión y posterior distribución en el
  Insflug, por lo que encontrará la última versión de esta traducción en
  http://www.insflug.org

  He tratado de llevar adelante la traducción del modo más claro
  posible, no encontrando término adecuado para definir rip, optando por
  emplear extraer, y proponiendo la adopción del término ripear.


  14.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos,
  así como de la producción de documentos originales en aquellos casos
  en los que no existe análogo en inglés, centrándose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Diríjase a la sede del Insflug para más información al respecto.


  En ella encontrará siempre las últimas versiones de las traducciones
  «oficiales»:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  en los que estamos trabajando incesantemente.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase 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 información. Remítete a esas fuentes si quieres apren­
  der más sobre Linux o tienes problemas y necesitas ayuda. Lars Wirze­
  nius (wirzeniu@cc.helsinki.fi) escribió la primera versión de este
  documento y ahora está mantenido por Michael K. Johnson (john­
  sonm@nigel.vnet.net).  Escríbame si tiene alguna pregunta sobre este
  documento.

  1.  Introducción

     ¿Qué es Linux?
        Linux es una implementación de sistemas operativos POSIX
        independiente de la especificación, con extensiones de SYSV y de
        BSD, que ha sido escrita de la nada. No incluye ningún código
        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.

        Además, también funciona en algunos Amiga y Atari con MMU
        (unidad de gestión de memoria). Esto es, 68020 con MMU externa,
        68030 o 68040.  Una FPU (unidad de punto flotante) también 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 núcleo y DEC ha sacado una distribución denominada
        "BLADE" disponible en ftp.dec.com en el directorio
        /pub/DEC/Linux-Alpha/.  El Linux comercial de Red Hat está ahora
        disponible también para las Alpha.

        El soporte para las Sparc está progresando rápidamente y tanto
        Red Hat como Debian han anunciado la próxima llegada de
        distribuciones para ellas.

        Soportes para ARM, PowerPC y MIPS están 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 más
        exactitud. El núcleo 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 colección 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
        típicas explican cómo hacer tareas comunes, como encargar una
        distribución de Linux, configurar los servicios de impresión
        bajo Linux, establecer un enlace UUCP básico, 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.

        Además hay muchos pequeños documentos, sin formato fijo,
        llamados "mini-HOWTOs". Estos documentos cubren asuntos muy
        concretos, tales como BogoMIPS o Color-ls. Están 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 dirección 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,
        corrección de errores, etc).

        El grupo de noticias comp.os.linux.answers es un grupo de
        noticias moderado al que se envían 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 discusión 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 discusión sobre la administración de un
        sistema Linux.

        El grupo de noticias comp.os.linux.development.system es un
        grupo de noticias no moderado dedicado específicamente a la
        discusión sobre el desarrollo del kernel (núcleo) de Linux. Las
        únicas cuestiones sobre desarrollo de aplicaciones que deben ser
        discutidas aquí son aquellas que están íntimamente ligadas al
        núcleo. Todas las demás cuestiones de desarrollo son
        probablemente genéricas 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 discusión sobre el
        desarrollo de aplicaciones en relación con Linux. No está para
        discutir sobre el lugar en el que se puede conseguir una
        aplicación para Linux, ni para discusión entre aquellos que
        quieren aplicaciones para Linux.

        El grupo de noticias comp.os.linux.hardware es para preguntas de
        hardware específicas de Linux.

        El grupo de noticias comp.os.linux.networking es para preguntas
        específicas 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
        discusión que no esté cubierta en las temáticas de los
        anteriores grupos.
        Por norma, no reenvíes entre los grupos de noticias de Linux. El
        único reenvío que es aceptable es un envío ocasional de un grupo
        no moderado a comp.os.linux.announce. La razón para dividir
        comp.os.linux en varios grupos es reducir el tráfico en cada
        uno.  Aquellos que no sigan esta regla serán fulminados sin
        piedad...

     Otros grupos de noticias
        No creas que todas tus preguntas son apropiadas para un grupo de
        Linux sólo porque tú trabajes en Linux. ¿No es tu pregunta
        realmente sobre la progamación de la shell en cualquier unix o
        clónico de unix?. Entonces pregunta en comp.unix.shell. ¿Es
        sobre GNU Emacs?.  Entonces prueba en gnu.emacs.help. Además, si
        no conoces otro grupo en el que preguntar, pero piensas que lo
        debe haber, pregunta cortésmente si hay otro grupo que sea más
        apropiado para tu cuestión. Al menos los grupos
        comp.unix.{questions,shell,programming,bsd,admin} además de
        comp.windows.x.i386unix deberían ser útiles para un usuario de
        Linux.

     El World-Wide Web
        Greg Hankins, gregh@cc.gatech.edu, mantiene la página 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 más de un año.
        Incluye artículos destinados a casi cualquier nivel y pretende
        ser de ayuda a todos los usuarios de Linux. La subscripción por
        un año cuesta $22 en USA, $27 en Canada y Méjico, y $32 en
        cualquier otro país, pagables en moneda USA. Las solicitudes de
        subscripción pueden ser enviadas por email a subs@ssc.com, por
        fax a +1-206-782-7191, por teléfono a +1-206-782-7733 o por
        correo a Linux Journal, PO Box 85867, Seattle, WA 98145-1867
        USA. SSC tiene una clave PGP pública por si quieres enviar el
        número de tu tarjeta de crédito vía email encriptado: haz finger
        a info@ssc.com

     Los Mapas
        La información 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

        Información 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

        Información 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 más 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 versión DVI está en INFO-SHEET.dvi y
  una PostScript en INFO-SHEET.ps.  Los sites más importantes están
  listados aquí; por favor, dirígete al INFO-SHEET para conocer el más
  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 información llega. Hay muchos servidores espejo de éstos;
  por favor, usa el más cercano a tí (cercanía a través de la red).

  3.1.  Linux en BBS's

  Ocasionalmente, alguien manda una lista de BBS's que tienen Linux
  disponible para bajárselo. Pruébalas 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 electrónico o pedirle
  a cualquier amigo con acceso a Internet que la consiga para tí.

  3.2.  Linux en soportes físicos

  Linux es distribuido en soporte físico, incluyendo floppies, CD-ROM y
  cintas, por diversos vendedores. Remítete 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 también 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 núcleo. Otras
  personas han recopilado "distribuciones" que pueden ser usadas. Estas
  distribuciones unen el núcleo tal y como su autor lo saca al software,
  para constituirse en un completo paquete de trabajo. La mayoría de las
  versiones incluyen tanto programas de aplicación como software del
  sistema.

  Hay diversas distribuciones de Linux, que están disponibles en varios
  servidores. Sunsite contiene casi todas las distribuciones en
  /pub/Linux/distributions. Las distribuciones típicamente recomendadas
  y disponibles gratuitamente son Slackware, Red Hat y Debian. Estas
  pueden ser todas obtenidas gratis en Internet y también son vendidas
  en floppies y en CD-ROM's.

  Hay más distribuciones de Linux. Distribuidores de Linux más
  comerciales se anuncian en Linux Journal.

  5.  Listas de correo de Linux

  Usadas fundamentalmente para discusión entre desarrolladores de nuevas
  funcionalidades y beta-testers. Ver direcciones en la FAQ. Envía un
  mensaje a majordomo@vger.rutgers.edu con la única palabra help en su
  cuerpo y obtendrás correo explicándote cómo suscribirte a las muchas
  listas de correo que sobre Linux existen.

  Guarda ese mensaje, ya que te indicará cómo borrarte de las listas, y
  si mandas molestos mensajes a la lista quejándote de que no eres capaz
  (porque no seguiste las instrucciones y no guardaste el mensaje que te
  indicaba cómo hacerlo), podrás ser fustigado por malgastar el dinero y
  el ancho de banda de los demás.

  6.  Documentación para varios programas

  Muchos programas vienen con algún tipo de documentación, a menudo en
  un fichero llamado README o similar. Es una MUY buena idea leerlos
  atentamente.  Es aburrido ver (y responder) preguntas que están
  contestadas en la documentación.

  7.  Más Documentación

  El Linux Documentation Project está trabajando en mucha documentación.
  Hasta el momento, más de 1600 páginas de documentación tipo libro han
  visto la luz para el público en general, un amplio conjunto de páginas
  man también han salido, y más que queda por llegar. Comprueba
  sunsite.unc.edu:/pub/Linux/docs/LDP para documentos escritos por el
  LDP. El LDP también proporciona los HOWTO's, descritos más 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 información sobre el núcleo.

  9.  Este Documento

  La última versión de este documento debería estar siempre disponible
  de tsx-11.mit.edu en /pub/linux/docs en el fichero META-FAQ. Una
  versión DVI debería encontrarse en el mismo directorio como META-
  FAQ.dvi, y una versión PostScript como META-FAQ.ps.

  10.  Legalidad

  Las marcas registradas son de sus propietarios. La satisfacción no
  está garantizada. No se ofrecen garantías sobre este documento.
  Ninguna donde esté prohibido.

  El contenido de este documento es de dominio público, pero si lo
  citas, por favor, sé educado y nombra la fuente.

  11.  Nota del traductor

  Hola, soy Iván 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 interés y que comprendas que aún hay mucho por traducir
  y más aún por escribir.

  He intentado ajustarme totalmente al original de Michael K. Jonhson y
  he revisado la traducción un par de veces. No obstante aún puede
  quedar algo por pulir o se me ha podido colar alguna errata, de cuya
  responsabilidad me hago cargo, pero jamás de sus consecuencias.

  Para cualquier comentario, errata o consulta sobre la traducción,
  acude al área R34.LINUX de FidoNet o contacta conmigo por NetMail a la
  dirección 2:345/425.25 de la misma red.

  Un saludo, Iván Casado.

  12.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Mutt-i, GnuPG y PGP Como
  Andrés 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 rápida indi­
  cando los posibles problemas que pueden surgir al enviar correo fir­
  mado o cifrado para ser leído por clientes de correo que no se ajustan
  a las especificaciones PGP/MIME definidas en la RFC2015 y por otros
  sistemas operativos. Incluye además un ejemplo de configuración de
  procmail para enviar las claves públicas de forma automática a peti­
  ciones recibidas por correo electrónico, como si de un servidor de
  claves se tratara.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Copyright y descarga de responsabilidad

  3.      Nota sobre el intercambio de correo desde/hacia internet

  4.      Configuración de mutt

  5.      PGP y GnuPG

  5.1.    PGP2

  5.2.    PGP5

  5.3.    GnuPG

  6.      Integración de PGP y Mutt

  6.1.    Ficheros de configuración opcionales

  6.2.    Variables de Configuración General

  6.3.    Variables de Configuración para PGP2

  6.4.    Variables de Configuración para PGP5

  6.5.    Variables de Configuración para GnuPG

  6.6.    Variables de Configuración 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.    Edición del fichero de alias y recarga del mismo

  7.4.    Más ejemplos de macros

  8.      Algunas «recetas» para Procmail

  8.1.    Configuración de Procmail para devolver las claves públicas
  automáticamente

  8.2.    Verificación y descifrado automáticos de mensajes firmados sin
  PGP/MIME

  8.3.    Cambio del tipo MIME para mensajes con claves públicas sin
  PGP/MIME

  9.      Intercambio de mensajes firmados/cifrados entre diferentes
  clientes de correo y plataformas

  10.     Programas y versiones utilizados

  11.     Más información

  12.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  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
  rápida un lector de correo con seguridad de firmas y cifrado digital.

  Para esto se incluirán ficheros de configuración de ejemplo que
  servirán para la puesta en marcha. Para obtener el máximo rendimiento
  y usar todas las características de los programas que se utilizarán
  será necesario leer la documentación adjunta a cada programa y
  reconfigurar dichos ficheros de configuración que se incluyen como
  ejemplos.

  Además, se comentarán algunos problemas derivados de la falta de
  seguimiento de la recomendación RFC2015 sobre PGP/MIME por parte de
  muchos programas de correo electrónico, tanto en Linux como en otros
  sistemas operativos.

  Será presentado también un ejemplo de configuración de procmail de
  forma que puedan ser enviadas las claves públicas de manera automática
  a la recepción de mensajes que las soliciten.

  Nos gustaría 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 Andrés Seco y J. Horacio M.G., y es
  un documento libre. Puedes distribuirlo bajo los términos 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 información y otros contenidos en este documento son lo mejor de
  nuestros conocimientos. Sin embargo, hemos podido cometer errores. Así
  que deberías determinar si deseas seguir las instrucciones que se
  encuentran en este documento.

  Nadie es responsable de cualquier daño en sus ordenadores y cualquier
  otra pérdida por el uso de la información contenida aquí.

  LOS AUTORES Y MANTENEDORES NO SON RESPONSABLES DE CUALQUIER DAÑO
  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
  electrónico entre el equipo local y otros equipos (en red local o en
  internet). Dicho intercambio debe ser realizado mediante programas que
  actúen 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 método de envío/recepción 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 línea siguiente

  es que debes tener instalado algún tipo de MTA que se encargue de la
  transferencia de mensajes. En caso contrario, puedes encontrar
  documentación al respecto en las páginas 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.  Configuración de mutt

  El siguiente fichero de ejemplo es válido para comenzar a usar Mutt de
  forma básica incluyendo caminos para los ficheros de alias, mensajes
  enviados y mensajes postpuestos. Se puede realizar una mayor
  personalización 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 configuración
  ~/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.

  También hay que personalizar la linea my_hdr con el nombre y la
  dirección de correo electrónico adecuados. En el fichero
  ~/Mail/.signature se puede incluir la firma que aparecerá en todos los
  mensajes que se envíen.

  Este fichero de configuracion puede llegar a hacerse muy grande, por
  lo que es común separar algunos de sus comandos en ficheros
  diferentes. Por lo pronto, son facilmente separables las lineas de
  configuración de PGP o GnuPG y las macros de teclado que
  personalicemos. Para ello seria necesario añadir 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 configuración de PGP o
  GnuPG que más adelante se comentan.

  Para una información más extensiva y completa sobre el uso y
  configuración de Mutt, así como de características 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 públicas (anillo de claves públicas) y el fichero con
  las claves privadas (anillo de claves privadas). Conviene probar
  previamente PGP desde la línea 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 codificación nuevo, todavía en
  desarrollo aunque muy avanzado, de código abierto y libre, en muchos
  aspectos superior a PGP (ver GnuPG mini como en
  http://www.insflug.org/documentos/GPG-Mini-Como/).

  Aclararemos también que PGP, al ser un sistema desarrollado en los
  EE.UU., está sujeto a ciertas leyes sobre la exportación de programas
  que incluyen código criptográfico;  por esta razón existe una versión
  internacional para casi todas las versiones numéricas, 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 configuración pgp-i.conf y los ficheros con los anillos de
  claves públicas 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 todavía muchos usuarios tienen instalado sólo la versión de
  PGP2.

  Para el correcto funcionamiento de PGP5, en el directorio ~/.pgp, se
  encontrarán los anillos de claves públicas y privadas (pubring.pkr y
  secring.skr respectivamente), así como el fichero de configuración
  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
  configuración ~/.pgp/pgp.cfg de PGP5 lo crearemos como un enlace
  simbólico al fichero de configuración ~/.pgp/pgp-i.conf,

       ~/.pgp$ ln -s pgp-i.conf pgp.cfg

  añadiendo las siguientes líneas 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 ningún 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 (además de que su implementación y desarrollo es
  principalmente en Linux).

  Las claves generadas por GnuPG son del tipo DSA/ElGamal (Digital
  Signature Algorithm, también 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 configuración
  e interacción con PGP2 y PGP5).

  6.  Integración de PGP y Mutt

  La operación 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 opción «p». Una vez elegida la
  operación 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 algún destinatario con los que
  tienen clave pública 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 contraseña de la
  memoria con el juego de teclas <Ctrl>F.  A continuación repetiremos la
  operación de enviar el mensaje («y») y tendremos que volver a
  introducir la contraseña.

  Mutt, en este caso, usará PGP/MIME para enviar el mensaje, de modo que
  aparecerá un nuevo adjunto al mensaje con la firma (si sólo 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
  versión 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 acompañando al mensaje como un
  adjunto, sino que aparezca en el mismo cuerpo del mensaje. Para este
  modo, ver la sección 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 automáticamente. Ver
  la sección sobre ``recetas para procmail'', en donde se comenta cómo
  cambiar de forma automática el tipo MIME para los mensajes recibidos
  cifrados o firmados, que no indican su tipo MIME correctamente.

  6.1.  Ficheros de configuración opcionales

  En las siguientes secciones se habla sobre las modificaciones al
  fichero de configuración de Mutt para poder usar ``PGP2'', ``PGP5'', y
  ``GnuPG'' con comodidad.

  Para ello se usa un fichero de configuración llamaremos .gnupgp.mutt
  (el nombre es inventado y le podríamos llamar de cualquier otro modo,
  siempre y cuando indiquemos el origen de este fichero de configuración
  en el fichero de configuración principal ~/.muttrc.

  Esto se hace incluyendo el origen (dónde está situado) completo del
  fichero de configuración .gnupgp.mutt, en una línea al final del
  fichero ~/.muttrc.  El directorio en el que situemos éste u otros
  ficheros opcionales de configuración puede ser cualquiera, siempre y
  cuando tengamos los permisos correctos de acceso a él (en un capítulo
  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 configuración
  opcional

       source ~/mutt.varios/.gnupgp.mutt

  De este modo Mutt aceptará las variables de configuración en

  Este sistema es útil para evitar tener un fichero de configuración
  desordenado y demasiado grande, y puede ser usado para poner cualquier
  otro grupo de variables de configuración 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 configuración .vimrc distinto al que usamos cuando usemos
  vim sobre la línea de comandos.  Para ello, copiaremos primero
  ~/.vimrc a nuestro directorio ficticio para ficheros de configuración
  opcionales ~/mutt.varios/ y le daremos un nombre distinto (vg.
  vim.mutt):

       $ cd /home/usuario
       ~$ cp .vimrc mutt.varios/vim.mutt

  a continuación cambiaremos las variables de configuración 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 línea estamos indicando a Mutt que, en lugar de usar
  su editor interno por defecto, use un editor externo, Vim, con las
  opciones de configuración que deseamos.

  6.2.  Variables de Configuración General

  Hay un número de variables que nos servirán para el uso de cualquiera
  de los tres sistemas de cifrado público con Mutt por igual.  Éstas
  variables son del tipo booleano, y aceptan las opciones set (activada)
  o unset (desactivada).

  En el fichero de configuración (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 aclaración 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 envíen
        cifrados
        # (precisa de la variable de configuración general set
        copy=yes).

     set pgp_replysign
        # al responder a un mensaje firmado, requerir que el mensaje de
        respuesta
        # sea también firmado.

     set pgp_replyencrypt
        # al responder a un mensaje cifrado, requerir que nuestra
        respuesta
        # también vaya cifrada.

     set pgp_verify_sig=yes
        # ¿queremos que se verifique automáticamente las firmas de los
        mensajes
        # entrantes? ¡por supuesto que sí!

     set pgp_timeout=<n>
        # eliminar la contraseña 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 podría confundir si tenemos el mismo id de
     usuario
     # para distintas claves.

     set pgp_strict_enc
     # usar codificación «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 comprobación 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 especificarán las variables a
  configurar para cada una de las versiones.  La cuarta subsección
  explica los cambios en las variables en caso de que usemos más de una
  versión.

  (1) dado que el contínuo 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 públicas de todos los destinatarios.

  (2) depende del número de mensajes que firmemos o descifremos
  generalmente, nos interesará mantener la contraseña en la memoria
  durante más o menos tiempo.  Esta opción nos evita que tengamos que
  introducir la contraseña por cada mensaje que firmemos, o por cada
  mensaje cifrado que leamos.  Aviso: mantener la contraseña en la
  memoria es inseguro, especialmente en sistemas conectados a una red.

  (3) esto sólo es necesario para la clave con la que hayamos
  configurado para firmar.  Cuando la clave la escojamos desde el menú
  de composición, Mutt se encargará de calcular el algoritmo.

  6.3.  Variables de Configuración para PGP2

  Para utilizar PGP2 con Mutt-i es necesario añadir las siguientes
  líneas 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, deberán existir los ficheros ~/.pgp/pubring.pgp y
  secring.pgp. Más información sobre PGP2 con el comando man pgp.

  6.4.  Variables de Configuración para PGP5

  Para utilizar PGP5 con Mutt-i es necesario añadir las siguientes
  líneas 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, deberán existir los ficheros ~/.pgp/pubring.pkr y
  secring.pkr. Más información sobre PGP 5 con el comando man pgp5.

  6.5.  Variables de Configuración para GnuPG

  Para utilizar GnuPG con Mutt-i es necesario añadir las siguientes
  líneas 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, deberán existir los ficheros ~/.gnupg/pubring.gpg y
  secring.gpg. Más información sobre GnuPG com el comando man gpg.gnupg,
  man gpgm, y man gpg.

  6.6.  Variables de Configuración Mixta

  En el caso que deseemos tener más de uno de los tres sistemas a la
  vez, es preciso modificar algunas de las variables que hemos comentado
  anteriormente.  En realidad tan sólo se trata de eliminar la
  redundancia en la versión configurada por defecto.

  Si, por ejemplo, decidiéramos usar GnuPG como el sistema a utilizar
  por defecto, todas las teclas relacionadas con PGP/GnuPG de Mutt
  llamarían a éste sistema para cualquier operación de cifrar,
  descifrar, firmar, verificar, etc...
  $set_pgp_default una sóla 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 podría quedar
  del siguiente modo:

       set pgp_default_version=gpg     # versión 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 versión que se
       set pgp_send_version=default    # haya configurado por defecto (gpg)

       set pgp_gpg=/usr/bin/gpg        # localización 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         # localización 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         # localización 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 ayudarán a generar firmas
  evitando seguir el estándar 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 electrónico. Aun cuando algunas de estas opciones vienen
  configuradas por defecto, podemos fácilmente cambiarlas o añadir otras
  modificando la configuración.

  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 común 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, añadiremos las
  líneas siguientes al fichero ~/mutt.varios/mutt.macros.  Previamente,
  habremos indicado el origen de este fichero de configuración opcional
  al fichero de configuración principal .muttrc; ver ``ficheros de
  configuración 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.  Edición 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.  Más 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 configuración 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, añadir al fichero de
  # configuración ~/.muttrc la línea:
  # source ~/Mail/.muttrc.macros
  #

  # Generic keybindings
  # (¡para todos los menús 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 sólo funciona desde el menú principal (el que nos
  # encontramos nada más abrir Mutt).  La combinación de las teclas
  # <CTRL>K nos permite extraer las claves públicas 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 composición)
  # Las siguientes operaciones se realizan desde el menú de composición.
  # Esto es, una vez hemos compuesto el mensaje y lo cerramos para
  # enviarlo, justo antes de presionar la tecla "Y" que nos permita
  # pasárselo 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 (codificación 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 permitirán firmar los mensajes "a la antigua"
  # (Application/PGP):

  macro   compose \CP     "Fgpg --clearsign\ny"

  # A continuación, <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 añadir más macros, y algunas otras vienen ya configuradas
  por defecto en nuevas versiones de Mutt.  Algunas otras opciones
  incluyen:

  ·  <CTRL>K (extraer claves públicas adjuntas a un mensaje)

  ·  <ESC>K (adjuntar una clave pública a un mensaje)

  ·  <CTRL>F (al usar la contraseña para firmar o descodificar un
     mensaje, ésta queda grabada en memoria.  De este modo podemos
     borrar la contraseña 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.  automáticamente Configuración de Procmail para devolver las
  claves públicas

  Aunque no es el objetivo de este Como, comentaremos que la forma más
  segura de obtener la clave pública de una persona es que ella misma
  nos la provéa en mano.

  Como en muchas ocasiones este método no es posible (distancia que
  separa a los interesados) las personas se pueden enviar por correo
  electrónico las claves públicas o buscarlas en un servidor de claves,
  pero ninguno de los métodos garantiza que la clave obtenida sea
  realmente de quien parece ser su poseedor, a menos que mediante una
  comunicación de otro tipo que consideremos «seguro» (buscar en la guia
  de teléfonos al propietario y pedirle que nos lea la «huella» de su
  clave pública para confirmar que es la misma de la clave que hemos
  obtenido por el metono no seguro).

  Lo que presentamos a continuación es un ejemplo de «receta» para
  añadir en .procmailrc del procesador de correo Procmail para devolver
  automáticamente su clave pública al remitente cuando reciba un mensaje
  con un determinado texto en la línea 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
  pública 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 línea 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.  Verificación y descifrado automáticos 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, ¿cuál si no?),
  éste nos lo reconoce como tal y comprueba la veracidad de la firma
  siempre que tengamos la clave pública 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á verificación, 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 Corporación <bill@reboot.com>
  Subject: Actualización S.O.
  To: Sufrido Usuario <pepe@casa.es>

  Sufrido usuario:

  le comunicamos que puede usted adquirir la última actualización del
  programa O.E. con la adquisición de nuestro sistema operativo reboot99
  por el módico 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 tendríamos que guardarlo en un fichero y
  hacerlo desde la línea de comandos.  Sin embargo, es posible convertir
  estos mensajes con Procmail para que Mutt los reconozca como MIME/PGP.
  Basta con añadir 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 públicas sin
  PGP/MIME

  Cuando recibes una clave pública desde un MUA sin soporte PGP/MIME,
  debes salvar la clave en disco y despues insertarla en tu anillo
  público de llaves, pero, incluyendo estas lineas en .procmailrc puedes
  realizar la inserción 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 añadian al final del texto que
  deseaban firmar.  Posteriormente, se incluyo el tipo MIME
  application/pgp para indicar que el bloque a continuación contenia
  firma o cifrado PGP, y finalmente con la especificación 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 añadidos al principio y al final de PGP.

  La situación 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
  especificación 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 indicándonoslo, para incluirlo aquí.

  10.  Programas y versiones utilizados

  Para el desarrollo de esta documentación hemos utilizado las
  siguientes versiones de mutt:

  ·  Mutt 0.93i - con esta versión 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.  Más información

  La documentación 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:

  ·  Página Oficinal de Mutt - http://www.mutt.org

  ·  Página Pricipal de GnuPG - http://www.gnupg.org

  ·  Página internacional de PGP - http://www.pgpi.com

  ·  Página 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 información sobre las RFCs en RFC-INFO@ISI.EDU

  12.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos,
  así como de la producción de documentos originales en aquellos casos
  en los que no existe análogo en inglés, centrándose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Diríjase a la sede del Insflug para más información al respecto.

  En ella encontrará siempre las últimas versiones de las traducciones
  «oficiales»:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  en los que estamos trabajando incesantemente.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase 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

  Configuración y detalles de NIS(YP), NIS+ y NYS (Yellow Pages), sis­
  temas de autentificación distribuída.
  ______________________________________________________________________

  Índice General:

  1.      Glosario

  1.1.    Algo de Información General

  2.      Introducción

  2.1.    Nuevas Versiones de Este Documento (En inglés)

  2.2.    Nota de Renuncia

  2.3.    FeedBack

  2.4.    Agradecimientos

  3.      ¿ NIS o NIS+ ?

  3.1.    ¿ NIS tradicional o la librería NYS ?

  4.      Cómo 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 Instalación 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 acrónimos. Aquí se listan los
  más importantes junto a una breve explicación:

     DBM
        DataBase Management, una librería de funciones que mantiene
        pares clave-contenido en una base de datos.

     DLL
        Dynamically Linked Library, una librería enlazada a un programa
        ejecutable en tiempo de ejecución.

     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 máquina) DNS de la(s) máquina(s).

     FTP
        File Transfer Protocol, un protocolo usado para transferir
        ficheros entre dos ordenadores.

     libnsl
        Name services library, una librería de llamadas a servicios de
        nombres (getpwnam, getservbyname, etc...) en Unixes SVR4.

     libsocket
        Socket services library, una librería para llamadas a servicios
        de sockets (socket, bind, listen, etc...) en Unixes SVR4.

     NIS
        Network Information Service, un servicio que proporciona
        información, que tiene que ser conocida por toda la red, a todas
        las máquinas de la red. Hay soporte para NIS en la librería
        estándar 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 diseñado 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 reimplementación del
        código del NIS (=YP) usando la funcionalidad del Name Services
        Switch de la librería NYS.

     RPC
        Remote Procedure Call. Las rutinas RPC permiten a los programas
        en C realizar llamadas a procedimientos en otras máquinas a
        través de la red. Cuando la gente habla de RPC, normalmente se
        refiere a la variante SunRPC.

     YP Yellow Pages(tm), Páginas Amarillas en Inglés, es una marca
        registrada en el Reino Unido por la British Telecom plc. (la
        telefónica inglesa, vamos).

     TCP-IP
        Transmission Control Protocol/Internet Protocol. Es un protocolo
        de comunicación de datos usado a menudo en máquinas Unix.

  1.1.  Algo de Información General

  Las siguientes líneas están 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 propósito es proveer
  información, que tiene que ser conocida a lo largo de la red, a todas
  las máquinas de la red. La información más indicada para ser
  distribuida por NIS es:

  ·  nombres de login/passwords/directorios home (/etc/passwd)

  ·  información de grupos (/etc/group)

  Así que, por ejemplo, si la entrada de tu password está grabada en la
  base de datos passwd de NIS, serás capaz de entrar en todas las
  máquinas de la red que tengan corriendo los programas clientes NIS.

  Sun es una marca registrada de Sun Microsystems, Inc. licenciada a
  SunSoft, Inc.

  2.  Introducción

  Cada vez más y más máquinas Linux están siendo instaladas como parte
  de una red de computadoras. Para simplificar la administración de la
  red, la mayor parte de las redes (sobre todo, redes basadas en
  máquinas Sun) ejecutan el Network Information Service. Las máquinas
  Linux pueden sacar gran partido a los servicios NIS existentes o
  proveer servicio NIS por sí mismas. Pueden incluso (con la librería
  NYS) actuar como un cliente NIS+ limitado.

  Este documento intenta responder cuestiones sobre la configuración de
  NIS(YP) en tu máquina Linux. No habla sobre cómo configurar NIS+. No
  olvides leer la sección ``''

  2.1.  Nuevas Versiones de Este Documento (En inglés)

  Nuevas versiones de este documento serán enviadas periódicamente
  (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, léete todos los ficheros README adjuntos a cualquiera de los
  varios paquetes de software descritos en este documento para obtener
  una información más detallada y precisa. Nosotros intentaremos
  mantener este documento tan libre de errores como sea posible.

  2.3.  FeedBack

  Si tienes algún comentario, preguntas o sugerencias, por favor,
  enviámelas 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 cuéntale lo que sea en
  inglés...--) .

  2.4.  Agradecimientos

  Nos gustaría agradecer a toda la gente que ha contribuido (directa o
  indirectamente) a la realización de este documento. En orden
  alfabético:

       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 código original de
  los yp-clients. Swen Thuemmler <swen@uni-paderborn.de> portó el código
  de los yp-clients y de las yp-routines en la libc (de nuevo, basándose
  en el trabajo de Theo).

  3.  ¿ NIS o NIS+ ?

  La elección entre NIS y NIS+ es fácil - usa NIS si no tienes que usar
  NIS+ o si no tienes severas necesidades de seguridad. NIS+ es mucho
  más problemático de administrar (es bastante fácil de manejar la parte
  del cliente, pero la parte del servidor es horrible). Otro problema es
  que el soporte para NIS+ bajo Linux está todavía en desarrollo --una
  cosa importante de la que todavía carece es del soporte para
  encriptación y autentificación de datos que es _la_ principal razón
  por la que alguien querría usar NIS+...--

  3.1.  ¿ NIS tradicional o la librería NYS ?

  La elección entre el NIS tradicional o el código NIS de la librería
  NYS es una elección entre vagancia y madurez vs. flexibilidad y deseos
  de aventura.

  El código "NIS tradicional" está en la librería C estándar y ha estado
  ahí fuera por mucho tiempo, sufriendo a veces de su edad y de un poco
  de inflexibilidad.

  El código NIS de la librería NYS, por otro lado, requiere, una de dos,
  o que recompiles y re-enlaces todos tus programas a la librería
  libnsl, o que recompiles la librería libc para que incluya el código
  libnsl (o tal vez puedas ir y obtener una versión precompilada de
  alguien que ya lo haya hecho).

  Otra diferencia es que el código tradicional NIS tiene algún soporte
  para Netgroups NIS, cosa que el código NYS no tiene (todavía). Por
  otro lado, el código NYS te permite manejar Shadow Passwords de una
  forma transparente.

  4.  Cómo trabaja

  En una red debe haber al menos una máquina actuando como un servidor
  NIS.  Puedes tener múltiples 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 demás 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 número de
  máquinas que haya en tu red y de la seriedad de tu red, podrías
  decidir si instalar uno o más 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é
  caído o que vaya más rápido.

  Las bases de datos NIS están 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 translación ASCII <--> DBM ("dbload", incluído con el
  software del servidor). El servidor NIS maestro debería tener ambas,
  las bases de datos ASCII y las DBM.

  Los servidores esclavos serán notificados de cualquier cambio en los
  mapas NIS, (vía el programa "yppush"), y recibirán automáticamente 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 información almacenada en sus bases
  de datos DBM.

  El autor de los clientes YP para Linux nos ha informado de que el
  ypbind más reciente (del paquete yp-clients.tar.gz) es capaz de
  obtener el servidor a partir de un fichero de configuración --lo que
  quiere decir que no es necesario un broadcast (lo cual es inseguro,
  debido al hecho de que cualquiera podría 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 algún software de los mencionados más adelante
  necesitarás ejecutar antes el programa /usr/sbin/rpc.portmap. Algunas
  distribuciones Linux ya tienen código para arrancar éste demonio en
  /etc/rc.d/rc.inet2.  Todo lo que tienes que hacer es "descomentar" ese
  código y rearrancar tu máquina Linux para activarlo.

  El mapeador RPC (portmap(8c)) es un servidor que convierte números de
  programas RPC en números de puerto de protocolo TCP/IP (o UDP/IP).
  Debe estar ejecutándose para poder realizar llamadas RPC (que es lo
  que el software de cliente NIS hace) a servidores RPC (como un
  servidor NIS) de esa máquina. Cuando un servidor RPC arranca, avisará
  al mapeador de puertos por cuál puerto está escuchando, y a qué
  números de programas RPC está preparado para servir. Cuando un cliente
  desea hacer una llamada RPC a un número de programa dado, primero
  deberá contactar con el mapeador de puertos de la máquina servidora
  para determinar el número de puerto al que los paquetes RPC deben ser
  enviados.

  Normalmente los servidores RPC estándar 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 cuestión debes considerar dos casos:

  1. Tu máquina va a ser parte de una red en la que ya existen
     servidores NIS.

  2. Todavía no tienes servidores NIS en la red.

  En el primer caso, sólo necesitas los programas cliente (ypbind,
  ypwhich, ypcat, yppoll, ypmatch). El programa más importante es
  ypbind. Este programa debe estar ejecutándose 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 también
  necesitarás un programa servidor NIS (normalmente llamado ypserv). La
  sección ``¿ Qué necesitas para configurar NYS ?''  describe como
  configurar un servidor NIS en tu maquina Linux usando la
  implementación del ypserv de Peter Eriksson (<pen@lysator.liu.se>).
  Nota que ésta implementación NO soporta el concepto maestro-esclavo
  del que hemos hablado en la sección ``¿ NIS o NIS+ ?''.  Usando este
  software, todos tus servidores NIS serán 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 librería del sistema "/usr/lib/libc.a" (version 4.4.2 y superiores)
  o la librería 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 sólo 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 más 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
  estarás preparado para instalarlo. Un lugar idóneo para el demonio
  ypbind es el directorio /usr/sbin.

  Por supuesto, para ello deberás 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. Sería
  una buena idea probar el ypbind antes de incorporarlo en
  /etc/rc.d/rc.inet2.

  Para probar el ypbind haz lo siguiente:

  ·  Asegúrate 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 máquina!
  La razón para esto es que hace un poco más difícil a crackers externos
  el obtener la base de datos de passwords de tus servidores NIS. Si no
  sabes cuál 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 ejecutándose.

  ·  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 debería 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

  ·  Podrías también ejecutar "rpcinfo -u localhost ypbind". Este
     comando debería producir una salida similar a:

               program 100007 version 2 ready and waiting

  Finalmente, no olvides que para búsquedas de nodos debes establecer (o
  añadir) "nis" a la entrada de orden de búsquedas en tu fichero
  /etc/host.conf. Por favor, lee la página man "resolv+.8" para más
  detalles.

  En este punto, ya podrías 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 asegúrate 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 actúe 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. También, edita el fichero /etc/rc.d/rc.inet2,
  ``descomenta'' las líneas que inician el demonio rpc.portmap, y añade
  las siguientes líneas justo después 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 implementación de Sun del NIS no necesitas
  editar los ficheros /etc/passwd y /etc/group para poder aprovechar
  NIS. La implementación de Sun necesita una línea "+:*:0:0:::" en el
  /etc/passwd y una línea "+:*: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 añades la línea "+:*:0:0:::" en /etc/passwd. Volver a
  poner la línea "+:*:0:0:::" en /etc/passwd arreglará el finger.

  Bueno, esto es todo. Rearranca la máquina y observa los mensajes de
  arranque para ver si ypbind efectivamente se ha iniciado.

  IMPORTANTE: Nota que la característica netgroup está implementada
  empezando en la libc v4.5.26. Los netgroups permiten control de acceso
  para cada máquina y para cada usuario en el dominio NIS, y requieren
  una entrada como ésta:

           +@this_machine_users

  en /etc/passwd. Pero si tienes una versión de libc anterior a la
  4.5.26, todos los usuarios de la base de datos NIS de passwords pueden
  acceder a tu máquina Linux si ejecutas "ypbind".

  6.  ¿ Qué necesitas para configurar NYS ?

  6.1.  Determinar si eres un Servidor, Esclavo o Cliente.

  Para contestar esta cuestión debes considerar dos casos:

  ·  Tu máquina va a ser parte de una red en la que ya existen
     servidores NIS.

  ·  Todavía no tienes servidores NIS en la red.

  En el primer caso tienes dos opciones:

  ·  O reenlazas todos los programas cliente y demonio con la librería
     NYS libnsl.so (o las enlazas estáticamente con libnsl.a). Esto
     supone añadir la línea:

                   LIBS=-lnsl

  a tu Makefile, que indica que quieres enlazar la Network Services
  Library. Básicamente, todos los demonios de red y el programa "login"
  necesitan ser recompilados.

  ·  O puedes recompilar la librería C estándar libc para que incluya
     las funciones de librería de los clientes NYS, y después reenlazar
     todos los programas enlazados estáticamente (los programas
     enlazados dinámicamente tienen la nueva versión de libc
     automáticamente). Para más información sobre ésta opción, mira la
     sección``Haz usar NYS a tus binarios''  más abajo.

  De forma similar al caso del NIS tradicional, si no tienes servidores
  NIS, entonces también necesitarás un programa servidor NIS
  (normalmente llamado ypserv) y tendrás que designar una de las
  máquinas de tu red como servidor NIS maestro. De nuevo, quizás quieras
  establecer al menos un servidor esclavo junto con el maestro.

  6.2.  El Software

  Necesitas obtener y compilar la librería libnsl.so de servicios NYS.
  Si no tienes las herramientas DLL instaladas puedes obtener una
  librería precompilada compartida, estática o en código fuente del
  mismo servidor mencionado más abajo. Nota, de todos modos, que la
  versión precompilada puede ser (y probablemente es) más vieja que la
  última edición del código fuente.

  La librería NYS (en versión código 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 cofiguración
  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 librería nsl, sigue las instrucciones que vienen con
  el software. Si deseas compilar la librería 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 configuración
  para un cliente NYS. Todo lo que se necesita, es que el fichero de
  configuración NIS (/etc/yp.conf) apunte al servidor correcto para su
  información. Además, el fichero de configuración del Name Services
  Switch (/etc/nsswitch.conf) debe estar correctamente configurado.

  Por favor, refieráse a los ejemplos proporcionados con el código
  fuente.

  6.4.  El Fichero nsswitch.conf

  El fichero de Network Services Switch /etc/nsswitch.conf determina el
  orden de las búsquedas realizadas cuando se pide una pieza específica
  de información, de la misma forma que el fichero /etc/host.conf
  determina la manera en que se realizan las búsquedas de hosts.
  Insistimos, eche un vistazo al fichero proporcionado en la
  distribución del código fuente. Por ejemplo, la línea

           hosts: files nis dns

  especifica que las funciones de búsqueda de host deben primero mirar
  en el fichero /etc/hosts local, seguido de una búsqueda 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 librería NYS (libnsl.so), se
  ha conseguido una solución más 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-estáticamente) utilicen NYS.

  Esta combinación también te da la ventaja sobre la implementación del
  NIS tradicional en la libc de linux, en que permite soporte
  transparente para shadow passwords (vía el fichero
  /etc/nisswitch.conf).
  Sigue los sencillos pasos indicados más adelante para recompilar una
  libc que incluya NYS.

  ·  Asegúrate de que tienes las últimas herramientas DLL instaladas.
     Para más información acerca de dónde conseguirlas léete 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 descomprímelos en el directorio de la libc-linux fuente.  Actual­
  mente la distribución 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 librería generada tras la compilación se llamará algo así como

           libc.so.4.5.26

  y estará bajo el directorio jump/libc-nys. Para instalar esta librería
  nuestro consejo sería copiarla a /lib con un nombre lexicográficamente
  superior que el número que actualmente tiene. Simplemente con añadir
  la letra "a" lo podremos conseguir. Por ejemplo:

           % cp jump/libc-nys/libc.so.4.5.26 /lib/libc.so.4.5.26a

  Alternativamente, podríamos añadirle "nys" para poder identificarlo
  rápidamente. Ahora ejecuta el siguiente comando

           % ldconfig

  que reseteará tu caché para usar la nueva librería. La estrategia del
  enlazador dinámico puede ser examinada con el comando "ldconfig -p".

  Básicamente esto es todo. Ahora todos tus programas deben poder
  utilizar NYS. Por favor, nota que usualmente el programa "login" está
  compilado estáticamente y que por lo tanto no puede acceder a las
  nuevas funciones NYS de la nueva libc. Deberás recompilar "login" sin
  el parámetro -static, o enlazarlo estáticamente a la librería
  libnsl.a.

  7.  Configurar un Servidor NIS

  7.1.  El Programa Servidor ypserv

  Este documento sólo describe cómo configurar el servidor NIS "ypserv".
  La configuración 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
  estén disponibles via NIS y después añade 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

  Cerciórate de que el mapeador de puertos (rpc.portmap) está en marcha,
  y arranca el servidor "ypserv". El comando

           % rpcinfo -u localhost ypserv

  debería 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 información 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 Instalación NIS/NYS

  Si todo es correcto (como debería serlo), deberías poder verificar tu
  instalación con unos pocos comandos. Asumiendo, por ejemplo, que tu
  fichero passwd está siendo soportado por NIS, el comando

      % ypcat passwd

  debería devolverte los contenidos de tu fichero NIS passwd. El comando

           % ypmatch userid passwd

  (donde userid es el nombre de login de un usuario arbitrario) debería
  devolver la entrada correspondiente a ese usuario en el fichero NIS
  passwd. Los programas "ypcat" e "ypmatch" deberían venir incluidos con
  tu distribución de NIS tradicional o de NYS.

  9.  Problemas Comunes y soluciones con NIS

  Aquí van algunos problemas comunes según los informes de varios
  usuarios:

  1. La versión 4.5.19 de libc no funciona. NIS no funcionará con ellas.

  2. Si actualizas las librerías de 4.5.19 a 4.5.24, el comando su
     dejará de funcionar. Necesitas obtener el comando su de la
     distribución 1.2.0 de Slackware. También de ahí podrás obtener las
     librerías actualizadas.

  3. Puedes encontrar problemas con NIS y DNS en la misma máquina.  Mi
     servidor DNS a veces pasa del NIS. Todavía 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 están registrados en la base de datos NIS
  son rechazados. Intenta entrar como root y si lo consigues, mata el
  ypbind y arráncalo de nuevo.

  10.  Preguntas Realizadas Frecuentemente

  La mayoría de tus preguntas ya deberían estar contestadas. Si todavía
  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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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.      Introducción

  1.1.    Nuevas versiones de este documento

  1.2.    Sugerencias, críticas y comentarios.

  1.3.    Información sobre el copyright

  1.4.    Nota de descargo

  1.4.1.  Ídem sobre la traducción

  1.5.    Otras fuentes de información

  1.5.1.  Usenet

  1.5.2.  Libros

  1.6.    Dónde 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.  Instalación de Cnews

  4.1.2.  Configuración de Cnews

  4.1.3.  Mantenimiento de un sistema con Cnews

  4.2.    InterNetNews ( INN )

  4.2.1.  Instalación de INN

  4.2.2.  Configuración 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 artículos localmente, pero después no
  aparecen ni se envían a otros servidores?

  7.4.    ¿Por qué mi distribución binaria no tiene nntp ?

  7.5.    ¿Por qué dice doexpire  (o relaynews ) que hay una "grave
  falta de espacio" cuando hay un montón de sitio?

  7.6.    ¿Por qué todo parece normal, pero no se publican los
  artículos?

  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 distribución binaria de NNTP ?

  7.9.    ¿Cómo configuro NNTP  para permitir lectura/escritura
  alrededor de la red *sin* almacenar ningún artículo o base de datos
  localmente?

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  La intención de este documento es contestar a algunas de las preguntas
  y comentarios que parecen encajar en la definición de "preguntas
  frecuentes" sobre programas de noticias bajo Linux en general, y la
  versión en la distribución 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 serán periódicamente publicadas
  en comp.os.linux.announce, comp.answers, y news.answers.  También
  serán enviadas a los diversos servidores FTP anónimos que archivan tal
  información, incluyendo ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO (--
  N. del T./: El autor se refiere, lógicamente, a la versión original en
  inglés.--)

  Además, también debería ser posible encontrar este documento en la
  Linux WorldWideWeb home page en http://sunsite.unc.edu/mdw/linux.html.

  1.2.  Sugerencias, críticas y comentarios.

  Estoy interesado en recibir por correo electrónico cualquier
  comentario, positivo o negativo, relativo al contenido de este
  documento. Póngase en contacto conmigo si encuentra errores u
  omisiones obvias.

  Leo, aunque no necesariamente respondo, todo el correo electrónico que
  recibo. Las peticiones para mejorar este documento serán consideradas
  según la combinación que se dé ese día entre tiempo disponible, mérito
  de la petición, y presión sanguínea :-)

  Los insultos irán silenciosamente a /dev/null, así que no se moleste.

  Particularmente, el estándar sobre rutas para el sistema de archivos
  de Linux es algo en evolución. Lo que aparece en este documento son
  sólo ejemplos basados en el estándar 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 distribución
  particular de Linux para saber qué rutas utiliza.

  Los comentarios sobre el formato del documento deberían ir dirigidos
  al coordinador de los HOWTO: Greg Hankins (gregh@sunsite.unc.edu).

  1.3.  Información sobre el copyright

  El News-HOWTO es copyright ©1994 Vince Skahan.

  Pueden reproducirse o distribuirse copias literales de este documento
  en cualquier medio físico o electrónico sin permiso del autor. Las
  traducciones están igualmente permitidas sin permiso expreso si se
  incluye un aviso sobre quién hizo la traducción.

  Se pueden usar pequeñas citas del documento sin consentimiento previo
  del autor. Los trabajos derivados y distribuciones parciales del News-
  HOWTO deben ser acompañados ya sea con una copia literal de este
  fichero o con una referencia a la copia original.

  Se permite y se insta a la redistribución comercial. Sin embargo, al
  autor le gustaría ser avisado de tales distribuciones (como cortesía).

  En resumen, deseamos promover la diseminación de esta información por
  tantos canales como sea posible. Sin embargo, deseamos mantener el
  copyright de los documentos HOWTO.

  Es más, deseamos diseminar TODA la información 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 traducción

  El traductor no se responsabiliza de los contenidos de este documento.
  Tampoco tiene por qué compartir ninguna opinión, criterio, gusto,
  estilo, sugerencia o afirmación del autor. Ante cualquier duda,
  consúltese el original en inglés.

  1.5.  Otras fuentes de información

  1.5.1.  Usenet

  ·  news.admin.misc Sobre la administración 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 continuación, una lista no exhaustiva de libros que pueden ayudar.

  ·  "Managing UUCP and USENET", publicado por O'Reilly & Associates, es
     en mi opinión 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 descripción de todas las piezas (y más), y cómo encajan unas
     con otras.

  ·  "Practical Unix Security" publicado por O'Reilly & Associates,
     contiene una buena disertación 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 información 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 también publicado
     por (al menos) O'Reilly y SSC  (-- N. del T./: También disponible
     en castellano bajo el título de Guía de administración de redes con
     Linux. Véase sección ``''--) . Es una buena manera de aprender
     sobre todo lo que sobre redes de Unix pueda imaginarse.

  1.6.  Dónde NO buscar ayuda

  No hay nada "especial" en configurar y mantener las noticias de Usenet
  bajo Linux. Por lo tanto, no se debería publicar preguntas genéricas
  sobre noticias en los grupos comp.os.linux.*.

  Al menos que su pregunta sea realmente específica sobre Linux (p. ej.,
  ``¿qué parches se necesitan para ejecutar INN con el bash1.12 en SLS
  v1.03?'')  debería publicar sus preguntas en los grupos mencionados
  arriba.

  Permítaseme repetir esto.

  Ya no hay virtualmente ninguna razón para publicar nada relacionado
  con las noticias en la jerarquía comp.os.linux.* Existen grupos en la
  jerarquía news.* para manejar *TODAS* sus preguntas.

  SI PUBLICA VD. EN COMP.OS.LINUX.* PREGUNTAS NO ESPECÍFICAS SOBRE
  LINUX, ESTÁ BUSCANDO AYUDA EN EL SITIO EQUIVOCADO. LOS EXPERTOS EN
  NOTICIAS DE USENET ESTÁN EN LOS GRUPOS ANTERIORMENTE MENCIONADOS Y
  GENERALMENTE NO USAN LINUX.

  HACER PREGUNTAS NO ESPECÍFICAS DE LINUX EN LA JERARQUÍA LINUX ES UN
  DESPERDICIO DE TIEMPO PARA VD. Y PARA TODOS LOS DEMÁS, Y
  FRECUENTEMENTE LO ÚNICO QUE CONSEGUIRÁ ES RETRASAR LA RESPUESTA A SUS
  PREGUNTAS.

  2.  Requerimientos de hardware

  No hay requerimientos específicos 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.  Supóngase un mínimo de 10Mb para empezar.

  3.  Obtener programas de noticias de Usenet

  Todos los programas que se mencionan en este "COMO" están disponibles
  en los servidores FTP anónimos habituales.

  El directorio /networking/news de ftp.uu.net es generalmente un buen
  sitio por el que empezar.

  La distribución newspak-2.4.tar.z contiene los ficheros de
  configuración y ayuda relativos a la construcción 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 envíeme un mensaje y me aseguraré de
  que reciba una copia.

  4.  Programas de transporte de noticias

  Hoy en día 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 detrás de las cámaras para publicar y propagar los artículos,
  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 añadir el servidor NNTP "Reference
  Release"  a Cnews, ya que están pensados para complementarse.

  4.1.  Cnews Cleanup Release

  El estándar actual de facto en programas de noticias es Cnews. Lleva
  funcionando unos cuantos años; yo lo vi por primera vez alrededor de
  1988.  La versión actual en el momento de escribir estas líneas 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 usándolo
  alrededor del mundo.

  Su mayor desventaja es que parece haber sido diseñado para conexiones
  UUCP por módem, y por tanto requiere la adición de un servidor NNTP
  para manejar transferencia en tiempo real de noticias por Internet.

  A pesar de esto, el administrador novel debería 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 más rápido de lo que solía 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.

  Todavía no me he aclarado de cómo 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 líneas por
  correo electrónico.

  La distribución newspack de sunsite contiene ficheros de configuración
  que funcionan en la Cnews Cleanup Release bajo Linux, así como un
  parche de un par de líneas necesario para evitar algunos problemas de
  "doexplode" con bash1.12.

  Básicamente, 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.  Instalación de Cnews

  Instalar la Cleanup Release de Cnews es simplemente seguir los pasos
  que se detallan en la documentación. Simplemente obtenga las fuentes,
  extráigalas, 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 versión reciente de 'bash' para que Cnews pase sus
  auto-tests. Teclee 'bash -version' para saber qué versión tiene.  La
  versión 1.14.2 definitivamente no es buena. La versión 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 petición mía.

  4.1.2.  Configuración de Cnews

  Como mínimo, necesitará editar o cuando menos echar un vistazo a los
  siguientes ficheros. Todos deberían estar en /usr/local/lib/news:

  ·  active             - el fichero con los grupos activos

  ·  batchparms         - parámetros de proceso por lotes

  ·  explist            - configuración de caducidad de los artículos

  ·  mailname           - nombre de su servidor

  ·  mailpaths          - direcciones de los moderadores de grupos

  ·  organization       - su organización

  ·  sys                - control de lo que se pide y envía

  ·  whoami             - el nombre de su sistema para la línea 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 distribución en los fuentes.

  Todo lo demás puede hacerse vía 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 recién 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
  estándar todavía.  Además, 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 través de un módem de 14.4Kb sin ningún
  problema.

  Los administradores de noticias noveles probablemente no deberían
  intentar instalar INN hasta que tengan experiencia con B-news o Cnews.
  A pesar de ser rápido y versátil, está prácticamente sin documentar
  para el principiante (aunque en la práctica es bastante sencillo una
  vez que te lo imaginas).

  INN es muy quisquilloso con los permisos. No enrede con ellos.

  INN también 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 distribución
  de INN específica para Linux, en cualquier de los servidores de
  archivos de Linux.

  4.2.1.  Instalación de INN

  ( por Arjan de Vet - devet@info.win.tue.nl )

  He hecho un parche + un paquete de configuración 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 versión beta de bash 1.13 que está disponible para Linux en los
  servidores de ficheros habituales. bash 1.12 da algunos pequeños
  problemas al no manejar correctamente los grupos de noticias (puede
  que algún otro problema también, no recuerdo).

  4.2.2.  Configuración de INN

  Básicamente, siga las instrucciones de Arjan y el sistema estará
  listo.  Aquí hay un sumario de qué hacer.

  1. En config.data, asegúrese de que aparece "HAVE_UNIX_DOMAIN DONT"

  2. Añada el nombre del sistema en el que funciona innd a hosts.nntp.
     Si sólo dispone de UUCP, ese es el nombre de su servidor

  3. Asegúrese de que no tiene una línea para nntp en /etc/inetd.conf

  4. Asegúrese 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.  Búsquelo en
  de hacerlo.

  4.2.3.  Mantenimiento de un sistema con INN

  He descubierto que un sistema Linux con INN no requiere prácticamente
  ninguna atención y mantenimiento mientras se tenga un cron adecuado.
  Básicamente, 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 continuación, 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 fácilmente bajo Linux
  en particular.  En el momento de escribir esto, "tin", "trn", y "nn"
  están en la mayoría de las distribuciones de Linux disponibles y en
  newspack.

  A la hora de elegir un lector de noticias, se requiere básicamente
  algo que sea fácil de usar, muy configurable por el usuario, y con
  capacidad para ordenar por hebras y filtrar los artículos (seleccionar
  los artículos 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 instalación de Cnews o INN, y
  el programa "mail" para mandar respuestas por correo electrónico a los
  artículos.

  Esta sección tratará brevemente sobre varios de los lectores más
  populares.  Antes de que pregunte, yo uso "nn" por un montón de
  razones :-)

  5.1.  Tin

  Tin es un lector con capacidad de ordenamiento en hebras que trata de
  ser fácil para los nuevos usuarios. Soporta filtrado de artículos 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 dónde se encuentran ciertos programas (especialmente la
  ubicación de inews) y teclee "make linux". No se requiere ningún
  parche para tin bajo Linux.

  Para ordenar los artículos en hebras, puede simplemente invocar a tin
  con el parámetro "-u" para actualizar los ficheros índice.

  Para usar la capacidad de tin para leer vía NNTP, compílese 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 distribución newspak de sunsite contiene ficheros de configuración
  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 artículos.

  Hay docenas de parámetros con los que invocar a trn para obtener toda
  clase de comportamientos. Lea la página de manual de "trn" para
  conocer los detalles. Yo uso una buena prestación de trn para indicar
  todos los parámetros fácilmente:

  ·  Cree un fichero ~/.trnrc con todas las opciones

  ·  export TRNINIT="~/.trnrc"

  La distribución 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 ejecución, 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 distribución newspak de sunsite contiene ficheros de configuración
  funcionales para nn6.4.18 que Vd. puede copiar en el lugar adecuado y
  teclear "make" bajo Linux. También funcionan con la beta 6.5b3 de la
  próxima actualización nn6.5.

  Cuando haya terminado la compilación, 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 más detalles. Compilar, configurar
  y ejecutar nn bajo Linux no es diferente a ejecutar nn en cualquier
  otro *nix con la excepción de que podría 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
  conexión 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
  selección de artículos es muy rápida (aunque por supuesto hay que
  esperar un poco al cuerpo del artículo si se usa SLIP con un módem).

  La nueva versión (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
  configuración está altamente recomendada, ya que como resultado, no se
  tendrá que gastar tiempo de la CPU para ejecutar nnmaster en absoluto,
  y no se producirán desfases entre la base de datos y los artículos
  reales disponibles.

  5.4.  Otros lectores

  A continuación, 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 recopilación de información
  (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 distribución
  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 artículo (algún programa de proceso de noticias, no
  una persona).  Asegúrese de ejecutar "checkgroups" siempre que el
  artículo checkgroups aparezca por news.admin cada pocas semanas.

  7.2.  permisos?  ¿Por qué tengo problemas que parecen estar relaciona­
  dos con los

  Porque lo están :-)

  Compruebe que sus permisos son correctos y que tiene un usuario y
  grupo "news" en /etc/passwd y /etc/group que coincida con la
  distribución binaria que use. Parece ser que todavía no existe una
  norma común sobre las cuentas habituales en Linux.

  Todo el material de /usr/local/lib/news debería ser news.news,
  debería ser setuid root.

  Puede Vd. usar el UID y GID que quiera para "news".

  7.3.  aparecen ni se envían a otros servidores?  ¿Por qué puedo pub­
  licar artículos localmente, pero después 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 distribución con las versiones 'Performance' o desde cron para
  procesar los lotes que se enviarán a otros servidores, y para hacer
  visibles los artículos 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 distribución binaria no tiene nntp ?

  Porque se supone que es muy fácil 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. También porque se compila con
  información específica para cada sitio que no puede ser modificada en
  ningún fichero de configuración una vez se ha compilado.

  7.5.  ¿Por qué dice doexpire  (o relaynews ) que hay una "grave falta
  de espacio" cuando hay un montón de sitio?

  Porque no puede leer /etc/mtab. Póngale permisos 644. Esto ocurre
  cuando se desmonta un sistema de archivos montado por root con una
  máscara 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 artículos?

  Las versiones viejas de Linux tienen un sed "roto" que Cnews pone en
  evidencia. En particular, si se instaló sobre una SLS vieja, asegúrese
  de mirar /bin y /usr/bin y compruebe que sólo 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' periódicamente desde cron para
  procesar cosas. Esta es una prestación 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 ejecutándose sin tener que
  ejecutar nnmaster (!). Busque en ftp://uniwa.uwa.edu.au para obtener
  una copia.

  7.8.  ¿Por qué no podemos tener una distribución binaria de NNTP ?

  Porque una parte significativa de la información local debe
  especificarse antes de la compilación y no puede determinarse
  automágicamente en tiempo de ejecución. Si tanto lo necesita, por
  favor obtenga INN en vez de intentarlo con Cnews más NNTP.

  7.9.  de la red *sin* almacenar ningún artículo o base de datos local­
  mente?  ¿Cómo configuro NNTP  para permitir lectura/escritura alrede­
  dor

  ( mdw@sunsite.unc.edu (Matt Welsh) )

  1. Obtenga la "implementación de referencia" de nntp y una copia de rn
     de su depósito de archivos local. Si conectase con ftp.uu.net
     obtendría:

     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: indefínalo (es decir, cambie la línea a #undef DOMAIN).

  ·  REALDOMAIN: Defínalo. Busca el dominio usando las librerías.

  ·  SERVER_FILE: Defínalo como el nombre del fichero que contendrá el
     nombre de su servidor de noticias (p. ej. la máquina a través de la
     cual leerá y publicará noticias). Yo uso
     "/usr/local/lib/news/server".

  ·  PASSFILE: Si su servidor de noticias requiere autorización (p. ej.
     algún tipo de nombre de usuario y contraseña)  para publicar,
     defina esto como el nombre del fichero que contiene el nombre de
     usuario y la contraseña (descrito más 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 sólo
     por el servidor NNTP, no por el cliente, pero para asegurarme los
     cambié todos para que apuntasen al directorio correcto; simplemente
     asegúrese 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 línea
     en su /etc/passwd:

                                       usenet:*:13:1::/:

  Asegúrese 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 línea:

                        wonton.tc.cornell.edu

  5. Cree el fichero PASSFILE. Este fichero contiene líneas 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 máquina se requiere ser
  autorizado como usuario "news" con la contraseña "floof".  Por tanto,
  en el fichero PASSFILE (yo uso /usr/local/lib/news/nntppass), se nece­
  sita la siguiente línea:

                 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 más pueda leer este fichero. No, las contraseñas no
  están encriptadas.

  7. Vuelva al directorio donde están las fuentes de nntp.1.5.11 y
     teclee "make client". En este punto se compilará la versión NNTP de
     inews, que es el único programa utilizado por el cliente NNTP.

     Cuando compilé inews, había un error en la librería que causaba que
     la función 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 montón*,
     debería renombrar la función "uname()" de uname.c a algo como
     "mi_uname()", y sustituir las llamadas a uname() por llamadas a
     mi_uname() (en inews.c).  Escríbame (-- 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 demás ficheros
     necesarios. También, enlace /usr/local/lib/news/inews con
     /usr/local/bin/inews.

     Ahora debería 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 debería publicar el artículo. Lo sabrá Vd.
  porque los programas automáticos de respuesta de misc.test contestarán
  a la dirección del campo Reply-To. Por favor, no publique artículos de
  prueba en grupos de verdad, como c.o.l. :)

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 cómo 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
  versión en HTML está en http://hyper.stanford.edu/HyperNews/get/pcm­
  cia/home.html
  ______________________________________________________________________

  Índice general





















































  1. Información general y requerimientos de hardware

     1.1 Introducción
     1.2 Licencia y renuncia de responsabilidad
     1.3 ¿Cuál es la última versión, y dónde puedo obtenerla?
     1.4 ¿Qué sistemas están soportados?
     1.5 ¿Qué tarjetas están soportadas?
     1.6 ¿Cuándo estará soportada mi tarjeta favorita (no soportada)?
     1.7 Listas de correo y otras fuentes de información
     1.8 ¿Por qué no distribuyen binarios?
     1.9 ¿Por qué el paquete es tan grande?

  2. Compilación e instalación

     2.1 Prerequisitos y configuración del kernel
     2.2 Instalación
     2.3 Opciones de inicio
     2.4 Configuración de recursos del sistema
     2.5 Notas acerca de distribuciones de Linux específicas
        2.5.1 Debian
        2.5.2 Red Hat, Caldera, Mandrake
        2.5.3 Slackware
        2.5.4 SuSE

  3. Resolución de problemas de instalación y configuración

     3.1 No se cargan los módulos básicos de PCMCIA.
     3.2 Algunos módulos controladores no cargan
     3.3 fallos en la búsqueda de interrupciones
     3.4 Fallos en la búsqueda de puertos de E/S
     3.5 Fallos durante la comprobación 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 configuración de dispositivos

  4. Uso y características

     4.1 Herramientas para configurar y monitorizar dispositivos PCMCIA
        4.1.1 El demonio de configuración
        4.1.2 Las utilidades
        4.1.3 Inserción y extracción de tarjetas
        4.1.4 Servicios de Tarjetas y Administración Avanzada de Energía
        4.1.5 Apagado del sistema PCMCIA
     4.2 Un vistazo a los scripts de configuración de PCMCIA
     4.3 Adaptadores de red PCMCIA
        4.3.1 Parámetros de dispositivos de red
        4.3.2 Comentarios acerca de tarjetas específicas
        4.3.3 Diagnóstico de problemas con adaptadores de red
     4.4 Dispositivos serie PCMCIA y módems
        4.4.1 Parámetros de dispositivos serie
        4.4.2 Diagnóstico de problemas con dispositivos serie
     4.5 Dispositivos PCMCIA de puerto paralelo
        4.5.1 Parámetros de dispositivos paralelos
        4.5.2 Diagnóstico de problemas con dispositivos de puertos paralelos
     4.6 Adaptadores SCSI PCMCIA
        4.6.1 Parámetros de dispositivos SCSI
        4.6.2 Comentarios acerca de tarjetas específicas
        4.6.3 Diagnóstico de problemas con adaptadores SCSI
     4.7 Tarjetas de memoria PCMCIA
        4.7.1 Parámetros de dispositivos de memoria
        4.7.2 Uso de tarjetas de memoria flash
     4.8 Tarjetas PCMCIA para unidades ATA/IDE
        4.8.1 Parámetros para discos ATA/IDE
        4.8.2 Diagnóstico de problemas con adaptadores ATA/IDE
     4.9 Tarjetas multifunción
  5. Temas avanzados

     5.1 Apartado de recursos para dispositivos PCMCIA
     5.2 Cómo 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 Creación de un disquete de inicio
        5.3.3 Instalación de una imagen

  6. Problemas con tarjetas no soportadas

     6.1 Configuración 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 información de programación

     7.1 Envío de informes de
     7.2 Interpretación de los informes generados por los
     7.3 Primeros auxilios al depurar a bajo nivel
     7.4 (TT
     7.5 Programación 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.  Información general y requerimientos de hardware



  1.1.  Introducción


  Los Servicios de Tarjeta para Linux son un paquete de soporte completo
  para PCMCIA o PC Card. Incluye un conjunto de módulos cargables en el
  kernel que implementan una versión de la interface del programa de
  aplicación de Servicios de Tarjetas, un conjunto de controladores de
  clientes para tarjetas específicas, y un demonio controlador de
  tarjetas que responde a los eventos de inserción y extracción de
  tarjetas, el cual carga y descarga los controladores según sea
  necesario. Soporta «extracción en caliente» de la mayoría de tarjetas,
  por lo que pueden ser insertadas y extraídas de forma segura en
  cualquier momento.

  Este software está en continuo desarrollo. Probablemente contenga
  bugs, y debe ser usado con precaución. 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 código, espero que me envíe sus
  experiencias, ¡buenas o malas!

  Si tiene sugerencias de cómo puede mejorarse este documento, por favor
  hágamelo 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 incluído en distribuciones comerciales sin mi
  previo consentimiento. Aunque no suponga requisito, me gustaría 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 versión disponible.

  Este documento se proporciona «TAL CUAL», sin garantías expresas o
  implícitas. Utilice la información en este documento bajo su propio
  riesgo.


  1.3.  ¿Cuál es la última versión, y dónde puedo obtenerla?


  La versión 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 código fuente de la última versión 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 versión menor para dar origen a una
  versión mayor.

  Las nuevas versiones pueden contener código relativamente sin probar,
  así que también conservo la última versión de la última mayor como
  «colchón» relativamente estable; el retraso actual es 2.9.12. Vd.
  decide qué versión es más apropiada, el archivo CHANGES mostrará las
  diferencias más importantes.

  ftp://hyper.stanford.edu es replicado en ftp://sunsite.unc.edu (y
  todos los servidores réplica 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
  mayoría de las distribuciones principales de Linux, incluyendo
  Slackware, Debian, Red Hat, Caldera, SuSE, e Yggdrasil, entre otros.


  1.4.  ¿Qué sistemas están soportados?


  Este paquete debería correr en la mayoría de portátiles basados en
  Intel y que sean «Linuxizables». También corre en plataformas basadas
  en Alpha (DEC Multia, por ejemplo). Se programa para hacer al paquete
  completamente dual-endian, así que también soporta plataformas basadas
  en PowerPC (Apple Powerbooks, por ejemplo). Los controladores de
  sockets más comunes están soportados. Las bahías 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.

  Están 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 están registrados como compatibles con el
  Intel i82365sl, funcionarán también como norma general.

  El soporte para tarjetas CardBus de 32 bits es todavía experimental.
  Los manejadores previos a la versión 3.0 sólo soportan tarjetas de 16
  bits en sockets CardBus. Debido al paso tan rápido en el cambio de la
  tecnología para el hardware de portátiles, 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 documentación sobre sus chipsets
  ToPIC95 y ToPIC97, sin embargo, la información que han liberado no ha
  sido la realmente adecuada. A pesar de los informes de conflictos,
  Toshiba no ha hecho algún esfuerzo efectivo para remediar esta
  situación.  Hay problemas serios en el soporte de Linux para los
  chipsets ToPIC, que no pueden ser resueltos hasta que esté disponible
  una documentación mejor, o la ayuda adecuada por parte de Toshiba. No
  recomiendo el uso de portátiles Toshiba por el momento. Para el uso de
  tarjetas de 16 bits, recomiendo establecer el modo de puente a PCIC en
  la configuración de la BIOS; para tarjetas CardBus, la decisión es
  suya.

  El controlador Motorola 6AHC05GA usado en portátiles Hyundai, no está
  soportado. El controlador en la HP Omnibook 600 tampoco.


  1.5.  ¿Qué tarjetas están soportadas?


  La versión actual incluye controladores para una variedad de tarjetas
  ethernet, para tarjetas módem y puertos serie, varios controladores
  para adaptadores SCSI, un controlador para tarjetas de unidades
  ATA/IDE, y controladores para tarjetas de memoria que sólo soportan la
  mayoría de tarjetas SRAM y algunas tarjetas flash. El archivo
  SUPPORTED.CARDS incluído en cada versión 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 módems deberían
  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
  funcionarán hasta que alguien escriba los controladores apropiados.
  1.6.  ¿Cuándo 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
  gustaría trabajar hacia un modelo como el del kernel de Linux, donde
  yo sea el responsable principalmente del código del núcleo y otros
  autores puedan contribuir y mantener los controladores para tarjetas
  específicas. El archivo SUPPORTED.CARDS menciona algunas tarjetas para
  las cuales los controladores están 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 consultorías.


  1.7.  Listas de correo y otras fuentes de información


  Solía mantener una base de datos y una lista de correo de usuarios de
  Linux PCMCIA. Recientemente he convertido mi página web para
  información de Linux PCMCIA en un sitio HyperNews, con un conjunto de
  listas de mensajes de temas de Linux PCMCIA. Hay listas para
  instalación y configuración, para diferentes tipos de tarjetas, para
  programar y depurar. La página de información de Linux PCMCIA está en
  http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html. Los usuarios
  pueden solicitar otificación por email de nuevas respuestas a
  preguntas particulares, o notificación para todos los mensajes nuevos
  en una categoría dada. Espero que esto sea un repositorio útil de
  información, para cuestiones que van más allá del enfoque del COMO.

  Hay una lista de Linux dedicada a asuntos de portátiles, la lista
  linux-laptop. Para más información, envíe un mensaje con la palabra
  help a majordomo@vger.rutgers.edu. Para suscribirse, envíe un email
  que contenga el mensaje subscribe linux-laptop a la misma dirección.
  Esta lista de correo puede ser un buen foro de discusión de asuntos de
  Linux PCMCIA.

  La página de Linux Laptop está en
  http://www.cs.utexas.edu/users/kharker/linux-laptop tiene enlaces a
  muchos sitios que tienen información acerca de la configuración de
  tipos específicos de portátiles para Linux. Hay también una base de
  datos para buscar información acerca de configuración de sistemas.


  1.8.  ¿Por qué no distribuyen binarios?


  Para mi, distribuir los binarios puede suponer una molestia
  importante.  Esto es complicado porque algunas características solo
  pueden ser seleccionadas al momento de compilar, y porque los módulos
  dependen mucho de contar con una configuración «correcta» del kernel.
  Así, probablemente necesite distribuir módulos precompilados junto con
  los kernels correspondientes.  Más que esto, la necesidad más grande
  de los módulos precompilados es cuando se instala Linux en un sistema
  limpio. Esto típicamente requiere configurar los controladores para
  que puedan ser utilizados en el proceso de instalación, para una
  distribución de Linux en particular. Cada distribución 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 módulos
  controladores ocupan alrededor de 500K de espacio en disco. Los
  programas de utilidades añaden 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
  extraídas. El tamaño total del paquete es comparable a las
  implementaciones de servicios de tarjetas de DOS/Windows.



  2.  Compilación e instalación




  2.1.  Prerequisitos y configuración del kernel


  Antes de empezar, debería pensar si realmente necesita compilar el
  paquete por sí mismo. Todas las distribuciones comunes de Linux vienen
  con paquetes de controladores precompilados. Generalmente, sólo
  necesita instalar los controladores si necesita una característica
  nueva de los más actuales, o si ha actualizado y/o reconfigurado su
  kernel de forma que es incompatible con los incluidos en su
  distribución de Linux. A pesar de que compilar el paquete no es
  técnicamente difícil, 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 módulos.

  ·  La interface de utilidades XForms para X11 (Opcional).

  Necesita tener la estructura completa del código fuente del kernel, no
  sólo una imagen actualizada del kernel. Los módulos 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 están 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 módulos actuales puede encontrarlas en la misma
  ubicación.

  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 versión 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, asegúrese de estar usando la combinación correcta de
  bibliotecas compartidas y herramientas de módulos.
  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 están compilados como módulos cargables. Cualquiera de los
  controladores compilados dentro de su kernel sólo desperdiciará
  espacio.

  Si quiere usar SLIP, PPP o PLIP, necesitará ya sea configurar el
  kernel con ese soporte activado, o usar la versión de los módulos
  cargables de esos controladores. Hay una desafortunada deficiencia en
  el proceso de configuración de los kernels 1.2.X, en el que no es
  posible establecer opciones de configuración (como compresión SLIP)
  para un módulo 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 opción 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 opción CONFIG_BLK_DEV_IDE_PCMCIA activada, para los
  kernels desde 2.0.* hasta 2.1.*. Los kernels antiguos no soportan
  dispositivos IDE extraíbles; los nuevos no requieren una configuración
  especial.

  Si va a usar un adaptador SCSI PCMCIA, debe habilitar CONFIG_SCSI
  cuando configure el kernel. Debe activar también cualquier controlador
  de alto nivel (disco SCSI, cinta, cdrom, genérico) que espere usar.
  Debe desactivar todos los controladores de bajo nivel para adaptadores
  en particular, porque sólo le quitarán espacio.

  Si busca modularizar un controlador que se necesita para un
  dispositivo PCMCIA, debe modificar /etc/pcmcia/config para especificar
  qué módulos necesitan ser cargados para qué tipos de tarjetas. Por
  ejemplo, si el controlador serie está modularizado, entonces la
  definición del dispositivo serie debería 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 distribución, la biblioteca XForms. Esta librería está
  disponible como un paquete separado de la mayoría 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.  Instalación


  He aquí una sinopsis del proceso de instalación:


  ·  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 contribución y
  que no esté incluído en la distribución principal de PCMCIA,
  descomprima cada uno de ellos en el directorio raíz del árbol PCMCIA.
  Luego siga las instrucciones normales de compilación. Los
  controladores extras se compilarán e instalarán automáticamente.

  Cuando ejecute make config, se le preguntarán algunas opciones de
  configuración y se comprobará su sistema para verificar que se
  satisfagan todos los prerequisitos para instalar soporte PCMCIA. En la
  mayoría de los casos, sólo tendrá que aceptar todas las opciones de
  configuración que vienen por omisión. Asegúrese de comprobar
  cuidadosamente la salida de éste comando en caso de que hubiera
  problemas. Están disponibles las siguientes opciones:



     ¿Hay un directorio de instalación 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 serán
        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 raíz para
        instalar todo en los lugares apropiados.


     ¿Necesita indicadores de compilación para depurar?
        Vea la sección ``Primeros auxilios al depurar a bajo nivel''
        para mayor información acerca de esta opción.


     ¿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
        configuración actual.  La forma configurada por omisión es safe.


     ¿Necesita incluir soporte para tarjetas de 32-bits (CardBus)?
        Deberá seleccionar esta opción si desea usar tarjetas CardBus de
        32-bits.  No se requiere para tener soporte con puentes CardBus
        si sólo planea usar tarjetas PC de 16-bits.


     ¿Necesita incluir chequeo de recursos para BIOS PnP?
        Esto compila código adicional en el módulo principal PCMCIA para
        comunicarse con el BIOS PnP de un sistema para obtener
        información de los recursos que están incluidos en la «placa
        madre» (puertos serie y paralelos, sonido, etc), para ayudar a
        prevenir conflictos de recursos. Si se habilita, se crearán
        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.


     ¿Cómo configurar opciones específicas del kernel?
        Hay algunas opciones de configuración del kernel que afectan a
        las herramientas PCMCIA. El script de configuración puede
        deducirlo desde el kernel actual (el caso por omisión y más
        común).  Alternativamente, si está compilando para instalar en
        otro equipo, puede leer la configuración del árbol de los
        fuentes del kernel, o cada opción se puede establecer
        interactivamente.


  El script de configuración se puede ejecutar de forma no-interactiva,
  para compilar automáticamente o para reconfigurar rápidamente después
  de una actualización del kernel. Algunas opciones adicionales no
  utilizadas con frecuencia sólo pueden ser establecidas desde la línea
  de comandos.  Ejecutando: Configure --help se listarán todas las
  opciones disponibles.

  Al ejecutar make all seguido de make install compilará y luego
  instalará los módulos del kernel y los programas de utilidades.  Los
  módulos del kernel serán instalados en /lib/modules/<version>/pcmcia.
  Los programas cardctl y cardmgr serán instalados en /sbin. Si cardinfo
  se compila, será instalado en /usr/bin/X11.

  Los archivos de configuración serán instalados en el directorio
  /etc/pcmcia. Si está instalando sobre una versión antigua, sus scripts
  de configuración anteriores se respaldarán antes de ser reemplazados.
  Los scripts guardados tendrán la extensión 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 automáticamente. Si tiene un sistema Halikan NBD
  486, tiene un controlador TCIC-2 en una localización inusual:
  necesitará editar rc.pcmcia para cargar el módulo tcic, y también
  especificar el parámetro 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
  suspensión 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 múltiples opciones por medio de espacios y encerradas en
  comillas. La colocación de las opciones de inicio depende de la
  distribución 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 sección ``Notas acerca de
  distribuciones de Linux específicas'' para más 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 módulo controlador de PC Card Interface
        Controller. Hay dos opciones: tcic o i82365. Virtualmente todos
        los controladores actuales están en el grupo i82365. Esta es la
        única opción obligatoria a establecer.


     PCIC_OPTS
        Esto especifica las opciones para el módulo PCIC. Algunos
        controladores tienen características opcionales que pueden o no
        ser implementadas en un sistema en particular. En algunos casos,
        es imposible para el socket controlador detectar si esas
        características están implementadas. Revise la página del manual
        correspondiente para una descripción completa de las opciones
        disponibles.


     CORE_OPTS
        Esto especifica las opciones para el módulo pcmcia_core, el cual
        implementa los servicios principales del controlador PC Card. Es
        conveniente echar un vistazo a man pcmcia_core para más
        información.


     CARDMGR_OPTS
        Esto especifica las opciones que se pasarán al demonio cardmgr.
        Revise man cardmgr para más información.


     SCHEME
        Si está activado, el esquema de configuración de PC Card será
        inicializado a este modo en el momento de arrancar. Revise la
        sección ``Un vistazo a los scripts de configuración de PCMCIA''
        para ver la discusión de esquemas.


  Los controladores de sockets de bajo nivel, tcic e i82365, tienen
  varios parámetros de sincronización de bus que pueden necesitar ser
  ajustados para sistemas con velocidades de bus no muy usuales. Los
  síntomas de los problemas de sincronización incluyen problemas al
  reconocer las tarjetas, congelamiento bajo carga pesada, tasas de
  error altas, o rendimiento pobre de dispositivos. Sólo ciertos puentes
  tienen parámetros de sincronización ajustables, revise la página
  correspondiente del manual para ver qué opciones existen para su
  controlador. He aquí un pequeño resumen:


  ·  Los controladores Cirrus tienen muchos parámetros de
     sincronización.  Lo más importante parece ser el indicador
     cmd_time, la cual determina la longitud de los ciclos de bus
     PCMCIA. En los sistemas rápidos 486 (DX4-100, por ejemplo) parece
     ser beneficioso el incrementar esto de 6 (por omisión) 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 añade estados de
     espera extra a algunas operaciones. Sin embargo, todavía no he
     sabido de ningún portátil que necesite esto.


  ·  El módulo pcmcia_core tiene el parámetro cis_speed para cambiar la
     velocidad de la memoria, la cual se usa para acceder a la
     Estructura de Información de Tarjeta (Card Information Structure)
     (CIS) de una tarjeta. En algunos sistemas con pulsos de bus
     rápidos, incrementar este parámetro (por ejemplo, reducir la
     velocidad de los accesos a tarjeta) puede resultar beneficioso para
     quien tenga problemas al reconocerlas.

  ·  Esto no es cuestión de sincronización, pero si Vd. tiene más de un
     controlador ISA-a-PCMCIA en su sistema o tiene bahías extra en una
     estación, el módulo i82365 debe ser cargado con el parámetro
     extra_sockets establecido a 1. Esto no deberá ser necesario para
     detección de puentes PCI-a-PCMCIA y PCI-a-CardBus.

  He aquí algunas configuraciones de sincronización para algunos
  sistemas específicos:


  ·  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.  Configuración de recursos del sistema


  Los servicios de tarjetas deben evitar automáticamente el ocupar
  puertos e interrupciones que ya estén en uso por otros dispositivos
  estándar.  Intentará así mismo detectar conflictos con dispositivos
  desconocidos, pero esto no es del todo fiable, y en algunos casos
  puede que necesite excluir explícitamente recursos para un dispositivo
  en /etc/pcmcia/config.opts.

  He aquí algunas configuraciones de recursos para tipos específicos de
  portátiles. Revíselas con cuidado: pueden darle información necesaria
  para resolver problemas, pero algunas están (inevitablemente)
  obsoletas y ciertamente contienen errores. Las correcciones y
  adiciones serán 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 específicas


  Esta sección está incompleta. Todas las correcciones y adiciones serán
  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
  configuración 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, páginas del
  manual, y los scripts de configuración; y el paquete pcmcia-modules
  que contiene los módulos controladores del kernel.


  2.5.2.  Red Hat, Caldera, Mandrake


  Estas distribuciones usan la organización 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 omisión que tiene PCMCIA
  desactivado.  Para habilitar PCMCIA, la variable PCMCIA debe
  establecerse en yes.  La configuración por omisión 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 sólo
  se usa un adaptador de red, con un conjunto de parámetros de red, pero
  no tiene la flexibilidad completa del script regular de red PCMCIA.
  Compilar e instalar una distribución 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 distribución 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.  Resolución de problemas de instalación y configuración


  Esta sección describe algunos de los errores más comunes del
  subsistema PCMCIA. Compare sus síntomas con los ejemplos. Esta sección
  sólo describe fallos generales que no son específicas de un
  controlador o tipo de tarjeta en particular.

  Antes de diagnosticar un problema, debe saber dónde se almacena el
  registro del sistema (revise la sección ``Notas acerca de
  distribuciones de Linux específicas''). Debe estar familiarizado con
  las herramientas básicas de diagnóstico como dmesg y lsmod.  Preste
  especial atención al hecho de que muchos componentes de los
  controladores (incluyendo todos los módulos del kernel) tienen sus
  propias páginas individuales en el manual.

  Intente definir su problema lo más ampliamente posible. Si tiene
  varias tarjetas, pruebe cada tarjeta de forma aislada, y en diferentes
  combinaciones. Intente arranques de Linux en frío y arranques en
  caliente de Windows. Compare el arrancar con tarjetas insertadas, o
  insertar las tarjetas después de iniciar. Si normalmente usa su
  portátil ensamblado con una dockstation, prúebelo aparte. Algunas
  veces, dos bahías se comportarán 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 basándose en los síntomas, los
  discos de instalación son difíciles de modificar, especialmente sin
  tener acceso a un sistema Linux ya funcionando. La personalización e
  instalación de los discos de instalación es completamente dependiente
  de la distribución de Linux que elija, y más allá del enfoque de este
  documento. En general, el mejor curso de acción es instalar Linux
  usando otros medios, obteniendo los controladores más recientes, y
  depurando el problema entonces, si es que persiste.


  3.1.  No se cargan los módulos básicos de PCMCIA.


  Síntomas:


  ·  Aparecen errores acerca de que la versión del kernel difiere cuando
     se ejecuta el script de inicio de PCMCIA.

  ·  Después de iniciar, lsmod no muestra algún módulo PCMCIA.

  ·  cardmgr informa no pcmcia driver in /proc/devices en el registro
     del sistema.

  Los módulos del kernel contienen información de la versión, la cual se
  comprueba con el kernel actual cuando se carga un módulo. El tipo de
  chequeo depende de la opción del kernel CONFIG_MODVERSIONS. Si es
  falso, entonces el número de versión del kernel se compila dentro de
  cada módulo y el programa insmod comprueba esto para compararlo con el
  kernel actual. Si CONFIG_MODVERSIONS es verdadero, entonces cada
  símbolo exportado por el kernel tiene un «checksum». Esos códigos se
  comparan con los códigos correspondientes compilados dentro de un
  módulo.

  La idea de esto fue crear módulos menos dependientes de la versión,
  porque los checksums sólo pueden cambiar si la interface del kernel
  cambia, y podría 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. También,
  los checksums han resultado ser jueces excesivamente pesimistas
  respecto a compatibilidad.

  El enfoque práctico de esto es que los módulos del kernel están muy
  atados a tanto la versión del kernel, como a muchas opciones de
  configuración del mismo. Generalmente, un grupo de módulos compilados
  para un kernel 2.0.31 no cargará con otros kernels 2.0.31 a menos que
  se tome un cuidado especial asegurándose que los dos fueron compilados
  con configuraciones similares. Esto resulta ser un asunto difícil para
  la distribución de módulos precompilados del kernel.

  Tiene Vd. varias opciones:


  ·  Si obtuvo controladores precompilados como parte de una
     distribución de Linux, verifique que esté usando el mismo kernel
     que venía con su distribución, sin modificaciones. Si pretende usar
     los módulos precompilados que venían con su distribución, 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 fácilmente si ya tiene instalada la estructura fuente del
     kernel. Revise la sección ``Compilación e instalación'' para
     instrucciones más detalladas.

  ·  En algunos casos, las incompatibilidades en otros componentes del
     sistema pueden prevenir la carga correcta de los módulos del
     kernel. Si ha actualizado su propio kernel, ponga atención a la
     sección ``Requisitos'' acerca de utilidades para módulos y binutils
     que se listan en el archivo Documentation/Changes del árbol de
     directorios de los fuentes del kernel.


  3.2.  Algunos módulos controladores no cargan


  Síntomas:


  ·  Los módulos 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 módulos controladores requieren servicios del kernel
  que pueden o no estar presentes, dependiendo de la configuración 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 característica
  necesaria, insmod puede avisar acerca de símbolos indefinidos y
  rechazar la carga de un módulo en particular. Note que los mensajes de
  error de insmod no distinguen entre errores por diferencias de
  versiones y errores por falta de símbolos.

  Específicamente:


  ·  El controlador serie serial_cs requiere que el soporte en el kernel
     esté activado con CONFIG_SERIAL. Este controlador se debe compilar
     como módulo.

  ·  El soporte para tarjetas serie multipuerto o tarjetas multifunción
     que incluyen dispositivos serie o módems, 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 módulos.

  ·  Los controladores de red requieren que se habilite CONFIG_INET El
     soporte para red del kernel no se puede compilar como módulo.

  ·  El cliente token-ring requiere que el kernel se compile con la
     opción CONFIG_TR activada.

  Hay dos formas de proceder:


  ·  Recompile el kernel con las características necesarias activadas.

  ·  Si las características han sido compiladas como módulos, entonces
     modifique /etc/pcmcia/config para precargar esos módulos.

  El archivo /etc/pcmcia/config puede especificar qué módulos
  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 módulos se especifican relativas al nivel más alto
  del directorio de módulos para la versión actual del kernel; si no se
  especifica la ruta relativa, entonces la ruta por omisión será hacia
  el subdirectorio pcmcia.


  3.3.  fallos en la búsqueda de interrupciones


  Síntomas:


  ·  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.




  Después 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 interrupción
  aparentemente libre, generando una interrupción soft (suave), para ver
  si la interrupción puede ser detectada correctamente. En algunos
  casos, el sondear una interrupción en particular puede interferir con
  otro dispositivo del sistema.

  La razón de este «tanteo» es identificar interrupciones que parezcan
  estar libres (es decir, aquellas que no están reservadas por otro
  controlador de dispositivo), ya sea porque no esté conectado
  físicamente 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 parámetro irq_list para los
     controladores. Por ejemplo, irq_list=5,9,10 limitará la búsqueda a
     tres interrupciones. Todos los dispositivos PCMCIA estarán
     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 opción do_scan=0. En este
     caso, se usará una interrupción por omisión, 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 definición PCIC_OPTS, por
  ejemplo:



               PCIC_OPTS="irq_list=5,9,10"




  Como podrá notar, /proc/interrupts es absolutamente inútil cuando se
  van a diagnosticar problemas en el sondeo de interrupciones. El tanteo
  es lo suficientemente sensible como para nunca intentar usar una
  interrupción que ya está en uso por otro controlador de Linux. Los
  controladores PCMCIA están ya teniendo en cuenta toda la información
  de /proc/interrupts. Dependiendo del diseño del sistema, un
  dispositivo inactivo puede todavía ocupar una interrupción y causar
  problemas si es probado por PCMCIA.


  3.4.  Fallos en la búsqueda de puertos de E/S


  Síntomas:


  ·  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 interrupción, pero no
     muestra resultados de sondeos de E/S.

  ·  En algunos casos, el tanteo de E/S será positivo, pero avisa de un
     gran número 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 están
  asociados con un controlador de Linux. El tanteo es de sólo lectura,
  pero en algunos casos extraños, leer desde un dispositivo puede
  interferir con una función importante del sistema, resultando en
  «congelamiento».

  La guía 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 explícitamente 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 omisión.


  3.5.  Fallos durante la comprobación de la memoria


  Síntomas:

  ·  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 algún 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 módulos principales realizan un chequeo de los primeros 16 bits de
  memoria en el momento en que se inserta la tarjeta. Esta exploración
  puede interferir potencialmente con otros dispositivos de memoria
  mapeados. Así mismo, los paquetes de controladores pre-3.0.0 realizan
  una exploración más agresiva que los controladores más recientes. La
  ventana de memoria se define en /etc/pcmcia/config.opts. La ventana
  por omisión es grande, así que puede ayudar a restringir la
  exploración a un rango más 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 región
  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 dígito hexadecimal (así una
  dirección absoluta de 0xd0000 puede darse como 0xd000). Asegúrese de
  añadir el dígito 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 configuración en la sincronización con el
  controlador.  Revise la sección ``Opciones de inicio'' para más
  información acerca de cómo combatir los problemas comunes de
  sincronización.


  ·  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 difícil que existan conflictos
  con otros dispositivos.  También, las tarjetas CardBus pueden requerir
  grandes ventanas de memoria, las cuales puede ser difícil o imposible
  que coincidan en memoria baja.  Los servicios de tarjetas
  preferentemente localizarán 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 omisión ahora incluye una
  ventana de memoria alta de 0xa0000000-0xa0ffffff. Si tiene un puente
  CardBus y ha actualizado de una versión de PCMCIA anterior, añada esta
  ventana de memoria si no está ya definido.

  En algunos casos, la ventana de memoria alta por omisión no se
  utiliza.

  En algunos modelos IBM Thinkpad, una ventana de 0x60000000-0x60ffffff
  funcionará en lugar de la ventana por omisión.



  3.6.  Fallo al detectar cuando se inserta o se extrae la tarjeta


  Síntomas:


  ·  Las tarjetas se detectan y configuran apropiadamente si están
     presentes al momento de iniciar.

  ·  Los controladores no responden a los eventos de inserción y
     extracción, ya sea registrando los eventos en el registro del
     sistema, o emitiendo pitidos.

  En muchos casos, el controlador del socket (i82365 o tcic) probará
  automáticamente y seleccionará la interrupción apropiada para señalar
  cambios en el estado de la tarjeta. El tanteo automático 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 interrupción puede parecer estar disponible. En esos casos, el
  controlador del socket puede usar una interrupción que es usada por
  otro dispositivo.


  Con los controladores i82365 y tcic la opción list_irq puede usarse
  para limitar las interrupciones que serán 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 opción cs_irq puede usarse también para establecer
  explícitamente la interrupción que será utilizada para monitorizar
  dichos cambios.

  Si no puede encontrar un número de interrupción que funcione, hay
  también un estado en modo de búsqueda: ambos, i82365 y tcic aceptarán
  una opción poll_interval=100, para buscar cambios en el estado de la
  tarjeta una vez por segundo. Esta opción puede usarse también si su
  sistema tiene un rango corto de interrupciones disponibles para
  utilizarse con tarjetas PCMCIA. Especialmente para sistemas con más de
  un controlador de host, hay un pequeño punto para dedicar
  interrupciones para monitorizar cambios de estado de la tarjeta.

  Todas esas opciones deberían establecerse en la línea PCIC_OPTS= ya
  sea en /etc/rc.d/rc.pcmcia o en /etc/sysconfig/pcmcia, dependiendo de
  la configuración de su sistema.


  3.7.  Faltan recursos del sistema


  Síntomas:


  ·  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, véase la sección ``Fallos en la búsqueda 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 exploración 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 interrupción 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 búsqueda
  estableciendo PCIC_OPTS a poll_interval=100. O, si tiene un
  controlador CardBus, intente con pci_csc=1, el cual selecciona una
  interrupción PCI (si está disponible) para cambios de estado en la
  tarjeta.

  La reserva de puertos de E/S no es muy común, pero algunas veces tiene
  lugar con tarjetas que requieren regiones de espacio de E/S grandes,
  contiguas y alineadas, o que sólo reconocen pocas posiciones
  específicas de puertos.  Los rangos de puertos de E/S por omisión en
  /etc/pcmcia/config.opts normalmente son suficientes, pero pueden ser
  extendidos. En casos extraños, la reserva puede indicar que falló el
  sondeo de puertos de E/S; revise la sección ``fallos en la búsqueda de
  puertos de E/S''.

  La reserva de memoria no es común tampoco con las configuraciones de
  la ventana de memoria que vienen por omisión en config.opts. Las
  tarjetas CardBus pueden requerir regiones de memoria más grandes que
  las tarjetas típicas 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 dirección PCI del host (en lugar de sólo 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


  Síntomas:


  ·  Dos tarjetas funcionan bien cuando se usan separadamente.

  ·  Cuando ambas tarjetas se insertan, sólo funciona una.

  Esto usualmente indica un conflicto de recursos con un dispositivo del
  sistema que Linux no conoce. Los dispositivos PCMCIA son configurados
  dinámicamente, así, por ejemplo, las interrupciones son reservadas
  conforme se vayan necesitando, en lugar de ser asignadas
  específicamente 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 están usados por
  la tarjeta que no funciona. Exclúyalos de /etc/pcmcia/config.opts, y
  reinicie el demonio cardmgr para recargar la base de datos de
  recursos.


  3.9.  No se completa la configuración de dispositivos


  Síntomas:


  ·  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 configuración por
  alguna razón. La más común es que un paso en el script de
  configuración se ha bloqueado. Un buen ejemplo podría ser el script de
  red bloqueándose si una tarjeta de red se inserta sin tener presente
  una conexión a la red.

  Para verificar el problema, puede ejecutar manualmente un script de
  configuración para ver dónde se está bloqueando. Los scripts están en
  el directorio /etc/pcmcia. Toman dos parámetros: un nombre de
  dispositivo, y una acción. El demonio cardmgr graba los comandos de
  configuración 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 características



  4.1.  Herramientas para configurar y monitorizar dispositivos PCMCIA


  Si los módulos son todos cargados correctamente, la salida del comando
  lsmod debería 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á también incluir la salida del
  controlador del socket, describiendo el(los) controlador(es) del host
  encontrado(s) y el número de sockets detectados.


  4.1.1.  El demonio de configuración 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 también
  usa pitidos para señalar cambios en el estado de las tarjetas.  Los
  tonos de los pitidos indican el éxito o fracaso de un paso de la
  configuración 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 razón.  Un pitido grave indica
  que la tarjeta no pudo ser identificada.

  cardmgr registra información 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 líneas 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 múltiples dispositivos
  asociados con el mismo controlador, el quinto es el nombre del
  dispositivo, y los dos campos finales son los números 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 cómo
  identificar esas tarjetas, y cual(es) controlador(es) pertenecen a
  cada tarjeta. El formato de este archivo se describe en la página 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 cómo está configurado. También puede ser usado para
  alterar el estado de configuración 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 información de la identificación 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 gráfica el estado
  actual de todos los sockets PCMCIA, similar en contenido a cardctl
  config. También proporciona una interfaz gráfica para la mayoría de
  las otras funciones de cardctl.


  4.1.3.  Inserción y extracción de tarjetas


  En teoría, puede insertar y extraer tarjetas PCMCIA en cualquier
  momento.  Sin embargo, es una buena idea no expulsar una tarjeta que
  está siendo utilizada por algún programa de aplicación. Los kernels
  anteriores al 1.1.77 solían congelarse cuando las tarjetas serie/módem
  eran expulsadas, aunque esto parece estar ya solucionado.


  4.1.4.  Servicios de Tarjetas y Administración Avanzada de Energía


  Los servicios de tarjetas pueden ser compilados con soporte para APM
  (Advanced Power Management) (En castellano: Administración Avanzada de
  Energía), 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 más información disponible en
  http://www.worldvisions.ca/~apenwarr/apmd/. Los módulos PCMCIA serán
  configurados automáticamente para APM si es detectada una versión
  compatible en el sistema.

  Esté APM configurado o no, puede usar cardctl suspend antes de
  suspender su portátil, y cardctl resume después de «despertarlo», para
  apagar y reactivar sus tarjetas PCMCIA. No funcionará con un módem que
  esté en uso, porque el controlador serie no puede guardar y
  restablecer los parámetros operativos del módem.

  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 desactivación será
  incompleto, y puede que algunos módulos 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 configuración de PCMCIA


  Cada dispositivo PCMCIA tiene una «clase» asociada que describe cómo
  debe ser configurado y manejado. Las clases están 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
  configuración (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 extraída.  Para tarjetas con varios dispositivos asociados, el
  script será invocado para cada dispositivo.

  Los scripts de configuración inician al extraer algo de información
  acerca del dispositivo de /var/run/stab. Cada script construye una
  «dirección 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 información
  acerca de cómo debe ser configurado un dispositivo en esta dirección.
  Para algunos, la dirección del dispositivo es sólo el número de
  socket. Para otros, se incluye información extra que puede ser útil
  para decidir cómo configurar el dispositivo. Por ejemplo, los
  dispositivos de red pasan su dirección ethernet de hardware como parte
  de la dirección 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 parámetro es usado para soportar
  múltiples 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 parámetros de
  configuración de red.  El esquema actual se selecciona usando el
  comando cardctl scheme. Si no se define un esquema, por omisión se
  establece el esquema default.

  Como regla general, cuando se configura Linux para un equipo portátil,
  los dispositivos PCMCIA deben ser configurados desde los scripts para
  dispositivos PCMCIA. No intente configurar un dispositivo PCMCIA de la
  misma forma en que configuraría un dispositivo conectado de forma
  permanente. No obstante, algunas distribuciones de Linux suministran
  paquetes PCMCIA que están relacionadas con las herramientas de
  configuración de dispositivos propios de la misma distribución. En ese
  caso, alguna de las siguientes secciones puede o no aplicar;
  idealmente, esto sería documentado por los encargados de la
  distribución.


  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 comúnmente 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 serán
  ejecutados sólo cuando su tarjeta ethernet esté presente. Si su
  sistema tiene la facilidad de configuración de red automática, puede o
  no ser PCMCIA. Consulte la documentación de su distribución de Linux y
  la sección `` Notas acerca de distribuciones de Linux específicas''
  para determinar si los dispositivos de red PCMCIA deben ser
  configurados con herramientas automáticas, o editando network.opts.

  La dirección de dispositivo pasada a network.opts consiste en cuatro
  campos separados por comas: el esquema, el número de socket, la
  instancia de dispositivo, y la dirección 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
  propósitos diferentes, una opción puede ser el configurar las tarjetas
  basadas en la posición 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




  Alternatívamente, pueden ser configuradas usando su dirección 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.  Parámetros de dispositivos de red


  Los siguientes parámetros 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 opción booleana (y/n): indica si la dirección IP e
        información de rutado del host se puede obtener ya sea por BOOTP
        o DHCP, con el demonio pump.


     BOOTP
        Una opción booleana (y/n): indica si la dirección IP del host y
        su información de rutado se obtendrán usando el protocolo BOOTP,
        con bootpc.


     DHCP
        Un opción booleana (y/n): indica si la dirección IP del host y
        su información de rutado se obtendrán de un servidor DHCP, con
        dhcpcd.


     IPADDR
        La dirección IP para esta interface.


     NETMASK, BROADCAST, NETWORK
        Parámetros básicos de red: revise el COMO de red para más
        información.


     GATEWAY
        La dirección IP de una máquina pasarela para la subred de este
        host.  Los paquetes con destinos hacia afuera de esta subred
        serán 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 búsqueda para búsqueda de nombres, es añadida a
        /etc/resolv.conf. DOMAIN y SEARCH son mutuamente exclusivos:
        revise man resolver para más información.


     DNS_1,DNS_2,DNS_3
        Nombres de host o direcciones IP para servidores de nombres para
        esta interface, para ser añadidos 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 número 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 automáticamente sistemas de archivos NFS,
  primero añada 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 símplemente expulsada sin precaución.


  En adición a los parámetros usuales de configuración de red, el script
  network.opts puede especificar acciones extra a tomar después de que
  una interface es configurada, o antes de que se apague la interface.
  Si network.opts define una función de shell llamada start_fn, será
  invocada por el script de red después de que la interface sea
  configurada, y el nombre de interface se pasará a la función 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 configuración
  IF_PORT. Esto puede ser, ya sea un valor numérico como en las
  versiones anteriores de PCMCIA, o una palabra clave que identifique el
  tipo de transceptor. Todos los controladores de red están configurados
  por omisión 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
  rápidamente los cambios de transceptor en cualquier momento.  Las
  primeras versiones del controlador 3x589 tenían un algoritmo de
  autodetección 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 autodetección
  con:



              ifconfig eth0 down up





  4.3.2.  Comentarios acerca de tarjetas específicas



  ·  Con las tarjetas IBM CCAE y Socket EA, el tipo de transceptor
     (10base2, 10baseT, AUI), necesita configurarse cuando el
     dispositivo de red está configurado. Asegúrese de que el tipo de
     transceptor que aparece en el registro del sistema concuerda con su
     conexión.

  ·  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 búsqueda» 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
     opción mem_speed=# al módulo pcnet_cs. Un ejemplo de cómo 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 opción io_speed=# cuando se cargue el módulo pcmcia_core.  Edite
     CORE_OPTS en el script de inicio para activar esta opción.

  ·  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 están
     conectadas cuando son inicializadas. Conecte siempre esas tarjetas
     a la red antes de activarlas. Si ifconfig informa que la dirección
     de harware como todo 0, esto debe ser debido a un problema de
     configuración 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 solución 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 función, que está disponible en
      ftp://hyper.stanford.edu/pub/pcmcia/extras/dlport.c.

  ·  Para adaptadores de red inalámbricos WaveLAN, Jean Tourrilhes,
     jt@hpl.hp.com)  tiene disponible el Wireless HOWTO (Cómo
     inalámbrico) en
     http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/


  4.3.3.  Diagnóstico de problemas con adaptadores de red



  ·  ¿Es reconocida su tarjeta como una tarjeta ethernet? Revise el
     registro del sistema y asegúrese de que cardmgr identifique la
     tarjeta correctamente e inicia uno de los controladores de red. Si
     no lo hace, su tarjeta puede ser utilizable todavía si es
     compatible con una tarjeta soportada. Esto es posible hacerlo
     fácilmente si la tarjeta dice ser NE2000 compatible.

  ·  ¿Está configurada la tarjeta apropiadamente? Si está usando una
     tarjeta soportada, y fue reconocida por cardmgr, pero todavía no
     funciona, pudo ser un conflicto de interrupción o puerto con otro
     dispositivo. Determine qué recursos está utilizando la tarjeta (en
     el registro del sistema), e intente de nuevo excluyéndolos 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 parámetros de sincronización de su controlador
     del socket. Revise la sección ``Opciones de Inicio'' para más
     información.

  ·  Si obtiene mensajes de network unreachable cuando intenta acceder a
     la red, la información especificada en /etc/pcmcia/network.opts es
     incorrecta. Este mensaje es una indicación absolutamente a prueba
     de tontos de que hay un error de rutado.  Por otra parte, las
     tarjetas mal configuradas normalmente fallarán 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 máquinas en otras subredes.
     Debe ser posible hacer ping a las máquinas por su nombre si lleva a
     cabo dichas pruebas con éxito.

  ·  Asegúrese 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. Asegúrese que su cable, conector «T»,
     terminador, etc. estén funcionando.


  4.4.  Dispositivos serie PCMCIA y módems


  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 módems. El uso de dispositivos cua* se desaprueba en los kernels
  actuales, y se puede usar ttyS* para todas las aplicaciones. La
  configuración de un dispositivo serie se puede examinar y modificar
  con el comando setserial.

  Cuando se detecta una tarjeta serie o módem, 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
  número de puertos serie que tenga. El dispositivo ttyS* es el que
  aparecerá en /var/run/stab. El script de opciones por omisión 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 módem PCMCIA.
  Este script sólo debería ser utilizado para configurar dispositivos no
  extraíbles. Modifique /etc/pcmcia/serial.opts si quiere hacer algo
  especial para configurar su módem. No intente tampoco cambiar las
  configuraciones de E/S y puerto de un dispositivo serie utilizando
  setserial. Esto podría decir al controlador serie que busque al
  dispositivo en un lugar diferente, pero no cambiar cómo el hardware de
  la tarjeta está configurado actualmente. El script de configuración
  serie le permite especificar otras opciones para setserial, así como
  si se debe añadir una línea a /etc/inittab para este puerto.

  La dirección del dispositivo pasada a serial.opts tiene tres campos
  separados por comas: el primero es el esquema, el segundo es el número
  de socket, y el tercero es la instancia del dispositivo. La instancia
  del dispositivo puede tomar varios valores para tarjetas que soporten
  múltiples puertos serie, pero para tarjetas de un sólo puerto, siempre
  será 0. Si comunmente usa más de un módem, puede especificar
  diferentes configuraciones basadas en la posición 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 módem 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 módem, 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 módulo 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.  Parámetros de dispositivos serie


  Los siguientes parámetros se pueden definir en serial.opts:



     LINK
        Especifica una ruta para un enlace simbólico 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 añadir una entrada inittab para
        el dispositivo.


  Por ejemplo:



              case "$ADDRESS" in
              *,*,*,*)
                  LINK="/dev/modem"
                  SERIAL_OPTS=""
                  INITTAB="/sbin/getty"





  4.4.2.  Diagnóstico de problemas con dispositivos serie



  ·  ¿Se reconoce su tarjeta como un módem? Revise el registro del
     sistema y asegúrese que cardmgr identifica la tarjeta correctamente
     e inicia el controlador serial_cs. Si no, necesitará añadir una
     nueva entrada en el fichero /etc/pcmcia/config para que pueda ser
     identificado apropiadamente. Consulte la sección ``Configuración de
     tarjetas no reconocidas'' para más detalles.

  ·  ¿Es el módem 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 mayoría de módems
     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 módem.

  ·  ¿Hay un conflicto de interrupciones? Si el registro del sistema se
     parece normal, pero el módem no funciona, pruebe a cambiar la irq a
     0 usando setserial y comprobar si el módem funciona. Esto causa que
     el controlador serie use un modo de búsqueda más bajo en lugar de
     usar interrupciones. Si esto parece solucionar el problema, es
     probable que otro dispositivo del sistema esté usando la
     interrupción seleccionada por serial_cs. Deberá añadir una línea a
     /etc/pcmcia/config.opts para excluir esta interrupción.

  ·  Si el módem parece funcionar muy, muy lento, esto es casi un
     indicador seguro de un conflicto de interrupciones. Asegúrese 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
     más probable que tenga que ver con SLIP, y no con PCMCIA.

  ·  Si obtiene mensajes del kernel indicando que el módulo serial_cs no
     puede cargarse, significa que su kernel no tiene soporte para
     dispositivo serie. Si ha compilado el controlador serie como
     módulo, debe modificar /etc/pcmcia/config para indicar que el
     módulo 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 través de los archivos especiales de
  dispositivo /dev/lp*. La configuración de un dispositivo de impresora
  puede examinarse y modificarse con el comando tunelp.

  El módulo parport_cs depende de los controladores parport y
  parport_pc, los cuales pueden ser compilados dentro del kernel o bien
  compilados como módulos. 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 módulos. Estos controladores sólo reconocen
  dispositivos de puerto paralelo en el momento de iniciar el módulo,
  así que pueden cargarse después de que cualquier dispositivo paralelo
  PC Card sea configurado.

  La dirección del dispositivo pasada a parport.opts tiene tres campos
  separados por comas: el primero es el esquema, el segundo es el número
  de socket, y el tercero es la instancia del dispositivo. La instancia
  del dispositivo puede tomar varios valores para tarjetas que soportan
  múltiples puertos paralelos, pero para tarjetas de un solo puerto,
  siempre será 0. Si usa habitualmente más de una tarjeta, necesitará
  especificar diferentes configuraciones basadas en la posición 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 básico de puerto
  paralelo como módulo, debe editar /etc/pcmcia/config para indicar qué
  módulos 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.  Parámetros de dispositivos paralelos


  Los siguientes parámetros pueden especificarse en parport.opts:



     LINK
        Especifica la ruta del enlace simbólico 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.  Diagnóstico 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 búsqueda. Si parece solucionar el problema,
     es probable que otro dispositivo en su sistema esté utilizando la
     interrupción seleccionada por parport_cs. Deberá añadir una línea a
     /etc/pcmcia/config.opts para excluir esta interrupción.

  ·  Si su kernel genera mensajes indicando que el módulo parport_cs no
     puede cargarse, significa que el kernel no tiene soporte para
     dispositivos paralelos. Si tiene compilado el controlador paralelo
     como módulo, necesita modificar /etc/pcmcia/config para indicar que
     los módulos 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 código
  específico 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, sólo se soporta una tarjeta
  extraíble por controlador.

  Cuando se detecta un nuevo adaptador SCSI, los controladores SCSI
  sondearán la presencia de dispositivos. Revise el registro del sistema
  para asegurar que los dispositivos sean detectado apropiadamente. Los
  nuevos dispositivos SCSI se asignarán 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 configuración /etc/pcmcia/scsi se
  llamará una vez para cada dispositivo conectado, ya sea para
  configurar o apagar ese dispositivo. El script por omisión no toma
  ninguna acción 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
  número de socket, el canal SCSI, ID, y el número lógico de unidad, y
  opcionalmente, el número de partición. El tipo de dispositivo será sd
  para discos, st para cintas, sr para unidades de CD-ROM, y sg para
  dispositivos SCSI genéricos. Para la mayoría de configuraciones, la
  unidad lógica y el canal SCSI serán 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 partición, con las direcciones más 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
  número hexadecimal de cuatro dígitos. 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 según demanda. Para hacerlo, necesita editar
  /etc/pcmcia/config para decirle a cardmgr qué módulos 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"




  Especificaría que se cargase el módulo principal SCSI y el módulo
  controlador de disco antes de cargar el módulo controlador PCMCIA
  normal.  El script Configure de PCMCIA no detectará automáticamente
  módulos SCSI modularizados, así que necesitará usar la opción de
  configuración manual para habilitar el soporte SCSI.

  Encienda siempre los dispositivos SCSI antes de encender su portátil,
  o antes de insertar la tarjeta adaptadora, para que el bus SCSI esté
  listo cuando el adaptador se configure. También hay que ser muy
  cuidadoso al expulsar un adaptador SCSI. Asegúrese 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 físicamente. Por ahora, todos los dispositivos SCSI deberán
  encenderse antes de conectar un adaptador SCSI, y deberán permanecer
  conectados hasta que desconecte el adaptador y/o apague su portátil.

  Hay una complicación potencial cuando se usan tarjetas que no se
  presentan con adaptadores de bus ISA ordinarios. El bus SCSI
  transporta una señal termination power (corriente de terminación) que
  se necesita para que los terminadores pasivos SCSI ordinarios
  funcionen apropiadamente. Los adaptadores PCMCIA SCSI no suministran
  corriente de terminación, 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 alimentación
  externa. Cuando configure la entrada para el dispositivo SCSI, hágalo
  teniendo en cuenta si alguno de sus dispositivos requieren o pueden
  suministrar corriente de terminación o no.


  4.6.1.  Parámetros de dispositivos SCSI


  Los siguientes parámetros pueden ser especificados en scsi.opts:



     DO_FSTAB
        Es una opción booleana (y/n): Especifica si se debe añadir una
        entrada /etc/fstab para este dispositivo.


     DO_FSCK
        Es una opción booleana (y/n): Especifica si se debe comprobar
        este dispositivo antes de ser montado, con fsck -Ta.


     DO_MOUNT
        Es una opción booleana (y/n): Especifica si este dispositivo
        debe montarse automáticamente al momento de insertar la tarjeta.


     FSTYPE, OPTS, MOUNTPT
        El tipo de sistema de archivos, opciones de montaje, y punto de
        montaje que se utilizarán 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 partición 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 específicas



  ·  La tarjeta Adaptec APA-1480 CardBus necesita una ventana de puerto
     de E/S grande (256 puertos contiguos alineados en un límite 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 ningún
     controlador de Linux existente.

  ·  He sido informado de la mala interacción 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.  Diagnóstico de problemas con adaptadores SCSI



  ·  Con el controlador aha152x_cs (usado por Adaptec, New Media, y
     algunos más), parece que el soporte SCSI de conexión/reconexión
     constituye una fuente de problemas frecuentes con dispositivos de
     cinta. Para desactivar esta «característica», añada 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 más grande, controlado con
     el parámetro reset_delay del módulo. 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 múltiples. Si ve que la detección 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 opción 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 módulos 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
     genéricos). Si falta un controlador de alto nivel, los dispositivos
     de ese tipo se ignorarán.



  4.7.  Tarjetas de memoria PCMCIA


  El controlador memory_cs maneja todos los tipos de tarjetas de
  memoria, y también proporciona acceso directo al espacio de la
  dirección de memoria PCMCIA para tarjetas que tienen otras funciones.
  Cuando se carga, crea una combinación de dispositivos de caracteres y
  de bloques.  Revise la página del manual del módulo para ver una
  descripción 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 dirección de dispositivo que se pasa a memory.opts consiste de dos
  campos: el esquema, y el número de socket. Las opciones se aplican a
  la primera partición de memoria común en la tarjeta correspondiente.

  Algunas tarjetas de memoria antiguas, y la mayoría de las tarjetas de
  RAM simple estática, carecen de Card Information Structure, CIS
  (Estructura de Información 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
  erróneamente como tarjetas de memoria.

  El controlador memory_cs usa un algoritmo heurístico 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 errónea, su tamaño puede
  especificarse explícitamente cuando se haga uso de los comandos dd o
  mkfs.


  4.7.1.  Parámetros de dispositivos de memoria




     DO_FSTAB
        Es una opción booleana (y/n): Especifica si se debe añadir una
        entrada /etc/fstab para este dispositivo.


     DO_FSCK
        Es una opción booleana (y/n): Especifica si se debe comprobar
        este dispositivo antes de ser montado, con fsck -Ta.


     DO_MOUNT
        Es una opción booleana (y/n): Especifica si este dispositivo
        debe montarse automáticamente 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 utilizarán para la entrada en fstab y/o para
        montar el dispositivo.


  He aquí un ejemplo de un script que montará automáticamente las
  tarjetas de memoria basándose en el socket en que estén 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 dirección de dispositivo que se pasa a ftl.opts consiste en tres o
  cuatro campos: el esquema, el número de socket, el número de región, y
  opcionalmente, el número de partición. La mayoría de tarjetas flash
  tienen sólo una región de memoria flash, así que el número de región
  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 partición FTL, o
  flash translation layer, en el dispositivo por medio del comando
  ftl_format. Esta capa oculta los detalles específicos de dispositivo
  de la programación de la memoria flash y hace que la tarjeta se vea
  como un simple dispositivo de bloques. Por ejemplo:



              ftl_format -i /dev/mem0c0c




  Nótese 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 difícil. Los números menores de
  los dispositivos tienen tres partes: el número de tarjeta, el número
  de región en esa tarjeta, y opcionalmente, la partición dentro de esa
  región. Una región puede ser tratada como un simple dispositivo de
  bloques sin tabla de partición (como un disquete), o puede
  particionarse como un disco duro.  El dispositivo ftl0c0 es la tarjeta
  0, región de memoria común 0, la región entera. Los dispositivos de
  ftl0c0p1 a ftl0c0p4 son primariamente las particiones de 1 a 4 si la
  región 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 más 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 información de la configuración de la tarjeta.
  Para prevenir el borrado accidental de esta información, ftl_format
  automáticamente detectará esto y saltará al primer bloque cuando se
  cree una partición 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 específica PCMCIA del controlador es ide_cs.
  Asegúrese de usar cardctl o cardinfo para apagar la tarjeta ATA/IDE
  antes de expulsarla, porque el controlador no fue programado a prueba
  de extracción en caliente.

  La dirección de dispositivo que se pasa a ide.opts consiste de tres o
  cuatro campos: el esquema actual, el número de socket, el número de
  serie de la unidad, y un número opcional de partición. El comando
  ide_info puede usarse para obtener el número 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 partición.


  4.8.1.  Parámetros para discos ATA/IDE


  Los siguientes parámetros se pueden especificar en ide.opts:



     DO_FSTAB
        Es una opción booleana (y/n): Especifica si se debe añadir una
        entrada /etc/fstab para este dispositivo.


     DO_FSCK
        Es una opción booleana (y/n): Especifica si se debe comprobar
        este dispositivo antes de ser montado, con fsck -Ta.


     DO_MOUNT
        Es una opción booleana (y/n): Especifica si este dispositivo
        debe montarse automáticamente al momento de insertar la tarjeta.


     FSTYPE, OPTS, MOUNTPT
        El tipo de sistema de archivos, opciones de montaje, y punto de
        montaje que se utilizarán para la entrada en fstab y/o para
        montar el dispositivo.


  He aqui un ejemplo del archivo ide.opts para montar la primera
  partición 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.  Diagnóstico de problemas con adaptadores ATA/IDE



  ·  Algunas unidades IDE violan la especificación PCMCIA al requerir un
     tiempo mayor para iniciar que el máximo permitido para la
     configuración de la tarjeta. Desde la versión 3.0.6, el controlador
     ide_cs automáticamente intentará sondear el dispositivo para darle
     tiempo de iniciarlos. Con los controladores antiguos, necesita
     cargar el módulo 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 estándar, sin embargo es bueno estar enterado por si
     compila un kernel personalizado.


  4.9.  Tarjetas multifunción


  Se puede compartir una simple interrupción entre varios controladores,
  como el controlador serie y el controlador ethernet: en efecto: la
  especificación PCMCIA requiere que todas las funciones de las tarjetas
  compartan la misma interrupción. Normalmente, todas las funciones de
  las tarjetas están disponibles sin tener que intercambiar
  controladores.

  El uso simultáneo de dos funciones de tarjetas es algo «difícil» 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
  simultáneo, 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
  simultáneo ethernet y módem. Los controladores ethernet y serie se
  cargan automáticamente. Sin embargo, el controlador ethernet por
  omisión «posee» la interrupción de la tarjeta. Para usar el módem,
  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 interrupción que previamente utilizaba el controlador
  ethernet.



  5.  Temas avanzados



  5.1.  Apartado de recursos para dispositivos PCMCIA


  En teoría, no debe importar qué interrupción se reserva para cada
  dispositivo, mientras dos dispositivos no sean configurados para usar
  la misma interrupción.

  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.

  Después de modificar /etc/pcmcia/config.opts, puede reiniciar cardmgr
  con kill -HUP.

  La interrupción que se utiliza para monitorizar el estado de la
  tarjeta se determina por el módulo 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 interrupción, use la opción 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 parámetro 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 sólo la irq
  8 o la 12. Sin importar las configuraciones de irq_list, los Servicios
  de Tarjetas nunca reservarán una interrupción que ya esté siendo usada
  por otro dispositivo, o una interrupción que esté excluida en el
  archivo de configuración.


  5.2.  trabajo?  Cómo puedo separar configuraciones de los dispositivos
  para casa y el


  Esto es bastante fácil con el soporte de «esquemas». Usando dos
  esquemas de configuración, llamados casa y trabajo. He aquí un ejemplo
  del script network.opts con configuraciones específicas 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 dirección de dispositivo siempre es la
  configuración del esquema. En este ejemplo, la segunda cláusula case
  aplicará para ambos esquemas. Así, si un esquema no está establecido
  por cualquier razón, se tomará por omisión la configuración 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 explícitamente dependiente de la configuración
  del esquema).

  Para mostrar la configuración del esquema, ejecute:



              cardctl scheme


  Por omisión, la configuración del esquema es persistente a través 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 opción de inicio
  SCHEME; consulte la sección `` Opciones de Inicio'' para más detalles.
  También 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
  opción 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 configuración 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 raíz en un dispositivo PCMCIA es algo
  difícil porque el sistema PCMCIA de Linux no está diseñado para ser
  enlazado dentro del kernel. Sus componentes principales, los módulos
  cargables del kernel y el demonio cardmgr dependen de un sistema que
  ya está ejecutándose. La funcionalidad initrd del kernel sortea esta
  limitación permitiendo a Linux iniciar utilizando un disco ram
  temporal como una imagen raíz mínima, cargar los controladores, y
  remontar entonces un sistema de archivos raíz diferente. La raíz
  temporal puede configurar dispositivos PCMCIA y luego remontar un
  dispositivo PCMCIA como raíz.

  La imagen initrd de residir en un dispositivo arrancable
  obligatoriamente;  lo que implica no puede tratarse de un dispositivo
  PCMCIA. Esta es una limitación 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 raíz). Los dispositivos
  «arrancables» se determinan por BIOS, y están limitados generalmente a
  discos flexibles internos y unidades de disco duro. La funcionalidad
  initrd permite disponer de más dispositivos origen, no de más
  dispositivos «arrancables».

  Algunas distribuciones de Linux permitirán la instalación 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
  instalación de Linux que soporten el configurar una imagen initrd
  apropiada para iniciar Linux con un sistema de archivos raíz PCMCIA.
  Configurar un sistema con raíz PCMCIA de este modo requiere que se use
  otro sistema Linux para crear la imagen initrd. Si no tiene otro
  sistema Linux disponible, una opción podría ser instalar temporalmente
  una configuración mínima en una unidad no PCMCIA, crear una imagen
  initrd, y luego reinstalar en el dispositivo PCMCIA destino.

  El Linux Bootdisk-HOWTO contiene información general acerca de la
  configuración de discos de inicio pero nada específico de initrd.  El
  documento principal de initrd se incluye con las distribuciones
  recientes del código fuente del kernel, en
  linux/Documentation/initrd.txt. Antes de empezar, debería leer este
  documento. Es de utilidad estar familiarizado con lilo. El uso de
  initrd también requiere que tenga un kernel compilado con
  CONFIG_BLK_DEV_RAM y CONFIG_BLK_DEV_INITRD activados.

  Esta es una técnica de configuración avanzada, y requiere un alto
  nivel de familiaridad con Linux y el sistema PCMCIA. Asegúrese de leer
  toda la documentación relevante antes de empezar. Las siguientes
  recetas deberían funcionar, pero las derivaciones de los ejemplos le
  pondrán rápidamente en un territorio desconocido y «no soportado»; y
  estará solo.

  Este método requiere obligatoriamente que se use una versión del
  controlador PCMCIA 2.9.5 o posterior. Los paquetes PCMCIA antiguos o
  los componentes individuales no funcionarán en el contexto initrd. No
  mezcle componentes de diferentes versiones.


  5.3.1.  El script pcinitrd


  El script pcinitrd crea una imagen básica para iniciar con una
  partición raíz PCMCIA. La imagen incluye una jerarquía de directorios
  mínima, algunos archivos de dispositivos, unos cuantos binarios,
  bibliotecas compartidas, y un conjunto de módulos controladores
  PCMCIA.  Cuando se invoca pcinitrd, especifique los módulos
  controladores que busca que se incluyan en la imagen. Los componentes
  principales de PCMCIA, pcmcia_core y ds, se incluyen automáticamente.

  Como ejemplo, digamos que su portátil usa un controlador compatible
  con i82365, y quiere iniciar Linux con el sistema de archivos raíz en
  un disco duro conectado a un adaptador Adaptec SlimSCSI. Podría crear
  una imagen initrd apropiada con:



              pcinitrd -v initrd pcmcia/i82365.o pcmcia/aha152x_cs.o




  Para personalizar la secuencia de inicio de initrd, podría 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 configuración se
  instalarán bajo /etc en la imagen, y también puede personalizarse.
  Consulte la página del manual de pcinitrd para mayor información.





  5.3.2.  Creación de un disquete de inicio initrd


  Después 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 raíz 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 raíz el especificado. La razón 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 raíz alternativo.


  5.3.3.  Instalación de una imagen initrd  en una unidad no-Linux


  Un uso común 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 partición no-
  Linux, y lilo o LOADLIN pueden configurarse para iniciar Linux desde
  esas imágenes.

  Asumiendo que tiene un kernel que se ha configurado para el
  dispositivo raíz apropiado, y una imagen initrd creada en otro
  sistema, la forma más fácil de iniciar Linux es utilizando LOADLIN,
  como:

              LOADLIN <kernel> initrd=<imagen-initrd>




  Una vez que pueda iniciar Linux en su máquina destino, puede instalar
  lilo para permitir que Linux se inicie directamente. Por ejemplo,
  digamos que /dev/hda1 es la partición 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 partición raíz de Linux
  deseada, en un disco duro SCSI montado vía 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 línea boot= dice que se instale el cargador de inicio en el MBR
  (master boot record) del dispositivo especificado. La línea root=
  identifica el sistema de archivos raíz deseado a usar después de
  cargar la imagen initrd, que puede resultar innecesario si la imagen
  del kernel ya se encuentra configurada de esta forma. La sección
  other= se usa para describir el otro sistema operativo instalado en
  /dev/hda1.

  Para instalar lilo en este caso, teclee:



              lilo -C lilo.conf




  Nótese 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 creación de archivos de dispositivos para
  las opciones boot= y root=.



  6.  Problemas con tarjetas no soportadas



  6.1.  Configuración de tarjetas no reconocidas


  Asumiendo que su tarjeta está soportada por algún controlador
  existente, todo lo que se necesita hacer es añadir una entrada a
  /etc/pcmcia/config para decirle a cardmgr cómo identificar la tarjeta,
  y qué controlador(es) necesitan ser asociados a esta tarjeta.
  Consulte la página del manual de pcmcia para más información acerca
  del formato del archivo de configuración. Si inserta una tarjeta
  desconocida, cardmgr normalmente almacenará parte de información de la
  identificación en el registro del sistema, lo cual puede usarse para
  elaborar la entrada de configuración. Esta información puede mostrarse
  también con el comando cardctl ident.

  He aquí un ejemplo de cómo 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 podría ser:



              card "Megahertz XJ2288 V.34 Fax Modem"
                version "MEGAHERTZ", "XJ2288", "V.34 PCMCIA MODEM"
                bind "serial_cs"




  o usar los códigos de ID más 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 números de versión. Cuando haga nuevas entradas
  en la configuración, hay que ser cuidadosos para copiar las cadenas
  exactamente, preservando mayúsculas y minúsculas, y espacios en
  blanco.  Asegúrese también de que la entrada en la configuración tiene
  el mísmo número de cadenas que aparecen en el archivo de registro.

  Tenga en cuenta que puede especificar cualquier controlador para una
  tarjeta, pero si sólo está dando palos de ciego, no hay mucha razón
  para esperar que esto resulte productivo. Puede tener suerte y
  encontrar que su tarjeta está soportada por un controlador existente.
  Sin embargo, el resultado más probable es que el controlador no
  funcione, y puede tener efectos laterales desafortunados como el
  congelamiento de su sistema. A diferencia de la mayoría 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.

  Después de editar /etc/pcmcia/config, envíe una señal a cardmgr para
  recargar el archivo con:



              kill -HUP `cat /var/run/cardmgr.pid`




  Si configura una entrada para una tarjeta nueva, por favor, envíeme
  una copia para que pueda incluirla en el archivo de configuración
  estándar.


  6.2.  Soporte para una tarjeta ethernet compatible con NE2000


  Antes de empezar: este procedimiento sólo funcionará para tarjetas
  ethernet simples. Las tarjetas multifunción (por ejemplo, las tarjetas
  «combo» ethernet/módem) tienen una capa extra de complejidad en
  relación a cómo están integradas las dos funciones, y generalmente no
  pueden soportarse sin obtener algo de información de la configuración
  provista por el fabricante de la tarjeta. Usar el procedimiento
  siguiente con una tarjeta multifunción no resultará productivo en
  absoluto.

  Primero, compruebe si la tarjeta es reconocida por cardmgr. Algunas
  tarjetas que no están listadas en SUPPORTED.CARDS son realmente
  versiones OEM de tarjetas que sí están soportadas. Si encuentra una
  tarjeta como ésta, hágamelo saber para que pueda añadirla a la lista.

  Si su tarjeta no es reconocida, siga las instrucciones en la sección
  ``Configuración de tarjetas no reconocidas'' para crear una entrada en
  la configuración para su tarjeta, y relacionar la tarjeta con el
  controlador pcnet_cs. Reinicie cardmgr para utilizar el archivo de
  configuración actualizado.

  Si el controlador pcnet_cs dice que no puede determinar la dirección
  ethernet del hardware de la tarjeta, edite su nueva entrada en la
  configuración para relacionar la tarjeta con el controlador de memoria
  memory_cs. Reinicie cardmgr para utilizar el nuevo archivo de
  configuración actualizado. Necesitará conocer la dirección ethernet
  del hardware de la tarjeta. Esta dirección es una serie de seis
  números hexadecimales de dos dígitos, impresos normalmente en la misma
  tarjeta. Si no están impresos en la tarjeta, puede usar un controlador
  de DOS para mostrar la dirección. En cualquier caso, una vez que la
  sepa, ejecute:



              dd if=/dev/mem0a count=20 | od -Ax -t x1




  y busque el volcado de información de su tarjeta. Sólo los bytes pares
  están definidos, así que ignore los bytes impares del volcado. Anote
  el desplazamiento hexadecimal del primer byte de la dirección. 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 dirección de hardware. El campo final contiene
  algunos indicadores de características especiales de la tarjeta; para
  empezar, pruebe estableciéndola a 0.

  Después de editar pcnet_cs.c, compile e instale el nuevo módulo.
  Edite nuevamente /etc/pcmcia/config/, y cambie la relación de
  memory_cs con pcnet_cs. Siga las instrucciones para recargar el
  archivo de configuración, y habrá terminado. Por favor mándeme copias
  de sus nuevas entradas de configuración a hw_info.

  Si no puede encontrar la dirección hardware de su tarjeta en el
  vaciado hexadecimal, como un último recurso, puede «forzar» la
  dirección cuando se inicializa el módulo pcnet_cs. Edite
  /etc/pcmcia/config.opts y añada una opción hw_addr, como esta:



              module "pcnet_cs" opts "hw_addr=0x00,0x80,0xc8,0x01,0x02,0x03"




  Por supuesto, sustituya su propia dirección de hardware de la tarjeta
  en el punto apropiado. Tenga en cuenta que si ha tenido que hacer
  esto, es muy difícil 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 métodos.


  6.3.  Tarjetas PCMCIA para unidades de disquete


  La interfaz para disquete PCMCIA que se usa en los Compaq Aero y otros
  equipos todavía 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 exáctamente cómo 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, notarán 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 discusión 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 tenía como política de la compañía no divulgar información
  técnica acerca de sus tarjetas. Sin embargo, han modificado sus
  reglas, y ahora, distribuyen información de los controladores...



  7.  Trucos para depurar e información de programación



  7.1.  Envío 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 podrán ver los problemas actuales (y reparaciones o trabajos
  relacionados, si están 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 versión del kernel de Linux, y la versión 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 módulos PCMCIA y el demonio cardmgr envían 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 envíe
  una notificación 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 notificación de bug, por favor asegúrese 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.  Interpretación de los informes generados por los traps  del ker­
  nel


  Si su problema incluye un fallo del kernel, el vaciado del registro
  del fallo sólo es útil si puede traducir la dirección del error, EIP,
  o algo semejante. Las versiones recientes de klogd intentan traducir
  las direcciones de fallos basándose en el mapa actual de símbolos del
  kernel, pero puede que no funcione si el error se produce en un
  módulo, o si el problema es lo bastante severo como para que que klogd
  no pueda terminar de escribir la información del fallo en el registro
  del sistema.

  Si se localiza en el kernel principal, la dirección 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 módulo, el comando nm
  proporciona la misma información; sin embargo, la dirección del fallo
  necesita ajustarse basándose en la dirección de carga del módulo.
  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 dirección de fallo es 0xc2026081. Si buscamos en System.map, vemos
  que esto está más allá de los límites del kernel, por ejemplo, es un
  módulo del kernel. Para determinar qué módulo, 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 módulo 3c574_cs con un desplazamiento de
  0x0081 desde el inicio del módulo. Todavía no podemos ver más allá de
  este desplazamiento en 3c574_cs.o: cuando el kernel carga un módulo,
  inserta un encabezado en la dirección de carga del mismo, así el
  inicio real se desplaza desde la dirección mostrada en ksyms.  El
  tamaño del encabezado varía con la versión del kernel:  para encontrar
  el tamaño en su kernel, busque un módulo que exporte símbolos (como
  pcmcia_core), y compare la dirección del símbolo con la salida de nm
  para ese mismo símbolo. 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
  tamaño 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 módulo 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 después de haber tenido lugar el fallo.
  En otros casos, puede que tenga que deducir indirectamente las
  direcciones de carga del módulo. La misma secuencia de eventos cargará
  normalmente los módulos 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 módulos
  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
  también 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
     dirección de error principal.

  ·  Para diagnosticar un congelamiento silencioso, pruebe provocar el
     problema con X desactivado, porque los mensajes del kernel se
     envían a la consola en texto, y no serán visibles bajo X.

  ·  Si mata a klogd muchos de los mensajes del kernel harán 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 envíen a la
     consola, para kernels 2.1.x, si existe /proc/sys/kernel/printk,
     hacer:



              echo 8 > /proc/sys/kernel/printk





  ·  La combinación 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
     dirección 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 están documentadas en Documentation/sysrq.txt dentro del árbol
     de los fuentes del kernel.


  7.3.  Primeros auxilios al depurar a bajo nivel


  Los módulos PCMCIA contienen bastante código de depuración compilado
  de forma condicional. La mayor parte de este código está bajo el
  control de las definiciones del preprocesador de PCMCIA_DEBUG. Si no
  está definido, el código de depuración no se compilará. Si se
  establece a 0, se compilará pero no estará activo. Los números mayores
  especifican el incremento del nivel de detalle del registro. Cada
  módulo compilado con PCMCIA_DEBUG definido tendrá un parámetro entero,
  pc_debug, que controla el nivel de detalle de su salida. Esto puede
  ajustarse cuando se carga el módulo, así la salida puede controlarse
  en base a cada módulo sin necesidad de recompilar.

  Su configuración por omisión para syslogd puede descartar los mensajes
  de depuración del kernel. Para asegurarse de que se están registrando,
  edite /etc/syslog.conf y compruebe que los mensajes kern.debug se
  registren en algún lugar. Consulte man syslog.conf para más detalles.


  Hay algunas herramientas de depuración en el subdirectorio debug_tools
  dentro de la distribución de PCMCIA. Las utilidades dump_tcic y
  dump_i365 generan volcados completos de los controladores PCMCIA, y
  decodifican mucha de la información 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 Información de Tarjeta), y decodifica algunos bits importantes.
  dump_cisreg muestra los registros de configuración local de una
  tarjeta.

  El controlador de tarjetas de memoria memory_cs a veces también 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
  común 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 páginas del manual para más información.


  7.4.  /proc/bus/pccard


  A partir de los kernels 2.1.103, el paquete PCMCIA crea un árbol de
  información 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 también su propio
  subdirectorio de entradas de estado. La entrada info identifica el
  controlador del host y describe sus características. 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 configuración PCI del puente, y la
  entrada cardbus es el vaciado de los registros de configuración de
  CardBus.


  7.5.  Programación de controladores de servicios PCMCIA para nuevas
  tarjetas


  El Linux PCMCIA Programmer's Guide constituye la mejor documentación
  acerca de la interfaz de los controladores. La última versión estará
  siempre disponible en hyper.stanford.edu en /pub/pcmcia/doc, o vía 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 más grande será
  modificar un controlador existente que pueda manejar la inserción y
  extracción de dispositivos después del momento de iniciar. De los
  controladores actuales, el controlador de tarjeta de memoria es el
  único controlador autónomo, 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 información técnica por parte del fabricante.
  Puede ser difícil el encontrar a quién preguntar, o a quien explicar
  que información se necesita. Sin embargo, con pocas excepciones, es
  muy difícil, si no imposible, el implementar un controlador para una
  tarjeta sin información técnica por parte del fabricante.

  He escrito un controlador modelo con muchos comentarios que explican
  bastante cómo el controlador se comunica con los Servicios de
  Tarjetas; lo encontrará en la distribución 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
  más 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, basándome en la demanda de
  los usuarios y también 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 distribución.

  Los archivos controladores deben acomodarse en el mismo esquema del
  directorio que utiliza la distribución fuente de PCMCIA, así el
  controlador puede ser desempaquetado en la parte más alta del árbol de
  los fuentes de PCMCIA. Debe incluir los archivos fuentes (en
  ./modules/), una página del manual (en ./man/), y los archivos de
  configuración (en ./etc/ ). El directorio más alto debe incluir
  también un archivo README.

  El directorio de más 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
  extensión .mk, será invocado automáticamente por el Makefile de más
  alto nivel para los destinos all e install. He aquí un ejemplo de cómo
  debe elaborarse un Makefile:



              # Un simple Makefile para un controlador de contribución
              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 instalación que se definen en la
  versión 2.9.10 y versiones posteriores del paquete PCMCIA. Este
  makefile también incluye un destino dist para conveniencia del autor
  del controlador.  Probablemente desee añadir un número de versión al
  final del nombre del paquete (por ejemplo, sample_cs-1.5.tar.gz). Una
  distribución 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 contribución 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
  también de la maquinaria para comprobar la configuración del sistema
  del usuario, y chequeo automático de dependencias, tal y como un
  controlador «normal».

  Aceptaré controladores preparados de acuerdo a esta especificación y
  los colocaré en el directorio /etc/pcmcia/contrib en mi servidor FTP,
  hyper.stanford.edu. El archivo README en este directorio describirá
  cómo desempaquetar un controlador de contribución.

  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 distribución tiene herramientas para configuración del sistema
  que quiera que sean compatibles PCMCIA, por favor, use los archivos
  *.opts en /etc/pcmcia para su «integración». Dichos archivos no serán
  modificados si un usuario compila e instala una nueva versión del
  paquete PCMCIA. Si modifica los scripts principales de configuración,
  una instalación fresca sobreescribirá silenciosamente sus scripts
  personalizados y romperá la conexión con sus herramientas de
  configuración. Contacte conmigo si no está seguro de cómo escribir un
  script de opciones apropiado, o si necesita características
  adicionales.

  Resulta muy útil para los usuarios (y para mi) que documente cómo
  deriva su distribución 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 configuración. Si me manda la información
  apropiada, la incluiré en la sección ``Notas acerca de distribuciones
  de Linux específicas''.

  Cuando construya una distribución PCMCIA, considere el incluir los
  controladores aportados, que no son parte del paquete PCMCIA
  principal.  Por razones de mantenimiento, estoy tratando de limitar el
  tamaño del paquete principal, añadiendo solamente controladores nuevos
  si considero que son de interés general. Los demás controladores se
  distribuirán por separado, como se describe en la sección anterior. La
  división entre controladores generales y separados es algo arbitraria
  y en parte histórica, y no debería implicar diferencia alguna en
  cuanto a calidad.


  8.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos,
  así como de la producción de documentos originales en aquellos casos
  en los que no existe análogo en inglés, centrándose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Diríjase a la sede del Insflug para más información al respecto.

  En élla encontrará siempre las últimas versiones de las traducciones
  «oficiales»:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  en los que estamos trabajando incesantemente.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  «Cartel» Insflug, cartel@insflug.org.















































Muchas más 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 más habituales
  (FAQ, o PUF, Preguntas de Uso Frecuente, en castellano)  sobre PPP
  para Linux (junto con sus respuestas). No es realmente un Como, pués
  se adapta más al formato clásico de Pregunta/Respuesta de las PUF.
  ______________________________________________________________________

  Índice General:

  1.      Prefacio.

  2.      Información general

  2.1.    ¿ Qué es PPP ?.

  2.2.    Mi universidad ( o compañía ) no soporta PPP. ¿ Puedo usar PPP
  ?.

  2.3.    ¿ Dónde se encuentra PPP?.

  2.4.    Acabo de conseguir el paquete PPP. ¿ Qué hago con él ?.

  2.5.    ¿ (Dónde está la documentación ?. ¿ Hay un HOWTO ?, etc.). ¿
  Dónde puedo conseguir documentación adicional sobre PPP ?.

  2.6.    ¿ Podría alguien enviarme scripts para PPP, de tal manera que
  pueda comprender cómo se han escrito ?.

  2.7.    ¿ Dónde debo preguntar para resolver mis posibles dudas sobre
  PPP?.

  2.8.    Mi software PPP no funciona. ¿ Qué hago ?.

  2.9.    ¿ Cómo debo usar PPP con un sistema remoto que usa asignación
  dinámica de direcciones IP ?. ¡¡¡ Cada vez que conecto obtengo una
  dirección IP distinta !!!.

  2.10.   ¿ Cómo puedo saber que dirección IP me ha sido asignada cuando
  se usa asignación dinámica de direcciones ?.

  2.11.   ¿ Puedo usar la misma dirección IP local para todas las líneas
  de un servidor PPP?.

  3.      Otras implementaciones.

  3.1.    ¿ Existen otras implementaciones de PPP distintas a la de
  Linux ?. Me gustaría saber si existe alguna para HP-UX o AIX o ...

  3.2.    ¿ Existe un programa llamado dp  ?.

  3.3.    ¿ Cuáles 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 identificación y verificación: CHAP o
  PAP ?.

  5.      Ficheros de identificación y verificación.

  5.1.    ¿ Cuál es el formato del fichero /etc/pap-secrets  ?. ¿ Hay
  algún ejemplo disponible ?.

  5.2.    ¿ Cuál es el formato del fichero /etc/chap-secrets  ?. ¿ Hay
  algún ejemplo disponible ?.

  6.      Problemas de compilación.

  6.1.    Hay errores cuando intento compilar el kernel.

  7.      Problemas al ejecutar pppd .

  7.1.    pppd  dice que la versión 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 opción 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 cuál es mi dirección IP local.

  7.7.    No puedo averiguar la dirección IP remota.

  7.8.    Obtengo mensajes diciéndome que el número mágico no es
  aceptado.

  7.9.    Obtengo un mensaje: protocol reject for protocol fffb .

  7.10.   El software PPP conecta con el sistema remoto, envía unas
  cuantos tramas, pero parece como si la conexión 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.      Terminación del proceso.

  9.1.    ¿ Existe un comando similar a dip -k  para PPP ?.

  9.2.    PPP no cuelga el módem 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.   ¿ Cómo debo usar el control de flujo XON/XOFF ?.

  10.3.   ¿ El módem parece que conecta a velocidades extrañas. Cuando
  uso  minicom , el módem siempre usa 14400 bits/segundo. Sin embargo,
  PPP dice que está conectando a 9600, 7200 e incluso a 2400
  bits/segundo. ¿ Cómo puedo corregir esto ?.
  10.4.   Cuando hago ftp, la operación get  es muy lenta, pero la
  operación put , sin embargo, es muy rápida. ¿ Porqué ?.

  10.5.   La opción proxyarp  no encuentra la dirección 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 gustaría conectar los ordenadores de mi red a Internet
  usando PPP. Sólo tengo una dirección IP que me es asignada por mi
  proveedor de servicios de conexión (incluso esa dirección IP es
  asignada dinámicamente). ¿ Cómo puedo hacer esto ?.

  11.3.   Conecto con la máquina del sistema remoto, pero no puedo
  hacerlo con ninguna otra máquina de dicho sistema.

  11.4.   Tengo una ruta por defecto pero sigo sin poder acceder al
  resto de máquinas. ¿ Y ahora que hago ?.

  11.5.   No puedo hacer ping  a mi dirección IP local.

  12.     Interacción con otras implementaciones de PPP.

  12.1.   Estoy usando Trumpet (para MSDOS) y la conexión simplemente
  termina. ¿ Porqué ocurre esto ?.

  12.2.   Estoy usando dp-3.1.2  (con SunOS) y el sistema no me permite
  hacer nada más que ping  o nslookup . ¿ Porqué ocurre esto ?.

  12.3.   No puedo conectar con/desde mi máquina 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 conexión 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 información extraña con PPP.

  13.9.   El fichero proc/net/dev  parece que esta vacío.

  13.10.  El kernel informa que los dispositivos PPP están siendo
  "desactivados" cuando el sistema empieza a arrancar.

  13.11.  Acabo de comprobar que /proc/net/dev  no tiene ningún
  dispositivo PPP. ¿ Donde están ?.

  14.     Rutado con redes locales (usando PPP como un "bridge"
  económico).

  14.1.   Slattach  e ifconfig  no funcionan como con SLIP.

  14.2.   Quiero definir una ruta a la red entera y no sólo a un host de
  esa red.

  15.     Otras características 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 síncrono ?.

  16.     Miscelánea

  16.1.   ¿ Existe un lector de correo compatible con PPP ?.

  16.2.   ¿ Y un lector de news ?.

  17.     Preguntas sobre chat .

  17.1.   Mi módem no marca cuando ejecuto chat .

  17.2.   El módem solo marca en el segundo intento.

  17.3.   El script de chat  se para tras enviar el login al sistema
  remoto y nunca envía el password.

  18.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Prefacio.

  Si tiene alguna corrección sobre este documento, por favor,
  notifíquesela a Al Longyear (longyear@netcom.com). Si tiene alguna
  corrección relativa a la traducción, contacte con Rafael Agundo
  (ragundo@bitmailer.net).

  Este documento forma parte de los HOWTO y FAQs de Linux. Estos
  documentos pueden conseguirse vía 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 módem". En la
  documentación sobre PPP suele aparecer también como peer.  Cuando se
  habla de rutado suele aparecer como gateaway. La dirección IP del
  sistema remoto aparecerá como el campo dirección indistintamente el
  término inglés 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 compañías.

  2.  Información 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 través
  de una línea serial. El número 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 comunicación
  peer to peer usando TCP/IP a traves de un enlace PPP.

  2.2.  Mi universidad ( o compañía ) no soporta PPP. ¿ Puedo usar PPP
  ?.

  En general, no. Una implementación clásica de PPP requiere cambios en
  las rutas y en los dispositivos conectados al sistema operativo. En
  definitiva, sería 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 compañía 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 información sobre este paquete, sin embargo
  parece ser que ofrecerá soporte PPP en su próxima versión. (Esta
  información puede estar ya anticuada, mejor contacte con ellos
  directamente. Para averiguar más sobre TIA, puede visitar
  www.marketplace.com <http://www.marketplace.com/tia/tiahome>

  Actualmente ya existe una versión 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 debería
  usar el paquete term. Algunos proveedores de servicios de conexión
  pueden ponerle trabas a utilizar term para conectar con sus sistemas.
  Hay varias razones para ello, pero la más importante está referida a
  temas de 'seguridad'.

  Además del paquete TIA, Danny Gasparovski ha escrito un programa
  llamado slirp, el cual realizará funciones similares al de TIA. Este
  programa, junto con su código fuente, puede obtenerse mediante ftp
  <ftp://blitzen.canberra.edu.au/pub/slirp>

  Debería conseguir el código fuente del programa si desea obtener una
  mejor información de cómo funciona.  La primera impresión es que el
  programa es una excelente alternativa al paquete comercial de TIA.

  2.3.  ¿ Dónde 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 conexión PPP. El
  código 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 versión 2.2 de PPP y posteriores están diseñadas para ser
  utilizadas sólo con versiones de kernel mayores o iguales que la 1.2.
  No utilize esta versión con versiones del kernel 1.1 o inferior, dado
  que tanto el código de red, como el driver tty están ya desfasados.

  2.4.  Acabo de conseguir el paquete PPP. ¿ Qué hago con él ?.

  Read The Fine Material available.

  (--  ( Pequeña broma del autor que sustituye el famoso término 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 después el fichero README.linux.
  Para más fuentes de documentación vea la siguiente pregunta.

  2.5.  puedo conseguir documentación adicional sobre PPP ?.  ¿ (Dónde
  está la documentación ?. ¿ Hay un HOWTO ?, etc.). ¿ Dónde

  Hay varias fuentes de información 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 también viene junto con el paquete.

  ·  El documento Net-2-HOWTO.

  ·  La Network Administration Guide (NAG).

  ·  La página 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 están en sunsite.unc.edu
  <sunsite.unc.edu/pub/Linux/docs/HOWTO>.

  La Network Administration Guide (Guia de Administración de Red ) puede
  obtenerse en sunsite.unc.edu
  <ftp://sunsite.unc.edu/pub/Linux/docs/LDP/network-guide>. También 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
  librería habitual.

  Las páginas man vienen incluídas junto con el código fuente del
  paquete PPP.  Casi con seguridad, será necesario moverlas al
  directorio habitual donde se sitúan las páginas man, /usr/man/man8
  antes de que el comando man pueda encontrarlas. También 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 también archivada en rtfm.mit.edu
  <ftp://rtfm.mit.edu/pub/usenet>.  Actualmente, la PPP FAQ está
  dividida en 8 partes.

  2.6.  comprender cómo se han escrito ?.  ¿ Podría alguien enviarme
  scripts para PPP, de tal manera que pueda

  Existen unos pocos scripts que vienen incluidos con el código fuente
  del paquete.  Estos ejemplos cubren los tipos de accesos más normales
  que usted va a encontrar, accesos donde se conecta a una máquina UNIX
  que le va a pedir un login y un password.

  Con el código fuente de pppd no vienen scripts específicos para
  conectar con un sistema en concreto. Si tiene problemas para conectar
  con dicho sistema, entonces debería pedir ayuda a alguien de su
  sistema y si no la encuentra, debería 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.  ¿ Dónde 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: "¿ Cómo 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 más habituales que suelen hacerse. Si
  usted envía esta pregunta a usenet sin dar una información más
  específica, lo más probable es que la gente que lea el area la ignore.

  Vea primero la pregunta referida a errores que aparecen al desconectar
  el módem (pregunta ``PPP no cuelga el módem cuando termina'').  Estos
  errores no son la causa del problema, sino sólo síntomas.  Preguntar
  qué puede ir mal incluyendo sólo estos errores tampoco sirve de mucho,
  asi que...

  Lo que realmente debe proporcionar junto con su petición de ayuda es
  una copia del system log (syslog) que obtiene cuando ejecuta pppd con
  la opción debug. Además, si usa chat para establecer la comunicación,
  use la opción -v en la línea de comandos de chat para ver qué es lo
  que está ocurriendo realmente.

  Incluya además los mensajes que proporcione el kernel al arrancar el
  sistema. Estos mensajes aportan información sobre el hardware que
  tiene instalado en su máquina, tipo de UART, versión de PPP, etc.

  Incluya también toda la información 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 vídeo son irrelevantes.
  Lo importante son cosas como el tipo de sistema al que desea conectar,
  la versión de PPP (o de terminal) que usa el sistema remoto, el tipo
  de módem o la velocidad con la que quiere conectar.

  Tenga en cuenta cuando ponga su syslog, que debe eliminar cualquier
  posible referencia a su número de teléfono, su login o su password. No
  son importantes a la hora de solucionar el problema, pero si pueden
  causarle más de un problema de seguridad el proporcionar a todo el
  mundo su clave de acceso.  Elimine también cualquier línea que no
  provenga del kernel o de pppd.

  NUNCA ejecute pppd con la opción kdebug 31 para acompañar su petición
  de ayuda.

  Si su problema requiere examinar el flujo de datos que se intercambia
  entre los ordenadores implicados en la conexión, recibirá un email
  solicitándole que lo envíe. Desafortunadamente, usenet cuesta
  demasiado dinero a mucha gente como para engrosar innecesariamente la
  longitud de los mensajes.

  La información relativa sobre PPP está estructurada en varios niveles.
  La información de debug es enviada al nivel de debug. Los mensajes
  aclaratorios son enviados al nivel de información. 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 información relativa a la impresión de
  tiempos. Es importante.

  2.9.  dinámica de direcciones IP ?. ¡¡¡ Cada vez que conecto obtengo
  una dirección IP distinta !!!.  ¿ Cómo debo usar PPP con un sistema
  remoto que usa asignación

  La asignación de la dirección IP local está en función de las opciones
  que se proporcionen a pppd y del protocolo IPCP. Debería utilizar la
  dirección IP mágica 0.0.0.0 si necesita especificar su dirección IP
  local. La mayoría de la gente simplemente no incluye la dirección IP
  local en las opciones de pppd.

  La otra opción relacionada con este tema se llama noipdefault.  Esta
  opción indica a su proceso pppd que no debe obtener su dirección IP
  local a partir de los datos que contenga su fichero /etc/hosts, sino
  que dicha dirección IP debe proporcionarla el sistema remoto. La
  mayoría de la gente usa esta opción cuando la dirección IP es asignada
  dinámicamente. Sin embargo, esta opción no debe entenderse como "usa
  direcciones IP dinámicas". El uso de direcciones IP dinámicas es
  automático cuando no se proporciona la dirección IP local.

  2.10.  usa asignación dinámica de direcciones ?.  ¿ Cómo puedo saber
  que dirección IP me ha sido asignada cuando se

  Utilize el fichero ejecutable /etc/PPP/ip-up. La dirección IP local es
  el cuarto parámetro que se le pasa a este fichero en su línea de
  comandos. Este fichero se ejecuta cuando pppd conoce su dirección IP
  local.
  Además, por si le interesa, el quinto parámetro que se le pasa a este
  fichero es la dirección IP remota del sistema con el que ha conectado.

  Si siente curiosidad sobre el valor que le ha sido asignado, entonces
  debería 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 dirección IP local
  para todas las líneas de

  Si. La dirección local no es significativa para el sistema local. Lo
  que si debe tener es una única dirección IP remota. El rutado de
  información se realiza usando la dirección IP remota, no la local.

  3.  Otras implementaciones.

  3.1.  Me gustaría 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 ``¿
  Dónde está la documentación ?.''.

  HP-UX está soportado por el paquete comercial de Morningstar. El
  soporte para AIX se encuentra ya disponible en la versión 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 algún paquete PPP para el sistema xxxx ?". Estas
  preguntas serán archivadas "apropiadamente" :-).

  El paquete pppd que se encuentra en sunsite no contiene código que
  implementa interfaces del tipo stream. Esto se debe a que estos tipos
  de interfaces tienen copyright. El grupo de personas que han diseñado
  el paquete pppd ha realizado gestiones para ver si se podían cambiar
  los términos de este copyright. Por el momento, no ha habido
  respuesta.

  Por esta razón, y dado que sunsite está dedicado específicamente a
  Linux, se han eliminado los ports de PPP para AIX, SunOS, Next y otros
  sistemas que contenían protocolos con streams.  Se siguen manteniendo
  los ports para BSD y para Linux. Si quiere conseguir el código 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 traslación de PPP a Linux. Es un buen programa, permite "demand
  dial", pero sólo 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. También existe otro paquete
  denominado simplemente ppp. El paquete KA9Q también contiene código
  que implementa PPP.

  De todos estos paquetes, pppd fue el que más se ajustaba a las
  necesidades de la traslación a Linux, por eso fue elegido.

  (Si quiere más información sobre estos programas, así como sobre
  otros, pregunte en el grupo comp.protocols.ppp ).

  3.3.  ¿ Cuáles son los RFCs que describen el protocolo PPP ?.

  La implementación actual de PPP es una mezcla de varios de ellos. La
  mayor parte del código de PPP aparece descrito en los RFCs 1331 y
  1332. Estos RFCs han quedado obsoletos hoy en día. RFC 1331 fue
  substituido por el RFC 1548 y éste a su vez fue sustituido 6 meses más
  tarde por el RFC 1661.

  La mayoría de las implementaciones de PPP no tienen porqué tener
  ningún problema con la versión PPP de Linux. Para una lista completa,
  consulte la PPP FAQ.

  Extraído de la PPP FAQ:

       Los RFCs 1134, 1171, 1172 (y 1055 para este tema en con­
       creto)  han quedado obsoletos. Sólo son interesantes si va a
       conectar con una implementación "muy antigua" de PPP y no
       consigue negociar con ella. Por ejemplo, el PPP remoto le
       pregunta al suyo por la opción 2 de IPCP con sólo una longi­
       tud de 4 y con un tipo de compresión 0x0037.
       (Todavía existe un montón de todo esto circulando por ahí .
       Sea cuidadoso ahí fuera).

  Linux, por ejemplo, detectaría esta condición y la corregiría
  automáticamente.

  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 comunicación.

  4.2.  ¿ Qué es mejor: usar PPP o SLIP ?.

  Depende de muchos factores. Generalmente, las personas que hacen esta
  pregunta, no han leído el documento Net-2-HOWTO. Consulte la pregunta
  ``¿ Dónde está la documentación ?.''.

  Una excelente discusión teórica sobre esta cuestión está disponible en
  el servidor WWW de Morning Star <http://www.mornignstar.com/>.

  4.3.  ¿ Qué es mejor para la identificación y verificación: CHAP o PAP
  ?.

  Si puede elegir, use CHAP. Si no le queda más remedio use PAP, es
  mejor que nada. (-- A lo largo del documento se utilizará el término
  "identificación y verificación" en vez del equivalente inglés
  "authentification".--)

  5.  Ficheros de identificación y verificación.

  5.1.  algún ejemplo disponible ?.  ¿ Cuál es el formato del fichero
  /etc/pap-secrets  ?. ¿ Hay

  El protocolo de identificación y verificación PAP se usa
  principalmente para enviar al sistema remoto su login y su password en
  ese sistema. Más concretamente, debe enviar el nombre del sistema
  remoto, el nombre de su cuenta en ese sistema y su password.

  Si el usuario en la máquina abbot quiere llamar a costello, la entrada
  correspondiente en /etc/pap-secrets debería ser:

       #account        remote          password        IP address list
       abbot           *               firstbase

  5.2.  Hay algún ejemplo disponible ?.  ¿ Cuál es el formato del
  fichero /etc/chap-secrets  ?. ¿

  El problema más común es que se suele olvidar que para que CHAP
  funcione, AMBOS ordenadores implicados en la comunicación 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 máquina 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 compilación.

  6.1.  Hay errores cuando intento compilar el kernel.

  El paquete con la versión 2.2 de pppd contiene las instrucciones
  necesarias para que pueda compilar el programa. Brevemente, necesita
  ejecutar el comando configure. Así se generarán los enlaces adecuados
  para el Makefile. Después, 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 había construído 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 versión 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 versión 0.0.0 está fuera de fecha.

  Está intentando ejecutar la versión 2.2 de pppd sin haber vuelto a
  recompilar los drivers en el kernel.

  7.2.  yo estoy seguro de haber habilitado la opción al recompilarlo.
  pppd  dice que el kernel no está configurado para PPP. Pero

  Asegúrese 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).

  Asegúrese también de que no tiene una copia vieja de pppd en su disco
  y esté ejecutando esa versión. La versión anterior de pppd se guardaba
  en /usr/lib/ppp. A muchas personas no les gustaba ese directorio, asi
  que en la nueva versión 2.2 se ha movido pppd, chat y pppstats al
  directorio /usr/sbin. Si sus scripts todavía apuntan hacia
  /usr/lib/ppp, entonces probablemente esté ejecutando el código
  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 sólo debería hacerlos el usuario root. Si quiere que
  otro usuario ejecute pppd, asegúrese 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 más 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 distribución Slackware, existía 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, además tener los permisos adecuados para que pueda
  ser visible por el proceso pppd (root, generalmente).

  Este fichero debería estar vacío. Para crearlo, use el comando touch.

  Para más información sobre la función de este fichero, consulte la
  página man de pppd, pppd(8).

  7.6.  No puedo averiguar cuál es mi dirección 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 válidas.

  Esto pueden ocurrir por una serie de situaciones:

  ·  La tarjeta Netblazer no tiene su dirección IP (la de usted) y usted
     no tiene su dirección IP.

  ·  La Netblazer no sabe la dirección IP de su site y usted no sabe la
     dirección IP de la Netblazer.

  El enlace no funcionará hasta que ambas direcciones IP esten
  definidas.

  Debe indicarle a la Netblazer la dirección IP a usar. Use la dirección
  IP local y la direccion IP remota como parámetros a pasar al proceso
  pppd.  Esta opción tiene el formato:

  pppd local_ip:remote_ip [resto de opciones]

  (o sea la dirección IP local, dos puntos y la dirección IP remota).

  7.7.  No puedo averiguar la dirección IP remota.

  Vea la pregunta anterior.

  7.8.  Obtengo mensajes diciéndome que el número mágico 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 número mágico. Si obtiene
  continuamente fallos de conexión debidos al número mágico, las
  probabilidades de que esto sea una coincidencia se reducirán
  geométricamente.

  Las razones más 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 más comun.

  ·  El módem ha desconectado nada más iniciar la conexión y le ha
     dejado conectado con una cuenta en el sistema remoto. La mayoría de
     los módem están configurados para hacer un eco de los datos que se
     les mandan, asi que lo que usted esta viendo no es más 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 situación 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. Según los fabricantes, la versión 5.1 de
  su software tiene numerosos problemas con PPP. A partir de la versión
  5.3 estos problemas ya se han solucionado.

  Si usa la versión 5.1 use la opcion vj-max-slots 3 en la línea 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 márgen que hay especificado
  para ello, pero el servidor no hace tal cosa.

  Alternativamente, también puede eliminar la compresión de cabeceras
  Van Jacobson con la opción -vj a pasar a pppd.

  7.10.  tramas, pero parece como si la conexión no fuese completa. ¿
  Qué significa esto ?.  El software PPP conecta con el sistema remoto,
  envía unas cuantos

  Linux no soporta módems RPI. Si su módem es RPI necesitará otro tipo
  de módem para poder usarlo con Linux. Esta situación no tiene visos de
  cambiar según la política que mantiene Rockwell.

  Examine el system log que obtiene cuando usa la opción debug en la
  línea 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 además el número id no se
  incrementa, sino que permanece fijo, entonces esto significa que no se
  están enviando frames entre su máquina y la máquina remota.

  Las tres causas más comunes de este fallo son las siguientes:

  ·  El software PPP no está funcionando en la máquina con la que quiere
     conectar. Está enviando tramas PPP a otro software que debe de
     estar preguntándose: "¿ Qué es todo este XLSKFDJFpeojd23623 que
     estoy recibiendo ?".

     Asegúrese 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 fáciles de identificar. Suelen tener 40
     caracteres de longitud y contienen varios caracteres. No tienen un
     retorno de carro que separe líneas y se mandan en una secuencia
     cíclica, con una pausa entre secuencias.

  ·  La línea serial no está configurada con 8 bits de datos. PPP
     requiere que la línea 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 también
     adoptar esta configuración. Si no es así, aparecerán 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
     comunicación de 7 bits por dato.

  ·  El sistema remoto está configurado para usar algún metodo de
     identificación y verificación (CHAP o PAP). Si usted no ha
     configurado su sistema con alguno de estos métodos, el sistema
     remoto ignora cualquier paquete IPCP de información que se le
     mande, ya que estará esperando el paquete de identificación y
     verificación.

     En cualquier caso la solución consiste bien en deshabilitar la
     identificación y verificación en el sistema remoto, bien
     habilitarla en su sistema.

     Examine la recepción de las tramas del tipo LCP configure en el log
     de la conexión. Si aparece un auth significa que el sistema remoto
     requiere identificación y verificación.

  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 parámetros que definen el status de la
  línea (nombre del dispositivo de conexión, velocidad de comunicación y
  dirección 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 función 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 deberían ser de
     100.  Usando chmod con un valor de 500 es aceptable si va a leer
     del fichero, o bién usar el valor de 700 su va a escribir en él.
     Este fichero debería ser usado por el usuario root.

  ·  El fichero debe tener como primera línea:

         #!/bin/sh

  El caracter # debe ser el primer caracter de la primera línea del
  fichero.  El intérprete de este script (/bin/sh en este caso) puede
  ser cualquier programa que pueda ser utilizado para ejecutar scripts.
  La mayoría 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 señalado que es necesario utilizar
  PAP para conectar con esta red. ¿ Ha probado a activar esta opción ?.

  8.  DIP

  8.1.  DIP no tiene soporte para ejecutar PPP.

  La versión más actual de dip-uri si soporta el uso de PPP, ya que
  utilizando la opción mode PPP, dip lanzará el proceso pppd
  automáticamente. 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 conexión
  SLIP entre máquinas con la ayuda de otros programas: slattach,
  ifconfig y route.  Todos estos programas deben ser utilizados para
  lograr una conexión SLIP válida, sin embargo, no son necesarios para
  realizar una conexión PPP.

  dip puede ser usado para efectuar la llamada telefónica y arrancar el
  software PPP en el sistema remoto. Para utilizarlo en este modo, es
  mejor usarlo como un parámetro a pasar con la opción connect. Sin
  embargo, usted tiene la opción 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.  Terminación 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 continuación. Para usarlo, corte el texto, sálvelo 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 módem cuando termina.

  Hay varias razones para que ocurra esto:

  ·  ¿ Especificó la opción módem en la línea de comandos de pppd ?.
     Este parámetro controla si es pppd el que debe controlar las
     señales de status del módem. Este parámetro aparece explicado más
     detalladamente en la página man de pppd.

  ·  ¿ Tiene el módem configurado para usar las señales DCD y DTR ?. La
     secuencia Hayes para el módem es normalmente &C1. Si resetea el
     módem durante la sesión con ATZ, asegúrese de que configura su
     módem correctamente.

     La señal DTR la genera el ordenador e indica al módem cuando
     desconectar.  La secuencia Hayes para esto es &D1 o &D2, siendo &D2
     la opción preferida por PPP. Muchos fabricantes de módems
     deshabilitan este uso de la señal DTR en la configuración de
     fábrica que viene almacenada en el módem .

  ·  ¿ Está utilizando un cable barato que no conecta la senal DCD entre
     el ordenador y el módem ?. Los cables de los ordenadores Machintosh
     "Classic"  son un ejemplo. Estos ordendadores no usan esta señal.

  ·  Para conexiones a una cuenta en un sistema remoto, ¿ lanza la
     ejecución de pppd de forma correcta ?.  El proceso pppd debería ser
     lanzado (con exec) desde un script y no desde la línea de comandos
     del shell que esté usando. Si hace esto último y ejecuta pppd, será
     el shell el que reciba la señal HUP (hang-up, colgar) y no pppd.

     Un script típico 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 línea serial. En esta situación, debería usar las
     opciones lcp-echo-request y lcp-echo-failure para que pppd pueda
     detectar esta condición.

  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 opción 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 módem. Esto tiene consecuencias
  catastróficas si utiliza compresión de cabezeras vj (Van Jacobson).

  10.2.  ¿ Cómo 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 opción xonxoff en la línea de comandos de
     pppd. Esta opción le dice al dispositivo serial a utilizar que
     utilice este tipo de control de flujo. Además, carga los dos
     caracteres (XON y XOFF) dentro del driver tty.

  ·  Necesita especificar los caracteres que representan XON y XOFF en
     el parámetro asyncmap que se pasa a pppd. Esto avisa al sistema
     remoto que debe separar estos caracteres cuando quiera enviárselos
     a su máquina. Esto se indica normalmente con la opción asyncmap
     a0000.

  ·  Naturalmente, no olvide decirle a su módem que utilice control de
     flujo XON/XOFF. En los módem ZyXEL, se suele utilizar la secuencia
     "R1&H4".

  10.3.  minicom , el módem siempre usa 14400 bits/segundo. Sin embargo,
  PPP dice que está conectando a 9600, 7200 e incluso a 2400
  bits/segundo. ¿ Cómo puedo corregir esto ?.  ¿ El módem parece que
  conecta a velocidades extrañas. Cuando uso

  Especifique la velocidad que desea en la línea de comandos de pppd.
  Si no especifica la velocidad, PPP utilizará cualquier velocidad que
  exista.  Algunos programas no dejan los parámetros de la línea serial
  iguales que cuando se ejecutaron. Esto puede causar que la línea tenga
  una configuración extraña.

  Linux no soporta módems que utilizan RPI (Rockwell Protocol Interface)
  porque es un protocolo propietario. Dado que Rockwell no quiere
  facilitar el código necesario para poder hacer una adaptación a Linux,
  hay muy pocas posibilidades de ques estos módem sean soportados por
  Linux. La solución en este caso es clara: no usar módems RPI.

  Si no sabe si un módem es RPI cuando quiera adquirirlo, fíjese en las
  frases publicitarias que aparecen en la caja. Frases del estilo "con
  corrección de errores software", o "compatible con Windows" o
  "requiere un driver especial para funcionamiento completo", usualmente
  suelen indicar que el módem es RPI.

  10.4.  operación put , sin embargo, es muy rápida. ¿ Porqué ?.  Cuando
  hago ftp, la operación get  es muy lenta, pero la

  ¿ Especificó la opción 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 reducción de velocidad de
  un 12.5 % cuando está recibiendo datos.

  ¿ Ha configurado bien el sistema remoto ?. ¿ Olvidó especificar el
  control de flujo del módem remoto ?.

  10.5.  La opción proxyarp  no encuentra la dirección hardware.

  Use el paquete ppp-2.1.2d.tar.gz. El proceso pppd fué compilado
  erróneamente con el kernel 1.1.8 y usaba definiciones Net-3 en vez de
  la Net-2 como le correspondía.

  Consulte ademas el mini HOWTO proxy-ARP sobre los requerimientos
  necesarios para utilizar proxy ARP.

  El paquete 2.1 tiene establecido un límite de 64 dispositivos de red.
  Cuando se escribió el código de proxyarp se pensó que era un número
  razonable, dado que la mayoría de la gente suele tener uno o dos
  controladores Ethernet como máximo en una máquina. Hoy en día hay
  máquinas que tienen conectados hasta 128 dispositivos de red.

  La versión 2.2 ha elevado el límite a 256 dispositivos de red. Este
  límite aparece en forma de un #define que se encuentra en el módulo
  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. Sólo tengo una dirección IP que me es asignada por mi
  proveedor de servicios de conexión (incluso esa dirección IP es asig­
  nada dinámicamente). ¿ Cómo puedo hacer esto ?.  ¿ Me gustaría conec­
  tar los ordenadores de mi red a Internet usando

  No se puede. Al menos no de la manera que a usted le gustaría hacerlo
  normalmente. El problema reside en que su proveedor no sabría las
  direcciones IP de las máquinas conectadas a su red y, por tanto, no
  rutaría ninguna trama a su sistema local.

  Sin embargo, existen otras soluciones:

  ·  Puede hacer un telnet a la máquina que está conectada a Internet
     usando pppd. Una vez conectado a esa máquina, 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 más sobre cómo usar esta característica,
     debería unirse a la lista de correo electrónico linux-net developer
     o bien consultar el documento Net-2-HOWTO.

  ·  Ejecute el programa socks en su sistema PPP. Este programa
     realizará la misma función 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 entenderán el concepto de servidor proxy (proxy server)
     que es necesario para trabajar correctamente con el programa.

  11.3.  con ninguna otra máquina de dicho sistema.  Conecto con la
  máquina del sistema remoto, pero no puedo hacerlo

  ¿ Ha olvidado añadir el parámetro defaultroute a la línea de comandos
  de pppd ?. Este parámetro añade una ruta por defecto (default route) a
  su sistema de rutado, permitiendo que los frames dirigidos a otras
  direcciones IP se canalicen a través del dispositivo PPP.

  El software PPP no reemplazará la ruta por defecto si ya existía una
  anterior a la ejecución 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 razón.

  11.4.  máquinas. ¿ 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 más probable
  es que haya un problema de rutado en la máquina remota.

  El sistema remoto no está configurado para IP forwarding. En el RFC de
  PPP se especifica que esta opción NO debe estar activada por defecto.
  Esta opción 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 máquina de la misma
  manera que usted necesita una ruta hacia él. Esto puede hacerse por
  uno de los cuatro métodos siguientes. Cada uno tiene sus ventajas y
  sus inconvenientes y recuerde que sólo puede usar un metodo y sólo
  uno.

  ·  Use una ruta de host (host route). En cada host del sistema remoto,
     añada una ruta a la dirección IP de su máquina Linux, siendo el
     gateway la máquina que usted usa para conectar con ese sistema.
     Esto es adecuado si el sistema remoto tiene pocas máquinas
     conectadas y usa una red simple, sin bridges, routers, gateways,
     etc.

  ·  Use una ruta de red (network route). Divida la dirección IP remota
     de tal manera que la dirección IP local de su máquina Linux, la de
     la máquina remota con la conecta usando PPP y la de la tarjeta
     Ethernet que conecta esta máquina 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 solución funciona muy bien, puesto que puede poner todas
     las direcciones de las máquinas remotas en el mismo dominio de
     direcciones IP.

     Una vez hecho esto, añada una ruta de red en cada uno de los
     gateways y routers, de tal forma que cualquier dirección de la red
     remota sea enviada al servidor de terminal. La mayoría 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 dirección IP a los gateways adecuados. Como los
     hosts tendrán una ruta por defecto a uno de los gateways, este
     gateway generará una trama de redirección ICMP y el host específico
     añadirá automáticamente su propia ruta de host.

  ·  Utilice proxy ARP en el servidor de terminal. Esto sólo funcionará
     si su dirección 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 debería 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 dirección IP local.

  No puede hacer esto porque normalmente no tiene definida una ruta
  hacia esa dirección. Este es el modo normal de funcionamiento, asi que
  no hay nada anormal.  Si quiere hacer un ping a su sistema, utilice la
  dirección 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 permitirán esto, ya que esa
  dirección esta ocupada telefónicamente para ellos. Esto depende de la
  configuración específica de cada servidor .  En general, no haga ping
  a ninguna de las 2 direcciones ( local o remota ). Elija una dirección
  IP de otra máquina que sepa que está en la red remota (una de su
  nameserver, por ejemplo).

  Mientras el software PPP no haga esta tarea, debe de añadir
  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 dirección 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 dirección IP al dispositivo loopback. Una vez que ha añadido la
  ruta apropiada a la dirección IP local, entonces ya puede usar esta
  dirección como el destino para las tramas IP.

  Usted es el responsable de eliminar esta ruta cuando el enlace
  termine.

  12.  Interacción con otras implementaciones de PPP.

  12.1.  termina. ¿ Porqué ocurre esto ?.  Estoy usando Trumpet (para
  MSDOS) y la conexión simplemente

  Trumpet no acepta ningún tipo de compresión de cabeceras VJ. Utilize
  pppd con la opción -vj para desactivar esta compresión.

  12.2.  hacer nada más 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 versión 3.1.2 de dp. Actualícese a la versión
  3.1.2a o posterior. Puede conseguirla en el home site de dp
  <http://www.ecn.purdue.edu>.

  Hasta que consiga esta actualización, no utilice compresión de
  cabeceras VJ.

  12.3.  No puedo conectar con/desde mi máquina con Windows NT.

  Microsoft ha elegido para Windows NT un sistema no estandar de
  identificación y verificación. Están 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 conexión no podrá realizarse. Esta opción le
  indica a Windows NT, que sólo puede comunicarse con otro sistema que
  tenga implementado el protocolo PPP propio de Microsoft (otro sistema
  Windows NT).

  Linux no soporta este tipo de identificación y verificación.  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
  asegúrese 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 máquina Linux y ponga el login y
  el password de la máquina Windows NT en el fichero habitual
  etc/ppp/pap-secrets/.

  La secuencia de identificación y verificación de Microsoft es una
  variante del sistema PAP con el password protegido por un sistema de
  criptografiado del tipo DES. El sistema PAP normal envía 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 código de PPP a la 2.1.2c tienen un fallo en
  el sistema de decodificación de las peticiones de identificación y
  verificación. Una comunciación entre un sistema Windows NT y esta
  versión no podrán nunca negociar. La versión actual, 2.2 o la 2.1.2d
  (si necesita el soporte para la serie de kernels 1.1) deberían ser
  usadas en esta situación

  Segun Scott Hutton (shutton@habanero.ucs.indiana.edu):

  Básicamente, NT RAS (Remote Access Services) terminará la conexión si
  su máquina rechaza (REJ) algún componente del protocolo que sea
  crítico (i.e.  el protocolo de identificación y verificación). 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á
  comprobándose ahora.  Hasta que esté instalado convenientemente, es
  una buena idea deshabilitarlo.)). También he tenido que batallar con
  un montón de claves de registro (registry keys) para eliminar timeouts
  (que son problemáticos cuando sólo 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. Sólo 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 señal HUP. La señal 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 través del
  módem. Esto significa que el módem ha colgado ("hang up" en inglés) la
  conexión.  El programa kill también puede ser usado para enviar esta
  señal al proceso pppd.  Cuando pppd recibe esta señal, empieza la
  secuencia de finalización del enlace de una manera ordenada.

  13.3.  SIGINT.

  El proceso pppd ha recibido una señal INT. Esta señal 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 también puede generar esta señal para el proceso pppd.
  De hecho, esta es la forma educada de finalizar la ejecución de pppd y
  terminar con el enlace. Vea la pregunta referida a dip -k (pregunta
  ``¿ Existe algún comando similar a <tt>dip -k</tt> para PPP ?.'') para
  ver un script que realiza esta función.  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 versión
  actual de PPP para Linux. Esto no es un error, sólo indica que el
  sistema remoto está enviando una invitación a usar este protocolo y
  Linux le responde con un delicado: "No puedo hacer lo que me pides
  ahora, asi que no me marees más 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 erróneo.

  13.5.  Unknow protocol (80fd) received .

  El sistema remoto quiere utilizar el protocolo de control de
  compresión (Compresion Control Protocol) con su sistema Linux. Este
  protocolo se situa "por encima" del protocolo básico y, si se negocia
  correctamente, se obtiene una reducción del número de bytes
  transmitidos en cada trama.  O sea, que la transmisión es más rápida.

  Sin embargo, existen un buen número de compresores que pueden
  agruparse bajo el tármino de Compression Control Protocol. La versión
  2.2 del paquete PPP sólo entiende uno: el compresor BSD. Este
  compresor funciona de forma muy parecida a como lo hace el programa
  compress de UNIX y utiliza una compresión del tipo LZW.  Dependiendo
  del tamaño del código, puede ser necesario una gran cantidad de
  espacio del kernel para incorporar los diccionarios de compresión y
  descompresión necesarios. Esto no debería ser utilizado si su máquina
  tiene un espacio limitado de memoria (ni siquiera lo intente si tiene
  8 megabytes o menos de RAM física). Para estos casos, debería adquirir
  un módem decente que soporte este tipo de compresión.

  A menos que los dos extremos del enlace acepten este tipo de
  compresión, ésta no se utilizará en la conexión.

  Otro tipo común de compresor es Predictor-1. Necesita menos memoria y
  se ejecuta más rápido. Sin embargo, su compresión no es tan buena como
  el de BSD, ya que envía unos pocos más 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 más
  específica que le impide utilizar este tipo de compresión junto con
  pppd.

  13.6.  error  o ioctl(PPPIOCSINPSIG): I/O error .  La conexión 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 versión antigua
  del driver PPP.c.

  Si aparece PPP version 0.2.7, entonces tiene una versión actualizada
  de PPP.c para el paquete 2.1.2. Sin embargo, este fichero no fué
  compilado con el mismo conjunto de números de ioctl. Asegurése que
  sólo tiene un fichero llamado if_ppp.h. Debería estar situado en el
  directorio donde están 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 versión 2.2 del paquete. Esta versión del driver
  solo funciona con las versiones 2.2 del paquete pppd. El programa pppd
  versión 2.2 sólo funcionará con esta versión 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 teléfono. Los drivers tty
  intentan reestablecer la disciplina de conexión que tenían antes de
  perder la línea. A la vez, pppd intenta hacer lo mismo que estos
  drivers tty para poder recuperar la conexión.  Cuando se produce esta
  situación es normal que estos errores aparezcan.

  13.8.  ifconfig  me proporciona una información extraña con PPP.

  Normalmente, ifconfig proporciona una información 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 sólo con propósitos informativos. Si usa una
  versión 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 vacío.

  ¿ Tecleó el comando ls -l /proc/net y se está preguntando cómo puede
  ser que tenga un tamaño de 0 bytes ?. Si es así, no se preocupe porque
  es normal. En vez de eso teclee:

  cat /proc/net/dev

  Ahora no debería de estar vacío. 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 están 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 dinámicamente el número de
  dispositivos que sean necesarios. No hay un límite real sobre el
  número de ellos a crear. Por poner un límite, se ha elegido el valor
  de 256 dispositivos. Si encuentra que este número es pequeño, entonces
  debe cambiar el #define que se encuentra en el fichero ppp.c y poner
  el valor que desee. Este será el número de dispositivos que serán
  cargados dinámicamente.

  13.11.  dispositivo PPP. ¿ Donde están ?.  Acabo de comprobar que
  /proc/net/dev  no tiene ningún

  No están en ningún sitio. Fueron desconectados durante el arranque del
  sistema. Vea la pregunta anterior para más información.

  14.  Rutado con redes locales (usando PPP como un "bridge" económico).

  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 después de que se
  hayan intercambiado los protocolos LCP e IPCP entre las máquinas que
  realizan la conexión.

  Usted no puede reemplazar ifconfig y slattach por pppd. La mayoria de
  los protocolos que se usan con PPP residen dentro del código de pppd.
  Sólo el protocolo IP ( y el IPX cuando esté terminado ) residen dentro
  del kernel.

  La ruta de host (host route) al sistema remoto la añade
  automáticamente pppd. No hay ninguna posibilidad de no añadir esta
  ruta. El proceso pppd terminará si no puede definirla y añadirla a la
  tabla de rutas del sistema.

  La ruta por defecto (default route) puede ser o no añadida. Esto se
  controla con la opcion defaultroute. Si ya existía 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 parámetros 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 dirección IP local (en formato xxx.yyy.zzz.vvv).

  ·  $5 : la direccion IP remota (en formato xxx.yyy.zzz.vvv).

  ·  $6 : el valor del parámetro ipparam.

  14.2.  Quiero definir una ruta a la red entera y no sólo a un host de
  esa red.

  Existe en sunsite un paquete llamado devinfo.tar.gz que contiene una
  serie de pequeñas 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 documentación se encuentra
  en las páginas 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 características 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 código fuente de PPP.

  15.2.  ¿ Existe soporte para filtrado ( filtering ) ?.

  No hay intención de implementar filtrado dentro del código de PPP.  La
  versión 1.3 del kernel soporta una opción firewall que debría usar en
  vez de buscar un método de embutir la lógica 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 sería muy fácil 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 solución
  óptima consiste en usar TCP/IP y la aplicación samba.

  Microsoft y otras compañías han usado el protocolo PPP de NetBIOS.

  El protocolo nbfcp y su documentación son de libre acceso y puede
  obtenerse de numerosas fuentes. El protocolo NetBIOS no es una familia
  de protocolos válidos 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
  diseño actual del driver PPP no se adapta bien al concepto ISDN de
  recepción 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 sería una característica 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 síncrono ?.

  Son necesarios pequeños cambios para soportar un interfaz serial con
  comunicación síncrona. El rediseño que se está haciendo del driver PPP
  está también orientado hacia este fin.  Kate Marika Alhola ha mostrado
  su interés en escribir este soporte.  Debería contactar con ella
  (kate@digiw.fi) para más información.

  Actualmente, Kate ha informado al autor que este driver está ya en
  fase de pruebas, funcionando con máquinas Cisco(TM) y con velocidades
  de 64K y 256K. El código 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.  Miscelánea

  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 módem no marca cuando ejecuto chat .

  El módem debe encontrarse en modo comando para poder marcar. Si su
  módem ya está en linea, los comandos de marcado se envían al sistema
  remoto como si fuesen datos normales.

  Si es posible, configure su módem para que monitorice la señal DTR y
  retorne al modo de comandos cuando se desactive esta señal. Esto
  permitirá al ordenador forzar al módem para que vuelva al modo de
  comandos cuando el proceso pppd termine como resultado del fin de la
  conexión. De este modo, se asegura que el módem se queda en el estado
  adecuado para que chat pueda marcar.

  Si no puede cambiar la configuración del módem, entonces debería
  cambiar la secuencia de marcado para que se parezca a la siguiente.
  Esta secuencia se asegura que el módem está en modo comando antes de
  intentar enviar la secuencia de marcado al módem.

        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 mayoría de los módem para
  responder. Tras esto, envía un AT al módem para esperar su respuesta
  OK. Si esto no sucede en el tiempo especificado en el TIMEOUT (3
  segundos), manda la secuencia +++ al módem y espera de nuevo una
  respuesta OK del módem. Una vez recibida la confirmación del módem,
  configura el módem adecuadamente, restablece el TIMEOUT y marca (por
  tonos) el número de teléfono (555-1212).

  17.2.  El módem 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 envía el password.  El script de chat  se para tras
  enviar el login al sistema remoto

  Algunos sistemas, especialmente SCO, vacían los buffers de recepción
  justo tras escribir el prompt de entrada del login y del password.
  Chat normalmente transmite la respuesta al prompt nada más 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 solución 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 envíe 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 cómo usar su PalmPilot con un sistema Linux. A
  pesar de que los documentos COMO están orientados al uso del sistema
  operativo Linux, éste en particular no depende de la versión de Unix
  utilizada.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Este documento

  1.2.    Lista de correo

  1.3.    Archivos de la lista de correo

  1.4.    Servidor FTP

  2.      Información General

  2.1.    ¿Qué es un Pilot?

  2.2.    Diferentes tipos de Pilot

  2.3.    Instalación del Hardware

  3.      Cómo compartir datos del Pilot con su sistema Linux

  3.1.    El programa pilot-link

  3.1.1.  Instalación 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.  Instalación 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.  Instalación de prc-tools

  4.1.2.  Uso de prc-tools

  5.      Gente

  6.      Anexo: El INSFLUG
  ______________________________________________________________________
  1.  Introducción

  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 sincronización 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, dónde obtenerlo y cómo instalarlo y usarlo.

  1.1.  Este documento

  La última versión de este documento puede obtenerse en
  parte del Linux Documentation Project (LDP). Vea
  http://sunsite.unc.edu/LDP/ para obtener más información sobre el LDP
  y otros documentos HOWTO.

  Las versiones futuras cubrirán más herramientas Unix para el
  desarrollo de programas de aplicación 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 envíeme un mensaje de correo electrónico a la
  dirección indicada anteriormente y especifique a qué versión de este
  documento se está refiriendo.

  Este documento es Copyright © 1997 David H. Silber. Está publicado
  bajo los términos 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 introducción es:

  La lista de correo pilot-unix es para la discusión y compartición 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 más información, incluyendo el cómo suscribirse a la
  lista, envíe un mensaje con la palabra "INFO" a pilot-unix-
  request@lists.best.com. La línea 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.  Información General

  2.1.  ¿Qué es un Pilot?

  El Pilot es un pequeño Asistente Personal Digital. Está fabricado por
  U.S.  Robotics, ahora parte de 3Com.

  Para los que no estén familiarizados con el término, un Asistente
  Personal Digital es uno de esos pequeños dispositivos electrónicos que
  contienen normalmente varios tipos de información personal, como
  pueden ser direcciones y números de teléfono, un calendario, lista de
  recordatorios y/o apuntes y está diseñado para ser transportado
  cómodamente así como estar a mano cuando la información se requiera.

  Los PDAs más versátiles, 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 más antiguos, el 1000 y el
  5000 tienen 128k y 512k de RAM respectivamente.

  Los dos más recientes, el PalmPilot Personal y el PalmPilot
  Professional tienen 512k y 1 Mb de RAM respectivamente. También tienen
  una pantalla LCD retroiluminada y la versión 2.0 del sistema
  operativo. El Professional también incorpora soporte para el protocolo
  TCP/IP e incluye algunos programas adicionales.

  Es posible actualizar cualquier Pilot cambiándole 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.  Instalación 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 receptáculo hecho a medida para colocar el Pilot y con un botón
  de "sincronización". 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 botón de sincronización para que el
  Pilot sepa que se tiene que comunicar. Si se pulsa el botón estando el
  Pilot apagado, éste se encenderá automáticamente.

  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.  Cómo 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
  permitirán 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 están tan
  elaborados como los que se distribuyen con el Pilot, le permitirán
  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 solución más integrada,
  entre sus características se incluye la sincronización completa de
  varios tipos de datos.

  3.1.1.  Instalación del programa pilot-link

  Las versiones empaquetadas siempre irán inevitablemente ligeramente
  retrasadas respecto a la distribución original, pero serán más fáciles
  de instalar y no requieren configuración. La distribución original
  será la mejor elección en aquellas raras ocasiones en las que haya
  estado esperando una nueva característica o el arreglo de algún fallo.

  Puede obtener el paquete Debian de la versión 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 versión 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 versión 0.8.2 del
  programa pilot-link de ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-
  link.0.8.2.tar.gz.  El número de versión es probable que cambie, pero
  las nuevas versiones estarán en el mismo lugar y con un nombre
  similar.

  Una vez que tenga la distribución del programa, descomprímalo 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 información
  necesaria para compilar el programa. Por defecto la configuración se
  realizará de tal manera que la instalación 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 más tarde, de tal manera que pueda probarlo
  primero. (Si está reemplazando una versión anterior con una nueva
  versión, 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
  opción --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 añadir a su camino de búsqueda todo directorio nuevo que
  haya creado en el que estén almacenados ejecutables.

  3.1.2.  Uso del programa pilot-link

  La mayoría 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 botón de
  sincronización 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 botón de
  sincronización, por lo tanto debe acordarse usted mismo de hacerlo.

  Para obtener más detalles, y para cualquier otra opción de estos
  programas, consulte la correspondiente página del manual. Para el
  programa pilot-xfer, por ejemplo, teclee man pilot-xfer en la línea 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 más ú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 estén en el Pilot a
  un directorio llamado "directorio-backup", creándolo si éste no
  existe.

  Para restaurar datos en el Pilot:

               pilot-xfer /dev/pilot -r directorio-backup

  Normalmente, se tendrá únicamente que hacer esta operación si al Pilot
  se le acaban totalmente las baterías 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 categoría ya existente:

               install-memo /dev/pilot -c categoria nota

  El nombre del archivo se insertará en la nota como su primera línea 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 estándard 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 limitación 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.  Instalación de makedoc

  MakeDoc puede obtenerse de
  http://www.concentric.net/~rbram/makedoc7.cpp.  Compílelo con un
  compilador de C++ e instale el ejecutable resultante bajo el nombre
  "makedoc" en cualquier directorio incluido en su camino de búsqueda.
  Parece ser que hay un pequeño fallo en makedoc (versión 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 versión, pero necesita Java. Consulte la página 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 también opciones para decodificar el fichero .prc resultante y
  para manejar varias opciones de compresión.

  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 versión 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 versión 1.009 Beta 3 cuando es usado conjuntamente
     con la versión 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 versión 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
  incorporación de algunas otras herramientas especiales.

  No hay mucho en lo referente a documentación, pero sería recomendable
  que visitase la página web Pilot Software development en
  http://www.massena.com/darrin/pilot/

  4.1.1.  Instalación de prc-tools

  Obtenga la versión más 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
  versión 0.5.0 de prc-tools. Las versiones posteriores de prc-tools
  podrían necesitar versiones más recientes de las herramientas GNU.

  Ponga todos los archivos en un directorio. Descomprima sólo 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 algún 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 documentación
  para PilRC se encuentra en el archivo pilrc1.5/doc/pilrc.htm incluido
  como parte de la versión 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 distribución 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 conversión 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 distribución pilot-unix.

  6.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  CÓMO Programar el puerto serie en Linux
  por Peter H. Baumann, Peter.Baumann@dlr.de
  traducción de Pedro Pablo Fábrega pfabrega@arrakis.es
  v0.3, 14 Junio 1997

  Este documento describe cómo programar comunicaciones con dispositivos
  sobre puerto serie en una máquina Linux.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Copyright

  1.2.    Versiones futuras de este Documento

  1.3.    Revisión

  2.      Comenzando

  2.1.    Depuración

  2.2.    Configuración del Puerto

  2.3.    Conceptos de entrada para dispositivos serie

  2.3.1.  Proceso de Entrada Canónico

  2.3.2.  Proceso de Entrada No Canónico

  2.3.3.  Entrada Asíncrona

  2.3.4.  Espera de Entradas Origen Múltiple

  3.      Programas Ejemplo

  3.1.    Proceso de Entrada Canónico

  3.2.    Proceso de Entrada NO Canónico

  3.3.    Entrada Asíncrona

  3.4.    Espera de Entradas de Origen Múltiple.

  4.      Otras fuentes de Información

  5.      Contribuciones

  5.1.    Traducción

  6.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Este es el COMO Programar el puerto serie en Linux. Todo sobre cómo
  programar comunicaciones con otros dispositivos/ordenadores sobre una
  línea serie, bajo Linux. Explicaremos diferentes técnicas: E/S
  Canónica (sólo se transmiten/reciben líneas completas), E/S asíncrona,
  y espera para una entrada de origen múltiple.

  Este documento no describe cómo 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 código añadidos aquí se derivaron del
  código de miniterm disponible en la guía 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 algún
  comentario, con gusto lo incorporaré a este documento (ver sección
  ``'').

  Todos los ejemplos fueron comprobados usando un núcleo Linux 2.0.29
  sobre un i386.

  1.1.  Copyright

  El CÓMO 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 físico o electrónico, con la única condición de que mantengan
  esta nota de propiedad intelectual en todas sus copias. La
  redistribución comercial está permitida y fomentada; de todas formas
  al autor le gustaría 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 distribución. Se pueden conceder excepciones a estas
  reglas bajo ciertas condiciones; por favor contacte con el coordinador
  de los HOWTO en la dirección dada abajo.

  Resumiendo, queremos promover la difusión de esta información a través
  de tantos canales com sea posible. No obstante queremos retener la
  propiedad intelectual de los docuentos HOWTO-COMO, y nos gustaría 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 electrónico.

  1.2.  Versiones futuras de este Documento

  Las nuevas versiones de COMO Programar el puerto serie en Linux
  estarán 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.

  CÓMO Programar el puerto serie en Linux también está disponible en
  http://sunsite.unc.edu/LDP/HOWTO/Serial-Programming-HOWTO.html y será
  enviado a comp.os.linux.answers mensualmente.

  1.3.  Revisión

  Por favor, mándeme cualesquiera corrección, pregunta, comentario,
  sugerencia o material adicional. Me gustaría mejorar este HOWTO-COMO.
  Dígame exactamente qué es lo que no entiende, o qué debería estar más
  claro. Me puede encontrar en Peter.Baumann@dlr.de vía email. Por
  favor, incluya el número de versión del CÓMO Programar el puerto serie
  en Linux cuando escriba. Esta es la versión 0.3.

  2.  Comenzando

  2.1.  Depuración

  La mejor forma de depurar su código es configurar otra máquina Linux y
  conectar los dos ordenadores mediante un cable null-módem.

  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 máquina
  Linux. Miniterm se puede compilar con mucha facilidad y transmitirá
  todas las entradas en bruto del teclado por el puerto serie.

  Sólo 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 línea. Para comprobar su
  conexión, inicie miniterm en ambos ordemadores y teclee algo.  Los
  caracteres introducidos en un ordenador deberían 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 líneas TxD
  (transmit) y RxD (receive). Para una descripción del cable vea el
  Serie-COMO.

  También es posible ejecutar estas comprobaciones con un sólo
  ordenador, si tiene un puerto serie no utilizado. Puede ejecutar dos
  miniterm en sendas consolas virtuales. Si libera un puerto serie
  desconectando el ratón, recuerde redirigir /dev/mouse, si existe. Si
  usa una tarjeta multipuerto serie, esté seguro de configurarla
  correctamente. Yo tenía la mía mal configurada, y todo funcionaba bien
  mientras hacía las comprobaciones en un sólo ordenador. Cuando lo
  conecté a otro, el puerto empezó a perder caracteres. La ejecución de
  dos programas en un ordenador nunca es completamente asíncrona.

  2.2.  Configuración del Puerto

  Los dispositivos /dev/ttyS* tienen como misión conectar terminales a
  su linux, y están configurados para este uso al arrancar.  Hay que
  tener esto presente cuando se programen comunicaciones con un
  dispositivo. Por ejemplo, los puertos están configurados para escribir
  en pantalla cada carácter enviado desde el dispositivo, que
  normalmente tiene que ser cambiado para la transmisión de datos.

  Todos los parámetros se pueden configurar fácilmente con un programa.
  La configuración 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 también incluye todas las definiciones de parámetros. Los
  parámetros 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 leídos con read.

  De forma similar c_oflag maneja los procesos de salida.  c_cflag
  contiene la configuración del puerto, como la velocidad en baudios,
  bits por carácter, bits de parada, etc... Los parámetros de modo local
  se guardan en c_lflag. Determinan si el carácter tiene eco, señales
  enviadas al programa, etc...

  Finalmente la tabla c_cc define el carácter de control para el fin de
  fichero, parada, etc... Los valores por defecto de los caracteres de
  control están definidos en <asm/termios.h>. Los parámetros están
  descritos en la página del manual termios(3).

  La estructura termios contiene los elementos c_line.  Estos elementos
  no se mencionan ni las páginas del manual para termios de Linux ni en
  las páginas de manual de Solaris 2.5. ¿Podría alguien arrojar alguna
  luz sobre esto? ¿No debería 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 aplicación a la que lo
  queremos destinar. Siempre que sea posible no haga un bucle para leer
  un sólo carácter 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 Canónico

  Es el modo de proceso normal para terminales, pero puede ser útil
  también para comunicaciones con otros dispositivos. Toda la entrada es
  procesada en unidades de líneas, lo que significa que un read sólo
  devolverá una línea completa de entrada. Una línea está, por defecto,
  finalizada con un NL(ASCII LF), y fin de fichero, o un carácter fin de
  línea. Un CR (el fin de línea por defecto de DOS/Windows) no terminará
  una línea con la configuración por defecto.

  El proceso de entrada canónica puede, también, manejar los caracteres
  borrado, borrado de palabra, reimprimir carácter, traducir CR a NL,
  etc..

  2.3.2.  Proceso de Entrada No Canónico

  El Proceso de Entrada No Canónico manejará un conjunto fijo de
  caracteres por lectura, y permite un carácter temporizador. Este modo
  se debería usar si su aplicación siempre lee un número fijo de
  caracteres, o si el dispositivo conectado envía ráfagas de caracteres.

  2.3.3.  Entrada Asíncrona

  Los dos modos descritos anteriomente se pueden usar en modos síncrono
  y asíncrono. El modo síncrono viene por defecto, donde la sentencia
  read se bloquará hasta que la lectura esté completa. En modo asíncrono
  la sentencia read devolverá inmediatamente y enviará una señal al
  programa llamador cuando esté completa. Esta señal puede ser recibida
  por un manejador de señales.

  2.3.4.  Espera de Entradas Origen Múltiple

  No es un modo diferente de entrada, pero puede ser útil si está
  manejando dispositivos múltiples. En mi aplicación manejaba entradas
  sobre un socket TCP/IP y entradas sobre una conexión serie de otro
  ordenador de forma casi simultánea. El programa ejemplo dado abajo
  esperará una entrada de dos orígenes distintos. Si la entrada de una
  fuente está disponible, entonces será procesada, y el programa
  esperará otra entrada nueva.

  La aproximación presentada abajo parece más 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 ralentizaría 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 máxima de cadena para el proceso de
  entrada canónica.  (<linux/limits.h> o <posix1_lim.h>).

  Vea los comentarios que hay en el código para una explicación del uso
  de los diferentes modos de entrada. Espero que el código sea
  comprensible. El ejemplo de entrada canónica está mejor comentado, el
  resto de los ejemplos están comentados sólo donde difieren del ejemplo
  de entrada canónica para remarcar las diferencias.

  Las descripciones no son completas, por eso le invito a experimentar
  con los ejemplos para obtener mejores soluciones para su aplicación.

  ¡No olvide dar los permisos apropiados a los puertos serie:

       chmod a+rw /dev/ttyS1

  3.1.  Proceso de Entrada Canónico

  #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 Canónico

  En el modo de proceso de entrada no canónico, la entrada no está
  ensamblada en líneas y el procesamiento de la entrada (erase, kill,
  delete, etc.) no ocurre. Dos parámetros controlan el comportamiento de
  este modo:  c_cc[VTIME] fija el temporizador de carácter, y fija el
  número mínimo de caracteres a recibir antes de satisfacer la lectura.

  Si MIN > 0 y TIME = 0, MIN fija el número 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 leído un sólo carácter, o si se excede TIME (t =TIME
  *0.1 s). Si TIME se excede, no se devuelve ningún carácter.

  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 carácter y sólo se hace activo una vez que se ha recibido
  el primer carácter.

  Si MIN = 0 y TIME = 0, la lectura se realizará inmediatamente.
  Devolverá el número de caracteres disponibles en el momento, o el
  número de caracteres solicitados. De acuerdo con Antonino (ver
  contribuciones), podría 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 Asíncrona

  #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 Múltiple.

  Esta sección está al mínimo. Sólo intenta ser un indicación, y por
  tanto el ejemplo de código es pequeño. Esto no sólo funcionará con
  puertos serie, sino que también 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 número de
  descriptor de archivo válido.  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 están
  fijados donde ocurre una entrada, salida o excepción. Todas la
  manipulaciones de fd_set se llevan a cabo mediante las macros
  proporcionadas. Ver también la página 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, sólo 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 Información

  ·  El Linux Serie-COMO describe cómo configurar un puerto serie y
     contiene información sobre hardware.

  ·  Serial Programming Guide for POSIX Compliant Operating Systems, por
     Michael Sweet.

  ·  La página del manual termios(3) describe todos los parámetros de la
     estructura termios.

  5.  Contribuciones

  Como se mencionó en la introducción, no soy un experto en este campo,
  pero he tenido mis propios problemas, y encontré la solución 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.  Traducción

  Este documento ha sido traducido por

  Pedro Pablo Fábrega Martínez, pfabrega@arrakis.es

  Si encontráis mejoras, añadidos o fallos, de cualquier tipo,
  indicádmelo para mejorar el documento.

  Insultos > /dev/null

  6.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  El Registro de la Propiedad Intelectual
  Juan Antonio Martínez, 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
  creación de su inteligencia.
  ______________________________________________________________________

  Índice general


  1. Prólogo

     1.1 Presentación
     1.2 Copyright

  2. Conceptos y definiciones

     2.1 Definiciones
     2.2 Derechos y Deberes
     2.3 Características

  3. Registro de la propiedad intelectual

  4. ¿Quién puede solicitar la inscripción?

  5. Requisitos de las solicitudes

  6. Registro competente

  7. Legislación

  8. Directorio

  9. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Prólogo



  1.1.  Presentación


  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 opinión 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 básico de la GPL:
  la legislación americana y europea son muy explícitas: sólo el autor
  de una obra tiene derecho a especificar los derechos de uso, copia y
  distribución (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 información que la Comunidad de
  Madrid ofrece a través de su Servicio de Información y Documentación
  Juvenil acerca de los derechos, deberes y procedimientos de
  inscripción en el Registro de la Propiedad Intelectual.

  Una última observación: Este documento NO trata explícitamente sobre
  el software: la legislación española contempla los programas de
  ordenador como «obras artísticas, científicas o literarias»


  1.2.  Copyright


  Este documento es Copyright de la Comunidad de Madrid, Consejería de
  Juventud y Cultura. Su contenido es de libre distribución y copia,
  siempre que se cite su procedencia y autoría.

  La adaptación a linuxdoc-sgml ha sido realizada por Juan Antonio
  Martínez Castaño  mailto:jantonio@dit.upm.es

  El documento original puede encontrarse en las páginas Web de
  InforJoven: http://www.comadrid.es/inforjoven


  2.  Conceptos y definiciones



  2.1.  Definiciones


  La propiedad intelectual de una obra literaria, artística o científica
  corresponde al autor por el sólo hecho de crearla. Se considera autor
  a la persona natural que crea alguna obra artística, científica 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 anónima o bajo
  seudónimo o signo, el ejercicio de los derechos de propiedad
  intelectual corresponderá a la persona natural o jurídica que la saque
  a la luz con el consentimiento del autor, mientras éste no revele su
  identidad. La divulgación de una obra es toda expresión de la misma
  que, con el consentimiento del autor, la haga accesible por primera
  vez al público en cualquier forma.

  El objeto de la propiedad intelectual son las creaciones originales
  literarias, artísticas o científicas 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 carácter
  personal y patrimoniales, que atribuyen al autor la plena disposición
  y el derecho exclusivo de los derechos de explotación de su obra en
  cualquier forma y, en especial, los derechos de reproducción,
  distribución, comunicación pública y transformación, que no podrán ser
  realizadas sin su autorización, salvo en los casos previstos en la
  Ley.

  El derecho a la propiedad intelectual tiene unos límites. Las obras ya
  divulgadas podrán reproducirse sin autorización 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 utilización colectiva ni lucrativa.
  ·  Para uso privado de invidentes.

  Es lícita la inclusión en una obra propia de fragmentos de obras
  ajenas de naturaleza escrita, sonora o audiovisual, así como la de
  obras aisladas de carácter plástico, fotográfico, figurativo o
  análogo, siempre que se trate de obras ya divulgadas y su inclusión se
  realice a título de cita o análisis, comentario o juicio crítico. Tal
  utilización sólo podrá realizarse con fines docentes o de
  investigación e indicando la fuente y el nombre del autor de la obra
  utilizada.

  Sólo con el exclusivo fin de informar sobre la actualidad, se podrán
  reproducir, distribuir y comunicar las conferencias, alocuciones,
  informes ante los Tribunales y otras obras del mismo carácter que se
  hayan pronunciado en público.

  Los titulares de los derechos de autor no podrán oponerse a las
  reproducciones de las obras, cuando aquellas se realicen sin finalidad
  lucrativa por los museos, bibliotecas, fonotecas, filmotecas, etc.

  Los derechos de explotación de la obra durarán toda la vida del autor
  y setenta años después de su muerte o declaración de fallecimiento.

  La extinción de los derechos de explotación de las obras determinará
  su paso al dominio público. Las obras de dominio público podrán ser
  utilizadas por cualquiera, siempre que se respete la autoría y la
  integridad de la obra.


  2.3.  Características


  El derecho de la propiedad intelectual tiene las siguientes
  características:


  ·  Los derechos de explotación de la obra se transmiten, «mortis
     causa», por cualquiera de los medios admitidos en derecho.

  ·  También 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 ilícita del
     infractor y exigir la indemnización de los perjuicios materiales y
     morales causados.

  ·  Podrán ser objeto de inscripción en el Registro los derechos de
     propiedad intelectual relativos a las obras y demás producciones
     protegidas por la Ley de Propiedad Intelectual.

  ·  El titular o cesionario en exclusiva de un derecho de explotación
     sobre una obra o producción protegidas por la Ley podrá anteponer a
     su nombre el símbolo, © con precisión del lugar y año de la
     divulgación de aquellas.



  3.  Registro de la propiedad intelectual


  El Registro de la Propiedad Intelectual tiene por objeto la
  inscripción de los derechos relativos a las obras, actuaciones o
  producciones originales, literarias, artísticas o científicas
  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 Autónomas), el
  Registro Central (dependiente del Ministerio de Educación y Cultura) y
  la Comisión de Coordinación (integrada por un representante de cada
  Comunidad Autónoma, un representante del Ministerio de Educación y
  Cultura y el titular del Ministerio Central).


  4.  ¿Quién puede solicitar la inscripción?


  Están legitimados para solicitar las inscripciones:


  ·  Los autores y demás titulares originarios de derechos de propiedad
     intelectual con respecto a la propia obra, actuación o producción.

  ·  Los sucesivos titulares de derechos de propiedad intelectual.


  5.  Requisitos de las solicitudes


  Todas las solicitudes de inscripción 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,
  deberán contener además:


  ·  Cuando se refieran a obras artísticas, científicas y literarias:

  ·  Título de la obra (descripción de la obra que permita su completa
     utilización).

  ·  Declaración de si la obra ha sido o no divulgada. En caso
     afirmativo, la fecha y lugar de la divulgación.

  ·  Cuando se refieran a derechos de la propiedad intelectual de los
     artistas-intérpretes o ejecutantes:

  ·  Descripción detallada por escrito, en un máximo de 25 folios, de la
     interpretación, actuación o ejecución.

  ·  Lugar y fecha de la interpretación, actuación o ejecución.

  ·  Título y autor de la obra interpretada.

  ·  Cuando se refieran a derechos de la propiedad intelectual de los
     productores de fonogramas:

  ·  Número de depósito legal.

  ·  Título y autor de la obra fijada en el fonograma.

  ·  Tipo de fonograma y sistema de grabación.

  ·  Lugar y fecha de publicación del fonograma.

  ·  Cuando se refieran a derechos de propiedad intelectual en los
     supuestos de producción de grabaciones audiovisuales:

  ·  Un máximo de 25 secuencias, que permitan una identificación de la
     grabación, y un resumen que no exceda de 25 páginas.

  ·  Lugar y fecha de la divulgación, en su caso.

  ·  Cuando se refieran a derechos de propiedad intelectual en los
     supuestos de meras fotografías:

  ·  El solicitante deberá presentar 2 copias en positivo de 18 por 24 o
     bien de 24 por 24.

  ·  Lugar y fecha de la divulgación, en su caso.


  6.  Registro competente


  Para la primera inscripción de los derechos de propiedad intelectual
  que los autores y demás titulares insten, será competente el Registro
  Territorial correspondiente al domicilio del autor o titular
  solicitante.


  7.  Legislación



  ·  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 Código Civil.


  8.  Directorio



  ·  Registro General de la Propiedad Intelectual.

  ·  Asesorías Jurídicas de la Red de Centros de Información Juvenil de
     la Comunidad de Madrid.

  ·  Centro Regional de Información y Documentación Juvenil


  9.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.


  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Juan Antonio Martínez, 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.      Introducción.

  2.      Requisitos.

  2.1.    Software.

  2.2.    Hardware:

  2.2.1.  Configuración de la tarjeta de video

  2.2.2.  Configuración de tarjetas aceleradoras

  2.2.3.  Configuración del ratón

  2.2.4.  Configuración de la tarjeta de sonido.

  3.      Quake :

  3.1.    Principales problemas:

  3.2.    Juego en Red (Quake World).

  3.3.    Añadidos al quake.

  4.      Quake II

  4.1.    Juego en Red

  4.2.    Principales Problemas

  4.3.    Principales modificaciones.

  5.      Cómo montar un server dedicado.

  5.1.    Quake

  5.2.    QuakeWorld.

  5.3.    Quake 2

  6.      Problemas con las tarjetas aceleradoras.

  7.      Servidores españoles de quake.

  8.      Agradecimientos:

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción.

  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 portarán sus juegos a linux, algún día se comerán sus
  palabras ... :) ).  El quake en linux funciona perfectamente, incluso
  más rápido que en windows, además 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 generación), ya que no todas tienen drivers para linux (pero
  cada vez son más 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 página 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 cuestión de probar ;) ).

  2.2.1.  Configuración de la tarjeta de video.

  Se puede jugar al quake desde las X o desde la SVGA, recomiendo la
  SVGA porque es mas rápida, pero si es un servidor con varios usuarios
  recomiendo la versión de las X (principalmente porque para correr la
  versíon 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 más le guste ...

  Si vas a jugar en las X tendrá que tenerlas configuradas (cualquier
  duda sobre cómo hacerlo mirela en el XFree86-Como)

  Para la SVGA normalmente no hay que tocar nada, el archivo de
  configuración 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 parámetros de su tarjeta (tipo de
  chipset, RamDac, etc) y del monitor (mírelas en los manuales del
  ordenador).

  2.2.2.  Configuración de tarjetas aceleradoras.

  Lo primero que necesitaremos es una tarjeta aceleradora; hasta la
  fecha solo están 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 librerías 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 página se puede obtener tambien información sobre
     las tarjetas soportadas. Necesitaremos como mínimo dos archivos:

     1. Glide2x_SDK-2.1 es el kit de desarrollo de la librería glide.

     2. Glide son las librerías 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 versión free de las librerías OpenGL, se pueden obtener
     de http://www.ssec.wisc.edu/~brianp/Mesa.html. La última versión
     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 librerías propiamente dichas.

     2. MesaDemos demos de la librería.

     Existen binarios de las librerías 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]-[versión].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 librerías están 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 simbólico ya
  que las librerías Mesa buscarán la librería 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 librerías 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 librerías, 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
     librerías ya estarán compiladas, ahora lo único que queda es insta­
     larlas. Si ya las teníamos instaladas antes lo único que tenemos
     que hacer es copiar la librería 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 tenía yo instaladas, si ya
  las teníamos en /usr/local/lib las copiaremos ahí.  Si no las teníamos
  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, aún nos faltan los
  ejecutables para el quake, el quakeworld y el quake2).

  2.2.3.  Configuración del ratón.

  Para que funcione el ratón tenemos que editar otra vez el fichero de
  configuración de la vga (ver ``Configuración de la tarjeta de video'')
  y poner el tipo de ratón que tenemos. Es necesario tener el gpm
  funcionando, que es el que se encarga de controlar el ratón en la
  consola. Si usa el gpm con el parámetro -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 ratón mediante los parámetros -mdev [device] y la velocidad con
  -mrate [speed]. Los parámetros por defecto son /dev/mouse para el
  -mdev y 1200 para el -mrate.

  Lo errores con el ratón normalmente se deben a fallos en la
  configuración del gpm o porque no se ha especificado el tipo de ratón
  en el libvga.config. Además es muy común que cuando se está jugando al
  quake y se cambia a otra consola el ratón 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 ratón de tres botones es
  recomendable consultar el Raton_3_botones-Como.

  2.2.4.  Configuración 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 parámetro
  -nosound. Además de este hay otros parametrós 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 solución pasa por instalarse el gcc-2.7.2.3 y recompilar
  el sndconfig con él (además los kernels de esa versión 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
  partición (por ejemplo en windows) no hace falta copiarlos a la
  partición linux, podemos usar enlaces simbólicos, 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 simbólicos, y suponiendo que tenemos la partición 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 más ... 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 resolución de la pantalla se usan dos comandos, nos
  ponemos en la consola del quake y ponemos vid_describemodes que nos da
  una descripción de todos los modos de video posible (cada uno con un
  número).

  Ahí luego ponemos vid_mode N siendo N el número que corresponde a la
  resolución que queremos. Esto no funciona con las tarjetas
  aceleradoras, para cambiar la resolución en ellas hay que
  especificarlo en el arranque mediate los parámetros -width ANCHO
  -height ALTO, sino arrancará por defecto en 640x480 (otra resolución
  muy utilizada es 512x384).

  Si queremos medir los fps a una resolución podemos hacerlo con
  timedemo demo1 desde consola, que intenta ejecutar lo más rápido
  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. Solución: arrancamos con ./squake -nosound.

  ·  No tenemos puesto el HOSTNAME. Solución: editamos el fichero
     /etc/hosts y añadimos el nombre de nuestra máquina, 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 máquina
  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. Solución 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
  adicción 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 visión del juego y la manera de jugar, los
  movimientos se aceleran en un 200%. Para jugar en red lo único que
  necesita es una conexión a internet o a una LAN.

  En la página de quake en linux ( ver ``Software.'') se puede encontrar
  un ejecutable que se llama qwcl. Esto es el cliente de QuakeWorld, que
  no es más que una mejora de la engine de red del quake (solo sirve
  para jugar en red) con algunos añadidos, 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 magnífico 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 españoles de quake'').

  Lo mejor es tener la última versión del qw (actualmente la 2.30) y la
  anterior ya que algunos server no se han actualizado aún.

  Si se tiene una tarjeta aceleradora necesitará el glqwcl. Para
  indicarle la resolución de pantalla se hace como en el glquake
  mediante los parámetros -width ANCHO -height ALTO.

  El parámetro rate XXXX controla el numero de bps que recibimos del
  servidor además del número de fps. Para un modem de 33.6 el parámetro
  óptimo es de 3000, para un 28.8 de 2500.

  3.3.  Añadidos 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
  añadir variaciones fácilmente.

  Puede añadirle nuevas armas, nuevos montruos, nuevos niveles, incluso
  nuevos "juegos". El más 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 misión de cada equipo es capturar
  la bandera del otro y llevarla a su base, siempre y cuando no lo
  capturen la suya. La mayoría 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 variación 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 más 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 variación muy interesante es el Team Fortress que se puede
  encontrar en www.planetfortress.com/teamfortress>. Es básicamente 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 más se juega en equipo.

  El Rocket Arena es otra variación 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 más 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
     simbólico con

       ln -s /mnt/cdrom/Install/Data/baseq2/pak0.pak /usr/local/games/quake2/baseq2

  Atención que el ficherito sólo 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 librerías 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 mínimo) e
  instalar las librerias glide si va a usar una 3dfx (ver
  ``Configuración 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 añadimos las direcciones de servers que
  queramos , luego le damos a update server list y nos saldrán los
  servers con la información 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 conexión y las opciones de descarga que se usan para
  bajarse skins, mapas, sonidos y demás cosas de los servidores).

  La mayoria de los servers usan lo mapas de deathmatch (q2dm*). En el
  quake venían en el cd, pero en el quake2 salieron después con lo que
  si queremos jugar en internet estamos obligados a bajárnoslos.

  Los mapas vienen en la versión 3.13, ocupan unos 10 megas, ver
  ``Software.'', que además 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 versión 3.20 que es
  la que usan los servidores (esta es la última versión que ha salido
  hasta la fecha, es recomendable tener siempre la última versión 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 solución
     ...  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 después de iniciar
     el sonido y el vídeo 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, sólo 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
  más extendida es el Lithium II, que añade 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 ``Añadidos al
  quake.'') pero consumen muchos recursos (aún así se pueden usar).

  Otra modificación que está sustituyendo al ctf2 es el lmctf que es una
  variación de este con mapas más 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
  página que el Rocket Arena para quake (ver ``Añadidos al quake.''.

  5.  Cómo montar un server dedicado.

  Si tiene una conexión 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 modificación 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 límite 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 demás 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 página 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 parámetros de las 3dfx.  Los problemas más
  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 inserción de un módulo 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 están 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 están 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 debería tener problemas porque el
     propio paquete del Glide_V2 trae además de las versiones de las
     librerías 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 versión para
     libc5, extraer las librerías (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
     versión para glibc) e instalarlas (en /usr/i486-linux-libc5/lib).
     Además 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 versión de
       RedHat 5.X o del directorio /libc6 en caso de que lo esté cogiendo del contrib
       de RedHat, sino le sobreescribirá las antiguas librerías y no funcionará el
       sistema!

  Otra posible causa de error es que falte alguna librería en la ruta de
  búsqueda del ejecutable, esto se puede comprobar mediante el comando
  ldd fichero. Si por ejemplo al hacer ldd glquake le sale alguna
  librería seguida de la linea Not Found ahí estará el problema, ase­
  gurese de que tiene esa librería instalada y que el directorio en el
  que está dicha librería aparece en el fichero /etc/ld.so.conf, si no
  lo está añada el directorio y ejecute luego como root ldconfig.

  ·  Cuando ejecuto el glquake me da el error glquake: can't resolve
     symbol tenía (vienen con el ejecutable del quake2) consulte la
     dirección 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 opción es bajarse el programa GlideControl mencionado anterior­
  mente con el que puede cambiar la gamma de la tarjeta además de otros
  parámetros.

  ·  Al jugar en linux obtengo menos fps que en windows: Bueno, las Mesa
     no están todavía lo suficientemente optimizadas, y en procesadores
     lentos no dan un buen rendimiento. Una opción es probar el port de
     opengl que han incluido los autores del quake como opción a las
     librerías 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 opción es asegurarse de que la libMesaGL.so.2 es un
  enlace a la libMesaGL.so.3. La versión 3 está bastante más optimizada
  que la 2.6 y el rendimiento aumenta bastante, el problema es que el
  glquake necesita la versión 2.6. Una solución chapucera es hacer lo
  siguiente; lo primero vemos donde están las librerías 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
  añada en el path de búsqueda 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
       # Añadimos el directorio del quake2 a la ruta de búsqueda
       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 opción para hacer lo mismo pero sin necesidad de ser root
  es eliminar la libMesaGL.so.2 de la ruta de búsqueda 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 añadir 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 tendríamos 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 ratón: Las 3dfx y el gpm no se llevan bien , en
     el README viene bastante claro que para que funcione el ratón con
     las tarjetas aceleradoras hay que matár 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 más recomendable.

  7.  Servidores españoles de quake.

  He aquí una lista de algunos servidores de quake en España.

  ·  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 enseñado las
  maravillas del quake (pukka, wait_man, Al y alguno que me dejo ...),
  además de a todos los que contribuyen a la expansión del linux.

  A Graffic por el 3Dfx-COMOR del que he sacado casi toda la información
  sobre las 3dfx.

  A Satch Sky-Man y Devan por las correcciones y añadidos.

  A Id Software por hacer el quake, y lo más importante, por portarlo a
  Linux.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  RDSI COMO
  Antonio Verdejo García, averdejog.galileo@nexo.es
  pacopepe@insflug.org
  v0.2, 5 de Julio de 1998.

  Este COMO explica cómo configurar tarjetas pasivas RDSI para conex­
  iones de red PPP con Linux (a Internet, servidores...). Describe los
  pasos para dar soporte tanto físico como lógico, así como el método de
  conexión, con 1 y 2 canales, y con llamada bajo demanda.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Hardware Soportado - Recomendado

  2.1.    Modelos de tarjetas pasivas

  2.2.    Soy muy precavido, y estoy leyendo esto antes de comprar la
  tarjeta. ¿Cuál recomendáis?

  3.      Integración física

  4.      Configuración BIOS

  5.      Configuración de recursos usados por el dispositivo.

  5.1.    Dispositivos Plug & Play

  5.2.    Configuración de dispositivos NO PnP

  6.      Instalación y configuración de controladores

  6.1.    Soporte específico a la tarjeta

  6.2.    Configuración del Kernel

  6.2.1.  Soporte genérico en el kernel

  6.2.2.  Soporte específico a la tarjeta

  6.3.    Carga de los módulos - comprobación del sistema

  7.      Instalación y configuración de software de aplicación

  7.1.    Pero bueno, ¡¿qué cómo conectooo?!

  7.2.    Scripts

  7.2.1.  rc.isdn  para un solo canal

  7.2.2.  rc.isdn  para dos canales

  7.2.3.  Explicación de los scripts

  7.2.4.  ip-up

  7.2.5.  ip-down

  8.      Problemas Frecuentes

  8.1.    Al lanzar la conexión miro el /var/log/messages  y sólo veo
  (una vez tras otra):

  8.2.    La conexión 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.     Colofón

  11.1.   ¿Y no tenéis nada que agradecer a nadie?

  11.1.1. De Antonio Verdejo

  11.1.2. De Francisco J. Montilla

  12.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  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 lógicos para hacer uso de cualquier periférico,
  son los siguientes, del orden más físico al más lógico:

  1. Comprobar que la marca y modelo del dispositivo están soportados.

  2. Integrar el dispositivo físicamente (pinchar la tarjeta o
     conectarla, y demás conexiones accesorias).

  3. Comprobar su integración 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 parámetros.

  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
  integración 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 opción 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 auténticas virguerías, con una perfecta integración,
     a diferencia de los módems RDSI.

  2.1.  Modelos de tarjetas pasivas

  La gran mayoría de los modelos que se listan a continuación son
  tarjetas internas pasivas. El número de tarjetas soportadas crece casi
  con la misma velocidad que se suceden versiones del núcleo. Tenga en
  cuenta que si posee un adaptador externo (Zyxel o USR) el método que
  se empleará será el primero descrito en este documento (usando los
  scripts levemente modificados que se usan en una conexión con un módem
  analógico).

  Por fortuna, este tipo de dispositivos suelen ser poco comunes (por su
  alto precio y nula diferencia en rendimiento en comparación con una
  tarjeta interna, además 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 configuración que presentan se
  reducen al mínimo, y pasan por ajustar (en determinados casos) la
  cadena de inicialización del guión de chat.

  Nos centraremos pues, casi en exclusiva, en las tarjetas internas.

  La lista está sacada de los ficheros README.* que acompañan a la parte
  del arbol de fuentes correspondientes al soporte RDSI que modifica un
  fichero .tar.gz del que hablaremos más 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 (código I-IN100-ST-D)

  ·  Dynalink IS64PH (versión 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 español. La mayoría
  de las tarjetas son de origen alemán. La PCBIT es un "honrosa"
  excepción: está fabricada en Portugal.

  De las tarjetas distribuidas por Telefónica 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 circuitería 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 documentación que incluye el
  código fuente del núcleo (máxime si se aventura a usar un kernel de la
  serie 2.1) bajo Documentation/isdn para obtener una lista lo más
  actualizada posible.

  2.2.  tarjeta. ¿Cuál recomendáis?  Soy muy precavido, y estoy leyendo
  esto antes de comprar la

  Como decíamos en la sección ``'', ante todo, tarjetas pasivas internas
  (que estén soportadas, claro está) frente a adaptadores RDSI externos.

  En general, las tarjetas pasivas con circuitería Siemens, y
  especialmente las que integran el juego de chipsets HSCX e ISAC, dado
  que el driver HiSax es el más desarrollado y el que más empuje tiene.

  Teniendo como criterios lo anterior, el rendimiento, la calidad, y la
  colaboración 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; además de la actitud positiva
  de Creatix respecto Linux, a diferencia de Teles.

  ¡Apoye a los fabricantes que apuestan por Linux!

  3.  Integración física

  Aparte de las precauciones con la estática, (agárrese antes a algún
  objeto con bastante masa y conexión a tierra, como una tubería 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.

  Asegúrese de que la tarjeta queda firmemente asentada, más de un
  problema inexplicable se ha debido muchas veces a esto.

  En algunas placas base, especialmente las de 486, no da completamente
  igual dónde se pincha la tarjeta. Familiarícese 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, idéntico a los usados para
  redes.  Normalmente la tarjeta traerá un cable, pero si no es así, o
  lo necesita más largo, con un cable de red UTP corriente valdrá.
  Teóricamente, y en configuraciones del bus pasivo (instalación
  telefónica propiamente dicha) típicas, el cable puede ser de unos
  centenares de metros, si bien no hemos comprobado nunca de forma
  práctica este particular.

  Una última advertencia, para aquellos que están 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
  mayoría 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
  producción exige.

  4.  Configuración BIOS

  La mayoría de las tarjetas de hoy en día son Plug & Play, y esto,
  aunque parezca mentira, en BIOS con PnP es a veces una ventaja; la
  mayoría 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 algún 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.  Configuración 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 "estándar", 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 estándar). La mayoría de los servidores ftp que albergan
  contenidos Linux las tienen, así como las distribuciones Linux más
  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 inicialización se
  encargarán de todo automáticamente. En cualquier caso, y si viera que
  isapnp no se ejecuta al arrancar el Linux, siempre le queda la
  solución 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 sólo 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 línea donde se lee # (ACT Y) para
  activar la incialización de la tarjeta con los valores escogidos...

  Es conveniente anotar dichos valores, ya que los que tendremos que
  utilizar posteriormente (anótelos).

  Y ni que decir tiene que no debemos asignarle recursos que ya estén
  siendo usados por otros dispositivos. Familiarícese 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 aparecerán en los listados y
  no podremos saber qué recursos están usando.

  Refiérase a la sección ``''.

  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.  Configuración de dispositivos NO PnP

  Se supone que ha leído, entendido, y llevado a cabo con la absoluta
  certeza de haberlo hecho bien, la sección ``''.

  No conocemos todos los dispositivos NO PnP disponibles en el mercado
  que funcionan con Linux. Pero la experiencia muestra que generalmente,
  para su configuración 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 contadísimas ocasiones)

  Normalmente, la más cómoda y fiable es la de los jumpers, ya que no
  deberemos preocuparnos de si los reset borran la configuración o no,
  aunque en algunas tarjetas (Teles.SO 16.3 NO PnP por ejemplo) sólo
  posibilitan la asignación de IOs. (Ojo, con esta tarjeta, son unos
  microrruptores muy pequeños, 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 cajón, y configurar.
  Si es windows, y se tiene instalado también, tal vez tras unas
  encomiendas a San Pancracio, si Murphy está distraído, 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 acompaña, es comprobar (la mayor parte
  de las veces mediante ensayo-error, y no siempre con absoluta certeza,
  aunque un vistazo a la documentación de la tarjeta ayuda bastante)
  qué parámetros por defecto tiene el dispositivo de fábrica, y usarlos,
  siempre que no entren en conflicto con otros que ya tengamos
  instalados; si es así, dependiendo de dichos dispositivos puede ser
  hasta más cómodo reconfigurarlos y dejar hueco al nuevo inquilino.

  Recuerde (incluso anote, insistimos) qué parámetros va a usar. Los
  necesitará más adelante.

  6.  Instalación y configuración de controladores

  Los controladores son el software que hace funcionar al dispositivo, y
  que da soporte lógico al Sistema Operativo para interactuar con él. En
  Linux la integración de este soporte se lleva a cabo configurando y
  compilando el núcleo o kernel, con lo que obtenemos un corazón del
  Sistema Operativo a la medida de cada máquina.

  Linux ofrece la posibilidad de compilarlo íntegro en el kernel o en
  módulos aparte, que se cargan según 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 genérico, (módulo
  isdn) y otro específico a la tarjeta (hisax, etc).

  Como algunas tarjetas RDSI, especialmente las que tienen soporte
  experimental, sólo funcionan con controladores específicos modulares,
  nos centraremos en este tipo de soporte, por ser más 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 sólo téngalo en cuenta en los
  ejemplos que aplique y modifíquelos en consecuencia, sin olvidar que
  estos kernels son para lo que son, desarrollo, no siendo muy idóneos
  para la instalación por primera vez de algo que se desconoce.

  6.1.  Soporte específico a la tarjeta

  Antes de continuar, suponemos que ha leído la sección ``'' 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 documentación que hay en
  /usr/src/linux/Documentation/isdn que siempre estará más 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 distribución estándar del kernel
  actual (2.0.34 a día de hoy), salte a la sección ``''. Si necesita
  parchear, siga leyendo.

  Para añadir soporte al kernel actual, integraremos una parte del árbol
  de fuentes modificada, que añada soporte para la misma. Obtenga el
  fichero ftp://ftp.suse.com/pub/isdn4linux/v2.0/isdn.tar.gz, suele ser
  un enlace simbólico a la última versión del árbol de desarrollo RDSI
  disponible.

  No obstante... el soporte es experimental. Casos típicos 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 producción que están
  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.
  Asegúrese 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 mayoría
  de los sistemas el directorio actual no está en el PATH por seguridad.

  Compruebe que no se producen mensajes de error. Si es así, averigüe
  qué sucede. Lo más típico es que se haya equivocado en la elección de
  fichero, y haya escogido uno para un kernel de otra versión (2.1.xx
  por ejemplo).

  6.2.  Configuración del Kernel

  Una vez hemos llevado a cabo los pasos anteriores procederemos a la
  configuración y posterior recompilación del kernel. Si no está
  habituado a esto, léase primero el Kernel-Como, disponible en Insflug,
  vea sección ``INSFLUG''.

  Acceda a /usr/src/linux y ejecute su método preferido de
  configuración. Asegúrese de activar, en la sección principal, Code
  maturity level options el apartado Prompt for development and/or
  incomplete code/drivers, o de lo contrario, el programa de
  configuración no le dará opción a seleccionar controladores
  experimentales.

  Una vez hecho esto, seleccione:

  6.2.1.  Soporte genérico en el kernel

  Vaya a la sección ISDN subsystem del menú principal:

  ·  ISDN support como módulo (M).

  ·  Support synchronous PPP

  ·  Support generic MP (RFC 1717) (potestativo, necesario para canales
     múltiples)

  ·  Support audio via ISDN (potestativo)

  Esto es para cuanto a soporte RDSI se refiere. En cuanto a soporte
  PPP, cuestiones específicas de redes, y demás aspectos, recurra al
  Como apropiado.

  6.2.2.  Soporte específico a la tarjeta

  En la sección ISDN subsystem del menú principal, active el controlador
  que dé soporte a su tarjeta. El más popular es el HiSax, si ese es su
  caso, deberá además especificar:

  ·  Protocolo a soportar: en nuestro caso, HiSax Support for EURO/DSS1
     y
  ·  Cuál 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) seleccionaría 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 opción; recurra a su sentido común, a la
  documentación (a la que no nos cansaremos de remitirle; este documento
  no es más que una guía) 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 más información de cómo recompilar el kernel, véase el Kernel-
  Como, disponible en el Insflug, vea sección ``INSFLUG''.

  6.3.  Carga de los módulos - comprobación del sistema

  Ya he recompilado, instalado los módulos, y arrancado con el nuevo
  kernel.  Además, he usado isapnp y todo parece haber ido bien...  ¿Qué
  hago ahora?

  Se ha ganado un descanso. Tómese algo... ;-) No, en serio. Ahora viene
  la parte más interesante.

  Hay varias formas de cargar los módulos, en cualquier caso, la manera
  que nunca falla es hacerlo a mano directamente desde la línea de
  comandos.  Supondremos que hacemos uso del soporte específico HiSax.
  La sintaxis del módulo 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 parámetros 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 deberíamos 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 España para las conexiones RDSI, EURO ISDN
  o EDSS1. Los otros dos valores (dirección de E/S e interrupción)
  dependerán de su configuración particular, que anotó en su momento,
  ¿verdad?

  Dependiendo del driver, este puede que se cargue aun con parámetros
  erróneos, 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 línea correspondiente a la irq
  usada por el controlador contase con 0 interrupciones de contador
  (segunda columna). Esto aplica para todos los dispositivos; si la
  línea

       10:    1591809   ICN

  fuese

       10:    0         ICN

  sería un claro síntoma de que el driver ICN no está usando dicha
  interrupción, casi seguro por fallo de configuración. Tan sólo por
  cargar correctamente,  debe de poner el contador a 1 al menos.

  Llegados a este punto, respire profundamente y siéntase 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 líneas, (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
  módulos; de ahora en adelante un modprobe hisax bastará.

  7.  Instalación y configuración de software de aplicación

  Mi tarjeta parece que ya está lista. ¿Puedo usar los scripts de
  conexión a Infovía que usaba hasta ahora?

  No tal cual;  necesitará hacer ciertas modificaciones. Usaremos otro
  método para conectarnos a iNET. En vez de usar el pppd asíncrono de
  toda la vida, usaremos un pppd especial, síncrono, que permite algunas
  lindezas: el ipppd.

  Arranque su cliente ftp favorito, y diríjase a
  ftp://ftp.franken.de/pub/isdn4linux/v2.0/isdn4linux*.tar.gz que es el
  sitio oficial del ISDN4Linux. Ahí tiene una mágnifica (aunque algo
  falta de actualización) FAQ en un perfecto inglés que debería tener al
  menos como punto de referencia.

  Le remitiríamos 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 más nos interesan, son isdnctrl (directorio isdn) y
  el ipppd (directorio ppp4i4k/ipppd/version) porque son las que
  usaremos en el método que describiremos después.

  Normalmente, casi todas las distribuciones suelen llevar un paquete de
  utilidades RDSI que incluyen los programas que mencionamos, amén de
  abundante documentación y scripts de ejemplo. Busque en su
  distribución favorita.

  No obstante, si por alguna razón no consigue compilar los elementos
  necesarios, en ftp://ftp.insflug.org/pub/RDSI/ tiene a su disposición
  el software mínimo necesario ya compilado.

  Como en todo sistema UN*X la comunicación con los dispositivos físicos
  (tarjetas, discos...) se realiza por medio de ficheros. Necesitaremos
  crear los dispositivos que harán que el kernel pueda trabajar con la
  tarjeta RDSI. Si usa un paquete de una distribución es casi seguro que
  creará, si no lo están ya, las entradas necesarias en el directorio
  /dev, si no es así, ejecute make devices en el directorio raíz de las
  isdn4utils que bajó antes, será sufiente.

  7.1.  Pero bueno, ¡¿qué cómo conectooo?!

  Vamos con ello. Dos métodos, uno de ellos mencionado someramente. Se
  basa en aprovechar los scripts de conexión (que suponemos le
  funcionan) usados con un módem analógico normal. Las variaciones son
  mínimas. Añada en el guión 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 usábamos antes con
  el módem. Nada más que decir de este método, salvo que no haga uso del
  parámetro +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).

  Opción ésta muy interesante en redes donde se vaya a usar la conexión
  RDSI para dar servicio iNET, por medio del enmascaramiento IP, a
  varios puestos de una red local, pues posibilitará el que la llamada
  se efectúe automáticamente por tráfico de paquetes (abrir un
  navegador, lanzar el programa de correo, hacer un ping, etc.).

  La parte más importante de este método reside en los scripts usados
  para configurar la conexión. Los hay de múltiples formas, más 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 más tarde.

  Unos puntos a destacar. Si queremos usar DoD, necesitaremos tener dos
  scripts en /etc/ppp también incluidos, para asegurarnos que la ruta
  por defecto apunte siempre a una dirección 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 tuviéramos en nuestro
  sistema: el demonio de PPP (pppd o ipppd) no reemplaza la ruta por
  defecto, es un problema muy común en los grupos de noticias y en los
  canales de Linux de IRC.

  El síntoma es que la conexión se establece, pero no podemos salir a
  iNET porque no tenemos señalizado por dónde hacerlo. No es el
  propósito de este documento extenderse demasiado en temas de rutado,
  pero en condiciones normales, no necesitaremos ruta por defecto,
  podemos usar rutas estáticas;  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 (¿aún 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 sería 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 líneas 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 línea sin retorno de carro.

  Asegúrese de que ipppd está en /sbin si transcribe tal cual este
  script; si no es así, modifique el path en el script.

  Vea la sección ``'' para una explicación acerca de qué parámetros ha
  de modificar y una explicación 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.  Explicación 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 número
  de su RDSI) y en REMOTE_NUMBER (055 si usa Infovía).

  La dirección de LOCAL_IP es una dirección falsa, la negociación IPCP
  la sobreescribe, pero por una simple razón de coherencia, conviene
  darle una IP válida del rango de su proveedor, y asignarle a ella la
  ruta por defecto, (lo mismo se aplica para la dirección 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 también 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 sección ``'' está preparado para el uso de dos
  canales y por lo tanto una conexión a 128 Kbps, usando uno de los
  canales como esclavo del primero. La opción +mp es necesaria en este
  caso, además de que haya seleccionado en la compilación del kernel, en
  la sección general de RDSI, Support Generic MP (RFC 1717). (Compruebe
  que exista la línea CONFIG_ISDN_MPP=y en el fichero
  /usr/src/linux/.config, que es donde se almacena por defecto la
  configuración del núcleo).

  Tenga en cuenta que, como es lógico, pagará el doble... Aunque esto en
  empresas no suele ser un problema, cuidado en casa, o verá como las
  facturas de Telefónica tienden a infinito... ;-)

  Para lanzar manualmente el segundo canal, ejecute isdnctrl addslave
  ippp128;  colgará automáticamente tras un periodo sin tráfico,
  tardando lo que hayamos especificado en el parámetro huptimeout del
  rc.isdn (en segundos).

  Con determinados proveedores no se nota demasiado el lanzar el segundo
  canal (Arrakis), con otros sin embargo, y también dependiendo del
  origen de nuestro tráfico, si se nota, y bastante...

  Hay un demonio que se encarga de disparar/colgar el segundo canal
  según el tráfico y la saturación que detecte; puede obtenerse de
  http://www.compound.se.

  En futuras versiones, tendrá sección 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 conexión miro el /var/log/mes­
  sages  y sólo 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 más, ¿a qué puede ser debido?

  Es un problema físico. Revise la conexión del cable tanto en la
  tarjeta como en el TR1. Revise la continuidad del cable así mismo.
  Cámbielo en último término. Asegúrese de que su TR1 tiene servicio...
  ;-) y Asegúrese de no estar pasando por ninguna centralita.

  8.2.  La conexión 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 común debido a que Infovía (en el supuesto de
  que la use para conectar) no nos asigna, ---o no lo hace con
  suficiente rapidez--- una dirección remota del enlace PPP.  Hay un
  solución que funciona tanto en conexiones RDSI como RTC que consiste
  en pasarle nosotros una dirección en el establecimiento de la
  conexión. En el caso de conexiones vía RTC (módem corriente y
  moliente)  incluya una línea en el /etc/ppp/options tal que:

       :172.16.1.96

  y deje el parámetro 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 Infovía de su rango
  (172.16.x.x por ejemplo).

  Gracias a Horacio J. Peña por este detalle (el primero al que se lo
  leimos en la lista del SLUG).

  El caso de conexiones vía RDSI (sobre todo en el caso de que usemos el
  primer método) se puede proceder de la misma forma, pues aunque se le
  pasen parámetros 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

  Según Frank Meyer, del grupo de desarrollo isdn4linux, se debe a que
  al lanzar el ipppd, este calcula un número aleatorio basándose en la
  función gethostid() que provoca una resolución DNS, usando para ello
  el servidor de nombres que aparezca en /etc/resolv.conf.

  Si no tenemos la conexión activa, esto lógicamente 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 comúnmente).

  Para solucionarlo, incluya el nombre de su máquina (incluido
  localhost)  en el /etc/hosts con el dominio completo que haya
  especificado en /etc/resolv.conf. Hay otra solución basada en un
  parche no oficial para evitar este comportamiento por parte del ipppd;
  el fichero syncPPP FAQ incluído en el directorio de documentación de
  las utilidades ISDN amplía este tema.

  9.  Por Hacer

  ·  Por supuesto, integrar los comentarios y sugerencias que nos manden
     amablemente en este documento. Realimentación, graciaaas.

  ·  Estudiar el ibod para la gestión dinámica de conexiones a 128K por
     demanda de tráfico.

  ·  ToDo lo que se nos vaya ocurriendo... ;-)

  10.  Copyright y Propiedad Intelectual

  El RDSI-Como es Copyright © 1998 Antonio Verdejo García & Francisco
  José Montilla Blanco.

  Este trabajo puede ser reproducido en su totalidad o en parte, tanto
  de forma impresa como electrónica, sujeto a las siguientes
  condiciones:

  1. La notificación del copyright y esta licencia debe preservarse
     completa en todas las copias, tanto completas como parciales.

  2. Cualquier traducción o trabajo derivado debe de ser aprobado por
     los autores por escrito antes de su distribución.

  3. Si se distribuye el Trabajo parcialmente, deben de incluirse
     instrucciones de dónde obtener la versión completa original (en
     forma impresa o electrónica), así como los medios para conseguirla.

  4. Pueden ser reproducidas pequeñas porciones como ilustraciones para
     revistas o citas para otros trabajos sin esta notificación de
     permiso si se cita apropiadamente su procedencia.

  11.  Colofón

  Y bueno, por ahora esto es todo. Como una primera versión que es,
  estará plagada de pequeños (igual otros no tan pequeños) fallos,
  incorrecciones y seguro que nos dejamos un montón de temas en el
  tintero.

  Eso sí, como hemos mencionado varias veces, nuestro buzón 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 tenéis nada que agradecer a nadie?

  Ufff... Al contrario. No acabaríamos nunca. Pero vamos a intentarlo;
  además, es la parte más 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 mía ;-), pero intentaré ser breve.

  Para empezar, a Francisco José Montilla, mi apañero, 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 día 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 Jesús Fuentes Saavedra, por sus consejos. A Enrique Melero por
  idéntica razón. A Iñaki Arenaza por estar trabajando también 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 peña del canal linux del IRC Hispano (la lista no
  tendría fin, prometo -prometemos- citaros a todos en una próxima
  revisión de este documento, aunque sea en un anexo exclusivo ;-) por
  ser como son, por ser como sois, ¡majísimos!... 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é
  haría 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 más
  tiempo con Linux que con ellos...

  A mis amigas, mis mejores amigas. A Begoña, por todo. A Ana Rocío, en
  la distancia, porque sí.

  A N. S. (``no sé'') por su mirada. Siempre. A Alberto (aka Case) por
  sus cumpleaños.

  A Marc, por la tarjeta que dio el empujón 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 música (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 día que me levanto,
  no piense como Séneca, que decía Mañana será peor... ;-)

  ¡Gracias!

  11.1.2.  De Francisco J. Montilla

  A mi apañero Toni, por compartir esas madrugadas linuxeras, por
  tenerme al día 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 todavía a darle duro a esto.

  12.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 González,
  olea@iname.com 2:345/108.9@fidonet.org
  V2.0, April 8, 1997

  Este documento describe el uso del formato de paquetes de instalación
  que se ha convertido en estándar de facto, el RPM (RedHat Package Man­
  ager)
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Visión general

  3.      Información 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.    Construcción

  6.9.1.  ``El Árbol de Directorios de los Fuentes''

  6.9.2.  Prueba de construcción

  6.9.3.  Creación de la Lista de Ficheros

  6.9.4.  Construyendo el paquete con RPM

  6.10.   Probándolo

  6.11.   ¿Qué hacer con los nuevos paquetes RPM?

  6.12.   ¿Y ahora qué?

  7.      Construcción 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.  Introducción

  RPM es el gestor de paquetes de Red Hat (Red Hat Package Manager).
  Aunque aparece Red Hat en su nombre, la intención es que sea un
  sistema de empaquetado abierto y disponible para el uso de cualquiera.
  Permite a los usuarios tomar el código fuente (source code) y
  empaquetarlo en forma de fuentes y binaria de forma que los ficheros
  binarios sean fácilmente instalables y rastreables y los fuentes
  puedan ser reconstruidas con facilidad. También gestiona una base de
  datos de todos los paquetes y sus ficheros que puede ser usada para
  verificar paquetes e interrogarla para obtener información 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 fácil de usar, aunque provee la base
  para un sistema muy extenso. También es completamente abierto y
  disponible aunque agradeceríamos informes de fallos (bugs) y sus
  reparaciones (fixes). Se concede permiso para usar y distribuir RPM,
  libre de royalties, bajo la protección de la licencia GPL.

  Puede encontrar información más completa sobre RPM en el libro de Ed
  Bailey Maximum RPM.  Dicho libro está disponible en www.redhat.com.

  2.  Visión general

  Primero, permítame expresar parte de la filosofía tras RPM. Uno de los
  objetivos del diseño fue permitir el uso de fuentes ``prístinas (--
  N.T.: originales--)

  Con RPP (nuestro anterior sistema de empaquetado del cual RPM no
  deriva en absoluto), nuestros paquetes de fuentes debían ser
  ``hackeados (-- N.T.: retocados--) ´aplicaciones desde ellos.
  Teóricamente, se podía instalar un paquete fuente RPP y efectuarle un
  make sin problemas.  Pero los fuentes no eran las originales, y no
  había referencia alguna a los cambios que habíamos hecho para que
  pudieran compilar. Se hacía 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 versión de un programa, usted no necesita empezar desde la
  nada para conseguir que compile bajo RHL. Puede examinar el parche
  para saber qué podría necesitar hacer. De esta manera toda la
  configuración por defecto de compilación queda fácilmente a la vista.

  RPM también está diseñado para disponer de potentes parámetros de
  consulta.  Usted puede hacer búsquedas de paquetes a lo largo de toda
  la base de datos o sólo de ciertos ficheros. También puede encontrar
  fácilmente a qué paquete pertenece un fichero y de dónde proviene. Los
  ficheros RPM en sí mismos son archivos comprimidos, pero puede
  consultar paquetes independientes fácil y rápidamente, gracias a una
  cabecera binaria a medida añadida al paquete con toda la información
  que puede necesitar, almacenada sin comprimir. Esto permite consultas
  rápidas.

  Otra poderosa característica es la habilidad de verificar paquetes. Si
  está preocupado por haber borrado algún fichero importante, sólo tiene
  que verificar el paquete. Quedará cumplidamente informado de cualquier
  anomalía.  Llegados a ese punto, podrá reinstalar el paquete si lo
  considera necesario.  Cualquier fichero de configuración que usted
  tenga quedará a salvo.

  Queremos agradecer a los colegas de la distribución 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 código escrito por BOGUS (PM y PMS).

  3.  Información 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 serán compatibles.

  Estos son los mínimos 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 más simple, RPM puede usarse para instalar paquetes:

               rpm -i foobar-1.0-1.i386.rpm

  El siguiente comando más simple es desinstalar un paquete:

          rpm -e foobar

  Uno de los más complejos pero más útiles comandos le permiten instalar
  paquetes a través 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 válido, como esto:

       rpm -i ftp://ftp.pht.com/pub/linux/redhat/rh-2.0-beta/RPMS/foobar-1.0-1.i386.rpm

  Apercíbase de que ahora RPM puede hacer consultas y/o instalaciones a
  través 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 más detalles acerca de la función de estos parametros
  en la página del manual de RPM.

  5.  Y ahora, ¿qué puedo hacer de verdad  con RPM?

  RPM es una herramienta potentísima y, como puede ver, dispone de
  varios parámetros. La mejor forma de apercibirse de ellas es
  examinando unos cuantos ejemplos. Antes mostramos una
  instalación/desinstalación sencilla, ahora van unos cuantos más:

  ·  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 podría 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 información al respecto:

       rpm -qpi koules-1.2-2.i386.rpm

  La salida podría 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 sólo unos pocos ejemplos. Otros, aún más creativos, podrá
  hacerlos fácilmente una vez que se haya familiarizado con RPM.

  6.  Construyendo paquetes RPM

  Construir paquetes RPM es algo realmente fácil de hacer, especialmente
  si puede conseguir que el software que intenta empaquetar pueda
  compilarse por sí mismo.

  El procedimiento básico es el siguiente:

  ·  Asegúrese que su /etc/rpmrc está configurado para su sistema.

  ·  Hágase con el código 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.

  ·  Asegúrese 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 configuración 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 línea require_vendor obliga a RPM a requerir una línea de vendor
  (distribuidor). Ésta puede venir o bien del propio fichero /etc/rpmrc
  o de la cabecera del fichero .spec. Para desactivar este parámetro
  debe cambiarse el número a 0. Esto también se aplica a las líneas
  require_distribution y require_group.

  La siguiente línea es la de distribution (-- N.T.: distribución--) .
  Puede definirla bien aquí o bien en el fichero buena idea asegurarse
  de que esta línea es correcta, incluso cuando no se requiera.  La
  línea de vendor (-- N.T.: distribuidor--)

  funciona de la misma manera, aunque puede contener cualquier cosa
  (ej.: Joe's Software and Rock Music Emporium).

  RPM también soporta ahora el empaquetado de paquetes para múltiples
  arquitecturas. El fichero rpmrc puede incluir una variable de opciones
  (optflags) que contiene parámetros específicos a la arquitectura.  Lea
  secciones posteriores para saber cómo usar esta variable.

  En adición a las macros anteriores, hay disponibles unas cuantas más.
  Puede usar:

       rpm --showrc

  para saber cuál de sus etiquetas están configuradas y cuáles son los
  parámetros disponibles.

  6.2.  El fichero spec

  Ahora hablaremos del fichero .spec. Estos ficheros son imprescindibles
  para construir un paquete. El fichero spec es una descripción del
  software acompañado con instrucciones sobre cómo construirlo y una
  lista de ficheros de todos los binarios instalados.

  Debería nombrar a sus ficheros spec de acuerdo a una convención
  estándar.  Tal como nombre de paquete-guión-número de versión-guión-
  número de publicación-punto-spec.

  A continuación, un pequeño 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 estándar que usted necesita
  rellenar.  También hay unas cuantas advertencias. Los campos deben ser
  rellenados tal como sigue:

  ·  Summary: Descripción en una sóla línea del paquete.

  ·  Name: La cadena que vaya a servir de nombre para el fichero rpm.

  ·  Version: La cadena que vaya a ser el número de versión para el
     fichero rpm.

  ·  Release: El número de publicación para un paquete dentro de un
     mismo número de versión (ej.: si crea un paquete y lo encuentra
     ligeramente defectuoso y necesita generarlo de nuevo, el siguiente
     paquete debería tener 2 como número de publicación).

  ·  Icon: El nombre del icono que podrán usar interfaces de instalación
     alto nivel (como Red Hat `glint''). Debe ser un fichero

  ·  Source: Esta línea apunta a la localización HOME del fichero de
     fuentes original. Se usa si alguna vez quiere tener los fuentes de
     nuevo o chequear para nuevas versiones. Precaución: el nombre del
     fichero en esta línea 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 más 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 sección posterior, ``El Árbol de
  Directorios de las Fuentes'', ``'').

  ·  Patch: El lugar donde podrán encontrarse los parches si los
     necesita de nuevo. Precaución: el nombre debe coincidir con el de
     SUS propios parches. Puede especificar más 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 público--) , distributable (--
     N.T.: distribuible--) o commercial (-- N.T.: comercial--) .

  ·  BuildRoot: Hace referencia a un directorio que simulará el raíz (/)
     para la construcción e instalación de un nuevo paquete. Puede
     usarlo para probar su paquete antes de instalarlo en su máquina.

  ·  Group: Informa a un programa de instalación de alto nivel (como Red
     Hat `glint'') dónde situar este paquete en particular dentro de la
     jerarquía de rpm. Actualmente, esta jerarquía 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 descripción por cada paquete o subpaquete. Se trata de un campo
     multilínea que debe ser usado para proporcionar una descripción
     comprensible del paquete.
  6.4.  %prep

  Esta es la segunda sección 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 señalar: Cada una de estas secciones es sólo un lugar para
  ejecutar guiones de intérprete 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 más simple (sin
  parámetros en la línea 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 construcción.  Por
     defecto es $NAME-$VERSIÓN. Otras posibilidades incluyen $NAME,
     ${NAME}${VERSIÓN}, o cualquiera que use el fichero tar principal.
     (Apercíbese de que estas variables ``$'' no son variables reales
     dentro del fichero spec.  Sólo se usan aquí en lugar de un nombre
     ejemplo. Necesitará usar el nombre real y la versión 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).
     Sólo es útil cuando se usan varios archivos fuente.

  ·  -a # desempaquetará el fichero fuente # después de cambiar al
     directorio.

  ·  -T Este parámetro anula la acción 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.  Sólo resulta
     útil cuando tenga más de una macro de configuración. Debería ser
     usado solamente en macros de configuración después de la primera
     (pero nunca en la primera).

  La siguiente de las macros disponibles es %patch. Esta macro ayuda a
  automatizar el proceso de aplicación de parches a los fuentes.
  Necesita de varios parámetros, listadas a continuación:

  ·  # aplicará el parche Patch#.

  ·  -p # especifica el número de directorios a evitar por el comando
     patch(1).

  ·  -P La acción por defecto es aplicar Patch (o Patch0).  Este
     parámetro inhibe dicha acción y requiere un 0 para tener
     desempaquetado el fichero fuente principal. Esta opción resulta
     útil en una segunda (o posterior) macro %patch que requiera
     parámetros distintos a la primera macro.

  ·  También puede hacer %patch# en lugar de hacer el comando real:
     %patch # -P
  Estas deberían ser todas las macros que necesite. En cuanto las tenga
  claras, podrá crear cualquier otra configuración que necesite mediante
  guiones sh. Todo lo que incluya hasta la macro %build (discutida en la
  siguiente sección) es ejecutado vía 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 sección. Solamente debe
  incluir todos los comandos que necesitaría 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 téngalo en cuenta. Puede moverse a través de los
  subdirectorios si resultase necesario.

  6.6.  %install

  En realidad no hay ninguna macro en esta sección.  Básicamente debe
  incluir aquí cualquier comando necesario para instalar. Si el paquete
  a construir tiene disponible un comando make install, inclúyalo aquí.
  Si no, o bien puede parchear el fichero Makefile y añadirle la
  funcionalidad make install e incluir dicha sentencia en esta sección 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 serían ejecutados antes y después de la
  instalación o desinstalación de paquetes binarios. Una razón
  importante para esto es hacer cosas como ejecutar ldconfig tras la
  instalación o eliminar paquetes que contienen librerías compartidas.
  Las macros para cada uno de los guiones son:

  ·  %pre es la macro para los guiones pre-instalación.

  ·  %post es la macro para los guiones post-instalación.

  ·  %preun es la macro para los guiones pre-desinstalación.

  ·  %postun es la macro para los guiones post-desinstalación.

  Los contenidos de estas secciones deben ser solamente guiones sh,
  luego no resulta necesaria la línea #!/bin/sh.

  6.8.  %files

  Esta es la sección 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 después de la
  instalación del paquete. En un sistema multiusuario, esto es
  inaceptable ya que pueden crearse otros ficheros durante la
  construcción del paquete que no tienen nada que ver con el mismo.

  También hay algunas macros disponibles para hacer cosas especiales.
  Son las listadas a continuación:

  ·  %doc se usa para señalar los ficheros de documentación del paquete
     fuente que desea que sean instalados en una instalación binaria. La
     documentación será instalada en
     /usr/doc/$NOMBRE-$VERSIÓN-$PUBLICACIÓN.  La lista podrá incluir
     varios ficheros en una sóla línea o puede listarlos de forma
     separada con una macro para cada uno de ellos.

  ·  %config se usa para señalar los ficheros de configuración en un
     paquete. Ficheros así pueden ser sendmail.cf, passwd, etc. Si
     posteriormente desinstala un paquete que incluye ficheros de
     configuración, todos los ficheros sin modificar serán borrados y
     todos los ficheros modificados serán movidos a su nombre antiguo
     con el sufijo .rpmsave añadido a su nombre. También puede incluir
     múltiples ficheros con esta macro.

  ·  %dir señala 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 sólo tendrá que
     incluir el nombre de ese fichero aquí y no necesitará especificar
     nada más.

  La mayor precacución que debe tener en cuenta en la lista de ficheros
  es la inclusión 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.  Construcción

  6.9.1.  ``El Árbol de Directorios de los Fuentes''

  Lo primero que necesita es un árbol de directorios de compilación
  configurado de forma apropiada. Esto se puede hacer mediante el
  fichero /etc/rpmrc. La mayoría de la gente sólo usará /usr/src.

  Puede que necesite crear los siguientes directorios para organizar un
  árbol de construcción:

  ·  BUILD es el directorio donde RPM lleva a cabo toda la construcción.
     No tiene que llevar a cabo su prueba de construcción en ningún
     sitio en particular; aquí es donde RPM llevará a cabo la
     compilación 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 construcción

  Lo primero que querrá hacer es asegurarse que los fuentes se
  construyen adecuadamente sin usar RPM. Para ello, desempaquete los
  fuentes, sitúese 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.

  Asegúrese que borra todos los ficheros creados por algún guión de
  configuración. 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 sólo un
  identificador.  Usted probablemente querrá usar algo más descriptivo
  como ``config'' o ``bugs'' para describir el porqué del parche.
  También 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.  Creación de la Lista de Ficheros

  Ahora que tiene los fuentes listos para construir y sabe cómo hacerlo,
  constrúyalo e instálelo. Examine la salida de la secuencia de
  instalación 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 más útil de hacerlo es con un comando como el
  siguiente:

               rpm -ba foobar-1.0.spec

  Hay otras opciones útiles con el parámetro -b tales como:

  ·  p obliga a ejecutar solamente la sección prep del fichero spec.

  ·  l efectúa algunos chequeos en %files.

  ·  c ejecuta la sección %prep y compila. Resulta útil cuando no está
     seguro de si sus fuentes compilan completamente. Puede parecer
     inútil 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 parámetro -b. Son los siguientes:

  ·  --short-circuit El proceso de construcción comenzará directamente
     por la fase especificada, saltándose las previas a la indicada.
     (Sólo puede ser empleado en conjunción con c e i).

  ·  --clean elimina el árbol de construcción 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 parámetro -v.

  ·  --test No lleva a cabo ninguna fase realmente, pero mantiene todos
     los ficheros temporales.

  6.10.  Probándolo

  Una vez que tenga los paquetes rpm binario y fuentes, necesitará
  probarlos.  La mejor forma y la más sencilla es usar para el test una
  máquina completamente diferente de la que usó para la construcción.
  Después de todo, ha hecho un montón de make install en su máquina por
  lo que debería haber quedado instalado de forma aceptable.

  Puede ejecutar un rpm -u nombredepaquete al paquete a probar, pero
  puede ser decepcionante porque en la construcción 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.  Asegúrese
  y tenga en mente que sólo porque usted hace rpm -ba package; la
  mayoría de la gente instalará su paquete sólo con rpm -i package.

  Asegúrese también 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 estén correctamente empaquetados.
  Por favor, tómese el tiempo de probarlos adecuadamente y de subirlos
  para el beneficio de todos.

  También, por favor asegúrese de que no está haciendo llegar solamente
  software de libre disposición. Software comercial y shareware (--
  N.T.: Probar antes de comprar--) no deberían ser subidos a menos que
  esté claramente permitido en alguna cláusula de su licencia. Esto
  incluye el software de Netscape, ssh, pgp, etc.

  7.  Construcción multi-arquitectura de paquetes RPM

  Ahora puede usarse RPM para construir paquetes para Intel i386,
  Digital Alpha ejecutando Linux y Sparc. También se ha informado de su
  funcionamiento en estaciones de trabajo SGI y HP. Hay varias
  características que hacen que la construcción de paquetes para todas
  las plataformas sea fácil.  La primera de éstas es la directiva
  ``optflags'' del fichero /etc/rpmrc.  Puede usarse para asignar las
  opciones usadas durante la construcción del software con valores
  específicos de cada arquitectura.  Otras son las macros ``arch'' en el
  fichero spec. Pueden usarse para diferentes cosas, en función de la
  arquitectura para la que se está construyendo. Otra más, 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 cómo se usa la directiva ``optflags'' desde
  el fichero /etc/rpmrc. En función 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 mayoría de las
  veces necesitará hacer un parche o dos específicos para una sóla
  arquitectura. En ese caso, RPM le permitirá aplicar ese parche sólo
  para una arquitectura.

  En el ejemplo anterior, fileutils tiene un parche para máquinas de 64
  bits.  Obviamente, sólo tiene aplicación en Alpha, por el momento.
  Entonces, añadimos 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 sólo 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 todavía no ha portado
  una aplicación a una determinada plataforma, todo lo que tiene que
  hacer es añadir una línea 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 fácilmente omitible sobre Alpha.

  7.5.  Acabando

  Usar RPM para crear paquetes para múltiples arquitecturas es
  generalmente más 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 están protegidos por las leyes de
  propiedad intelectual. Se permite la redistribución 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 Cárdenes Medina,
  a1402@serdis.dis.ulpgc.es
  v1.5, 20 de agosto de 1997, traducción del 3 de septiembre
  de 1999

  Este Cómo es la base para entender la evolución de las capacidades de
  Linux para tratar con redes informáticas. Es el punto de partida para
  aprender todo sobre el mantenimiento de redes TCP/IP, la configuración
  de los archivos relacionados con la red, y hay un amplio capítulo
  sobre configuración de dispositivos físicos. En suma, un documento muy
  exhaustivo que merece la pena leer.
  ______________________________________________________________________

  Índice general















































  1. Introducción.

  2. Historia del documento

     2.1 Comentarios y sugerencias

  3. Cómo usar este documento.

     3.1 Convenciones usadas en el documento

  4. Información 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 Dónde conseguir información sobre redes no específica de Linux.

  5. Información genérica sobre la configuración de redes.

     5.1 ¿Qué necesito para comenzar?
        5.1.1 Código fuente del núcleo.
        5.1.2 Herramientas de red actualizadas.
        5.1.3 Aplicaciones de red.
        5.1.4 Introducción a las direcciones IP.
     5.2 ¿Dónde debería poner las órdenes de configuración?
     5.3 Creación de las interfaces de red.
     5.4 Configuración de una interfaz de red.
     5.5 Configuración del sistema de resolución de nombres (
        5.5.1 ¿Qué hay en un nombre?
        5.5.2 Qué información necesitará
        5.5.3 (TT
        5.5.4 (TT
        5.5.5 (TT
        5.5.6 Ejecutar un servidor de nombres
     5.6 Configuración de la interfaz
     5.7 Encaminamiento (
        5.7.1 Entonces ¿qué hace el programa
     5.8 Configuración 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 configuración 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. Información relacionada con IP y Ethernet

     6.1 Ethernet
     6.2 EQL - ecualizador de tráfico para líneas múltiples
     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 Encapsulación IPIP
        6.8.1 Una configuración de red con
        6.8.2 Configuración de la máquina cuyos paquetes serán 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 (Traducción de direcciones de red)
     6.15 Traffic Shaper (Manipulación del ancho de banda)
     6.16 Encaminamiento con Linux-2.2

  7. Uso de hardware común 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 conexión permanente a la red usando
     7.5 Cliente SLIP
        7.5.1 dip
        7.5.2 slattach
        7.5.3 ¿Cuándo usar cada uno?
        7.5.4 Servidor SLIP estático con línea por llamada y DIP.
        7.5.5 Servidor SLIP dinámico con línea por llamada y DIP.
        7.5.6 Uso de Dip.
        7.5.7 Conexión SLIP permanente usando una línea dedicada y slattach
     7.6 Servidor SLIP.
        7.6.1 Servidor slip usando
           7.6.1.1 Dónde obtener
           7.6.1.2 Configuración de
           7.6.1.3 Configuración de
           7.6.1.4 Configuración del fichero
           7.6.1.5 Configuración del fichero
           7.6.1.6 Configuración del fichero
        7.6.2 Servidor Slip usando
           7.6.2.1 Configuración del fichero /etc/diphosts
        7.6.3 Servidor SLIP usando el paquete

  8. Otras tecnologías de red

     8.1 ARCNet
     8.2 Appletalk (
        8.2.1 Configuración del software Appletalk.
        8.2.2 Exportación de un sistema de ficheros Linux vía Appletalk.
        8.2.3 Compartir la impresora Linux a través de Appletalk.
        8.2.4 Ejecución de AppleTalk.
        8.2.5 Comprobación de AppleTalk.
        8.2.6 Problemas con AppleTalk.
        8.2.7 Si necesitase más información...
     8.3 ATM
     8.4 AX25 (
     8.5 DECNet
     8.6 FDDI
     8.7 Retransmisión 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 Módem 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 Términos usados en este documento

  11. ¿Linux para un PSI?

  12. Reconocimientos

  13. Copyright.

  14. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Introducción.


  El Sistema Operativo Linux se enorgullece de contar con una
  implementación de servicios de red basada en el núcleo, escrita casi
  por completo partiendo de cero. Su rendimiento en los núcleos
  recientes lo convierte en una alternativa válida incluso a el mejor de
  sus iguales. Este documento intenta describir cómo 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 próximos meses encuentre de utilidad este documento, y que
  seamos capaces de proporcionar información 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 sólo 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 Documentación de
  Linux. Cubría 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. Cubría lo que se llamó versión 2
  y posteriormente versión 3 del Linux Kernel Networking software. Este
  documento a su vez lo sobresee y sólo se refiere a la versión 4 del
  Linux Networking Kernel: más específicamente a las versiones 2.0.x y
  2.2.x del núcleo.

  Las versiones anteriores de este documento llegaron a ser bastante
  grandes a causa de la enorme cantidad de material que caía dentro de
  su ámbito. Para ayudar a resolver este problema se han producido unos
  cuantos Como que tratan con temas específicos sobre redes. Este
  documento proporciona referencias a dichos Como cuando sean relevantes
  y cubre aquellas áreas de las que aún 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, póngase en
  contacto con nosotros en: poet@linuxports.com.  De nuevo, si encuentra
  algo erróneo o cualquier cosa que desearía que fuese añadida, por
  favor, contacte con nosotros.


  3.  Cómo usar este documento.


  Este documento está organizado de una manera vertical. La primera
  sección incluye material informativo y se la puede saltar si no es de
  su interés; lo que sigue es una discusión genérica sobre temas
  referentes a las redes, y debe asegurarse de entender esto antes de
  proceder con partes más específicas. El resto, información «específica
  de la tecnología», está agrupada en tres secciones principales:
  información relativa a Ethernet e IP, tecnologías pertinentes a
  hardware para PC de amplia difusión y tecnologías usadas sólo rara
  vez.

  La metodología que nosotros sugerimos a la hora de leer este documento
  es la siguiente:


     Lea las secciones genéricas
        Estas secciones se aplican a toda, o casi toda tecnología
        descrita más adelante, y por tanto es muy importante que lo
        comprenda.


     Estudie su red
        Debería saber cómo está, o estará diseñada su red, y exactamente
        qué tipo de hardware y tecnología estará implementando.


     Lea la sección ``IP y Ethernet'' si está
        conectado directamente a una LAN o a Internet" Esta sección
        describe la configuración básica para Ethernet ya las varias
        posibilidades que ofrece Linux para las redes IP, como servicio
        de cortafuegos, encaminamiento avanzado, etc.


     Lea la siguiente sección si está interesado en redes locales de
        bajo coste o en conexiones punto a punto" Esta sección describe
        PLIP, PPP, SLIP y RDSI, las tecnologías de más amplia difusión
        en estaciones de trabajo personales.


     Lea las secciones específicas a tecnologías relacionadas con sus
        necesidades" Si sus necesidades difieren de una solución con IP
        y hardware común, la sección del final cubre detalles
        específicos a protocolos diferentes al IP y a hardware de
        comunicaciones peculiar.


     Configure
        Debería intentar configurar su red y tomar nota cuidadosamente
        de cualquier problema que tenga.


     Busque más ayuda si la necesita
        Si experimenta problemas que este documento no le ayude a
        resolver entonces lea la sección relativa a dónde encontrar
        ayuda o dónde informar de los errores.


     ¡Diviértase!
        Trabajar en red es divertido, disfrútelo.



  3.1.  Convenciones usadas en el documento


  No se han utilizado convenciones especiales, pero debería estar al
  corriente de la manera en que aparecen las órdenes. Siguiendo el
  estilo clásico en la documentación de Unix, cualquier orden que deba
  escribir en su intérprete de órdenes, estará prefijada por el símbolo
  «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 líneas.

  Cuando se muestran «Opciones de Compilación del Núcleo», se presentan
  en el formato usado por menuconfig. Deberían 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.

  Fíjese 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
  versión 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 réplica
  (mirror sites).


  4.  Información general sobre las redes en Linux.



  4.1.  Breve historia del desarrollo del Linux Networking Kernel .


  Desarrollar una nueva implementación núcleo de la pila para el
  protocolo tcp/ip que rinda tan bien como las implementaciones
  existentes no es una tarea fácil. La decisión de no portar una de las
  implementaciones existentes se tomó en un tiempo en que había cierta
  incertidumbre al respecto de si las implementaciones existentes serían
  lastradas con copyrights restrictivos por el precedente sentado por
  U.S.L.  y en que había un gran entusiasmo por hacerlo diferente y
  quizás incluso mejor de lo que se había hecho.

  El voluntario original para liderar el desarrollo del núcleo del
  código de red fue Ross Biro, biro@yggdrasil.com. Ross produjo una
  implementación 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 máquinas con esta configuración a
  conexiones reales en Internet. La presión dentro de la comunidad de
  Linux conduciendo el desarrollo de la implementación de la red estaba
  creciendo y, al final, el coste de una combinación de cierta presión
  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 aceptación 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
  programación de sockets BSD para el núcleo 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 implementación del
  protocolo SLIP en Linux. Esto permitió a mucha gente que no tenía
  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 podrían hacerse realidad si Linux tuviera un soporte
  total de red y creciera el número de usuarios usando y experimentando
  de forma activa el software de red que existía.

  Una de las personas que también había estado trabajando activamente en
  la tarea de construir la implementación de red era Fred vam Kempen,
  waltje@uwalt.nl.mugnet.org.  Después 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 oposición.
  Fred tenía planes ambiciosos sobre la dirección que quería que
  siguiese el software de red de Linux y orientó el progreso hacia esos
  objetivos. Fred desarrolló varias versiones del código de red llamado
  el núcleo de código NET-2 (el código NET era el de Ross) que mucha
  gente pudo usar de manera más útil. Fred puso formalmente algunas
  innovaciones en la agenda de desarrollo, como la interfaz dinámica de
  dispositivo, la implementación del protocolo Amateur Radio AX.25 y una
  interfaz de red diseñada más modularmente.  El código NET-2 de Fred
  fue usado por un gran número de entusiastas, que crecía continuamente
  según se iba corriendo la voz de que el software funcionaba.  El
  software de red en esos momentos aún estaba constituido por un gran
  número de parches a la versión estándar del núcleo y no estaba
  incluido en la versión normal. El NET-FAQ y el subsecuente NET-2-HOWTO
  describían el por entonces relativamente complejo procedimiento de
  ponerlo todo en marcha. Fred se concentraba en desarrollar
  innovaciones frente a las implementaciones estándar de red y eso
  estaba llevando tiempo.  La comunidad de usuarios estaba
  impacientándose por algo que funcionase eficazmente y satisficiera al
  80% de usuarios y, como con Ross, la presión sobre Fred como
  desarrollador en jefe creció.

  Alan Cox, iialan@www.uk.linux.org propuso una solución al problema
  diseñada para resolver la situación. Propuso que él podría coger el
  código NET-2 de Fred para quitar fallos, haciéndolo eficaz y estable
  para que satisficiera al impaciente usuario de base al tiempo que
  retiraba esa presión de Fred permitiéndole continuar con su trabajo.
  Alan se puso a ello, obteniendo buenos resultados y su primera versión
  del código de red de Linux fue llamada it/Net-2D(ebugged)/. El código
  funcionaba bien en muchas configuraciones típicas 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 dirección del código NET-2.  Esto
  desarrolló dos tendencias distintas dentro de la comunidad de red de
  Linux, una que tenía la filosofía «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 código de Alan en la distribución estándar de las fuentes
  del núcleo.  Esto puso a Fred en una posición difícil.  Cualquier
  desarrollo continuado podría debilitar la gran base de usuarios usando
  y probando activamente el código y eso significaría que los progresos
  serían lentos y difíciles. Fred continuó trabajando un tiempo y a la
  larga acabó dejándolo 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
  núcleos actuales fueron desarrollados por él. Hay más gente que ha
  hecho contribuciones significativas, pero el trabajo de Donald es
  prolífico y eso le garantiza una mención especial.

  Alan continuó refinando el código 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 código fuente
  1.3.* del núcleo les estaban creciendo los dientes, el código de red
  había migrado a la entrega NET-3 que es en la que las versiones
  actuales están basadas.  Alan trabajó en muchos aspectos diferentes
  del código de red y con la asistencia de mucha otra gente con talento
  de la comunidad de red de Linux hizo crecer el código en todas
  direcciones.  Alan produjo dispositivos de red dinámicos y las
  primeras implementaciones de los estándares AX.25 e IPX. Alan ha
  continuado jugueteando con el código, estructurándolo y mejorándolo
  lentamente hasta el estado en que se encuentra hoy día.

  Michael Callahan, callahan@maths.ox.ac.uk y Al Longyear
  longyear@netcom.com aportaron la implementación del protocolo PPP, lo
  cual fue crítico para incrementar el número de gente que usaba
  activamente Linux para trabajar en red.

  Jonathon Naylor, sn@cs.nott.ac.uk ha contribuido mejorando
  significativamente el código de AX.25 de Alan, añadiendo los
  protocolos NetRom y Rose. La implementación de AX.25/NetRom/Rose es en
  sí misma bastante significativa, porque ningún 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á más adelante en la
  sección de tecnologías específicas; otras personas han contribuido con
  módulos, 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 código de red
  del núcleo de Linux es un excelente ejemplo de los resultados que se
  pueden obtener del anárquico estilo de desarrollo de Linux. Si aún 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 información acerca de la
  implementación de red de Linux.

  Tiene a su disposición un montón 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 código de
  red del núcleo de Linux tiene una página WWW con los últimos titulares
  y eventos de interés relativos al estado de desarrollo de las
  funcionalidades presentes y futuras en cuanto al código de red linux
  en: www.uk.linux.org.

  Otro buen sitio es un libro escrito por Olaf Kirch titulado la Guía
  para Administradores de Redes. Es parte del Proyecto de Documentación
  de Linux http://www.linuxdoc.org y puede leerlo de forma interactiva
  en su versión 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 iniciación de alto nivel
  a la configuración de redes en Linux.

  Hay un grupo de noticias en la jerarquía 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.  Debería
  informar, específicamente, de las versiones de los programas que esté
  usando, sobre todo la versión del núcleo, la versión 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.  Dónde conseguir información sobre redes no específica de


  Si está buscando información básica 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 versión texto
        ftp://athos.rutgers.edu/runet/tcp-ip-intro.doc como en versión
        PostScript ftp://athos.rutgers.edu/runet/tcp-ip-intro.ps.


     TCP/IP Administration
        este documento está tanto en versión texto
        ftp://athos.rutgers.edu/runet/tcp-ip-admin.doc como en versión
        PostScript ftp://athos.rutgers.edu/runet/tcp-ip-admin.ps.


  Si busca información algo más 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 edición, 1995.


  Si quiere aprender a escribir aplicaciones de red en entornos
  compatibles Unix entonces también le recomiendo:

       Unix Network Programming, by W. Richard Stevens, ISBN
       0-13-949876-1, Prentice Hall publications, 1990.


  También debería probar el grupo de noticias comp.protocols.tcp-ip.
  Otra fuente importante de información técnica específica relativa a la
  Internet y al conjunto de protocolos tcp/ip son los RFC. RFC es un
  acrónimo de Request For Comments y es el medio estándar de enviar y
  documentar los protocolos estándar 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.  Información genérica sobre la configuración 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 más importantes son:


  5.1.1.  Código fuente del núcleo.


  Antes que nada:

  La mayoría de las distribuciones vienen por defecto con el soporte de
  red activado, por lo cual no habrá que recompilar el núcleo. Si tiene
  hardware común, debería irle bien. Por ejemplo, tarjetas de red  3COM,
  NE2000, o Intel.  Sin embargo proporcionamos la siguiente información
  por si necesita actualizar el núcleo.

  Como puede ser que el núcleo que está ejecutando no esté preparado
  para los tipos de red o tarjetas que desee usar, probablemente
  necesitará las fuentes del núcleo para recompilarlo con las opciones
  apropiadas.

  Siempre puede obtener la última versión de CDROM.com
  permite que MUCHOS usuarios conecten simultáneamente. 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 réplica.

  Normalmente las fuentes del núcleo se instalarán en el directorio
  /usr/src/linux. Para más información sobre cómo aplicar parches y
  construir el núcleo debería leer el Kernel Como. Para más información
  sobre cómo configurar módulos del núcleo debería leer el Modules mini-
  Howto. Además, el fichero README que hay en las fuentes del núcleo y
  el directorio Documentation son muy ilustrativos para el lector
  intrépido.

  A menos que se diga específicamente lo contrario, recomiendo que
  empiece con la versión estándar del núcleo (la que tenga un número par
  como segundo dígito del número de versión). Las versiones de
  desarrollo del núcleo (las que tienen el segundo dígito impar) podrían
  tener algunos cambios estructurales u otros que podrían 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 núcleos 2.1, por lo que
  tendrá que tomar una decisión: puede mantenerse en 2.0 mientras espera
  por el 2.2 y por una distribución 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 núcleo 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 traducción de este
  Como, en septiembre de 1999, las versiones disponibles del núcleo son
  la 2.2.12 (estable) y la 2.3.16 (desarrollo). Además, las principales
  distribuciones han puesto al día 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 mayoría de distribuciones modernas de Linux están dotadas con las
  herramientas de red, por lo que si ha instalado Linux a partir de una
  distribución y no ha instalado las herramientas de red, debería
  hacerlo.

  Si no ha instalado a partir de una distribución entonces necesitará
  las fuentes para compilar las herramientas usted mismo. No es difícil.

  Las herramientas de red las mantiene ahora Bernd Eckenfelds y están
  disponibles en:

  ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/ y están
  replicadas en: ftp://ftp.uk.linux.org/pub/linux/Networking/base/.

  También 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/.

  Asegúrese de que elige la versión que más se ajuste al núcleo que
  desee usar y siga las instrucciones del paquete para instalarlo.

  Para instalar y configurar la versión 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 distribución. 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 versión de las
  herramientas, e y.yy a la revisión de los correspondientes paquetes.

  Si además va a configurar un cortafuegos o a usar la característica de
  IP Masquerade, necesitará ipfwadm.  La última versión la puede obtener
  en: ftp:/ftp.xos.nl/pub/linux/ipfwadm.  De nuevo se encontrará con más
  de una versión disponible. Asegúrese de coger la versión que más se
  ajuste a su núcleo. 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 versión 2.2 del núcleo.  ipfwadm sólo
  vale para la versión 2.0 del núcleo. Se sabe de estas distribuciones
  que se ajustan a versiones 2.0 o anteriores del núcleo:


  ·  Redhat 5.2 o anteriores

  ·  Caldera antes de la versión 2.2

  ·  Slackware antes de las versiones 4.x

  ·  Debian antes de las versiones 2.x

  Para instalar y configurar la versión actual en el momento de escribir
  esto necesita leer el IPChains Howto, disponible en el Proyecto de
  Documentación de Linux http://www.linuxdoc.org

  Tenga en cuenta que si tiene una versión 2.2 (o 2.1 de las últimas)
  del núcleo, ipfwadm no es la herramienta correcta para configurar un
  cortafuegos. Esta versión del NET-3-HOWTO todavía no trata con la
  nueva configuración de cortafuegos. Si necesita información más
  detallada sobre ipchains, por favor, diríjase 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
  distribución de las más 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.  Introducción a las direcciones IP.


  Las direcciones del Protocolo Internet (IP) están compuestas por
  cuatro bytes. La convención es escribir estas direcciones en la
  denominada «notación decimal puntuada» (dotted decimal notation). De
  esta forma cada byte es convertido en un número decimal (0-255),
  despreciando los ceros a la izquierda a menos que el número en sí sea
  cero.  Por convención, cada interfaz de una máquina o encaminador
  tiene una dirección IP. Es válido usar la misma IP para cada interfaz
  de una sola máquina en algunas circunstancias, pero normalmente cada
  interfaz tiene su propia dirección.

  Las Redes basadas en Internet Procotol son secuencias contiguas de
  direcciones IP.  Todas las direcciones dentro de una red tienen un
  número de dígitos de en común. A la porción de la red que es común a
  todas las direcciones llama la «porción de la red». Los dígitos
  restantes son llamados «porción de la máquina». Al número de bits que
  comparten todas las direcciones de una red se le llama máscara de red
  (netmask), y su papel es determinar qué direcciones pertenecen a la
  red y cuáles no.  Consideremos el siguiente ejemplo:



       ---------------------  ---------------
       Dirección Host         192.168.110.23
       Máscara de red         255.255.255.0
       Porción de red         192.168.110.
       Porción de Host        .23
       ---------------------  ---------------
       Dirección de Red       192.168.110.0
       Dirección de Difusión  192.168.110.255
       ---------------------  ---------------




  Cualquier dirección a la que se aplique una operación and de bits con
  su máscara de red, revelará la dirección de la red a la que pertenece.
  La dirección de red es por tanto siempre el menor número de dirección
  dentro de el rango de la red y siempre tiene la porción de máquina
  codificada toda con ceros.

  La dirección «de difusión» (broadcast) es una especial a la que
  escucha cada máquina en la red además de a la suya propia. Esta
  dirección es a la que se envían los datagramas si se supone que todas
  las máquinas de la red lo deben recibir. Ciertos tipos de datos, como
  la información de encaminamiento y los mensajes de aviso son
  transmitidos a la dirección de difusión para que cada estación en la
  red pueda recibirlo simultáneamente. Hay dos estándares usados
  comúnmente al respecto de la dirección de difusión. El más ampliamente
  aceptado es el de usar la dirección más alta posible en la red. En el
  ejemplo anterior sería 192.168.110.255. Por alguna razón, otras
  estaciones han adoptado la convención de usar las direcciones de red
  como direcciones de difusión. En la práctica no importa mucho cual
  use, pero asegúrese de que cada máquina 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 número de redes de
  tamaño estándar que pueden ser reservadas. Los rangos reservados son:



       ----------------------------------------------------------
       | Clase   | Máscara 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 máquina Linux en una red IP existente
        Si desea instalar una máquina Linux en una red IP existente
        entonces debería contactar con los administradores de la red y
        preguntarles por la siguiente información:


     ·  Dirección IP del Host

     ·  Dirección IP de la red

     ·  Dirección IP de broadcast

     ·  Máscara de red IP

     ·  Dirección del encaminador (router)

     ·  Dirección del Servidor de Nombre de Dominio (DNS)

        Debería configurar entonces el dispositivo de red Linux con esos
        detalles. No puede inventarlos y esperar que la configuración
        funcione.


     Construir una nueva red propia que nunca conectará con
        Internet" Si está construyendo una red privada y no tiene
        intención 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 específicamente para este propósito. Están
        descritas en el RFC1597 y son las que siguen:







     -----------------------------------------------------------
     |      DIRECCIONES RESERVADAS PARA REDES PRIVADAS         |
     -----------------------------------------------------------
     | Clase   | Máscara 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 debería decidir cuán grande quiere que sea su red para
     entonces elegir tantas direcciones como necesite.



  5.2.  ¿Dónde debería poner las órdenes de configuración?


  Hay unas pocas opciones a elegir para el procedimiento de arranque del
  sistema Linux. Después de que carga el núcleo, siempre ejecuta un
  programa llamado init. El programa init lee entonces el fichero de
  configuración 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 configuración del
  arranque del sistema está organizada de manera diferente en cada
  distribución.

  Normalmente el fichero /etc/inittab contiene una entrada que dice algo
  como:



       si::sysinit:/etc/init.d/boot




  Esta línea especifica el nombre del fichero de guión de ejecución
  (script) que controla la secuencia de carga. Este fichero es algo así
  como el AUTOEXEC.BAT en MS-DOS.

  El guión 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 guía para su sistema:



       ----------------------------------------------------------------------
       Distrib. |Interfaz Configuración/Encaminado  |Iniciación 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/*
       ----------------------------------------------------------------------


  Fíjese en que Debian y Red Hat usan un directorio entero de guiones
  que «levantan» los servicios del sistema (y normalmente la información
  no se encuentra en esos archivos; por ejemplo, el sistema de Red Hat
  almacena toda la configuración del sistema en ficheros dentro de
  /etc/sysconfig, de donde es leída por los guiones de carga). Si quiere
  comprender los detalles del proceso de arranque del sistema, le
  sugiero que examine /etc/inittab y la documentación que acompaña a
  init. Linux Journal va a publicar (o lo ha hecho ya) un artículo
  tratando la iniciación del sistema, y este documento mantendrá una
  referencia a él tan pronto como esté disponible en la red.

  La mayoría de distribuciones modernas incluyen algún programa que le
  permita configurar la mayoría de interfaces de red. Si tiene una de
  éstas entonces debería ver si hace lo que usted quiere antes de acudir
  a la configuración manual.



       --------------------------------------------
       Distrib.  | Programa de configuración de red
       --------------------------------------------
       RedHat    | /sbin/netcfg
       Slackware | /sbin/netconfig
       --------------------------------------------





  5.3.  Creación 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 dinámica y por tanto no
  requieren de la presencia de ficheros de dispositivo.

  En la mayoría de los casos los dispositivos de red son creados
  automáticamente por el controlador de dispositivos mientras se inicia
  y localiza el hardware. Por ejemplo, el controlador Ethernet crea
  interfaces eth[0..n] secuencialmente según 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 acción de algún
  programa de usuario. Se aplica la misma numeración secuencial de
  dispositivos, pero no se crean al arrancar. La razón es que al
  contrario que con los dispositivos Ethernet, el número de dispositivos
  ppp o slip puede variar durante la actividad de la máquina. Estos
  casos serán cubiertos con más detalle en secciones posteriores.


  5.4.  Configuración de una interfaz de red.


  Cuando tenga todos los programas necesarios y su dirección e
  información 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 parámetros configurables.  El programa usado más
  comúnmente 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
  dirección IP 192.168.0.1 y máscara de red 255.255.255.0. El `up del
  final de la orden le dice al interfaz que debería 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 núcleo asume ciertas cosas cuando configura interfaces. Por
  ejemplo, puede especificar la dirección de red y difusión de una
  interfaz, pero si usted no lo hace, como en mi ejemplo anterior,
  entonces el núcleo hará una suposición razonable de cuáles deberían
  ser, basándose en la máscara que se le proporciona; si tampoco indica
  la máscara, entonces partirá de la clase de la dirección IP
  configurada. En mi ejemplo, el núcleo asumirá que se va a configurar
  una red clase C en la interfaz y establece una dirección de red
  192.168.0.0 y una dirección de difusión 192.168.0.255.  Hay otras
  muchas opciones para la orden ifconfig.  Las mas importantes son:



     up esta opción activa una interfaz (y es la opción por defecto).


     down
        esta opción desactiva una interfaz.


     [-]arp
        esta opción activa o desactiva el uso del protocolo de
        resolución de dirección (address resolution protocol) sobre la
        interfaz


     [-]allmulti
        esta opción activa o desactiva la recepción 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 parámetro le permite especificar la MTU del dispositivo.


     netmask <direc>
        este parámetro le permite asignar la máscara de la red a la que
        pertenece el dispositivo.


     irq <direc>
        este parámetro sólo trabaja con ciertos tipos de hardware, y
        permite especificar la IRQ del dispositivo.


     [-]broadcast [direc]
        este parámetro le permite activar y asignar la acepción de
        datagramas destinados a la dirección de difusión, o desactivarla
        por completo.

     [-]pointopoint [direc]
        este parámetro le permite asignar la dirección de la máquina en
        el otro extremo de un enlace punto a punto, como en SLIP o PPP.


     hw <tipo> <direc>
        este parámetro le permite asignar la dirección 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
  automáticamente los dispositivos de red al crearlos, por lo que es
  innecesario el uso de ifconfig con ellos.


  5.5.  Resolver ) Configuración del sistema de resolución de nombres (
  Name


  El sistema de resolución de nombres es una parte de la biblioteca
  estándar de Linux.  Su función principal es proporcionar un servicio
  para convertir las denominaciones «amistosas con el hombre» de las
  máquinas como ftp.funet.fi a direcciones IP «amigables para la
  máquina» como 128.214.248.6.


  5.5.1.  ¿Qué hay en un nombre?


  Posiblemente esté familiarizado con la apariencia de los nombres de
  máquina de Internet, pero puede que no entienda como se construyen, o
  como se «desconstruyen». Los nombres de dominio de Internet son
  jerárquicos 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 están especificados en el RFC-920. Algunos ejemplos de los
  más comunes son:



     COM
        Organizaciones Comerciales

     EDU
        Organizaciones Educativas

     GOV
        Organizaciones Gubernamentales

     MIL
        Organizaciones Militares

     ORG
        Otras organizaciones

     NET
        Organizaciones relacionadas con InterNet

     Designador de País
        éstos son códigos de dos letras que representan a un país en
        particular.


  Por razones históricas, la mayoría de los dominios pertenecientes a
  uno de los de nivel superior que no basados en un nombre de país, son
  de organizaciones dentro de los Estados Unidos, aunque los Estados
  Unidos tienen también su propio código de país .us. Esto ha dejado de
  ser cierto para los dominios .com y .org, que son usados de forma
  común por compañías de fuera de los Estados Unidos de América.

  Cada uno de estos dominios de nivel superior tiene subdominios. Los
  dominios de nivel superior basados en el nombre de un país 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 división suele representar el nombre de la
  organización.  Los siguientes subdominios varían, a menudo basando el
  siguiente nivel en la estructura departamental de la organización a la
  que pertenecen, pero pueden estarlo en cualquier criterio considerado
  razonable y con significado claro para los administradores de la red
  de la organización.

  La parte más a la izquierda de un nombre siempre es el nombre único
  asignado a la máquina, y es llamada hostname, la porción del nombre a
  la derecha del nombre de la máquina 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 máquina 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 país, Australia, y como su dirección de
  correo pertenece a una organización comercial tenemos .com como
  siguiente nivel de dominio.  El nombre de la compañía es (era)
  telstra, y la estructura interna de su nombre está basada en una
  estructura organizacional. En su caso, la máquina pertenece al Grupo
  de Tecnología de la Información (Information Technology Group),
  sección de Operaciones de Red (Network Operations).

  Los nombres son, por norma, bastante más cortos; por ejemplo, mi PSI
  se llama systemy.it y mi organización sin ánimo de lucro se llama
  linux.it, sin subdominio com ni org, por lo que mi propia máquina se
  llama morgana.systemy.it y rubini@linux.it es una dirección de correo
  electrónico válida. Sepa que el dueño de un dominio tiene derecho
  tanto para registrar una máquina como para registrar subdominios; por
  ejemplo, el GUL (Grupo de Usuarios de Linux) al que pertenezco usa el
  dominio pluto.linux.it, porque los dueños de linux.it convinieron en
  abrir un subdominio para el GUL.


  5.5.2.  Qué información necesitará


  Necesitará saber a qué dominio pertenecen sus máquinas. El software de
  resolución de nombres proporciona el servicio de traducción haciendo
  consultas a un Servidor de Nombres de Dominio (Domain Name Server),
  por lo que deberá saber la dirección 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 configuración principal del código
  de resolución de nombres. Su formato es bastante simple. Es un fichero
  de texto con una palabra clave por línea. 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 máquina.


     nameserver
        ésta, que puede utilizarse varias veces, especifica una
        dirección IP de un servidor de nombres de dominio para
        consultarlo cuando se resuelvan nombres.

  Su /etc/resolv.conf podría 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
  añadir a los nombres no cualificados (esto es, nombres de máquinas
  suministrados sin dominio) es maths.wu.edu.au, y que si no se
  encuentra la máquina en este dominio intentemos también el dominio
  wu.edu.au directamente.  Se proporcionan dos entradas de servidor de
  nombres, cada uno de los cuales puede ser llamado por el código de
  resolución 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 código de resolución de
  nombres.  El formato de este fichero está descrito en detalle en la
  página de manual resolv+. El ejemplo siguiente funcionará en casi
  todas las circunstancias:



       order hosts,bind
       multi on




  Esta configuración 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 válidas de una máquina
  que encuentre en el fichero /etc/hosts, en lugar de sólo el primero.


  5.5.5.  /etc/hosts



  El fichero /etc/hosts es donde se pone el nombre y dirección IP de las
  máquinas locales. Si usted inserta un nombre en este fichero, entonces
  su ordenador no consultará a un servidor de dominio para obtener la
  dirección IP.  La desventaja de este método es que usted mismo tendrá
  que poner el fichero al día si la dirección de alguna máquina 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 máquina local.



       # /etc/hosts
       127.0.0.1      localhost loopback
       192.168.0.1    this.host.name




  Se puede especificar más de un nombre de máquina por línea, como se
  demuestra en la primera entrada, que es la forma estándar 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 documentación incluida en su copia de BIND (Berkeley
  Internet Name Domain).


  5.6.  Configuración 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 podría
  querer esto. Por ejemplo, puede que desee probar algún tipo de
  programa sin interferir con alguien más en su red. Por convención, la
  dirección de red IP 127.0.0.1 ha sido asignada específicamente para el
  dispositivo de pruebas. Por lo que da igual lo que haga su máquina,
  que si abre una conexión de telnet a 127.0.0.1, siempre llegará a la
  interfaz interna.

  Configurar la interfaz loopback es simple y debería asegurarse de
  hacerlo.



       root# ifconfig lo 127.0.0.1
       root# route add -host 127.0.0.1 lo




  Hablaremos más de la orden route en la siguiente sección.


  5.7.  Encaminamiento ( Routing ).


  El encaminamiento es un tema amplio. Sería fácil llenar varios
  volúmenes hablando de él. La mayoría de ustedes tendrán requisitos de
  encaminamiento relativamente simples, pero algunos no. Cubriré
  solamente algunos de los fundamentos básicos. Si está interesado en
  información más detallada, entonces sugiero que se remita a las
  referencias propuestas al principio del documento.

  Comencemos con una definición. ¿Qué es el encaminamiento IP? Esta es
  la que yo suelo aplicar:


       El Encaminamiento IP es el proceso por el que una máquina
       con múltiples conexiones de red decide por dónde dirigir un
       datagrama IP que haya recibido.


  Sería útil ilustrar esto con un ejemplo. Imagine una oficina con el
  encaminamiento típico, que podría 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 debería enviar el
  datagrama, es el encaminamiento. Las estaciones sencillas también
  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, ¿cómo funciona el encaminado? Cada máquina tiene
  una lista de reglas, llamada tabla de encaminamiento. Esta tabla
  contiene columnas que suelen contener al menos tres campos: el primero
  es una dirección 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 dirección IP de otra máquina que cogerá el datagrama en su
  siguiente paso a través 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 dirección de destino (para quién
  es) y se compara con cada entrada en la lista. Se selecciona la
  entrada que más se parezca y se reenvía el datagrama a la interfaz
  especificada. Si el campo de pasarela (gateway) está descrito, el
  datagrama se reenvía a esa máquina mediante la interfaz especificada,
  y si no, se asume que la dirección 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 instrucción
  toma sus argumentos en línea de órdenes y los convierte en llamadas al
  sistema del núcleo, que le piden que añada, 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 dirección 192.168.1.0. Le han dado
  la dirección IP 192.168.1.10 para su uso y también 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 añadir una entrada en la tabla de rutas para decirle al
  núcleo que los datagramas destinados a todas las máquinas con
  direcciones que se ajusten a 192.168.1.*, deberán ser enviados al
  dispositivo Ethernet. Debería usar una orden similar a:



       root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0




  Fíjese en el uso del parámetro -net para especificar al programa route
  que esta entrada es una regla para una red completa. Otra opción es
  -host, que indica una vía específica a una dirección IP en particular.

  Esta ruta le permitirá establecer conexiones IP con todas las
  estaciones de su segmento Ethernet. Pero ¿qué pasa con todas las
  máquinas con dirección IP que no están en su segmento Ethernet?

  Sería bastante engorroso, por no decir imposible, tener que añadir
  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 mínima, por lo que si existe cualquier otra entrada
  que se ajuste a la dirección 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 demás debería ir por aquí». En el ejemplo
  que me he inventado podría usar una orden como:



       root# route add default gw 192.168.1.1 eth0




  El parámetro gw le dice a la orden route que lo que le sigue es la
  dirección IP, o nombre, de una pasarela u otra máquina encaminadora a
  la que se deberían enviar todos los datagramas que se ajusten a esta
  entrada para futuro encaminamiento.

  Por lo tanto, la configuración completa debería 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 máquina, encontrará
  que al menos uno de ellos se parece mucho a esto. Es una configuración
  muy común.

  Veamos ahora una configuración de encaminamiento un poco más
  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
  configuración de encaminamiento debería 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 debería usar la forma simple que
  presentamos anteriormente. Sólo 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, dejándole el problema de repartirlos.
  Puede estar preguntándose por qué el encaminador por defecto
  presentado no especifica un gw. La razón es simple: los protocolos de
  enlace serie como PPP y SLIP sólo 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 elección, por lo que
  no se necesita especificar una pasarela para este tipo de conexión de
  red.  Otros tipos como Ethernet, arcnet o token ring necesitan que se
  especifique la pasarela, ya que se puede acceder a un gran número de
  terminales al mismo tiempo.


  5.7.1.  Entonces ¿qué hace el programa routed ?


  La configuración 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 más
  complejas, las cosas se vuelven un poco más complicadas.
  Afortunadamente la mayoría de ustedes no tendrá este problema.

  El gran problema con el «encaminamiento manual» o «encaminamiento
  estático» que aquí se ha descrito, es que si una máquina o enlace
  falla en la red, entonces la única manera en que podrá dirigir sus
  datagramas por otra dirección, si es que existe, es interviniendo
  manualmente y ejecutando las órdenes apropiadas. Naturalmente esto es
  poco elegante, lento, nada práctico y peligroso. Se han desarrollado
  varias técnicas para ajustar automáticamente las tablas de
  encaminamiento en el caso de fallos en la red donde hubiera caminos
  alternativos. Todas estas técnicas se agrupan de manera no muy oficial
  bajo la definición «protocolos de encaminamiento dinámico».

  Puede que haya oído de alguno de los protocolos más comunes. Es
  probable que RIP (Routing Information Protocol) y OSPF (Open Shortest
  Path First Protocol) sean los más comunes. El Routing Information
  Protocol es muy común en redes pequeñas, como las redes corporativas
  pequeñas y medianas o en las redes de edificios. El OSPF es más
  moderno y más capaz de gestionar grandes configuraciones de red, y
  está mejor preparado para entornos donde haya un gran número de
  caminos posibles a través 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 más adelante.

  Un ejemplo de dónde y cómo debería usar un protocolo de encaminamiento
  dinámico vendría 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 (máscara de red
  255.255.255.0). Cada encaminador tiene también un enlace PPP a cada
  uno de los otros encaminadores. La red forma un triángulo.

  Debería estar claro que la tabla de encaminamiento del encaminador A
  podría 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 funcionaría 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 máquinas del segmento
  Ethernet de A no podrán alcanzar a las del segmento Ethernet en B
  porque sus datagramas serán dirigidos al enlace ppp0 de A que está
  mal. Podrían seguir comunicándose todavía con las máquinas 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 aún está intacto.

  Pero espere un momento. Si A puede hablar con C y C puede aún hablar
  con B, ¿por qué no puede A encaminar sus datagramas para B a través de
  C y dejar que C se los mande a B? Este es exactamente el tipo de
  problema para el que fueron diseñados los protocolos de encaminamiento
  dinámico como RIP. Si cada uno de los encaminadores A, B y C está
  ejecutando el demonio de encaminamiento, entonces sus tablas deberían
  ser ajustadas automáticamente para reflejar el nuevo estado de la red
  si alguno de los enlaces falla. Configurar tal red es sencillo. En
  cada encaminador sólo 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 automáticamente 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 día la
  tabla de encaminamiento en el host.

  Ésta ha sido una explicación muy concisa del encaminamiento dinámico y
  de dónde podría usarlo. Si quiere más información, tendrá que acudir a
  las referencias listadas al principio del documento.

  Los puntos importantes relacionados con el encaminamiento dinámico
  son:


  1. Sólo necesita ejecutar un protocolo de encaminamiento dinámico
     cuando su máquina Linux tenga la posibilidad de elegir entre
     múltiples caminos para llegar a un destino.

  2. El demonio de encaminamiento dinámico modificará automáticamente la
     tabla de encaminamiento para ajustarla a los cambios en la red.

  3. RIP es adecuado para redes de tamaño pequeño y medio.


  5.8.  Configuración 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 máquina 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 máquina
  en particular, y es así como un servidor conoce la diferencia entre
  una conexión telnet y otra de FTP que le lleguen. El usuario remoto
  establece una conexión de red con la máquina, y el programa servidor,
  el demonio de red que esté escuchando en ese puerto, aceptará la
  conexión y se ejecutará. Hay dos modos de operación para los demonios
  de red. Ambos se usan por igual en la práctica. Las dos maneras son:



     autónomo (standalone)
        el programa demonio de red escucha en el puerto de red asignado
        y, cuando llega una conexión, 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 configuración que le dice qué programa debe ser
        ejecutado cuando se reciba una conexión. 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 números de puerto y el
  fichero /etc/inetd.conf que es el fichero de configuración 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
  máquina.  Su formato es bastante simple. Es un fichero de texto en el
  que cada línea representa una entrada a la base de datos. Cada entrada
  comprende tres campos separados por cualquier número 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 número que especifica el número de puerto del servicio que
        estará disponible. La mayoría de los servicios comunes tienen
        asignados números de servicio, y están 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 razón técnica por la cual
        deban existir ambos.  Normalmente prevalece el sentido común, y
        sólo 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 línea después 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 máquina desde
  cero, aquí tiene una copia del fichero /etc/services proporcionado por
  una antigua la distribución 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 día a día, este fichero se encuentra en proceso de continuo
  crecimiento según se van creando nuevos servicios. Si piensa que su
  copia es incompleta, le sugiero que haga una copia del /etc/services
  de una distribución reciente.


  5.8.2.  /etc/inetd.conf


  /etc/inetd.conf es el fichero de configuración para el demonio
  servidor inetd. Su función es la de almacenar la información relativa
  a lo que inetd debe hacer cuando recibe una petición de conexión a un
  servicio en particular. Para cada servicio que desee que acepte
  conexiones deberá decirle a inetd qué demonio servidor de red
  ejecutar, y cómo ha de hacerlo.

  Su formato también es relativamente sencillo. Es un fichero de texto
  en el que cada línea describe un servicio que desee proporcionar.
  Cualquier texto en una línea que siga a # es ignorado y se considera
  un comentario.  Cada línea contiene siete campos separados por
  cualquier número 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 configuración, 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 técnico por naturaleza, pero por regla
        general casi todos los servicios basados en tcp usan stream, y
        casi todos los basados en udp usan dgram. Sólo algunos demonios
        servidores muy particulares usarán otros valores.


     proto
        el protocolo considerado válido para este servicio. Debería
        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) usarán rpc/tcp o rpc/udp.
     flags
        sólo hay dos valores posibles. Este campo le dice a inetd si el
        programa servidor de red libera el socket después de comenzar la
        ejecución, y si por tanto inetd podrá ejecutar otro servidor
        para la siguiente petición de conexión, o si inetd deberá
        esperar y asumir que el demonio servidor que esté ejecutándose
        controlará las nuevas peticiones de conexión. Esto tiene su
        dificultad, pero por norma general todos los servidores tcp
        deberían tener esta entrada con el valor nowait y la mayoría de
        servidores udp deberían tener wait.  De todas maneras hay
        algunas excepciones notables, por lo que debería leer la guía de
        ejemplo si no está seguro.


     usuario
        este campo indica qué cuenta de usuario de /etc/passwd será
        asignada como dueña 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 daño
        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 línea de órdenes y es
        opcional. Es en donde se pone cualquier argumento de línea 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 incluirán un buen fichero /etc/inetd.conf para trabajar con
  él.  Aquí incluyo, como ejemplo, el fichero /etc/inetd.conf de la
  distribución 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 configuración relacionados con la red


  Hay varios ficheros misceláneos relacionados con la configuración de
  la red en Linux por los que podría estar interesado. Nunca debería
  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
  números de identificación de protocolos con sus nombres. Esto lo usan
  los programadores para especificar protocolos por su nombre en sus
  programas y también por programas como tcpdump para mostrar nombres en
  lugar de números en su salida. En general la sintaxis del fichero es:



       nombredelprotocolo  número  sobrenombres




  El fichero /etc/protocols proporcionado con la distribución 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 función 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 sólo puede haber dos
  campos por línea y los campos están codificados así:



       nombredelared direccióndered




  Un ejemplo podría 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 dirección.

  5.10.  Seguridad en la red y control de acceso.


  Déjeme empezar esta sección advirtiendo que la seguridad de su máquina
  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  traducción en
  http://www.insflug.org/documentos/Seguridad-Como/.

  Una regla general importante es: No ejecute servicios que no tenga
  intención de usar'.  Muchas distribuciones vienen configuradas con
  todo tipo de servicios que se inician automáticamente. Para asegurar
  un nivel mínimo de seguridad debería examinar el fichero
  /etc/inetd.conf y comentar (poner un # al inicio de la línea) de toda
  declaración de servicio que no vaya a usar. Buenos candidatos son:
  shell, exec, uucp, ftp y servicios de información como finger, netstat
  y systat.

  Hay todo tipo de mecanismos de seguridad y control de acceso,
  describiré los más 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 conexión 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 leído por el programa de acceso (normalmente
  /etc/login). Su formato es una lista de los nombres de dispositivos
  tty permitidos, en todos los demás 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 debería 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 descripción completa de este
  servicio debería referirse a las páginas 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 configuración del programa
  /usr/sbin/tcpd. El fichero hosts.allow contiene reglas que describen
  qué máquinas 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 máquinas, delimitada por comas. Aquí
        también puede usar direcciones IP. De forma adicional, puede
        especificar nombres de máquinas o direcciones usando caracteres
        comodín para corresponder con grupos de máquinas. Por ejemplo:
        gw.vk2ktj.ampr.org para una máquina específica, .uts.edu.au para
        cualquier nombre de máquina que acabe en esa cadena, 44. para
        cualquier dirección IP que comience con esos dígitos. Hay
        algunas palabras especiales para simplificar la configuración,
        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 máquina;

     ·  PARANOID se corresponde con cualquier nombre que no se
        corresponda con esta dirección (name spoofing). Hay una última
        palabra que también es útil.  La palabra
     ·  EXCEPT permite proporcionar una lista con excepciones. Esto lo
        cubriremos en un capítulo posterior.


     orden
        es un parámetro opcional. Este parámetro es el camino completo
        hasta una orden que debería ser ejecutada cada vez que se cumpla
        esta regla. Podría por ejemplo ejecutar una instrucción que
        intentase identificar quién 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 número de expansiones que podríamos
        incluir, algunos ejemplos comunes son: %h se expande al nombre
        de la máquina que se conecta o a su dirección 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 sólo 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 quién 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 configuración del programa
  /usr/sbin/tcpd. El fichero hosts.deny contiene reglas que describen
  qué máquinas tienen prohibido el acceso a un servicio en su máquina.

  Un ejemplo simple podría 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 serían razonables por defecto
  dependiendo de sus requisitos particulares.

  La configuración más segura es tener ALL: ALL por defecto en
  /etc/hosts.deny para después dar permiso específicamente 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 máquina sin que tenga que
  proporcionar una clave. Esto es útil en un entorno seguro donde
  controle todas las máquinas, pero en otro caso es un peligro para la
  seguridad. Su máquina es sólo tan segura como la menos segura de
  aquellas en las que confíe.  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 estarán interesados en ejecutar un demonio de FTP
  anónimo para permitir a otras personas que subir y descargar ficheros
  sin necesidad de un userid específico. Si decide ofrecer este servicio
  asegúrese de que configura el demonio de ftp apropiadamente para
  acceso anónimo. La mayoría de las páginas de ftpd(8) describen cómo
  hacerlo.  Debería 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 anónima; asegúrese de que
  elimina todos los detalles sobre las cuentas excepto aquellos que deba
  tener, ya que en otro caso será vulnerable a las técnicas de
  adquisición 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 máquina o servidores. Esto lo cubre en
  profundidad el http://www.insflug.org/documentos/Cortafuegos-Como/ y,
  más concisamente, la última sección de este documento.


  5.10.7.  Otras sugerencias.


  Hay otras sugerencias, que debería considerar, pero que realmente son
  cuestión 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 difícil de encontrar una opción a
        los servicios NFS, y si decide usarlos, asegúrese de que es
        cuidadoso con los permisos que da al configurarlo.



  6.  Información relacionada con IP y Ethernet


  Esta sección cubre la información específica a Ethernet e IP. Estas
  subsecciones han sido agrupadas juntas debido a que pienso que son las
  más interesante dentro de la que previamente se llamó sección de
  «Tecnología Específica». 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 núcleo se le asigna eth0 y al resto se les
  asigna secuencialmente en el orden en que sean detectadas.

  Por defecto, el núcleo de Linux sólo intenta buscar una tarjeta de
  red, por lo que tendrá que pasarle algunos parámetros para forzar la
  detección de las demás.

  Para aprender cómo hacer trabajar una tarjeta Ethernet bajo Linux
  debería acudir al Ethernet Howto, Ethernet-HOWTO.html.

  Una vez que tenga el núcleo compilado para reconocer su tarjeta
  Ethernet, configurar la tarjeta es sencillo.

  Normalmente debería 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 mayoría de los controladores Ethernet fueron desarrollados por
  Donald Becker, becker@CESDIS.gsfc.nasa.gov.


  6.2.  EQL - ecualizador de tráfico para líneas múltiples


  El nombre del dispositivo EQL es eql. Con las fuentes estándar del
  núcleo sólo podrá tener un dispositivo EQL por máquina. EQL
  proporciona un medio para utilizar múltiples líneas punto a punto como
  un solo enlace PPP, slip o PLIP lógico para llevar tcp/ip. A menudo es
  más barato usar varias líneas de baja velocidad que tener una sola
  línea de alta velocidad.

  Opciones de Compilación del Núcleo:



       Network device support  --->
         [*] Network device support
         <*> EQL (serial line load balancing) support





  Para poder usar este mecanismo la máquina en el otro extremo de la
  línea debe admitirlo también. Linux, Livingstone Portmasters y los
  nuevos servidores dial-in soportan servicios compatibles.

  Para configurar EQL necesitará las herramientas eql que están
  disponibles en
  ftp://metalab.unc.edu/pub/linux/system/Serial/eql-1.2.tar.gz.


  La configuración es bastante directa. Se comienza por la interfaz eql.
  La interfaz es exactamente como la de cualquier otro dispositivo de
  red. La dirección 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
  líneas que se vayan a usar. Esta puede ser cualquier combinación de
  dispositivos de red punto a punto. Cómo iniciar las conexiones depende
  del tipo de enlace que sea, por lo que ha de mirar las secciones
  apropiadas para más información.

  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 parámetro 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 líneas jugando con este valor.

  Para disociar una línea de un dispositivo EQL use eql_emancipate de
  esta manera:



       #root eql_emancipate eql sl0




  Puede añadir 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 auditoría IP del núcleo de Linux le permiten
  recolectar y analizar datos de uso de la red. Los datos recogidos
  comprenden el número de paquetes y de bytes acumulados desde que se
  puso a cero la última vez.  Tiene a su disposición varias reglas para
  categorizar estas cifras para que se ajusten a los propósitos que les
  vaya a dar. Esta opción ha sido eliminada del núcleo a partir de la
  versión 2.1.102, porque el viejo sistema de cortafuegos basado en
  ipfwadm fue reemplazado por ipfwchains.

  Opciones de Compilación del Núcleo:



       Networking options  --->
         [*] IP: accounting





  Después de que haya compilado e instalado el núcleo necesitará hacer
  uso de la orden ipfwadm para configurar la auditoría de IP. Hay muchas
  maneras diferentes de obtener la información de auditoría para elegir.
  He creado un ejemplo sencillo de lo que podría ser útil, pero debería
  leer la página de manual de ipfwadm para obtener más información.

  Escena: Tenemos una red Ethernet que accede a la Internet mediante un
  enlace PPP. En la Ethernet tiene una máquina que ofrece cierta
  variedad de servicios y está interesado en saber cuánto tráfico se
  genera por cada conexión ftp y http, así como el tráfico total tcp y
  udp.

  Podrías usar un conjunto de órdenes que se pareciese a lo siguiente,
  que se presenta como guión de ejecución 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 líneas en /etc/services. La
  última orden da una lista de cada una de las reglas de auditoría 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 cálculos 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 código para llevar la contabilidad se accede mediante «IP
  Firewall Chains». Consulte la página principal de IP chains
  http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html si
  desea más información. Entre otras cosas, necesitará usar ipchains en
  lugar de ipfwadm para configurar sus filtros. (De
  Documentation/Changes en las últimas fuentes del núcleo)


  6.5.  IP Aliasing


  Hay algunas aplicaciones para las que es útil ser capaz de asignar
  varias direcciones IP a un sólo 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 más información de la que aquí hay.

  Opciones de Compilación del Núcleo:



       Networking options  --->
          ....
          [*] Network aliasing
          ....
          <*> IP: aliasing support




  Después de compilar e instalar su núcleo con la implementación de
  IP_Alias, la configuración es muy sencilla. Los alias se añaden a
  dispositivos de red virtuales asociados al verdadero dispositivo de
  red.  Se aplica una convención sencilla para dar nombres a estos
  dispositivos, que es <nombredisp>:<núm disp virtual>, por ejemplo
  eth0:0, ppp0:10, etc. Tenga en cuenta que dispositivo nombre:número
  sólo se puede configurar después de haber activado la interfaz
  principal.

  Por ejemplo, asumiremos que tiene una red Ethernet que soporta dos
  redes IP diferentes simultáneamente y quiere que tu máquina tenga
  acceso directo a ambas. Podríamos 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 añadimos un `-' al final de su
  nombre y nos referimos a él de forma tan sencilla como:



       root# ifconfig eth0:0- 0




  También serán borradas automáticamente 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 máquina 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 reenvíos
  (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 reenvíos se aplican a datagramas que se reciben pero que
  no son para esta máquina, como por ejemplo datagramas que entran por
  una interfaz para ser encaminados por otra.

  Opciones de Compilación del Núcleo:



       Networking options  --->
         [*] Network firewalls
         ....
         [*] IP: forwarding/gatewaying
         ....
         [*] IP: firewalling
         [ ] IP: firewall packet logging




  La configuración 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
  debería investigar y desarrollar sus propias reglas si la seguridad es
  algo que le importe.

  El uso más común de los cortafuegos IP es probablemente cuando está
  usando su máquina Linux como encaminador y pasarela (gateway)
  cortafuegos para proteger tu red local de accesos sin autorización
  desde fuera de la red.

  La configuración siguiente está basada en una contribución de Arnt
  Gulbrandsen, agulbra@troll.no.

  El ejemplo describe la configuración de las reglas de cortafuegos en
  la máquina 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, deberían normalmente estar situadas en un
  fichero rc de manera que sean ejecutadas automáticamente cada vez que
  el sistema reinicie. Para mayor seguridad deberían ser llamadas
  después 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 máquina cortafuegos está
  reiniciando.





























  #!/bin/sh

  # Limpiar la tabla de reglas de 'Reenvíos'
  # Cambiar la política 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 encantaría usar '-a deny' en lugar de '-a reject -y' pero entonces
  # sería 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 configuración.
  #
  /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 deberíamos 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 sólo
  # 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, añadir
  # su puerto aquí también.
  #
  /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 continúe, si no lo
  # hiciéramos, experimentaríamos 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 mayoría del resto de conexiones TCP y registrarlas
  # (añade 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 también
  #
  /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 debería ser un punto de partida razonable. La página de
  manual de ipfwadm ofrece más asistencia en lo que respecta al manejo
  de la herramienta. Si intenta configurar un cortafuegos, asegúrese de
  que hace suficientes preguntas para tener información de las fuentes
  que considera fiables y haga algunas pruebas de funcionamiento con su
  configuración desde el exterior de la red.


  6.7.  IP Firewall (para Linux 2.2)


  Al nuevo código para controlar el cortafuegos se accede mediante IP
  Firewall Chains. Consulte la página principal de IP Chains
  http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html si
  desea más información. Entre otras cosas, necesitará usar ipchains en
  lugar de ipfwadm para configurar sus filtros.  (De
  Documentation/Changes en las últimas fuentes del núcleo)

  Estamos avisados de que esto está seguramente desfasado y estamos
  trabajando para tener esta sección más al día. Es posible que tengamos
  una versión nueva para agosto de 1999.


  6.8.  Encapsulación IPIP


  ¿Qué razón hay para encapsular datagramas IP dentro de datagramas IP?
  Le parecerá una tontería 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 más extendido o al
  menos el mejor conocido es Amateur Radio.

  Opciones de Compilación del Núcleo:



           Networking options  --->
               [*] TCP/IP networking
               [*] IP: forwarding/gatewaying
               ....
               <*> IP: tunneling




  Los dispositivos túneles 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 máscaras de
  red. Esto hace que conjuntos de direcciones contiguas sean encaminadas
  mediante una sola regla de encaminamiento. Esto es muy conveniente,
  pero significa que sólo puede usar una dirección IP en particular
  cuando está conectado a alguna parte de la red a la que pertenece.  En
  la mayoría de los casos esto vale, pero si suele desplazarse entonces
  no será capaz siempre de conectar desde el mismo sitio. La
  encapsulación IP/IP (IP tunneling) le permite saltarse esta
  restricción permitiendo que los datagramas que están destinados a su
  dirección IP sean encapsulados y dirigidos a otra dirección IP. Si
  sabe que va a estar durante un tiempo trabajando en otra red IP
  entonces podrá poner a punto una máquina de su red habitual para que
  acepte los datagramas que van dirigidos a su IP y que los reenvíe a la
  dirección que esté usando de manera temporal.


  6.8.1.  Una configuración de red con túneles




        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 razón para usar encapsulación IPIP,
  las redes privadas virtuales. Este ejemplo presupone que tiene dos
  máquinas cada una con una sola conexión ppp a Internet. Cada máquina
  tiene una sola dirección IP. Tras cada una de estas máquinas hay
  algunas redes privadas de área local configuradas con direcciones de
  red IP reservadas.  Supongamos que quiere permitir que cualquier
  máquina en la red A se conecte con cualquier máquina en la red B, como
  si estuvieran conectadas a Internet por una ruta de red. La
  encapsulación IP se lo permitirá. Tenga en cuenta que la encapsulación
  no resuelve el problema de cómo hacer que las máquinas las redes A y B
  se comuniquen con otras máquinas en Internet, ya que para seguimos
  necesitando trucos como el Enmascaramiento IP.  La encapsulación la
  realiza normalmente una máquina que esté funcionando como encaminador.

  El encaminador Linux A debería configurarse así:












  #!/bin/sh
  PATH=/sbin:/usr/sbin
  mask=255.255.255.0
  remotegw=fff.ggg.hhh.iii
  #
  # Configuración Ethernet
  ifconfig eth0 192.168.1.1 netmask $mask up
  route add -net 192.168.1.0 netmask $mask eth0
  #
  # Configuración ppp0 (iniciar enlace ppp, establecer ruta por defecto)
  pppd
  route add default ppp0
  #
  # Configuración del dispositivo túnel
  ifconfig tunl0 192.168.1.1 up
  route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0




  El encaminador Linux `B' debería configurarse con:



       #!/bin/sh
       PATH=/sbin:/usr/sbin
       mask=255.255.255.0
       remotegw=aaa.bbb.ccc.ddd
       #
       # Configuración Ethernet
       ifconfig eth0 192.168.2.1 netmask $mask up
       route add -net 192.168.2.0 netmask $mask eth0
       #
       # Configuración ppp0 (iniciar enlace PPP, establecer ruta por defecto)
       pppd
       route add default ppp0
       #
       # Configuración del dispositivo túnel
       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 leería: Envía cualquier datagrama destinado a 192.168.1.0/24 dentro
  de un datagrama IPIP con dirección de destino aaa.bbb.ccc.ddd'.

  Las configuraciones son recíprocas en cada extremo. El dispositivo de
  túnel usa el gw dado en la ruta como destino del datagrama IP en el
  que encerrará el datagrama que ha recibido para encaminar.  Esa
  máquina debe saber cómo desencapsular datagramas IPIP, esto es, debe
  también estar configurada con un dispositivo túnel.





  6.8.2.  Configuración de la máquina cuyos paquetes serán encapsulados


  No tiene por qué estar encaminando una red entera. Por ejemplo puede
  estar encapsulando una sola dirección IP. En este caso podría
  configurar el dispositivo tunl en la máquina `remota' con su dirección
  IP y el extremo A usará la máquina encaminadora (y Proxy Arp) en lugar
  encaminar la red a través del dispositivo túnel. Dibujemos de nuevo y
  modifiquemos apropiadamente nuestra configuración. Ahora tenemos una
  máquina 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 máquina A:



        192.168.1/24

            -
            |      ppp0 =                ppp0 =
            |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
            |
            |   /-----\                 /-----\
            |   |     |       //        |     |
            |---|  A  |------//---------|  B  |
            |   |     |     //          |     |
            |   \-----/                 \-----/
            |                      también: 192.168.1.12
            -




  El encaminador Linux A debería configurarse así:



       #!/bin/sh
       PATH=/sbin:/usr/sbin
       mask=255.255.255.0
       remotegw=fff.ggg.hhh.iii
       #
       # Configuración Ethernet
       ifconfig eth0 192.168.1.1 netmask $mask up
       route add -net 192.168.1.0 netmask $mask eth0
       #
       # Configuración ppp0 (iniciar enlace ppp, establecer ruta por defecto)
       pppd
       route add default ppp0
       #
       # Configuración del dispositivo túnel
       ifconfig tunl0 192.168.1.1 up
       route add -host 192.168.1.12 gw $remotegw tunl0
       #
       # Proxy ARP para la máquina remota
       arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub




  El encaminador Linux B debería configurarse así:






  #!/bin/sh
  PATH=/sbin:/usr/sbin
  mask=255.255.255.0
  remotegw=aaa.bbb.ccc.ddd
  #
  # Configuración ppp0 (iniciar enlace ppp, establecer ruta por
  # defecto)
  pppd
  route add default ppp0
  #
  # Configuración del dispositivo túnel
  ifconfig tunl0 192.168.1.12 up
  route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0




  Esta clase de configuración es más típica de aplicaciones Mobile-IP,
  donde una máquina quiere moverse por Internet y mantener una única IP
  fija. Debería leer la sección Mobile-IP (IP Móvil) si quiere más
  información de cómo se hace esto en la práctica.


  6.9.  Enmascarado IP ( IP Masquerade )


  Mucha gente dispone de una sola cuenta por conexión telefónica para
  conectarse a Internet. Casi todos los que utilizan esa configuración
  se ve limitado a una sola dirección IP que le da el Proveedor de
  Servicios de Internet. Esto normalmente es bastante para permitir un
  sólo acceso completo a la red. El Enmascarado IP es un truco
  inteligente que permite que varias máquinas usen una sola dirección
  IP, haciendo que las otras máquinas se hagan pasar, y de ahí el
  término de enmascaramiento, por la máquina que realmente tiene la
  conexión. Hay un pequeño defecto y es que el enmascarado funciona casi
  siempre en un sólo sentido, y este es que las máquinas enmascaradas
  pueden hacer llamadas, pero no pueden aceptar o recibir llamadas de
  otras máquinas remotas. Esto significa que algunos servicios de red
  como talk no funcionarán y otros como ftp deberán ser configurados en
  modo pasivo (PASV) para que funcionen.  Afortunadamente los servicios
  de red más comunes como telnet, WWW e irc funcionan bien.

  Opciones de Compilación 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 máquina Linux esté usando una línea slip o PPP
  como si fuera una máquina aislada. Sin embargo, podemos tener además
  otros dispositivos de red configurados, quizá una ethernet,
  configurada con una de las direcciones de red privadas. Las máquinas
  que van a ser enmascaradas podrían estar en esta segunda red. Cada una
  de ellas debería tener asignada la dirección IP del puerto Ethernet de
  la máquina Linux como la pasarela (gateway) por defecto.
  Una configuración típica podría 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 más importantes para esta configuración 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 máquinas 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 máquinas de la red 192.168.1/24 sean
       # enmascarados
       ipchains -A forward -s 192.168.1.0/24 -j MASQ




  Puede obtener más información sobre Enmascarado IP de Linux en la
  página de recursos de IP Masquerade
  http://www.hwy401.com/achau/ipmasq. También hay un documento muy
  detallado que habla sobre enmascaramiento, que es el IP-Masquerade-
  Como (que también enseña 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 característica que le permite
  redirigir servidores o servicios destinados a otra máquina a esos
  servicios en esta máquina. Normalmente esto es útil cuando tiene un
  Linux como encaminador que además proporciona un servidor proxy.
  Debería redirigir todas las conexiones destinadas a este servicio de
  forma remota al servidor local de proxy.

  Opciones de Compilación del Núcleo:



           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 configuración de la característica de proxy transparente se realiza
  mediante la orden ipfwadm.

  Un ejemplo que podría ser útil es el siguiente:



       root# ipfwadm -I -a accept -D 0/0 telnet -r 2323




  Este ejemplo hará que cualquier intento de conexión al puerto telnet
  (23) por parte de otra máquina sea redirigida al puerto 2323 de esta
  máquina. Si tiene un servicio activo en ese puerto, podría redirigir
  las conexiones telnet, hacer un registro de lo que pasa, o cualquier
  cosa que se ajuste a sus necesidades.

  Un ejemplo más interesante es redirigir todo el tráfico http a través
  de un almacén 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/página, cuando
  conecta a la caché local busca proxy.dominio.local:8080 y pregunta por
  www.servidor.com/camino/página.

  Para filtrar una petición http a través del proxy local, necesitará
  adaptar el protocolo insertando un pequeño 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 creía que empezaba a entender las redes IP las reglas
  cambian! IPv6 es la notación abreviada de la versión 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 más, en su mayor parte
  simplificaciones, que harán que las redes IPv6 sean más manejables que
  las IPv4.

  Linux ya tiene una implementación de IPv6 que funciona, pero no está
  completa, a partir de la serie de núcleos 2.2.*.

  Si quiere experimentar con esta próxima generación de tecnología de
  Internet, o le hace falta, debería leerse la IPv6-FAQ que está
  disponible en http://www.terra.net/ipv6.


  6.12.  Mobile IP


  El término movilidad de IP describe la habilidad de una máquina que es
  capaz de mover su conexión de red de un punto de Internet a otro sin
  cambiar su dirección IP o perder conectividad. Normalmente cuando una
  máquina con IP cambia su punto de conexión también debe cambiar su
  dirección IP. La Movilidad de IP soluciona este problema asignando una
  IP fija a la máquina móvil y usando encapsulación IP (tunneling) con
  encaminado automático para asegurar que los datagramas destinados a
  ella se encaminan a la verdadera dirección 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 página principal de Linux
  Mobile IP http://anchor.cs.binghamton.edu/~mobileip.


  6.13.  Multicast


  IP Multicast permite encaminar datagramas IP hacia a un número
  arbitrario de máquinas con IP de forma simultánea. Este mecanismo se
  explota para proporcionar material de amplia distribución por Internet
  como transmisiones de imagen y sonido y otras aplicaciones noveles.

  Opciones de Compilación del Núcleo:



            Networking options  --->
                [*] TCP/IP networking
                ....
                [*] IP: multicasting






  Esto requiere un conjunto de herramientas y algo de configuración de
  la red.  Una fuente de información sobre cómo instalar y configurar
  esto para Linux la encontramos en
  http://www.teksouth.com/linux/multicast.


  6.14.  red) NAT - Network Address Translation (Traducción de direc­
  ciones de


  El servicio de Traducción 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 más próximo.  NAT proporciona características que no posee
  el Enmascarado IP que lo hacen eminentemente más apropiado para su uso
  en los diseños de encaminamiento de cortafuegos corporativos y en
  instalaciones a mayor escala.

  Michael Hasenstein, Michael.Hasenstein@informatik.tu-chemnitz.de, ha
  desarrollado una implementación alfa de NAT para el núcleo 2.0.29 de
  Linux. La documentación e implementación de Michaels está disponible
  en: la página Web de Linux IP Network Address http://www.csn.tu-
  chemnitz.de/HyperNews/get/linux-ip-nat.html

  Los núcleos más modernos de Linux 2.2.x también incluyen algo de la
  funcionalidad NAT en el algoritmo de encaminamiento.


  6.15.  Traffic Shaper (Manipulación del ancho de banda)


  El traffic shaper (regulador de caudal) es un controlador que crea
  nuevas interfaces de red, las cuales tienen una limitación en el
  caudal, definida por el usuario, y que actúan sobre una interfaz de
  red física para hacer la comunicación real, pudiendo ser utilizadas
  por el encaminador para el tráfico 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 sólo puede ser compilado como módulo y para
  configurarlo se usa el programa shapecfg con órdenes como las
  siguientes:



       shapecfg attach shaper0 eth1
       shapecfg speed shaper0 64000




  El dispositivo regulador sólo puede controlar el ancho de banda del
  tráfico de salida, ya que los paquetes son transmitidos a través suyo
  de acuerdo con las tablas de rutas; sin embargo, una funcionalidad de
  rutas por dirección de origen podría ayudar a limitar el ancho de
  banda global de máquinas específicas que estén usando un encaminador
  Linux.

  Linux-2.2 implementa también 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 más información al respecto del shaper.


  Si quiere probar un intento de regulación de caudal de paquetes
  entrantes, use rshaper-1.01 (o más nuevo). Lo encontrará en
  ftp://ftp.systemy.it/pub/develop.


  6.16.  Encaminamiento con Linux-2.2


  La última versión de Linux, la 2.2, ofrece mucha flexibilidad en lo
  que a política de encaminamiento se refiere. Desafortunadamente,
  deberá esperar a la siguiente versión de este Como, o acudir a las
  fuentes del núcleo.


  7.  Uso de hardware común en los PC



  7.1.  RDSI


  La Red Digital de Servicios Integrados (RDSI) es una serie de
  estándares que especifican una red digital conmutada de propósito
  general. Una llamada RDSI crea un servicio de datos asíncrono 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 sólo canal llamado canal D que
  se usa para enviar información 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 número de canales en cualquier momento y en cualquier
  combinación. Usted podría, 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 pequeño número de llamadas y dejar el resto de los
  canales sin usar. Se puede usar un canal tanto para llamadas entrantes
  como salientes. La intención original de la RDSI fue permitir a las
  compañías de telecomunicaciones proporcionar un sólo servicio de datos
  que pudiera transmitir tanto teléfono (mediante voz digitalizada) como
  servicios de datos a su casa o negocio sin que tuviera que hacer
  ningún cambio especial de configuración.

  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 compañía
  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 configuración y los otros son los que
  realmente se conectan a los dispositivos de red que usarán los
  circuitos de datos cuando se hayan establecido. Linux trabajará con
  este tipo de configuración sin modificación alguna, simplemente tiene
  que tratar el puerto del Adaptador Terminal como trataría cualquier
  otro dispositivo serie.  Otra manera, que es para la que está diseñado
  el soporte de RDSI del núcleo permite instalar una tarjeta RDSI en su
  máquina Linux y dejar entonces que sea el propio Linux quien maneje
  los protocolos y haga las llamadas.

  Opciones de Compilación del Núcleo:





      ISDN subsystem  --->
          <*> ISDN support
          [ ] Support synchronous PPP
          [ ] Support audio via ISDN
          < > ICN 2B and 4B support
          < > PCBIT-D support
          < > Teles/NICCY1016PC/Creatix support





  La implementación del núcleo de Linux de la RDSI soporta varios tipos
  diferentes de tarjetas RDSI. Son las que vienen listadas en las
  opciones de configuración del núcleo.


  ·  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 más detalles de cómo configurar el soporte RDSI de
  Linux en el directorio /usr/src/linux/Documentation/isdn/ y también 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 versión en inglés).

  Una nota al respecto de PPP. El conjunto de protocolos PPP operará
  tanto sobre lineas serie síncronas como asíncronas. El demonio PPP
  (pppd) que se suele distribuir para Linux sólo soporta el modo
  asíncrono. Si desea ejecutar los protocolos PPP sobre el servicio
  RDSI, necesitará una versión especial modificada. En la documentación
  anteriormente mencionada encontrará detalles de cómo encontrarlo.

  En http://www.insflug.org/documentos/RDSI-Como/ tiene a su disposición
  un documento con detalles específicos de la configuración en España.


  7.2.  PLIP en Linux-2.0


  Los nombres de los dispositivos PLIP son `plip0', `plip1' y `plip2'.

  Opciones de Compilación del Núcleo:



           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 máquinas, excepto en
  que está diseñado para usar los puertos paralelos de impresora de la
  máquina en lugar de los puertos serie (se incluye un diagrama de
  cableado en la sección de diagramas de cableado más adelante). Como es
  posible transmitir más de un bit a la vez con un puerto paralelo, es
  posible obtener mayores velocidades con la interfaz plip que con los
  dispositivos serie estándar.  Además, puede aprovecharse incluso el
  más sencillo de los puertos paralelos, el puerto de impresora, en
  lugar de tener que comprar una UART 16550AFN, comparativamente más
  cara, para los puertos serie. PLIP usa mucha CPU si lo comparamos con
  un enlace serie y casi seguro que no será una buena opción si puede
  obtener algunas tarjetas Ethernet baratas, pero funcionará cuando no
  esté disponible nada más y además 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 módulos 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 más información sobre la configuración de los
  módulos en el núcleo.

  Por favor tenga en cuenta que algunos portátiles usan circuitería que
  no funcionará con PLIP porque no permiten algunas combinaciones de
  señales 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 máquina Linux a una
  máquina DOS que esté ejecutando cualquier clase de programas tcp/ip
  mediante plip.

  En la serie de núcleos 2.0.* los dispositivos PLIP están 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
  parámetro irq de la orden ifconfig. Asegúrese de que activa las IRQ de
  los puertos de impresora en la ROM BIOS antes, si es que dispone de
  esa opción. Como alternativa, puede especificar las opciones io= e
  irq= como argumentos a insmod, si usa módulos. Por ejemplo:



       root# insmod plip.o io=0x288 irq=5




  La operación PLIP se controla con dos retardos, cuyos valores por
  defecto suelen ser correctos. Posiblemente necesite incrementarlos si
  tiene una máquina un tanto lenta, en cuyo caso los temporizadores a
  incrementar están en la otra máquina. Hay un programa llamado
  plipconfig que permite cambiar la configuración de los temporizadores
  sin recompilar el núcleo. Viene con muchas distribuciones Linux.

  Para configurar una interfaz plip, necesitará invocar las siguientes
  órdenes (o añadirlas a su guión de iniciación 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 dirección 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 parámetro pointopoint tiene el mismo significado que para SLIP, en
  el que especifica la dirección de la máquina 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 más información 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 núcleo, se cambió la
  implementación del puerto paralelo, hacia una configuración mejor.

  Opciones de compilación del núcleo:



           General setup  --->
               [*] Parallel port support
           Network device support  --->
               <*> PLIP (parallel port) support




  El nuevo código de PLIP se comporta como el anterior (se usan las
  mismas órdenes ifconfig y route que en la sección anterior, pero la
  iniciación del dispositivo es diferente debido a la avanzada
  implementación 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 estén disponibles, tal como se muestra en
  /proc/parport. Por ejemplo, si sólo tiene un puerto paralelo, sólo
  tendrá un directorio llamado /proc/parport/0.

  Si el núcleo no detecta la IRQ usada por el puerto, insmod plip
  fallará; en este caso simplemente tendrá que escribir el número
  correcto en /proc/parport/0/irq y reinvocar insmod.

  Hay disponible información completa al respecto del puerto paralelo en
  el archivo Documentation/parport.txt, parte de las fuentes de su
  núcleo.


  7.4.  PPP


  Los nombres de los dispositivos PPP son ppp0, ppp1, etc. Los
  dispositivos están numerados de forma secuencial de manera que el
  primer dispositivo configurado recibe el 0.

  Opciones de compilación del Núcleo:



           Networking options  --->
               <*> PPP (point-to-point) support




  La configuración del PPP está cubierta en detalle en el PPP-Como,
  http://www.insflug.org/documentos/PPP-Como/.


  7.4.1.  Mantener una conexión permanente a la red usando pppd .


  Si es tan afortunado como para tener una conexión semi-permanente a la
  red y quiere hacer que su máquina establezca automáticamente la
  conexión 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




  Asegúrese de que tiene configurada la opción -detach en el fichero
  /etc/ppp/options. Entonces, inserte la siguiente línea 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 automáticamente 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 según van siendo configurados.


  Opciones de compilación del núcleo:



           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 línea serie, sea una línea de teléfono con un módem, o una línea
  dedicada.  Por supuesto para usar SLIP necesitará tener acceso a un
  servidor SLIP de algún tipo. Muchas universidades y empresas de todo
  el mundo proporcionan acceso mediante SLIP.

  Slip usa los puertos serie de su máquina para transportar datagramas
  IP.  Para hacerlo debe tomar el control del dispositivo serie. Los
  dispositivos SLIP se denominan sl0, sl1, etc. ¿Cómo se corresponden a
  sus dispositivos serie? El código 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 módem que llame al otro
  extremo del enlace, identificarle automáticamente en el servidor
  remoto, examinar los mensajes que le envía el servidor y obtener
  información tal como su dirección 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 autenticación.

  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
  configuración.


  7.5.2.  slattach



  slattach es un programa muy sencillo comparado con dip, muy fácil de
  usar, pero no tiene la sofisticación 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 información que
  necesita y la línea serie se establece antes de que lo invoque.
  slattach es ideal para usarlo donde necesite una conexión permanente
  al servidor, como un cable físico o una línea dedicada.


  7.5.3.  ¿Cuándo usar cada uno?


  Debería usar dip cuando su enlace a la máquina servidora de SLIP es un
  módem, o algún otro enlace temporal. Debería usar slattach cuando
  disponga de una línea dedicada, quizá un cable, entre su máquina y el
  servidor, y no se necesita ejecutar ninguna acción especial para hacer
  que el enlace funcione. Mire la sección ``Conexión Permanente con
  Slip'' para más información.

  configurar SLIP se parece mucho a configurar una interfaz Ethernet
  (lea la sección ``Configuración de un dispositivo Ethernet'' más
  atrás).  Sin embargo, hay unas pocas diferencias clave.

  Antes que nada, los enlaces SLIP son diferentes a las redes Ethernet
  en que sólo hay dos máquinas en la red, una en cada extremo del
  enlace. Al contrario que con Ethernet que está disponible para su uso
  nada más que termine de cablear, con SLIP, dependiendo del tipo de
  enlace que tenga, puede que tenga que iniciar la conexión de red de
  alguna manera especial.

  Si está usando dip entonces esto no debería hacerlo en el momento de
  arrancar, sino algo más adelante, cuando esté preparado para usar el
  enlace. Es posible automatizar este procedimiento.  Si está usando
  slattach entonces probablemente quieras añadir una sección a su
  fichero rc.* correspondiente. Esto lo describiremos pronto.

  Hay dos tipos principales e servidores SLIP: servidores de direcciones
  IP dinámicas y servidores de direcciones IP estáticas. Casi cualquier
  servidor SLIP le pedirá al conectar una identificación y una
  contraseña.  dip puede proporcionar estos datos automáticamente.


  7.5.4.  Servidor SLIP estático con línea por llamada y DIP.


  Un servidor estático de SLIP es aquél en el que se le ha dado una
  dirección IP que es exclusivamente suya. Cada vez que conecte al
  servidor, tendrá que configurar su puerto SLIP con esa dirección. El
  servidor estático de SLIP contestará a la llamada del módem,
  posiblemente le pregunte su nombre de usuario y contraseña, y entonces
  encaminará cualquier datagrama destinado a su dirección mediante esa
  conexión. Si tiene un servidor estático, entonces puede que quiera
  añadir una entrada con su dirección IP y el nombre de su máquina (ya
  que sabe cuales serán) en /etc/hosts. También debería configurar
  algunos otros ficheros como: rc.*, host.conf, resolv.conf,
  /etc/HOSTNAME y rc.local. Recuerde que cuando configure rc.*, no
  necesita añadir ninguna orden especial para la conexión SLIP ya que es
  dip el que hace todo el trabajo duro al configurar la interfaz.
  Necesitará proporcionarle a dip la información apropiada de manera que
  configure la interfaz por usted después de ordenarle al módem 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 sección ``Uso de Dip'' para aprender a configurar dip de
  forma apropiada.

  7.5.5.  Servidor SLIP dinámico con línea por llamada y DIP.


  Un servidor dinámico de SLIP es aquél que le asigna una dirección IP
  al azar, a partir de una reserva de direcciones, cada vez que se
  registra. Eso significa que no hay garantías de que tenga una
  dirección en particular cada vez, y esa dirección puede ser usada por
  otra persona después 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 dirección sin
  asignar, guía a quien llama a través del procedimiento de registro y
  entonces imprime un mensaje de bienvenida que contiene la dirección IP
  que se le ha asignado, para entonces proceder a usar esa dirección IP
  durante toda la llamada.

  La configuración para este tipo de servidor es similar a la
  configuración para un servidor estático, excepto en que debe añadir un
  paso en el que obtiene la dirección 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 sólo como para registrarle, sino
  también como para leer automáticamente la dirección 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 sección ``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 conexión y configuración de tus dispositivos
  SLIP con las órdenes ifconfig y route apropiadas.

  Esencialmente, para usar dip escribiremos un «guión dip», que es
  básicamente una lista de órdenes que dip comprende y que le dicen cómo
  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 cómo funciona. dip es un programa bastante potente, con
  muchas opciones. No las va a encontrar todas aquí, y tendrá que mirar
  la correspondiente página man, el README y los ficheros de ejemplo que
  vendrán con su versión de dip.

  Fíjese en que el guión sample.dip asume que está accediendo a un
  servidor SLIP estático, por lo que su IP ya se conoce de antemano. Las
  nuevas versiones de dip incluyen, para los servidores SLIP dinámicos,
  una orden que puede usarse para leer y configurar automáticamente el
  dispositivo SLIP con la dirección IP que el servidor dinámico le
  asigna. El ejemplo siguiente es una versión 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 configuración.








  #
  # sample.dip    Programa de soporte de conexión para Dialup IP
  #
  #               Este fichero (debería mostrar) muestra el uso de DIP
  #       Este fichero debería funcionar para los servidores dinámicos
  #       de tipo Annex, si usted usa un servidor estático entonces utilice
  #       el fichero sample.dip que viene en el paquete dip337-uri.tgz
  #
  #
  # Versión:      @(#)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 dirección del otro extremo
  # La máquina a la que llamo se llama 'xs4all.hacktic.nl'
  # (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Asignar 255.255.255.0 como máscara de red de sl0
  netmask 255.255.255.0
  # Asignar el puerto serie y velocidad deseados
  port cua02
  speed 38400

  # Reiniciar el módem y la línea terminal
  # ¡Esto parece darle problemas a algunas personas!
  reset

  # ¡Nota! Valores "estándar" 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 dirección IP del servidor y la asignamos
  #   Aquí asumiremos que tras ordenar al servidor SLIP que entre
  #   en modo SLIP, nos imprime nuestra dirección IP.
  get $local remote 30
  if $errlvl != 0 goto prompt_error

  # Configurar los parámetros 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 módem...
  error:
  print FALLÓ LA CONEXIÓN a $remote
  quit

  salir:
  exit




  El ejemplo anterior asume que estamos llamando a un servidor SLIP
  dinámico. Si está llamando a un servidor SLIP estático, entonces
  debería 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 dirección IP, osea
  una cadena de números separados por caracteres «.». Esta modificación
  se hizo específicamente pensando en los servidores SLIP dinámicos,
  para que el proceso de leer la dirección IP pudiera ser automatizado.

  El ejemplo anterior creará automáticamente una ruta por defecto a
  través del enlace SLIP. Si no es lo que deseaba, a lo mejor porque
  tiene una conexión Ethernet que debería ser la ruta por defecto,
  entonces elimine la orden default del guión. Después de que haya
  acabado de ejecutarse el guión, si ejecuta la orden ifconfig, verá que
  hay un dispositivo sl0. Este es el dispositivo SLIP. Si fuese
  necesario, podría modificar su configuración a mano, después 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 más común es cSLIP que es SLIP
  con compresión. 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 debería copar con la mayoría
  de los errores. Para obtener más información, haga el favor de
  dirigirse a las páginas man de dip. Naturalmente podría, por ejemplo,
  codificar un guión 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 más de uno.


  7.5.7.  Conexión SLIP permanente usando una línea dedicada y slattach


  Si lo que tiene es un cable entre dos máquinas, o es tan afortunado
  como para tener una línea dedicada, o algún otro tipo de conexión en
  serie permanente entre su máquina 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 conexión.

  Como la conexión será permanente, querrá añadir algunas órdenes al
  fichero rc pertinente. En esencia, todo lo que necesita hacer para
  tener una conexión 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. Añade lo siguiente al
  fichero rc pertinente:



       #
       # Activar una conexión SLIP estática por línea 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 estático




  Nota del traductor: A fecha de la traducción, la serie estable del
  núcleo era la 2.2. En la serie 2.2, los dispositivos /dev/cuaX han
  sido completamente eliminados, unificándolos a los /dev/ttySX.

  Donde:


     IPA.IPA.IPA.IPA
        representa su dirección IP.

     IPR.IPR.IPR.IPR
        representa la dirección 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 compresión. Nota: ambos extremos deben estar de
  acuerdo sobre si usar compresión o no.


  7.6.  Servidor SLIP.



  Si tiene una máquina, quizá conectada a una red, a la que le gustaría
  que otra máquina pudiese llamar y proporcionar servicios de red,
  entonces necesita configurarla como servidor. Si quiere usar SLIP como
  protocolo de línea serie, entonces tiene tres opciones para configurar
  su máquina Linux como servidor SLIP. Yo preferiría usar la primera
  presentada, sliplogin, ya que parece la más sencilla de configurar y
  entender, pero presentaré un sumario de cada una, para que pueda tomar
  su propia decisión.


  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 línea terminal en una
  línea SLIP.  Esto le permite configurar una máquina Linux tanto como
  servidor de direcciones estáticas, obteniendo los usuarios la misma
  dirección cada vez que llaman, o como servidor de direcciones
  dinámicas, donde los usuarios obtienen una dirección que no tiene que
  ser necesariamente la misma que la última vez que llamaron.

  El que llama se registrará igual que en un proceso estándar de login,
  introduciendo su nombre de usuario y contraseña, pero en lugar de
  presentarle un intérprete de órdenes normal tras el registro, se
  ejecuta sliplogin, el cual busca en su fichero de configuración
  (/etc/slip.hosts) una entrada con el nombre de usuario que corresponda
  a la persona que llamó. Si lo encuentra, entonces configura la línea
  como «clean» y de 8 bit, y hace una llamada ioctl para convertir la
  disciplina de la línea a SLIP. Cuando se completa este proceso, toma
  lugar la última parte de la configuración, en la cual sliplogin invoca
  un guión de intérprete de órdenes que configura la interfaz SLIP con
  la dirección ip y máscara de red relevantes, y asigna las rutas
  apropiadas. Este guión suele llamarse /etc/slip.login pero, de forma
  parecida a getty, si ciertos usuarios requieren una iniciación
  especial, entonces puede crear guiones de configuración llamados
  /etc/slip.login.nombreusuario que serán ejecutados específicamente
  para ellos en lugar del que hay por defecto.

  También hay tres o cuatro ficheros que necesitará configurar para
  tener sliplogin en funcionamiento. Detallaré cómo y dónde obtener los
  programas y cómo se configura cada uno. Los ficheros son:


  ·  /etc/passwd, para las cuentas de los usuarios que llaman.

  ·  /etc/slip.hosts, para almacenar la información única a cada usuario
     que llama.

  ·  /etc/slip.login, que lleva la configuración del encaminamiento que
     necesite hacerse para el usuario.

  ·  /etc/slip.tty, que será necesario sólo si está configurando el
     servidor para asignar direcciones dinámicas 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 conexión.


  7.6.1.1.  Dónde obtener sliplogin


  Puede que ya tenga el paquete sliplogin instalado como parte de su
  distribución; 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 página man.

  para asegurar que sólo son capaces de ejecutar sliplogin los usuarios
  autorizados, debería añadir 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
  sólo los usuarios que pertenezcan a ese grupo serán capaces de
  ejecutarlo. El ejemplo anterior autorizará ejecutar sliplogin sólo a
  los usuarios radio y fred.

  Para instalar los ejecutables en el directorio /sbin y la página de
  man en la sección 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 instalación, añada 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 más información.


  7.6.1.2.  Configuración de /etc/passwd  para máquinas que usan Slip.


  Lo normal es que cree algunos login especiales en el fichero
  /etc/passwd para la gente que llama con Slip. Una convención
  comúnmente aceptada es usar el nombre de la máquina que llaman
  prefijándole una letra «S» mayúscula. Por tanto, por ejemplo, si la
  máquina que llama se denomina radio, entonces podrías crear una
  entrada en /etc/passwd que se pareciese a:



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin




  Realmente no importa cómo se llame la cuenta, siempre y cuando tenga
  algún significado para usted.

  Nota: el que llama no necesita ningún directorio personal, ya que no
  se le presentará ningún intérprete de órdenes, por tanto /tmp es una
  buena elección. Observe también que se usa sliplogin en lugar de un
  intérprete de órdenes normal.


  7.6.1.3.  Configuración 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 configuración para esa persona. Es aquí donde se
  especifica la dirección ip y la máscara de red que se le asignará al
  que llama y que serán configuradas para su uso.  Las entradas para dos
  máquinas, una con configuración estática para radio y otra, con
  configuración dinámica, para la máquina albert, deberían 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 dirección ip de la máquina servidor, osea esta máquina.

  3. la dirección IP que se asignará al que llama. Si este campo se
     rellena con DYNAMIC entonces se asignará una dirección ip basada en
     la información contenida en el fichero /etc/slip.tty del que se
     habló antes.  Nota: deberá usar al menos la versión 1.3 de
     sliplogin para que esto funcione.

  4. la máscara de red asignada a la máquina que llama en notación
     decimal punteada, por ejemplo 255.255.255.0 para una máscara de red
     para una clase C.

  5. las opciones del modo slip, que le permiten activar o desactivar la
     compresión y otras características de slip. Los valores permitidos
     aquí son normal y compressed.

  6. un parámetro de timeout que especifica cuánto tiempo puede estar
     ociosa la línea (sin recibir datagramas) antes de que se desconecte
     la línea.  Un valor negativo desactivará esta característica.

  7. argumentos opcionales.

  Nota: Para los campos 2 y 3 puede usar tanto el nombre de la máquina
  como su dirección IP en notación decimal. Si usted usa nombres
  entonces tendrán que ser resueltos, esto es, su máquina deberá ser
  capaz de localizar la dirección ip de esos nombres o en caso contrario
  el guión 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 máquina ha sido capaz de encontrar
  una dirección ip para ese nombre. Si obtiene el mensaje Unknown host,
  entonces no lo consiguió. En este caso, use una dirección ip en
  notación decimal o ponga a punto la configuración de su resolutor de
  nombres. (Ver sección ``Resolución de Nombres'').


  Los modos slip más comunes son:


     normal
        para habilitar el SLIP normal sin compresión.

     compressed
        para habilitar la compresión de cabeceras de van Jacobsen
        (cSLIP)

  Por supuesto, son mutuamente exclusivos. Puede usar uno o el otro,
  pero no ambos. Para obtener más información sobre las otras opciones
  disponibles, ve a las páginas de man.


  7.6.1.4.  Configuración del fichero /etc/slip.login .


  Después 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 dirección ip y
  su máscara.

  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 genérico para una línea SLIP. sliplogin
       # lo invoca con los parámetros:
       #     $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 guión se limita a usar las órdenes ifconfig y
  route para configurar el dispositivo SLIP con su dirección ip,
  dirección ip remota y máscara de red y crea una ruta hasta la
  dirección remota a través del dispositivo SLIP. Exactamente lo mismo
  que haría si estuviera usando la orden slattach.

  Advierta también el uso de Proxy ARP para asegurar que otras máquinas
  en la misma Ethernet que la máquina servidora sabrán cómo llegar a la
  máquina que llama. El campo <hw_addr> (dirección hardware) debería ser
  la dirección hardware de la tarjeta Ethernet de la máquina. Si su
  máquina servidora no está en una red Ethernet, entonces puede eliminar
  completamente esa línea.


  7.6.1.5.  Configuración 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 más 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. También usa la orden arp para borrar
  cualquier proxy que se estableciese. De nuevo, no necesita la orden
  arp en el guión si su máquina servidora no tiene un puerto ethernet.


  7.6.1.6.  Configuración del fichero /etc/slip.tty.


  Si está usando asignación dinámica de direcciones ip (tiene
  configurada cualquier máquina 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
  asignarán a qué puerto. Sólo necesita este fichero si desea que su
  servidor asigne de manera dinámica las direcciones a los usuarios.

  El fichero es una tabla que lista los dispositivos tty que darán
  soporte a las conexiones SLIP y las direcciones ip que deberían
  asignarse a los usuarios que llaman a ese puerto.

  Su formato es como sigue:



       # slip.tty    tty -> correspondencias IP para SLIP dinámico
       # 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 dirección
  remota en el fichero /etc/slip.hosts les será asignada una dirección
  de 192.168.0.100.

  De esta manera sólo necesita asignar una dirección por puerto para
  todos los usuarios que no requieran una dirección dedicada para ellos.
  Esto le ayuda a mantener bajo mínimos los números de dirección para
  evitar su escasez.





  7.6.2.  Servidor Slip usando dip .


  Déjeme empezar diciendo que parte de la información que sigue viene de
  las páginas de manual de dip, donde se documenta brevemente la manera
  de usar Linux como servidor SLIP. por favor, preste atención, 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 operación de entrada, en el cual asigna
  automáticamente una entrada para el usuario que lo invoque y configura
  la línea serie como enlace SLIP de acuerdo con la información que
  encuentre en el fichero /etc/dipshosts. Este modo de operación 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 simbólico como sigue:



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin




  Después necesitará añadir 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 convención de
  comenzar los nombres de las cuentas SLIP con una S mayúscula, 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
       |          \_______________________________ Contraseña cifrada
       \__________________________________________ Nombre de Login del Usuario SLIP




  Después 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 automáticamente que va a
  ser usado como intérprete de órdenes de login. Cuando comienza como
  diplogin, la primera cosa que hace es usar la función 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 común, para que se
  pueda dar a un usuario una entrada en el fichero diphosts, o bien para
  que se le dé la configuración por defecto, es posible montar el
  servidor de tal manera que se pueda tener una mezcla de usuarios a los
  que se asigne la dirección de forma estática o dinámica.
  dip añadirá automáticamente 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.  Configuración del fichero /etc/diphosts


  /etc/diphosts lo usa dip para buscar configuraciones ya establecidas
  para máquinas remotas. Estas máquinas remotas pueden ser usuarios que
  llaman a la máquina Linux, o pueden ser máquinas a las que usted
  llamas desde su máquina.

  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. Dirección Remota: dirección IP de la máquina que llama, puede ser
     tanto la numérica como el nombre.

  4. Dirección Local: dirección IP de esta máquina, en número o por
     nombre.

  5. Máscara de red: en notación decimal puntuada.

  6. Campo de comentario: ponga aquí lo que quiera.

  7. protocolo: Slip, cSLIP, etc.

  8. MTU: número decimal.

  Un ejemplo de entrada en /etc/net/diphosts para un usuario SLIP remoto
  podría 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 dirección 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 dirección 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 estática deberían tener una entrada en
  /etc/diphosts.  Si quiere que los usuarios que llaman a un puerto en
  particular y, que los detalles sean asignados dinámicamente, deberá
  tener entonces una entrada para el dispositivo tty y no una basada en
  el usuario. Debería configurar al menos una entrada para cada
  dispositivo tty que usen los usuarios para asegurar que hay disponible
  para ellos una configuración adecuada independientemente al módem al
  que llamen.

  Cuando un usuario se registra recibirá las preguntas normales sobre su
  cuenta y contraseña en las que debería introducir su userid o
  contraseña de SLIP-login. Si se verifican, entonces el usuario no verá
  mensajes especiales y sólo tendrá que cambiar el modo SLIP en su
  extremo. El usuario debería ser capaz de conectar y quedar configurado
  con los parámetros 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
  sólo hace llamadas SLIP entrantes sino también llamadas salientes.  El
  paquete de Matt es una combinación de pequeños 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. Además 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 instalación 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

  Léase el fichero README y cree las entradas en /etc/passwd y
  /etc/group antes de hacer make install.


  8.  Otras tecnologías de red


  Las siguientes subsecciones son específicas a ciertas tecnologías de
  red.  La información que contienen no son válidas necesariamente para
  cualquier otro tipo de tecnología. Los conceptos están ordenados
  alfabéticamente.


  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 núcleo
  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 encapsulación Ethernet o el
  formato de paquete especificado en el RFC 1051.

  Opciones de Compilación del Núcleo:



           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 núcleo apropiadamente para admitir su
  tarjeta Ethernet, la configuración 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 más información.

  La implementación de ARCNet fue desarrollada por Avery Pennarun,
  lapenwarr@foxnet.net.


  8.2.  Appletalk ( AF_APPLETALK )


  La implementación de Appletalk no utiliza nombres especiales para sus
  dispositivos ya que usa otros ya existentes.

  Opciones de Compilación del Núcleo:



           Networking options  --->
               <*> Appletalk DDP




  Trabajar con Appletalk permite a una máquina Linux interconectar con
  redes Apple. Una utilidad importante que se saca de esto es poder
  compartir recursos tales como impresoras y discos entre una máquina
  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 distribución 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 serán instalados los ficheros. El directorio por defecto
  /usr/local/atalk suele ser una buena elección.


  8.2.1.  Configuración del software Appletalk.


  La primera cosa que tiene que hacer para que todo funcione es
  asegurarse de que están 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 configuración 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 sólo necesita una línea que da el nombre del
  dispositivo a través del cual se accede a la red donde están tus
  máquinas Apple.



       eth0




  El demonio Appletalk añadirá más detalles después de ejecutarse.


  8.2.2.  Exportación de un sistema de ficheros Linux vía Appletalk.


  Existe la posibilidad de exportar sistemas de ficheros desde una
  máquina Linux a la red para que las máquinas Apple en la red puedan
  compartirlos.

  Para hacerlo tiene que configurar el fichero
  /usr/local/atalk/etc/AppleVolumes.system. Hay otro fichero de
  configuración llamado /usr/local/atalk/etc/AppleVolumes.default, que
  tiene exactamente el mismo formato y describe qué sistemas de archivos
  recibirán los usuarios que conecten con privilegios de invitado.

  Puede encontrar todos los detalles de configuración de estos ficheros
  y qué significa cada opción en la página de manual del afpd.

  Un ejemplo sencillo podría parecerse a esto:



       /tmp Scratch
       /home/ftp/pub "Espacio Público"




  Que exportaría su sistema de ficheros /tmp como el Volumen AppleShare
  Scratch y el directorio público de FTP como el Volumen AppleShare
  Espacio Público. 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 través de Appletalk.


  Puede compartir una impresora linux con máquinas 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 máquinas Apple y meterá la tarea
  de impresión 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 definición se
  registrado con el protocolo de nombres de Appletalk, NBP.

  Un ejemplo de configuración podría ser como éste:



       TricWriter:\
          :pr=lp:op=cg:




  Que pondría a disposición de la red Appletalk la impresora TricWriter
  y todos los trabajos aceptados serían 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.  Ejecución de AppleTalk.


  Muy bien, ahora debería estar preparado para probar esta configuración
  básica.  Hay un fichero rc.atalk proporcionado con el paquete netatalk
  que debería funcionar bien, por lo que todo lo que tiene que hacer es:



       root# /usr/local/atalk/etc/rc.atalk




  y todo debería comenzar y ejecutarse bien. No debería ver mensajes de
  error y el software enviará mensajes a la consola indicando cada etapa
  según comienza.
  8.2.5.  Comprobación de AppleTalk.


  Para comprobar que el software está funcionando adecuadamente, vaya a
  una de las máquinas Apple, abra el menú Apple, seleccione el Chooser,
  pulse sobre AppleShare, y debería aparecer la máquina 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 después 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. Además, por cada directorio
     al que acceda creará un .AppleDouble bajo él de manera que pueda
     almacenar resource forks, etc. Por tanto, piénselo dos veces antes
     de exportar /, o se pasará un rato borrando después.

  ·  El programa afpd espera que las claves que vengan de los Mac estén
     sin cifrar. Esto podría ser un problema de seguridad; por tanto,
     sea cuidadoso cuando ejecute este demonio en una máquina conectada
     a Internet, o sufrirá las consecuencias si algún indeseable decide
     hacerle alguna maldad.

  ·  Las herramientas de diagnóstico existentes como netstat e ifconfig
     no soportan Appletalk. La información «en bruto» está disponible en
     el directorio /proc/net si tuviese necesidad de ella.


  8.2.7.  Si necesitase más información...



  Eche un vistazo a la página del Linux Netatalk-Howto de Anders
  Brownworth si quiere una descripción más detallada de cómo 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 implementación del Asynchronous
  Transfer Mode en Linux.  Puede obtener información 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
  núcleos 2.0.* y ax0, ax1, etc. a partir de los núcleos 2.1.*.

  Opciones de Compilación del Núcleo:




      Networking options  --->
          [*] Amateur Radio AX.25 Level 2




  Los protocolos AX25, Netrom y Rose están 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 mayoría del trabajo de implementación de estos protocolos lo ha
  hecho Jonathon Naylor, sn@cs.nott.ac.uk.


  8.5.  DECNet


  Actualmente se está trabajando en la implementación de DECNet. Debería
  aparecer en algún núcleo 2.1.* tardío.


  8.6.  FDDI


  Los nombres de dispositivo FDDI son fddi0, fddi1, fddi2, etc. A la
  primera tarjeta detectada por el núcleo 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 Compilación del Núcleo:



           Network device support  --->
               [*] FDDI driver support
               [*] Digital DEFEA and DEFPA adapter support




  Cuando tenga el núcleo compilado para trabajar con el controlador FDDI
  e instalado, la configuración de la interfaz FDDI es casi idéntica al
  de una interfaz Ethernet. Simplemente ha de especificar la interfaz
  FDDI apropiada en las órdenes ifconfig y route.


  8.7.  Retransmisión de Tramas ( Frame Relay )


  Los nombres de dispositivo Frame Relay son dlci00, dlci01, etc para
  los dispositivos de encapsulación DLCI y sdla0, sdla1, etc para los
  FRAD.

  El Frame Relay (Retransmisión de tramas) es una tecnología de red
  diseñada para ajustarse al tráfico de comunicación de datos que es de
  naturaleza «explosiva» o intermitente. La conexión a una red Frame
  Relay se realiza usando un Frame Relay Access Device (FRAD). El Linux
  Frame Relay implementa IP sobre Frame Relay según se describe en el
  RFC-1490.

  Opciones de Compilación del Núcleo:


           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 configuración.

  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 después de haber recompilado el núcleo
  necesitará las herramientas de configuración Frame Relay. Están
  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
  básicamente 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
  intérprete de órdenes tipo csh (como tcsh), el bucle for será
  diferente.

  Después de instalar las herramientas necesitará crear un fichero
  /etc/frad/router.conf. Puede usar esta plantilla, que es una versión
  modificada de uno de los ficheros de ejemplo:

























  # /etc/frad/router.conf
  # Esta es una plantilla de configuración para retransmisión de tramas.
  # Se incluyen todas las etiquetas. Los valores por defecto están basados
  # en el código proporcionado con los controladores DOS para la tarjeta
  # Sangoma S502A.
  #
  # Un '#' en cualquier parte de una línea constituye un comentario
  # Los espacios en blanco son ignorados (puede indentar con tabuladores
  # también)
  # Las entradas [] y claves desconocidas son ignoradas
  #

  [Devices]
  Count=1                 # Número 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              # Máxima 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

  #
  #
  # Configuración específica para el dispositivo
  #
  #

  #
  # El primer dispositivo es un Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Tipo del dispositivo a configurar, actualmente
                          # sólo se reconoce SANGOMA
  #
  # Estas claves son específicas 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                  # Dirección de la memoria, A0-EE, depende
  IRQ=5                   # Número de la IRQ, no especificar para la S502A
  DLCIs=1                 # Número de DLCI asociados al dispositivo
  DLCI_1=16               # Número 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 más 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 máxima 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 sólo un poco más
  complejo que la configuración de un dispositivo de red normal. Debe
  recordar activar el dispositivo FRAD antes que los dispositivos de
  encapsulación DLCI. Es mejor que ponga estas órdenes en un guión, ya
  que son muchos:



       #!/bin/sh
       # Configurar los parámetros 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 encapsulación 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 comúnmente en entornos de redes de área local
  Novell Netware(tm). Linux incluye una implementación de este protocolo
  y puede ser configurado para actuar como punto final en una red, o
  como encaminador de IPX.

  Opciones de Compilación del Núcleo:



           Networking options  --->
               [*] The IPX protocol
               [ ] Full internal IPX network




  Los protocolos IPX y el NCPFS están 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 Compilación del Núcleo:



           Networking options  --->
               [*] Amateur Radio AX.25 Level 2
               [*] Amateur Radio NET/ROM




  Los protocolos AX25, Netrom y Rose están cubiertos en el AX25 Howto.
  Estos protocolos los usan Operadores de Amateur Radio de todo el mundo
  en la experimentación de packet radio.

  La mayoría del trabajo de la implementación 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 núcleos
  2.1.*. Rose está disponible a partir de los núcleos 2.1.*.

  Opciones de Compilación del Núcleo:



           Networking options  --->
               [*] Amateur Radio AX.25 Level 2
               <*> Amateur Radio X.25 PLP (Rose)




  Los protocolos AX25, Netrom y Rose están cubiertos por el AX25 Howto.
  Estos protocolos los usan Operadores de Amateur Radio de todo el mundo
  en la experimentación de packet radio.

  La mayoría del trabajo de la implementación de estos protocolos lo ha
  hecho Jonathon Naylor, jsn@cs.nott.ac.uk.


  8.11.  Soporte SAMBA - NetBEUI, NetBios.


  SAMBA es una implementación del protocolo Session Management Block.
  Samba permite que los sistemas de Microsoft (y otros) monten y usen
  sus discos e impresoras.

  SAMBA y su configuración 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 Compilación del Núcleo:



           Network device support  --->
               [*] Network device support
               ....
               [*] Radio network interfaces
               < > STRIP (Metricom starmode radio IP)




  STRIP es un protocolo diseñado específicamente para un rango de radio-
  módems Metricon para un proyecto de investigación 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 tecnología
  de espectro amplio y suelen ser capaces de alcanzar los 100kbps. Hay
  información disponible acerca de las radios Metricon en el servidor
  Web de Metricon http://www.metricom.com.

  En estos momentos las herramientas y utilidades estándar 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á están disponibles en la
  página de MosquitoNet sobre STRIP
  http://mosquitonet.Stanford.EDU/strip.html.

  En resumen de la configuración, use un programa slattach modificado
  para establecer STRIP como la disciplina de línea de un dispositivo
  serie tty y entonces configurar el dispositivo st[0-9] resultante
  igual que haría con uno Ethernet con una excepción importante: por
  razones técnicas, STRIP no soporta el protocolo ARP, por lo que deberá
  configurar manualmente las entradas ARP de cada una de las máquinas en
  la subred.  Esto no debería 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 estándar de IBM
  que evita colisiones proporcionando un mecanismo que permite que sólo
  una de las estaciones en la red tenga en un momento determinado
  derecho a transmitir. Una estación 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 estación.  El testigo traza un bucle entre todas las
  estaciones activas, de ahí el nombre de «Anillo con Testigo».

  Opciones de Compilación del Núcleo:



           Network device support  --->
               [*] Network device support
               ....
               [*] Token Ring driver support
               < > IBM Tropic chipset based adaptor support



  La configuración de un anillo con testigo es idéntica a la de una
  Ethernet con la excepción del nombre de los dispositivos a configurar.


  8.14.  X.25


  El X.25 es un protocolo de circuitos basados en conmutación de
  paquetes definido por el C.C.I.T.T. (una organización de estándares
  reconocida por compañías de Telecomunicaciones en la mayor parte del
  mundo). En estos momentos está en funcionamiento una implementación de
  X.25 y LAPB y los núcleos 2.1.* más 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, envíe 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
  configuración 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 Compilación del Núcleo:



       Network device support  --->
           [*] Network device support
           ....
           [*] Radio network interfaces
           ....
           <*> WaveLAN support




  La tarjeta WaveLAN es una tarjeta de red LAN inalámbrica de amplio
  espectro. La tarjeta se parece bastante en la práctica a una tarjeta
  Ethernet y se configura de la misma manera.

  Puede obtener información 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 máquinas Linux.
  Los siguientes diagramas de cableado deberían serles de ayuda.


  9.1.  Cable serie Módem NULO (NULL Modem)


  No todos los cables Módem NULO son iguales. Muchos cables módem nulo
  hacen poco más que un pequeño truco para que el ordenador crea que
  están presentes todas las señales apropiadas, cruzando los cables de
  transmisión y recepción. 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 señalización posible entre las máquinas 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 máquinas, 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 metálico, debería
     estar conectado a la carcasa DB-25 en sólo uno de los extremos.


  Cuidado: Un cable PLIP mal hecho puede destruir la tarjeta
  controladora. Sea muy cuidadoso y examine dos veces cada conexión para
  asegurarse de que no va a hacer más trabajo ni a llevarse más infartos
  de lo necesario.

  Aunque puede que sea capaz de tener cables PLIP para grandes
  distancias, debería 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
  electromagnéticos fuertes, como los rayos, cables de corriente y
  emisoras de radio pueden interferir en los controladores, y a veces
  dañarlos. Si realmente quiere conectar dos ordenadores a larga
  distancia, debería 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 estándar de cableado Ethernet que especifica el uso de
  cables coaxiales de 52 ohmios con un diámetro de alrededor de 5
  milímetros. Hay un par de reglas importantes a recordar cuando
  conectemos máquinas 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 señal es
  absorbida y no reflejada cuando alcanza el final del cable. Sin un
  terminador a cada extremo del cable, podría pasar que la Ethernet sea
  ineficiente o que no funcione.  Normalmente debería usar conectores en
  «T» para interconectar las máquinas 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». Debería hacer que la longitud del cable
  entre la T y el PC lo más corto posible ya que, idealmente, la «T»
  debería estar directamente enchufada a la tarjeta Ethernet.


  9.4.  Cable Ethernet de Par Trenzado


  Si tiene sólo 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 cómo
  hacerlo incluido en el Ethernet Howto


  10.  Glosario de Términos usados en este documento


  La siguiente lista contiene algunos de los términos más importantes
  usados en este documento.

     ARP
        Es un acrónimo para del Protocolo de Resolución de Direcciones
        (Address Resolution Protocol) y es la manera en que asocia una
        máquina de red una dirección IP con una dirección hardware.


     ATM
        Es un acrónimo de Modo Asíncrono de Transferencia (Asynchronous
        Transfer Mode). Una red ATM empaqueta los datos en bloques de
        tamaño estándar que puede transportar eficientemente de un punto
        a otro. ATM es una tecnología 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 ejecutándose en una máquina 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 conexión 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 básica de transmisión a
        través de una red IP. Puede que lo haya oído llamar «paquete».


     Dirección hardware
        Es un número que identifica de forma unívoca una máquina en una
        red física en la capa de acceso al medio. Algunos ejemplos son
        las Direcciones Ethernet y las Direcciones AX.25.


     Dirección IP
        Es un número que identifica unívocamente una máquina TCP/IP en
        la red. La dirección es de 4 bytes de longitud y normalmente se
        la representa en notación 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 conexión virtual punto a punto en particular a
        través de una red de Retransmisión de Tramas. Los DLCI los suele
        asignar el proveedor de red de Retransmisión de Tramas.


     ISP
        Véase PSI.


     MSS
        El Tamaño Máximo de Segmento (Maximum Segment Size) es la mayor
        cantidad de datos que pueden ser transmitidos a la vez. Si
        quiere prevenir la fragmentación, el MSS debería ser igual al
        MTU de la cabecera IP.


     MTU
        La Máxima Unidad de Transmisión (Maximum Transmission Unit) es
        un parámetro que determina el mayor datagrama que puede ser
        transmitido por una interfaz IP sin necesidad de dividirlo en
        unidades más pequeñas. La MTU debería ser más grande que el
        mayor datagrama que desee transmitir sin fragmentar. Fíjese que
        esto sólo previene la fragmentación de manera local, algunos
        otros enlaces por el camino pueden tener una MTU más pequeña 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 acrónimo de Proveedor de Servicios de Internet (ISP -
        Internet Service Provider). Son organizaciones y compañías que
        proporcionan conectividad con Internet.


     RDSI
        Es un acrónimo de Red Digital de Servicios Integrados (ISDN en
        inglés). La RDSI proporciona medios estandarizados por los
        cuales las compañías de Telecomunicaciones pueden llevar
        información tanto de voz como de datos según las premisas de los
        abonados. Técnicamente la RDSI es una red de circuitos de
        paquetes conmutados.


     Retransmisión de tramas
        La retransmisión de tramas (o Frame Relay) es una tecnología de
        red idealmente preparada para transportar tráfico que es de
        naturaleza esporádica o a ráfagas. Los costes de red se reducen
        compartiendo varios abonados a la retransmisión de tramas la
        misma capacidad de red y dejándoles a ellos el deseo de usar la
        red en momentos ligeramente diferentes.


     ruta
        La ruta es el camino que siguen los datagramas a través 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 algún
        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 propósitos de PSI entonces le
  recomiendo que eche un vistazo a la página principal de Linux ISP
  http://www.anime.net/linuxisp si quiere obtener una buena lista de
  enlaces a la información que pudiera necesitar.





  12.  Reconocimientos


  Me gustaría dar las gracias a las siguientes personas por su
  contribución a este documento (no están 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 también reconocer el trabajo de Fernando Tricas,
  por su inestimable ayuda en el proceso de revisión 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 documentación 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, encargándose de las traducciones al castellano de los Howtos,
  así como de la producción de documentos originales en aquellos casos
  en los que no existe análogo en inglés, centrándose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Diríjase a la sede del Insflug para más información al respecto.

  En ella encontrará siempre las últimas versiones de las traducciones
  «oficiales»:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  en los que estamos trabajando incesantemente.

  Ponga su granito de arena; si detecta una errata o incorrección en
  este documento, por favor, diríjase a
  http://www.insflug.org/documentos/Redes-En-Linux-Como/ y aporte su
  sugerencia o errata en línea.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  «Cartel» Insflug, cartel@insflug.org.


























































  Reproducción De Sonido COMO
  Yoo C. Chung http://laplace.snu.ac.kr/~wacko/,
  wacko@laplace.snu.ac.kr
  Traducción: Fernández 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.      Prólogo

  2.      Introducción

  2.1.    Copyright de este documento

  2.2.    Copyright de las aplicaciones listadas

  2.3.    Dónde conseguir este documento

  2.4.    Comentarios

  2.5.    Agradecimientos

  3.      Reproducción de diversos formatos de sonido

  3.1.    MIDI

  3.1.1.  El conjunto adagio

  3.1.2.  TiMidity

  3.1.3.  playmidi

  3.2.    Módulos

  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.  Prólogo

  La traducción de este documento se inscribe dentro del proyecto
  INSFLUG.  La última revisión se realizó el 30/5/98.

  2.  Introducción

  Esto es el Reproducción-De-Sonido COMO. Contiene una lista de los
  diversos formatos de sonido y de las aplicaciones que pueden ser
  usadas para reproducirlos. Además lista algunos trucos y consejos
  referentes al uso de estas aplicaciones. También describe algunas
  aplicaciones relacionadas con el sonido pero no directamente con su
  reproducción. Sin embargo, este documento no describe cómo 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 cómo configurar un sistema Linux para
  tener sonido e información 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 exóticas como la síntesis de voz, o
  información 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
  (apreciaría que se me las notificara), siempre y cuando esta nota de
  copyright sea conservada. Sin embargo, ninguna otra restricción
  adicional podrá ser aplicada y cualquier trabajo derivado de éste debe
  tener el mismo copyright. Algún crédito debe ser acordado donde sea
  necesario.

  2.2.  Copyright de las aplicaciones listadas

  Si no se menciona ningún copyright, la aplicación está sometida a la
  Licencia GNU General Public License.

  2.3.  Dónde conseguir este documento

  La versión oficial (en inglés) más reciente de este documento puede
  ser obtenida del Linux Documentation Project,
  http://sunsite.unc.edu/mdw/linux.html. La versión no oficial más
  reciente puede ser obtenida de http://laplace.snu.ac.kr/~wacko/howto/.

  Una versión en coreano de este documento (un poco desfasada) está
  disponible en http://plaza.snu.ac.kr/~wacko/howto/Sound-Playing-
  HOWTO.ks.

  Una versión en japonés de este documento está disponible en
  http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Sound-Playing-HOWTO.euc.

  La última versión Oficial (INSFLUG) en español del documento que está
  leyendo estará siempre en http://www.insflug.org, y en la página 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
  documentación tiende a quedarse desfasada. Por lo tanto, si encuentra
  algo incorrecto, por favor envíeme a wacko@power1.snu.ac.kr cualquier
  corrección. Las Sugerencias o adiciones a este documento serán
  bienvenidas.

  2.5.  Agradecimientos

  A todos los autores de las aplicaciones descritas en este COMO.
  También a Hannu Savolainen por el estupendo controlador de sonido y a
  Linus Torvalds por el gran SO que lo soporta.  Querría dar las gracias
  a Raymond Nijssen (raymond@es.ele.tue.nl), Jeroen Rutten
  (jeroen@es.ele.tue.nl), Antonio Pérez (aperez@arrakis.es), Ian Jackson
  (ijackson@gnu.ai.mit.edu), y Peter Amstutz (amstpi@freenet.tlh.fl.us)
  por sus informaciones y ayuda.

  3.  Reproducción de diversos formatos de sonido

  Hay muchos tipos de formatos de sonido (WAV, MIDI, MPEG, etc...). A
  continuación 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 extensión .mid.  Contienen información de
  secuenciado, es decir, acerca de cuándo tocar qué instrumento y de qué
  forma, etc.  Según 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
  línea de comandos) y xmp (un reproductor de ficheros basado en XView).
  Necesitará las extensiones SlingShot para usar xmp.  También contiene
  otros programas para reproducir partituras de Adagio.

  Si tiene una GUS, mp puede reproducir ficheros MOD (véase la sección
  ``Módulos'' para más información).

  Un pequeño y molesto fallo (en la versión 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'. También arranca de forma
  relativamente lenta.

  El programa no contiene ninguna información 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 interpretación estricta de la ley de
  copyright, nada nos da el derecho de hacer estas cosas, pero no creo
  que ésta fuese la intención del autor.)

  Existe una versión del CMU MIDI Toolkit para Linux (aunque hay
  suficientes adiciones como para que no sea una simple conversión) 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 incluídos están en formato a.out (enlazados con
  librerías antiguas) y el fichero xmp da un fallo de segmentación 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 maña para compilarlo. Realmente, no es muy
  difícil.  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 librería flex, que no es enlazada por defecto. Siga a
  continuación las instrucciones de instalación. 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 conversión a formato WAV y después reproduce este
  último (también puede convertir un fichero MIDI en un WAV sin
  reproducirlo si lo desea). Esta es la razón de su uso intensivo de la
  CPU.

  También 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 más información.

  El autor es Tuukka Toivonen, tt@cgs.fi).

  La última versión de timidity puede ser encontrada en
  http://www.cgs.fi/~tt/timidity/.  Esta página también contiene un
  enlace a una pequeña librería de parches para GUS. La versión 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 más rápidamente que otros. También es
  capaz de reproducir ficheros Creative Music, Microsoft RIFF y ficheros
  MIDI de gran tamaño de juegos como Ultima 7.

  Tiene una interfaz bajo X y otra para SVGA. También tiene una opción
  para reproducción en tiempo real siguiendo todas las notas en cada
  canal y la velocidad de reproducción (incluido automáticamente con
  xplaymidi y splaymidi).

  Debería 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 próximamente.

  Ha sido realizado por Nathan Laredo, laredo@gnu.ai.mit.edu o
  laredo@ix.netcom.com).

  Puede ser obtenido por FTP anónimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/playmidi-2.3.tar.gz

  3.2.  Módulos

  Los módulos (en el campo de la música por ordenador) son ficheros de
  música digital, compuestos de un conjunto de muestras y de información
  de secuenciado, que indican al reproductor cuándo 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 están en
  el módulo.  Una desventaja que tiene es que es mucho más grande que
  MIDI. Además, no tiene ningún formato estándar (el único verdadero es
  el ProTracker, con el que muchos módulos no son compatibles). Apareció
  en el Amiga.

  Normalmente tienen la extensión .mod. Hay muchas otras extensiones
  dependiendo de en qué formato estén.

  3.2.1.  tracker

  Este programa portable (ha sido portado a muchas plataformas)
  reproduce módulos de música SoundTracker y ProTracker. Usa solamente
  salida de 16 bits en estéreo, y considero que la calidad es muy buena.
  Si necesita una forma simple de reducir el uso de la CPU, use la
  opción -mono.

  Es un programa giftware citando al autor, Marc Espie,
  Marc.Espie@ens.fr).

  Puede encontrar una versión 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 módulos 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 versión 3.0 o posterior de el controlador de sonido. Y una
  GUS, por supuesto. Tal vez tenga que modificar el núcleo para hacer
  que el control de volumen funcione de la forma deseada.

  Tiene una interfaz X. Usa las librerías QT (versión 0.99 o superior).
  Vea http://www.troll.no/ para información 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 anónimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/gmod+x-3.0.1.tgz

  3.2.3.  MikMod

  Este reproductor de módulos reconoce los formatos XM, ULT, STM, S3M,
  MTM, MOD y UNI. (El formato UNI es uno interno usado por MikMod).
  Soporta los módulos comprimidos. Usa sonido estéreo de 16 bits como
  salida. Use la opción -m (para sonido monoaural) si necesita una forma
  sencilla de reducir el uso de la CPU.

  La versión para Unix usa ncurses o Tcl/Tk para su interfaz.  También
  puede ser usado como una librería, y no sólo 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.  También necesita permiso para distribuirlo
  comercialmente (la distribución no comercial no lo necesita).

  La versión para Unix puede ser encontrada en
  http://www.aics.net/~amstutz/mikmod.html.

  3.2.4.  xmp

  Éste es un reproductor de módulos (no confundir con el xmp de Adagio)
  que puede reproducir MOD, S3M, STM, 669, y módulos XM (otros formatos
  también son soportados, pero aún están en fase experimental o
  incompletos) en tarjetas de sonido con tabla de síntesis de ondas (GUS
  o SoundBlaster 32AWE), o en sistemas con SoftOSS (un controlador de
  síntesis wavetable por software), En un futuro próximo la salida
  ordinaria DSP debería ser posible igualmente.

  También 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 módulos MOD de 4/6/8 pistas y módulos de Scream Tracker 3.
  Usa salida monoaural de 8 bits con una frecuencia de muestreo de 22000
  Hz por defecto. Puede usar la opción -s para usar estéreo, -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
  (algún ruido), así que recomiendo el uso de tracker en vez de s3mod
  para reproducir ficheros MOD comunes (a menos que tenga una máquina
  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 anónimo 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 también módulos comprimidos si tiene gzip, lharc, unzip, o unarj
  instalados. No puede reproducir módulos Powerpack, o los comprimidos
  mediante ciertos compositores de Amiga (firma "PACK").
  Requiere al menos la versión 3.0 del controlador de sonido. No
  funcionará con la versión 2.90-2 o anteriores. La interfaz de texto
  requiere ncurses. También 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 anónimo en
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/mod-v0.81.tgz

  3.2.7.  nspmod

  Éste es un reproductor de módulos en fase alpha que puede reproducir
  módulos MTM, S3M y MOD. Se supone que es un reproductor de módulos
  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 función que permite que los módulos se reproduzcan en bucles
  si así lo especifican. El número de bucles puede ser limitado mediante
  la opción -l.  Tan solo usa 8 bit en la salida de sonido (en la
  versión 0.1).

  Ha sido escrito por Toru Egashira, toru@jms.jeton.or.jp.

  Puede ser encontrado por ftp anónimo 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 módulos
  de 4 canales usando el mínimo de recursos de la CPU. No fue diseñado
  para producir sonido de alta calidad. Así que sólo produce sonido de
  22 kHz en monoaural.  Además, la salida no es tan "limpia" como
  debería, lo que refleja su condición 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 estándar que especifica la codificación de video y del
  audio asociado para almacenamiento digital. MPEG está normalmente
  asociado al video, pero la parte de audio del estándar puede ser usada
  por separado.

  Ésta define tres niveles: nivel I, II, y III.  Los reproductores que
  pueden decodificar los niveles superiores también 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 extensión .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 compresión del sonido es bastante buena. Un fichero de
  tipo MPEG II de dos megabytes ocuparía 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
  código de muchas fuentes. Es capaz de reproducir en tiempo real flujos
  leídos 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 inclusión en una colección de software
  libre (como en imágenes de CD-ROM de servidores FTP) está
  explicitamente permitida.

  La última versión puede ser obtenida de http://www.heim3.tu-
  clausthal.de/~olli/mpg123/.

  3.3.2.  maplay 1.2

  Este reproductor de audio MPEG tan sólo soporta los niveles I y II.
  Carece de soporte para el nivel III en la versión 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 estéreo por defecto.

  Un ligero cambio en uno de los ficheros puede ser necesario para
  compilarlo. Necesitará añadir la línea siguiente al comienzo del
  fichero configuration.sh.

       #! /bin/sh

  maplay 1.2 puede ser obtenido por ftp anónimo de ftp://ftp.cs.tu-
  berlin.de/pub/multimedia/maplay1.2/maplay1_2.tar

  3.3.3.  maplay 1.3b

  Esta es una modificación 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 anónimo 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. Añade soporte para audio MPEG de nivel
  III. En estos momentos parece tener ciertos fallos en su reproducción
  (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 anónimo 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).  Añade soporte para audio MPEG de nivel III.
  También puede reproducir ficheros WAV. Además, es capaz de reproducir
  audio recibido a través de una conexión HTTP.

  Otra característica de splay es que puede ser usado como una librería
  (bajo la LGPL), así que puede ser usado en otros programas. También
  intenta mejorar el rendimiento usando threading (necesita pthreads
  para usar esta característica) y un poco de ensamblador.

  splay usa una interfaz de línea de comando y opcionalmente una
  interfaz bajo X (que usa QT).

  Si después de compilarlo no funciona (por ejemplo, da fallos de
  segmentación), 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 gráfica. Está
  basado en splay, así que incluye soporte para MPEG de nivel I, II y
  III.  También puede reproducir audio MPEG en tiempo real, mediante una
  conexión HTTP. Es además fácil de configurar.

  Usa las librerías QT, http://www.troll.no/ (al menos la versión 1.2).
  También usa la librería LinuxThreads,
  http://pauillac.inria.fr/~xleroy/linuxthreads/ (el binario incluido
  sólo funciona con la versión 0.5).

  El autor es Joel Lindholm, wizball@kewl.campus.luth.se.

  La última versión puede obtenerse por
  ftp://kewl.campus.luth.se/pub/jukebox.

  3.3.7.  amp

  Este reproductor MPEG beta sólo 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. También 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á explícitamente 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 librería alpha fue escrita para ser una implementación rápida de
  una librería de descompresión MPEG para varias interfaces gráficas.
  Soporta audio MPEG de nivel I, II y III. Puede acceder aleatoriamente
  al flujo de audio. Se incluye una interfaz de línea de comandos, al
  igual que una bajo Motif (Lesstif)  en la versión para Linux.

  Es de Gilles Boccon-Gibod, Alain Jobart y otros. Las interfaces para
  la librería pueden ser descargadas libremente. La librería en sí debe
  ser licenciada para usarla (una licencia para código fuente y binarios
  también está disponible).

  Las interfaces de la librería 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
  versión 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á sólo 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 opción -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 rápido (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 estéreo).

       $ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 -

  El número tras -r es la frecuencia de muestreo de audio, y el número
  tras -c depende de si es mono o estéreo (o incluso tetrafónico). Si
  esto parece muy complicado, o incómodo de usar continuamente, puede
  crearse algo como un script o un alias.

  Este es shareware con copyright de Fraunhofer-IIS. Hay disponible una
  versión de evaluación para Linux (sistemas x86) por ftp anónimo en
  ftp://ftp.fhg.de/pub/layer3  Sólo convierte audio MPEG de nivel III.

  3.4.  WAV

  Cita de la página 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 computación que simplemente tenía
       que tener su propio formato de fichero de sonido.

  Normalmente tienen la extensión .wav.

  Vea también la sección ``sox'' y ``bplay'' para otros reproductores de
  WAV aparte de los listados aquí.

  3.4.1.  wavplay

  Este programa tiene una interfaz de línea de comandos y otra para X
  Window para reproducir y grabar en formato WAV. Usa locking así que
  sólo un sonido puede ser reproducido a la vez. Su capacidades de
  locking pueden ser usadas separadamente de las de reproducción de
  sonido.

  Además de su interfaz de línea de comandos, también tiene una para
  Motif, que puede ser usada con Lesstif.

  Fue originalmente escrito por Andre Fuechsel, af1@irz.inf.tu-
  dresden.de, y la implementación actual es de Warren W. Gay,
  bx249@freenet.toronto.on.ca o mailto:wwg@ica.net.

  Se puede obtener via ftp anónimo 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. También tiene una intefaz para X
  Window para reproducir y grabar en formato WAV. Sin embargo, también
  tiene ciertas capacidades de edición y puede añadir efectos.

  Todavía tiene fallos, así que el autor apreciaría cualquier informe de
  fallo, correcciones, o nuevo código.

  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 sección lista programas que reproducen sonido y que no merecen
  una sección aparte (es decir, formatos para los que sólo 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 aplicación 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, según 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 pequeño
  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
  propósito.

  Puede encontrarse por ftp anónimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/Lsox-linux.tar.gz.

  Una versión más reciente de Chris Bagwell,
  cbagwell@mwsun026.aud.alcatel.com, está basado en la última versión
  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. También puede
  grabar a estos ficheros. Usa varias técnicas para lograr la máxima
  velocidad posible, así que puede ejecutarse aceptablemente incluso en
  máquinas lentas. Una de esas técnicas requiere que los programas
  instalados sean setuid root. Los paranoicos que quieran usarlo podrán
  querer el paquete Debian de Ian Jackson, ijackson@gnu.ai.mit.edu, que
  desconecta la característica que necesita el bit setuid.

  El autor es David Monro, davidm@gh.cs.usyd.edu.au.

  Puede obtenerse por ftp anónimo 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,
  comúnmente llamado SID) y la unidad de micro procesador (MOS 6510) del
  Commodore 64.  Por ésto, es capaz de cargar y ejecutar programas en
  código máquina de C64 que producen música o sonido. En general estos
  fragmentos de código y datos han sido extraídos de juegos y programas
  de demostración que han sido transferidos directamente desde el C64.

  Usa una interfaz de línea de comandos por defecto. También hay
  interfaces para Tk y QT disponibles separadas desde la página
  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 través de Internet
  sin descargar el fichero completo antes. Puede ser usado solo, pero
  está realmente diseñado para ser usado con un navegador web (los
  explícitamente soportados son Mosaic y Netscape). No puede ser usado
  sin X (no sería 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
  página de RealAudio, http://www.realaudio.com/.

  3.5.5.  cat

  Uno podría preguntarse qué tiene que ver cat, la utilidad de
  concatenación, con la reproducción de sonidos. Mostraré su uso a
  través 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 sección no tiene nada que ver con la reproducción de sonido. Más
  bien, es una colección de algunas utilidades que pueden ser útiles.

  4.1.  volume

  Es una interfaz de línea de comandos para controlar el volumen (¿que
  otra cosa podría ser?). También 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á
  también 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 aplicación Tcl/Tk que soporta reproducción, grabación y
  edición de sonido digital mediante sox.  Incluye sox en la
  distribución 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 envía 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 línea 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 música 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 código 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 anónimo de
  ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tmusic-1.0.tar.gz

  5.  Referencias

  1. La documentación incluida con las aplicaciones referenciadas en
     este documento.

  2. El Sonido En Linux - COMO, disponible en el INSFLUG, vea la sección
     ``''.

  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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 Cárdenes 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),
  también llamado NetBIOS o LanManager.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Más Información

  3.      Instalación

  4.      Ejecutando los demonios

  5.      Configuración General ( /etc/smb.conf )

  6.      Compartiendo Una Unidad Linux Con Máquinas Windows

  7.      Compartiendo Una Unidad Windows Con Máquinas Linux

  8.      Compartiendo Una Impresora Linux Con Máquinas Windows

  9.      Compartiendo Una Impresora Windows Con Máquinas Linux

  10.     Copyright

  11.     Reconocimientos

  12.     Notas sobre/del traductor

  13.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Este el es SMB COMO. Describe cómo usar el protocolo Session Message
  Block (SMB), también llamado protocolo NetBIOS o LanManager, con el
  Linux.

  Este documento es mantenido por David Wood (dwood@plugged.net.au).
  Cualquier añadido, modificación o corrección 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 máquinas 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 máquinas Windows.

  2. Compartir una unidad de Windows con máquinas Linux.

  3. Compartir una impresora de Linux con máquinas Windows.

  4. Compartir una impresora de Windows con máquinas Linux.

  Todos estos puntos están 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 información que aquí se da. Si te
  encuentras en tal situación, puedes mandar un e-mail al autor con
  sugerencias para mejorar este documento, pero el autor no garantiza
  nada. ¿Qué esperabas? El autor también es un experto, después de
  todo...

  2.  Más Información

  Este COMO intenta explicar la configuración de servicios SMB básicos
  de ficheros e impresoras en una máquina Linux. Samba es un paquete muy
  complejo y completo.  No debería haber razón para duplicar toda la
  documentación de Samba aquí.

  Para mayor información, por favor lee alguno de estos documentos:

  ·  La documentación de Samba, disponible en el paquete de distribución
     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.  Instalación

  La última versión del código de Samba está disponible en:

  ftp://nimbus.anu.edu.au/pub/tridge/samba/

  De todas maneras, si has instalado la distribución RedHat de Linux,
  tienes la opción de instalarlo como paquete. Algunas otras
  distribuciones también 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 localización (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 máquinas UNIX SVR4)

  ·  smbstatus       (Lista de las conexiones SMB en marcha en el
     servidor local)

  ·  smbrun          (Un script 'cola' para facilitar la ejecución 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
  código fuente del servidor que nombramos antes, y lee el fichero
  README de la distribución.  Hay también un fichero llamado
  docs/INSTALL.txt en la distribución que te da un sencillo conjunto de
  instrucciones paso a paso.

  Siguiendo con la instalación, pon los demonios en /usr/sbin y los
  ejecutables en /usr/bin. Instala las páginas del manual en
  /usr/local/man.

  Cuando compiles el paquete Samba, deberías especificar en el Makefile
  la localización del fichero de configuración, smb.conf. Generalmente
  debería estar en /etc, pero puedes ponerlo donde quieras. A estas
  alturas, presumimos que especificaste la localización del fichero de
  configuración 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 configuración, smb.conf. Ve al directorio donde
  se compiló el Samba. Mira en el directorio examples/simple y lee el
  fichero README. En ese directorio encontrarás el fichero smb.conf.
  Cópialo en /etc. ¡TEN CUIDADO! Si tienes una distribución de Linux que
  tiene el Samba instalado ya, puede que ya tengas un fichero de
  configuración en /etc. Probablemente deberías usar el antiguo.

  Si no quieres que tu configuración esté en /etc, ponla donde quieras y
  luego pon un enlace simbólico 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 estás configurando un servidor de ficheros
  permanente, deberían 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 administración 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 líneas en
  el fichero de configuración de inetd, /etc/inetd.conf:

           # Servicios SAMBA NetBIOS (para compartición 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 líneas en /etc/rc.d/init.d/smb y hazle un enlace simbólico
  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.  Configuración General ( /etc/smb.conf )

  La configuración de Samba en un Linux (u otra máquina 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 'direccionarán' la compartición de
  unidades e impresoras de Linux con máquinas Windows, el fichero
  smb.conf mostrado en esta sección es lo más simple posible, solo para
  propósitos introductorios.

  No te preocupes por los detalles, aún. Otras secciones más adelante
  introducirán los conceptos más importantes.

  Cada sección del fichero empieza con una cabecera como [global],
  [impresoras], etc.

  La sección [global] define unas pocas variables que Samba usará para
  definir la compartición de todos los recursos.

  La sección [homes] permite a los usuarios remotos acceder a sus
  respectivos directorios principales en la máquina Linux local (cada
  uno al suyo nada más). Esto es, si un usuario de Windows intenta
  conectar a este recurso desde su máquina Windows, será conectado a su
  directorio personal. A tener en cuenta que para hacer esto, tiene que
  tener una cuenta en la máquina Linux. ;-)

  El fichero smb.conf que viene debajo como ejemplo permite a los
  usuarios remotos acceder a su directorio principal en la máquina local
  y escribir en un directorio temporal. Para que un usuario de Windows
  vea estos recursos, la máquina 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.

  Fíjate que en las siguientes secciones, se darán entradas adicionales
  a este fichero para permitir la compartición de más 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 Máquinas Windows

  Como se muestra en el fichero smb.conf anterior, compartir una unidad
  Linux con usuarios Windows es fácil. De todas maneras, como todo lo
  demás 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
  sección [tmp] añadiendo 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 sólo 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 documentación de Samba o las páginas del man.

  7.  Compartiendo Una Unidad Windows Con Máquinas Linux

  Se incluye un programa cliente de SMB para máquinas UNIX con la
  distribución de Samba. Provee un interfaz estilo ftp para la línea de
  comandos. Puedes usar esta utilidad para transferir ficheros entre un
  'servidor' Windows y un cliente unix.

  Para ver qué recursos están disponibles en un host dado, ejecuta:

           /usr/sbin/smbclient -L host

  donde 'host' es el nombre de la máquina 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 máquina.

  Por ejemplo:

           smbclient -L zimmerman

  La salida de este comando debería 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 máquina y un servicio. Por ejemplo, si estás
  intentando entrar en un directorio que ha sido compartido como
  'public' en una máquina llamada zimmerman, el servicio debería
  llamarse \\zimmerman\public. De todas maneras, debido a restricciones
  del shell, necesitarás 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 deberías necesitar las páginas del man del
  smbclient.

  8.  Compartiendo Una Impresora Linux Con Máquinas Windows

  Para compartir una impresora Linux con máquinas Windows, necesitas
  asegurarte de que la impresora está preparada para trabajar bajo
  Linux. Si puedes imprimir desde Linux, preparar una 'compartición' SMB
  de la impresora es automático.

  Mírate el COMO Imprimir (Printing HOWTO) para poner a punto la
  impresora con Linux.

  Como el autor usa una impresora conectada a una máquina Windows NT,
  esta sección no debería 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 sección
  pueda ser completada.

  Añade la configuración 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

  ______________________________________________________________________

  ¡Asegúrate 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 máquinas Windows NT usando Samba. Un problema es que NT 'vea' la
  impresora compartida correctamente. Para conseguirlo, mírate las notas
  en la distribución de Samba en el fichero docs/WinNT.txt. El otro va
  con problemas con las claves. Mírate 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 Máquinas Linux

  Para compartir una impresora en una máquina 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 distribución de ejecutables del Samba. Más 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 más sencillas
  teniendo un front end fácil de usar. Más 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 máquina local)
          af - el fichero de cuentas
          mx - el tamano maximo del fichero (cero es ilimitado)
          if - nombre del fichero de entrada (script)

  ______________________________________________________________________

  Para más información, lee el COMO Imprimir (Printing HOWTO) o la
  página 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:

       ______________________________________________________________________

  Asegúrate de que los directorios de spool y cuentas existe y se puede
  escribir en ellos. Asegura también que la línea '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 distribución de las fuentes del
  Samba, pero está ausente de algunas distribuciones de ejecutables, por
  lo que lo he recreado aquí.

  Te podría interesar mirarlo con cuidado. Hay algunas pequeñas
  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 mayoría de las distribuciones de Linux vienen con el nenscript para
  convertir los documentos ASCII a Postscript. El siguiente script perl
  hace la vida más fácil dando un interfaz sencillo para que linux
  imprima a través 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 líneas demasiado largas cuando imprime
  ficheros ASCII. Este rompe las líneas largas donde haya un espacio en
  blanco (en lugar de en mitad de una palabra), si es posible.

  El formateado de código 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). Además enumera las líneas. Usándolo como
  ejemplo, se pueden lograr otros tipos de formateado.

  Los documentos Postscript también 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 parámetro

                  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 línea.

  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 sábado 9 de
  noviembre de 1996). Para que veáis que aquí nos damos prisa con las
  cosas y que esto va rápido.

  Ricardo Cárdenes es un simple estudiante de la E.U. de Informática en
  la ULPGC (Universidad de Las Palmas de Gran Canaria).

  Ahora mismo está en su tercer año 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 prácticas de S.
  Operativos en mitad del segundo curso (hasta ahora no se ha
  arrepentido)

  Cualquier donación para la compra de un nuevo disco duro y poder
  rebajar el 88-95% de ocupación que se mantiene constantemente en las
  particiones, y así poder dedicarse con más holgura a la traducción 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 extrañas razones de la
  vida (por ejemplo, una donación para su nuevo disco duro 8-))))),
  podéis dejarle un mensaje aquí: a1402@correo.dis.ulpgc.es

  13.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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, traducción del 2 Junio 1997

  Este documento describe cómo configurar los dispositivos de comuni­
  cación serie en una máquina Linux.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Copyright

  1.2.    Nuevas versiones de este documento

  1.3.    Realimentación

  1.4.    Renuncia de responsabilidad

  2.      Hardware serie soportado

  2.1.    Placas serie normales de PC

  2.2.    Módems 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.      ¿Cuáles son los nombres de los puertos serie?

  3.1.    Números de dispositivo mayor y menor de los puertos serie en
  /dev

  3.1.1.  Creación de dispositivos en /dev

  3.2.    Notas sobre placas multipuerto no-inteligentes

  3.3.    Notas sobre placas multipuerto inteligentes

  4.      Programas interesantes que debería 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.      ¿Cómo puedo llamar con mi módem?

  5.1.    Requerimientos de hardware

  5.1.1.  Notas sobre módems internos

  5.2.    Hablando con el módem

  5.3.    Configuración del módem para llamar

  5.4.    Control de flujo por hardware

  6.      ¿Cómo puedo llamar y recibir llamadas con mi módem usando
  getty_ps ?

  6.1.    Configuración del módem para llamar y recibir llamadas

  6.2.    Instalación de getty_ps

  6.3.    Configurando uugetty

  6.4.    uugety  a medida

  7.      ¿Cómo puedo tener un terminal conectado a mi PC?

  7.1.    Hardware requerido

  7.2.    Configurando getty

  7.3.    Notas sobre cómo configurar un PC como terminal

  8.      ¿Puedo usar más de dos dispositivos serie?

  8.1.    Eligiendo las interrupciones de los dispositivos serie

  8.2.    Configurando las direcciones de los dispositivos serie

  9.      ¿Cómo puedo configurar el puerto serie para velocidades altas?
  ¿qué velocidad debo usar con mi módem?

  10.     Programas de comunicaciones y utilidades

  11.     Trucos serie y misceláneas

  11.1.   kermit y zmodem

  11.2.   Activando los tipos de terminal automágicamente

  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
  automágicamente?

  11.5.1. Notas sobre placas multipuerto

  12.     Un paso más ...

  12.1.   ¿Qué son los ficheros de bloqueo?

  12.2.   ``baudios'' Vs. ``bps''

  12.3.   ¿Qué son las UARTs? ¿Cómo afectan al rendimiento?

  12.4.   ¿Cuál 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 rápido: desconectado durante 5
  minutos) Asegúrese de que el módem está configurado correctamente.
  Mire los registros E  y Q . Esto puede ocurrir cuando el módem está
  negociando con getty . Asegúrese de estar llamando correctamente a
  getty  desde  /etc/inittab . Si usa una sintaxis o nombre de
  dispositivo incorrectos puede causar graves problemas. Esto también
  puede ocurrir cuando esté fallando la inicialización de  uugetty .

  13.4.   Los dispositivos serie son lentos, o los dispositivo serie
  sólo pueden enviar en una dirección

  13.5.   Mi módem se bloquea después de colgar, o uugetty  no se
  reinicia.

  13.6.   Tengo un terminal conectado al PC, pero después de escribir un
  nombre de registro, sólo se bloquea

  13.7.   A velocidades altas, mi módem pierde datos

  13.8.   Al arrancar, linux no informa a los dispositivos serie de cómo
  los he configurado

  13.9.   rz  y/o sz  no funcionan cuando llamo a mi máquina linux con
  un módem

  13.10.  En mi pantalla están saliendo caracteres muy graciosos

  13.11.  getty  o uugetty  no funciona todavia

  14.     Otras fuentes de información

  15.     Contribuciones

  16.     Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Este es el Serie COMO de Linux. Todo sobre cómo configurar módems 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 físico o electrónico, con tal
  que esta nota de copyright esté en todas las copias. La redistribución
  comercial es permitida y se anima a ello; de cualquier modo, al autor
  le gustaría 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
  distribución. Excepciones a estas reglas pueden ser garantizadas bajo
  ciertas condiciones; por favor, contacte con el coordinador de los
  HOWTOs de Linux en la dirección que se da después.

  En breve, queremos promover la diseminación de esta información a
  través de todos los canales posibles. De todas maneras, deseamos
  retener el copyright de los HOWTOs, y nos gustaría que se nos
  notificase cualquier plan de redistribución 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 través
  del correo electrónico.

  1.2.  Nuevas versiones de este documento

  Las nuevas versiones de Serial HOWTO (versión en inglés (-- Ver
  sección ``Grupos Linuxeros en España'' 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
  también está disponible en

  ·  http://sunsite.unc.edu/LDP/HOWTO/Serial-HOWTO.html

  y se enviará a comp.os.linux.answers mensualmente.

  1.3.  Realimentación

  Por favor, envíeme cualquier pregunta, comentario, sugerencia, o
  material adicional. Siempre estoy ansioso de oír lo que opinan sobre
  el HOWTO.  ¡También estoy atento a mejoras!. Dígame exactamente qué es
  lo que no entiende, o que debe aclararse. Puede contactar conmigo en
  greg.hankins@cc.gatech.edu vía email. Todas las cartas serán
  contestadas, aunque puede llevarme una semana o así, dependiendo de lo
  ocupado que esté. Tengo muchas cartas de root y sitios
  desconfigurados. Por favor, envíeme el correo como una persona real, y
  asegúrese 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.

  También puede contactar conmigo en:  Greg Hankins
  Computing
  30332-0280

  Por favor, incluya el número de versión de el Serial HOWTO cuando
  escriba, esta es la versión 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 estándar de PC (COM1 - COM4), a los cuales los
     dispositivos serie externos (módems, ratón serie, etc, ...) pueden
     ser conectados.

  ·  módems internos de PC estándar (COM1 - COM4)

  ·  Quickpath Systems Port-Folio 550e (IRQs permitidas 3, 4, 5, 9, 10,
     11, 12, y 15)

  Nota: debido a conflictos de dirección, no puede usar COM4 y la placa
  de vídeo IBM8514 simultáneamente. Esto es debido a un error en la
  placa IBM8514.

  2.2.  Módems Plug and Play (PnP)

  Los módems 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 característica PnP en la BIOS de su
     ordenador y módem.

  ·  Arranque Win95, configure el módem, y vea si la configuración
     permanece cuando arranque Linux. Si no, entonces:

  ·  Arranque Win95, configure el módem, y entonces haga un arranque en
     caliente de Linux, así se preservará la configuración. 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 módem de verdad.

  2.3.  8250/16450/16550A) Placas serie multipuerto no-inteligentes (con
  UARTs

  ·  AST FourPort y clónicas (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 módem interno que emule una
  de las UARTs anteriores.

  Nota: el BB-1004 y BB-1008 no soporta líneas 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
     localización del controlador: ftp://ftp.cyclades.com/pub/cyclades e
     incluido en el núcleo del Linux desde la versión 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 versión 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 cortésmente
     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
     localización del controlador: http://www.nyx.net/~arobinso e
     incluido en el núcleo del Linux desde la versión 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
     núcleo del Linux desde la versión 1.3.27

  Una revisión de los productos de Comtrol, Cyclades, Digi y Stallion
  fue imprimida en Junio de 1995 en la distribución de Linux Journal. El
  artículo está disponible en http://www.ssc.com/lj/issue14.

  2.5.  Hardware serie no soportado

  Los módems que afirman ser ``Winmodems'', por ejemplo el USR Sporster
  Winmodem e IBM Aptiva MWAVE, no están soportados por Linux.  Estos
  módems usan diseños propietarios que requieren controladores
  especiales de Windows.  Evite este tipo de módems. Además, evite los
  módems que requieran los controladores Rockwell RPI por las mismas
  razones.

  Las placas serie inteligentes que requieran controladores no
  disponibles para Linux tampoco funcionarán .

  3.  ¿Cuáles 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 módems y los
  terminales son dispositivos serie. Cada puerto serie debe tener una
  dirección de E/S, y una interrupción (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 ningún puerto serie cuando arranca, entonces
  asegúrese de que el soporte de comunicaciones serie está compilado y
  activo en el núcleo.

  Los dispositivos /dev/ttySN son para conexiones de entrada y los
  dispositivos /dev/cuaN son para conexiones de salida.  N es el número
  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
  específico en /dev, siempre lo precederé de /dev para evitar
  confusiones. Nótese que por defecto estos dispositivos tienen IRQs que
  se solapan. No puede usar todos los puertos con la configuración por
  defecto, debe reasignar IRQs diferentes.  Vea la sección ``¿Puedo usar
  más de dos dispositivos serie?'' para configurar las IRQs.

  En algunas instalaciones se crean dos dispositivos extras, /dev/modem
  para el módem y /dev/mouse para el ratón. Los dos son enlaces
  simbólicos al dispositivo /dev/cuaN apropiado que usted especificó
  durante la instalación (a menos que tenga un bus mouse, entonces
  /dev/mouse apuntará al dispositivo del bus mouse).

  Existen algunas discusiones sobre los méritos de /dev/mouse y
  /dev/modem. Yo estoy totalmente en contra del uso de estos enlaces. En
  particular, si está planeando usar su módem 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
  asegúrese de que apuntan al dispositivo correcto. Sin embargo, si
  mueve o borra este enlace, algunas aplicaciones (minicom por ejemplo)
  pueden necesitar una reconfiguración.

  3.1.  /dev Números 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

  Nótese 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.  Creación 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
  creación de dispositivos. Por ejemplo, si necesita crear el
  dispositivo para ttyS0 puede escribir:

       linux# cd /dev
       linux# ./MAKEDEV ttyS0

  Esto dirige la creación de dispositivos para entrada y salida, y
  debería 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 están listadas con detalle en rc.serial que
  viene con el programa setserial. Recomiendo conseguir la última
  versión 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 + número 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
  erróneo.  Debería ser COM5=0x250, COM6=0x258, COM7=0x260, y
  COM8=0x268.

  Nota: El Registro de Estado de Interrupción 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 información que viene con el controlador. Estas placas usan
  dispositivos especiales, y no los estándar. Esta información varía
  dependiendo de su hardware.

  4.  Programas interesantes que debería conocer

  4.1.  ¿Qué es getty ?

  getty es un programa que controla el proceso de login cuando se
  conecta a una máquina Unix. Puede necesitar getty si quiere que sea
  posible llamar a su máquina Linux con un módem. 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 asegúrese de comprobar
  que está usando la sintaxis correcta para el getty que esté usando.

  4.1.1.  Acerca de getty_ps

  Esta versión 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 módems. Yo uso esta versión de getty, así que me concentraré
  en el paquete getty_ps en este COMO.

  4.1.2.  Acerca de mgetty

  mgetty es una versión de getty escrita por Gert Döring,
  gert@greenie.muc.de, para ser usada con el módem.  Además de permitir
  acceso telefónico, mgetty también da soporte de FAX con sendfax, que
  acompaña a mgetty. La documentación de mgetty es bastante buena, y no
  necesita ningún suplemento.  Por favor, diríjase a ella para las
  instrucciones de instalación.  Puede encontrar la última información
  sobre mgetty en http://www.leo.org/~doering/mgetty/.

  4.1.3.  Acerca de agetty

  agetty es la tercera variación de getty. Fue originalmente escrita por
  W.Z. Venema, wietse@wzv.win.tue.nl. Es una simple, y completamente
  funcional, implementación de getty que va mejor con las consolas
  virtuales o los terminales que con los módems.

  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 versión tiene ejecutando setserial sin argumentos. Recomiendo
  conseguir la última versión de algún servidor FTP de Linux.

  Cuando su sistema Linux arranca, sólo 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 estándar,
  debe usar este programa para configurar esos puertos serie. Para la
  lista completa de opciones, consulte la página man.

  5.  ¿Cómo puedo llamar con mi módem?

  5.1.  Requerimientos de hardware

  Primero, asegúrese de que tiene el cable correcto. El módem requiere
  un cable directo, sin pins cruzados. Cualquier tienda de informática
  puede tenerlo. Asegúrese de tener el género 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 módem a uno
  de los puertos serie. Consulte el manual de su módem para saber cómo
  hacerlo si necesita ayuda.

  5.1.1.  Notas sobre módems internos

  Para un módem interno, no necesitará un cable. Un módem interno no
  necesita un puerto serie, tiene uno interno. Todo lo que necesita
  hacer es configurarlo para usar una interrupción que no esté siendo
  usada, y configurar la dirección de E/S del puerto. Consulte el manual
  de su módem si se atasca. Además, vea la sección ``¿Puedo usar más 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 módem está suplantando para evitar conflictos. Esto se puede hacer
  con los puentes o en la configuración de la BIOS, dependiendo de su
  placa madre.  Consulte el manual de su placa madre.

  Debido a un error en la placa de vídeo IBM8514, puede tener problemas
  si quiere poner su módem interno en ttyS3. Si Linux no detecta su
  módem interno en ttyS3, puede usar setserial y el módem funcionará
  bien. Los módems internos conectados en ttyS{0-2} no deben tener
  ningún problema para ser detectados. Linux no efectúa ninguna
  autoconfiguración en ttyS3 debido a este error en la placa de vídeo.

  5.2.  Hablando con el módem

  Use kermit o algún otro programa simple de comunicaciones para probar
  la configuración, antes de meterse en programas de comunicación más
  complejos. (Por razones legales, kermit no se distribuye en las
  distribuciones comerciales. Puede encontrar la última versión de
  kermit en ftp://sunsite.unc.edu/pub/Linux/apps/comm y servidores
  espejo). Por ejemplo, digamos que su módem 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 módem responde a los comandos AT, puede suponer que está
  funcionando correctamente en lo que respecta a Linux. Intente llamar a
  otro módem. Si no le gusta kermit, pruebe uno de los programas de
  comunicaciones más avanzados. Mire en la sección ``Programas De
  Comunicaciones'' sobre programas de comunicaciones si necesita una
  guía.

  Cuando llame con su módem, configure la velocidad a la más alta que
  éste soporte. Las versiones de Linux con una versión 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 versión
  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 sección ``¿Cómo configurar el
  puerto serie para velocidades altas?'' para saber cómo hacer esto.
  Después, configure la velocidad a 38400 bps en el programa de
  comunicaciones.

  5.3.  Configuración del módem para llamar

  Si sólo va a hacer llamadas, puede configurar el módem como quiera.
  Si tiene la intención de usar el módem para recibir llamadas, debe
  configurar el módem 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 módem. Esto se hace para prevenir
  desajustes entre el ordenador y el módem. En general, la configuración
  de fábrica, que activa la corrección de errores y el control de flujo
  por hardware, es la mejor configuración para hacer llamadas, consulte
  el manual de su módem para activar estas opciones.

  A mi me gusta ver los códigos resultantes, por eso activo Q0 -
  devuelve los códigos resultantes. Para activar esto en mi módem, tengo
  que preceder el nombre de registro con el comando AT.  Usando kermit u
  otro programa de comunicaciones, conéctelo al módem y escriba: ATQ0.

  También me gusta ver lo que escribo, por eso activo E1 - activa el eco
  de comandos. Si su módem tiene capacidad de compresión de datos,
  probablemente quiera activarlo.  Consulte el manual de su módem para
  más ayuda, y una lista de opciones completa. Si su módem puede grabar
  la configuración activa, asegúrese de guardarla (se suele hacer con
  AT&W, pero varia entre los fabricantes de módems), si no tendrá que
  configurar los registros cada vez que active el módem, o lo reinicie.

  5.4.  Control de flujo por hardware

  Si su módem soporta el control de flujo por hardware (RTS/CTS), le
  recomiendo que lo use. Esto es particularmente importante para módems
  que soporten la compresión 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.
  ¡Asegúrese 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

  También debe activar el control de flujo RTS/CTS en el módem.
  Consulte el manual de su módem para saber cómo hacerlo, ya que varía
  entre fabricantes de módems. Asegúrese de guardar la configuración del
  módem si éste soporta el almacenamiento del perfil.

  6.  ¿Cómo puedo llamar y recibir llamadas con mi módem usando getty_ps
  ?

  Consiga que su módem llame correctamente. Si no ha leído la sección
  ``¿Cómo puedo llamar con mi módem?'', ¡léala ahora!.  Contiene
  información de configuración muy importante. No necesita leer esta
  sección si lo único que quiere hacer es llamar con el módem.

  6.1.  Configuración del módem para llamar y recibir llamadas

  Para llamar y recibir llamadas, tiene que configurar el módem de un
  cierto modo (de nuevo, usando los comandos AT del módem):

       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
  configuración puede fallar, echando a perder el proceso completo.
  Pero, más sobre ficheros de configuración después ...

       &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 módem cuando inicia o finaliza una
  llamada.

  Si su módem no puede almacenar el perfil, puede usar la cadena INIT de
  su fichero de configuración. Véalo más adelante.  Algunos módems
  tienen interruptores DIP que afectan a la configuración de los
  registros.  Asegúrese de que estén configurados correctamente.

  He iniciado una colección de configuraciones para diferentes tipos de
  módems. Hasta ahora sólo tengo unos pocos, si desea enviarme una
  configuración que funcione, por favor, ¡hágalo!.  Puede conseguirla en
  ftp://ftp.cc.gatech.edu/pub/people/gregh/modem-configs.

  Nota: para conseguir que mi módem 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 módems USR Sportster V.34.

  Nota: algunos módems Supra tratan el DCD de modo diferente a otros
  módems.  Si está usando un Supra, pruebe a poner &C0 y no &C1. También
  debe poner &D2 para manejar el DTR correctamente.

  6.2.  Instalación de getty_ps

  Consiga la última versión 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
  estarán en /sbin, y los ficheros de configuración se llamarán
  /etc/conf.{uu}getty.ttySN.  ¡Esto no está claro en la documentación!.
  También se espera que los ficheros de bloqueo estén en /var/lock.
  Asegúrese de que existe el directorio /var/lock.

  Si no quiere usar la norma FSSTND, los binarios pueden ir en /etc, los
  ficheros de configuración 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 también puede usar syslogd para guardar los mensajes.  Vea
  las páginas man de syslogd(1) y syslog.conf(5) para configurar
  syslogd, si no lo tiene funcionando todavía. Los mensajes se guardan
  con prioridad LOG_AUTH, los errores usan LOG_ERR, y la depuración 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. También
  puede elegir una combinación de ambos. Edite los ficheros Makefile,
  tune.h y config.h para reflejar sus decisiones. Después compile e
  instale siguiendo las instrucciones incluidas en el paquete.

  A partir de este punto, todas las referencias a getty_ps se referirán
  a getty_ps. Las referencias a uugetty se referirán a uugetty que viene
  con el paquete getty_ps.  Estas instrucciones no funcionarán en mgetty
  o agetty.

  6.3.  Configurando uugetty

  Para recibir llamadas y llamar con su módem, vamos a usar uugetty.
  uugetty hace importantes comprobaciones de los ficheros de bloqueo.
  Actualice /etc/gettydefs para incluir las entradas de los módems si
  todavía no están allí (nótese que cada entrada apunta a otra, esto no
  es para velocidades fijas - las líneas 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 módem de 9600 bps o más rápido con compresión de datos,
  puede bloquear la velocidad del puerto serie y permitir que el módem
  controle las transiciones a otras velocidades. Entonces, en vez de la
  serie descendente de líneas listadas antes, /etc/gettydefs sólo
  necesita contener una línea para el módem:

       # 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 añadir 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
  línea serie, y la velocidad actual en bps. Puede añadir 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 carácter '@', use '\@' o '@@'.

  Después, asegúrese de que tiene un dispositivo de entrada y otro de
  salida para el puerto serie en que esté el módem. Si tiene el módem en
  ttyS3, necesitará los dispositivos /dev/cua3 y /dev/ttyS3. Si no tiene
  los dispositivos adecuados, vea la sección ``Creación De Dispositivos
  En <TT>/dev</TT>'' para saber como crearlos.

  6.4.  uugety  a medida

  Existen un montón de parámetros que puede configurar para cada puerto.
  Están implementados en distintos ficheros de configuración para cada
  puerto. El fichero /etc/conf.uugetty será usado por cada ejecución de
  uugetty, y /etc/conf.uugetty.ttySN será usado solamente para ese
  puerto. Se pueden encontrar ejemplos de ficheros de configuración por
  defecto en los ficheros fuentes de getty, que viene con la mayoría de
  las distribuciones de Linux. Debido a lo que ocupan, no lo vamos a
  listar aquí. Nótese que si está usando una versión 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 módem
       #
       # 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
       # línea 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

  Añada la siguiente línea a /etc/inittab, así uugetty se ejecutará en
  el puerto serie (sustituyéndolo por la información correcta para su
  entorno - localización del fichero de configuración, 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 parámetro de velocidad de /etc/inittab, debe poner la velocidad
  en bps más alta que soporte su módem. 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
  sección ``¿Cómo puedo configurar el puerto serie para velocidades
  altas?'' para saber cómo hacer esto.  Entonces, ponga 38400 bps en
  /etc/inittab.

  Ahora Linux vigilará el puerto serie por posibles conexiones.  Llame
  desde otro sitio y conéctese a su sistema Linux.

  uugetty tiene muchas opciones, vea la página man de getty(1m) para una
  descripción completa. Además de otras cosas hay una característica de
  planificación y otra de rellamada.

  7.  ¿Cómo puedo tener un terminal conectado a mi PC?

  Las instrucciones de esta sección sirven para la conexión de
  terminales, así como otros ordenadores a un puerto serie de su sistema
  Linux.

  7.1.  Hardware requerido

  Asegúrese de tener el cable correcto. Un cable de módem nulo comprado
  en cualquier tienda de informática puede valer. ¡Pero debe ser un
  cable de modem nulo!. Muchas tiendas de informática venden este tipo
  de cable como cable serie de impresora. Asegúrese 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 mínimo:

  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 señales de sincronización del hardware, debe tener un
  cable completo de módem 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 módem 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 módem nulo, deberá hacer el
  siguiente truco: en la parte del conector que va al ordenador, conecte
  juntos RTS y CTS, y además conecte juntos DSR, DCD y DTR. De este
  modo, cuando el ordenador busque una cierta señal de sincronismo, la
  cogerá (de él mismo).

  Ahora que tiene el tipo de cable adecuado, conecte el terminal al
  ordenador. Si puede, dígale al terminal que ignore las señales de
  control de módem. 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

  Añada las siguientes entradas en /etc/gettydefs para usar getty en su
  terminal, si todavía no están 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
  línea serie. Puede añadir más 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 '@@'.

  Asegúrese de que no existe un fichero de configuración 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 información 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, debería estar viendo una petición de login en el terminal.
  Debe pulsar return para conseguir la atención del terminal.

  7.3.  Notas sobre cómo 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 propósito.  Todo lo que necesita es un disco de arranque de DOS
  que contenga una versión 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. Asegúrese de introducir la información del puerto serie en la
  configuración de comunicaciones del terminal-PC.

  8.  ¿Puedo usar más de dos dispositivos serie?

  No necesita leer esta sección, a menos que quiera usar tres o más
  dispositivos serie... (suponiendo que tiene una placa multipuerto).

  Suponiendo que tiene otro puerto serie sin usar, sí, puede. El número
  de puertos serie que puede usar está limitado por el número de
  interrupciones (IRQs) y direcciones de puertos de E/S que tengamos
  disponibles. Esto no es una limitación de Linux, es una limitación del
  bus del PC. Cada dispositivo serie debe tener asignado una
  interrupción propia y una dirección. Un dispositivo serie puede ser un
  puerto serie, un módem interno, o una placa serie multipuerto.

  Las placas serie multipuerto están especialmente diseñadas para tener
  múltiples puertos serie que comparten la misma IRQ. Linux obtiene los
  datos de ellos usando una dirección 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 están usándose viendo
  /proc/interrupts. Para usar más de dos dispositivos serie, debe
  reasignar las interrupciones. Una buena elección es reasignar una
  interrupción 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 aún usar felizmente un puerto
  paralelo.  Necesitará el programa setserial para hacer esto. Además,
  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
  interrupción para cada dispositivo serie. Así es como tengo mi
  configuración en /etc/rc.d/rc.local - debe hacerlo donde quiera que
  tenga su fichero de inicialización:

       /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

  Asignación estándar 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. Sólo asegúrese 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 estándar
  usa estas IRQs.  Nótese también 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, también puede usar las IRQ 10,
  11, 12 ó 15.

  ¡Sólo asegúrese 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 asegúrese de que
  no haya conflictos.

  8.2.  Configurando las direcciones de los dispositivos serie

  El siguiente paso es configurar la dirección del puerto. Vea el manual
  de su placa para configurar los puentes. Como las interrupciones,
  puede haber sólo un dispositivo serie en cada dirección. Los puertos
  suelen venir configurados de la siguiente manera:

       ttyS0 direccion 0x3f8
       ttyS1 direccion 0x2f8
       ttyS2 direccion 0x3e8
       ttyS3 direccion 0x2e8

  Elija la dirección que desee para cada dispositivo serie que tenga y
  configure los puentes en concordancia. Tengo mi módem en ttyS3, el
  ratón en ttyS0, y el terminal en ttyS2.

  Cuando arranque de nuevo, Linux debería 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 detección de IRQ mientras
  arranca, porque la detección 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 después de arrancar.

  9.  velocidad debo usar con mi módem?  ¿Cómo puedo configurar el
  puerto serie para velocidades altas? ¿qué

  Esta sección le ayudará a calcular la velocidad a usar cuando use su
  módem con un programa de comunicaciones, o con un programa getty.

  ·  Si tiene algo más lento que un módem de 9600 bps (V.32), configure
     la velocidad a la más alta que su módem soporte. Por ejemplo 300
     bps (V.21/Bell 103), 1200 bps (V.22/Bell 212A), ó 2400 bps
     (V.22bis).

  ·  Si tiene un módem de 9600 bps (V.32), con compresión de datos
     V.42bis, ponga la velocidad a 38400 bps .  La compresión V.42bis
     tiene una velocidad teórica de 4:1, es decir ``4 * 9600 = 38400''.

  ·  Si tiene un módem de 14400 bps (V.32bis), con compresión de datos
     V.42bis, use setserial con el parámetro spd_hi para configurar el
     puerto serie a 57600 bps (4 * 14400 = 57600).

     Use el parámetro spd_hi si tiene un módem a 28800 ó 33600 bps (V.FC
     o V.34) (4 * 28800 = 115200).

     Después, use la velocidad de 38400 bps en su programa de
     comunicaciones, o en /etc/inittab. Esta es ahora la velocidad más
     alta que ha configurado. Asegúrese de tener UARTs 16550A.

     Si su versión 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 versión 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 más altas si tiene una versión
     reciente de una distribución Linux.

  Compruebe primero la configuración de setserial en la línea de
  comandos, y después cuando esté funcionando, póngalo 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

  Asegúrese de estar usando un path válido para setserial, y un nombre
  válido para el dispositivo. Puede comprobar la configuración 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 más avanzados. Todos están asequibles en los servidores
  habituales de FTP, si no vienen ya con su distribución.
  ·  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 más herramientas que kermit solo, incluyendo
  agenda telefónica, 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-sesión. Se comporta igual que las
     consolas virtuales.

  ·  callback es un programa que hace que su módem 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 módems ZyXEL U-1496.
     Controla las llamadas entrantes, llamadas de respuesta de
     seguridad, enviar FAX, y funciones de buzón 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 están
     manteniendo los programas serie.

  11.  Trucos serie y misceláneas

  Aquí vienen algunos trucos serie que puede encontrar útiles ...

  11.1.  kermit y zmodem

  Para usar zmodem con kermit, añada lo siguiente a .kermc:

       define rz !rz < /dev/cuaN > /dev/cuaN
       define sz !sz \%0 > /dev/cuaN < /dev/cuaN

  Asegúrese de poner el puerto correcto en el que está el módem.
  Después, para usarlo, solamente escriba rz o sz <nombre_de_fichero> en
  la línea de comandos de kermit.

  11.2.  Activando los tipos de terminal automágicamente

  Para activar automágicamente un tipo de terminal cuando se conecte,
  añádalo al fichero /etc/inittab. Si tengo un terminal vt100 en ttyS1,
  debo añadir ``vt100'' al comando getty:

       S1:456:respawn:/sbin/getty ttyS1 DT9600 vt100

  También 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 características de un terminal
  cuando usted se conecte, y no depende de ninguna opción por defecto.

  11.3.  ls  en color en conexiones serie

  Si ls está causando problemas en la emulación del terminal con la
  opción de color, desconéctela. ls --color, y ls --colour usan las
  características de color. Algunas instalaciones tienen ls preparado
  para usar el color por defecto. Busque en /etc/profile y
  /etc/csh.cshrc alias de ls.  También puede ponerle el alias ls --no-
  color a ls, si no quiere cambiar la configuración 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 extraído del fichero README que viene con el
  programa:

       vtprint es un programa que permite a los usuarios imprimir
       desde un anfitrión Unix remoto a una impresora conectada a
       un terminal local o emulador, lo cual es perfecto para
       imprimir ficheros en casa, etc. (Sólo con ficheros de texto,
       creo.)

  11.5.  ¿Puede linux configurar los dispositivos serie automágicamente?

  Sí. Para conseguir que Linux detecte y configure los dispositivos
  serie automáticamente al arrancar, añada la línea:

       /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.  Asegúrese de poner
  un nombre de dispositivo que realmente exista en su máquina.

  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 más ...

  Esta sección no necesita ser leída, 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. Están 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 módem,
  aparecerá un bloqueo para que otros procesos sepan que alguien está
  usando actualmente el módem. 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 todavía válido buscando en la tabla de procesos el que
  tiene bloqueado el dispositivo. Si el bloqueo es válido, el programa
  se cerrará (o debería 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á
  usándose.

  12.2.  ``baudios'' Vs. ``bps''

  ``baudios'' y ``bps'' son, quizás, unos de los términos peor usados en
  el campo de los ordenadores y telecomunicaciones. Mucha gente usa
  estos términos indiferentemente, ¡cuando de hecho no son lo mismo!.

     baudios
        La velocidad en baudios es una medida de cuantas veces por
        segundo cambia una señal, por ejemplo una señal enviada por un
        módem (moulador-demodulador). Es decir, una velocidad de 1200
        baudios implica que una señal cambia cada 833 microsegundos. Las
        velocidades de los módems normales son 50, 75, 110, 300, 600,
        1200, y 2400. La mayoría de los módems rápidos van a 2400
        baudios. Debido a limitaciones del ancho de banda en las líneas
        telefónicas de voz, las velocidades superiores a 2400 baudios
        son difíciles de alcanzar, y sólo funcionan en líneas
        telefónicas 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 asíncrona del telégrafo (teletipo).

     bps
        La velocidad en bps es una medida de cuantos bits por segundo
        son transmitidos. Las velocidades en bps de los módem normales
        son 50, 75, 110, 300, 1200, 2400, 9600, ... 115200. Usando
        módems con compresión V.42bis (compresión máxima 4:1), son
        posibles velocidades teóricas de hasta 115200 bps. Esto es lo
        que la mayoría de la gente quiere decir cuando mal usan la
        palabra ``baudios''.

  Así, si módems de alta velocidad están funcionando a 2400 baudios,
  ¿cómo pueden enviar 14400 bps?. Los módems alcanzan una velocidad en
  bps mayor que la velocidad en baudios codificando varios bits en cada
  cambio de señal, o cambio de fase. De este modo, cuando 2 o más bits
  son codificados por baudio, la velocidad en bps supera a la velocidad
  en baudios. Si su módem se conecta a 14400 bps, estará enviando 6 bits
  en cada cambio de fase, a 2400 baudios.

  ¿Cómo empezó esta confusión?. Bien, volviendo a cuando los módems
  lentos eran módems de alta velocidad, la velocidad en bps realmente
  era igual a la velocidad en baudios. Un bit podía ser codificado por
  cambio de fase.  La gente podía usa bps y baudios intercambiándolos,
  porque eran el mismo número. Por ejemplo, un módem de 300 bps también
  tenía una velocidad de 300 baudios. Todo esto cambió cuando llegaron
  los módems más rápidos, y la velocidad en bits superó a la velocidad
  en baudios.

  12.3.  ¿Qué son las UARTs? ¿Cómo afectan al rendimiento?

  Las UARTs (Universal Asyncronous Receiver Transmitter) son circuitos
  integrados de la placa serie del PC.  Su propósito es convertir los
  datos a bits, enviarlos a la línea serie, y después reconstruir los
  datos en el otro terminal. Las UARTs tratan los datos en bloques del
  tamaño de un byte, que además es, convenientemente, el tamaño de los
  caracteres ASCII.

  Digamos que tiene un terminal conectado a su PC. Cuando escriba un
  carácter, el terminal da el carácter a su transmisor (también una
  UART).  El transmisor envía ese byte a la línea 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 búfer.

  Existen dos tipos diferentes de UARTs. Probablemente ha oído 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, sólo los envía
  y los recibe. La CPU recibe una interrupción del dispositivo serie
  cada vez que se recibe o envía un byte. Entonces la CPU mueve el byte
  recibido desde el búfer de la UART a algún lugar de la memoria, o le
  da a la UART otro byte a enviar. Las UARTs 8250 y 16450 sólo tienen un
  búfer de 1 byte.  Esto significa, que cada vez que se envía 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 interrupción a tiempo, y se
  sobreescribe el byte, debido a que llegan demasiado rápido.

  Ahí es cuando son útiles las UARTs 16550A. Estos integrados tienen un
  búfer 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
  sólo puede esperar, sino que puede entonces transferir los 16 bytes de
  una sola vez. Aunque es raro que el umbral de interrupción esté a 16,
  esto es una ventaja significante frente a las otras UARTs, que sólo
  tienen un búfer 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. (También 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 pérdida de datos. Otros sistemas operativos de PC (definición
  usada aquí vagamente) como DOS no son multitarea, por eso deben ser
  capaces de habérselas mejor con 8250 ó 16450. Por eso es por lo que
  algunas personas no sufren pérdidas de datos, hasta que cambian a
  Linux.

  Las placas sin UART y las multipuerto inteligentes usan integrados DSP
  para hacer las tareas de búfer y control adicional, esto libera mucho
  más 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 ratón a estas UARTs. Pero, para
  un módem de alta velocidad, la 16550A es imprescindible.

  Puede comprar placas serie con la UART 16550A por un poco más 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 reemplácelo por su UART 16450. Son compatibles patilla a
  patilla. Algunas placas traen la UART en zócalo para este propósito,
  si no, puede soldarlo.  Nótese que probablemente se ahorrará un montón
  de problemas consiguiendo una placa nueva, si tiene el dinero, cuestan
  menos de 5000 ptas.

  12.4.  /dev/cua N  Y /dev/ttyS N ?  ¿Cuál 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 múltiples entradas /dev, permiten operaciones sobre el mismo
  dispositivo físico con diferentes características de operación.
  También permite a los programas getty estándar coexistir con cualquier
  otro programa serie, sin que getty tenga que ser reajustado con
  bloqueos de ningún tipo. Es especialmente útil ya que los ficheros de
  bloqueo de los núcleos Unix estándar, y los bloqueos de UUCP son de
  aviso y no de obligatoriedad.

  13.  Eliminando problemas

  13.1.  Me dice: ``line NNN  of inittab invalid''

  Asegúrese de estar usando la sintaxis correcta para su versión de
  init. Las diferentes versiones de init que hay por ahí usan sintaxis
  diferentes en el fichero /etc/inittab.  Asegúrese de estar usando la
  sintaxis correcta para su versión 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 están activados
  correctamente. DCD sólo debe activarse cuando haya una conexión en
  curso (ej: alguien ha llamado a este sistema), no cuando getty esté
  vigilando el puerto. Compruebe el módem para asegurarse de que está
  configurado para activar DCD sólo cuando haya una conexión. DTR debe
  estar activo siempre que alguien esté usando, o vigilando la línea,
  como getty, kermit, o algún otro programa de comunicaciones.

  Otra causa común de los errores de ``device busy'' (dispositivo
  ocupado), es que haya configurado el puerto serie con una interrupción
  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 quién se le ha asignado cada interrupción, y si la
  interrupción 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 rápido: desconectado durante 5
  minutos) Asegúrese de que el módem está configurado correctamente.
  Mire los registros E  y Q .  Esto puede ocurrir cuando el módem está
  negociando con getty .  Asegúrese de estar llamando correctamente a
  getty  desde /etc/inittab . Si usa una sintaxis o nombre de disposi­
  tivo incorrectos puede causar graves problemas. Esto también puede
  ocurrir cuando esté fallando la inicialización de uugetty .  Me dice:
  ``Id S N  respawning too fast: disabled for 5 minutes''

  13.4.  pueden enviar en una dirección Los dispositivos serie son
  lentos, o los dispositivo serie sólo

  Probablemente tenga un conflicto de IRQ. Asegúrese de que no se están
  compartiendo IRQs. Compruebe todas las placas (serie, ethernet, SCSI,
  etc). Asegúrese de que los puentes, y los parámetros de setserial son
  los correctos en todos los dispositivos serie.  Revise también
  /proc/ioports y /proc/interrupts por si hubiera conflictos.

  13.5.  Mi módem se bloquea después de colgar, o uugetty  no se reini­
  cia.

  Esto puede ocurrir cuando no se reinicia el módem al desactivar el
  DTR. He visto que los LEDs RD y SD de mi módem se vuelven locos cuando
  esto ocurre. Debe tener el módem reiniciado. Muchos módems 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 módem.

  13.6.  nombre de registro, sólo se bloquea Tengo un terminal conectado
  al PC, pero después de escribir un

  ·  Si está usando getty:  Probablemente no tendrá puesto CLOCAL en
     ninguna línea de /etc/gettydefs para el terminal, y probablemente
     no está usando un cable completo de módem nulo. Necesita CLOCAL, el
     cual le dice a Linux que ignore las señales del control del módem.
     Debería 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

  Después, elimine el proceso getty con el comando kill y se generará un
  proceso nuevo con la nueva entrada.

  ·  Si está usando agetty:  Añada el parámetro -L a la línea de agetty
     en /etc/inittab. Esto hará que ignore las señales de control del
     módem. Después ejecute de nuevo init escribiendo init q.  La línea
     debería ser como esta:

       s1:345:respawn:/sbin/agetty -L 9600 ttyS1 vt100

  13.7.  A velocidades altas, mi módem pierde datos

  Si está intentando usar el módem a más de 38400 bps, y no tiene una
  UART 16550A, debe conseguirla. Vea la sección ``¿Qué son las UARTs?''
  para saber más sobre las UARTs.

  13.8.  he configurado Al arrancar, linux no informa a los dispositivos
  serie de cómo los

  Esto es verdad. Linux no realiza ninguna detección de IRQ al arrancar,
  sólo hace la detección de los dispositivos serie. Así que no haga caso
  de lo que diga sobre las IRQs, ya que asume que son las IRQs estándar.
  Esto se hace porque la detección de IRQs no es fiable, y puede ser
  falsa.

  Así, aún 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.
  Después de que Linux arranque, puede mirar en el fichero
  /proc/interrupts para ver que IRQs se han configurado realmente.

  13.9.  con un módem rz  y/o sz  no funcionan cuando llamo a mi máquina
  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. Elimínelos o corríjalos.

  13.10.  En mi pantalla están saliendo caracteres muy graciosos

  Esto ocurre en las consolas virtuales cuando envía 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 opción DEBUG que viene con getty_ps. Edite el fichero de
  configuración /etc/conf.{uu}getty.ttySN y añada DEBUG=NNN. Donde NNN
  es una de las combinaciones numéricas 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 información de depuración aparecerá en
  los ficheros log. Si no está usando syslogd la información aparecerá
  en /tmp/getty:tyySN si depura getty y /tmp/uugetty:ttySN si usa
  uugetty, y en /var/adm/getty.log. Mire la información de depuración y
  vea que está ocurriendo. Probablemente necesitará ajustar algunos
  parámetros del fichero de configuración, y reconfigurar el módem.

  También lo puede intentar con mgetty. Algunas personas tienen mejores
  resultados con él.

  14.  Otras fuentes de información

  ·  páginas man de: agetty(8), getty(1m), gettydefs(5), init(1),
     login(1), mgetty(8), setserial(8)

  ·  El manual del módem

  ·  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 quería saber sobre el programa term

  ·  UPS HOWTO: configuración de una UPS conectada al puerto serie

  ·  UUCP HOWTO: información 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
       Instalación 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
     también ofrece otras listas de Linux. Envíe 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 disposición 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í (más 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 Döring que mantiene mgetty.

  16.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Instalación y configuración de un servidor de IRC
  Diego Berrueta Muñoz, 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 gestión del
  servidor y un programa cliente de IRC.
  ______________________________________________________________________

  Índice general


  1. Nota de los autores

  2. Introducción

     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 básicos de IRC
     2.5 Ataques en el IRC

  3. Demonio de IRC:

     3.1 Función de un demonio
     3.2 Descripción de
     3.3 Obtención e instalación
     3.4 Configuración previa a la compilación
     3.5 Compilación
     3.6 El fichero
     3.7 Ejecución del demonio

  4. El

     4.1 Función de un
     4.2 (IT
     4.3 Instalación
     4.4 Edición del código fuente
     4.5 Compilación
     4.6 Configuración
     4.7 Ejecución

  5. Cliente de IRC

     5.1 Función de un cliente de IRC
     5.2 Descripción de
     5.3 Obtención e instalación
     5.4 Configuración
     5.5 Ejecución

  6. Anexo: El INSFLUG



  ______________________________________________________________________

  1.  Nota de los autores


  Este documento es el resultado de un trabajo realizado para el curso
  "Administración de un sistema UNIX con Linux", impartido en el verano
  de 1998 en la Escuela Universitaria de Ingeniería Técnica en
  Informática 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 más información sobre Linux, no olvide visitar la página
  web del Proyecto Lucas, (http://lucas.ctv.es/) donde se encargan de
  traducir las guías de Linux al castellano, y la página de INSFLUG
  (http://www.insflug.org/), que coordina la traducción de los
  documentos HOWTO y FAQ).


  2.  Introducción



  2.1.  ¿Qué es el IRC?


  El IRC (Internet Relay Chat) surgió como una ampliación del programa
  talk, tratando de superar sus limitaciones. Se trata de un sistema de
  conversación en tiempo real a través de redes de ordenadores y, por
  supuesto, de Internet. Las principales diferencias con el talk son las
  siguientes:


  ·  Incorpora un protocolo mucho más elaborado, independiente de la
     plataforma.

  ·  Posibilidad de conversaciones en las que intervengan más de dos
     participantes: el límite depende sólo de las posibilidades de los
     servidores.

  ·  Organización de las charlas en forma de múltiples canales: por
     establecer un símil, los canales son salones donde se dan cita un
     cierto número de usuarios. Esta posibilidad se aprovecha
     generalmente para realizar canales temáticos, que son el punto de
     encuentro de personas con inquietudes parecidas.

  ·  Posibilidad de conectar varias redes, para poner en comunicación un
     gran número de usuarios.

  ·  Los usuarios pueden ocultar su identidad, lo que facilita
     conversaciones más espontáneas, pero también puede crear riesgos de
     seguridad.

  El IRC nació hace diez años, cuando el finlandés Jarkko Oikarinen
  escribió el primer programa para poder efectuar conversaciones con una
  estructura cliente-servidor. Su expansión fue muy rápida, 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 después surgieron otras
  como Undernet (http://www.undernet.org), IRCNet, DALNet, StarChat,
  StarLink, NewLet. También existen redes para las personas de habla
  hispana, como RedLatina, IRC-Hispano (http://www.irc-hispano.org) o la
  más reciente, Esnet (http://www.esnet.org).  Algunas de estas redes
  son de grandes magnitudes: por ejemplo, en Undernet existen más 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 filosofía de funcionamiento permite al administrador del servidor
  ejercer un cierto control: por ejemplo, puede impedir el acceso a
  determinados usuarios, ampliar las posibilidades de conversación
  comunicando varios servidores o limitar las posibilidades de los
  usuarios.  Además, 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 más en el
  segundo. ¿Qué tipo de software se requiere? En principio, para el
  establecimiento de un servicio básico, 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 gestión eficiente y automática de la red de IRC, se
  hace necesario un bot o script, que se encargue de la gestión de
  usuarios y canales sin intervención por parte del administrador.

  Con el fin de poder monitorizar y administrar la red, es conveniente
  que el servidor disponga también de un software cliente de IRC.


  2.4.  Comandos básicos de IRC


  Antes de describir los comandos, es necesario conocer cuál es, a
  grandes rasgos, la filosofía 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 símbolo
  &), y un topic, que es una breve descripción de los temas a los que
  está dedicado el canal.

  Para poder dar coherencia a las conversaciones, los usuarios también
  están identificados por un nombre, que se llama nick o apodo.  Con el
  fin de poder mostrar una información más explícita sobre el usuario,
  muchas redes exigen introducir el nombre completo y dirección de
  correo electrónico para poder acceder; sin embargo, la mayoría de
  usuarios aprovecha estos campos para introducir algún comentario más 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
  demás usuarios que forman parte del canal, y se indicará el apodo del
  usuario emisor. De la misma forma, la recepción de mensajes es
  automática; simplemente aparecen en la pantalla cuando son enviados.

  Dentro de un canal existe al menos un usuario que tiene más
  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 más 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 gestión dinámica de canales es otra de las
     posibilidades del IRC), y además 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
     están presentes en ese canal.

  ·  /WHOIS nick: muestra más información sobre un usuario del que
     conocemos su nick. Sin embargo, por las razones ya comentadas, la
     información no suele ser cierta.

  ·  /TOPIC cadena: cambia el topic o descripción del canal (si tenemos
     privilegios para poder hacerlo).

  ·  /NICK nuevo_nick: permite cambiar nuestro nick o apodo.

  ·  /MSG nick mensaje: envía un mensaje personal a un usuario
     determinado, sin que los demás usuarios lo vean en su pantalla.

  ·  /SIGNOFF, /SI, /BYE, /EXIT, /QUIT: cualquiera de ellos sirve para
     abandonar la conversación. Si se añade un texto detrás 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 conversación.

  ·  /QUERY nick: invita al usuario indicado a participar en una
     conversación privada. Si el receptor responde con un comando
     similar, el diálogo particular dará comienzo.

  Los siguientes comandos los utilizan exclusivamente los operadores:


  ·  /OPER nick password: da al usuario indicado los privilegios de
     operador (si la contraseña es válida).

  ·  /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 más 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 más adelante, tanto el demonio de IRC como el bot de
  gestión 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 razón es que existen usuarios con grandes conocimientos sobre el
  IRC, y que muestran una actitud beligerante respecto a las más
  desprevenidos, los usuarios noveles. Aprovechándose de las grietas del
  sistema, son capaces de expulsar a otros usuarios e incluso colgar
  máquinas remotas, mediante diversos tipos de estrategias:


  ·  Flood: consiste en requerir mucha información de un usuario de
     manera continua (mediante version, whois, ping, dcc, etc.), con el
     objeto de que la máquina atacada devuelva todas las peticiones,
     llegando a poner en peligro de saturación al servidor, que
     procederá a expulsarla.

  ·  Floodnets: son grupos de usuarios coordinados mediante scripts, que
     consiguen hacer el trabajo de flood más efectivo.

  ·  Botnets: se trata de una versión automatizada (mediante scripts)
     del flood.

  ·  ICMP: este tipo de ataques son mucho más sofisticados y malignos.
     Como dato, baste decir que existe un script escrito en sólo cinco
     líneas de perl y capaz de bloquear una máquina Windows remota.

  ·  Smurf: consiste en enviar un ping a la dirección broadcast de una
     gran red, con la identidad del remitente falseada para que apunte a
     la persona atacada. Las respuestas de las máquinas de la red irán
     directamente a esta persona, rompiéndole la conexión.

  Al crear un servidor de IRC, se debe poner mucha atención en la
  prevención de ataques. Los ataques por saturación son relativamente
  fáciles 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 versión del núcleo y los parches.

  Para dificultar aún más el seguimiento de los atacantes, éstos suelen
  emplear bouncers, que son demonios colocados en una tercera máquina 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 más información sobre estos temas (ataques,
  defensas y monitorización) 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.  Función 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 máquina servidor coexistirán tantos programas esperando a la
  escucha de nuevas peticiones como servicios diferentes se oferten.

  Estos programas, denominados demonios (daemons en la terminología
  inglesa) son programas que están en ejecución, cargados en memoria, y
  que están encargados de responder a las peticiones que hacen los
  programas clientes, que generalmente están ubicados en otras máquinas,
  pero que pueden ejecutarse también en la propia máquina servidor. Por
  tanto, siempre hay una correspondencia directa entre el programa o
  demonio del servidor y el programa cliente de la máquina cliente.

  En nuestro caso particular de IRC, el servidor será la máquina que
  ejecute el demonio ircd y los clientes serán los programas que los
  usuarios utilicen para engancharse a este servidor.


  3.2.  Descripción 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
  más básico, ircd, sin modificación alguna.  Pero nosotros hemos
  escogido el ircd-hybrid versión 5.2p1 por ser el más completo. Es el
  usado en la red Efnet.


  3.3.  Obtención e instalación


  Algunas distribuciones como Debian incluyen este software entre sus
  paquetes básicos. Si utilizamos otra distribución, se puede recurrir
  al FTP o contactar con sus autores en la dirección 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 más importantes son:


  ·  INSTALL: describe los pasos a realizar para la instalación.

  ·  README.FIRST, README.hybrid, README.small_nets: como siempre,
     conviene leerlos antes de proceder a la instalación.

  ·  Opers.txt: describe los comandos para el operador del servidor IRC.

  ·  Doc/: este directorio contiene documentación sobre IRC.


  3.4.  Configuración previa a la compilación


  Como sugiere la documentación, es preciso revisar algunos ficheros
  donde se definen varios parámetros, por lo que será necesario compilar
  el programa.  Sin embargo, el primer paso es adaptar los ficheros de
  configuración y compilación a nuestro sistema. Esto lo haremos
  ejecutando el script ./configure.


  A continuación, editaremos parte del código fuente (por motivos de
  optimización): 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 líneas define de esta forma:



       #define HARD_FDLIMIT    256
       #define INIT_MAXCLIENTS 150




  También quitaremos la línea



       #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 tamaño de algunas tablas mediante
  símbolos 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 compilación es editar el fichero Makefile
  resultante de ejecutar el script ./configure, para que la línea que
  especifica los parámetros que usará el compilador gcc quede de la
  siguiente forma:



       # Default CFLAGS
       CFLAGS= -g -O2 -DCPU=586 -m486




  Los dos últimos parámetros son opcionales, y sirven para optimizar el
  código generado para máquinas Pentium/AMD.


  3.5.  Compilación


  Una vez hechos todos los ajustes pertinentes, se puede proceder a la
  compilación propiamente dicha, con el comando:



       make




  La compilación transcurrirá durante unos minutos, tras los cuales, si
  no se ha producido ningún error, sólo faltará crear el directorio
  /usr/local/ircd/, donde se instalarán 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
  líneas, identificadas con una letra, y que contienen parámetros
  separados por el signo ':'. Algunas de las líneas más importantes son:


  ·  A: información sobre los administradores:


     1. Compañía

     2. Localización

     3. Dirección de contacto


  ·  M: información sobre el servidor:


     1. Nombre del host

     2. Dirección 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 través de un programa externo de
     validación.

  ·  D: otra forma de impedir conexiones a redes enteras, mostrando un
     comentario.

  ·  E: excepciones a la línea K.

  ·  F: super-excepción (similar a la anterior, pero se salta los
     límites de clases de usuarios).


  ·  Y: define una clase de usuario:


     1. Número de clase.

     2. Frecuencia de ping (segundos).

     3. Usuarios por IP.

     4. Número máximo de enlaces.

     5. Tamaño de la cola de envío.


  ·  I: permite el acceso a algunas máquinas:


     1. Dominio o dirección IP.

     2. Password del cliente.

     3. No documentado (generalmente '*').

     4. No documentado.

     5. Número 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 líneas
       # - C, N, L y N: porque no nos conectamos a ningún otro servidor
       # - K, R, D, E y F: porque no establecemos restricciones tan fuertes
       # - P: porque no tenemos más puertos

  Nota: para obtener el campo clave encriptada de la línea 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 configuración
  ircd.conf mediante la utilización de la herramienta tools/chkconf.

  También podemos modificar el fichero ircd.motd para establecer el
  mensaje del día que aparecerá a los usuarios que establezcan contacto
  con el servidor.


  3.7.  Ejecución 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 añadiendo la siguiente línea en el fichero /etc/inetd.conf:



       ircd stream tcp wait irc /etc/ircd ircd -i




  para que arranque automáticamente cada vez que se inicie el equipo
  servidor.  Sin embargo, este segundo método no lo hemos podido
  confirmar porque, aparentemente, no ha funcionado.



  4.  El bot  de gestión del servidor



  4.1.  Función de un bot  de gestión del servidor


  La función de un bot o script de gestión 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 más, pero adquiere el
  poder del operador, lo que le permite administrar de manera eficiente
  los canales. Entre sus posibilidades están:


  ·  Envío de mensajes periódicos 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 más importantes,
  podemos destacar:
  ·  Eggdrop: posiblemente el más conocido, pero también el más complejo
     de instalar y mantener. Requiere TCL.

  ·  Uworld.

  ·  Cservice.

  ·  Argobot.


  4.2.  Argobot


  El Argobot es un bot relativamente sencillo escrito por el español
  Jesús Cea Avión (http://www.argo.es/~jcea), aunque algunas grandes
  redes hispanas de IRC están adoptándolo. Soporta todas las
  características antes enunciadas, pero sin profundizar en ellas, de
  forma que no resulta tan grande y complejo como Eggdrop. Como ventaja
  añadida, 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
     automática.

  ·  Enviar mensajes (notices) a los usuarios recién llegados a un
     canal.

  ·  Controlar el acceso y configuración de modos y permisos
     independientemente para cada canal.

  ·  Acceder a redes que exigen claves.

  Otras características del Argobot son:


  ·  Se distribuye con el código fuente completo (escrito en lenguaje
     C), y que además puede compilarse bajo UNIX o en plataformas
     Windows.

  ·  Utiliza un fichero de configuración.

  ·  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 configuración y cargar de nuevo el bot
     sin que los usuarios adviertan ningún cambio ni interrupción del
     servicio.


  4.3.  Instalación


  El Argobot se puede conseguir en la página web de su creador
  (http://www.argo.es/~jcea/irc/argobot.htm). Existen multitud de
  versiones, algunas desarrolladas específicamente para alguna gran red,
  y además se pueden conseguir una veintena de parches que corrigen
  algunos defectos y añaden nuevas características.

  Si optamos por obtener el Argobot por Internet, descubriremos que
  apenas incluye unos pocos ficheros (código fuente C), y como única
  documentación un fichero README muy breve. Para paliar esta
  deficiencia, su autor a puesto toda la documentación disponible a
  través de Internet, en forma de páginas web. Es necesario, por tanto,
  descargar estas páginas 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 código fuente.

  ·  argo_parser.c: código fuente que interpreta el fichero de
     configuración.

  ·  argobot.conf: fichero de configuración.

  ·  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á vacío), 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 características más avanzadas
  del Argobot, como es la propagación de líneas K (sólo tiene sentido en
  redes de varios servidores), será necesario seguir las instrucciones
  relativas a los permisos y el fichero ircd.conf.


  4.4.  Edición del código fuente


  Antes de compilar, es conveniente comprobar que el código 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 método recomendado),
     nos aseguraremos de que está definido SEGURIDAD (con la sentencia
     #define SEGURIDAD), y que las macros UID y GID tienen valores
     apropiados. Si además vamos a hacer un CHROOT (que es una medida
     adicional de seguridad), definiremos el directorio que debe tomar
     como raíz con la sentencia #define CHROOT <directorio>.

  ·  Si vamos a ejecutar el bot como un usuario distinto a root, debemos
     eliminar el símbolo SEGURIDAD (con la sentencia #undef SEGURIDAD).

  Además de estas modificaciones, podemos definir el símbolo VERBOSE
  para que se impriman en la pantalla todos los mensajes que el servidor
  envía al Argobot. Otro símbolo 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.  Compilación


  Como ya se ha indicado, el Argobot puede ser compilado bajo múltiples
  plataformas. En Linux, es suficiente con hacer:






  gcc -Wall -g argobot.c -o argobot
  chown root argobot
  chgrp root argobot




  La primera instrucción realiza la compilación, generando el fichero
  argobot. Con las dos siguientes, establecemos los propietarios de este
  fichero.


  4.6.  Configuración


  La tarea de configuración se limita al fichero argobot.conf, aunque
  también 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 líneas con
  comandos. Al hacer la instalación, se genera un fichero de ejemplo,
  pero lo más conveniente es modificarlo para adaptarlo a nuestras
  necesidades. Los comandos son:


  ·  IRCnick <nick>: indica cuál 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 conexión, 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
     estén utilizando el nick indicado en el comando nick.
     Inmediatamente después, se les expulsará mediante un kick.

  ·  umbral_kline <valor>: indica cuántos intentos de conexión se
     permitirán antes de poner una línea k local. El valor más corriente
     es cinco. Esto es una medida de protección contra los usuarios que
     tengan una actitud sospechosa.

  ·  timeout_klines <valor>: indica cuántos segundos permanecerá activa
     una línea k local. El valor más aconsejable es en torno a 900 (es
     decir, 15 minutos).

  ·  timeout_whowas <valor>: indica cada cuántos segundos hay que
     comprobar la presencia de clones (usuarios que están presentes bajo
     varios nicks, lo que suele ser síntoma de actividades peligrosas).
     Es conveniente un valor en torno a cinco.

  ·  timer <offset> <periodo> <comando>: se utiliza para enviar comandos
     periódicos al servidor de IRC, que se repetirán cada cierto número
     de segundos. El offset indica el retraso del primer envío.

  ·  set <alias> <máscara> [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 máscara, 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 pertenecerán los
     usuarios indicados a continuación.

  ·  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 carácter '#' se emplea para indicar comentarios, no debe
     escribirse en el campo canal. Por tanto, si escribimos linux,
     estamos refiriéndonos al canal #linux.

  Puede haber tantos comandos join como sean necesarios. Para cada uno
  de ellos, se pueden indicar opciones específicas para el canal,
  mediante los siguientes comandos:


  ·  autoop <grupo>: cualquier usuario del grupo indicado será
     automáticamente 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
     prácticamente todo, lo que no es muy aconsejable.

  Para nuestro sistema, el fichero argobot.conf es el siguiente:






















  #
  # Parámetros 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 líneas configuran distintos aspectos de la seguridad
  umbral_kline 5  # Máximo número 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 \
  automática
  timer 60 9999 topic #linux :Canal para los autenticos entendidos en \
  informática y sistemas operativos.

  # Pone un modo para reducir el consumo de ancho de banda
  timer 60 600 mode _argobot :+d





  4.7.  Ejecución


  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 depuración, pero resulta
  innecesario durante una ejecución 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 rápidamente,
  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 ejecución de una sesión 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.  Función de un cliente de IRC


  La función de un cliente de IRC es conectarse al servidor y filtrar la
  información disponible para cada usuario. Además, debe encargarse de
  enviar los mensajes y comandos que escribe el usuario mediante el
  protocolo de IRC.

  El cliente habitualmente reside en la máquina del usuario y se conecta
  al servidor a través 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 más 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 más conocidos son:


  ·  Kirc (ftp://ftp.kde.org/): el más antiguo cliente en el entorno
     KDE.  Tiene un entorno gráfico muy cuidado, pero carece de algunas
     características básicas.

  ·  Ksirc (http://www.ksirc.org/): también para el KDE y resultado de
     la evolución de un cliente en modo texto (el Sirc). Está todavía en
     fase de desarrollo.

  ·  Keric (http://www.indonesia-undernet.org/keirc): otro más que
     funciona bajo KDE y es uno de los más prometedores, aunque aún está
     muy lejos de poder ofrecer una versión completamente estable.

  ·  BitchX (http://www.bitchx.com/): el cliente en modo texto preferido
     por los usuarios de Linux.

  ·  ScrollZ (http://www.scrollz.com/): tiene características similares
     al BitchX, y es el más veterano de todos, lo que le permite
     alcanzar una buena velocidad y un gran nivel de optimización (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 gráfico.


  5.2.  Descripción de BitchX


  Entre sus características están:


  ·  Varias conversaciones en el mismo canal.

  ·  Múltiples servidores.

  ·  Autocompletado de nicks.


  ·  Soporte para scripts.

  ·  Cliente de FTP incorporado.

  ·  Nuevas características exclusivas, como son: cliente de correo
     integrado y un reproductor de CDs musicales.


  5.3.  Obtención e instalación


  El BitchX puede conseguirse en http://www.bitchx.com/, desde donde se
  pueden conseguir varios ficheros: uno de ellos contiene el paquete
  básico y los demás 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.  Configuración


  No contiene ningún fichero de configuración, 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.  Ejecución


  El ejecutable se llama BitchX-tcl, pero resulta conveniente crear un
  enlace simbólico 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, encargándose de las traducciones al castellano de los Howtos,
  así como de la producción de documentos originales en aquellos casos
  en los que no existe análogo en inglés, centrándose, preferentemente,
  en documentos breves, como los COMOs y PUFs (Preguntas de Uso
  Frecuente, las FAQs. :) ), etc.

  Diríjase a la sede del Insflug para más información al respecto.

  En ella encontrará siempre las últimas versiones de las traducciones
  «oficiales»:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  en los que estamos trabajando incesantemente.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  En http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  ¡Diríjase a http://www.insflug.org/colaboracion/index.php3 si desea
  unirse a nosotros!.

  «Cartel» Insflug, cartel@insflug.org.


















































  RAID-Software CÓMO
  Jakob Østergaard, jakob@ostenfeld.dk
  piernas@ditec.um.es
  v. 0.90.3 - Alpha, 22 mayo 1999

  Este CÓMO describe cómo usar un RAID software bajo Linux. Debería usar
  los parches RAID disponibles en ftp://ftp.fi.kernel.org/pub/linux/dae­
  mons/raid/alpha. El CÓMO original en inglés se puede encontrar en
  http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/.
  ______________________________________________________________________

  Índice general






















































  1. Introducción

     1.1 Renuncia de responsabilidad
     1.2 Requisitos

  2. ¿Por qué RAID?

     2.1 Detalles técnicos
     2.2 Términos
     2.3 Niveles RAID
        2.3.1 Discos de reserva
     2.4 Espacio de intercambio (

  3. Asuntos hardware

     3.1 Configuración 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. Configuración de RAID

     4.1 Configuración 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 Tamaños 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 Autodetección
     4.11 Arrancar desde RAID
        4.11.1 Método 1
        4.11.2 Método 2
     4.12 Dificultades

  5. Comprobación

     5.1 Simulación de un fallo de disco
     5.2 Simulación de corrupción 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.  Introducción



  Este CÓMO ha sido escrito por Jakob Østergaard basándose en un gran
  número 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 razón por la que se ha escrito este CÓMO, a pesar de existir ya un
  RAID-Software CÓMO es que el anterior describe el estilo antiguo de
  RAID por software, presente en los núcleos existentes. Este CÓMO
  describe el uso del «nuevo estilo» de RAID que se ha desarrollado más
  recientemente.  Éste nuevo estilo de RAID tiene muchas características
  no presentes en el anterior.

  Parte de la información de este CÓMO le puede parecer trivial si es un
  entendido en RAID. Sáltese esas partes.


  1.1.  Renuncia de responsabilidad


  La declinación obligatoria de responsabilidades:

  Aunque el código 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 camión o cualquier otra
  cosa, no será culpa mía ni de los desarrolladores. ¡Conciéncese de que
  usa el software RAID y esta información por su cuenta y riesgo!. No
  hay ningún tipo de garantía de que ningún software ni esta información
  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. Más vale prevenir que lamentarse.


  1.2.  Requisitos


  Este CÓMO asume que está usando alguna de las últimas versiones 2.2.x
  o 2.0.x del núcleo con un parche raid0145 acorde y la versión 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 núcleo deben concordar tanto como sea
  posible. En ocasiones puede ser necesario usar un núcleo 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 físicos en un único dispositivo
  «virtual» más grande, o mejoras en el rendimiento y redundancia.


  2.1.  Detalles técnicos


  El RAID de Linux puede funcionar sobre la mayoría 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.

  Asegúrese de que el bus (o buses) de los discos son lo suficientemente
  rápidos. No debería tener 14 discos UW-SCSI en un único bus UW, si
  cada disco puede dar 10MB/s y el bus sólo puede sostener 40MB/s.
  Además, sólo debería tener un dispositivo por bus IDE. El uso de
  discos como maestro/esclavo es funesto para el rendimiento. IDE es
  realmente ineficiente accediendo a más 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 más
  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 haría con cualquier otro dispositivo
  de bloques.



  2.2.  Términos


  La palabra RAID se refiere a RAID por software de Linux.  Este CÓMO no
  trata ningún aspecto de RAID por hardware.

  Cuando se describen configuraciones, es útil referirse al número de
  discos y sus tamaños. En todos los casos se usa la letra N para
  denotar el número de discos activos en el array (sin contar los discos
  de reserva). La letra S es el tamaño del disco más pequeño 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 rápidos, 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 descripción de lo que soportan los parches
  RAID de Linux. Parte de esta información es información RAID
  absolutamente básica, aunque he añadido unas pocas reseñas de lo que
  hay de especial en la implementación de Linux de los niveles.
  Simplemente, sáltese esta sección si conoce RAID. Regrese después
  cuando tenga problemas :)

  Los actuales parches RAID para Linux soportan los siguientes niveles:


  ·  Modo Lineal (Linear mode)

  ·  Dos o más discos se combinan en un único dispositivo físico. Los
     discos se «adjuntan» unos a otros de tal manera que las escrituras
     en el dispositivo RAID primero llenarán el disco 0, a continuación
     el disco 1 y así sucesivamente. Los discos no tienen porqué ser del
     mismo tamaño. De hecho, los tamaños no importan para nada aquí :)

  ·  No existe redundancia en este nivel. Si un disco falla perderá toda
     su información con toda probabilidad. Sin embargo, puede tener
     suerte y recuperar algunos datos, ya que el sistema de ficheros
     simplemente habrá perdido un gran puñado 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

  ·  También llamado modo striping o de distribución 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 tamaño.  Puesto que todos los accesos se realizan en
     paralelo, los discos se llenan por igual. Si un dispositivo es
     mucho mayor que los otros demás, el espacio extra se utilizará en
     el dispositivo RAID durante las escrituras en el extremo superior,
     aunque sólo se accederá a este disco más 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 ningún 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 pequeños 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 razón principal para usar
     RAID-0. Si los buses a los discos son suficientemente rápidos,
     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 más discos con cero o más discos de reserva.
     Este modo mantiene en un disco un duplicado exacto de la
     información del otro(s) disco(s). Por supuesto, los discos deben
     ser del mismo tamaño. Si un disco es mayor que otro, su dispositivo
     RAID será del tamaño del disco más pequeño.

  ·  Si se eliminan (o fallan) hasta N-1 discos, los datos permanecerán
     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 reconstrucción de un
     duplicado en uno de los discos de reserva, después de la detección
     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
     transferiría (recuerde, se deben enviar N copias idénticas 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 más discos. En lugar de duplicar completamente la
     información, guarda información 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 información de paridad, el
     tamaño del array será (N-1)*S, donde S es el tamaño del disco más
     pequeño del array.  Como en un RAID-1, los discos deben ser del
     mismo tamaño, o de lo contrario tendrá que aceptar que el valor de
     S en la fórmula (N-1)*S anterior será el tamaño del disco más
     pequeño del array.

  ·  Si un disco falla, y no es el de paridad, se puede usar la
     información de paridad para reconstruir todos los datos. Si dos
     discos fallan, se perderá toda la información.  .

  ·  La razón por la que este nivel no se usa con mucha frecuencia es
     que la información de paridad se guarda en un único disco. Esta
     información 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 más rápido que los otros discos.
     Sin embargo, si por pura casualidad tuviera muchos discos lentos y
     un disco muy rápido, este nivel de RAID podría resultarle muy útil.


  ·  RAID-5

  ·  Este es quizás el modo RAID más útil cuando uno desea combinar un
     mayor número de discos físicos y todavía conservar alguna
     redundancia.  RAID-5 se puede usar sobre 3 o más discos, con cero o
     más discos de reserva.  El tamaño 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 información 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 permanecerán intactos,
     gracias a la información de paridad. Si existen discos de reserva
     disponibles, la reconstrucción comenzará inmediatamente después del
     fallo del dispositivo. Si dos discos fallan simultáneamente, todos
     los datos se perderán. RAID-5 puede sobrevivir a un fallo de disco,
     pero no a dos o más.

  ·  Normalmente, el rendimiento de las lecturas y las escrituras se
     incrementará, pero es difícil 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 reconstrucción
  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 difíciles de
  lograr (físicamente). Se puede permitir que el sistema funcione
  durante algún 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 caída de
  disco.  La capa RAID puede que maneje los fallos de dispositivos
  verdaderamente bien, pero las controladoras SCSI podrían fallar
  durante el manejo del error o el chipset IDE podría bloquearse, o
  muchas otras cosas.



  2.4.  Espacio de intercambio ( swap ) sobre RAID


  No hay ninguna razón para usar RAID a fin de aumentar el rendimiento
  del sistema de paginación de memoria (swap). El propio núcleo 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 configuración permite a la máquina paginar en paralelo sobre
  siete dispositivos SCSI. No necesita RAID, ya que esa ha sido una
  característica del núcleo desde hace mucho tiempo.

  Otra razón por la que podría interesar usar RAID para swap es la alta
  disponibilidad. Si configura un sistema para arrancar desde, por
  ejemplo, un dispositivo RAID-1, el sistema podría 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 solucionaría
  este problema.

  Sin embargo, el intercambio sobre RAID-{1,4,5} NO está soportado.
  Puede configurarlo, pero fracasará. La razón 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 núcleo
  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 sección mencionará algunos de los asuntos hardware involucrados
  en el funcionamiento de un RAID software.


  3.1.  Configuración IDE


  En efecto, es posible hacer funcionar un RAID sobre discos IDE.
  También 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 física: tradicionalmente, los discos IDE han sido de
     peor calidad mecánica que los discos SCSI. Incluso hoy en día, la
     garantía de los discos IDE es típicamente de un año, mientras que,
     a menudo, es de 3 a 5 años en los discos SCSI. Aunque no es justo
     decir que los discos IDE son por definición de menor calidad, uno
     debería ser consciente de que los discos IDE de algunas marcas
     pueden fallar con más frecuencia que los discos SCSI similares.
     Sin embargo, otras marcas usan exactamente la misma estructura
     mecánica tanto para los discos SCSI como para los discos IDE. Todo
     se reduce a: todos los discos fallan, tarde o temprano, y uno
     debería estar preparado para ello.


  ·  Integridad de los datos: al principio, IDE no tenía forma de
     asegurar que los datos enviados a través 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 verificación (checksums),
     etc. Ahora, con el estándar UltraDMA, los dispositivos IDE realizan
     una suma de verificación 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 sería:


  ·  Los dispositivos IDE son rápidos (12 MB/s y más)

  ·  IDE tiene una mayor sobrecarga de CPU que SCSI (pero, ¿a quién le
     preocupa?)

  ·  Sólo 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 máquina debería trabajar igual de bien hasta que la
     desconecte para su mantenimiento.

  Es muy importante que sólo use un disco IDE por bus IDE.  Dos discos
  no sólo arruinarían el rendimiento sino que, también, 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 configuración 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. También,
  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 dólares. Considerando el precio mucho más bajo de
  los discos IDE respecto a los discos SCSI, diría que un array de
  discos IDE podría ser una solución realmente buena si uno puede vivir
  con los relativamente pocos discos (unos 8 probablemente) que se
  pueden conectar a un sistema típico (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
  algún tiempo. Aunque el intercambio en caliente de los dispositivos
  está soportado hasta cierto punto, todavía no es algo que se pueda
  hacer fácilmente.


  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
  módulo (sólo posible en la serie 2.2.x del núcleo) y lo vuelve a
  cargar después de que haya reemplazado el dispositivo. Pero también
  puede terminar perfectamente con una controladora IDE frita y
  observará que el período 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 eléctricos que pueden
  destruir su hardware, es que se debe reexplorar el bus IDE después de
  que se hayan intercambiado los discos. El manejador IDE actual no
  puede hacer eso. Si el nuevo disco es 100% idéntico al antiguo
  (geometría, etc.)  puede que funcione incluso sin volver a explorar el
  bus pero, créame, 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 reexploración del bus y la conexión y desconexión de
  dispositivos, puede ser capaz de intercambiar dispositivos en
  caliente.  Sin embargo, en un bus SCSI normal probablemente no debería
  desenchufar dispositivos mientras su sistema esté todavía encendido.
  Pero, le repito, puede que funcione simplemente (y también puede
  terminar con su hardware frito).

  La capa SCSI debería sobrevivir si un disco muere, pero no todos los
  manejadores SCSI soportan esto todavía. Si su manejador SCSI muere
  cuando un disco cae, su sistema caerá con él y la conexión en caliente
  no será verdaderamente interesante entonces.


  3.2.3.  Intercambio en caliente con SCA


  Con SCA debería ser posible conectar dispositivos en caliente. Sin
  embargo, no poseo el hardware para probar esto y no he oído de nadie
  que lo haya probado, por lo que verdaderamente no puedo dar ninguna
  receta de cómo hacer esto.

  De todos modos, si quiere jugar con esto, debería 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 conexión y desconexión de
  dispositivos. En la serie 2.2 del núcleo, al menos los manejadores de
  la controladoras Adaptec 2940 y Symbios NCR53c8xx parecen soportarlo,
  mientras que otras puede que sí o puede que no. Agradecería que
  alguien me pasara más información sobre esto...


  4.  Configuración de RAID



  4.1.  Configuración general


  Esto es lo que necesita para cualquiera de los niveles RAID:


  ·  Un núcleo.  Obtenga la versión 2.0.36 o un núcleo 2.2.x reciente.

  ·  Los parches RAID.  Normalmente existe un parche disponible para los
     núcleos recientes.

  ·  El paquete de herramientas RAID (raidtools).

  ·  Paciencia, una pizza y su bebida con cafeína favorita.

  Todo este software se puede encontrar en
  ftp://ftp.fi.kernel.org/pub/linux;.  Las herramientas RAID y los
  parches están en el subdirectorio daemons/raid/alpha. Los núcleos se
  encuentran en el subdirectorio kernel.

  Parchee el núcleo, configúrelo para incluir el soporte del nivel RAID
  que quiera usar. Compílelo e instálelo.

  A continuación desempaquete, configure, compile e instale las
  herramientas RAID.

  Hasta ahora todo va bien. Si rearranca ahora, debería tener el fichero
  /proc/mdstat. Recuérdelo, 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 específico.


  4.2.  Modo lineal


  De acuerdo, así que tiene dos o más particiones que no son
  necesariamente del mismo tamaño (pero que, naturalmente, pueden serlo)
  que quiere adjuntar unas con otras.

  Prepare el fichero /etc/raidtab para describir su configuración. 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 información 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 haría con
  cualquier otro dispositivo, montarlo, incluirlo en su /etc/fstab, etc.


  4.3.  RAID-0


  Tiene dos o más dispositivos, de aproximadamente el mismo tamaño, y
  quiere combinar sus capacidades de almacenamiento y rendimiento
  accediéndolos en paralelo.

  Prepare el fichero /etc/raidtab para describir su configuración. 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 acompaña.

  Una vez más, 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. Debería 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 tamaño y quiere que
  cada uno de los dos sea un duplicado del otro. Finalmente, tiene más
  dispositivos que quiere guardar como discos de reserva preparados, que
  automáticamente formarán 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 añadirlos al final de la
  especificación 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 inicialización del
  RAID.  Se debe construir el duplicado, es decir, los contenidos (de
  todos modos, sin importancia ahora, ya que el dispositivo todavía está
  sin formatear) de los dos dispositivos se deben sincronizar.

  Dé la orden


         mkraid /dev/md0




  para comenzar la inicialización 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 terminación de
  la reconstrucción.

  La reconstrucción se realiza usando el ancho de banda libre de E/S. De
  esta manera, su sistema debe ser capaz todavía de responder en gran
  medida, aunque los LEDs de sus discos deben parpadear lozanamente.

  El proceso de reconstrucción es transparente, por lo que realmente
  puede usar el dispositivo aunque la duplicación esté actualmente en
  curso.

  Intente formatear el dispositivo mientras la reconstrucción se esté
  realizando. Funcionará. También puede montarlo y usarlo mientras la
  reconstrucción se esté realizando. Naturalmente, si el disco
  equivocado se rompe mientras se está realizando la reconstrucción, no
  hay solución.


  4.5.  RAID-4



  ¡Nota! No he comprobado esta configuración por mí mismo. La
  configuración de más abajo es mi mejor suposición, no algo que
  realmente haya tenido funcionando.

  Tiene tres o más dispositivos de aproximadamente el mismo tamaño, un
  dispositivo es significativamente más rápido que los otros
  dispositivos y quiere combinarlos todos en un único dispositivo más
  grande, conservando todavía alguna información 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 tuviéramos discos de reserva, se insertarían 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.

  Debería ver la sección ``'' de opciones especiales de mke2fs antes de
  formatear el dispositivo.


  4.6.  RAID-5


  Tiene tres o más dispositivos de aproximadamente el mismo tamaño,
  quiere combinarlos en un dispositivo mayor, pero conservando todavía
  cierto grado de redundancia para la seguridad de datos. Finalmente,
  tiene varios dispositivos para usar como discos de reserva, que no
  tomarán parte en el array antes de que otro dispositivo falle.

  Si usa N dispositivos donde el tamaño del más pequeño es S, el tamaño
  de todo el array será (N-1)*S. El espacio que falta se usa para
  información de paridad (redundancia). De esta manera, si cualquier
  disco falla, todos los datos permanecerán intactos. Pero si dos discos
  fallan, todos los datos se perderán.

  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 tuviéramos discos de reserva, se insertarían de forma parecida,
  siguiendo las especificaciones de discos RAID;



               device         /dev/sdh1
               spare-disk     0




  Y así sucesivamente.

  Un tamaño de segmento de 32KB es un buen valor por defecto para muchos
  sistemas de ficheros de propósito 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 tamaño de bloque de 4KB. Podría
  incrementar tanto el tamaño del segmento unitario del array como el
  tamaño 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 reconstrucción de su
  array. Échele un vistazo a /proc/mdstat para ver qué está sucediendo.

  Si el dispositivo se ha creado correctamente, el proceso de
  reconstrucción comenzará ahora. Su array no será consistente hasta que
  esta fase de reconstrucción 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 sección ``'' 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 número
  astronómico de veces hasta hacer que funcione, siga leyendo y haga
  funcionar la autodetección.


  4.7.  El superbloque persistente


  Si volviéramos a aquellos maravillosos días (The Good Old Days (TM)),
  las herramientas RAID (raidtools) leerían su fichero /etc/raidtab y a
  continuación inicializarían el array. Sin embargo, esto requeriría que
  el sistema de ficheros sobre el que reside /etc/raidtab estuviera
  montado. Esto es imposible si quiere arrancar a partir de un RAID.

  También, la anterior aproximación producía complicaciones al montar
  sistemas de ficheros sobre dispositivos RAID. Éstos no se podían
  colocar en el fichero /etc/fstab como era usual, sino que tenían que
  ser montados en los guiones (scripts) de inicio.

  Los superbloques persistentes solucionan estos problemas. Cuando un
  array se inicializa con la opción 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 núcleo leer la
  configuración de los dispositivos RAID directamente de los discos
  involucrados, en lugar de leerla de algún fichero de configuración que
  puede no estar disponible en todo momento.
  Sin embargo, todavía debería mantener un fichero /etc/raidtab
  consistente, ya que puede necesitar este fichero para una
  reconstrucción posterior del array.

  Los superbloques persistentes son obligatorios si desea la
  autodetección de sus dispositivos RAID durante el arranque del
  sistema. Esto se describe en la sección ``''.



  4.8.  Tamaños de segmento unitario


  El tamaño de segmento unitario merece una explicación.  Nunca puede
  escribir de forma totalmente paralela a un grupo de discos. Si tuviera
  dos discos y quisiera escribir un byte, tendría que escribir cuatro
  bits en cada disco; realmente, todos los segundos bits irían al disco
  0 y los otros al disco 1.  Sencillamente, el hardware no soporta eso.
  En su lugar, elegimos algún tamaño de de segmento unitario que
  definimos como la masa atómica más pequeña de datos que puede ser
  escrita en los dispositivos. Una escritura de 16 KB con un tamaño de
  segmento unitario de 4 KB provocaría 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, podría observar menor sobrecarga
  teniendo segmentos lo suficientemente grandes, mientras que los arrays
  que contuvieran principalmente ficheros pequeños se podrían beneficiar
  más de un tamaño de segmento unitario más pequeño.

  Los tamaños de segmento unitario se pueden especificar para todos los
  niveles de RAID excepto para el modo lineal.

  Para un rendimiento óptimo, debería experimentar con el valor, así
  como con el tamaño de bloque del sistema de ficheros que pusiera en el
  array.

  El argumento de la opción chunk-size en /etc/raidtab especifica el
  tamaño 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 tamaño 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 continuación los 4 KB restantes al disco 0.

  Un tamaño de segmento unitario de 32 KB es un punto de partida
  razonable para la mayoría de los arrays. Pero el valor óptimo depende
  muchísimo del número 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 tamaño 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 tamaño de segmento
  unitario indica cuántos datos leer consecutivamente de los discos
  participantes. Ya que todos los discos activos del array contienen la
  misma información, 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, también se debe
  actualizar la información de paridad en el disco de paridad. El tamaño
  de segmento unitario es el tamaño de los bloques de paridad. Si se
  escribe un byte a un array RAID-4, entonces se leerán chunk-size bytes
  de los N-1 discos, se calculará la información de paridad y se
  escribirán chunk-size bytes al disco de paridad.

  El tamaño 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 tamaño de segmento unitario tiene exactamente el mismo
  significado que en un RAID-4.

  Un tamaño de segmento unitario razonable para un RAID-5 es 128 KB
  pero, como siempre, puede desear experimentar con éste.

  También consulte la sección ``'' de opciones especiales de mke2fs.
  Esto afecta al rendimiento de un RAID-5.


  4.9.  Opciones de mke2fs


  Hay disponible una opción especial cuando se formatean dispositivos
  RAID-4 y RAID-5 con mke2fs. La opción -R stride=nn permitirá a mke2fs
  situar mejor diferentes estructuras de datos específicas de ext2 en un
  dispositivo RAID de forma inteligente.

  Si el tamaño de segmento unitario es 32 KB significa que 32 KB de
  datos consecutivos residirán en un único disco. Si queremos construir
  un sistema de ficheros ext2 con un tamaño 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 información 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
  opción. No estoy seguro de cómo la opción stride afectará a otros
  niveles RAID. Si alguien tiene información sobre esto, por favor, que
  la envíe a mi dirección email.


  4.10.  Autodetección


  La autodetección permite a los dispositivos RAID ser automáticamente
  reconocidos por el núcleo durante el arranque, justo después de que se
  realice la detección ordinaria de particiones.
  Esto requiere varias cosas:


  1. Necesita todo el soporte necesario para autodetección (SCSI, IDE,
     RAID, etc) en el núcleo (no como módulo) 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 partición de los dispositivos usados en el RAID se debe
     establecer a 0xFD (use fdisk y establezca el tipo a fd)

  NOTA: asegúrese 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 autodetección debería
  activarse.  Pruebe rearrancar. Cuando el sistema se levante, vea el
  contenido de /proc/mdstat; debería decirle que su RAID está
  funcionando.

  Durante el arranque, podría 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 autodetección de un array RAID-5 que no fue
  limpiamente desactivado (es decir, la máquina se cayó). La
  reconstrucción se inicia automáticamente. Montar este dispositivo es
  perfectamente seguro, ya que la reconstrucción es transparente y todos
  los datos son consistentes (sólo es la información de paridad la que
  es inconsistente - aunque la misma no se necesita hasta que un
  dispositivo falle).

  Los dispositivos autoarrancados también son automáticamente 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 fácil.

  Quizás 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 estándares de RedHat). Se usan para el antiguo estilo de
  RAID y no tienen utilidad en el nuevo estilo de RAID con
  autodetección.  Elimine las líneas y todo irá perfectamente bien.


  4.11.  Arrancar desde RAID


  Existen varias formas de configurar un sistema que monta su sistema de
  ficheros raíz 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 raíz durante el proceso de instalación. 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 núcleo 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 configuración 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.  Método 1


  Este método asume que posee un disco de reserva en el que puede
  instalar el sistema y que no es parte del RAID que configurará más
  adelante.


  ·  Primero, instale un sistema normal en su disco extra.

  ·  Obtenga el núcleo que piensa ejecutar, obtenga los parches y las
     herramientas RAID y haga que su sistema arranque con el nuevo
     núcleo con soporte RAID. Asegúrese de que el soporte RAID está
     dentro del núcleo y que no se carga como módulo.

  ·  Ahora debe configurar y crear el RAID que tiene pensado usar para
     el sistema de ficheros raíz. Éste es un procedimiento estándar 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. Debería aparecer.


  ·  Coloque un sistema de ficheros sobre el nuevo array (usando
     mke2fs), y móntelo en /mnt/newroot.

  ·  Ahora, copie el contenido de su sistema de ficheros raíz actual (el
     disco extra) al nuevo sistema de ficheros raíz (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 raíz /dev/md?) para el sistema
     de ficheros raíz.

  ·  Ahora, desmonte el sistema de ficheros /boot actual y móntelo 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 todavía
     un disco normal (no un dispositivo RAID) pero el dispositivo raíz
     debe apuntar a su nuevo RAID. Cuando esté hecho, ejecute lilo -r
     /mnt/newroot Esta ejecución de LILO debería terminar sin errores.

  ·  Rearranque el sistema y observe que todo aparece como se esperaba
     :)

  Si está haciendo esto con discos IDE, asegúrese de indicarle a su BIOS
  que todos los discos son del tipo «auto-detect», así la BIOS permitirá
  a su máquina arrancar incluso cuando un disco haya fallado.


  4.11.2.  Método 2


  Este método 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).

  Sólo puede utilizar este método 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 continuación el sistema en el
  RAID que estará funcionando en modo degrado y finalmente hacer que el
  RAID use el ya no necesario disco de instalación, aniquilando la
  anterior instalación pero haciendo que el RAID funcione en modo no
  degradado.


  ·  Primero, instale un sistema normal sobre un disco (que más tarde
     formará parte de su RAID). ¡Es importante que este disco (o
     partición) no sea el más pequeño. Si lo es, no será posible
     añadirlo al RAID más tarde!

  ·  A continuación, obtenga el núcleo, los parches, las herramientas,
     etc., etc. Ya conoce el ejercicio. Haga que su sistema arranque con
     un nuevo núcleo que tenga el soporte RAID que necesita compilado
     dentro del núcleo.
  ·  Ahora, configure el RAID con su dispositivo raíz 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 debería hacerlo.

  ·  Copie los ficheros del sistema y reconfigure el sistema para usar
     el RAID como dispositivo raíz, como se ha descrito en la sección
     ``'' 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 añadir el
     disco a su sistema RAID.

  ·  Ahora debería 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 después.

  Es fácil 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 día. Por supuesto, colocar seis de
  tales discos en un bus no le proporcionará el aumento de rendimiento
  esperado.

  La mayoría de los controladores SCSI sólo le proporcionarán un
  rendimiento extra si los buses SCSI son llevados prácticamente al
  máximo 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 opción persistent-superblock puede que su array no
  arranque por las buenas después de que haya sido parado. Simplemente,
  recree el array con la opción colocada correctamente en el fichero
  /etc/raidtab.

  Si un RAID-5 no logra reconstruirse después 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 descripción del array en el fichero raidtab.


  5.  Comprobación


  Si piensa usar un RAID para obtener tolerancia a fallos, también puede
  que quiera comprobar su configuración para ver si realmente funciona.
  Ahora bien, ¿cómo se simula un fallo de disco?.

  El resumen es que no puede, salvo quizás 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
  eléctricamente del bus al que está conectado, haciendo que todas las
  unidades de ese bus sean inaccesibles, aunque nunca he oído que eso
  haya ocurrido. La unidad también 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 situación de forma elegante. Afortunadamente,
  esta es la forma en la que normalmente ocurren las cosas.


  5.1.  Simulación 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 enciéndalo 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 fallarán
  totalmente cuando se pierda un dispositivo.

  Cuando haya reconectado el disco de nuevo (recuerde, con el sistema
  apagado, naturalmente) podrá añadir el nuevo dispositivo al RAID otra
  vez, con la orden raidhotadd.


  5.2.  Simulación de corrupción 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
  corromperán. Naturalmente, esto es muy improbable que ocurra, pero es
  posible, y produciría un sistema de ficheros corrupto.

  Un RAID no puede y no está pensado para proteger contra la corrupción
  de datos del medio de almacenamiento físico. Por tanto, tampoco tiene
  ningún sentido corromper a propósito los datos de un disco (usando dd,
  por ejemplo) para ver cómo manejará el sistema RAID esa situación. Es
  más probable (a menos que corrompa el superbloque del RAID) que la
  capa RAID no descubra nunca la corrupción, 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
  garantía 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 sección contiene varias pruebas de evaluación 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 más veces más grandes que el tamaño de la RAM
  física de la máquina.

  Estas evaluaciones sólo 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 máximo rendimiento de E/S para grandes
  lecturas/escrituras. Sin embargo, tales números nos dicen poco sobre
  cuál sería el rendimiento si el array se usara para un almacén
  temporal de noticias, un servidor web, etc. etc. Tenga siempre en
  cuenta que los números de las evaluaciones son el resultado de
  ejecutar un programa sintético.  Pocos programas del mundo real hacen
  lo que bonnie hace y, aunque es interesante mirar estos números de
  E/S, no son indicadores en última instancia del rendimiento de los
  dispositivos del mundo real.

  Por ahora, sólo poseo resultados de mi propia máquina. La
  configuración 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

  ·  Núcleo 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 más de 30 MB/s a través de los buses SCSI
  de este sistema, usando un RAID o no. Mi suposición 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 través de las
  controladoras SCSI.


  6.1.  RAID-0


  Lectura significa entrada de bloques secuencial y Escritura significa
  salida de bloques secuencial. El tamaño 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).


  |                             |                    |                |                  |
  |Tamaño de segmento unitario  |  Tamaño 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 tamaño de segmento unitario del RAID no
  importa mucho.  Sin embargo, el tamaño de bloque del sistema de
  ficheros ext2 debería ser tan grande como fuera posible, lo cual
  significa 4KB (es decir, el tamaño de página) 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 demás, todo es lo mismo de antes.


  |                             |                    |                |                  |
  |Tamaño de segmento unitario  |  Tamaño de bloque  |  Lectura KB/s  |  Escritura KB/s  |
  |                             |                    |                |                  |
  |32k                          |  4k                |  33617         |  27215           |



  No se realizaron más 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.


  |                             |                    |                |                  |
  |Tamaño de segmento unitario  |  Tamaño 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 tamaño de segmento unitario como el tamaño 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 tamaño de segmento unitario es tanto el tamaño de las
  porciones del array RAID-1 como del array RAID-0. No realicé pruebas
  en las que esos tamaños de segmento unitario fueran diferentes, aunque
  esa debería ser una configuración perfectamente válida.


  |                             |                    |                |                  |
  |Tamaño de segmento unitario  |  Tamaño de bloque  |  Lectura KB/s  |  Escritura KB/s  |
  |                             |                    |                |                  |
  |32k                          |  1k                |  13753         |  11580           |
  |32k                          |  4k                |  23432         |  22249           |



  No se realizaron más pruebas. El tamaño 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 configuración
  (RAID-1 sobre dos arrays de 1000MB).



  7.  Agradecimientos


  Las siguientes personas han contribuido a la creación 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, envíe correcciones, sugerencias, etc. al autor. Es la única
  forma en que este CÓMO puede mejorar.

  Envíe correcciones, sugerencias, etc. sobre esta traducción al español
  a Juan Piernas Cánovas (piernas@ditec.um.es).


  8.  Anexo: El INSFLUG


  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones «oficiales»:  www.insflug.org. Asegúrese de comprobar
  cuál es la última versión disponible en el Insflug antes de bajar un
  documento de un servidor réplica.

  Además, cuenta con un sistema interactivo de gestión de fe de erratas
  y sugerencias en línea, motor de búsqueda específico, y más servicios
  que estamos trabajando incesantemente para añadir.

  Se proporcionará también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  en http://www.insflug.org/insflug/creditos.php3 cuenta con una
  detallada relación de las personas que hacen posible tanto esto como
  las traducciones.

  Diríjase 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 cómo configurar los drivers del
  núcleo y contesta a las preguntas más frecuentes. Intenta enseñar más
  rápido a los nuevos usuarios y reducir el gran tráfico en los grupos
  de noticias de Usenet.
  ______________________________________________________________________

  Índice General:

  1.      Introducción.

  1.1.    Reconocimientos.

  1.2.    Nuevas versiones de este documento.

  1.3.    Sugerencias, críticas y comentarios.

  1.4.    Política de distribución.

  2.      Tecnología 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.      Instalación.

  4.1.    Instalar la tarjeta de sonido.

  4.2.    Configurar el núcleo.

  4.3.    Creando los ficheros de dispositivo.

  4.4.    Inicializando Linux y comprobando la instalación.

  4.5.    Resolución de problemas.

  4.5.1.  Punto 1: asegúrate de que realmente estás ejecutando el núcleo
  compilado.

  4.5.2.  Punto 2: asegúrate de que los drivers de sonido del núcleo
  están compilados en él.

  4.5.3.  Punto 3: ¿Detectó el núcleo tu tarjeta de sonido durante la
  inicialización?

  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.    ¿Cuáles son los ficheros de dispositivo de sonido?

  6.2.    ¿Cómo puedo reproducir una muestra de sonido?

  6.3.    ¿Cómo puedo grabar una muestra?

  6.4.    ¿Puedo tener más 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.    ¡Todavía tengo errores de dispositivo ocupado (device busy)!

  6.10.   Reproducción parcial de un fichero de sonido digitalizado.

  6.11.   Hay pausas cuando reproduzco ficheros MOD.

  6.12.   Tengo errores de compilación 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 configuración del driver
  de sonido?

  6.16.   ¿Dónde están documentados los ioctls()  del driver de sonido?

  6.17.   ¿Cúales 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 simultáneamente?

  6.21.   Mi SB16 está puesta con un IRQ 2, pero la configuración no me
  deja usar este valor.

  6.22.   ¿Son soportadas la SoundBlaster AWE32 o la SoundBlaster16 ASP?

  6.23.   Si estoy en Linux y después inicio una sesión de DOS, tengo
  errores y/o las aplicaciones de sonido no funcionan correctamente.

  6.24.   Problemas ejecutando DOOM bajo Linux.

  6.25.   ¿Cómo 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" sólo funciona si primero la
  inicializo bajo MS-DOS.

  6.28.   Mi tarjeta de sonido "compatible" SoundBlaster 16-bit sólo
  funciona en el modo 8-bit bajo Linux

  6.29.   ¿Dónde puedo encontrar aplicaciones de sonido para Linux?

  6.30.   ¿Puede el driver de sonido ser compilado como módulo 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
  configuración?

  6.36.   ¡Las opciones del mezclador son borradas cuando cargo el
  módulo del driver de sonido!

  6.37.   Solamente el root puede grabar sonido.

  7.      Referencias

  8.      Acerca de la traducción.

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción.

  Este es el documento Linux Sound HOWTO. Debe ser entendido como una
  guía de referencia rápida que cubre todo lo que necesitas saber para
  instalar y configurar el soporte de sonido bajo Linux. Se contestan
  las preguntas más frecuentes sobre el sonido en Linux, además de
  incluir referencias a otras fuentes de información sobre múltiples
  características relativas a la generación de sonido y música por
  ordenador.

  El alcance está limitado a los aspectos sobre las tarjetas de sonido
  relacionadas con Linux. Remítase a los otros documentos listados en la
  sección Referencias para información más general sobre tarjetas de
  sonido y generación de sonido y música por ordenador.

  1.1.  Reconocimientos.

  La mayor parte de esta información proviene de los ficheros README que
  vienen junto con el código 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 núcleo 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 serán enviadas periódicamente al
  grupo de noticias comp.os.linux.answers. También serán enviadas a
  varios ftp anónimos que archivan este tipo de información, incluyendo
  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/.
  Versiones de hipertexto de éste y otros HOWTOs están disponibles en
  múltiples sites, incluyendo http://sunsite.unc.edu/mdw/mdw.html La
  mayoría de las distribuciones de Linux en formato CD-ROM incluyen los
  HOWTOs en el directorio /usr/doc/, aunque también los puedes comprar
  en formato impreso a muchos vendedores.

  Una traducción en francés de este documento está disponible en
  ftp://ftp.ibp.fr/pub2/linux/french/docs/HOWTO/.

  Una traducción en japonés de este documento está disponible en
  http://yebisu.ics.es.osaka-u.ac.jp/linux/.

  Una traducción en italiano de este documento está disponible en
  http://www.psico.unipd.it/ildp/docs/HOWTO/Sound-HOWTO.html.

  Si haces una traducción de este documento en otro lenguaje,
  comunícamelo y lo incluiré como una referencia en este apartado.

  1.3.  Sugerencias, críticas y comentarios.

  Confío que a tí, el usuario, este documento te sea de utilidad. Si
  tienes alguna sugerencia, corrección, o comentario, por favor
  envíamelos jeff_tranter@mitel.com, y trataré de incorporarlas en la
  próxima revisión.

  También estoy deseando contestar preguntas generales sobre tarjetas de
  sonido y Linux, tan bien como pueda. Antes de hacerlo, por favor lee
  toda la información de este HOWTO, y envíame información detallada
  sobre el problema.

  Si tú publicas este documento en un CD-ROM o impreso en papel, una
  copia complementaria será apreciada. Envíame un email para decirte mi
  dirección postal. Considera también hacer una donación al Linux
  Documentation Project para ayudar a soportar la libre documentación de
  Linux. Contacta con el coordinador de los HOWTO de Linux, Greg Hankins
  gregh@sunsite.unc.edu para más información.

  1.4.  Política de distribución.

  Copyright (C) 1996 Jeff Tranter.

  Este HOWTO es documentación libre; lo puedes redistribuir y/o
  modificar bajo los términos de la licencia pública general del GNU
  como publicó la Free Software Foundation.

  Este documento es distribuido con la esperanza de que será de
  utilidad, pero sin ninguna garantía.

  Puedes obtener una copia de la licencia pública general del GNU
  escribiendo a la Free Software Foundation, Inc., 675 Mass Ave,
  Cambridge, MA 02139, USA.

  2.  Tecnología de la tarjeta de sonido.

  Esta sección da unas nociones de tecnología de sonido en ordenador,
  para ayudarte a entender los conceptos usados más tarde en el
  documento. Debes consultar un libro de sonido digital o de proceso de
  señal digital para aprender más.

  El sonido es una propiedad analógica; 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 analógico a digital (A/D o ADC)
  para convertir los voltajes correspondientes a las ondas de sonido
  analógico en valores digitales o numéricos los cuales pueden ser
  guardados en memoria. Similarmente un convertidor digital analógico
  (D/A o DAC) convierte valores numéricos en un voltaje analógico el
  cual puede ser reconducido a un altavoz, produciendo sonido.

  El proceso de conversión de analógico a digital, conocido como
  muestreo (sampling), introduce algunos errores. Dos factores son
  fundamentales en determinar con qué fidelidad la señal de muestra
  representa a la original. La frecuencia de muestreo (sampling rate) es
  el número de muestras hechas por unidad de tiempo (generalmente
  expresado en muestras por segundo o hertzios). Una frecuencia de
  muestreo baja genera una representación de menos calidad de la señal
  analógica. El tamaño de muestreo (sample size) es el rango de valores
  usados para representar cada muestra, generalmente expresado en bits.
  Cuanto mayor sea el tamaño de muestra de mayor calidad será la señal
  digital.

  Las tarjetas de sonido usan comúnmente 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
  (estéreo).

  La síntesis de FM es una técnica antigua para producir sonido. Se basa
  en combinar diferentes formas de onda (por ejemplo sinoidal,
  triangular, cuadrada). La síntesis de FM es más fácil de implementar
  en hardware que la conversión D/A, pero es más difícil de programar y
  menos flexible.

  Algunas tarjetas de sonido traen la síntesis de FM para conservar la
  compatibilidad con otras tarjetas y software anteriores.

  Generalmente se proporcionan varios generadores de sonido o voces.

  La síntesis de tabla de onda (WaveTable) combina la flexibilidad de la
  conversión D/A con la capacidad de múltiples canales de la síntesis de
  FM.  Con este esquema las voces digitalizadas pueden ser cargadas en
  una memoria dedicada, y después reproducidas, combinadas, y
  modificadas con pocos recursos de la CPU.

  La mayoría de las tarjetas de sonido proporcionan la capacidad de
  mezclar, combinar señales 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 estándar y el protocolo
  software que permite a los instrumentos musicales comunicarse con
  cualquier otro.  Los eventos enviados a través de un bus MIDI también
  pueden ser guardados como ficheros MIDI para editarlos más tarde y
  reproducirlos. Algunas tarjetas de sonido traen un interfase MIDI. Las
  que todavía no pueden reproducir ficheros MIDI usan las capacidades de
  la placa de la tarjeta de sonido.

  Los ficheros MOD son un formato común para las canciones generadas por
  ordenador.  Como información 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 sección lista las tarjetas de sonido y los interfases que
  actualmente son soportados bajo Linux. Esta información está basada en
  los últimos núcleos de Linux.

  El driver de sonido tiene su propio número de versión. El último
  núcleo estable de Linux realizado hasta ahora era la versión 2.0,
  usando la versión 3.5.2-960330 del driver de sonido.

  El autor del driver de sonido, Hannu Savolainen, normalmente también
  realiza nuevas versiones beta del driver de sonido como parches del
  núcleo antes de que sean incluidas como parte de la distribución
  estándar del núcleo de Linux.

  Esta información sólo es válida para Linux en la plataforma Intel.
  Algo de información puede ser aplicable a otras arquitecturas de
  procesadores, pero yo no tengo experiencia o información de primera
  mano.

  3.1.  Tarjetas de sonido.

  Las siguientes tarjetas de sonido son soportadas por el driver de
  sonido del núcleo 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 información de
  programación 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 serán 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 más tarde en este documento. Si tienes una
  tarjeta que funciona y no está incluída en esta lista, házmelo saber y
  la añadiré a la misma.

  El núcleo 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 más
  información.

  Un módulo del núcleo cargable para soportar puertos de juegos
  (joysticks), incluyendo los que vienen en algunas tarjetas de sonido,
  está también disponible.

  Notar que los drivers del núcleo, SCSI, CD-ROM y tarjeta de sonido son
  independientes unos de otros.

  Para obtener la última información del driver de la tarjeta de sonido,
  visita la página WWW de Savolainen listada en la sección de
  Referencias.

  3.2.  Drivers de sonido alternativos.

  Hay disponibles algunos drivers de sonido "no oficiales", no incluidos
  en la distribución estándar del núcleo de Linux, y usados en lugar del
  driver estándar de sonido.

  Markus Mummert (mum@mmk.e-technik.tu-muenchen.de) un paquete de
  drivers para las tarjetas Turtle Beach MultiSound (clásica), Tahiti y
  Monterey. La documentación afirma:

  "Está diseñado para la reproducción/grabación de alta calidad en disco
  duro sin perder sincronización alguna en un sistema ocupado.  Otras
  características como la síntesis de ondas, MIDI y el procesador
  digital de señal no pueden ser usadas. Tampoco es posible la grabación
  y reproducción simultáneas.  Actualmente reemplaza a VoxWare y ha sido
  probado en bastantes versiones de núcleos, desde la 1.0.9 hasta la
  1.2.1. También 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 descripción:

  "Un driver de dispositivo para los interfases MIDI de la Roland
  MPU-401 (incluyendo Roland SCC-1 y RAP-10/ATW-10). Le acompaña una
  importante colección de utilidades, incluyendo un reproductor y
  grabador de ficheros estándar MIDI.

  Han sido hechos numerosos avances desde la versión 0.11a. entre otras
  cosas, el driver incorpora ahora la política de compartición de IRQ y
  cumple con el nuevo módulo interfase del núcleo.  Funcionabilidad
  metrónoma, posibilidad de sincronización (por ejemplo gráficos por
  golpes de bases sin perder precisión), interfase avanzado  de
  reproducción/grabación y mucho, mucho más."

  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 mayoría 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 características internas del altavoz. Para más información, lea
  la documentación que acompaña a su versión.

  La versión 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 opción es hacer un conversor digital->analógico usando el puerto
  paralelo de la impresora y algunos componentes adicionales. Éste
  genera una mejor calidad de sonido que el altavoz interno, pero
  consume todavía más 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.  Instalación.

  Configurar Linux para que soporte sonido implica los siguientes pasos:

  1. Instalar la tarjeta de sonido.

  2. Configurar y construir el núcleo para que soporte sonido.

  3. Crear los ficheros de dispositivo.

  4. Bootear el núcleo Linux y comprobar la instalación.

  La siguiente sección 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
  encárgaselo a tu vendedor.

  4.2.  Configurar el núcleo.

  Cuando inicialmente instalas Linux, estás usando el núcleo
  precompilado.  estos núcleos generalmente no soportan sonido. Lo mejor
  es recompilar el núcleo con los drivers que necesites. También puedes
  queres recompilar el núcleo para actualizar hacia una nueva versión o
  para liberar recursos de memoria minimizando el tamaño del mismo.

  El Linux Kernel HOWTO Linux Kernel HOWTO puede ser consultado para más
  detalles en la construcción del núcleo. Sólo mencionaré los aspectos
  que son específicos a las tarjetas de sonido.

  Si nunca has configurado el núcleo para soporte de sonido, es una
  buena idea leer todos los ficheros Readme incluidos con los drivers de
  sonido del núcleo, particularmente aquellos que se refieren a tu tipo
  de tarjeta.  Los siguientes ficheros de documentación se pueden
  encontrar en el directorio de sonido del núcleo, generalmente
  instalado en /usr/src/linux/drivers/sound:

  CHANGELOG       - Descripción de los cambios en cada versión.  COPYING
  - Restricciones de copia y copyright.  Readme          - Últimas y más
  importantes noticias.  Readme.aedsp16  - Información sobre la tarjeta
  Audio Excel DSP 16.  Readme.cards    - Notas de configuración de
  tarjetas específicas.  Readme.linux    - Notas de instalación separada
  de drivers de sonido.  Readme.modules  - Cómo construir un driver como
  un módulo del núcleo cargable.  Readme.v30      - Nuevas
  características de la versión 3.0 del driver de sonido.
  experimental.txt- Notas de características experimentales.

  Sigue el procedimiento usual de construcción del núcleo. Hay tres
  formas de ejecutar el proceso de configuración. Un interfase gráfico
  de usuario que se ejecuta bajo X11 puede ser llamado usando make
  xconfig. Un sistema basado en menús que sólo requiere un display de
  texto está disponible como make menuconfig. Yo asumiré que usas el
  proceso tradicional de configuración de línea de comando usando la
  llamada make config, aunque el proceso es similar en cada caso.

  También es posible construir el driver de sonido como un módulo
  cargable del núcleo. Yo recomiendo construir el driver dentro del
  núcleo. Una vez que está comprobado y que funciona tú puedes probar
  usando la opción de módulo del núcleo.

  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 configuración un programa de
  configuración 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
  más tarjetas de las que realmente tienes, ya que consumen memoria.
  Además algunos drivers (como el MPU401) pueden entrar en conflicto con
  el controlador SCSI e impedir la inicialización del núcleo.

  Aquí listo una pequeña descripción de cada una de las opciones del
  diálogo de configuración. Contesta "y" (sí) o "n" (no) en cada
  pregunta. La respuesta por defecto es mostrada en primer lugar y en
  mayúsculas, 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 interrogación (?) saldrá un corto
  mensaje describiéndote esa opción de configuración.

  Notar que no todas las preguntas serán respondidas. El programa de
  configuración desactivará algunas preguntas dependiendo de las
  anteriores respuestas.  Además él también elegirá algunas opciones
  automáticamente.

             Old configuration exists in /etc/soundconf. Use it Y/n/?

  Si previamente has compilado el núcleo para soporte de sonido entonces
  la configuración anterior se puede salvar. Si quieres usar el anterior
  set up contesta "y" (sí). Si estas intentando una configuración difer­
  ente o has actualizado un núcleo nuevo, debes contestar "n" (no) e ir
  a través del proceso de configuración.

             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 Visión o Logitech desde que no son compatibles con
  PAS16.

             SoundBlaster support Y/n/?

  Contesta "y" (sí) sólamente si tienes una SoundBlaster original de
  Creative Labs o una clónica 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 específicas 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 opción MPU401 con esas tarjetas
  causará un conflicto. También el activar MPU401 en un sistema que
  realmente no tiene un MPU401 puede causar algún problema.  Si tu tar­
  jeta estaba en la lista de tarjetas soportadas busca las instrucciones
  específicas 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
  opción 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). También 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 específicas en el
  fichero Readme.cards. Algunos driver tienen su propio soporte MSS y
  por lo tanto activar esta opción 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.  Además 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 opción si tu tarjeta es una SoundBlaster Pro o Sound­
  Blaster 16. Activala también con cualquier clónico de la SoundBaster
  Pro. Contestar "n" (no) ahorra algo de memoria pero contestar "y" (sí)
  es la mejor opción.

             SoundBlaster 16 support Y/n/?

  Actívala si tienes una SoundBaster 16 (incluída la AWE32).

             Audio Excel DSP 16 initialization support Y/n/?

  Activa esta opción si tienes una tarjeta Audio Excel DSP 16.  Mira el
  fichero readme.aedsp16 para más información.

  Después el programa de configuración hace algunas preguntas de
  servicios de alto nivel. La contestación recomendada es "y" (sí) para
  cada una de las preguntas. Contesta "n" (no) solamente si sabes que no
  vas a utilizar esa opción.

             /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 opción también 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.

  Después de las preguntas anteriores, el programa de configuración
  pregunta por la información específica de la tarjeta. Generalmente es
  ajustar la dirección I/O, IRQ y el DMA. Con algunas tarjetas el
  programa pregunta por los ficheros que van a ser usados durante la
  inicialización de la tarjeta. Son las tarjetas que tienen un chip o un
  microprocesador DSP el cual debe ser inicializado bajando un programa
  (microcódigo) a la tarjeta. En algunos casos este fichero es escrito a
  un fichero de cabecera .h por el programa de configuración y ya es
  incluido en el driver durante la compilación. Lee de nuevo la
  información concerniente a tu tarjeta en el fichero Readme.cards.

  Por último serás preguntado:

            The sound driver is now configured.
            Save copy of this configuration to /etc/soundconf [Y/n/?]

  Normalmente debes contestar "y" (sí) por si más tarde necesitas recom­
  pilar el núcleo, y así ya tienes la opción de usar la misma configu­
  ración del driver de sonido.

  Si estás actualizando un driver anterior de sonido, asegúrate de que
  los ficheros /usr/include/sys/soundcard.h y
  /usr/include/sys/ultrasound.h tienen enlaces simbólicos a los ficheros
  correspondientes en /usr/include/linux o que simplemente contiene las
  líneas #include <linux/soundcard.h> y #include <linux/ultrasound.h>,
  respectivamente.

  Ahora estás preparado para compilar e instalar el nuevo núcleo.

  4.3.  Creando los ficheros de dispositivo.

  La primera vez que el driver de sonido del núcleo es configurado
  necesitas crear los ficheros del dispositivo del sonido. La forma más
  fácil 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
  incluído con el driver de sonido del núcleo es lo mejor ya que siempre
  estará actualizado con los últimos dispositivos de sonido soportado.

  Después 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 atención a los nombres de dispositivo y al mayor y
  menor número de dispositivo listado en la cuarta y quinta columnas.

  Si estas usando el driver del altavoz del PC, lee la documentación que
  lee con el paquete para determinar qué ficheros de dispositivo crear.

  Normalmente la configuración que usantes cuando construirte el núcleo
  será válida para el driver de la tarjeta de sonido. También es posible
  pasar parámetros al núcleo en la línea 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
  razón de esto es para que los desarrolladores de discos de arranque de
  linux puedan crear un núcleo que soporte varias tarjetas de sonido.

  4.4.  Inicializando Linux y comprobando la instalación.

  Ahora debes estar preparado para inicializar el núcleo y comprobar los
  drivers de sonido. Sigue el procedimiento habitual para instalar y
  reinicializar el nuevo núcleo (por supuesto ten a mano el anterior
  núcleo por si hay problemas)

  Durante la inicialización, comprueba un mensaje como el siguiente
  cuando emerja el texto (si las líneas aparecen muy rápido 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
  parámetros que ella tenga (si es que tiene alguno).

  El driver también puede visualizar mensajes de error y advertencias
  durante el inicio. Estate atento para ver alguno cuando inicies por
  primera vez después 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á información 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 envíalo al dispositivo de sonido para
  comprobar la salida de sonido. Por ejemplo:

          % cat endoftheworld >/dev/dsp
          % cat crash.au >/dev/audio

  (Asegúrate de que no te olvidas el ">")

  Algunos ficheros de sonido se pueden obtener de: ftp://tsx-11.mit.edu

  Ahora puedes comprobar la grabación de sonido. Si tienes capacidad de
  entrada de sonido, puedes hacer un test rápido 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 micrófono conectado a
  la tarjeta de sonido. También necesitas un programa mezclador (mixer)
  para seleccionar al micrófono como dispositivo de entrada y ajustar el
  nivel de grabación.

  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
  sección de este documento.

  4.5.  Resolución de problemas.

  Si todavía tienes problemas después de seguir las instrucciones del
  HOWTO, aquí hay algunas cosas que debes comprobar. Las comprobaciones
  están listadas en orden ascendente de complejidad. Si una comprobación
  falla, resuelve el problema antes de pasar al siguiente punto.

  4.5.1.  Punto 1: asegúrate de que realmente estás ejecutando el núcleo
  compilado.

  Puedes comprobar la fecha del núcleo para ver si estás 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 núcleo,
  entonces estas ejecutando el anterior núcleo. ¿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 sesión?.

  4.5.2.  Punto 2: asegúrate de que los drivers de sonido del núcleo
  están compilados en él.

  Puedes ver qué drivers están 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
  configuración del núcleo o en su construcción. Comienza el proceso de
  instalación comenzando otra vez la configuración y construyendo el
  núcleo.

  4.5.3.  Punto 3: ¿Detectó el núcleo tu tarjeta de sonido durante la
  inicialización?

  Asegúrate de que la tarjeta de sonido fue detectada cuando
  inicializaste.  Deberías 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.
  Asegúrate 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 configuración del núcleo.
  Quizá configuraste tu tarjeta con un tipo equivocado o con parámetros
  equivocados, o quizás tu tarjeta no es compatible con los drivers de
  tarjeta de sonido del núcleo de Linux.

  Una posibilidad es que tu tarjeta sea una del tipo "compatible" que
  requiere inicialización por el driver del DOS. Intenta iniciar una
  sesión de DOS y cargar el driver suministrado por el vendedor de la
  tarjeta de sonido.  Después inicia una sesión de linux pulsando
  control-alt-delete. Asegúrate de que la dirección 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.  Asegúrate que los ficheros de dispositivo del directorio
  /dev tienen los números 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 todavía 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 código
     fuente del núcleo.

  ·  Envía tu pregunta al grupo de noticias comp.os.linux o a cualquier
     otro.

  ·  Envía tu pregunta al canal de sonido (Sound) de la lista de correo
     de Linux.

  ·  Intenta usar el último núcleo 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 gustaría 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 información mas actualizada.

  Como mínimo, a ti te gustaría obtener las siguientes aplicaciones de
  sonido:

  ·  Utilidad de conversión 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).

  También hay versiones de texto y versiones GUI de esas herramientas.
  También hay aplicaciones más esotéricas que quizás te gustaría probar
  (por ejemplo speech para reconocimiento y síntesis).

  6.  6. FAQ.

  Esta sección contesta algunas de las preguntas que mas comúnmente han
  aparecido en los grupos de noticias Usenet y en las listas de correo.

  6.1.  ¿Cuáles son los ficheros de dispositivo de sonido?

  Éstos son los nombres de ficheros de dispositivo "estándar", 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 implementación 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 leído

  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.  ¿Cómo puedo reproducir una muestra de sonido?

  Los ficheros de sonido de las estaciones de trabajo Sun (.au) pueden
  ser reproducidos enviándoles 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 mayoría de los tipos de
  ficheros y pasará a la tarjeta de sonido la correcta frecuencia de
  muestreo, etc.

  6.3.  ¿Cómo 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á más
  fácil el controlar la frecuencia de muestreo, la duración, etc.
  También necesitas un programa muestrador para seleccionar el
  dispositivo de entrada adecuado.

  6.4.  ¿Puedo tener más 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 más de una tarjeta del mismo
  tipo a la vez (por ejemplo la combinación  GUS + GUS no es posible.

  Puedes cambiar los parámetros de configuración de la tarjeta de sonido
  al inicializar usando las opciones de la línea de comandos desde el
  cargador de inicio como el LILO. Lee el fichero Readme.linux para más
  detalles.

  6.5.  Error: No such file or directory for sound devices

  Necesitas crear los ficheros de dispositivo del driver de sonido. Mira
  la sección sobre creación de ficheros de dispositivo. Si tienes que
  hacer los ficheros de dispositivo, asegúrate de que tienen los números
  de dispositivo mayor y menor correcto (algunas distribuciones antiguas
  en CD-ROM de Linux no crean los ficheros de dispositivo correctos
  durante la instalación).

  6.6.  Error: No such device for sound devices

  No has inicializado con un núcleo que contiene el driver de sonido o
  la dirección de I/O de la configuración no corresponde con tu
  hardware. Comprueba que estás ejecutando el nuevo núcleo compilado y
  verifica que las opciones introducidas en la configuración 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 partición
  de disco. Necesitas ejecutar el script descrito en la sección sobre
  creación 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 mayoría nos gusta saber si otro proceso está usando el
  dispositivo en cuestión. 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 más.

  6.9.  ¡Todavía 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 también usa el DMA 1, causando los errores "device
  busy". Si estás 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
  núcleo para usar el QIC-117 en vez del QIC-02 permite coexistir a
  FTAPE y al driver de sonido.

  (la siguiente explicación fue aportada por Harald Albrecht
   albrecht@igpm.rwth-aachen.de)

  Algunos soportes de tarjetas de sonido usan el canal DMA 0. El
  programa de configuración del driver de sonido permite esto, y el
  núcleo compila correctamente, pero el acceso al dispositivo de sonido
  nos devuelve un mensaje de error "device busy" (dispositivo ocupado).

  La razón es que el núcleo 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 lógica de refresco. Lo
  puedes corregir cambiando esta línea 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 código 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 núcleo.

  6.10.  Reproducción parcial de un fichero de sonido digitalizado.

  El síntoma generalmente es que una muestra de sonido se reproduce
  durante un segundo y después se para completamente o devuelve un
  mensaje de error como "missing IRQ" o "DMA timeout". La mayoría de las
  veces significa que tienes los parámetros del IRQ o del canal DMA
  incorrectos.  Verifica que la configuración del núcleo corresponde con
  los puentes de la tarjeta de sonido y que no entran en conflicto con
  otro dispositivo.

  Otro síntoma 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 más ejecutándose 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 más rápido.

  ·  Compra una tarjeta de sonido más potente (por ejemplo, Gravis
     Ultrasound).

  Si tienes una tarjeta Gravis Ultrasound, debes usar uno de los
  reproductores de ficheros MOD escritos específicamente para la GUS
  (por ejemplo gmod).

  6.12.  Tengo errores de compilación al compilar aplicaciones de
  sonido.

  La versión 1.0c y el driver de sonido anterior usaban un esquema
  ioctl() diferente e incompatible. Obtén un código fuente más moderno o
  haz los cambios necesarios para adaptarlo al nuevo driver de sonido.
  Mira el fichero del driver de sonido Readme para más detalles.

  Asegúrate también de que has usado la última versión del soundcard.h y
  ultrasound.h cuando compiles la aplicación. Lee las instrucciones de
  instalación 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
  cuestión.

  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 núcleo.

  6.15.  ¿Qué significan todas las opciones de configuración del driver
  de sonido?

  Durante la configuración del driver de sonido, un programa de
  configuración es compilado y ejecutado. Este programa te hace algunas
  preguntas y después genera el fichero cabecera local.h que define la
  configuración de la tarjeta de sonido.

  El fichero de configuración define (o "undefine") lo siguientes
  símbolos:

       Símbolo                 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          dirección base de I/O de la SoundBlaster
       SBC_IRQ                 número de IRQ de la SoundBlaster
       SBC_DMA                 canal DMA de la SoundBlaster
       SB16_DMA                canal DMA de la SoundBlaster 16
       SB16_MIDI_BASE          dirección base del puerto MIDI de la SoundBlaster 16
       PAS_IRQ                 número de IRQ de la ProAudioSpectrum
       PAS_DMA                 canal DMS de la ProAudioSpectrum
       GUS_IRQ                 número IRQ de la Gravis UltraSound
       GUS_DMA                 canal DMA de la Gravis UltraSound DMA
       GUS_BASE                dirección base de la Gravis UltraSound
       MPU_IRQ                 número IRQ del MPU-401
       MPU_BASE                dirección base del puerto del MPU-401
       DSP_BUFFSIZE            tamaño del buffer del DMA

  También se definen otras cosas, como por ejemplo nivel de revisión del
  driver de sonido y el día y la hora en que la configuración fue hecha.

  Hay otros parámetros que no son seleccionados por el programa de
  configuración. 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.  ¿Dónde están documentados los ioctls()  del driver de sonido?

  Están parcialmente documentados en la Hacker's Guide to VoxWare,
  actualmente disponible en formato borrador. La última versión 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 estarán
  ahí.

  6.17.  ¿Cúales son los recursos de la CPU necesarios para repro­
  ducir/grabar sin pausas?

  No hay una respuesta fácil para esta pregunta, ya que depende de:

  ·  Si estás usando muestreo PCM o síntesis FM.

  ·  Frecuencia de muestreo y tamaño de muestreo.

  ·  Qué aplicación estás usando para reproducir o grabar.

  ·  Hardware de la tarjeta de sonido.

  ·  Frecuencia de I/O del disco, velocidad del reloj de la CPU, tamaño
     del caché, etc.

  En general, las máquinas 386 deberían reproducir muestras o música
  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
  más del 40% de la velocidad de un 486/50 y un 386/25 ha penas puede
  reproducir rápidamente más de 22kHz (con una tarjeta de 8 bits como la
  SoundBlaster). Una tarjeta como la Gravis UltraSound ejecuta más
  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 añadir efectos usando una utilidad como
  Sox es mucho más rápido si tienes un coprocesador matemático. El
  driver del núcleo por si mismo no hace cálculos en punto flotante.

  6.18.  Problemas con una PAS16 y un adaptador host Adaptec 1542 SCSI.

  (La siguiente explicación fue dada por seeker@indirect.com)

  Linux solamente reconoce el 1542 en la dirección 330 (por defecto) o
  en la 334 y la PAS solamente permite la emulación MPU-401 en la 330.
  Aunque desactives el MPU-401 bajo software, algo todavía entra en
  conflicto con el 1542 si él está con su dirección por defecto. Mover
  el 1542 a la dirección 334 hace feliz a todos.

  Además, tanto el 1542 como la PAS16 hacen DMA de 16 bits, por lo que
  si haces una muestra a 16 bits 44kHz y en estéreo 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 ningún
  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 más 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 parámetros de la EEPROM,
  por lo que es más duradero que un parche en el driver del DOS desde
  una línea 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
  drásticamente el tiempo de los ciclos de I/O para aumentar los accesos
  al bus. Ninguna de las tablas que yo he probado han ningún problema
  con el tiempo de reducción excepto la PAS16. La BBS de Media Vision
  tiene el fichero SYMPFIX.EXE el cual se supone que soluciona el
  problema añadiendo un bit de diagnóstico en el controlador del bus del
  Symphony, pero no da muchas garantías. Lo que tú necesitas es:

  ·  Dile al ditribuidor de la placa madre que reemplace el chip con el
     bus de la antigua versión.

  ·  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 harán lo mismo si puedes probar quién 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 mayoría lo hará en un 386/486
  a 25-40MHz, y seguramente podrá manipular al menos frecuencias de bus
  de 12MHz si los chips están bien diseñados.

  El primer problema depende del juego de chips usados en tu placa
  madre, de la velocidad del bus y de otros parámetros de la BIOS, y de
  la fase de la luna.  El segundo problema depende del parámetro de la
  opción 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
  preguntándoles qué chip de Symphony es incompatible con su lento
  diseño. Atento: 3 de 4 técnicos con los que hablé tenían el cerebro
  dañado. Asistí atónito a todo lo que hablaron acerca del hardware de
  los demás, 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 versión
  1 usaba el OPL-2. El driver de sonido asume la presencia de un OPL-3.
  La versión 2.5 y posteriores del driver de sonido corrigen este
  problema.

  6.20.  ¿Es posible leer y escribir muestras simultáneamente?

  Debido a limitaciones del hardware, esto no es posible con la mayoría
  de las tarjetas de sonido. Algunas tarjetas nuevas lo soportan. Mira
  la sección de "modo bidireccional" en la Hacker's Guide To VoxWare
  para más información.

  6.21.  Mi SB16 está puesta con un IRQ 2, pero la configuración no me
  deja usar este valor.

  En los últimos 286, la interrupción 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
  características adicionales como síntesis de onda de tabla, aunque
  Creative Labs no colabora aportando información sobre su programación.
  A menos que ellos cambien su política 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 Analógicos ADSP-21xx serán soportados en el futuro.

  6.23.  Si estoy en Linux y después inicio una sesión de DOS, tengo
  errores y/o las aplicaciones de sonido no funcionan correctamente.

  Esto ocurre después de un reinicio suave hacia el DOS. Algunas veces
  el mensaje de error se refiere engañosamente a que está mal el fichero
  CONFIG.SYS.

  La mayoría de las tarjetas de sonido tienen programable por software
  los parámetros del IRQ y del DMA. Si tu usas parámetros diferentes
  entre el Linux y el MS-DOS/Windows, esto causará problemas. Algunas
  tarjetas de sonido no aceptan nuevos parámetros sin una completa
  inicialización (reset) (por ejemplo corta la corriente o pulsa el
  botón de reset).

  La solución más rápida para este problema es llevar a cabo un completo
  reinicio usando el botón de reset o cortando la energía después de un
  reinicio suave (por ejemplo ctrl-alt-del).

  La solución correcta es que usas los mismos parámetros 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 versión 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 ejecución del DOOM en tu sistema es pobre, desactiva el sonido
  (renombrando el fichero sndserver).

  Por defecto DOOM no soporta música (como en la versión del DOS). El
  programa musserver añadirá soporte para música al DOOM bajo Linux. Lo
  puedes encontrar en ftp://pandora.st.hmc.edu

  6.25.  ¿Cómo 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 máximo es probablemente lo mejor.

  Usar un programa mezclador te asegurará que las entradas no deseadas
  (por ejemplo el micrófono) están puestas a cero.

  Algunas tarjetas de sonido simplemente no están diseñadas 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 micrófono).

  ·  Usa el mezclador para seleccionar la ganancia de entrada al máximo.

  ·  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" sólo funciona si primero la
  inicializo bajo MS-DOS.

  Algunos clónicos de tarjeta de sonido no son verdaderamente 100%
  compatibles.  Algunas veces contienen circuitería extra como por
  ejemplo mezcladores. La puedes usar bajo Linux si primero la
  inicializas bajo MS-DOS y después haces un inicio suave de Linux (por
  ejemplo Ctrl-alt-del).

  Un usuario me informó el obtenía mejores resultados si él usaba
  LOADLIN en vez de LILO para inicializar Linux después de inicializar
  su tarjeta de sonido bajo MS-DOS (esto era con una tarjeta de sonido
  Diamond).

  La verdadera solución es obtener del fabricante cuáles son las
  diferencias y añadir 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 sólo fun­
  ciona en el modo 8-bit bajo Linux

  Las tarjetas de sonido de 16 bits descritas como compatibles
  SoundBlaster realmente sólo 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
  tendrás que hacer también el truco de inicializarla bajo el DOS para
  que la tarjeta funcione.

  6.29.  ¿Dónde puedo encontrar aplicaciones de sonido para Linux?

  Estos son unos buenos sites para buscar aplicaciones específicas 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 módulo cargable?

  Con los últimos núcleos el driver de sonido es soportado como un
  módulo cargable.

  Mira los ficheros /usr/src/linux/drivers/sound/Readme.modules y
  /usr/src/linux/Documentation/modules.txt (o /usr/src/linux/README)
  para más 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
  núcleo que soporta llamadas a programas externos para generar los
  sonidos del núcleo.

  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 núcleo soportan diferentes sistemas
  operativos basados en la arquitectura Intel y compatibles con Unix, y
  se pueden obtener como un paquete separado del núcleo del Linux. Hasta
  febrero del 96 el autor había 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 núcleo
  disponible comercialmente para varios sistemas Unix, vendido por
  4Front Technologies. Una versión libre, conocida como USS/Lite
  continuará siendo disponible con total libertad para los sistemas
  Linux.

  Para más información mira la página Web de 4Front Technologies.
  http://www.4front-tech.com

  6.33.  ¿Son soportadas las tarjetas de sonido Plug-and-Play?

  Linux todavía 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 versión 1.3.67 rompía algunos
  programas de reproducción de sonido el cual (incorrectamente)
  chequeaba que el resultado del ioctl SNDCTL_DSP_GETBLKSIZE era mayor
  que 4096. Debes tener una versión más 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­
  figuración?

  El driver de sonido soporta diferentes parámetros de configuración. El
  programa de configuración incluído con el driver de sonido comprueba
  las dependencias entre los parámetros. Las herramientas usadas para
  configurar el núcleo no soportan este nivel de funcionabilidad.

  Los núcleos recientes 1.3.x opcionalmente permiten usar las
  herramientas de configuración del núcleo estándar con el driver de
  sonido. Lee las notas en el fichero CHANGELOG para el driver de
  sonido. Esto es todavía experimental y algunas opciones no pueden ser
  seleccionadas de esta forma.

  6.36.  ¡Las opciones del mezclador son borradas cuando cargo el módulo
  del driver de sonido!

  Puedes construir el driver de sonido como un módulo cargable y usar
  kerneld para cargarlo y descargarlo automáticamente. Esto puede
  presentar un problema: cuando el módulo de recargado los parámetros
  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
  solución: usa una línea 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 después de que tú driver de sonido es cargado. El
  parámetro dma_buffsize es sólo un valor arbitrario necesario porque el
  comando de opción requiere una opción en la línea de comando. Cambia
  la línea según como necesites corresponder tu programa mezclador y los
  parámetros de ganancia.

  Si tú has compilado el driver de sonido dentro de tu núcleo 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 sólo permite que los dispositivos
  sean leídos 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 micrófono, 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 información
  adicional que puede serte muy útil.

  Hannu Savolainen ha escrito una versión borrador de Hacker's Guide to
  VoxWare.  La última versión 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 también 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 también aportan listas de correo para temas específicos y
  sites de archivos. Los siguientes grupos de noticias de Usenet tratan
  sobre temas de sonido y/o música:

  ·  alt.binaries.sounds.* (varios grupos para postear ficheros de
     sonido)

  ·  alt.binaries.multimedia (para postear ficheros Multimedia)

  ·  alt.sb.programmer (temas de programación de la Soundblaster)

  ·  comp.multimedia (temas Multimedia)

  ·  comp.music (teoría e investigación de música por computadora)

  ·  comp.sys.ibm.pc.soundcard.* (varios grupos IBM PC de tarjetas de
     sonido)

  Una página Web dedicada a la multimedia puede ser encontrada en
  http://viswiz.gmd.de. Creative Labs tiene su página Web en
  http://www.creaf.com/. MediaTrix tiene su página Web en
  http://www.mediatrix.com/.

  Las listas de correo de Linux tienen un número de "canales" dedicados
  a diferentes temas, incluído el sonido. Para saber cómo unirte, envía
  un mail con la palabra "help" como cuerpo del mensaje a
  majordomo@vger.rutgers.edu. (Nota: cuando escribía esto, estas listas
  de correo fueron sobrecargadas y se buscó un reemplazo)

  Como mencioné en varias anteriores ocasiones, el driver de sonido del
  núcleo incluye una serie de ficheros Readme que contienen información
  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 núcleo, Hannu
  Savolainen, en la dirección hannu@voxware.pp.fi. También tiene una
  página Web en http://personal.eunet.fi/pp/voxware. Esta página es el
  mejor sitio para enterarse de las últimas tarjetas de sonido
  soportadas, problemas y solución 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 anónimos, 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--) . Están disponibles
  libremente en la mayoría de FTP anónimos de archivos de Linux, o
  también pueden ser comprados en formato impreso.

  Por último, una puntualización un poco sinvergüenza: Si quieres
  aprender un poco más sobre multimedia bajo Linux (especialmente
  programación 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 traducción.

  Este documento ha sido traducido por Sergio Alonso Manzanedo
  sa.manzanedo@vll.servicom.es con la colaboración 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 aclaración, corrección, duda o cualquier otra cosa, no
  dudes en contactar conmigo.  Apreciaré también cualquier
  puntualización sobre las faltas de ortografía y las posibles erratas
  (adjuntar en el subject el nombre Laura).

  Nada más.

  Saludos.   ;-)

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.
  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  Spanish Linux HOWTO
  Gonzalo García Agullo, Gonzalo.Garcia-Agullo@jrc.es.
  v0.1, 20 Agosto de 1996

  Esta es la primerísima edición del Linux en Castellano COMO. La audi­
  encia a la que va destinado este documento es la creciente familia de
  linuxeros españoles y latinoamericanos, por lo que este COMO, por
  supuesto, está en castellano.  Algunos no-hispanohablantes han solici­
  tado información 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.      Introducción

  1.1.    Empecemos por el principio...

  1.2.    ¿Qué es linux?

  1.3.    ¿Cómo conseguirlo?

  1.4.    ¡Socorro! ¿Dónde están los manuales?

  2.      Distribuciones

  3.      Ayuda a la instalación de la distribución Slackware

  3.1.    Instalación con UMSDOS

  3.2.    Instalación en partición nativa de Linux.

  3.2.1.  Preliminares

  3.2.2.  Formateo de la partición.

  3.2.3.  Instalación de los discos.

  3.2.4.  Configuración

  4.      Españolización  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 electrónico

  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.    Infovía: acceso a Internet desde casa

  5.6.1.  ¿Qué es infovía?

  5.6.2.  ¿Como conectar entonces?

  6.      Direcciones útiles

  6.1.    Direcciones electrónicas

  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.    Bibliografía.

  7.      Copyright

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  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 información puntual. Se tratarán de forma genérica todos los
  temas que puedan interesar al usuario de Linux, desarrollándolos en
  castellano o dando referencias a otras fuentes de información en
  nuestro idioma, así como orientación cuando tenga que acudir a otras
  HOWTO y en general a cualquier documento en inglés.

  Se distribuye integrado con el Linux Documentation Project en todos
  los foros de información Linux en Internet. Se actualiza
  periódicamente, pudiendo encontrar la última versión en Linux/España
  <http://www.cs.us.es/archive/linux.html>

  Notas del autor: Aunque puede ser interesante de por sí, traducir sin
  más información ya editada en inglés no es el objetivo de este
  documento, sino más bien servir de base al usuario hispanohablante y
  divulgar el Linux en nuestro idioma. Una ambición de quien escribe es,
  desde estas líneas, 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 (configuración del sistema y de
  las aplicaciones para trabajar en nuestro idioma, teclados, correo
  electrónico en español, etc). Un tercer objetivo será servir de agenda
  actualizada de direcciones españolas dedicadas a Linux, tanto para
  difusión de las distribuciones originales de software Linux como de
  desarrollos propios en español que se vayan publicando. Vaya desde
  aquí mi agradecimiento en esta primera versión para Antonio L. Delgado
  <mailto:antonio-luis.delgado@cs.us.es>, compañero de la Facultad de
  Informática de Sevilla, por prestarse a echar una mano redactando esta
  Howto en las calurosas tardes de Sevilla.

  Cualquier comentario, sugerencia para nuevos contenidos, rectificación
  de errores, crítica, etc. es no sólo bienvenido sino también esperado.
  Contacta por correo electrónico para todo lo que quieras.

  1.2.  ¿Qué es linux?

  Linux es una implementación del sistema operativo UNIX (uno más de
  entre los numerosos clónicos del histórico 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
  teóricamente 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 información y soporte
  técnico mútuo.  La versión original -y aun predominante- comenzó para
  PCs compatibles (Intel 386 y superiores), existiendo también en
  desarrollo versiones para prácticamente 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 más reciente en este momento es la
  versión para PowerMac <http://www.mklinux.org> (el PowerPC de Apple)
  basada en el microkernel Mach 3.0 y de la que ya hay una distribución
  para desarrolladores avalada directamente por Apple y OSF pero
  conservando el espíritu (gratuito, de libre distribución, etc) de la
  version original. Un servidor la acaba de probar hace unos días y se
  ha llevado una grata sorpresa (aún tendrá muuuchos fallos, pero para
  ser una primerísima versión y el poco tiempo que lleva en marcha, ha
  avanzado más de lo que me esperaba).

  1.3.  ¿Cómo conseguirlo?

  La primera fuente para conseguir el sistema Linux es la propia red
  Internet, y es donde estarán siempre las últimas versiones y las
  aplicaciones más actualizadas en muchos servidores de FTP anónimo.
  Otra vía muy frecuente, de interés para principiantes y para quienes
  no deseen o no puedan permitirse copiar tanta cantidad de información
  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 corazón del sistema es
  el mismo, aunque pueden tener externamente presentaciones y formas
  distintas de instalación. Hay revistas especializadas que tambión
  suelen incluir CDs con alguna versión de Linux. Hacia el final de este
  documento se relacionan diversas fuentes de Linux, tanto servidores
  públicos 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 núcleo del sistema, de aplicaciones, utilidades, manuales y
  documentación, etc. Es bueno estar al día, seguir con atención su
  evolución y aprovechar las mejoras que se incorporen, pero en la
  mayoría de los casos no vale la pena estar reinstalando software por
  el simple hecho de ser una nueva versión, 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 sacarán de
  apuros cuando agotemos nuestros propios recursos...

  1.4.  ¡Socorro! ¿Dónde están 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
  configuración, etc. es la orden 'man', que incluye la ayuda de
  referencia de Unix. Pero sólo es útil en ese ámbito, cuando ya se sabe
  más o menos lo se que busca, y sólo se necesita aclarar dudas
  concretas. Para todo lo demás la mejor fuente de información es, cómo
  no, la propia red. En ella están disponibles tanto libros completos
  (de los que algunas editoriales especializadas han publicado versiones
  en papel) como la colección "Linux HOWTO", de la que este documento
  forma parte. Hay una HOWTO para prácticamente cualquier tema. Su
  objetivo es cubrir, mediante manuales breves, concisos y específicos,
  cualquier duda que pueda surgir. Se actualizan permanentemente, y se
  distribuyen a través del denominado "Linux Documentation Project"
  (LDP) en Internet. La misma información se publica en muy diferentes
  formatos, orientados tanto a la búsqueda y consulta en línea como a su
  lectura convencional. Todas las versiones de Linux incluyen estos
  manuales (al menos la última edición 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 información

  El único elemento común a todas las versiones Linux es su kernel -el
  núcleo del sistema operativo-, que se desarrolla de forma coordinada y
  con actualizaciones sistemáticas. Sin embargo todo sistema operativo
  necesita, junto al núcleo del sistema, todo un conjunto de utilidades
  y herramientas de instalación, configuración 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 código
  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 recopilación, el software de cosecha
  propia que pueda aportar, una presentación más elaborada, gastos de
  distribución y soporte técnico al usuario).

  Algunas de las distribuciones más conocidas son:

     Slackware
        Esta distribucion es quizas de las más extendidas en todo el
        mundo y la más conocida en España, 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 método de instalación es asequible aunque lejos
        de las típicas y vistosas instalaciones a las que el usuario
        neófito esta acostumbrado en los sistemas comerciales.  Tiene
        diversos derivados comercializados bajo diferentes nombres (por
        ej. "Slackware Pro") que mejoran la instalación e incluyen
        manuales y bibliografía 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 instalación (en modo
        gráfico) y el cómodo 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 también
        sistemas basados en Red Hat, como Caldera Inc. y Pacific Hi-
        Tech. Aún poco conocida en Espaa pero pujante, sobre todo para
        principiantes. Sus creadores estan en  <http://www.redhat.com>.
        El mencionado sistema de gestión de componentes de software es
        obra suya, pero lo han ofrecido con carácter abierto y gratuito
        a los demás 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
        acérrimos 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 instalación de la distribución Slackware

  Este es un extracto de la Installation-HOWTO, orientada
  fundamentalmente a la instalación de Linux Slackware. Mucha de la
  información sobre instalacion de Slackware es aplicable a cualquier
  versión 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 básicamente dos formas:
  UMSDOS y Partición nativa. Cada una tiene sus ventajas e
  inconvenientes, pero como se verá es recomendable que todos los
  usuarios terminen usando el segundo método ya que es el más eficiente
  y el que mejor aprovecha las ventajas de Linux.

  3.1.  Instalación 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
  solución es UMSDOS. Permite crear, a partir de un directorio de MSDOS,
  toda la estructura que tendría un disco nativo de Linux. Cuando
  arranque el sistema, Linux emulará su disco a partir de la información
  en ese directorio. Es totalmente funcional, pero puede ser ligeramente
  más lento en ordenadores de gama media-baja y no aprovecha la gestión
  de disco nativo. Una gran ventaja es que si se libera disco en Linux,
  implícitamente estamos creando espacio que será aprovechable cuando
  arranquemos MSDOS, y viceversa. Además, el día que queramos
  deshacernos de Linux (¡poco probable!) o que simplemente nos decidamos
  a hacer una instalación completa, desinstalar ese Linux es tan
  sencillo como simplemente borrar sin contemplaciones el directorio
  C:\LINUX que creó desde MSDOS.

  3.2.  Instalación en partición nativa de Linux.

  Salvo la fase inicial en la que se preparan las particiones nativas o
  el UMSDOS, el procedimiento restante de instalación es básicamente el
  mismo.  Ya que puede ser el que provoque más dudas, centraremos estos
  consejos de instalación en la instalación con partición 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 ACOMPAñA 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 instalación es necesario que LINUX disponga de una partición
  distinta a la de MSDOS para trabajar. Si ya tiene algún sistema
  instalado, lo más frecuente es que sea una única partición DOS que
  ocupe todo el disco, por lo que reparticionar supone eliminar esa
  partición para volver a crearla asignándole menos disco para hacer
  sitio a Linux (o para dárselo totalmente, según la instalación
  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 partición 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 partición 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
  instalación de Linux.
  LEA LA DOCUMENTACION DE FIPS ANTES DE UTILIZARLO.

  Primero debe liberar en MSDOS el espacio que pretenda reservar para la
  nueva partición de Linux (y para el espacio de swap, como después se
  comentará). Después debe defragmentar la partición de DOS con la
  utilidad "defrag" que acompaña a las últimas versiones de DOS, o bien
  sus equivalentes de PCTools o Norton. Ahora puede correr el programa
  fips y crear una nueva partición 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 partición específica para swap, y "robar"
  ese espacio de disco bien a MSDOS o al propio Linux.

  3.2.2.  Formateo de la partición.

  Una vez añadida la nueva partición 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 instalación previa de
  MSDOS, toda la instalación se hará desde el propio Linux. Para
  arrancar necesitaremos dos disquetes (en algunas distribuciones como
  RedHat pueden ser tres), donde grabaremos tanto el núcleo 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 núcleo del sistema con el que arrancar. Como Linux
  es casi un sistema "a la carta", que puede llevar en el núcleo más o
  menos funcionalidades según nuestras necesidades, deberemos escoger
  entre los núcleos precompilados aquel que se adapte mejor a nuestro
  caso. En el futuro será recomendable que incluso recompilemos nuestro
  propio núcleo para personalizarlo aún más, añadir lo que falte y
  simplificar lo que sobre en nuestro caso. El siguiente disquete es el
  "root disk" o "ramdisk", que incluye el software mínimo que cargaremos
  en memoria para la instalación.

  En la distribución de Linux tendremos una serie de ficheros que
  constituyen "imágenes" de esos disquetes. Es decir, una vez elegidas
  qué diquetes necesitaremos, los crearemos a partir de esas imágenes,
  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 símbolo para
  hacer "login" (entrar en el sistema), mientras que RedHat arrancará
  directamente la aplicación de instalación. Utiliza el nombre "root"
  como nombre de usuario (es el super-usuario que administra el
  sistema). La primera vez no necesitarás 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 también una
  "cfdisk" con un interfaz más asequible, aunque iguales en lo básico.

  Si posees una partición de MSDOS, no te asustes, sigue adelante, no la
  vas a perder simplemente por entrar en fdisk, pero sí que debes tener
  precaución al añadir la partición linux sobre el espacio que le
  habíamos quitado a MSDOS, para no afectar a éste.

  Dentro de fdisk usa la opción 'n' para añadir nuevas particiones.
  Dalas de alta como particiones primarias (si ya tienes una particion
  de arranque con MSDOS, ésta será la partición 1 y a partir de ahí
  añadirás particiones Linux).  Es ahora el momento de añadir 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 cuánto swap necesitas. En caso de disponer de más 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 también en fdisk el
  uso que van a tener (tipo de partición), 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, tendrás 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 instalación de nuestro Linux. En el caso
  de Slackware, ese software de instalación 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 partición de swap y luego activarla
  para que empiece a complementar la RAM. Los comandos serían

  ______________________________________________________________________
    mkswap -c /dev/hdXX
    swapon /dev/hdXX
  ______________________________________________________________________

  donde /dev/hdXX sería el nombre de la partición que hemos definido
  como swap. Una vez hecho esto, Slackware ya aporta una utilidad de
  instalación que detectará las particiones creadas y procederá con el
  resto de la instalación con la aplicación "setup", que nos guiará
  durante toda la instalación con un sencillo interfaz de menús, que no
  requiere muchas explicaciones. Durante una de las etapas de la
  instalación 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.  Instalación de los discos.

  Slackware divide la distribución del sistema operativo en "series"
  temáticas, y a su vez cada una de ellas en directorios que se
  corresponden perfectamente con disquetes de 1.44Mb. Los discos
  esenciales serían los de la "Serie A", con los que el sistema ya es
  arrancable autónomamente desde el disco duro, aunque en la práctica
  lógicamente instalaremos también la "AP" (aplicaciones básicas), "N"
  (software de red, si vamos a conectarnos con cualquier modalidad), "D"
  (compiladores y librerías), "X" y "XAP" para el entorno gráfico
  XFree86.
  Por su parte RedHat organiza el software también en "paquetes"
  instalables de forma independiente y también agrupados por temas,
  aunque no sigue ningún esquema traducible en disquetes, por lo que las
  únicas vías de instalación son CDROM o directamente de la red.

  3.2.4.  Configuración

  Una vez cargados a disco los paquetes de software, la siguiente fase
  será la de configuración, 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 típicamente problematicos: el arranque del
  sistema (incluida la posibilidad de arrancar múltiples sistemas
  operativos desde distintas particiones o distintos discos) y la
  configuración de red

  Para instalar un método de arranque de Linux hay dos utilidades:
  "Lilo" y "Loadlin".  La primera es un pequeño programa que se instala
  en el "Master boot record" del disco duro o en la partición 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 cuestión de preferencias de cada cual.
  En el segundo caso podrí darnos algún error si hubiera algún 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 símbolo del sistema, evitando
  entrar en el modo gráfico.

  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
  documentación correspondiente (la de instalación de la propia
  distribución 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 partición correspondiente, y que debe usarlo en vez de continuar
  con una hipotética instalación. Lo único diferente es que se estaría
  usando el núcleo (kernel) del disquete en vez del instalado en el
  disco duro, pero a partir de ahí montará la partición del disco duro y
  usará todo lo ya instalado allí.

  Otro problema frecuente (solventado en la última version de RedHat
  pero no aún en Slackware) es que graba en el disco duro un núcleo
  genérico en vez del que hayamos usado en el "boot disk", que era
  precisamente el que habíamos elegido, por lo que es habitual que, si
  necesitamos algún controlador específico para algún 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 núcleo correcto. Si estas usando LOADLIN, simplemente dale como
  parámetro el fichero del núcleo correcto (es facil tener varios
  núcleos y elegir en cada caso el que interese). Seguir arrancando con
  el disquete como en el caso anterior sería también otra posibilidad
  para no perder ese CDROM, esa tarjeta, etc.

  4.  Españolización  de Linux

  Uno de los aspectos más 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 básico 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 electrónico (muchos sistemas solo respetan 7 bits, por lo que
  textos que podemos ver correctamente en nuestro ordenador
  probablemente se visualizarán de forma lamentable cuando los enviemos
  a otra persona. A continuación se mencionan algunas de las situaciones
  más frecuentes y cómo intentar solucionarlas.

  4.1.  Consola

   ...O cómo demonios poder usar acentos en nuestro propio ordenador

  Mediante el comando loadkeys se cargan las tablas de traducción del
  teclado.  Estas tablas traducen los códigos que se generan al pulsar
  las teclas a los que reciben los programas. Los ficheros que contienen
  estas tablas de traducción se encuentran en el directorio
  /usr/lib/kbd/keytables/ y el fichero que contiene el mapeado del
  teclado español se denomina es.map. Su objetivo es que si pulsamos una
  determinada combinación de teclas, aparezca en pantalla el carácter
  que tenemos pintado en nuestro teclado, y no su equivalente en el
  teclado que se usa en cualquier otro país.

  La llamada a este comando suele ser de la forma siguiente, que
  aparecerá en el arranque por defecto (en Slackware estaría
  en/etc/rc.d/rc.keymap):

       loadkeys /usr/lib/kbd/keytables/es.map

  Nota del autor: A igual configuración de teclado, más de una vez me
  han fallado los acentos por recompilar el núcleo, pero en el momento
  de escribir estas líneas aún 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 líneas 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 líneas 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

  Sería 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 parámetro -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 código 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 momentáneamente con el modificador -r desde la
        propia utilidad, pero sería 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 añadir a la
        variable LS_OPTIONS que probablemente ya tengas definida por
        defecto.

     mc Este clónico Norton tiene una opción Full 8 bits del submenú
        Display bits... bajo Options.

     nroff, groff
        Dispone de una opción -Tlatin1

  4.5.  Xwindow

  El entorno gráfico 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
  configuración. Existe también 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 método no es perfecto, ya que muchas aplicaciones
  bajo Xwindow tienen su propia forma de configuración 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 aplicación
  de la ventana de al lado.

  4.6.  Emulador de DOS (DOSEMU)

  La linea de configuración del teclado en /etc/dosemu.conf deberá
  incluir 'layout es-latin1' para poder usar la 'ñ' y las aperturas de
  interrogación y admiración. Una vez hecho esto, es posible cargar la
  configuración habitual con keyb sp desde el propio emulador de DOS, o
  bien ejecutar 'keybes2.com, una pequeña utilidad para el propio
  emulador disponible en varias de las direcciones habituales.

  4.7.  Correo electrónico

  Por último en relación con el uso del español en Linux, pero no menos
  importante, es poder leer y recibir por mensajería electrónica textos
  escritos en español sin deformar su contenido ni perder los acentos y
  símbolos propios.

  El problema se reduce a lo de siempre: el uso de caracteres especiales
  no incluidos en la tipografía básica sajona requiere trabajar con 8
  bits, pero aún hay muchos sistemas que siguen trabajando con 7 bits,
  lo que trunca o deforma mensajes escritos sin las debidas
  precauciones.

  En el estándar 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 garantías de que lo respete cualquier sistema que pueda
  recibir nuestros documentos. Una solución cada vez más extendida, y
  que permite a los usuarios escribir con libertad y enviar
  prácticamente cualquier información dejando todos esos detalles al
  software de gestión 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 través de
  cualquier sistema sin peligro de perder información. El inconveniente
  (cada vez menor a medida que este sistema se extienda más y más) es
  que si intentamos leer un mensaje con codificación 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 combinación
  de tipos de ficheros (documentos generados por procesadores de textos,
  gráficos, sonido, video, etc). Ni siquiera es necesario que ambos usen
  el mismo software. Basta con que ambos sean capaces de generar la
  codificación durante el envío, y de interpretarla en la recepción.
  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 hábil 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 convirtiéndose 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 más o menos fácil instalacion.

  En el nivel físico (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 atendía hasta entonces. De
  hecho lleva varios meses en uso ininterrumpido y sólo Linux ha sido
  capaz de hacer simultáneamente 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 ridículo. Nadie me garantiza que nunca me vaya a
  fallar, pero lo doy por modesta pero absolutamente victorioso en
  comparación con sistemas comerciales teóricamente superiores y con un
  coste mucho mayor.

  Otra situación en la que actualmente uso Linux es como servidor de
  Web, mail, FTP anónimo (de servicio público a la red) y servicios de
  salida a Internet para una red local de 2.100 usuarios, también con
  muy buenos resultados a pesar de la fuerte carga de trabajo contínuo
  las 24 horas.

  5.1.  Conectividad casera

  Algunas de las situaciones típicas en las que se puede aprovechar la
  capacidad de trabajo en red de Linux podrían ser:

  5.2.  Servidor de terminales

  ¿Quién no tiene en casa un PC (o algo peor) que se ha quedado antiguo
  pero que aún funciona? Cualquier ordenador con un puerto serie y algun
  software de emulación de terminal puede conectarse a un Linux,
  permitiendo varios usuarios trabajando simultaneamente. Para quien no
  lo haya hecho alguna vez, es la forma más simple de comprobar por sí
  mismo que Linux es un sistema 100% multiusuario y multitarea. Todos
  los recursos de memoria, disco, etc.  estarán 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 través 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 física por algo mas "decente" como una LAN
  ethernet o análogo, mejorarán las prestaciones como es lógico, pero la
  idea es la misma y el software de usuario son idénticos (lo que varía,
  claro esta, es la configuración 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 líneas serie la funcionalidad del
  TCP/IP). Así podemos dar servicio de acceso a Internet a los usuarios
  que se nos conecten por teléfono.

  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á también es
  habitual en empresas. Si tenemos una red local enganchada a su vez a
  un proveedor (académico o comercial), entonces una simple tarjeta de
  red y una simple configuración del sistema serán suficientes para
  conectar Linux, que actuará como un ordenador Unix cualquiera, con
  todas sus ventajas. De hecho en la red encontraremos más de un
  servidor que esconde un Linux en sus "entrañas", 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 serían:

  ·  Crea cuentas para los usuarios que realmente vayan a usarlo, y
     asígnales claves dificilmente adivinables (no hace falta
     complicarse la vida con claves imposibles, pero tampoco debes
     ponérselo fácil a los intrusos)

  ·  Hazte cargo de la clave del administrador root y procura mantenerla
     a salvo. Si la facilitas a alguien más, mentalízale para que la use
     con precaución (por otra parte también es una forma de aprender
     nociones básicas de administración 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
     podrías 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 tenías que hacer
     como super-usuario)

  ·  El sistema va dejando muchos mensajes registrando la actividad de
     los usuarios y del propio sistema en múltiples 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 básicos para moverte por el sistema, aprende a recoger
     la información que genere ese servicio, eliminar la inútil, 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 información desfasada despues de tanto tiempo)

  5.6.  Infovía: acceso a Internet desde casa

  5.6.1.  ¿Qué es infovía?

  Infovía es una red creada por Telefónica a la que los usuarios acceden
  desde cualquier punto de la red telefónica española 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 vía
  interesante de acceso, pero para evitar confusiones hay que tener
  presente que Infovía NO es Internet, sino un producto comercial de
  Telefónica. Aún despues de habernos conectado a Infovía 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 Infovía no es más 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 típico de configuración: Telefónica facilita su software
  gratuito para entornos comerciales típicos (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 básico es el pppd, que a través 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 conexión. También intervendrán
  varios ficheros de configuración (unos genéricos de Linux para
  cualquier conexión TCP/IP, otros característicos de las conexiones a
  través de PPP y modem, y por último alguno que usemos en el caso
  concreto de Infovía). Un detalle sobre versiones de software: un
  inconveniente en la evolución de Linux ha sido un cambio en la
  implementación del PPP que hace incompatible algunos pppd con algunas
  versiones del kernel. Si nuestro núcleo 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 núcleos más recientes.

  El listado siguiente es un ejemplo del fichero principal de
  configuración de pppd, en el que a su vez se hace referencia a varios
  ficheros que deberemos crear: identificación y clave facilitada por el
  proveedor de acceso, el guión de inicio de conexión, y el de cierre y
  cuelgue del modem. /dev/modem es un enlace (un "symbolic link") que
  usaremos como nombre genérico 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 líneas, una
  con el login (identificación de usuario) y otra con la clave. Para
  acceder a Internet deberemos introducir en ambos casos lo que indique
  el proveedor, mientras que si sólo vamos a navegar por Infovía (sin
  salir a Internet) es suficiente con poner infovia como usuario
  genérico e infovia como clave.

  /etc/ppp/infovia.chat contiene el guión que utilizará chat en su
  diálogo con el modem. Un ejemplo de su contenido podría 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 marcación por pulsos. Si fuera por tonos
  sustituir ATDP por ATDT. Además, si al número 055 de llamada a Infovía
  hubiera que añadir algún prefijo de centralita o cualquier otra
  marcación especial, no hay más que incluirlo en el listado. Por su
  parte el de cierre de conexión y reseteo del modem sería algo así:

  /etc/ppp/infovia-off.chat:

  ______________________________________________________________________
    TIMEOUT 3
    ''    '\r'
    '\r'  '+++\c'
    '\r'  ATH0
    OK    ATH0
    OK
  ______________________________________________________________________

  6.  Direcciones útiles

  6.1.  Direcciones electrónicas

  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/España <http://www.cs.us.es/archive/linux.html>
        En Sevilla, el servidor más 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 Informática <http://luna.gui.uva.es>
        En Valladolid, con mirrors de LDP/WWW, Slackware, Sunsite y
        manuales traducidos.

     Página 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/>
        Traducción del manual del sistema.

  6.1.2.  FTP Anonimo

  6.1.3.  Grupos de noticias

  6.1.4.  Listas de correo

  Aparte de las numerosísimas listas de correo en inglés (desde las más
  genéricas hasta las más especializadas en temas muy concretos), en
  España 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 información: 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 sabrás que existe un area R34.LINUX con bastante
  actividad (¡es una de las areas más animadas! ;^) Mucha de la
  información distribuida en Internet tiene su réplica en Fidonet,
  además del valioso soporte mútuo 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.  Bibliografía.

  ·  Linux Edición 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 García-Agulló <mailto:Gonzalo.Garcia-
  Agullo@jrc.es> 1996.  Elaborado a partir de experiencia propia y de
  información recopilada a través 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 distribución 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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
  Traducción de Alfonso Belloso, alfon@bipv02.bi.ehu.es
  v1.0, 1 Enero de 1995

  Lo que sigue es una guía detallada de configuración del programa de
  comunicaciones term en Linux.
  ______________________________________________________________________

  Índice General:

  1.      Información

  1.1.    Copyright statement

  1.2.    DISCLAIMER

  2.      Introducción

  2.1.    Sobre este Documento

  2.2.    ¿Qué es el TERM?

  3.      Cómo funciona el TERM

  3.1.    Nomenclatura

  4.      Poniendo a punto las cosas.

  4.1.    Qué necesitas tener de antemano.

  4.2.    Explicación de conceptos.

  4.2.1.  ``Sharing''  (compartición).

  4.2.2.  `` Full TERM networking '' (conexión de red completamente
  TERM)

  4.3.    Compilación del TERM

  4.3.1.  Construir el term  hasta la versión 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 conexión term

  4.12.   Cómo eliminar TERM  de tus particiones.

  4.13.   Optimización de la conexión

  4.14.   Resolución 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 aún 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.  Información

  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.  Introducción

  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 línea
  serie y establecer una conexión de red. De principio a fin, los
  documentos que vienen con el term son bastante buenos, y este COMO no
  pretende reemplazarlos.  La intención de este documento es dar una
  idea de fondo de cómo trabaja el term y detallar los pasos para
  conseguir algunos de los servicios de red más comunes trabajando bajo
  term. Se debe hacer hincapié en que este documento no cubre todo lo
  que se debe saber sobre el term.  Después de leerlo, deberían leerse
  las manpages sobre term, ya que éstas incluyen información 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 línea serie para permitir a
  conexiones múltiples operar de forma concurrente --es decir, puedes
  estar recibiendo un fichero con tu módem mientras trabajas en un
  sistema remoto (distinto)-- a través de la misma conexión módem. El
  term también se puede usar para abrir ventanas de cliente X sobre una
  conexión 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 máquina no llega a tener su propia
  dirección IP. Todo el tráfico deberá ir dirigido al host remoto, y
  será redirigido a tu máquina mediante TERM.

  3.  Cómo funciona el TERM

  Antes de experimentar con term es altamente aconsejable leer primero
  este capítulo completo y el fichero INSTALLATION que viene con el
  paquete. También conviene echar una ojeada a las páginas de manual de
  linecheck, (term)test y term. Esto te ayudará a trabajar más fácil y
  más rápido.

  3.1.  Nomenclatura

  Asumo que estás llamando a un sistema a través de algún tipo de
  servidor de terminal. Utilizo los términos ``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 máquina local, que no tiene conexión de red,
  pero que está conectada por una línea serie a una máquina remota, la
  cual a su vez está conectada a una red, servicios de red. Observemos
  cómo una máquina con una conexión 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 través de su interface de red (por ejemplo,
  manda y recibe paquetes sobre la ethernet).

  SLIP y PPP hacen exactamente esto, convirtiendo la línea módem 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 máquina
  conectada por módem parte de la red, justo como cualquier otra
  máquina.  Esto exige toda la tarea administrativa asociada al hecho de
  ser un nodo de la red (más aún, ya que el enlace módem también hay que
  administrarlo).

  En ausencia de una conexión de red como SLIP o PPP, ¿qué es lo que se
  hace típicamente?. Bien, llamas a tu máquina conectada a la red, lees
  tu correo, tus news, etc, si necesitas un fichero, primero te lo
  transfieres a la máquina remota y entonces te lo envías a la máquina
  local usando el kermit o algún otro programa de comunicaciones.

  Esto es una pena, especialmente porque en realidad sólo puedes hacer
  que una cosa use el enlace módem a la vez. La idea que hay detrás del
  term es básicamente automatizar y multiplexar este proceso.  El term
  se invoca en ambas máquinas, local y remota, y los dos procesos se
  comunican entre sí por la línea módem.  Cuando necesitas un servicio
  de red, haces una solicitud al daemon del term local, el cual
  transmite la petición al daemon del term en la máquina remota
  (conectada a la red). El resultado se devuelve a través de la línea
  módem.

  Para ser más precisos, pongamos que quieres conseguir un fichero por
  ftp. Primero necesitas una versión de ftp que pueda hablar con term.
  Invocas termftp como lo haces con un ftp normal, pongamos 'termftp
  nethost.gov', pero esta versión especial hace su solicitud de red al
  daemon del term local en vez de al kernel. El term local transfiere
  esta petición, a través de la línea del módem, al term remoto, el cual
  establece una conexión con nethost.gov, y transmite los datos de
  vuelta sobre el enlace módem.

  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 módem; por ejemplo
  puedes estar dentro de otra máquina lejana vía termtelnet mientras
  continúa la transferencia del termftp.

  Si esto es demasiado abstracto (o engorroso) no te preocupes; la
  información importante que hay que extraer de esta sección es que hay
  dos copias del term corriendo, una a cada lado del enlace módem.

  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. Además, asegúrate de
  que esté activo el interface loopback de TCP/IP. Si éste es tu caso,
  puedes seguir con el resto de esta sección.

  4.2.  Explicación 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''  (compartición).

  A partir de la versión 1.16 aparece el concepto de compartir la
  conexión TERM con otros usuarios. Esto significa que cuando habilitas
  la característica ``shared'' (compartida), más gente podrá usar la
  misma conexión TERM que tú estás usando, es decir, cuando estás
  trabajando en tu máquina remota a través de tu conexión TERM (has
  usado trsh en tu máquina local para acceder, por ejemplo) otra persona
  en tu máquina local podrá usar la misma conexión TERM al mismo tiempo
  para transmitir un fichero con ftp a su cuenta en tu máquina local
  desde un ftp site de cualquier lugar del mundo.

  Cuando deshabilitas la característica ``shared'' (compartida) (o sea,
  ejecutas TERM en modo privado) tú y solo tú (sin contar a root :-)
  puede usar la conexión TERM.

  Por supuesto, sólo necesitas instalar el ``shared'' TERM en el extremo
  en el que quieres permitir a la gente usar la misma conexión TERM que
  tú estés usando. Así que, si otra gente tiene cuenta en tu máquina
  local y quieren usarlo desde algún lugar de tu red remota habilitas la
  característica shared en el extremo remoto de tu conexión TERM. De
  esta forma toda esta gente puede acceder a tu máquina a la vez
  compartiendo la misma conexión TERM entre sí y contigo mismo. (NOTA:
  el primer ejemplo necesitaba habilitar la característica shared en el
  extremo local de la conexión TERM).

  NOTA para la instalación como root:

  Cuando instalas TERM como root, primero debes crear un grupo TERM
  (antes de compilar) sin miembros, añadiendo la siguiente línea en
  /etc/group:

       term::16:root

  o cualquier otro GID no usado en lugar del 16 si éste ya está en uso.

  Después de compilar e instalar coloca al TERM y sus clientes el SGID
  term:

       chgrp term <cliente_term>
       chmod g+s <cliente_term>

  También cualquier programa que hagas utilizable con TERM debe tener
  SGID TERM.

  4.2.2.  `` Full TERM networking '' (conexión de red completamente
  TERM)

  A partir de la versión 2.0.0 de TERM se usa el concepto full TERM
  networking (conexión de red totalmente TERM). Cuando tu única conexión
  con el mundo exterior es una conexión TERM, tienes una red full TERM
  (completamente TERM) y deberías 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 conexión con
  el exterior es a través del TERM.

  Cuando también tienes algún otro tipo de conexión de red además de los
  programas (pasados a TERM) de la conexión TERM, primero intenta que
  realicen su trabajo usando esta otra conexión. Si ésta falla entonces
  se invoca el TERM y se intenta realizar el trabajo a través de la
  conexión TERM. Para aclarar esto, ahora se da un ejemplo en el que el
  se usa telnet hecho utilizable en TERM.  Este telnet debería funcionar
  con y sin TERM.

       telnet localhost

  no usa el TERM para conectar, pero

       telnet zeus.cs.kun.nl

  usará el TERM sólo si no tienes otro tipo de conexión de red.

  El full TERM networking también implica el mentir sobre el nombre del
  host local, diciendo que es el host remoto en su lugar. Además,
  provoca que bind (0) actúe siempre en el host remoto. En esencia hace
  que muchos programas puedan usarse sin ir a través del TERM mientras
  el TERM está corriendo. Desafortunadamente, la mayoría de programas y
  demonios UDP no funcionarán con TERM sin estos incómodos trucos.

  4.3.  Compilación del TERM

  Si tienes suerte esto sólo debe implicar un make. Sin embargo, lo más
  probable es que necesites hacer más. Debido a nuevas opciones en las
  versiones nuevas del TERM (sharing, configure) ahora es un poco más
  complicado crear el ejecutable del TERM. Hoy en día 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 sección en tres partes:

  1. Construir el TERM hasta la versión 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 versión 1.15

  Para estas versiones del term, la compilación no debería implicar
  ejecutar más que estos comandos

       make DO=install OS-type
       make installman

  Encontrarás el term, sus clientes y las páginas de manual (man)
  cómodamente construidas e instaladas y listas para usar después de
  esto.

  Además, necesitarás 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 opción 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á cómo habilitar/deshabilitar la opción shared
  durante la compilación del term

  1. Eres un usuario normal (sin acceso de root) y NO quieres COMPARTIR
     (SHARE) la conexión term con otros usuarios.

     Como usuario que no quiere compartir la conexión term con otros
     usuarios deberías hacer lo siguiente para construir el term:

          make DO=install OS-type
          make installman

  Después de esto, el term, sus clientes y las páginas de manual están
  generados e instalados.

  Además, necesitarás 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 algún parámetro del compilador.

  2. Eres un usuario normal (sin acceso de root) y SI quieres COMPARTIR
     (SHARE) la conexión term con otros usuarios.

     Como usuario que quiere compartir la conexión term con otros
     usuarios deberías hacer lo siguiente para construir el term:

          make DO=installshare USERSHARE=$HOME/term OS-type
          make installman

  Después de esto, el term, sus clientes y las páginas de manual estarán
  compiladas e instaladas.

  Además, tendrás un directorio $HOME/term (por defecto) con permisos
  drwxrwxr-x. En este directorio encontrarás al menos el socket usado
  por el term para sus conexiones (tmp/private/socket=).

  3. Eres root y NO quieres COMPARTIR (SHARE) la conexión term con otros
     usuarios.

     Como root que no quiere compartir la conexión term con otros
     usuarios deberías hacer lo siguiente para construir el term:

          make DO=install OS-type
          make installman

  Después de esto, el term, sus clientes y las páginas de manual estarán
  compiladas e instaladas.

  Además, tendrás un directorio llamado /usr/local/lib/term (por
  defecto) con permisos drwxr-xr-x. En este directorio encontrarás al
  menos el socket usado por el term para sus conexiones (tmp/pri­
  vate/socket=).

  4. Eres root y quieres COMPARTIR (SHARE) la conexión term.

     Primero, asegúrate de haber leído la sección sobre ``sharing''
     anterior.

     Como root que quiere compartir la conexión term deberías hacer lo
     siguiente:

          make DO=installshare OS-type
          make installman

  Después de esto, el term, sus clientes y las páginas de manual estarán
  compiladas e instaladas.

  Además, tendrás un directorio llamado /usr/local/lib/term (por
  defecto) con permisos drwxrwxr-x. En este directorio encontrarás 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 asegúrate de haber leído la sección 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 estás tratando de instalar el term, si el
  directorio origen está disponible o no, y si hay puesta alguna opción
  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 más 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 estándar, 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, instalándolos junto con las páginas 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, instalándolos junto con las páginas 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 páginas 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 páginas de
  manual.

  4.4.  client.a, libtermnet.a, libtermnet.sa, libtermnet.so

  Con el term se suministra una librería con funciones para clientes
  term.

  Hasta la versión 1.16 esta libreria se llamaba client.a. Durante la
  compilación de term se generaba esta librería, que después se usaba en
  la compilación de los clientes term. No se instalaba en otro
  directorio.

  A partir de la versión 1.16 se cambió el nombre de la librería por
  libtermnet.a. Hasta la versión 1.19 esta librería se crea en el
  directorio term y después se usa durante la compilación de los
  clientes term. No se instala en otro directorio.

  A partir de la versión 2.0.0, además de libtermnet.a también se crean
  libtermnet.so y libtermnet.sa (libreria shared y librería exported
  initialized) durante la instalación del paquete term. Durante la
  instalación de todas las partes del paquete, estos tres ficheros de
  librerías se instalan en el directorio /usr/local/lib (por defecto).
  Y después 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 dinámico, ld.so) para las librerías
  compartidas más recientes que se encuentran en los directorios
  especificados en la línea de comandos, en el fichero /etc/ld.so.conf,
  y en los directorios permitidos (/usr/lib y /lib).

  Si la instalación se hace correctamente, los tres ficheros de librería
  podrán ser usados por los clientes de term que son generados con
  librerías dinámicas en lugar de estáticas. Estas librerías también se
  pueden usar ahora para portar tu software propio a fin de poderlo usar
  con el term (ver más 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 explicarán 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 sólo es importante la variable
  TERMDIR (estas versiones no reconocen el modo shared).  Para estas
  versiones TERMDIR se debería definir como sigue:

       setenv TERMDIR $HOME     # csh o tcsh
       export TERMDIR=$HOME     # bash

  A partir de la versión 1.16 term también 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 sólo 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 versión del term
     entre la 1.16 y la 1.19 (README.share en el paquete del term) y 2
     si se está usando la versión 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 versión antigua del client.a) en
     modo compartido (shared).

  A partir de la versión 2.0.0, term también reconoce la variable
  TERMSERVER.  Se necesita definir esta variable cuando se tienen varios
  módems y mas de una conexión a la vez. Para especificar que conexión
  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 deberían definir la variable TERMSERVER con el nombre de
  conexión 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 leerán tu termrc; de modo que puedas ajustar su comportamiento.
  Ahora ejecuta (term)test. Deberías poder hacer un trsh y un tupload.
  Prueba con:

        tupload ./term /usr/tmp

  deberías de conseguir tener una copia del binario term en /usr/tmp ).
  La salida del term local debería aparecer en local.log y la remota en
  remote.log. Puedes ejecutar term con el parámetro -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 conexión vía módem
  usando un programa de comunicaciones como kermit o seyon.  En la
  documentación del programa encontrarás qué tienes que hacer para
  conectarte con la máquina remota.

  Cuando hayas establecido la conexión y quieras ejecutar term,
  necesitas suspender o salir del programa de comunicaciones sin cerrar
  la conexión.

  A continuación explicaré cómo hacer esto con algunos programas de
  comunicaciones.

  4.7.1.  kermit

  Iniciar term cuando se usa kermit es fácil. En el prompt local de
  kermit se teclea ``suspend'', de modo que volverás al prompt de Linux.
  Desde este prompt puedes ya establecer la conexión term.

  4.7.2.  seyon

  Una forma de iniciar chequeo de línea o TERM cuando usas seyon es
  poner linecheck y TERM en el menú Transfer (controlado por el fichero
  $HOME/.seyon/protocols).

  Añade 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 máquina local, selecciona
  en el menú Transfer el ítem ``Line Check'' o ``Term''.

  Por supuesto, también podrías usar el botón de comando de shell y
  teclear en el cuadro de diálogo que se te abrirá los comandos
  linecheck o term. Esto mismo hace redirección automática al comando.

  4.8.  Hacer un enlace transparente.

  Presumiblemente, puedes establecer una conexión módem entre tus hosts
  local y remoto. Típicamente lo que haces es, llamar a algún tipo de
  servidor de terminales y conectas con tu host remoto a través de él.

  También sueles usar para ello software de terminal, como kermit o
  seyon para comunicar con tu módem (los ejemplos de este documento usan
  el kermit, ya que es el que usa el autor). Si estás teniendo problemas
  con el módem, o con el software de terminal, echa una ojeada al Serial
  HOWTO; esto debería ayudarte.
  Una vez establecido el enlace, querrás hacerlo lo más transparente
  posible.  Comprueba los comandos en el servidor de terminal (help o ?
  suele ser un buen comienzo). Busca la opción 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, tendrás que usarlo
  poniendo el parámetro -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 documentación de tu módem para
  saber cómo configurarlo para hacer comunicaciones rts/cts de 8 bits.

  4.9.  Ejecutar linecheck

  ATENCIÓN: En algunos documentos las opciones de línea 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 versión de term 2.3.0 linecheck ya no necesitará
  tener el nombre del fichero de log en la línea 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 información de configuración
  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 cuáles son estos
  caracteres. Debes usar linecheck después de haber establecido un
  enlace módem lo más 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 encontrarás un conjunto de números al final
  de los ficheros linecheck.log. Estos son los que deberías poner como
  linecheck.log local decía 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 carácter en un extremo, también debo
  ignorarlo (ignore) en el otro; así que, en este ejemplo, debería
  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 colgarán tu línea si tienes control de flujo por
  software. Si soluciona los problemas de cuelgues, tendrás 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, mátalo, 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 líneas:

       escape 29
       escape 157

  y mi termrc remoto tiene las líneas:

       ignore 29
       ignore 157

  ya que mi linecheck.log remoto decía que 'escape 29 y 157'.

  4.10.  Prueba a correr el TERM

  Accede a tu sistema remoto, haciendo el enlace lo más transparente
  posible (si no lo has hecho aún).  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 podría poner estas opciones en mi termrc. Lo hice así
  porque evitaba tener que editar un fichero mientras ponía 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; estaría desperdiciando memoria. Si estás
  depurando el enlace y eres capaz de abortar el term remoto, puede que
  no quieras hacer el exec.

  La opción -r es necesaria sólo en un extremo. term verá a este extremo
  como el remoto de la conexión (ten en cuenta que el extremo remoto del
  term puede ser tu propia máquina local). Si no usas esta opción en un
  extremo los clientes de term se caerán espontáneamente.

  -l $HOME/tlog. Esto registra los errores en el fichero tlog en mi
  directorio home. Muy útil para depurar. No hay razón para no ponerlo.

  -s 38400 : Tengo un módem 14400, con compresión. Para ratios de
  compresión óptimos, necesito poder mandar bits al pipe lo más rápido
  posible. Para un módem más lento, debería ser un número menor. Fíjate
  que si tienes una UART 16450 en tu puerto serie, las velocidades altas
  pueden provocar pérdida 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) necesitarás reducir este número.

  -c off : Desactiva la compresión de datos. Tengo un módem con
  compresión, y no necesito comprimir las cosas dos veces.

  -w 10 -t 150 : De nuevo estas son opciones para optimizar mi enlace de
  módem rápido. Pongo mi ventana a 10 y mi timeout a 150.  Esto lo hago
  de acuerdo con la recomendación de la página de manual de term_setup.

  Vuelve sobre tu máquina local y suspende tu programa de comunicaciones
  (^Z en kermit). No querrás que esté corriendo a la vez que term, ya
  que lucharía con el term por el puerto serie.  Si puedes convencer a
  tu módem de que no cuelgue cuando salgas de tu programa de
  comunicaciones (cuando cambia el DTR), podrías 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 módem; Así que apunto tanto la
  entrada como la salida estándar a /dev/modem (eso es lo que hacen < y
  >).  También lo hago correr en background; de modo que puedo usar esta
  consola para otra cosa si la necesito.

  term debería 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. Vuélvelo a intentar (después
  de que hayas terminado de leer esto :-). Observa que la conexión no
  parecerá muy rápida, especialmente si usas compresión - será un poco a
  saltos. La velocidad real aparece durante transmisiones de ficheros y
  similares.

  4.11.  Terminar tu conexión term

  Muy probablemente, una vez que hayas hecho un montón de trabajo usando
  el term, querrás terminar el trabajo y deshacer tu conexión term. Para
  poder hacer esto hay cuatro formas:

  1. Matar (kill) los programas term a ambos lados de la conexión. Esta
     es la forma menos recomendada de terminar tu conexión.

  2. Una forma mejor es ejecutar el siguiente comando localmente:

          echo '00000' > /dev/modem

  Esto terminará la conexión 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 versión 1.14 existe el programa tshutdown (realmente
     para la versión 1.14 está disponible como patch, para versiones más
     recientes se incluye en el paquete). Ejecutando tshutdown, la
     conexión term finalizará perfectamente.

  4.12.  Cómo eliminar TERM  de tus particiones.

  Ok, me habéis preguntado por esto. Así que voy a presentar los pasos a
  seguir para desinstalar term:

  ·  Eliminar directorios con su contenido. Dependiendo de cómo hayas
     instalado term, tendrás uno o más 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 algún momento de la instalación tuviste que crear
     un grupo llamado term. Busca en /etc/group una línea con ese grupo
     y bórrala.

  ·  Los ejecutables y paquetes del term. Esta es la parte más difícil.
     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
     cuáles borrar. No olvides ficheros de configuración y otros que
     vengan con esos ejecutables.

  ·  Ficheros de librería. Lo mejor es teclear lo siguiente:

       cd /
       find . -name libtermnet* -exec /bin/rm {} \;

  Esto encontrará y borrará todos los ficheros de librería 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 línea. 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 páginas 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.

  Después de todo este ejercicio, podrás estar bastante seguro de que
  has borrado todo lo relacionado con term.

  4.13.  Optimización de la conexión

  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 debería dar un factor del
  doble de rápido que el comprimido. Los parámetros que querrás ajustar
  son baudrate [velocidad del puerto]  (-s), compression (-c), windows
  [tamaño de ventana]  (-w), timeout [tiempo de espera] (-t) y retrain
  (-A).

  Cuidado con el parámetro retrain. Con la versión 1.19 del term obtengo
  peor rendimiento, que va de un 80% a un 90% comparado con la ejecución
  del term sin el parámetro retrain. No está claro si se trata de un bug
  en la versión 1.19 y si este problema existe sólo en la versión 1.19
  del term.

  Baudrate: el número máximo de bits por segundo que el term intentará
  enviar a través 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 módem funciona a una velocidad menor sobre la línea
  telefónica. La opción baudrate está indicada para sistemas que
  almacenan en buffer la salida al módem. Durante la configuración y el
  ajuste es mejor usar un baudrate pequeño que uno que sea demasiado
  grande. Para enlaces de alta velocidad (> 38400), ponerlo sin límite
  será probablemente ventajoso. Esto se consigue usando el valor off.
  term confiará entonces solamente en el kernel para controlar el flujo.

  Compression: necesitarás poner en on si no tienes un módem con
  compresión. Si tienes un módem de éstos, pon compression off, de lo
  contrario estarás comprimiendo las cosas dos veces, lo que
  habitualmente incrementa la cantidad de datos transmitidos. Los módems
  con compresión son aquellos que usan los protocolos MNP-5 o V42.bis.
  Observa la documentación del módem y el mensaje del módem cuando
  conecta.

  Windows: este es el número de unidades de datos, o paquetes, que el
  term enviará por la línea antes de obtener reconocimiento (ack) desde
  el term remoto. Para módems rápidos, aumentar esto puede ser una
  mejora; para enlaces más lentos esto puede saturar el extremo remoto.

  Timeout: el tiempo que el term esperará a un ack.  Si has aumentado
  windows y estás 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.  Resolución de problemas

  En esta sección 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 versión. De esta forma evitas pelearte con un árbol de
     directorios lioso.

  ·  ¿Borraste los sockets antiguos? Cuando pongas al día tu versión del
     term borra todos los sockets (llamados socket=) creados por el
     term. El no hacer esto puede causar extraños 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 compilación estás
     teniendo un error de ensamblador, relacionado con que el parámetro
     -k no es reconocido.  La razón de este error es desconocida. La
     solución es configurar el term con librerías estáticas. Es decir,
     tendrás que hacer ./configure --user --static y entonces seguir con
     el proceso de compilación como sueles hacerlo normalmente. Ahora el
     term debería compilar correctamente.

  ·  ¿El termtest te está presentando el error:

       Term: failed to connect to term socket '/root/.term/sockettest'

  (Term: falla la conexión 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

  ·  ¿Estás usando el binario adecuado? El term se ha modificado
     bastante, y muchos sistemas tienen versiones diferentes de los
     programas rondando por ellos. Asegúrate de que estás usando la
     versión correcta.  Esto también 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 deberían mostrar su número de versión al comenzar. (Aunque
     la versión 1.14 dice ser la 1.12. Sigh.)

  ·  ¿Tienes el termrc correcto en el lugar adecuado? Dependiendo de la
     versión de term que estés 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; asegúrate de que no
  estén antes de instalar. Si estás 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 (nótese, ¡no hay un punto precediendo a termrc!).

  ·  ¿Encuentra el term su fichero termrc? Cuando inicias term a ambos
     lados, deberías 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 línea el term no puede encontrar su fichero
  termrc y sabes que algo ha ido mal durante la instalación (a no ser
  que no estés usando el fichero termrc y estés introduciendo todas las
  opciones en línea de comandos :-). Comprueba la localización 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
     común 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, tendrás que poner­
  los en diferentes líneas del fichero termrc, cada línea comenzando por
  la palabra escape o ignore. Sólo 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 parámetro
     -DTERM_NFS_DIR en la línea CFLAGS del Makefile. Aunque, al autor el
     usar este parámetro le produce un error de compilación al compilar
     term 1.19 en una máquina con SunOS 4.*.

  ·  ¿Pertenecen los ficheros y directorios al usuario y grupo correcto
     y tienen los permisos adecuados? Esto no debería ser problema ya
     que estos permisos se ponen durante la fase de instalación. Sin
     embargo, cuando portas tus propios programas a term debes
     prevenirte de ello.  También 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.

  ·  ¿Estás 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 línea 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 conexión con el exterior se hace mediante term, la
     línea 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, asegúrate de haber instalado el loopback-interface
        de TCP/IP en tu máquina. 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 también puedes ver qué protocolos se utilizan.
     En mi máquina aparece lo siguiente:

          IP Protocols: ICMP, UDP, TCP

     Para más información sobre cómo instalar el loopback-interface,
     léete el NET-HOWTO.

  ·  ¿Estás obteniendo todo tipo de mensajes timed out en tus ficheros
     log de term? Esto significa que tu conexión de term no está
     optimizada. Un pequeño número de esos mensajes nunca es problema.
     Estos son debidos muy posiblemente a que los factores temporales
     influyen en la conexión física entre tus hosts remoto y local.

     Cuando tienes un montón de estos mensajes todo el tiempo, tu
     conexión se ralentizará considerablemente. Tienes que ajustar los
     parámetros mencionados en la anterior sección ``''. Además, esta
     parte de la instalación es un proceso de prueba y error. No se
     pueden dar unas reglas fijas sobre los valores a colocar en los
     variados parámetros ya que son muchos los factores que influyen en
     la conexión.  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 solución es usar una versión TERMificada de ftp o ncftp. Sin
     embargo, algunas de estas aplicaciones adaptadas tampoco
     funcionarán.

  5.  Clientes TERM

  Term proporciona varios clientes por defecto. Esto incluye trsh, tmon,
  tupload, tredir, txconn y en nuevas versiones trdate, trdated.
  Además, a partir de la versión 2.0.0 está disponible tudpredir y desde
  la versión 2.1.0 también tdownload.  Esta sección hará referencia a
  trsh, tmon, tupload, tdownload, trdate y trdated. El resto tiene su
  propia sección cada uno.  No funcionará ningún cliente de term hasta
  que se haya establecido un enlace term.
  tmon es una utilidad simple para monitorizar las estadísticas del
  enlace. Imprime un diagrama de tiempo de caracteres transmitidos y
  recibidos. Se invoca simplemente como tmon. Desde la versión 1.11,
  tmon ha tenido un bug que provoca que alguna información 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 través 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 obtendría 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 pondrán
  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 escribiría 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
  colocarán 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, escribiría tdownload term114.tar.gz /usr/tmp.

  Cuando se usa tdownload no es posible utilizar comodines como
  tdownload a.*. La razón 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 máquina
  remota y pone el reloj local con la hora del remoto. Se debe ejecutar
  como root.

  trdated es la versión 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 conexión term, este
  demonio se pondrá en marcha si se coloca en rc.local. Una vez que se
  cree una conexión term, comenzará a ajustar la hora.

  6.  X y TERM

  term permite a los usuarios abrir ventanas X en la máquina local desde
  clientes que están corriendo en una máquina de la red. Esto se hace
  usando el cliente txconn. txconn se ejecuta en el remoto, la máquina
  conectada en red; se invoca simplemente como txconn. Se coloca en
  background y devuelve un número a la salida estándard; este número es
  el número de display que los clientes deben usar para acceder al
  servidor X de la máquina local. Un ejemplo aclarará ésto. Estoy
  accediendo a mi cuenta, vía 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 máquina local, haré:

       setenv DISPLAY foo:10

  (para bash debería usarse export DISPLAY=foo:10). En algunos casos
  además de eso puede ser necesario hacer un xhost + foo en la máquina
  local. Ahora, cuando arranque el cliente, intentará conectar con la
  pantalla 10 de la máquina foo, pero txconn estará escuchando en esa
  pantalla, y pasará todos los paquetes con protocolo X vía term al
  servidor X en el host local; es decir, la ventana se abrirá en la
  máquina local.

  Es posible trabajar en el otro sentido - correr un cliente en la
  máquina local y tener abierta la ventana en una máquina remota de la
  red; sin embargo, retrasaremos esta explicación hasta después de haber
  comentado tredir.

  txconn no es terriblemente seguro; cualquiera puede conectar con el
  servidor local vía term y provocar todo tipo de daños. Si este tipo de
  cosas son preocupantes, podría ser una buena idea considerar el uso de
  xauth para autorizar las conexiones. Consulte la página 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 vía módem. Se supone que X11R6 presenta una versión 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 líneas serie. sxpc
  incluye un texto sobre cómo hacerlo funcionar con term, y está
  recomendado. El paquete sxpc también explica como usar xauth; por lo
  que está doblemente recomendado.

  7.  tredir

  tredir es una de las utilidades más potentes de term, permitiendo que
  la mayoría de los servicios de red importantes puedan obtenerse en un
  enlace term. Antes de explicar cómo 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 máquinas, el ftp (File Transfer Protocol), o
  Protocolo de Transferencia de Ficheros, que transfiere ficheros entre
  máquinas, y smtp, el protocolo de transmisión de correo, que se usa
  siempre que se envía un correo electrónico.

  Cada servicio de red tiene un número de puerto asociado a él. El mapeo
  de números de puerto con los servicios correspondientes se da en el
  fichero /etc/services. Este fichero debería ser el mismo en todas las
  máquinas conectadas a Internet.

  ¿Como se accede a estos servicios? Cada máquina en red corre un
  demonio llamado inetd, el cual escucha los intentos de conexión a los
  puertos de red. Estas peticiones pueden llegar tanto desde la red,
  como desde la propia máquina. 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
  número de puerto al que se hizo la solicitud. Si se configura inetd
  para hacerlo, proporcionará el servicio adecuado a la conexión que lo
  solicita. La configuración de inetd es la que se da en el fichero
  /etc/inetd.conf, que contiene una lista de los servicios que
  proporciona inetd. Para más información vea las páginas de manual de
  inetd e inetd.conf.

  Se puede comunicar directamente con los servicios de red usando telnet
  (nótese bien, no termtelnet). Por ejemplo, para hablar con el demonio
  de sendmail (o smtp) en la máquina nombre_de_máquina;, se puede hacer
  un telnet nombre_de_máquina smtp , o telnet nombre_de_máquina 25, (ya
  que 25 es el puerto asignado a smtp en /etc/services). Debería obtener
  una agradable bienvenida del demonio de la máquina 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 petición.
  Cuando se hace una solicitud de un servicio, en vez de proporcionar
  ese servicio, como hace inetd, tredir traslada la solicitud a través
  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 máquina de la
  red, pero por defecto la envía a la máquina al otro extremo del enlace
  term.  tredir ``redirige'' los servicios TCP (Transmision Control
  Protocol) a través del enlace term.

  Un ejemplo lo aclarará. Vamos a redirigir un puerto local al puerto
  telnet de la máquina remota. Para hacer esto pondríamos tredir 2023
  23.  Ahora, cualquiera que conecte al puerto 2023 de la máquina local
  será redirigido al puerto 23 (telnet) de la máquina remota. Aquí va
  una sesión de ejemplo; la máquina 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 podría hacer telnet a mimaquina desde la red
  simplemente conectándome al puerto redirigido de la máquina en red
  (usando telnet) - esto es, telnet netsun 2023.

  El principio general de uso del tredir es redirigir el servicio
  deseado a una máquina de la red. El siguiente ejemplo nos permitirá
  leer las News en la máquina local a través 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 configuración 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 vía
  term.  (nótese bien, si lee las News de este modo, asegúrese de que en
  todos los mensajes que deje ponga una cabecera Reply-To: a una
  dirección 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 podría hacer un tredir
  119 news.domain.org:119 y evitar la configuración del lector de News?
  La respuesta es que todos los puertos con números 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 fácilmente comentando la línea
  correspondiente al servicio poniendo el carácter # al comienzo de la
  misma. El superusuario tiene que mandar una señal HUP a inetd (kill -1
  <inetd-pid>) para hacer que vuelva a leer su configuración.

  7.2.  Trucos tontos de tredir

  En esta sección describiremos algunos de los usos más comunes de
  tredir. Ya hemos descrito como redirigir los servicios nntp y telnet;
  Ahora daremos algunos ejemplos más complicados.
  7.2.1.  X window

  En una sección previa, se describió como hacer que un cliente X que
  corre en la red abra una ventana en la máquina de casa usando txconn.
  La misma técnica se podría usar en la máquina de casa para mostrar un
  cliente en la máquina del lado remoto del enlace term. ¿Pero cómo
  puede uno ver un cliente X en una máquina 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 número viene
  dado por la fórmula: puerto = 6000 + número de display, p.ej. un
  servidor X manejando la pantalla 0 en una máquina escucharía el puerto
  6000, si estuviéramos manejando la pantalla 2, escucharía el puerto
  6002. Si se pone la variable de entorno DISPLAY en maquinaX:n, los
  clientes X tratarán de conectar con el puerto 6000+n de maquinaX.

  Podemos usar esto para trucar los clientes X de la máquina local y
  abrir ventanas en displays remotos. Supongamos que quiero abrir un
  xterm, corriendo en mi máquina local, en el display 0 de la máquina
  maquinaX, que esta corriendo en algún lugar de la red. Primero
  escogeré un número 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 término 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 debería abrir un xterm en la máquina 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 conexión TCP.

  Observe que en lo que concierne a maquinaX, la solicitud X viene de la
  máquina del extremo remoto del enlace term (máquinaremota) - de modo
  que si necesita autorizar la conexión, debería hacer bien xhost +
  máquinaremota en maquinaX, o bien usar xauth para actualizar el
  fichero .Xauthority en su máquina local para el display número 2,
  usando la clave de maquinaX.

  De nuevo, para acelerar las conexiones X, se puede usar el programa
  sxpc, que incluye una explicación sobre cómo usar tredir para
  establecer el enlace y autorizarlo usando xauth.

  7.2.2.  Correo con TERM

  Está bien, vosotros lo pedísteis. El correo electrónico tiene la
  justificada reputación de ser una de las cosas más dificiles de hacer
  funcionar bien en un sistema UNIX. Para conseguir que el term funcione
  correctamente con el correo es preciso entender cómo funciona el
  correo, lo cual va más allá del objetivo de este documento.

  Para aprender más sobre correo, debería consultar un libro de
  administración de sistemas UNIX y/o la FAQ de la conferencia
  comp.mail.misc, disponible en el ftp anónimo de
  ftp://rtfm.mit.edu/pub/usenet/comp.mail.misc.

  También tiene a su disposición 2 paquetes en el ftp anónimo de
  sunsite.unc.edu que le ayudarán 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 descripción de como funciona el
  correo electrónico. Hay dos partes que hacen funcionar el correo, el
  envío de mensajes y la recepción de los mismos. Comenzaremos con el
  envío 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 envío de correo se hace a través 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 dónde enviarlo observando la dirección, y finalmente lo envían
  a través de la red.

  Los dos MTAs mas comunes en sistemas Linux son sendmail y smail. La
  idea básica es hacer que su MTA se conecte a otro MTA que esté
  corriendo en otra máquina de la red que sepa qué hacer con su mensaje.
  Esto se consigue redirigiendo un puerto local hacia el puerto smtp de
  la máquina en red.  Entonces debe indicar a su MTA que tome todos los
  mensajes con los que no sepa que hacer, y los envíe fuera a través del
  puerto redirigido de su máquina local al MTA de la máquina remota, la
  cual encaminará los mensajes hacia su destino correcto.

  ¿Cómo hacemos esto usando smail? Primero redirigiremos un puerto al
  puerto smtp de la máquina de correo de la red (mailhost):

       tredir XXXX mailhost:25

  donde XXXX es el número 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 configuración que generalmente están 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 - envío a ficheros y tuberías y
  demás cosas. De nuevo, consulte la documentación si no lo ha hecho.

  En el fichero config, ponemos la siguiente definición:

       smart_path=localhost

  localhost es la máquina 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 líneas header cambian la cabecera From en todo
  correo saliente por la dirección SU_DIRECCION_DE_RED, que será la
  dirección de red a la que quiere que le envíen el correo. Si su enlace
  term va a ser usado por más de una persona, tendrá que hacer algo más
  laborioso, como mantener una base de datos de direcciones de red de
  usuarios locales e insertar las mismas en las cabeceras From:.

  La línea service es el nombre del número de puerto local que ha
  redirigido al puerto smtp de la máquina conectada a la red. En mi
  versión de smail no es posible ponerlo como un número, asi que tengo
  que ponerlo como un nombre, como ``foo'', y entonces definir ``foo''
  en /etc/services de modo que sea el número del puerto redirigido. Si
  usa un suid de tredir y se redirige el puerto smtp (25), no es
  necesario definir esto.

  Esto debería 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 múltiples encolados a través 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 tráfico 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 número del puerto redirigido en la máquina
  local. Este debería ser un puerto sin usar por encima del 2000.
  Seguidamente le decimos a sendmail a que máquina 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 conexión term se haya establecido con el host Internet,
  ejecute los siguientes comandos en la máquina local.

       tredir PORTNUMBER internet.host:25
       /usr/lib/sendmail -q

  Pasamos ahora a la recepción de correo electrónico usando term.
  Asumiremos que el correo se envía a su cuenta en el servidor de correo
  (mailhost) de la red. La solución más simple es usar trsh o termtelnet
  para acceder al servidor y leer su correo allí.

  Sin embargo, también es posible hacer pasar el correo automáticamente
  a su máquina local. Una forma de hacer esto es usar el Post Office
  Protocol, (POP). POP fue diseñado precisamente para este propósito:
  enviar correo a máquinas que tienen conexiones de red esporádicas.

  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 podría esperar,
  usando tredir. El servicio POP es el 110 (Observe que hay un protocolo
  más antiguo, POP-2, que usa el puerto 109; en este documento
  describiremos POP-3, que es la última versión 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 máquina local. No lo he usado, pero cualquier comentario de alguien
  que lo haya hecho será bienvenido. También puede usar el paquete
  term.mailerd+smail para este propósito. 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 cómo 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 través de un
  enlace term. Una diferencia más 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 cómo conseguir todos los servicios de red sobre
  term, sería bonito colocar las cosas de tal modo que su enlace se
  establezca y configure automáticamente. Básicamente hay infinitas
  formas de hacerlo, dependiendo de que programa de comunicación utilice
  y cómo acceda a su sistema remoto.

  Un programa que yo no he usado, pero que he oído que es bastante
  agradable, es fet: un front-end para term. Está diseñado 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 efectúa 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 conexión, retoma y termina el kermit.
  La última línea 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 sería posible hacer solamente !tshutdown. ¿Funcionará esto
  también?  --)

  Como ya dije, hay zillones de formas de hacerlo; estas sólo 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 combinación con term. Algunos de ellos podrá
  encontrarlos ya como binarios con soporte para term. Esto incluye
  telnet, (nc)ftp, mosaic y muchos otros. La mayoría de estos programas
  se han compilado para term 1.17 o anteriores. A pesar de eso, aún
  deberían funcionar con versiones más 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
  subsección.

  El último modo de compatibilizar sus programas con term es
  termificándolos.

  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. Añada a los flags de compilación -include
     /usr/local/include/termnet.h

  2. y añada a la lista de librerías -ltermnet

  Si está instalado en su directorio home:

  1. Añada a los parámetros de compilación -include $HOME/term/termnet.h

  2. y añada a la lista de librerías -L$HOME/term -ltermnet

  Ahora compile el software como se describe en el documento INSTALL o
  README que venga con el software. ¡Ya estaría todo!

  En este momento los comandos deberían funcionar con y sin term.

       telnet localhost

  no usa term para conectar, pero

       telnet bohr.physics.purdue.edu

  usará term sólo si no hay otro tipo de conexión de red.

  Algunos comandos, como rlogin, sólo pueden ser usados por root y por
  el propietario de la conexión term (personas privilegiadas).

  Algunos comandos term serán transparentes a term y sólo usarán term
  cuando no haya otra opción. Algunos ejemplos típicos son telnet y ftp.

  Otros requieren un parámetro externo para indicarles que les es
  posible usar term. En estos programas se incluyen xarchie, fsp e
  ytalk.

  Se puede poner el parámetro 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 específicas,
  pero por ahora sólo está probada su existencia.

  Si se añade una conexión 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, aún 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 dinámicamente para usar
  term.

  Antes de poder termificar deberá asegurarse de que tiene una versión
  2.2i (en esta versión 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 versión de term.

  Después de crear la librería 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 también 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
  dirección del From:.

  11.  Clientes term .

  11.1.  Clientes term  disponibles en los servidores ftp .

  A continuación se da una lista de aplicaciones que corren con term. Yo
  no digo que esta lista esté completa; así que cualquier añadido será
  bienvenido. Siempre que sea posible indicaré el site y directorio
  donde se pueda encontrar la aplicación. Si indico sunsite.unc.edu (--
  En España contamos con un magnífico y veloz mirror de SunSite,
  localizable en sunsite.rediris.es--) como el lugar donde encontrar la
  aplicación, 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 Informació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

  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, páginas de manual y
  libtermnet.so.2.00.04.  Los clientes se han compilado usando esta
  versión 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 también 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 aún 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 sólo acepta llamadas si el
     socket que solicita la conexión está ligado a un puerto por debajo
     del 1024. Esto parece ser problemático. Sin embargo, algunos
     servidores NFS tienen una opción insegura. En este caso NFS podría
     funcionar ocasionalmente, si se le añade al term soporte RPC.

  12.  Term  y la seguridad

  En esta sección puntualizaré algunos aspectos sobre la seguridad
  usando TERM. Los problemas serán 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 comunicación el superusuario puede ejecutar programas de
  TERM.

  Esto también indica que el ``root'' del otro sistema puede ejecutar
  trsh y entrar con los privilegios del propietario de la conexión
  fácilmente. Si este propietario es ``root'' la habremos liado.

  La solución es simple: poner la siguiente línea en el fichero termrc
  de la máquina local:

       denyrsh on

  Con esto, nadie podrá usar trsh desde el sistema remoto para entrar en
  el local. Cuando tú mismo quieras entrar, podrás hacerlo aún 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 sección.

  12.3.  sxpc , xhost  y xauth

  sxpc en combinación 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 cómo usar básicamente el xauth. Esta configuración es
  vulnerable al husmeo de la red, pero puede convivir con ella
  fácilmente.

  NOTA: cuando uses xauth asegúrate que la variable $DISPLAY no tiene el
  valor localhost (o localhost:loquesea). Si tu variable $DISPLAY vale
  localhost, los clientes no podrán encontrar la información de
  autorización. Lo mejor es usar el nombre real de la máquina. Si sigues
  las instrucciones de compilación del README, y compilas sin la
  variable -DNOGETHOSTNAME puede que todo funcione.

  Sea C la máquina que ejecuta clientes, y D la máquina que pone la
  pantalla.

  Primero, elige una ``clave'', de hasta 16 pares de dígitos
  hexadecimales (números del rango 0-9 y a-f). Necesitarás 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 deberías poner el parámetro -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 $*

  Asegúrate que el fichero .Xauthority es legible sólo por C y por D.

  13.  Cosas a recordar

  En esta sección intento obsequiarle con una lista de direcciones ftp
  de utilidad, URL's, etc. donde puede encontrar software e información
  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 versión)

  ·  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, asegúrese de
  que da a la gente del grupo tanta información como necesitan para
  resolver su problema (versión de term, de qué modo establece su
  conexión, etc.).

  En este momento hay en uso muchas versiones de term y todas ellas
  tienen sus problemas comunes y específicos. Además, cuando quiera una
  respuesta útil, al menos indique qué versión de term está usando. De
  lo contrario, en algunos casos sólo por adivinación 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 sección
     ``''--) 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 información
  de la velocidad de term para diferentes módems, versiones de term y
  condiciones de conexión. El propósito 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 días, junto con las respuestas a estas
  preguntas. Para reducir el tráfico 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 también 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 líneas en
     ventanas con 24 líneas. 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 solución parece ser poner lo siguiente en el remoto:

          stty 38400

  ·  Mucha gente parece tener problemas con caídas de la conexión term,
     cualesquiera que sean los motivos de la caída. Así que antes de
     poner en marcha aplicaciones, la gente quiere saber si su conexión
     term sigue viva o no. Esto se puede probar usando estos pequeños
     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í cómo:

     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
     fácil 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
     tendrás 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 podrían incluir:

  ·  Aumento de soluciones a problemas

  ·  Extensión del tema sobre seguridad

  ·  termwrap

  ·  Sugerencias

  De todos modos, si tiene sugerencias, críticas, o cualquier otra cosa
  que decir sobre este documento, por favor, ¡hágalo!. Como Bill
  Reynolds está muy ocupado en estos momentos, yo, Patrick Reijen, me he
  hecho cargo de la autoría 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. También 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 González,
  olea@poboxes.com 2:345/108.9@fidonet.org
  v2.0 13 Septiembre 96

  Todo sobre la instalación y configuración de terminales en sistemas
  Linux, desde diagramas y técnicas de soldadura de los cables, hasta
  los detalles de configuración del hardware y software.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Hardware

  2.1.    Puertos serie

  2.1.1.  Puerto serie DB9

  2.1.2.  Puerto serie DB25

  3.      Cableado

  3.1.    Cables NULL MÓDEM

  3.1.1.  NULL MÓDEM de 3 hilos

  3.1.2.  NULL MÓDEM de 3 hilos con protocolo por hardware emulado

  3.1.3.  NULL MÓDEM de 7 hilos con protocolo por hardware

  3.2.    Construcción física del cable

  3.2.1.  Listado de las patillas

  3.2.2.  Localización física de las patillas en un DB9

  3.2.3.  Localización física 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-MÓDEM

  3.3.2.  Solución con cajitas NULL-MÓDEM y cable de módem

  3.4.    Conectores DIGITAL VT320 y 420

  4.      Configuración del software

  4.1.    Linux

  4.2.    El terminal.

  4.3.    Afinando Linux para la conexión

  4.3.1.  Explicación de la línea del inittab

  4.3.2.  Parámetros de agetty

  4.4.    Afinando el terminal

  4.5.    Solución a posibles problemas

  4.5.1.  Comprobación del cable

  4.5.2.  El cable funciona pero Linux no.

  5.      Contacto

  5.1.    Agradecimientos

  6.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  Creo que conectar un terminal a un Linux es una de las experiencias
  más bonitas que se pueden hacer para ver cómo tu PC monousuario se
  convierte en una auténtica estación de trabajo multiusuario, además 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 tenéis, que
  disponga de un puerto serie libre. Cuidadín cuidadín con esas máquinas
  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.

  También hace falta un terminal, que debe disponer de un puerto serie.
  Lo mismo dicho antes para los COM3 y los COM4, es también 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 emulación de terminal
  para poder cumplir su misión. Ese software puede ser el mismo software
  que se usa para llamar por el módem, 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 más fácil,
  aunque no todo el mundo tiene un terminal en su casa, es más frecuente
  encontrar un viejo 8088.

  Para poder transmitir los datos hace falta un cable de los llamados
  null-módem o de líneas cruzadas, habiéndolos de muchos tipos. El que
  yo tengo montado es el mismo que el que recomienda el MSDOS para usar
  el INTERLNK/INTERSVR, que además 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 continuación os pongo un "gráfico" cutre para que sepáis que es lo
  que hay que ver detrás del PC para localizar el puerto serie:

                                    .---------------.
                                    \   o o o o o   /
                                     \   o o o o   /
                                      `-----------'

  Si localizáis alguno, que además tiene que ser macho (pinchos)
  seguramente se trata de un puerto serie.

  Si lo encontráis en su versión "hembra" (con orificios) se trata de el
  adaptador de VÍDEO (CGA, Hércules, EGA o VGA-digital).

  2.1.2.  Puerto serie DB25

  También podéis encontrar su versión 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.

  Debéis 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 más práctico es
  conectar un ratón y cargar el driver para COM1 o para COM2 y ver si
  funciona.

  Las situaciones más normales son:

  ·  Si sólo se encuentra uno de ellos, es el COM1;

  ·  Si se encuentran los dos, normalmente el pequeño es el COM1 y el
     otro es el COM2;

  ·  Si hay 2 pequeños hay que descifrar cuál es el COM1 y cuál el COM2.
     Esto sucede con equipos HP y COMPAQ, y suele venir indicado cuál es
     el 1 y cuál es el 2. Si no, a por un ratón serie y hacer pruebas.

  ·  ¡No los encuentro!: Mejor pasar un programa de información del PC
     para saber si hay puertos serie disponibles. Uno de fácil
     localización 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.--)

  ·  Cuidadín cuidadín con los tornillos que hay en los lados de los
     conectores; hay que comprobar que están bien atornillados ya que de
     lo contrario podría caer la tuerca interior dentro de la caja del
     PC y provocar un desastre.

  3.  Cableado

  3.1.  Cables NULL MÓDEM

  Bueno, voy a explicar qué son las líneas (patillas) del puerto serie:

     GND
        Es la masa. Como toda señal, tiene que estar referida a una
        masa.

     RX Señal de recepción. Son los datos que se reciben. (entrada)

     TX Señal de transmisión. Por aquí salen los datos. (salida)

     DTR
        Data Terminal Ready. Indica que el terminal está encendido.
        (salida)

     DSR
        Data Set Ready. Se ha establecido conexión. (entrada)

     CTS
        Clear To Send. El terminal está aceptando datos. (salida)

     RTS
        Request to Send. Aquí se introduce una señal 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 después de hojearme el manual del chip 8250
  (UART) y leer alguna cosa sobre transmisiones RS232.

  3.1.1.  NULL MÓDEM de 3 hilos

  El cable Null-módem más básico que existe es el siguiente:

       GND---------------------------------------------------GND
       RX----------------------------------------------------TX
       TX----------------------------------------------------RX

  Ese mismo ya funciona con el Linux. Sólo 3 cables. Para controlar el
  flujo de datos se usa el protocolo por software XON/XOFF

  3.1.2.  NULL MÓDEM de 3 hilos con protocolo por hardware emulado

  Otro cable null-módem 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 sólo es
  eso, una emulación. Para controlar el flujo de datos se sigue
  recurriendo al protocolo software XON/XOFF.

  3.1.3.  NULL MÓDEM 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 líneas DSR-DTR para saber si el terminal está
  conectado.  Sigue funcionando si se usa protocolo por software.

  Yo creo que es el más flexible; además, 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.  Construcción física del cable

  3.2.1.  Listado de las patillas

  Las patillas físicas 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.  Localización física de las patillas en un DB9

  Los conectores suelen llevar una chuleta numerando los pines en el
  plástico que rodea a los susodichos, ese plástico que a veces es azul,
  o a veces en negro o a veces es blanco.  Vista desde el LADO DE FUERA
  DEL PC, que también 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.  Localización física de las patillas de un DB25

  Vista desde el exterior del PC, que también 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 deberíais procuraros un poco de estaño
  (metal para hacer la soldadura) y un pequeño soldador de más de 15W.

  Recomendaciones para soldar:

  Calentar con la punta del soldador los extremos de los cables a soldar
  y mientras estén calientes, depositar en la punta un poco de estaño.
  Parece que hacen falta 3 manos para hacer esa operación, una para
  aguantar el cable, otra para el soldador y la tercera para aguantar el
  estaño. Hacedlo de la siguiente manera:

  1. Primero pelar las puntas de los cables de colores para dejar el
     cobre al descubierto.

  2. Después, con una mano aguantar el cable, y con la otra el soldador,
     tras haber estañado previamente la punta del mismo. Para eliminar
     el exceso de estaño 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 estaño y fundir un poco.

  4. Esperar a que el estaño fluya por la superficie del cable y
     entonces apartar el soldador.

  Esa operación se debe repetir para todos los cables de colores. No
  tengáis miedo de quemar los cables con la temperatura del soldador.
  Los cables deberían estar preparados.

  Con esa operación estáis estañando el cable.

  Hay que estañar también los pines de los conectores DB25 y/o DB9, que
  es más fácil: 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
  estaño, que con la temperatura va a fundirse dejando la superficie del
  pin a soldar forrada de estaño.

  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 estañados) y
  se toca con el soldador alguna de las dos partes (mejor las dos). El
  estaño se va a fundir y va a poner en contacto cable y pin. Entonces
  se retira el soldador y se espera que el estaño se enfríe. No soplar
  para acelerar el enfriamiento, ya que podría dar lugar a soldaduras
  frías. Ya está hecha la soldadura.

  Para los que quieran pasarse de listos y no quieran "perder el tiempo"
  estañando las cosas, se van a dar cuenta que para soldar un cable a un
  conector les harán falta 4 manos:

  ·  Una para aguantar el soldador;

  ·  Otra para aguantar el estaño;

  ·  Otra para aguantar el cable;

  ·  Y la última para aguantar el conector.

  Así que no os lo recomiendo a no ser que dispongáis de 4 manos.

  Ánimo que es MUY fácil; saber soldar os va a solucionar muchos
  problemas, y además vais a poder solucionar muchas averías por culpa
  de soldaduras rotas o defectuosas.

  3.2.5.  Ejemplos de cables: DB25-DB25

  Conexión 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 más) 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 metálica) del conector.

  La conexión de la malla establece el mismo nivel de potencial
  (voltaje) entre los 2 PCs y evita que grandes cargas de electricidad
  estática fluyan a través de las líneas y fundan el chip del puerto
  serie. Además, se produce un efecto de apantallamiento, que evita que
  señales electromagnéticas interfieran en la información que circula
  por la línea.

  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, asegúrate que la malla esta
  conectada o seguro que vas a fundir el puerto serie de tu PC o
  terminal.

  Igual que en otro documento, también voy a decir que algunas veces he
  oído que el chip del puerto serie explota, literalmente vuela por los
  aires, al conectar un cable sin malla.

  Por eso os recomiendo que CONECTÉIS SIEMPRE LA MALLA.

  3.2.6.  Ejemplos de Cables: DB9-DB9

  Conexión 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 más) 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 metálica) del conector.

  La conexión de la malla establece el mismo nivel de potencial
  (voltaje) entre los 2 PCs y evita que grandes cargas de electricidad
  estática fluyan a través de las líneas y fundan el chip del puerto
  serie. Además, se produce un efecto de apantallamiento, que evita que
  señales electromagnéticas interfieran en la información que circula
  por la línea.

  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, asegúrate que la malla esta
  conectada o seguro que vas a fundir el puerto serie de tu PC o
  terminal.

  Igual que en otro documento, también voy a decir que algunas veces he
  oído que el chip del puerto serie explota, literalmente vuela por los
  aires, al conectar un cable sin malla.

  Por eso os recomiendo que CONECTÉIS SIEMPRE LA MALLA.

  3.2.7.  Ejemplos de cables: DB25-DB9 o DB9-DB25

  Conexión 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 más) 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 metálica) del conector.

  La conexión de la malla establece el mismo nivel de potencial
  (voltaje) entre los 2 PCs y evita que grandes cargas de electricidad
  estática fluyan a través de las líneas y fundan el chip del puerto
  serie. Además, se produce un efecto de apantallamiento, que evita que
  señales electromagnéticas interfieran en la información que circula
  por la línea.

  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, asegúrate que la malla esta
  conectada o seguro que vas a fundir el puerto serie de tu PC o
  terminal.

  Igual que en otro, documento también voy a decir que algunas veces he
  oído que el chip del puerto serie explota, literalmente vuela por los
  aires, al conectar un cable sin malla.

  Por eso os recomiendo que CONECTÉIS SIEMPRE LA MALLA.

  3.3.  Compra del cable ya hecho

  3.3.1.  Cables NULL-MÓDEM

  Hay que pedir un cable tipo NULL-MÓDEM en alguna tienda de electrónica
  o de ordenadores. Alguna gente también los conoce como cables cruzados
  o cables de LAPLINK.

  Es bastante difícil encontrar un cable ya montado con la conexión de
  los pines que nos conviene, aunque como este montaje es bastante
  frecuente, es posible encontrarlo; no obstante, no os quejéis después
  si no funciona, porque bajo la denominación "null-módem" hay un montón
  de cables diferentes, como los que se comentaban en la sección ``''.

  Si has ido a parar a esta sección porque no sabes soldar, te
  recomiendo que lo pruebes, es bastante fácil. Léete las
  recomendaciones, y si las cumples el éxito esta asegurado.

  Además, los cables ya hechos valen bastante dinero.

  Para el Linux os va a funcionar casi cualquier tipo de null-módem,
  pero el INTERLNK/INTERSVR requiere la configuración exacta.

  3.3.2.  Solución con cajitas NULL-MÓDEM y cable de módem

  Si no encontráis cables null-módem, podéis hacer lo siguiente:

  Comprar un cable de módem (pin a pin) y luego insertar entre el PC y
  uno de los cabos del cable de módem una caja de empalmes con
  configuración NULL-MÓDEM.

  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 opción en bastante cara, ya que un cable de módem ya vale al menos
  600 ptas, y si le añadimos el coste de la caja mull-módem (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 lengüeta descentrada (-- Nota del maquetador
  Los RJ45 son esos conectores transparentes de 8 hilos algo más gordos
  que los RJ11 del teléfono, también 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.  Configuración del software

  4.1.  Linux

  Entra como superusuario y modifica el /etc/inittab de la siguiente
  manera:

  ·  Tienes que buscar la sección #Serial lines y añadir una línea 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 línea 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 emulación de terminales.

  Debes elegir el tipo de terminal ANSI o, VT100, VT102, VT220, VT52.

  Cualquiera de ellos debería funcionar como mínimo para comprobar que
  la línea funciona.

  Los parámetros del puerto serie deben ser 9600,N,8,1.

  Apretando un par de ENTERs debería salir en la pantalla del terminal
  el texto de LOGIN.

  Si eso no funciona, algo está pasando en las líneas serie.

  4.3.  Afinando Linux para la conexión

  Espero que hayáis llegado hasta aquí sin mucha dificultad.

  4.3.1.  Explicación de la línea del inittab

  Aquí voy a explicar esa línea que hay que añadir 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.  Parámetros de agetty

  Fijáos que en la línea que estamos estudiando, le paso el parámetro -L
  a agetty. Si hacéis man agetty podréis comprobar porqué hago eso:
  estoy forzando a que la línea sea local, es decir, que no se haga la
  la comprobación del pin de CD (Carrier Detect). Ese pin debería estar
  conectado en el cable, pero no lo hago para mantener la compatibilidad
  con el INTERLNK/INTERSVR de Microsoft MSDOS. Una vez más el Linux se
  adapta a las necesidades del usuario. (¿¡Me suena esa frase a WIN95!?)

  También podéis activar el protocolo de hardware RTS/CTS, que acelerará
  un poco la comunicación. Para hacer eso necesitáis que el cable os
  soporte esa función; además deberéis 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
  parámetro '-h' a agetty, por ejemplo:

       s2:45:respawn:/sbin/agetty -hL 9600 ttyS1

  4.4.  Afinando el terminal

  Aquí más que un afinamiento os voy a explicar cómo instalar el Telix
  3.22 para DOS para que haga de terminal.

  ·  Primero tenéis que conseguir los archivos vía FTP o vía algún cdrom
     de Shareware (-- N. del R.
     BBS--) . Yo voy a explicar la versión 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 sólo 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 módem).
     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 módem, pulsas ALT-O (opciones).

  ·  Te vas a Modem and dialing y en el módem 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 opción A:
     por ejemplo COM2, 19200, None, 8, 1.

  ·  El el mismo menú de Terminal Options, la opción C debería estar en
     ANSI o en VT102.

  ·  En el mismo menú de Terminal Options, la opción I debería estar en:
     Backspace key sends DEL.

  ·  En el mismo menú de Terminal Options, vas a encontrar la opción 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 debería salir el login en la pantalla.

  4.5.  Solución 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.  Comprobación 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 tendrás que ver el texto en la pantalla del
  otro.

  Prueba desde ambos PCs. Puede ser que la comunicación sólo sea mono-
  direccional por algún defecto del cable o del hardware.

  Si el cable está bien construido y el hardware no falla eso debería 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 línea
  del /etc/inittab.

  ¿Habilitaste algún protocolo por hardware?

  Algunos puertos serie no llevan todas las líneas, 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
  parámetro '-h' del agetty en /etc/inittab, y habilitando el protocolo
  XON/XOFF por software en el programa de comunicaciones.

  ¿Estás seguro que pusiste ttyS0 para COM1, ttyS1 para COM2, ttyS2 para
  COM3 y ttyS3 para COM4? Es muy fácil colarse, el ttySx es siempre uno
  menos que el COMx.

  Puede que tengas algún problema de IRQs. ¿Estás compartiendo IRQ con
  algún otro dispositivo?

  Haz pruebas con el minicom (clónico 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 también 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 instalación de UUCP bajo Linux. Necesita
  leer este documento si tiene previsto acceder a sistemas remotos via
  UUCP mediante módem, mediante conexión directa o a través de internet.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Nuevas versiones de este documento

  1.2.    Comentarios

  1.3.    Información del Copyright

  1.4.    Renuncia de responsabilidad.

  1.5.    Otras fuentes de información

  1.5.1.  Documentos HOWTO de Linux

  1.5.2.  USENET

  1.5.3.  Listas de Correo

  1.5.4.  Libros

  1.6.    Dónde NO  buscar ayuda.

  2.      Requerimientos de Hardware

  3.      Dónde conseguir UUCP

  4.      Instalación del Software

  4.1.    Extracción de los fuentes comprimidos

  4.2.    Edición del Makefile.in  para especificar los directorios de
  instalación.

  4.3.    Ejecución de `` configure ''

  4.4.    Elaboración de la futura configuración del software

  4.4.1.  Examinar el conf.h  y el Makefile  para asegurarse de que
  están 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 configuración

  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  anónimo parece no funcionar?

  5.4.    ¿Qué quiere decir `` no matching ports found ''?

  5.5.    ¿Qué ficheros de configuración son buenos para el formato HDB
  ?

  5.6.    Utilizar uucico  para llamar a números alternativos

  6.      Agradecimientos

  7.      La traducción

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  El propósito de este documento es contestar algunas de las cuestiones
  y comentarios que más aparecen en las Frequently Asked Questions (--
  P.U.F.s, Preguntas de Uso Frecuente--) sobre el software UUCP bajo
  Linux en general y la versión 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 serán publicadas periódicamente en
  comp.os.linux.announce, comp.answers, y news.answers.  También se
  añaden a varios sistemas de ftp anónimos que acogen este tipo de
  información, incluyendo ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO.

  Además, generalmente se puede encontrar este documento en la página
  principal del WorldWideWeb de Linux en
  http://sunsite.unc.edu/mdw/linux.html.

  1.2.  Comentarios

  Estoy interesado en cualquier comentario por correo electrónico,
  positivo o negativo, respecto a este documento. Por descontado
  escríbame si encuentra errores u omisiones obvias.

  Leo, pero no necesariamente contesto, todo el correo que recibo. Las
  peticiones para mejorar serán consideradas en función de la
  combinación de tiempo disponible, el mérito de la petición, y la
  presión sanguínea que tenga ese día :-)

  No se preocupe, los insultos irán tranquilamente a /dev/null.

  En particular, el estándar del sistema de directorios de Linux está en
  continua evolución. Todos los ejemplos de este documento están basados
  en el estándar 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 distribución 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.  Información del Copyright

  El UUCP-HOWTO es copyright ©1994 de Vince Skahan.

  Copias exactas pueden ser reproducidas o distribuidas por cualquier
  medio físico o electrónico sin el permiso del autor. Las traducciones
  son igualmente permitidas sin el permiso expreso del autor si incluyen
  información sobre quién hizo la traducción.

  Citas cortas pueden ser utilizadas sin el consentimiento previo del
  autor.  Los trabajos y distribuciones derivados del UUCP-HOWTO deben
  ser acompañados con una copia exacta de este documento o con una
  indicación de dónde encontrarlo.

  Las redistribuciones comerciales son permitidas y alentadas; no
  obstante, el autor agradecerá ser notificado de cada una de las
  distribuciones (como cortesía).

  Resumiendo, queremos promover la divulgación de esta información a
  través de todos los medios que sea posible. Aunque deseamos conservar
  el copyright de los documentos HOWTO.

  Queremos que TODA la información que incorporan los HOWTO tenga la
  máxima divulgación posible. Si tiene preguntas, por favor diríjase 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 utilización de conceptos, ejemplos y/o
  otro contenido de este documento es completamente bajo su propio
  riesgo.

  1.5.  Otras fuentes de información

  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 sección ``''--)

  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, envíe un mail a

  taylor-uucp-request@gnu.ai.mit.edu

  1.5.4.  Libros

  Las versiones HDB y V2 de UUCP están tratadas en la documentación de
  cada vendedor así como en la mayoría de libros sobre comunicaciones en
  *nix.

  Los ficheros de configuración de Taylor actualmente sólo están
  documentados en los ficheros de configuración proporcionados con los
  fuentes (y supuestamente en la distribución de SLS). Para leerlos de
  forma más ``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 ayudarán.

  ·  ``Managing UUCP and USENET''  de O'Reilly and Associates es en mi
     opinión el mejor libro que hay para comprender los programas y
     protocolos involucrados en las entrañas de un servidor USENET.

  ·  ``Unix Communications''  de The Waite Group contiene una buena
     descripción de todas las partes (y más), y de cómo trabajan juntas.

  ·  ``Practical Unix Security''  de O'Reilly and Associates tiene una
     buena discusión de cómo 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 información sobre news, correo, y
     otros recursos disponibles en Internet.

  ·  ``The Linux Networking Administrators'Guide (-- Ver sección
     mencionada anteriormente.--) ´Project está disponible en la red y
     también publicado por (al menos) O'Reilly y SSC. Hay gran cantidad
     de información para aprender sobre todo lo que pueda imaginar que
     necesita conocer sobre las redes Unix.

  1.6.  Dónde NO  buscar ayuda.

  No hay nada ``especial'' sobre la configuración y ejecución 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 específica de Linux (p.ej.
  ``por favor decidme qué fichero de configuración 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.
  Déjeme repetir esto.

  Virtualmente, no existe ninguna razón para enviar nada referente a
  uucp a la jerarquía de comp.os.linux. Existen grupos de noticias en la
  jerarquía de comp.mail.* para dejar TODAS sus preguntas.

  SI ENVÍA A COMP.OS.LINUX.* CONSULTAS NO ESPECÍFICAS 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 JERARQUÍA DE LINUX CONSULTAS NO ESPECÍFICAS DE LINUX
  MALGASTA SU TIEMPO Y EL DE TODOS LOS DEMÁS Y NORMALMENTE RETRASA LA
  OBTENCIÓN DE SU RESPUESTA.

  2.  Requerimientos de Hardware

  No hay requerimientos especiales de hardware para UUCP bajo Linux.
  Básicamente cualquier módem compatible Hayes trabaja bien con UUCP.

  En la mayoría de casos, querrá el módem más rápido que pueda
  conseguir. En general, deberá tener una UART 16550 en su puerto serie
  o en su módem 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 módems y
  comunicaciones serie así como los documentos que periódicamente se
  publican en USENET.

  3.  Dónde conseguir UUCP

  Los fuentes del UUCP de Taylor (versión actual 1.05) están disponibles
  en ftp://prep.ai.mit.edu y los binarios en distintas distribuciones de
  Linux.

  La distribución newspak-2.4.tar.z contiene ficheros de configuración y
  ficheros readme referentes a la compilación del software de uucp, news
  y mail bajo linux de varias fuentes de libre distribución.

  Normalmente se puede encontrar (-- Para los residentes en España, se
  cuenta con un mirror rapidísimo en:
  en ftp://sunsite.unc.edu/pub/Linux/system/Mail/news Si no lo puede
  encontrar en sunsite, por favor escríbame y me aseguraré de que le
  llegue una copia.

  4.  Instalación del Software

  (La mayor parte de esta sección 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 explicación detallada de cómo compilar está en uucp.texi en los
  fuentes.

  Puede obtener los ``bien conocidos'' ficheros conf.h y policy.h para
  Linux del la distribución newspak mencionada anteriormente en la
  sección ``otras fuentes de información''. En ese caso, probablemente
  irá directo a teclear ``make''.

  4.1.  Extracción 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.  Edición del Makefile.in  para especificar los directorios de
  instalación.

  Aquí, pongo ``prefix'' a ``/usr'' en lugar del que viene por defecto
  ``/usr/local''

  4.3.  Ejecución de `` configure ''

  Teclear ``sh configure''.

  El script de configuración compilará unos cuantos programas de test
  para ver qué hay disponible en el sistema y calcular algunas cosas.

  El script de configuración creará el conf.h a partir del conf.h.in y
  el Makefile del Makefile.in. También 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.  Elaboración de la futura configuración del software

  4.4.1.  están 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 configuración 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 método de registro que quiere (HAVE_HDB_LOGGING)

  ·  poner el camino por defecto para buscar los comandos (Yo he añadido
     /usr/local/bin para el mio)

  4.5.  Compilar e instalar el software

  ·  teclear ``make''.

  ·  Utilizar ``uuchk | more'' para comprobar los ficheros de
     configuración. Se puede usar ``uuconv'' para convertir entre
     distintos formatos de ficheros de configuración.

  ·  Escribir ``make install'' para instalar.

  4.6.  Preparar los ficheros de configuración

  Recomendaría empezar por coger los buenos ficheros de configuración
  para HDB que se adjuntan e instalarlos.

  ·  Asegúrese que el fichero Permissions indica exactamente dónde se
     pueden encontrar rmail y rnews si los ha instalado en cualquier
     otro sitio que el indicado en policy.h

  ·  Asegúrese que el fichero Devices coincide con la ubicación actual
     de su módem (cua1=COM2 en los ejemplos)

  ·  Editar el fichero Systems para preparar los sistemas con los que
     conectará con sus velocidades, número de teléfono, nombre de
     usuario y password.

     PROTEGER CONTRA LECTURA DE TODO EL MUNDO ESTE FICHERO

  ·  Preparar el fichero Permissions y añadir un conjunto de líneas 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 máximo de información de depuración escrita en el
  fichero
  preparación inicial.

  Normalmente ejecuto con -x 4 ya que este nivel deja bastante
  información que me ayuda con los problemas de login. Obviamente, esto
  contiene información clara sobre su fichero System (cuenta/password)
  así que protéjalo contra lectura de todo el mundo.

  ·  de Pierre.Beyssac@emeraude.syseca.fr

     Taylor tiene más niveles de registro. Utilice todos los -x para
     conseguir el mayor nivel posible.

     Además, haga ``tail -f /usr/spool/uucp/.Admin/audit.local''
     mientras depura para ver que ocurre en ejecución.

  4.8.  No funciona - ¿Por qué?

  En general, puede referirse a la documentación mencionada
  anteriormente si las cosas no funcionan. También puede dirigirse a los
  vecinos mas experimentados en UUCP para que le ayuden. Normalmente,
  suele ser un error tipográfico.

  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 estándar''. Es por esto que hacen código
  fuente desde el que puede construir usted mismo :-))

  Porque es IMHO la implementación estándar de facto en este momento.
  Hay miles de sistemas con administradores experimentados y hay muchos
  lugares donde puede encontrar información increíblemente buena
  concerniente a la preparación de HDB.

  El uucp-1.04 que está en SLS 1.02 y posteriores acepta los tres
  formatos de ficheros de configuración. Mientras no pueda probarlos, yo
  hice RTFM e Ian Taylor me dijo que deberían funcionar.

  El orden de búsqueda de los ficheros de configuración es Taylor,
  después V2 (L.sys) y finalmente HDB. Utilice la utilidad uuconv en
  /usr/lib/uucp para convertir los ficheros de configuración 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 extraños, pero funcionan, si quiere ejecutar
  configuraciones Taylor de ficheros binarios que no la aceptan.

  ·  De mbravo@tctube.spb.su (Michael E. Bravo)

     - añadir ``-I /usr/local/lib/uucp/config'' a todas las invocaciones
     de cualquier programa perteneciente al paquete uucp
  Además, la Slackware actual tiene un bonito setup donde han separado
  los ficheros de configuración para varias configuraciones en
  directorios distintos.  Por ejemplo, los ficheros de configuración de
  HDB irían 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 límite 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 línea 323 en uuconf/syssub.c y cambiar los timeouts por
     defecto de 10 segundos a algo más largo.

  ·  de Ed Rodda - ed@orca.wimsey.bc.ca

     Si tiene los timeouts del script de chat, típicamente conectando
     con otros sistemas Taylor, una pausa después 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 módem cuelgue después 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  anónimo parece no funcionar?

  El uucp anónimo de SLS sólo funciona en el formato Taylor porque está
  compilado con HAVE_TAYLOR_CONFIG. Si quiere hacer uucp anónimo en
  formato HDB, deberá recompilar los fuentes definiendo HDB. Ian Taylor
  está considerando qué método adoptar para tratar esta ``prestación''.

  Además, Taylor en formato HDB parece distinguir espacios y líneas en
  blanco. Para estar seguro, asegúrese de que no hay líneas en blanco o
  espacios de más 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 más 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
  válidos en el fichero Devices.

  Lo siguiente son versiones saneadas de mis ficheros de configuración
  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 tenía un puerto ACU, pero ninguno que coincidiera con el dialer
  especificado en la misma línea en Systems, obtendrá este mensaje.

  5.5.  ¿Qué ficheros de configuración son buenos para el formato HDB ?

  Lo que siguen son ficheros de configuración ``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 librería de uucp en otro
  lugar.

  Si *TIENE* puestas cosas en directorios no estándar, dé por seguro que
  cosas como el sendmail se confundirán. Necesita asegurar que todos los
  programas de comunicación estén de acuerdo con su idea de caminos
  ``estándar''.

  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 números alternativos

  La nueva versión v1.05 ha añadido el switch '-z' a uucico para
  intentar números alternativos como sistema remoto.

  6.  Agradecimientos

  La gente que sale a continuación me ha ayudado a juntar la información
  (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 traducción

  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 España.

  8.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  EL CÓMO 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 más fácil coexistencia con los datos de una partición FAT,
  compartiéndola.  En este documento primero se explica cómo usar umsdos
  con diversas configuraciones, y después se explica cómo funciona y se
  da alguna información. Se deja para el lector la decisión de si es una
  buena elección para él.
  ______________________________________________________________________

  Índice General:

  1.      ¿Dónde está el UMSDOS?

  1.1.    Historia

  1.2.    Disponibilidad

  1.3.    Distribuciones que lo soportan

  1.4.    Lugar original donde encontrarlo

  1.5.    Documentación Técnica

  1.6.    Quién lo escribió

  2.      umsdos  como partición raíz

  2.1.    El concepto de la pseudorraíz.

  2.2.    Lo que hay que saber de la pseudorraíz

  3.      Distintos aspectos del funcionamiento de umsdos

  3.1.    Opciones de mount

  3.2.    Cómo establecer los valores por omisión para la raíz

  3.3.    Swap o no swap

  4.      Cómo arrancar un sistema umsdos

  4.1.    Loadlin

  4.2.    Con un disquete

  4.3.    LILO

  4.4.    Cómo defragmentar una partición umsdos

  4.5.    Trucos avanzados

  5.      Principios básicos

  5.1.    Introducción

  5.2.    umsdos  puede reemplazar al sistema de ficheros Ms-DOS .

  5.3.    Promoción de directorios

  5.4.    Cómo promover: /sbin/umssync

  5.5.    Uso de /sbin/umssync  durante el arranque

  5.6.    Cómo DESpromover

  5.7.    ¿Qué pasa con los ficheros creados durante una sesión DOS ?

  6.      Instalación/Desinstalación y algunos truquillos

  6.1.    La pseudorraíz /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.    Cómo DESinstalar un sistema umsdos

  6.6.    Mover un sistema umsdos  a otro disco DOS

  6.7.    Cómo instalar 50 sistemas con umsdos

  7.      Disponer una sección Linux  en una partición DOS

  8.      POR-QUÉ-UMSDOS

  8.1.    El objetivo de umsdos

  8.2.    Quién lo necesita

  8.3.    Acerca de la eficiencia

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  ¿Dónde está el UMSDOS?

  1.1.  Historia

  El proyecto umsdos comenzó en 1992 y se puso a disposición de la red
  en enero del 1994 en forma de parche. Se incluyó en la distribución
  estándar del núcleo (kernel) de linux en Julio, comenzando con el
  núcleo 1.1.36.

  umsdos fue pronto adoptado por la distribución Slackware, incluso
  antes de que fuera oficialmente incluido en el núcleo.

  umsdos empezó a ser mejorado a partir del núcleo 1.1.60.  Su
  rendimiento ha mejorado radicalmente, especialmente en lo que se
  refiere a escritura. A partir del 1.1.70 (más o menos), vuelve a ser
  estable.

  Un error de consideración fue corregido en Linux 1.2.2. El error en
  cuestión estaba dando la lata a los usuarios desde el principio (se
  cambiaba el nombre a algunos ficheros dando la impresión de que habían
  desaparecido). Nótese que la Slackware 2.2 aún incluye la versión
  1.2.1 del núcleo, luego contiene ese error.

  1.2.  Disponibilidad

  Está disponible como parche para los núcleos 1.0.x. Va incluido en los
  núcleos 1.2. Se puede compilar dentro del núcleo o cargarlo como
  módulo. Sin embargo, hay que tener en cuenta que hoy por hoy, si se
  quiere usar umsdos en forma de módulo cargable se debe también usar el
  sistema de ficheros Ms-DOS como módulo cargable. Esto es debido a una
  limitación en el sistema de módulos (algunos símbolos se exportan sólo
  cuando los controladores se instalan como módulos).

  1.3.  Distribuciones que lo soportan

  Por el momento creo que sólo 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.  Documentación Técnica

  Hay un montón de documentación sobre el funcionamiento interno de
  umsdos. Se encuentra disponible tanto en formato HTML como en formato
  texto en la misma ubicación que las utilidades.

  Por lo que yo sé, la versión HTML no está disponible en ningún
  servidor de Web. Se debe transferir, destarrar, y leer localmente.

  1.6.  Quién lo escribió

  Jacques Gelinas jacques@solucorp.qc.ca

  2.  umsdos  como partición raíz

  2.1.  El concepto de la pseudorraíz.

  Mediante el uso de umsdos, Linux se puede instalar en una partición de
  DOS normal y corriente. Linux se instala entonces como segundo (o
  tercer) sistema operativo en la partición. 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
  pseudorraíz.

  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 pseudorraíz.

  Básicamente, el modo pseudorraíz cambia el directorio raíz de la
  partición 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 añade uno nuevo llamado DOS, que es un directorio
  virtual.

  2.2.  Lo que hay que saber de la pseudorraíz

  ·  Sólo se puede activar este modo al arrancar el sistema.  No hay
     manera de activarlo mediante una operación de montado (con el
     comando mount).

  ·  Este mecanismo no es más que una visión diferente de un sistema de
     ficheros umsdos normal. Esto significa que una partición que se usa
     habitualmente como partición raíz se puede montar normalmente sin
     que se produzca ningún efecto de pseudorraíz.

     Por ejemplo, si se arranca linux con un disquete de mantenimiento y
     se monta la que es habitualmente la partición raíz en /mnt, todos
     los directorios de linux se encontrarán 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 opción conv= es cuestionable en un sistema umsdos.  Yo sugiero
  evitarla. Las opciones que más 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 aplicarán globalmente a todos los directorios no
  promovidos. uid establece el propietario por omisión, gid establece el
  grupo por omisión, y umask establece los permisos por omisión.

  3.2.  Cómo establecer los valores por omisión para la raíz

  umssetup sirve para establecer en tiempo de ejecución el propietario
  de la partición raíz. Para otras particiones umsdos, se pueden usar
  las opciones de mount o umssetup.  La manera recomendada para
  particiones no raíz es poner la opción apropiada en /etc/fstab. Aquí
  va un ejemplo. Se debería 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 más lento
  que una partición de intercambio. Sin embargo, es mucho más flexible.
  Un fichero de intercambio en una partición 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 raíz:

       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.  Cómo 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 núcleo que
  simplemente se ha copiado a algún 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 núcleo convenientemente inicializado para localizar la
  partición raíz 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 también se puede usar
  para arrancar un sistema umsdos. Sin embargo, no tengo ninguna
  experiencia con él. Desde la versión 1.1.60 debería funcionar. Por
  favor mandadme correo si sabéis algo.

  4.4.  Cómo defragmentar una partición 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 también contiene umssync y umssetup) permite hacer operaciones
  básicas con los directorios (listado, borrado) independientemente del
  fichero --linux-.--- y del directorio del DOS.

  5.  Principios básicos

  5.1.  Introducción

  umsdos hace corresponder los ficheros de Linux directamente con
  ficheros de Ms-DOS. La traducción es uno a uno (biyectiva).  No se
  toca el contenido de los ficheros. umsdos sólo actúa sobre los
  nombres. Con los ficheros especiales (enlaces y dispositivos, por
  ejemplo) utiliza una gestión 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 propósito general del
  sistema de ficheros Ms-DOS de linux.  Esta flexibilidad es, de hecho,
  la causa de gran parte de la confusión sobre umsdos. Aquí está el
  porqué. Si se intenta montar un disquete DOS recién 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 más (la verdad es que nada más) que el sistema de
  ficheros Ms-DOS normal de Linux.

  ???

  5.3.  Promoción 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 sería por el sistema de ficheros DOS.  umsdos
  utiliza un fichero especial en cada subdirectorio para hacer la
  traducción 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 partición DOS inútilmente con esos ficheros
  (--linux-.---), el fichero es ahora opcional. Si no existe, umsdos se
  comporta como Ms-DOS.

  Cuando se promueve un directorio, cualquier operación posterior será
  hecha con la semántica 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 característica permite organizar la partición 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
  partición de 500M), así que evitar que haya ficheros --linux-.--- en
  todas partes puede resultar beneficioso.

  5.4.  Cómo 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 relación 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 añade las entradas que
  le falten (Ficheros creados durante una sesión 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 línea siguiente es adecuada
  para la mayor parte de los sistemas:

       /sbin/umssync -r99 -c -i+ /

  La opción -c evita que umssync promueva directorios.  Solamente
  actualizará los ficheros --linux-.--- donde ya existan.

  Esa línea 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 según se necesite.

  5.6.  Cómo DESpromover

  Simplemente hay que eliminar el fichero --linux-.--- usando el DOS.
  Aunque quien lo haga acabará arrepintiéndose.

  5.7.  ¿Qué pasa con los ficheros creados durante una sesión DOS ?

  A menos que se use umssync en un directorio donde el DOS haya añadido
  o borrado ficheros, se advertirán algunas dificultades:

  ·  No hace que se caiga el sistema ni causa grandes problemas, sólo
     incomodidad :-)

  ·  Los ficheros creados por el DOS:

  ·  Serán 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, más que un verdadero problema, crea confusión.  No daña 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.  Instalación/Desinstalación y algunos truquillos

  La instalación de un sistema basado en umsdos no difiere gran cosa de
  la instalación de un sistema Linux ordinario (basado en Ext2).

  Hay dos diferencias fundamentales.

  6.1.  La pseudorraíz /mnt/linux

  Los pasos normales de una instalación son

  1. Hacer una partición con fdisk y formatearla.

  2. Montarla en el directorio /mnt de nuestro disco raíz de
     instalación.

  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. Funcionaría, pero crearía una ristra de
  subdirectorios en el directorio raíz del DOS (C:) y no sería
  agradable. Esa es la razón por la que todas las instalaciones con
  umsdos usan la pseudorraíz. Y es la gran diferencia entre una
  instalación 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 instalación que lo hacen mal.
  ¿Cómo es posible?

  El problema de instalación más 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 confusión 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 instalación.

  Todavía 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
  instalación. Gracias al mecanismo de pseudoconsolas de Linux se puede
  hacer sin salir del programa de instalación.  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 selección de paquetes es un buen momento para hacerlo.

  4. >TOTO

  5. ls -l

     Debería aparecer un fichero vacío llamado TOTO en letras
     mayúsculas. Si aparece en minúsculas algo ha ido mal.  Intentaremos
     ejecutar umssync de nuevo.  umssync puede usarse una y otra vez sin
     ningún problema.

     umssync .  la comprobación del TOTO. Si aparece TOTO correctamente
     todo está bien. La instalación tiene algo extraño, pero lo hemos
     solucionado.

  6. Pulsar Alt-F1 para volver a la pantalla de instalación.

  Si la comprobación falla, la mejor solución es hacerse con un disco de
  instalación más moderno. Normalmente se puede arreglar el disco raíz
  de instalación poniéndole una versión más moderna de umssync. No es
  difícil, pero se requiere un sistema Linux en funcionamiento.
  Simplemente hay que montar el disco raíz y reemplazar el umssync
  problemático 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 extraño que parezca el mensaje,
  no se trata de un bug (error) en umsdos. Estas son las causas
  conocidas:

  ·  La más común

     La instalación de Slackware trata de configurar un fichero de
     intercambio (swap) en los primeros momentos de la instalación.
     Para hacerlo, pide que se seleccione una partición (un disco del
     DOS), entonces lo monta y configura el fichero de intercambio.

     Cuando se instala un sistema Slackware, se debe configurar la
     partición receptora antes de instalar nada.  Esto normalmente
     significa que se monta la partición 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
     mayoría de los usuarios olvidan el paso de "configuración de la
     partición receptora" ("setup target partition") y pasan sin más al
     resto de la instalación.  Como /mnt está ya montado, este error
     pasa desapercibido.  Eso significa que /mnt/linux no ha sido creado
     adecuadamente (No ha sido promovido). Ningún fichero especial, ni
     enlace, ni fichero con nombre largo se podrá crear correctamente.

  ·  Programa umssync no válido

     No se ha creado /mnt/linux correctamente. Esto está generalmente
     causado por un programa umssync inadecuado en el disco de
     instalación raíz.

  ·  Un antiguo error en umsdos

     Había un error en umsdos previo a Linux 1.2.2.  El modo pseudo-root
     no se activaba adecuadamente si no existía el fichero /etc/init.
     Ahora init se ubica en /sbin. Se puede solucionar esto haciéndose
     con un nuevo núcleo. Eso es lo recomendado puesto que había otro
     error que se solucionó en la versión 1.2.2.

     Si no es posible la actualización, habrá que hacer lo siguiente

     1. Arrancar con el disquete de instalación.

     2. Entrar como superusuario.

     3. mount -t umsdos /dev/hdXX /mnt

        Donde /dev/hdXX es la partición 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 instalación producen una
  instalación completamente inservible. Se debe desinstalar (Véase la
  sección siguiente) y volver a instalar.

  6.5.  Cómo DESinstalar un sistema umsdos

  Una cosa que sorprende agradablemente de umsdos y su mecanismo de
  pseudorraíz 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 ningún controlador especial en el
  config.sys, ni crea nada extraño fuera del directorio linux.

  6.6.  Mover un sistema umsdos  a otro disco DOS

  Se puede hacer desde Linux o desde DOS.  Sólamente hay que copiar
  recursivamente el directorio linux de un disco al otro. Después 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.  Cómo instalar 50 sistemas con umsdos

  ¿Y si instalamos un montón de sistemas Linux en un santiamén?

  Los sistemas umsdos viven en un mundo DOS. Se puede sacar provecho de
  esto si se quiere instalar Linux fácilmente.

  Se puede instalar y configurar un sistema con umsdos en un ordenador,
  y, cuando se está satisfecho con la configuración 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. Sólamente habrá que ajustar el fichero .bat de
  arranque (Loadlinx) y ya.

  Con unos ajustes mínimos (nombre de la máquina, dirección IP),
  cualquiera puede instalar un sistema Linux en un minuto.

  Los lectores interesados apuntarán que instalar un sistema Linux
  copiando un sistema en funcionamiento también 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 mágico programa de instalación.

  7.  Disponer una sección Linux  en una partición DOS

  Incluso para los usuarios de Ext2 (sistema de ficheros nativo de
  Linux) tiene utilidad umsdos. La siguiente es una situación frecuente:

  ·  Como Linux es tu sistema operativo preferido, la partición de Linux
     empieza a llenarse más y más.

  ·  Tu partición de DOS está medio vacía y cogiendo polvo.

  ·  De repente te quedas sin espacio en la partición Ext2.

  ·  Aún no estás seguro de querer deshacerte del DOS.

  umsdos puede salvar la situación. Se puede poner un directorio Linux
  en la partición 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.  Habría 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 cómo funciona o se instala un sistema con
  umsdos. La mayoría 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 instalación de Linux.  Otro
  objetivo era facilitar su DESinstalación. La idea detrás de esto era
  favorecer la difusión de Linux.  La instalación de un nuevo sistema
  operativo es siempre problemática.  OS/2 por ejemplo enguarrina
  tranquilamente el directorio raíz del disco C: con una ristra de
  nuevos directorios.  Si eres tan inteligente como yo, además te borra
  los ficheros config.sys y autoexec.bat :-(

  El invento de la pseudorraíz de umsdos evita esta invasión no deseada.
  Linux se puede DESinstalar sin ningún efecto lateral.

  8.2.  Quién lo necesita

  Si se tiene un disco duro pequeño, umsdos permite compartir el espacio
  del disco entre DOS y Linux. Un disco de menos de 300M es en mi
  opinión un disco pequeño. Baso esta opinión en el tamaño de los
  diversos paquetes disponibles hoy día. Un popular procesador de textos
  se puede cepillar unos 70 megaoctetos si se seleccionan todas las
  opciones.

  Si se tiene un disco duro más grande, se debe tomar en consideración
  la opción de tener una partición dedicada para Linux donde use el
  sistema de ficheros Ext2. Ext2 utiliza un tamaño de bloque más pequeño
  que DOS (exactamente 1K) por lo que instalar muchos ficheros pequeños
  utiliza menos espacio que en una partición umsdos.

  8.3.  Acerca de la eficiencia

  Lo siguiente es aplicable a umsdos si se le compara con Ext2.

  ·  El manejo de directorios es más rápido 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 más
     rápido en umsdos que en Ext2. Esto es debido a la simplicidad del
     sistema de ficheros con FAT usado por el DOS.

     Téngase en cuenta que esta simplicidad tiene un coste:

  ·  Un máximo de alrededor de 65.000 ficheros o bloques por partición.
     Esto también significa que una partición de 500 megaoctetos utiliza
     un tamaño de bloque de 16K. En otras palabras, un fichero que
     contenga un sólo octeto consumirá 16K de espacio de disco.

  ·  Todo es controlado por una FAT ubicada al principio del disco duro.
     Esto hace probablemente más frágil al sistema de ficheros DOS.

  ·  No se toman precauciones para evitar la fragmentación de los
     ficheros. Un sistema umsdos se usará generalmente como estación de
     trabajo de un sólo usuario. En ese caso tiene demasiada
     importancia. Si se usa como sistema multiusuario, los ficheros se
     esparcirán por todo el disco, reduciendo la eficiencia de los
     accesos a los mismos.

  ·  Los enlaces simbólicos se guardan en ficheros normales. Si se
     intenta tener muchos, se encontrará que umsdos usa bastante más
     espacio de disco que Ext2.

  9.  Anexo: El INSFLUG

  El INSFLUG forma parte del grupo internacional Linux Documentation
  Project, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información relativa a otros
  recursos en castellano.

  Francisco José Montilla, pacopepe@insflug.org.

  COMO Usar el sistema de Impresión en Linux
  Matt Foster, mwf@engr.uark.edu
  Traducido por: Ricardo Javier Cárdenes Medina,
  a1402@correo.dis.ulpgc.es
  v1.0, 5 Agosto de 1995, Traducción 9 de Octubre de 1996.

  Este documento describe cómo usar el sistema de spooling para impreso­
  ras de líneas que provee el sistema operativo Linux. Si está buscando
  una guía para poner a punto su entorno de impresión, por favor, lea el
  Configuración de Impresion Como.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  1.1.    Histórico de este COMO

  1.2.    Copyrights y Marcas registradas

  1.3.    Obteniendo los COMOs sobre Imprimir en Linux

  1.4.    Sugerencias, críticas y aportaciones

  1.5.    Reconocimientos

  2.      Imprimir bajo Linux

  2.1.    Histórico

  2.2.    Lo básico de imprimir

  2.3.    Viendo la cola de impresión

  2.4.    Cancelando un trabajo de impresión

  3.      Elementos misceláneos

  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.      Resolución de problemas

  6.      Referencias

  7.      Colofón

  8.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  * Nota del traductor. A partir de ahora usaré el verbo bajar para
  traducir el inglés download, ya que aunque no es literalmente
  correcto, es la forma en que más lo he escuchado a otros usuarios
  españoles y es la que yo mismo uso.
  Este documento describe cómo usar el sistema de spooling para
  impresoras de líneas que provee el sistema operativo Linux. Si estás
  buscando una guía para poner a punto tu entorno de impresión, por
  favor, lee el Linux Printing Setup HOWTO.

  1.1.  Histórico de este COMO

  Esta versión 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 drásticamente el
  estilo de presentación y la profundidad de los temas tratados. Me
  parece que esto hace el COMO más completo y fácil de leer. Sólo puedo
  esperar que estés de acuerdo.

  1.2.  Copyrights y Marcas registradas

  Algunos nombres mencionados en este COMO están registrados en
  copyrights y/o están reclamados como Marcas registradas de ciertas
  personas y/o compañías.  Dichos nombres aparecen con la inicial o el
  nombre completo en mayúsculas 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 físico o electrónico, mientas ese aviso de copyright se mantenga
  en todas las copias. La redistribución comercial está permitida y
  alentada; sin embargo, al autor le gustaría 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
  distribución. Se pueden admitir excepciones a estas reglas bajo
  ciertas condiciones; por favor contacte con el coordinador de los COMO
  de Linux en la dirección que aparece más abajo.

  En resumen, deseamos promocionar la diseminación de esta información a
  través de cuantos canales sea posible. De todas maneras, queremos
  retener el copyright de los documentos COMO, y nos gustaría 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 dirección para averiguar el número de teléfono
  e información 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 versión PostScript. Está formateada de manera más estética y
  sencilla de leer. Puedes obtener la versión Postscript desde alguno de
  los muchos 'sites' de distribución de Linux (como SunSITE,
  ftp://sunsite.unc.edu/Linux/docs/Howtos/), o directamente desde mi
  página World Wide Web en http://www.engr.uark.edu/~mwf/pht/

  1.4.  Sugerencias, críticas 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
  versión alfa de ese COMO y respondió con multitud de comentarios y
  sugerencias que ayudaron mucho (algunos podréis ver vuestros
  comentarios reflejados en la versión)

  Me gustaría también agradecer a Grant y Brian por la gran cantidad de
  información que me han dado durante la transición de autoría.

  2.  Imprimir bajo Linux

  Esta sección comenta cómo imprimir ficheros, examinar la cola de
  impresión, eliminar trabajos de la cola, formatear ficheros antes de
  imprimirlos, y configurar tu entorno de impresión.

  2.1.  Histórico

  El sistema de impresión de Linux (el sistema lp) es una adaptación del
  código escrito por los Regents de la Universidad de California para la
  versión Berkeley Software Distribution (BSD) del sistema operativo
  UNIX.

  2.2.  Lo básico de imprimir

  La forma más simple (con mucho) de imprimir en el sistema operativo
  Linux es enviar el fichero a ser impreso directamente al dispositivo
  de impresión. 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 simbólico al verdadero dispositivo
  de impresión (una matricial, láser, tipográfica o plotter). Mira la
  página del man ln(1) para más información acerca de enlaces
  simbólicos.

  Para el propósito de la seguridad, sólo el usuario root y los usuarios
  de su mismo grupo como el demonio de impresión 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 líneas.

  Este demonio le dice entonces a la impresora cómo 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 múltiples 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 estándar (normalmente el teclado o la
  salida de otro programa). Esto permite que el usuario redirija la
  salida de un programa al dispositivo de impresión. Por ejemplo:

       $ cat tesis.txt | lpr

  o algo más potente, como

       $ pr -l60 tesis.txt | lpr

  El comando lpr acepta varios argumentos en la línea de comandos que
  permiten al usuario controlar cómo trabaja. Algunos de los argumentos
  más ampliamente usados son: -Pprinter especifica la impresora a usar,
  -h suprime la impresión de la página, burst, -s crea un enlace
  simbólico en lugar de copiar el fichero completo al directorio de
  spooling (útil para ficheros grandes), y -#num especifica el número de
  copias a imprimir.  Un ejemplo de interacción con lpr podría ser algo
  como

       $ lpr -#2 -sP dj tesis.txt

  Este comando crearía un enlace simbólico al fichero tesis.txt en el
  directorio de spool de la impresora llamada dj, donde debería ser
  procesado por lpd. Además debería imprimir una segunda copia de
  tesis.txt.

  Para ver un listado de todas las opciones que reconoce lpr, ver la
  página del man lpr(1).

  2.3.  Viendo la cola de impresión

  Algunas veces es útil saber qué trabajos están actualmente en una cola
  de impresión 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 impresión

  Otra útil característica para cualquier sistema de impresión 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 impresión que son
  propiedad del usuario que envió el comando. Se puede cancelar un
  trabajo de forma individual obteniendo primero el número del trabajo
  usando lpq, dando entonces el número a lprm. Por ejemplo

       $ lprm 31

  cancelaría el trabajo 31 (tesis.txt) en la impresora por defecto.

  3.  Elementos misceláneos

  Esta sección comenta algunos de las cosas de utilidad general que
  puedes querer saber sobre imprimir bajo Linux.

  3.1.  Formateado

  Como la mayoría de los ficheros ASCII no están formateados para la
  impresión, es útil formatearlos de alguna manera antes de que sean
  realmente impresos. Esto puede incluir poner un título y número en
  cada página, poner márgenes, espaciado doble, sangría, o imprimir el
  fichero en múltiples columnas. Una forma común de hacer esto es usar
  un preprocesador de impresión 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 saltaría las
  primeras tres páginas (+4), pondría la longitud de página en 60 líneas
  (-l60), doble espacio de la salida (-d), y añadiría la frase "Ph.D.
  Thesis, 2nd Draft" al principio de cada página (-h). lpr imprimiría
  entonces la salida de pr. Mira la página del manual para más
  información acerca de cómo usar pr.

  3.2.  Las variables de entorno PRINTER

  Todos los comandos del sistema de impresión de Linux aceptan la opción
  -P.  Esta opción 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 línea de comandos. (Leer bash(1) y csh(1)
  para más información sobre las variables de entorno.)

  3.3.  Imprimiendo ficheros PostScript

  Imprimir ficheros PostScript en una impresora que tiene un intérprete
  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 mayoría de
  las impresoras pueden comprender. Probablemente el más 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, podrías 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 opción -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 más fáciles 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
  debería ser de la siguiente manera cuando lo escribas.

       $ tex tesis.tex
       $ dvips tesis.dvi

  Ahora ya estás 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.   Cómo puedo prevenir el efecto de escalera (staircase effect)?

  R1. El efecto de escalón ocurre por la manera en que algunas
  impresoras esperan que se acaben las líneas. Algunas impresoras
  quieren líneas que terminen con un retorno_de_carro/avance_de_línea
  CR/LF (estilo DOS) en lugar de con la secuencia por defecto de los
  sistemas tipo UNIX (sólo un avance de línea, LF).  La manera más
  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 rápida de arreglarlo es usar un filtro en la línea de
  comandos. un ejemplo de esto podría ser

       $ cat tesis.txt | todos | lpr

  P2.  Qué es un filtro?

  R2. Un filtro es un programa que lee de la entrada estándar (stdin),
  realiza alguna acción sobre esa entrada, y escribe en la salida
  estándar (stdout). Los filtros se usan para montón de cosas,
  incluyendo el procesado de textos.

  P3.  Qué es un filtro mágico?

  R3. Un filtro mágico es un filtro que realiza una acción basada en el
  tipo de un fichero. Por ejemplo, si el fichero es puro texto, entonces
  simplemente imprimirá el fichero usando los métodos normales. Si el
  fichero es PostScript, o cualquier otro formato, podría imprimirlo
  usando otro método (ghostscript).

  5.  Resolución de problemas

  Esta sección cubre algunos problemas comunes en tu sistema de
  impresión. Manda sugerencias para esta sección a mwf@engr.uark.edu

  6.  Referencias

  Esta es una sección de referencias sobre el sistema de impresión
  Linux. He intentado mantener la sección de referencias de este COMO lo
  más concentrada posible. Si crees que he olvidado algún 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 Impresión (Printing Setup HOWTO)?
     Si contestas 'sí' a alguna de estas dos cosas, deberías pensarlo
     dos veces antes de enviar tu pregunta. Y cuando finalmente envíes
     el mensaje a un grupo de noticias, incluye toda la información
     pertinente. Intenta no decir sólo algo como "Estoy teniendo
     problemas con lpr, por favor ayuden." Este tipo de mensajes serán
     ignorados. Además intenta incluir la versión del kernel que estás
     ejecutando, cuándo ocurrió el error y el mensaje de error
     específico que devolvió el sistema (si lo hizo).

  ·  Welsh, Matt.  Linux Installation and Getting Started (-- Disponible
     en castellano merced al grupo LuCAS como Linux, Instalación y
     Primeros Pasos (LIPP), consultar anexo referente a grupos LiNUXeros
     en España--) Un excelente texto introductorio para el principiante.

  ·  Foster, Matt.  Linux Printing Setup HOWTO (-- Disponible en
     castellano igualmente--) , ver sección ``''El suplemento a este
     COMO; cubre temas tales como preparar y configurar el software de
     impresión.

  Páginas 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) Intérprete/Visor Ghostscript

  ·  lpc(8) Programa de control de la impresora de líneas

  ·  lpd(8) Demonio del spool de la impresora de líneas

  ·  lpq(1) Examina la cola de impresión

  ·  lpr(1) Impresor off-line

  ·  lprm(1) Elimina trabajos de la cola de impresión

  ·  pr(1) Convierte ficheros de texto para imprimir

  ·  tex(1) Formateo y tipado de texto

  Grupos de noticias de USENET

  ·  comp.os.linux.*: Muchísima información sobre Linux

  ·  comp.unix.*: Debates relacionados con el UNIX

  7.  Colofón

  Este COMO fue escrito usando vi, el editor fundamental; la mente
  humana, la computadora fundamental; e imaginación, la herramienta
  fundamental.  La computadora elegida fue una Gateway2000 i486/50
  corriendo la Slackware 2.2 con la versión 1.3.4 del kernel. El
  documento original fue escrito en formato mark-up usando Linuxdoc-SGML
  (-- Cuya guía está disponible en castellano, consultar anexo Grupo
  LiNUXeros en España--) (una versión hackeada del QWERTZ DTD de Tom
  Gordon). El COMO fue entonces enviado vía mail a Greg Hankins, el
  coordinador del Proyecto de Documentación de Linux. Allí fue
  convertido a formatos PostScript, TeXinfo, DVI, ASCII y HTML.
  La traducción 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 cómo obtener, instalar y configurar la versión
  3.1.1 de la variante XFree86 del Sistema X Window (X11R6)  para sis­
  temas LiNUX. Es una guía paso a paso para configurar XFree86 en su
  sistema.
  ______________________________________________________________________

  Índice General:

  1.      Introducción

  2.      Requisitos de Hardware

  3.      Instalación de XFree86

  4.      Configuración de XFree86

  5.      Introducción de información sobre la tarjeta de vídeo.

  6.      Ejecución de XFree86

  7.      Aparición de Problemas

  8.      Copyright

  9.      Anexo: El INSFLUG
  ______________________________________________________________________

  1.  Introducción

  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 gráfico para sistemas UNIX.  El
  código original del Sistema X Window fue desarrollado en el MIT (-- N.
  del T. Masachussets Institute of Technology, Instituto Tecnológico de
  Masachussets)--) ; las casas comerciales han hecho desde entonces de X
  un estándard industrial para plataformas UNIX. Prácticamente, cada
  estación de trabajo UNIX que exista en el mundo hace funcionar alguna
  variante del Sistema X Window.

  Ha sido desarrollada una adaptación de libre distribución del Sistema
  X Window del MIT, versión 11, edición 6 (X11R6) para sistemas UNIX
  sobre 80386/80486/Pentium, por un equipo de programadores encabezados
  originariamente por David Wexelblat (dwex@XFree86.org).  La edición,
  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, librerías y herramientas necesarias.

  En este documento, daremos una descripción paso a paso de cómo
  instalar y configurar XFree86 para LiNUX, aunque tendrás que completar
  ciertos detalles por tí mismo, leyendo la documentación adjunta a la
  misma distribución de XFree86. (Esta documentación es discutida más
  adelante.)  No obstante, el uso y personalización del sistema X Window
  sobrepasa el objetivo de este documento ---para este propósito,
  deberías hacerte con alguno de los buenos libros existentes sobre el
  empleo del sistema X Window---

  2.  Requisitos de Hardware

  Como en XFree86 versión 3.1.1, difundida en Febrero del 1995, son
  soportados los chipsets que detallamos más adelante. La documentación
  incluida con su adaptador de vídeo debería especificar el chipset que
  emplea. Si está buscando un nueva tarjeta gráfica, o va a comprar una
  máquina 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 técnico
  para tu propio beneficio; generalmente, los vendedores estarán
  contentos de hacerlo.

  Muchos vendedores de hardware para PC dirán que la tarjeta es una
  "SVGA estándard" que "debería funcionar" en su sistema.  Explique que
  su software (¡mencione LiNUX y XFree86!) no soporta todos los chipsets
  de vídeo, y que debe tener información detallada.

  También se puede determinar el chipset de su tarjeta de vídeo
  ejecutando el programa SuperProbe que incluye la distribución de
  XFree86.  Esto se trata con mayor detalle más adelante.

  Son soportados los siguientes chipsets SVGA (-- N. del T. Como
  comprenderá el lector por la fecha de divulgación del presente
  documento, esta lista no es ni mucho menos actual; una visita a
  www.xfree86.org es un buen método para obtener información más
  reciente. Otros lugares de interés: www.nine.com,(información sobre
  configuraciónes 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 aceleración también
  son soportados:

  ·  8514/A (y clónicas 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 excepción de los chipsets Avance Logic (--  N. del T. Atención:
  esta tarjeta ha tenido una difusión muy amplia en España.--) , MX y
  Video 7, que sólo son soportados en el modo de 256 colores. Si su
  tarjeta de vídeo tiene bastante DRAM instalada, muchos de los
  anteriores chipsets (-- N. del T. Por propia experiencia, la Avance
  Logic tiene idénticas prestaciones con 1 ó 2 megas de DRAM; no soporta
  más colores por ampliarla a 2 megas :-(.--) son soportados en modos de
  16 y 32 bits por pixel (más específicamente, algunas tarjetas Mach32,
  P9000, S3 y Cirrus). La configuración corriente es 8 bits por pixel
  (osea, 256 colores).

  Los servidores monocromos también soportan tarjetas VGA genéricas, y
  las tarjetas monocromas Hercules, Hyundai HGC1280, Sigma LaserView, y
  Apollo monochrome. En la Compaq AVGA, sólo son soportados 64k de
  memoria de vídeo para el servidor monocromo, y la GVGA no ha sido
  probada con más de 64k.

  Esta lista crecerá indudablemente con el tiempo. Las notas de
  distribución de la versión actual de XFree86 contendrán una relación
  completa de los chipsets de vídeo soportados.

  Un problema al que se enfrentan los desarrolladores de XFree86 es que
  ciertos fabricantes de tarjetas de vídeo no emplean mecanismos
  estándar para determinar las frecuencias de reloj empleadas para
  controlar la tarjeta. Algunos de ellos o no proporcionan
  especificaciones describiendo cómo programar la tarjeta, o exigen a
  los desarrolladores firmar una declaración de no-divulgación para
  obtener la información.

  Esto limita obviamente la libre distribución 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 vídeo fabricadas por Diamond, pero al tiempo
  de la divulgación de la versión 3.1 de XFree86, Diamond ha comenzado a
  trabajar con el equipo de desarrollo a fin de distribuir controladores
  de libre distribución para estas tarjetas.

  La configuración recomendada para XFree86 bajo LiNUX es una máquina
  486 con al menos 8 megabytes de RAM, y una tarjeta de vídeo 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 documentación 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 máquina y en estaciones de trabajo Sun Sparc IPX. El sistema
  LiNUX es a grosso modo 7 veces más rápido 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 más prestaciones que las encontradas en
  estaciones de trabajo UNIX comerciales (que generalmente utilizan
  simples framebuffers (--  N. del T. Genéricamente, dispositivo físico
  capaz de almacenar información sobre una imagen en memoria.--) para
  los gráficos)

  Su máquina precisará al menos 4 megabytes de RAM física, y 16
  megabytes de RAM virtual global. (por ejemplo, 8 megas de física y 8
  megas de swap (--  N. del T. Mecanismo por el cual se pasan a disco
  páginas de memoria RAM cuando ésta se agota. En adelante, me referiré
  a este sistema como paginación también.--) ).

  Recuérdese que cuanta más RAM física se tenga, menos paginará el
  sistema al y desde el disco cuando la memoria esté baja. Debido a que
  la paginación es inherentemente lenta (los discos son muy lentos
  comparados con la memoria), el tener 8 megabytes o más 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 más, o por razones de espacio en el HD, decir a título
  informativo que existe el paquete Tiny-X para estos casos.--) de RAM
  física podría funcionar mucho más lento (hasta 10 veces) que uno con 8
  o más megas.

  3.  Instalación de XFree86

  La distribución 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 versión actual es la 3.1.1; se
  distribuyen nuevas versiones periódicamente).

  Es muy probable que se haya obtenido XFree86 como parte de una
  distribución LiNUX, en cuyo caso el obtener el software por separado
  no es necesario.

  Si se obtiene XFree86 por FTP directamente, la siguiente relación
  enumera los archivos de la distribución 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 vídeo 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 configuración xdm, xinit y fs.

     XF86-3.1.1-doc.tar.gz
        Documentación y páginas man.

     XF86-3.1.1-inc.tar.gz
        Archivos include.

     XF86-3.1.1-lib.tar.gz
        Librerías X compartidas y ficheros de soporte.

     XF86-3.1-fnt.tar.gz
        Fuentes (tipográficas) básicas.

  Son opcionales los siguientes archivos:

     XF86-3.1-ctrb.tar.gz
        Programas de contribución 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
        Páginas de manual.

     XF86-3.1-pex.tar.gz
        Binarios PEX, archivos include y librerías.

     XF86-3.1-slib.tar.gz
        Librerías estáticas X y archivos de soporte.

     XF86-3.1-usrbin.tar.gz
        Demonios (--  N. del T. Para los que vienen del dos, son
        análogos a los TSRs.--) que residen en /usr/bin.

     XF86-3.1-xdmshdw.tar.gz
        Versión de ``Shadow password'' de xdm.

  El directorio XFree86 debe contener archivos README y notas de la
  instalación para la versión 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 -

  Recuérdese que estos archivos tar son empaquetados en relación 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 continúa siendo cierto si se emplea alguno de los demás
  servidores.

  Si no se está seguro de cuál 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 información;  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 intérprete de
  comandos que Vd. u otros usuarios del sistema utilicen.) O se puede
  simplemente añadir el directorio al path personal modificando
  /etc/.bashrc o /etc/.cshrc, dependiendo del shell empleado.

  También 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 término? ¿enlazador dinámico de
  librerías (o es muy ``liberal'' esta traducción)?.--) . Para hacer
  esto, añadir la línea

       /usr/X11R6/lib

  al fichero /etc/ld.so.conf, y ejecutar /sbin/ldconfig, como root.

  4.  Configuración de XFree86

  La configuración de XFree86 no es difícil en la mayoría de los casos.
  De todos modos, si se da el caso de que emplees hardware cuyos
  controladores estén en desarrollo, o desees obtener las mejores
  prestaciones o resoluciones de una tarjeta gráfica aceleradora, la
  configuración de XFree86 puede requerir tiempo en algún aspecto.

  En esta sección describiremos cómo crear y editar el archivo
  XF86Config, que configura el servidor XFree86. En muchos casos es
  mejor empezar con una configuración ``básica'' de XFree86, que emplee
  una resolución baja, como 640x480, que debería ser soportada por todas
  las tarjetas de vídeo y monitores de todo tipo. Una vez se tenga
  XFree86 funcionando a resolución baja, estándar, se podrá jugar con la
  configuración para explotar las posibilidades de su hardware de vídeo.
  La idea es que lo que se debe saber es si XFree86 funciona del todo en
  su sistema, y de que no hay nada erróneo en la configuración, antes de
  intentar la a veces difícil tarea de configurar XFree86 para su
  auténtico uso.

  Además de la documentación relacionada aquí, se debe leer la siguiente
  documentación:

  ·  La documentación XFree86, en /usr/X11R6/lib/X11/doc (contenida en
     el paquete XFree86-3.1-doc). Debe ser leído especialmente el
     fichero README.Config, que es un tutorial sobre la configuración de
     XFree86.

  ·  Varios chipsets de vídeo tienen ficheros README aparte, sitos en el
     directorio mencionado antes (como README.Cirrus y README.S3).
     Leánse si son aplicables a su caso.

  ·  La página man para XFree86.

  ·  La página man para XF86Config.

  ·  La página man para el servidor en concreto que se esté usando.
     (como XF86_SVGA o XF86_S3).

  El fichero principal de configuración de XFree86 es
  /usr/X11R6/lib/X11/XF86Config.  Este fichero contiene información de
  su ratón, parámetros de su tarjeta de vídeo, y demás cosas
  relacionadas. El fichero XF86Config.eg se adjunta con la distribución
  como ejemplo. Copiar este fichero a XF86Config y editarlo como punto
  de partida.

  La página man de XF86Config explica el formato de este fichero en
  detalle.  Léase esta página ahora, si es que no lo ha hecho todavía.

  Vamos a presentar un fichero de configuración de muestra XF86Config,
  parte por parte. Este archivo puede no parecerse exactamente al
  fichero incluido con la distribución de XFree86, pero la estructura es
  la misma.

  Téngase en cuenta que el formato del archivo XF86Config puede variar
  con cada versión de XFree86; esta información sólo es válida para la
  versión 3.1 de XFree86.

  Asimismo, no se debe copiar sin más el fichero de configuarción
  descrito aquí a su sistema e intentar usarlo. El intentar emplear un
  fichero de configuración 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 dañados o inutilizados por el uso de
  ficheros XF86Config configurados incorrectamente. La conclusión:
  Asegúrese completamente de que su archivo XF86Config se corresponde a
  su hardware antes de intentar hacer uso de él.

  Cada sección del fichero XF86Config va entre el par de líneas

       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 línea RgbPath define la trayectoria o path hacia la base de datos
  de color de X11R6, y cada línea FontPath define la trayectoria hacia
  el directorio que contenga las fuentes X11. En general no hace falta
  modificar estas líneas; 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 sección es ServerFlags, que especifica distintos
  parámetros para el servidor. Generalmente esta sección está vacía.

  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 sección es Keyboard. Esta deberá ser bastante intuitiva.

       Section "Keyboard"
           Protocol    "Standard"
           AutoRepeat  500 5
           ServerNumLock
       EndSection

  Hay más opciones disponibles ---ver el fichero XF86Config si se quiere
  modificar la configuración del teclado--- lo anterior debe funcionar
  en la mayoría de los sistemas.

  La siguiente sección es Pointer, que especifica los parámetros para el
  ratón.

       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 deberían afectarle por ahora son Protocol y
  Device. Protocol especifica el protocolo que su ratón usa (no la marca
  o modelo del ratón). Los tipos válidos 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 ratón tipo busmouse Logitech.
  Téngase en cuenta que los ratones antiguos Logitech usarán 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 ratón.

  Device especifica el fichero de dispositivo con el que se puede
  acceder al ratón. En la mayoría de los sistemas LiNUX, es /dev/mouse.
  /dev/mouse ES generalmente un enlace al puerto serie apropiado (como
  /dev/cua0) para un ratón 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 sección es Monitor, que especifica las características de
  tu monitor. Como con otras secciones del fichero XF86Config, puede
  haber más de una sección Monitor.  Esto es útil si se tiene más de un
  monitor conectado a un sistema, o si se emplea el mismo fichero
  XF86Config con multiples configuraciones de hardware.  No obstante, en
  general, sólo se necesitará una sección 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 línea 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 continuación.

  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
  continuación. Si se tiene un monitor de frecuencia fija, debe ser una
  relación 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 técnicas. Si no se dispone de esta información, se
  puede contactar tanto con el fabricante como con el vendedor del
  monitor para obtenerlas. También existen otras fuentes de información.

  VertRefresh especifica los intervalos verticales de refresco
  horizontal válidos (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 sólo para comprobar doblemente que
  las resoluciones de pantalla que se especifiquen están comprendidas en
  los intervalos válidos. Esto se hace para disminuir el riesgo de dañar
  el monitor, intentando hacerlo funcionar a una frecuencia para la que
  no está diseñado.

  la indicación ModeLine se emplea para especificar una única resolución
  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 resolución 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 resolución. La frecuencia de
  reloj se especifica normalmente en MHz, y es el rango al cual la
  tarjeta de vídeo deberá mandar los ``pixels'' al monitor a esa
  resolución.  valores_horiz y valores_vert son cuatro valores,
  especificando cada uno cuándo debe de dispararse el haz de electrones,
  y cuándo tienen lugar los pulsos horizontales y verticales de
  sincronismo durante un barrido.

  ¿Cómo se pueden determinar los valores de ModeLine para su monitor?
  El fichero VideoModes.doc, incluido con la distribución de XFree86,
  describe en detalle cómo determinar esos valores para cada modo de
  resolución 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; sólo se pueden usar modos de vídeo con
  un valor de frecuencia_de_reloj soportados por la tarjeta de vídeo.

  Hay dos ficheros incluidos en la distribución 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 estándar VESA, que son soportados por la
  mayoría de los monitores. modeDB.txt incluye valores de tiempo para
  resoluciones VESA estándar. En ese fichero, se verán 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 estándar VESA para un modo de vídeo
  640x480.  Emplea un ``dot-clock'' de 25.175, que debe de ser soportado
  por la tarjeta de vídeo para usar este modo (más sobre esto después).
  Para incluir esta entrada en el archivo XF86Config, deberá emplearse
  la línea:

       ModeLine "640x480" 25.175 640 664 760 800 480 491 493 525

  Téngase en cuenta que el argumento nombre para ModeLine (en este caso
  "640x480") es una cadena de valores arbitrarios --- por convención, se
  nombra el modo tras la resolución, pero nombre puede ser técnicamente
  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 (más
  sobre esto más adelante). Por cierta razón, el ``dot-clock'' empleado
  por el modo en cuestión no deberá ser mayor que el valor usado por
  Bandwidth.  (No obstante, en muchos casos es más seguro el uso de
  modos con un ancho de banda ligeramente mayor del que el monitor puede
  soportar.)  Si los valores estándar VESA no funcionan en su caso
  (sabrá, tras intentarlo, usarlos más adelante) es momento de mirar en
  modeDB.txt y Monitors, que incluyen valores para modos específicos de
  muchos tipos de monitor.  Se pueden crear entradas ModeLine para los
  valores hallados en esos dos ficheros también.  Asegúrese de sólo
  emplear valores para el modelo específico de monitor que se tenga.

  Téngase en cuenta que muchos monitores de 14 y 15 pulgadas no soportan
  los modos de resolución más altos, ni a veces resoluciones de 1024x768
  a valores bajos de frecuencias de reloj. Esto significa que si no
  puede encontrar modos de alta resolución 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 distribución 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 también describe el formato de la indicación 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 desvía ligeramente, o
  parece fluctuar, se pueden seguir las instrucciones del fichero
  VideoModes.doc para intentar corregir esos valores. ¡Asegúrese también
  de comprobar los mandos del monitor propiamente dicho! En muchos casos
  es necesario cambiar el tamaño horizontal o vertical de la imagen tras
  arrancar XFree86 para centrarla y ajustar su tamaño correctamente. El
  tener dichos mandos de control en el frontal del monitor pueden desde
  luego hacerle la vida más fácil.

  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é diseñado, se puede dañar
  o incluso inutilizar definitivamente.

  La siguiente sección del fichero XF86Config es Device, que especifica
  los parámetros de su tarjeta de vídeo. He aquí un ejemplo.

       Section "Device"
               Identifier "#9 GXE 64"

               # Nada por ahora; completaremos estos valores posteriormente.

       EndSection

  Esta sección define las propiedades de una tarjeta de vídeo 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 sección Device, excepto
  en Identifier. Esto se debe a que emplearemos el propio servidor X
  para probar las propiedades de la tarjeta de vídeo, introduciéndolas
  en la sección Device más tarde.  El servidor XFree86 es capaz de
  comprobar el chipset de vídeo, las frecuencias de reloj, RAMDAC, y la
  cantidad de RAM de vídeo que tiene la tarjeta.

  No obstante, antes de que hagamos esto, necesitamos terminar de
  escribir el fichero XF86Config. La siguiente sección es Screen, que
  especifica la combinación de tarjeta de vídeo/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 línea Driver especifica el servidor X que se va a emplear.  Los
  valores válidos 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 simbólico al
  servidor que se esté empleando.

  La línea Device especifica la secuencia Identifier de la sección
  Device correspondiente a la tarjeta de vídeo a emplear para dicho
  servidor. Anteriormente, creamos una sección Device con la línea

       Identifier "#9 GXE 64"

  Por tanto, empleamos "#9 GXE 64" en la línea Device aquí.

  Análogamente, la línea Monitor especifica el nombre de la sección
  Monitor a usarse con este servidor. Aquí, "CTX 5468 NI" es el
  Identifier empleado para la sección Monitor descrita anteriormente.

  Subsection "Display" define varias propiedades del servidor XFree86
  correspondientes a su combinación de monitor/tarjeta de vídeo.  El
  archivo XF86Config describe todas estas opciones en detalle;  la
  mayoría 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 número de planos de color ---el número 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 más bits
     por pixel, se puede definir Depth (-- Profundidad.--) a 16, 24, o
     32.  Si se experimentan problemas con profundidades de color
     superiores a 8, configúrelo para 8 nuevamente e intente solucionar
     el problema más adelante.

  ·  Modes. Esta es la lista de nombres de modos de vídeo que han sido
     definidos empleando la etiqueta ModeLine de la sección Monitor.

     En la anterior sección empleamos a ModeLines con el nombre
     "1024x768", "800x600", y "640x480".  Por tanto, usaremos una línea
     Modes tal como

                Modes    "1024x768" "800x600" "640x480"

  El primer modo que aparece en esta línea 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 sería emplear modos de baja resolución al configurar inicial­
  mente XFree86, como 640x480, que tenderán a funcionar en la mayoría de
  los sistemas.  Una vez se tenga la configuración básica funcionando,
  se puede modificar XF86Config para proporcionar mayores resoluciones.

  ·  Virtual. Establece el tamaño de escritorio virtual. XFree86 posee
     la capacidad de emplear la memoria adicional disponible en su
     tarjeta para aumentar el tamaño de su escritorio. Cuando mueva el
     puntero del ratón al borde de la pantalla, el escritorio se
     desplazará, visualizando el espacio adicional.  Por tanto, incluso
     si se emplean los modos de menor resolución como 800x600, se puede
     definir Virtual a la resolución total que pueda proporcionar su
     tarjeta (una tarjeta de vídeo 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. Recuérdese, esto siempre que la tarjeta CUMPLA
     los estándares 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 vídeo, pero es más 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 ocultación de ventanas y similar, en vez de almacenar
     el escritorio completo en la memoria de vídeo de golpe). Ver las
     páginas man de fvwm para obtener más detalles sobre esto; la
     mayoría de los sistemas LiNUX emplean fvwm por defecto.

  ·  ViewPort. Si se emplea la opción Virtual descrita anteriormente,
     ViewPort define las coordinadas de la esquina superior izquierda
     del escritorio virtual al arrancar XFree86.  Lo más 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 sección; ver la página man de
  XF86Config para una descripción completa. En la práctica no son
  necesarias estas opciones para conseguir que XFree86 funcione
  inicialmente.

  5.  Introducción de información sobre la tarjeta de vídeo.

  Ahora su archivo XF86Config está listo para funcionar, con la
  excepción de la información completa sobre la tarjeta de vídeo. Lo que
  vamos a hacer es emplear el servidor X para comprobar el resto de la
  información, introduciéndola posteriormente en XF86Config.

  En lugar de tantear esta información usando el servidor X, los valores
  XF86Config para muchas tarjetas están listados en los ficheros
  modeDB.txt, AccelCards, and Devices. Estos archivos se encuentran
  todos en /usr/X11R6/lib/X11/doc. Además, hay varios archivos README
  (-- N. del T. Léame.--)

  para determinados chipsets. Se debe buscar en esos ficheros
  información sobre su tarjeta de vídeo, y emplearla (los valores de
  frecuencias de reloj, tipo de chipset, y las posibles opciones) en el
  archivo XF86Config. Si no hay ningún tipo de información, se puede
  tantear como se describe aquí.

  En estos ejemplos mostraremos la configuración para una tarjeta de
  vídeo #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 vídeo 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 vídeo 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 páginas man los enumeran también). 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 válidos de chipset para este servidor son mmio_928 y
  s3_generic. La página man del servidor XF86_S3 describe estos chipsets
  y qué tarjetas los emplean. En el caso de la tarjeta de vídeo #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 intérprete 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 cálculos.

  El resultado de lo anterior (en /tmp/x.out) debe contener líneas 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 válidos para este servidor (en
  este caso, XF86_S3) son mmio_928 y s3_generic. El servidor tras
  tantear encontró una tarjeta de vídeo empleando el chipset mmio_928.

  Añadir en la sección Device del archivo XF86Config una línea 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 vídeo. La frecuencia de
  funcionamiento de reloj, o dot clock es simplemente la velocidad a la
  que la tarjeta de vídeo puede enviar puntos de imagen o pixels al
  monitor. Como hemos visto, cada resolución de monitor tiene un dot
  clock asociado a él.  Ahora necesitamos determinar cúales frecuencias
  de reloj son utilizables por la tarjeta de vídeo.

  Primero debe de mirar en los archivos (modeDB.txt, y demás)
  mencionados anteriormente, y ver si las frecuencias de reloj de su
  tarjeta se enumeran allí.

  Los dot clocks serán normalmente listados de 8 ó 16 valores, todos los
  cuales están en MHz. Por ejemplo, si miramos en modeDB.txt podemos
  observar una entrada para la tarjeta de vídeo 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 sección Devices del fichero XF86Config, se debe añadir una línea
  Clocks que contenga el listado de dot clocks para su tarjeta.

  Por ejemplo, para los clocks anteriores, añadiríamos la línea

               Clocks 25 28 38 36 40 45 32 0

  A la sección Devices del fichero, tras Chipset.  ¡Téngase 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 también tantearlas. Empleando el comando
  X -probeonly descrito anteriormente, el resultado contendría líneas
  con el siguiente aspecto:

       (--) S3: clocks:  25.18  28.32  38.02  36.15  40.33  45.32  32.00  00.00

  Podemos entonces añadir una línea Clocks que contenga todos esos
  valores, tal y como los obtenemos. Se puede usar más de una línea
  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.

  Asegúrese de que no hay una línea Clocks (o de que esté descomentada)
  en la sección Devices del fichero al usar X -probeonly para tantear
  las frecuencias. Si hubiese una línea Clocks presente, el servidor no
  tantearía esos valores, emplearía los valores presentes en XF86Config.

  Téngase en cuenta que algunas tarjetas aceleradoras emplean chips de
  frecuencias programables. (ver la página man de XF86_Accel para más
  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 sólo contener uno o dos valores
  concretos, siendo el resto duplicados o cero.

  Para tarjetas que empleen un chip programable, se debe emplear un
  línea ClockChip, en lugar de Clocks en el fichero XF86Config.
  ClockChip proporciona el nombre del chip que emplea la tarjeta de
  vídeo; las páginas man de cada servidor describen cuáles son. Por
  ejemplo, en el fichero README.S3, podemos ver que varias tarjetas
  S3-864 emplean un chip ``ICD2061A'', y que debemos emplear la línea

          ClockChip "icd2061a"

  en lugar de Clocks en el archivo XF86Config. Como con Clocks, esta
  línea deberá estar en la sección Devices, tras Chipset.

  Análogamente, algunas tarjetas aceleradoras precisan que se
  especifique el tipo de chip RAMDAC en el fichero XF86Config, empleando
  una línea Ramdac.  La página man de XF86_Accel describe esta opción.
  Normalmente, el servidor X averiguará correctamente el RAMDAC.

  Algunas tarjetas de vídeo requieren que se especifiquen ciertas
  opciones en la sección Devices de XF86Config. Estas opciones serán
  descritas en la página man de su servidor, así como en otros ficheros
  (como README.cirrus o README.S3. Estas opciones son activadas
  empleando la línea 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
  vídeo empleada en particular. Si debe usar alguna de estas opciones,
  ---me temo que no--- las páginas man del servidor X y algunos ficheros
  en /usr/X11R6/lib/X11/doc especificarán cuáles son.

  Así que cuando se haya terminado, se acabará con una sección 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 mayoría de las tarjetas de vídeo precisarán una línea Clocks, en
  lugar de ClockChip, como se describió anteriormente. La anterior
  sección Device es únicamente válida para una tarjeta de vídeo en
  particular, la #9 GXE 64.

  Hay otras opciones que pueden ser incluidas en la sección Devices.
  Comprobar las páginas man del servidor para los detalles más
  escurridizos, aunque lo anterior debe de bastar para la mayoría de los
  sistemas.

  6.  Ejecución 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 raíz (el fondo) a midnightblue.  Arrancará
  entonces twm, el gestor de ventanas. Téngase en cuenta que twm, se
  ejecuta con el mandato del intérprete 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 menús principales: presionando el botón 1 del ratón
  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 ejecución background o segundo
  plano (sin un ``&'' al final de la línea).  De no ser así, el servidor
  X moriría tan pronto como se arrancasen los clientes del fichero
  .xinitrc

  Alternativamente, se puede salir de X presionando la combinación ctrl-
  alt-backspace.  Esto mataría al servidor X directamente, saliendo del
  sistema de ventanas.

  Lo anterior es una muy muy simple configuración del escritorio.
  Multitud de maravillosos programas y configuraciones estarán
  disponibles con trabajar un poco el fichero .xinitrc.  Por ejemplo, el
  gestor de ventanas fvwm proporciona escritorio virtual, pudiendo
  personalizarse colores, fuentes, tamaño y posiciones de ventanas, y
  así según 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 configuración de X es demasiado
  profundo para tratarlo aquí. Ver las páginas man de xterm, oclock, y
  twm para hacerse con pistas para ponerse al día.

  7.  Aparición 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
  están, o las frecuencias dot clock de la tarjeta de vídeo están
  definidos de forma incorrecta.  Si la pantalla parece fluctuar, o los
  bordes están deformados, es una clara indicación de que los valores de
  frecuencia o dot clocks del monitor son erróneos. Asegúrese también de
  que de que se esté especificando correctamente el chipset de su
  tarjeta de vídeo, así como otras opciones de la sección 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
  simbólico a este servidor.

  Si todo lo demás 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 combinación 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 vídeo no tiene un dot clock que se
  corresponda con un modo soportado por el monitor.

  El fichero VideoModes.doc incluido en la distribución XFree86 contiene
  muchas sugerencias de cómo 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 vídeo listados en la línea Modes
  de la sección Screen de XF86Config. Si el modo de mayor resolución a
  no parece correcto, trate de cambiar a resoluciones menores. Esto le
  permitirá saber, por lo menos, que esas partes de su configuración de
  X están funcionando correctamente.

  Compruebe también los controles de posición y tamaño 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. Sería una buena
  idea observar ese newsgroup para enviar consultas relativas a su
  configuración de vídeo ---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 electrónica, sujeto a las siguientes condiciones:

  1. La notificación del copyright y esta licencia debe preservarse
     completa en todas las copias, tanto completas como parciales.

  2. Cualquier traducción o trabajo derivado debe de ser aprobado por el
     autor por escrito antes de su distribución.

  3. Si se distribuye el Trabajo parcialmente, deben de incluirse
     instrucciones para poder obtener la versión completa (en forma
     impresa o electrónica), así como los medios para conseguirla.

  4. Pueden ser reproducidas pequeñas porciones como ilustraciones para
     revistas o citas para otros trabajos sin esta notificación de
     permiso si se cita apropiadamente su procedencia.

  Pueden otorgarse excepciones a estas normas para propósitos
  académicos; escríbase al autor del trabajo, y pregúntesele. Estas
  restricciones están 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, encargándose de las traducciones al castellano de los Howtos
  (Comos), así como la producción de documentos originales en aquellos
  casos en los que no existe análogo en inglés.

  En el INSFLUG se orienta preferentemente a la traducción de documentos
  breves, como los COMOs y PUFs (Preguntas de Uso Frecuente, las FAQs.
  :) ), etc.

  Diríjase a la sede del INSFLUG para más información al respecto.

  En la sede del INSFLUG encontrará siempre las últimas versiones de las
  traducciones:  www.insflug.org. Asegúrese de comprobar cuál es la
  última versión disponible en el Insflug antes de bajar un documento de
  un servidor réplica.

  Se proporciona también una lista de los servidores réplica (mirror)
  del Insflug más cercanos a Vd., e información 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 décrit l'utilisation des cartes accélératrices 3Dfx sous
  Linux.  Il contient une liste de différents matériels compatibles,
  décrit la configuration des gestionnaires de périphériques impliqués
  et propose des réponses aux questions les plus courantes.
  ______________________________________________________________________

  Table des matières























































  1. Introduction

     1.1 Contributions et contacts
     1.2 Noms des produits et protection industrielle
     1.3 Historique
     1.4 Versions actualisées du document
     1.5 Retour d'expérience
     1.6 Licence

  2. Technologie des accélérateurs graphiques

     2.1 Les bases
     2.2 Configuration matérielle
     2.3 Quelques mots sur l'organisation du Voodoo Graphics (tm)

  3. Installation

     3.1 Installation de la carte.
        3.1.1 Solutions aux problèmes d'installation
        3.1.2 Configuration du noyau
        3.1.3 Configuration des périphériques
     3.2 Gestion des écrans
        3.2.1 Affichage avec un seul écran
        3.2.2 Un moniteur avec deux entrées vidéo
        3.2.3 Deux écrans
     3.3 Installation des logiciels Glide
        3.3.1 Le programme
        3.3.2 Test de l'installation

  4. Réponses aux questions les plus courantes ( la Foire Aux Questions )

  5. FAQ: quel Matériel ?

     5.1 Système nécessaire :
     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 géré ?
     5.5 Le Voodoo 2 (tm) est-il géré ?
     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), quès acco ?
     6.4 Voodoo Rush (tm) ?
     6.5 Voodoo 2 (tm) ?
     6.6 Qu'est ce qu'un intermédiaire 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 mémoire ?
     6.12 Le Voodoo Graphics (tm) gère-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 résolutions offre le Voodoo Graphics (tm) ?
     6.15 Quelles sont les tailles de texture disponibles ?
     6.16 Le Voodoo Graphics (tm) gère-t-il les textures palettisées ?
     6.17 Qu'en est-il du dépassement de fréquence d'horloge ?
     6.18 Où puis-je trouver d'autres informations concernant le Voodoo Graphics (tm) ?

  7. FAQ: Glide? TexUS?

     7.1 Glide, quès acco ?
     7.2 TexUS, quès 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 nécessairement 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 démos 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 problème 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 gère-t-il le texturage multiple ?
     9.12 Mesa supporte-t-elle le filtrage tri-linéaire 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 fenêtre XFree86 ?
     10.4 Comment réinitialiser l'affichage après un plantage de glQuake ?
     10.5 Des problèmes avec Quake pour Linux ?
     10.6 Les trous de sécurité 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 problèmes courants ?

     11.1 Cette carte a-t-elle été testée ?
     11.2 Échec lors du changement des privilèges d'entrées/sorties ?
     11.3 Un fonctionnement sans les droits root est-il possible ?
     11.4 L'affichage est déplorable !
     11.5 La dernière image ne disparaît pas !
     11.6 L'économiseur d'écran se déclenche ( 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 même !
     11.11 Mesa est actif mais n'accède pas à la carte !
     11.12 Réinitialiser une carte SLI ( configuration à deux cartes ) ?
     11.13 Réinitialiser une carte SLI ( configuration à une seule carte ) ?


  ______________________________________________________________________







  11..  IInnttrroodduuccttiioonn

  Ce document est le 3Dfx HOWTO pour Linux. Il contient toutes les
  informations nécessaires à l'installation et la configuration du 3Dfx
  sous Linux. Des réponses aux questions les plus fréquentes sur
  l'utilisation du 3Dfx ainsi que des pointeurs vers d'autres sources
  d'informations en rapport avec l'accélération matérielle 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 expérience dans ce domaine. Seules
  sont couvertes les cartes à base de 3Dfx. L'utilisation d'autres
  cartes accélératrices déborde du cadre de ce document.



  11..11..  CCoonnttrriibbuuttiioonnss eett ccoonnttaaccttss

  Ce document n'existerait pas sans l'information glanée par de
  multiples personnes : celles qui se sont impliquées dans le portage et
  le test de Glide pour Linux, les développeurs 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'intégralité 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 procédé à l'intégration au sein de sa librairie
  Mesa. En ce qui concerne l'accélération Voodoo Graphics (tm) de Mesa,
  des remerciements supplémentaires sont dus à Henri Fousse, Gary
  McTaggart, et au développeur de 3Dfx Mesa pour DOS, Charlie Wallace
  Charlie.Wallace@unistudios.com.  Le personnel de 3Dfx, et plus
  particulièrement 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 recèlent 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 particulièrement à Mark Atkinson
  pour m'avoir rappelé la méthode de mise en oeuvre du câble vidéo.

  Grâce 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.



  11..22..  NNoommss ddeess pprroodduuiittss eett pprrootteeccttiioonn iinndduussttrriieellllee

  3Dfx, le logo 3Dfx Interactive , Voodoo Graphics (tm) et  Voodoo Rush
  (tm) sont des marques déposées appartenant à 3Dfx Interactive, Inc.
  Glide, TexUS, Pixelfx et Texelfx sont des marques déposées par 3Dfx
  Interactive, Inc. OpenGL est une marque déposée par Silicon Graphics.
  Obsidian est une marque déposée par Quantum3D. Les autres noms de
  produits sont des marques déposées de leurs propriétaires respectifs.


  11..33..  HHiissttoorriiqquuee


     VVeerrssiioonn 11..0033
        First version for public release.

     VVeerrssiioonn 11..1166
        Current version v1.16 6 February 1998.


  11..44..  VVeerrssiioonnss aaccttuuaalliissééeess dduu ddooccuummeenntt

  Vous trouverez la version la plus récente de l'original en langue
  anglaise de ce document à la page web : www.gamers.org/dEngine/xf3D/.

  Les nouvelles versions seront postées périodiquement 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 général dans le répertoire /usr/doc/.  Certains
  vendeurs proposent des versions imprimées.

  Si vous traduisez ce document dans une autre langue, faites le moi
  savoir que je puisse y faire référence.


  11..55..  RReettoouurr dd''eexxppéérriieennccee

  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 adéquat.

  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 problème.

  Si ce document est publié sous forme papier ou sur CD-ROM,
  j'apprécierais une copie. Demandez moi mon adresse postale via le
  courrier électronique. Les dons de soutien au Linux Documentation
  Project ( LDP ) pour le développement de la documentation libre Linux
  seront appréciés. Pour plus d'informations, contactez le responsable
  du projet Linux HOWTO, Tim Bynum Linux HOWTO coordinator, Tim Bynum
  (linux-howto@sunsite.unc.edu).


  11..66..  LLiicceennccee

  Copyright (c) 1997, 1998 by Bernd Kreimeier.  La distribution de ce
  document doit se conformer aux termes de la licence LDP tels que
  définis à l'adresse : sunsite.unc.edu/LDP/COPYRIGHT.html.

  22..  TTeecchhnnoollooggiiee ddeess aaccccéélléérraatteeuurrss ggrraapphhiiqquueess

  22..11..  LLeess bbaasseess

  Il s'agit ici de survoler _b_r_i_è_v_e_m_e_n_t les concepts de l'accélération
  graphique pour faciliter le reste de la lecture.  Pour en apprendre
  plus, vous pourrez consulter des livres traitant d'OpenGL.


  22..22..  CCoonnffiigguurraattiioonn mmaattéérriieellllee

  Les accélérateurs graphiques se présentent sous diverses formes : soit
  comme une carte PCI traitant les signaux vidéo issus d'une carte VGA (
  usuelle ou accélérée ), soit comme une carte PCI gérant le graphisme
  VGA et la 3D. Dans ce cas, l'ancien périphérique VGA est mis hors
  circuit. Les cartes 3Dfx à base de composants Voodoo Graphics (tm)
  appartiennent à la première catégorie. On y reviendra ultérieurement.


  S'il n'y a pas de conflit d'adresses, n'importe quelle carte
  accélératrice 3D peut être présente dans la machine sans perturber son
  fonctionnement sous Linux. Cependant, l'accés aux fonctions
  accélératrices nécessite un pilote spécifique. Une carte combinant les
  fonctions 2D et 3D peut se comporter différemment.


  22..33..  QQuueellqquueess mmoottss ssuurr ll''oorrggaanniissaattiioonn dduu VVooooddoooo GGrraapphhiiccss ((ttmm))

  En général, les accès à la mémoire de stockage des textures et au
  tampon mémoire vidéo constituent un sérieux goulot d'étranglement.
  Chaque pixel nécessite au moins un ( sinon quatre voire huit ) accès
  en lecture à la mémoire de stockage des textures ainsi qu'un accès en
  lecture pour la profondeur et un accès en lecture/écriture à la
  mémoire vidéo.

  L'architecture Voodoo Graphics (tm) sépare l'espace mémoire dédié aux
  textures de celui concerné par le stockage des pixels et introduit un
  rendu à deux niveaux, chacun disposant d'une unité dédiée ( Texelfx et
  Pixelfx ) qui gère sa propre mémoire. Le rythme de fonctionnement
  dépasse ainsi la moyenne mais des restrictions quant à l'utilisation
  de la mémoire apparaissent : le stockage de textures dans la zone de
  mémoire é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
  systèmes Voodoo Graphics (tm) par un mécanisme nommé SLI ( Scan-Line
  Interleaving ). Le SLI consiste à ne faire traiter par chaque Pixelfx
  qu'une ligne sur deux, réduisant ainsi la bande passante requise par
  chaque Pixelfx pour accéder à sa propre mémoire.


  33..  IInnssttaallllaattiioonn

  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 exécution de l'application.

  Les sections suivantes couvrent ces étapes en détail.



  33..11..  IInnssttaallllaattiioonn ddee llaa ccaarrttee..

  Reportez vous aux instructions données par le fabricant de votre
  matériel pour mettre la carte en place. Il ne devrait pas s'avérer
  nécessaire d'aller modifier les IRQ, les canaux DMA : le Plug&Plante
  (tm) ou les valeurs en sortie d'usine sont censés fonctionner. On
  accède aux cartes décrites ci-après via l'espace d'adressage mémoire.
  On n'a donc pas besoin d'interruption. Les chevauchements en mémoire
  avec d'autres périphériques constituent les seuls conflits possibles.

  Puisque 3Dfx n'intervient pas dans le développement et la fabrication
  de cartes, il est inutile de les contacter en cas de problèmes.


  33..11..11..  SSoolluuttiioonnss aauuxx pprroobbllèèmmeess dd''iinnssttaallllaattiioonn

  Afin de vérifier l'installation et l'adressage mémoire des
  périphériques, 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 utilisée conjointement à une Diamond
  Stealth-64 ). Un cat /proc/cpuinfo /proc/meminfo aidera à résoudre les
  conflits et sera utile pour signaler un bug.

  Les noyaux courants afficheront peut-être au démarrage :

  ______________________________________________________________________
  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 possédez une carte exotique ou
  récemment mise à jour, prenez le temps de lire les conseils donnés au
  début du fichier /usr/include/linux/pci.h afin de transmettre les
  informations utiles à linux-pcisupport@cao-vlsi.ibp.fr.

  Si des problèmes 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 répondre à 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
  réaction quel que soit le système d'exploitation.


  33..11..22..  CCoonnffiigguurraattiioonn dduu nnooyyaauu

  Seule la gestion du bus PCI est requise.  Le Linux Kernel HOWTO
  <http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html> fournit tous les
  détails relatifs à la compilation d'un noyau.


  33..11..33..  CCoonnffiigguurraattiioonn ddeess ppéérriipphhéérriiqquueess

  Pour l'instant, les pilotes ne nécessitent pas de périphériques
  particuliers.  Contrairement aux gestionnaires de cartes sons qui
  requièrent les entrées /dev/dsp et /dev/audio dont la présence n'est
  pas garantie, les pilotes reposent ici sur le /dev/mem qui est
  toujours disponible.  Il vous faudra bien sûr disposer des droits de
  super-utilisateur ou recourir à setuid pour accéder à la carte
  accélératrice.


  33..22..  GGeessttiioonn ddeess ééccrraannss

  Deux configurations sont possibles avec les cartes accélératrices.
  Soit vous faites transiter les signaux vidéo issus de votre carte
  usuelle par l'accélérateur graphique, soit vous employez simultanément
  deux écrans.  Reportez vous aux manuels utilisateurs du constructeur
  de votre carte pour plus de détails. Les deux solutions ont été
  essayées avec la Monster 3D.


  33..22..11..  AAffffiicchhaaggee aavveecc uunn sseeuull ééccrraann

  Ce mode opératoire permet de vérifier le bon fonctionnement de base de
  la carte accélératrice : si le signal vidéo n'est pas transmis à
  l'écran, une défaillance matérielle est à envisager.

  Notez qu'il risque de se produire un affaiblissement sensible du
  signal. On a signalé le cas de câbles de piètre 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 recèlent d'autres
  subtilités.  Le passage d'un mode d'affichage VGA à l'affichage
  accéléré modifie aussi bien la résolution que la fréquence du moniteur
  , et ce même si vous travaillez avec X11 en 640x480. De surcroît, avec
  X11, votre application a la charge de gérer les évènements souris et
  claviers sans quoi vous vous exposez à de sérieuses difficultés ( X
  reste naturellement invisible lorsque l'on a basculé en mode accéléré
  ). 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 fréquents, n'oubliez pas que les
  composants de votre moniteur risquent de se fatiguer.


  33..22..22..  UUnn mmoonniitteeuurr aavveecc ddeeuuxx eennttrrééeess vviiddééoo

  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 généralement des boutons de
  sélection de l'entrée vidéo. Il est ainsi possible d'utiliser le
  connecteur BNC avec la carte graphique habituelle via un câble adéquat
  et de relier l'accélérateur 3Dfx à l'autre entrée.



  33..22..33..  DDeeuuxx ééccrraannss

  La carte accélératrice n'a nul besoin d'une entrée VGA. Au lieu de
  faire transiter par cette dernière le signal vidéo usuel, vous pouvez
  diriger les sorties vidéos vers deux moniteurs différents. Cette
  solution est certes la plus dispendieuse mais elle donne les meilleurs
  résultats. Vous pourrez ainsi utiliser conjointement X11 et
  l'affichage accéléré en plein écran à des fins de déboggage et de
  développement.

  La carte accélératrice cesse de fournir le moindre signal vidéo
  lorsqu'elle n'est plus utilisée. Par conséquent, à chaque fois que
  l'application concernée s'arrête, les composants économiseurs
  d'énergie risquent, selon la configuration de votre matériel, d'entrer
  en action. Le moniteur se lassera peut-être à la longue. Utilisez donc
  :

  ______________________________________________________________________
  setenv SST_DUALSCREEN 1
  ______________________________________________________________________


  pour maintenir la sortie vidéo active.


  33..33..  IInnssttaallllaattiioonn ddeess llooggiicciieellss GGlliiddee

  Les pilotes et la librairie Glide sont réunis dans un unique fichier
  compressé. Décompactez/détarez les avec tar et gzip et suivez les
  instructions fournies dans les fichiers README et INSTALL qui
  accompagnent le logiciel. Par défaut, les fichiers sont installés dans
  les répertoires lib, bin, include sous /usr/local/glide/ et le chemin
  d'accés aux librairies correspondants est ajouté au ld.conf.
  L'installation des fichiers et la modification du ld.conf sont des
  étapes indépendantes. Sans l'étape de mise à jour du ld.conf, vous
  devrez positionner manuellement la variable d'environnement
  LD_LIBRARY_PATH.

  Les fichiers d'en-tête doivent être visibles par le compilateur si
  vous souhaitez compiler vos propres applications graphiques ! Si
  l'installation par défaut ne vous satisfait pas, vérifiez bien que les
  bibliothèques dynamiques sont accessibles sans quoi vous aurez droit à
  un can't load library 'libglide.so'.



  33..33..11..  LLee pprrooggrraammmmee ddeetteecctt

  La distribution logicielle inclut le programme bin/detect ( les
  sources ne sont pas disponibles ). Le lançant 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.

  33..33..22..  TTeesstt ddee ll''iinnssttaallllaattiioonn

  La distribution Glide comprend un répertoire 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 détails.

  Bien que des binaires soient disponibles, il est recommandé de
  compiler soi-même les programmes. Certains exécutables ont besoins de
  fichiers tels alpha.3df que vous trouverez dans le même répertoire.
  Tous les test ont lieu avec une résolution de 640 par 480. Certains
  demanderont des caractères, d'autre se cantonneront à afficher Press A
  Key To Begin Test. Méfiez vous d'un éventuel accaparement des
  évènements de saisie par X11 si ce dernier fonctionne également sur le
  même écran.

  Le fichier README.test donne la liste des programmes ainsi que divers
  détails.


  44..  RRééppoonnsseess aauuxx qquueessttiioonnss lleess pplluuss ccoouurraanntteess (( llaa FFooiirree AAuuxx QQuueessttiioonnss
  ))

  Ce paragraphe reprend les réponses aux questions les plus fréquemment
  posées sur Usenet ou dans les liste de diffusion. Dans un souci
  d'efficacité, les questions ont été regroupées dans diverses parties :

  ·  FAQ: Quel Matériel ?

  ·  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 problèmes devraient trouver une réponse ici.



  55..  FFAAQQ:: qquueell MMaattéérriieell ??

  55..11..  SSyyssttèèmmee nnéécceessssaaiirree ::

  Un compatible PC sous Linux disposant d'un bus PCI compatible avec la
  spécification 2.1, un moniteur supportant le mode 640 par 480 et une
  carte accélératrice à base de composant Voodoo Graphics (tm) 3Dfx. Le
  fonctionnement sera le même sur un P5 ou un P6 qu'il possède les
  extension MMX ou non. Les versions actuelles des programmes
  n'utilisent pas le MMX mais elles ont été optimisées pour le P6.

  Certaines phrases pourraient conduire à penser qu'une distribution
  RedHat est nécessaire. Bien que Glide pour Linux ait été initialement
  développé 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.


  55..22..  EEsstt--ccee qquuee ççaa ffoonnccttiioonnnnee aavveecc LLiinnuuxx--AAllpphhaa ??

  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 prêts à participer au
  développement.

  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 amélioration significative des performances selon
  le type de microprocesseur P5.


  55..33..  QQuueellss ssoonntt lleess ccoommppoossaannttss 33DDffxx ccoommppaattiibblleess aavveecc llaa ddiissttrriibbuuttiioonn
  ??

  Pour l'instant, le Voodoo Graphics (tm) 3Dfx est accepté. Le Voodoo
  Rush (tm) n'est pas encore géré.


  55..44..  LLee VVooooddoooo RRuusshh ((ttmm)) eesstt--iill ggéérréé ??

  La version actuelle de Glide pour Linux ne gère pas le Voodoo Rush
  (tm). Une mise à jour est en cours de développement.

  A l'origine, le pilote Voodoo Rush (tm) de Glide utilise Direct Draw.
  On devrait pouvoir utiliser une portion de la bibliothèque d'origine
  DOS dès lors que les parties liées à 2D/Direct Draw/D3D seront
  remplacées.

  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 gérées.


  55..55..  LLee VVooooddoooo 22 ((ttmm)) eesstt--iill ggéérréé ??

  Le portage actuel de la librairie Glide ne supporte pas le Voodoo 2
  (tm).


  55..66..  QQuueelllleess ssoonntt lleess ccaarrtteess ccoommppaattiibblleess aavveecc GGlliiddee ??

  Il n'existe pas de carte officielle ( 3Dfx ne fabrique pas de cartes
  ).  Cette section ne vise pas à répertorier toutes les cartes
  disponibles mais seulement à donner un aperçu de ce qui existe en
  citant au besoin les fauteuses de troubles.

  Notez que la gestion d'une carte donnée sous Linux ne se limite pas à
  la disponibilité d'un pilote pour le composant d'accélération 3D mais
  requiert également une bonne compatibilité avec la librairie SVGA ou
  XFree86.  Pour l'instant, une solution venant en complément de la
  carte graphique est préférable en ce qu'elle vous laisse libre de
  choisir pour cette dernière une carte correctement gérée sous Linux.

  Toutes les cartes Quantum3D Obsidian, indépendemment de leur mémoire
  dédiée aux textures, de celle affectée au tampon de mémoire vidéo, du
  nombre d'unités 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 supportées.

  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 débordent du cadre de ce
  document.


  55..77..  QQuu''eesstt--ccee qquuii ddiissttiinngguuee lleess ccaarrtteess ??

  Les fabricants de cartes utilisant tous le même composant, les
  différences sont liées à la conception de la carte. La qualité du
  câble et des connecteurs peuvent varier ( Orchid semble ainsi être
  meilleur sur ce point que Diamond ), une sortie vidéo supplémentaire
  pour la télévision peut être disponible ( Canopus Pure 3D ) et,
  surtout, les quantités de mémoire diffèrent.

  Les cartes les plus courantes sont dédiées au jeu et ne comprennent
  que 2 Mo de mémoire. La Canopus Pure 3D est cependant fournie avec une
  mémoire pour les textures allant jusqu'à 4 Mo, ce qui améliore
  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.



  55..88..  QQuu''eenn eesstt--iill ddee ll''AAGGPP??

  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 prévu pour le bus AGP. En fait, il le
  considère comme un bus PCI rapide, et n'utilise pas, à ma connaissance
  les spécificités du bus AGP. Le gain en performances est néanmoins lié
  à l'augmentation de la vitesse du bus.

  Le noyau Linux reconnaîtra une carte AGP à base de Voodoo 2 (tm) comme
  si elle était sur un second bus PCI, comme c'est déjà 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.
  ______________________________________________________________________




  66..  FFAAQQ:: VVooooddoooo GGrraapphhiiccss ((ttmm)) ?? 33DDffxx ??

  66..11..  33DDffxx,, qquuii eesstt--ccee ??

  3Dfx est un fabricant de composants pour l'accélération graphique 3D
  basé à San Jose. Leur site officiel : www.3dfx.com.  3Dfx ne vend pas
  de cartes, contrairement à d'autres sociétés ( Quantum3D par exemple
  ).

  66..22..  QQuuii eesstt QQuuaannttuumm33DD ??

  Quantum3D est une entreprise issue de 3Dfx qui fabrique des cartes
  accélératrices 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.




  66..33..  VVooooddoooo GGrraapphhiiccss ((ttmm)),, qquuèèss aaccccoo ??

  Le Voodoo Graphics (tm) est un composant électronique fabriqué par
  3Dfx. Il est employé dans les cartes d'accélération graphique pour PC.
  Reportez vous à la section du HOWTO concernant le matériel.


  66..44..  VVooooddoooo RRuusshh ((ttmm)) ??

  Le Voodoo Rush (tm) est un dérivé du Voodoo Graphics (tm) muni d'une
  interface pour opérer de concert avec un accélérateur graphique VGA
  2D. Les fonctions accélératrices peuvent alors être restreintes à une
  fenêtre. Cette possibilité n'est pas encore gérée sous Linux.


  66..55..  VVooooddoooo 22 ((ttmm)) ??

  Le Voodoo 2 (tm) succède, avec des améliorations, au Voodoo Graphics
  (tm). Quantum3D, Creative Labs, Orchid Technologies et Diamond
  Multimedia fournissent des cartes intégrant le Voodoo 2 (tm).

  Bien que le Voodoo 2 (tm) soit censé être compatible, une nouvelle
  version de Glide devra être développée pour Linux.


  66..66..  QQuu''eesstt ccee qquu''uunn iinntteerrmmééddiiaaiirree VVGGAA ??

  Les cartes Voodoo Graphics (tm) ( mais pas les Voodoo Rush (tm) ) sont
  des cartes accélératrices censées travailler de concert avec une carte
  VGA 2D. Pour résumer, le signal vidéo en sortie de la carte VGA sert
  d'entrée à la carte Voodoo Graphics (tm) qui par défaut 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 fréquence conformément aux exigences du
  pilote et génère lui même le signal vidéo. La carte VGA n'a pas besoin
  d'être informée de ce qui se passe et, dans les faits, elle ne l'est
  pas.

  Ce mode opératoire présente plusieurs avantages : d'une part le choix
  de la carte vidéo reste libre, point d'importance sous Linux puisque
  XFree86 ne peut gérer toutes les révisions et variantes des jeux de
  composants, et d'autre part l'introduction du graphisme 3D accéléré se
  fait au meilleur prix. La médaille a son revers : le plantage d'un
  applicatif utilisant le Voodoo Graphics (tm) risque de bloquer la
  sortie vidéo usuelle et le signal vidéo transitant par l'intermédiaire
  VGA est détérioré.


  66..77..  QQuu''eesstt--ccee qquuee llee TTeexxeellffxx,, uunn TTMMUU ??

  Les composants Voodoo Graphics (tm) comportent deux unités. La
  première contrôle l'accès à la mémoire dédiée aux textures, met en
  place les textures et passe la main à la seconde unité qui assure la
  gestion du tampon de mémoire vidéo. La première partie est nommée
  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 gérer 4 Mo de mémoire pour ses textures. Une
  configuration munie de deux Texelfx dispose de 8 Mo utilisables et ce
  même si seule une unité est requise par le logiciel. Les deux Texelfx
  opèrent de concert pour certaines opérations tel le filtrage tri-
  linéaire ou l'illumination qui ont lieu en une seule phase ( ex.
  GlQuake ).  A charge des applications Glide d'utiliser correctement
  les Texelfx pour accéder aux performances théoriques.

  On ne peut pas recourir à deux Texelfx afin d'afficher simultanément
  plusieurs triangles texturés. Soit un triangle ne requiert qu'une
  seule texture, au tel cas un seul Texelfx est actif, soit deux
  textures sont utilisées en une seule passe. Un Texelfx ne peut accéder
  qu'à sa mémoire propre.


  66..88..  QQuu''eesstt ccee qquu''uunnee uunniittéé PPiixxeellffxx ??

  Il s'agit de la seconde partie d'un composant Voodoo Graphics (tm),
  chargée de la gestion du tampon de mémoire vidéo ( mise à jour de la
  couleur des pixel, etc ... ). Deux Pixelfx peuvent coopérer en mode
  dit SLI, doublant ainsi le rythme d'affichage. Les cartes Quantum3D
  Obsidian offrent cette fonctionnalité.



  66..99..  QQuu''eesstt--ccee qquuee llee mmooddee SSLLII ??

  Le SLI est une abréviation 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
  mémoire propre et le nombre de pixels affichables est ainsi doublé.

  Les Pixelfx peuvent être sur deux cartes distinctes reliées de façon
  adéquate.  Certaines cartes Obsidian supportent le SLI avec le  Voodoo
  Graphics (tm).

  Plusieurs cartes pouvant décoder simultanément les mêmes adresses PCI
  et recevoir les mêmes données, le SLI ne nécessite pas un surcroît de
  bande passante. Sur un autre plan, les données relatives aux textures
  doivent être présentes sur les deux cartes.


  66..1100..  LLee SSLLII aavveecc uunnee sseeuullee ccaarrttee ??

  Il existe à présent deux types de cartes Quantum3D pour faire du SLI.
  A l'origine il fallait deux cartes, deux connecteurs PCI et un câble
  de liaison ( Obsidian 100-4440 ). La nouvelle version se comporte à
  l'identique mais ne nécessite qu'un seul connecteur PCI ( Obsidian
  100-4440SB ).


  66..1111..  QQuueellllee qquuaannttiittéé ddee mméémmooiirree ??

  La différence entre les cartes utilisant les composants Voodoo
  Graphics (tm) se fait essentiellement sur la quantité de mémoire et
  sur son organisation. A cet égard, les cartes Quantum3D sont décrites
  par un schéma à trois niveaux. Le schéma suivant, qui anticipe le
  Voodoo 2 (tm), diffère légèrement. A noter que si l'on utilise
  plusieurs Texelfx, tous doivent posséder la même quantité de mémoire (
  pour les textures ).  Idem en ce qui concerne l'utilisation simultanée
  de plusieurs Pixelfx;.

  ______________________________________________________________________
      "SLI / Pixelfx / Texelfx1 / Texelfx2 "
  ______________________________________________________________________


  Une carte courante munie de deux fois 2 Mo est décrite par le quadru­
  plet 1/2/2/0, la quantité totale de mémoire é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 possédant 2 Texelfx et 4 Mo de mémoire vidéo, les
  Texelfx ayant chacun 4 Mo pour les textures, serait du type 2/4/4/4
  pour une quantité totale de mémoire de SLI*(Pixelfx+Texelfx1+Texelfx2)
  soit 24 Mo.



  66..1122..  LLee VVooooddoooo GGrraapphhiiccss ((ttmm)) ggèèrree--tt--iill ll''aaffffiicchhaaggee eenn 2244 oouu 3322 bbiittss
  ??

  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
  mémoire vidéo ( 16 bpp ) compressé.


  66..1133..  LLee ccaallccuull ddee pprrooffoonnddeeuurr dduu VVooooddoooo GGrraapphhiiccss ((ttmm)) eesstt--tt--iill eenn 2244
  oouu 3322 bbiittss ppaarr ppiixxeell ??

  Non. Là encore, l'architecture interne est sur 16 bits. Même chose
  pour le Voodoo Rush (tm) et le Voodoo 2 (tm). Quantum3D affirme
  obtenir une précision effective de 22 bpp pour le tampon de profondeur
  ( Z-buffer ) avec des calculs en flottant sur 16 bits.


  66..1144..  QQuueelllleess rrééssoolluuttiioonnss ooffffrree llee VVooooddoooo GGrraapphhiiccss ((ttmm)) ??

  Le jeu de composants Voodoo Graphics (tm) gère jusqu'à 4 Mo de mémoire
  vidéo. Avec un tampon double et un tampon de profondeur, 2 Mo de
  mémoire 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 opérer que sur des résolutions divisibles par 32
  dans les deux directions, ce qui emmène le 960 par 720 à 960 par 736,
  soit 4,04 Mo de mémoire pour les trois zones de mémoire considérées en
  16 bit.

  En utilisant deux cartes en SLI, ou une carte avec un double Pixelfx
  en SLI, chaque tampon de mémoire vidéo 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 façon le maximum accessible
  compte tenu de l'architecture matérielle. Vous pourrez certes faire du
  1024 par 768 avec un triple tampon mais le matériel est incapable de
  tenir le 1280 par 960 avec un tampon double.

  Notez que la présence d'un tampon triple ( les applications ne
  nécessitent par de signal VSync de synchronisation ), de mémoire
  intermédiaire pour la stéréo ( avec des lunettes à LCD ) ou toute
  autre configuration particulière diminue d'autant la résolution
  maximale.



  66..1155..  QQuueelllleess ssoonntt lleess ttaaiilllleess ddee tteexxttuurree ddiissppoonniibblleess ??

  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
  système de coordonnées des textures en conséquence.


  66..1166..  LLee VVooooddoooo GGrraapphhiiccss ((ttmm)) ggèèrree--tt--iill lleess tteexxttuurreess ppaalleettttiissééeess ??

  Les composants Voodoo Graphics (tm) et Glide gèrent l'extension
  correspondante de OpenGL. La dernière version de Mesa comporte les
  extensions GL_EXT_paletted_texture et GL_EXT_shared_texture_palette.


  66..1177..  QQuu''eenn eesstt--iill dduu ddééppaasssseemmeenntt ddee ffrrééqquueennccee dd''hhoorrllooggee ??

  Mettant de côté les considérations relatives à la garantie et au
  risque de surchauffe, si vous voulez obtenir de meilleurs performances
  en augmentant la fréquence d'horloge, des informations sont
  disponibles sur le web. Le mécanisme consiste à modifier certaines
  variables d'environnement Glide.

  La fréquence d'horloge recommandée dépend de la carte. Si la fréquence
  d'horloge par défaut de la Diamond Monster 3D est de 50 MHz, son
  feuillet de spécifications vous laisse l'emmener à 57 MHz.  Tout
  dépend des divers composants utilisés et de la façon dont la carte a
  été conçue ( en particulier au niveau des temps d'accés à la mémoire
  ).  Si vous allez trop loin, des artefacts d'affichage feront leur
  apparition ( entre autre choses ). Une fréquence de 57 MHz reste en
  général admissible, ce qui est bien moins le cas du 60 MHz.

  L'augmentation de la fréquence d'horloge provoque un accroissement
  non-linéaire de l'énergie dissipée. Si vous augmentez de façon
  permanente la fréquence d'horloge, n'oubliez pas de revoir le
  mécanisme 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 périls.


  66..1188..  OOùù ppuuiiss--jjee ttrroouuvveerr dd''aauuttrreess iinnffoorrmmaattiioonnss ccoonncceerrnnaanntt llee VVooooddoooo
  GGrraapphhiiccss ((ttmm)) ??

  3Dfx a rédigé 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 renseignés : www.ve3d.com,
  www.ve3d.com.


  77..  FFAAQQ:: GGlliiddee?? TTeexxUUSS??

  77..11..  GGlliiddee,, qquuèèss aaccccoo ??

  Glide comprend une API propriétaire et des pilotes pour la gestion des
  accélérateurs graphiques 3D reposant sur les composants fabriqués par
  3Dfx. Glide est disponible pour DOS, Windows et Macintosh.  Daryll
  Strauss a effectué le portage Linux.


  77..22..  TTeexxUUSS,, qquuèèss aaccccoo ??

  La distribution comprend une bibliothèque libtexus.so ( 3Dfx
  Interactive Texture Utility Software ). Il s'agit d'une bibliothèque
  de fonctions utilitaires et de traitement de l'image qui met en forme
  les images avant leur traitement dans la bibliothèque 3Dfx Interactive
  Glide. Cette bibliothèque inclut des fonctions de conversion de
  formats de fichiers, la création de mipmap et la gestion des textures
  3Dfx compressées ( 3Dfx Interactive Narrow Channel Compression ).

  Le programme texus lit les images dans divers formats courants ( TGA,
  PPM, RGT ), génère 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 détails relatifs aux
  paramètres de texus et à l'API, reportez vous à la documentation
  TexUS.


  77..33..  GGlliiddee eesstt--iill uunn ffrreeeewwaarree??

  Non. Glide n'est pas en GPL ni couvert par une quelconque license du
  même type. Tous les détails se trouvent dans le fichier LICENSE de la
  distribution. Dans les faits, en téléchargeant 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
  propriété de 3Dfx.

  Il en est de même 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 !


  77..44..  OOùù ttrroouuvveerr GGlliiddee??

  Le SDK 3Dfx est téléchargeable via le web :
  www.3dfx.com/software/download_glide.html.  Tout ce qui a trait à 3Dfx
  et qui est publiquement accessible, se trouve généralement 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é découpés en trois ( environ 3 Mo pour chaque partie
  ).


  77..55..  LLeess ssoouurrcceess ddee GGlliiddee ssoonntt eelllleess ddiissppoonniibblleess ??

  Non. L'accès aux sources de Glide requiert la signature d'un NDA avec
  3Dfx.


  77..66..  QQuueell eesstt llee ssuuppppoorrtt ddee LLiinnuuxx GGlliiddee ??

  Actuellement, il n'y a pas de support pour Linux Glide.  La
  distribution est fournie dans les mêmes conditions que la DLL 3Dfx GL
  ( voir plus bas ).

  3Dfx souhaite cependant fournir le meilleur support possible et met en
  place les outils adéquats. 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.

  77..77..  OOùù ppuuiiss--jjee ppoosseerr ddeess qquueessttiioonnss aayyaanntt ttrraaiitt àà GGlliiddee ??

  Il existe des forums USENET fournis par 3Dfx : news.3dfx.com.  Ils
  sont dédiés à 3Dfx et à Glide de façon générale 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 différentes 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 spécifique à Linux Glide est en préparation
  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, accès aux archives, conseils de rédaction, etc ... ).


  77..88..  OOùù eennvvooyyeerr lleess nnoottiiffiiccaattiioonnss ddee bbuugg ??

  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
  spécifique à Linux Glide, postez dans les autres forums.


  77..99..  QQuuii aassssuurree llaa mmaaiinntteennaannccee ddee LLiinnuuxx GGlliiddee ??

  3Dfx nommera bientôt 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 adéquat (
  cf ci-dessus ). Si vous êtes persuadé d'avoir identifié un bug non-
  repertorié, écrivez à Daryll : daryll@harlot.rb.ca.us


  77..1100..  CCoommmmeenntt ppuuiiss--jjee ccoonnttrriibbuueerr àà LLiinnuuxx GGlliiddee??

  Vous pouvez décrire de façon précise les bugs que vous remarquez.  Il
  est également possible de fournir un programme d'exemple pour la
  distribution. L'amélioration des sources du pilote Mesa Voodoo basé
  sur Glide serait la bienvenue. Reportez vous à la section sur Mesa
  Voodoo plus bas.



  77..1111..  DDooiiss--jjee nnéécceessssaaiirreemmeenntt aavvooiirr rreeccoouurrss àà GGlliiddee ??

  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
  matériel. Vous pouvez néanmoins écrire du code OpenGL sans rien
  connaître à 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.


  77..1122..  DDooiiss--jjee pprrooggrraammmmeerr aavveecc ll''AAPPII GGlliiddee ??

  Tout dépend de l'application. Glide est une API propriétaire.  Elle
  reste certes voisine d'OpenGL ou de Mesa, mais elle contient quand
  même certaines fonctionnalités 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 dernière étant assez
  répandue et plutôt bien documentée. Le pilote Mesa Voodoo est
  cependant en phase alpha et il vous faudra accepter des performances
  parfois limitées ainsi que l'absence de certaines fonctionnalités.

  En résumé, le choix vous appartient. Si vous voulez les meilleurs
  performances au prix d'éventuelles difficultés 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.


  77..1133..  QQuueellllee eesstt llaa vveerrssiioonn ccoouurraannttee ddee GGlliiddee ??

  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
  différentes pour les cartes Voodoo Rush (tm) ( VR ) et Voodoo Graphics
  (tm) ( VG ). Sous Windows, vous devez donc récupérer la distribution
  correspondante. Il en sera de même 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
  gérera les optimisations de changement d'état. La gestion des
  éventails et des rubans diminuera notablement dans certains cas la
  quantité de données transmise par triangle. Le pilote Mesa en
  bénéficiera puisque l'API OpenGL dispose de modes spécifiques de ce
  type. Pour des explications plus détaillées, consultez la
  documentation OpenGL.


  77..1144..  QQuu''eenn eesstt--iill ddee llaa ggeessttiioonn ddee pplluussiieeuurrss TTeexxeellffxx ??

  Des Texelfx ( ou TMU ) multiples peuvent 2 employés lors d'un filtrage
  tri-linéaire ( de type mipmap ) avec Linux Glide.  La qualité de
  l'image est améliorée 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 réclamer l'utilisation des deux
  Texelfx. Il n'y a rien d'automatique.

  Notez dès à présent 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 présence 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.



  77..1155..  LLiinnuuxx GGlliiddee eesstt iill sseemmbbllaabbllee àà GGlliiddee ppoouurr DDOOSS//WWiinnddoowwss ??

  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 après celles pour DOS/Windows.



  77..1166..  OOùù ttrroouuvveerr ddeess iinnffoorrmmaattiioonnss ssuurr GGlliiddee??

  3Dfx fournit des informations exhaustives. Vous pouvez les télécharger
  via leur site web : www.3dfx.com/software/download_glide.html.  Ces
  informations sont disponibles gratuitement dès 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 intéresser 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 téléchargeables : www.3dfx.com.  Notez que les numéros de
     version ne correspondent pas toujours à ceux de Glide.


  77..1177..  OOùù ttrroouuvveerr ddeess ddéémmooss GGlliiddee ??

  Vous trouverez des sources de démos pour Glide parmi les programmes de
  test de la distribution et sur le site de 3Dfx.  Certaines parmi ces
  dernières nécessitent ATB : le portage impliquerait la réécriture du
  gestionnaire d'évènements.

  En outre, vous trouverez sûrement des choses intéressantes dans les
  sources des démos OpenGL qui accompagnent Mesa et GLUT. Bien que les
  API Glide et OpenGL diffèrent, elles se destinent à des matériels dont
  les organisations sont voisines.



  77..1188..  QQuu''eesstt--ccee qquu''AATTBB??

  Certaines des démos 3Dfx pour Glide ne reposent pas seulement sur
  Glide mais également sur la boite à outils pour l'arcade 3Dfx ( ATB ou
  Arcade ToolBox ). Cette dernière existe sous DOS et Win32 mais n'a pas
  encore été portée sous Linux. Si vous êtes un développeur dans l'âme,
  les sources sont disponibles dans le cadre du programme "Total
  Immersion". Le portage devrait donc être possible.



  88..  FFAAQQ:: GGlliiddee eett XXFFrreeee8866 ??


  88..11..  GGlliiddee ffoonnccttiioonnnnee--tt--iill aavveecc XXFFrreeee8866 ??

  En fait, les périphériques Voodoo Graphics (tm) ne se préoccupent pas
  de X.  Le serveur X ne remarque d'ailleurs même pas que le signal
  vidéo issu du matériel 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 difficultés ( cf la section de résolution
  des problèmes ). Pour éviter le surcroît de code chargé d'assurer la
  cohabitation avec X, utilisez plutôt la console SVGA.

  Pour résumer, la bonne entente avec XFree86 est possible pour autant
  que vous vous en occupiez. Vous pouvez avoir recours au "hack de
  fenêtre" Mesa. Il est plus lent que le mode plein écran mais reste
  plus rapide qu'un rendu purement logiciel ( cf la section suivante ).



  88..22..  DDooiitt--oonn ssee ccaannttoonnnneerr aauu pplleeiinn ééccrraann ??

  Les périphériques Voodoo Graphics (tm) ne se soucient guère de modes
  d'opération fenêtrés. Il en est de même de Linux Glide.  Le hack Mesa
  à venir permet cependant de copier le contenu du tampon de mémoire
  vidéo d'une carte Voodoo Graphics (tm) dans une fenêtre X11.



  88..33..  QQuueell eesstt llee pprroobbllèèmmee ddeess ccaarrtteess AATT33DD//VVooooddoooo RRuusshh ((ttmm)) ??

  Le problème est inhérent à l'utilisation des cartes Voodoo Rush (tm)
  sous Linux. A la base, elles sont censées jouer un rôle de cartes
  accélératrices VGA 2D/3D, que ce soit seules ou en tant que cartes
  filles. Le composant VGA lié au Voodoo Rush (tm) est un accélérateur
  multimédia 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 présent dans la version 4.0 de la
  XFree86. XFree86 s'est décidé à mettre au point une distribution
  intermédiaire, la 3.3.2, qui pourrait très bien résoudre le problème.

  La configuration suivante du XF86Config est censée fonctionner :

  ______________________________________________________________________
  # device section settings
  Chipset "AT24"
  Videoram 4032

  # modes vidéos testés 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, même si les pilotes XFree86 ne sont pas encore ter­
  minés, il n'y a rien de rédhibitoire.

  Voici un peu plus de précisions techniques : la gestion du Voodoo Rush
  (tm) exige de la part du serveur X la capacité d'accéder à une zone
  dans la mémoire vidéo de la carte AT3D tandis que le Voodoo Rush (tm)
  a également besoin de cette mémoire pour stocker son second buffer et
  celui du calcul de profondeur.  Le besoin d'allocation et de
  vérouillage de la mémoire n'est pas spécifique aux composants 3Dfx. On
  le rencontre également dans la gestion des cartes TV capables de
  saisir l'image. Les développements XFree86 sont actifs dans ce
  domaine. Cela implique des changements au niveau où X est lié au
  matériel ( XAA ), changements qui sont à lors actuel mis en oeuvre via
  l'extension XFree86 DGA ( Direct Graphics Access ) aux spécifications
  X11R6.1. L'extension fera peut-être partie d'une réalisation GLX
  d'XFree86. Les serveurs X actuels agissent comme s'ils étaient les
  seuls à accéder au tampon de mémoire vidéo et affectent tout ce qui
  n'est pas directement utilisé pour l'affichage au stockage de pixmaps
  ( typiquement pour les fontes ).


  88..44..  QQuu''eenn eesstt--iill ddee GGLLXX ppoouurr XXFFrreeee8866 ??

  Il y a quelques difficultés.

  Les périphériques Voodoo Graphics (tm) gérés par la version actuelle
  de Linux Glide ne fonctionnent qu'en plein écran et ne sont pas prévus
  pour partager leur tampon de mémoire vidéo dans un environnement
  multi-fenêtres. GLX, ou toute autre intégration avec X11, n'est donc
  pas encore réalisable.

  Le Voodoo Rush (tm) devrait accepter de coopérer avec XFree86 : une
  carte conforme aux spécifications SVGA fonctionnera avec le serveur
  SVGA XFree86. Cependant, Linux Glide ne supporte pas encore ce
  composant. Il en est de même 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'intégration de
  Mesa avec leurs serveurs X. GLX est en bêta et les points d'ancrage
  sont présents 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 réalisation d'un GLX. Cf :
  www.suse.de/~sim/.  Pour l'instant, Mesa émule toujours de façon
  logicielle GLX avec Linux.



  88..55..  GGlliiddee eett lleess sseerrvveeuurrss XX ccoommmmeerrcciiaauuxx ??

  Je n'ai reçu aucun courrier ayant trait à l'utilisation de Glide et/ou
  de Mesa avec des serveurs X commerciaux. Je suis intéressé par toute
  information sur le sujet, notamment s'il existe un serveur X
  commercial offrant GLX.



  88..66..  GGlliiddee eett SSVVGGAA ??

  Vous ne devriez pas rencontrer de problèmes avec des applications
  Glide à un ou deux écrans dans les modes d'affichage VGA. Il peut
  également s'avérer intéressant d'activer une résolution de 640 par 480
  parmi les modes SVGA si vous travaillez avec un seul écran.


  88..77..  GGlliiddee eett GGGGII ??

  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 résisterez 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 accélération. Pour tout résumer, cela
  signifie que X11R6 est disponible sur Voodoo Graphics (tm) grâce à
  Mesa ou à Glide.



  99..  FFAAQQ:: OOppeennGGLL//MMeessaa ??

  99..11..  QQuu''eesstt ccee qquu''OOppeennGGLL ??

  OpenGL est une API pour le graphisme de niveau intermédiaire
  développée par SGI à partir de leur interface précédente Iris GL.
  OpenGL est devenu un standard il y a de ça quelques années. 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 matériel accélérateur muni d'une
  architecture en pipeline. De façon plus générale, OpenGL forme un
  ensemble d'outils puissant pour le graphisme accéléré sur ordinateur.


  99..22..  OOùù ttrroouuvveerr ddaavvaannttaaggee dd''iinnffoorrmmaattiioonnss ssuurr OOppeennGGLL ??

  Le site officiel d'OpenGL, administré par les membres de l'ARB :
  www.opengl.org,

  On préférera 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 démos et des
  outils.

  Si le développement 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 débit est très élevé. Vous recourerez sûrement à
  procmail pour ventiler la centaine de messages quotidiens qui en
  provient.  Pour réduire le besoin en bande passante, servez vous de la
  commande SET OpenGL-GameDev-L DIGEST. Cette liste est inappropriée 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 idée avant de
  souscrire.



  99..33..  IIGGlliiddee mmeett--iill eenn ooeeuuvvrree OOppeennGGLL ??

  Non. Glide est une API propriétaire de 3Dfx dont plusieurs fonctions
  sont spécifiques aux composants Voodoo Graphics (tm) et Voodoo Rush
  (tm).  Une librairie OpenGL 3Dfx est en cours de réalisation ( voyez
  plus bas ). Diverses fonctionnalités Glide nécessiteraient des
  extensions à OpenGL, certaines étant déjà disponibles par ailleurs (
  les textures palettisées 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 accélérée grâce à des périphériques particuliers ( voyez plus
  bas ).



  99..44..  EExxiissttee--tt--iill uunn ppiilloottee OOppeennGGLL ppoouurr 33DDffxx ??

  Les sites web de 3Dfx et de Quantum3D annoncent une version d'OpenGL
  pour Voodoo Graphics (tm) en fin d'année 1997. Le pilote est
  actuellement en bêta et seuls peuvent y accéder les développeurs ayant
  souscrit à un accord de bêta-test spécifique.


  Aucun portage vers Linux n'a encore été annoncé pour l'instant.


  99..55..  EExxiissttee--tt--iill uunnee vveerrssiioonn ccoommmmeerrcciiaallee dd''OOppeennGGLL ppoouurr LLiinnuuxx eett 33DDffxx
  ??

  Je n'ai entendu parler de rien de tel. La dernière fois que je m'y
  suis intéressé, ni MetroX, ni XInside ne proposaient OpenGL.


  99..66..  QQuu''eesstt--ccee qquuee MMeessaa ??

  Mesa constitue une réalisation 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
  certifiée de façon officielle, sa conformité aux spécifications de
  l'ARB la rend, sinon parfaitement compatible avec OpenGL, du moins
  plus complète que bon nombre de produits commerciaux.



  99..77..  MMeessaa ffoonnccttiioonnnnee--tt--eellllee aavveecc 33DDffxx ??

  La dernière 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 développement. Attendez vous donc à des bugs et des
  performances éloignées de l'optimum.  Les progrès sont cependant
  permanents et les correctifs aux bugs viennent souvent assez vite.

  Il vous faudra l'archive de la bibliothèque Mesa : iris.ssec.wisc.edu
  FTP site.  Il est également conseillé de s'abonner à la liste de
  diffusion, notamment pour débusquer les bugs ou les limitations du
  pilote.  Vérifiez que vous disposez bien de la version la plus
  récente.  Mesa 3.0 est en préparation.


  99..88..  QQuu''eenn eesstt--iill ddee llaa ppoorrttaabbiilliittéé ddee MMeessaa ppoouurr GGlliiddee??

  Mesa est disponible pour Linux et Win32. Une application qui s'appuie
  sur Mesa ne devrait être spécifique qu'en ce qui concerne le code lié
  au système. 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 spécificités dues au système 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 dernière version, reportez vous à :
  www.geocities.com/~charlie_x/.


  99..99..  OOùù ttrroouuvveerr ddeess iinnffoorrmmaattiioonnss ssuurr MMeessaa ??

  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 dédiée à 3Dfx ni à Glide mais il s'agit d'un
  bon point de départ si le recours au matériel 3Dfx pour accélérer Mesa
  vous intéresse.


  99..1100..  OOùù ttrroouuvveerr ddeess iinnffoorrmmaattiioonnss ssuurr MMeessaa VVooooddoooo ??

  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/.




  99..1111..  MMeessaa ggèèrree--tt--iill llee tteexxttuurraaggee mmuullttiippllee ??

  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 achevée.  Il n'y a pas de
  spécifications figées pour le texturage multiple dans OpenGL. La
  version 1.2 d'OpenGL est censée préciser les choses.  Les prochaines
  versions de Mesa incluront peut être une mise en oeuvre spécifique au
  pilote Glide mais ceci ne sera pas une priorité tant qu'il ne se
  trouvera que quelques cartes Obsidian Quantum3D à intégrer plusieurs
  TMU. La banalisation des cartes Voodoo 2 (tm) changera certainement la
  donne.


  99..1122..  MMeessaa ssuuppppoorrttee--tt--eellllee llee ffiillttrraaggee ttrrii--lliinnééaaiirree eenn uunnee sseeuullee
  ééttaappee ??

  Linux Glide gère cette opération mais ce n'est pas le cas de Mesa ( au
  moins jusqu'à la version 2.6 ). Le développement est en cours.


  99..1133..  QQuu''eesstt--ccee qquuee llee hhaacckk MMeessaa (( ""WWiinnddooww HHaacckk"" )) ??

  La dernière version de Mesa incorpore une fonctionnalité expérimentale
  pour XFree86 sous Linux. L'émulation GLX de Mesa copie le dernier
  tampon de mémoire vidéo mis à jour depuis la carte Voodoo Graphics
  (tm) vers la mémoire vidéo pour chaque appel à la fonction
  glXSwapBuffers. Mesa offre également cette possibilité sous Windows.

  Il en résulte bien sûr une charge assez importante au niveau du bus
  PCI, et ce d'autant plus que le mécanisme utilise l'extension SHM du
  MIT à X11 et non pas le DGA XFree86 lors des accès à la mémoire vidéo.
  On pourrait théoriquement employer la même technique avec SVGA par
  exemple. Le calcul du rendu limité à une fenêtre peut donc tirer
  pleinement parti de la présence d'une carte Voodoo Graphics (tm). De
  plus, on évite l'intermédiation VGA qui dégrade le signal vidéo ( les
  moniteurs haut de gamme tels le EIZO F784-T l'illustrent très bien ).

  Notez que cette fonctionnalité expérimentale 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 nécessaire d'utiliser une version
  modifiée de GLUT puisque la gestion des évènements et la cohabitation
  avec le gestionnaire de fenêtres sont alors du ressort de
  l'application ( et non du pilote ! ).

  Vérifiez 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 désactivée
  et l'affichage disparaîtra. X restera cependant toujours actif et vous
  risquez d'éprouver certaines difficultés pour revenir en aveugle à une
  situation normale.

  Pour clore le sujet, on remarquera que la bibliothèque libMesaGL.a (
  ou celle en .so ) est susceptible de contenir les fonctions
  d'interfaçage pour différents clients. Ainsi les fonctions GLX, OSMesa
  et fxMesa ( voir même SVGAMesa ) peuvent être compilées au sein d'une
  unique bibliothèque libMesaGL.a.  Un programme client attentif saura
  les appeler simultanément.



  99..1144..  QQuu''eenn eesstt--iill ddee GGLLUUTT ??

  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 dernière
  version est GLUT 3.6 et les discussions ont commencé pour GLUT 3.7 (
  alias GameGLUT ). Mark Kilgard ayant récemment quitté SGI, il est
  possible que l'archive se déplace en cours d'année; pour l'instant
  elle reste en place sur le site de SGI.

  Il existe une liste de diffusion spécifique à GLUT : glut@perp.com.
  Envoyez à majordomo@perp.com le message suivant :

  ______________________________________________________________________
     help
     info glut
     subscribe glut
     end
  ______________________________________________________________________



  GLUT gérant le dédoublement des tampons de mémoire, le fenêtrage, les
  évènements et d'autres opérations fortement liées au matériel et au
  système d'exploitation, la cohabitation de GLUT avec Voodoo Graphics
  (tm) nécessite un support qui est encore en cours de développement au
  niveau de GLX pour Mesa. La plupart des situations sont déjà prises en
  compte.



  1100..  FFAAQQ:: QQuuaakkee ??

  1100..11..  OOùù eenn eesstt llee ppiilloottee 33DDffxx GGLL ppoouurr QQuuaakkee ??

  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 acceptés ).  Quake GL n'est maintenu par
  personne et ne bénéficie d'aucun support. A l'origine il s'agissait
  d'une DLL Win32 ( opengl32.dll ) fournie par 3Dfx.  Cette DLL n'a pas
  été portée sous Linux et il n'est pas prévu qu'elle le soit un jour.


  1100..22..  EExxiissttee--tt--iill uunnee vveerrssiioonn LLiinnuuxx ddee 33DDffxx ggllQQuuaakkee ??

  Oui. Les binaires de linuxquake v0.97 supportent Mesa et Glide.
  L'exécutable 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 complète 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 bénéficie du support
  officiel de la part d'Id Software.

  Pour les dernières versions : ftp.idsoftware.com/idstuff/quake/unix/.



  1100..33..  ggllQQuuaakkee ffoonnccttiioonnnnee--tt--iill ddaannss uunnee ffeennêêttrree XXFFrreeee8866 ??

  Une mise à jour de Mesa et de la version associée de glQuake pour
  Linux est en cours. Mesa supporte le fenêtrage via GLX mais glQuake
  pour Linux n'a pas recours à GLX.


  1100..44..  CCoommmmeenntt rrééiinniittiiaalliisseerr ll''aaffffiicchhaaggee aapprrèèss uunn ppllaannttaaggee ddee ggllQQuuaakkee
  ??

  Essayez d'utiliser le programme pass fourni avec la distribution
  Glide. Tout ce qu'il fait consiste à activer puis désactiver la carte.
  Si la carte dialogue bien avec la machine, ceci devrait la
  réinitialiser (la carte :)). Si la carte est belle et bien bloquée,
  ceci ne fonctionnera pas et un redémarrage est à envisager.


  1100..55..  DDeess pprroobbllèèmmeess aavveecc QQuuaakkee ppoouurr LLiinnuuxx ??

  Voici une liste, à jour au 7 janvier 1998, des problèmes éventuels.
  Est absent tout ce qui n'a pas trait au matériel 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 nécessaire
     sous X11 mais les périphériques liés à 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 façon assez lent.

  ·  On signale divers plantages en cas de rendu via GL. Vérifiez que
     vous avez bien installé la bibliothèque 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 fréquence de rafraîchissement ne suit pas les
     déplacements de votre souris, tapez "gl_finish 1" dans la console.
     Vous forcez ainsi la mise à jour en fonction du défilement des
     images.

  ·  Vérifiez que gpm ou tout autre sélection sont désactivés quand le
     moteur de rendu GL est en action ou alors la souris sera
     inutilisable lorsque Quake2 fonctionne avec GL.


  1100..66..  LLeess ttrroouuss ddee ssééccuurriittéé ddee QQuuaakkee ppoouurr LLiinnuuxx

  Ainsi que Dave Kirsch l'a signalé le 28 janvier 1998, Quake2 pour
  Linux présente un trou de sécurité. Même si le README ne le mentionne
  pas particulièrement, Quake2 ne doit pas être setuid.

  Si vous désirez employer les routines de rendu ref_soft et ref_gl, il
  vous faudra exécuter Quake2 sous l'identité root. N'activez pas le
  droit attribuant les privilèges de super utilisateur à toute
  invocation du programme !

  Le rendu sous X11 ne requiert pas les privilèges root ( dès 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 exigés par certains jeux est récurrente à
  Linux depuis plusieurs années. Entre autre objectifs, le projet GGI
  tente de résoudre ce problème. L'avenir devrait apporter un ref_ggi.

  1100..77..  LLiinnuuxxqquuaakkee ssuuppppoorrttee--tt--iill llee tteexxttuurraaggee mmuullttiippllee ??

  glQuake offrira vraisemblablement une telle extension dès lors que le
  pilote OpenGL impliqué l'autorisera. Pour l'instant, Mesa et le pilote
  Glide pour Linux ne gèrent pas cette extension. Le texturage multiple
  n'est donc pas disponible. Reportez vous à la section sur Mesa et le
  texturage multiple pour davantage de détails.


  1100..88..  OOùù ttrroouuvveerr ddeess iinnffoorrmmaattiioonnss àà jjoouurr ssuurr ggllQQuuaakkee ppoouurr LLiinnuuxx ??

  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 données "SlipgateCentral" pour trouver des sites Quake Linux :
  www.slipgatecentral.com.




  1111..  FFAAQQ:: ssoolluuttiioonnss aauuxx pprroobbllèèmmeess ccoouurraannttss ??

  1111..11..  CCeettttee ccaarrttee aa--tt--eellllee ééttéé tteessttééee ??

  Une liste suit. Je ne dispose pas d'une liste achevée de vendeurs et
  de cartes vu que l'on n'a pas mis en évidence de difficultés liées à
  une carte spécifique. Pour l'instant, seuls 3Dfx et Quantum3D ont
  procuré des cartes aux développeurs afin que ceux-ci les testent.  Les
  cartes Quantum3D s'avèrent donc un choix raisonnable. Toutes les
  autres cartes à base de composants Voodoo Graphics (tm) sont censées
  fonctionner.  Ont été signalées 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 requête aux personnes ayant la charge des pilotes
  concernés.  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


  1111..22..  ÉÉcchheecc lloorrss dduu cchhaannggeemmeenntt ddeess pprriivviillèèggeess dd''eennttrrééeess//ssoorrttiieess ??

  Il faut que vous soyez root ou bien que l'identité associée à votre
  application puisse être telle ( cf  setuid  ). Le pilote se sert du
  périphérique /dev/mem pour les transferts DMA. Ce n'est pas sans
  raisons que seul root en bénéficie du droit d'accés.  Reportez vous au
  README dans la distribution de Glide pour Linux.


  1111..33..  UUnn ffoonnccttiioonnnneemmeenntt ssaannss lleess ddrrooiittss rroooott eesstt--iill ppoossssiibbllee ??

  Non. Des solutions de remplacement sont en cours de réalisation.


  1111..44..  LL''aaffffiicchhaaggee eesstt ddéépplloorraabbllee !!

  Si votre configuration nécessite un intermédiaire VGA analogique, la
  qualité d'affichage avec SVGA ou X11 peut s'avérer décevante.  Essayez
  donc un autre câble. Ceux qui accompagnent la Monster 3D de Diamond
  sont notoirement plus mauvais que ceux livrés avec la Righteous 3D
  d'Orchid. Quoi qu'il en soit, il y aura toujours une dégradation
  résiduelle.
  Si la carte accélératrice délivre une image médiocre en 640 par 480 en
  plein écran, un problème matériel est envisageable.  Contactez le
  fabricant de la carte ( pas 3Dfx ! ) puisque la qualité du signal
  vidéo, indépendamment du circuit accélérateur, dépend du choix de la
  RAMDAC et des composants de sortie.


  1111..55..  LLaa ddeerrnniièèrree iimmaaggee nnee ddiissppaarraaîîtt ppaass !!

  Vous avez quitté votre application via Ctrl-C ou d'une autre façon
  brutale. La carte accélératrice conserve le contenu de son tampon de
  mémoire vidéo comme source du signal vidéo tant qu'on ne lui demande
  pas explicitement d'arrêter.



  1111..66..  LL''ééccoonnoommiisseeuurr dd''ééccrraann ssee ddéécclleenncchhee (( ddeeuuxx ééccrraannss )) ??

  Lorsqu'une application s'achève dans une configuration à deux écrans,
  la carte accélératrice ne fournit plus de signal vidéo et
  l'économiseur se déclenche. Pour éviter ça :

  ______________________________________________________________________
  setenv SST_DUALSCREEN 1
  ______________________________________________________________________





  1111..77..  MMoonn oorrddiinnaatteeuurr sseemmbbllee ssee bbllooqquueerr (( XX1111,, uunn sseeuull ééccrraann )) !!

  Si X fonctionne en même temps qu'une application Glide, la souris se
  retrouve surement à pointer hors de la fenêtre. Les évènements clavier
  n'atteignent donc plus l'application.

  Si votre programme concurrence X11, il est conseillé d'installer une
  fenêtre plein écran ou de se servir des fonctions XGrabPointer et
  XGrabServer tandis que le serveur X est désactivé. Notez que le
  recours à XGrabPointer et à XGrabServer ne qualifie pas une
  application comme particulièrement propre à l'égard de X; le système
  pourrait ainsi se retrouver bloqué.

  Si vous rencontrez ce problème alors que X n'est pas lancé, vérifiez
  qu'il n'y a pas de conflit matériel ( voir ci-dessous ).


  1111..88..  MMaa mmaacchhiinnee ssee bbllooqquuee (( uunn oouu ddeeuuxx ééccrraannss )) ??

  Si le système ne répond plus et que la perte de focus est à exclure,
  un conflit matériel plus ou moins subtil est à envisager. Reportez
  vous au paragraphe traitant des problèmes d'installation pour plus de
  détails.

  Les difficultés ne se limitent pas aux conflits d'adresses ( cf ci-
  dessous ).  Si vous écrivez vous même vos applications, oublier de
  fermer ses sommets est une cause courante de blocage. Reportez vous à
  la section "snapping" de la documentation Glide.


  1111..99..  MMaa mmaacchhiinnee ssee bbllooqquuee (( aavveecc uunnee ccaarrttee SS33 )) ??

  Il existe un problème de recouvrement de zones mémoires spécifique aux
  cartes S3. Le site web 3Dfx contient des informations et un patch au
  problème suscité mais seul Windows est concerné.  Certaines cartes S3,
  typiquement les Diamond Stealth S3 968 les plus anciennes, réservent
  davantage de mémoire 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 *spécificité* Windows ?


  1111..1100..  PPaass ddee ccoonnfflliitt dd''aaddrreessssee mmaaiiss llaa mmaacchhiinnee ssee bbllooqquuee qquuaanndd mmêêmmee
  !!

  Peut-être avez vous une carte qui ne gère pas le PCI de façon tout à
  fait standard. L'ASUS TP4XE possède à cet égard un connecteur dit
  "Media Slot" c'est-à-dire un connecteur PCI non standard qui étend ce
  dernier de façon à accueillir certaines cartes ASUS combinant des
  fonctions son et SCSI. L'auteur de ce document a éprouvé de sérieuses
  difficultés avec une Monster 3D de chez Diamond à laquelle il avait
  affecté ce connecteur. Le déplacement de la carte vers un connecteur
  PCI standard a supprimé tous les dysfonctionnements.  NdT: si le bios
  de votre carte ASUS comprend quelque chose suggérant un vague couplage
  des connecteurs PCI 3 et 4, lisez le manuel et essayez d'autre options
  sans quoi vous risquez des problèmes dès qu'une carte quelconque
  occupera le connecteur maudit !


  1111..1111..  MMeessaa eesstt aaccttiiff mmaaiiss nn''aaccccèèddee ppaass àà llaa ccaarrttee !!

  Vérifiez que vous avez bien recompilé toutes les bibliothèques,
  notamment les paquetages requis par les démos. N'oubliez pas que GLUT
  ne gère pas encore le Voodoo Graphics (tm). Vérifiez que vous avez
  supprimé les anciennes bibliothèques, 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 simultanément 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 défaut.



  1111..1122..  RRééiinniittiiaalliisseerr uunnee ccaarrttee SSLLII (( ccoonnffiigguurraattiioonn àà ddeeuuxx ccaarrtteess )) ??

  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 réinitialiser les cartes. Tant que vous ne l'aurez
  pas appelé, la réinitialisation des cartes Obsidian restera
  impossible.



  1111..1133..  RRééiinniittiiaalliisseerr uunnee ccaarrttee SSLLII (( ccoonnffiigguurraattiioonn àà uunnee sseeuullee ccaarrttee
  )) ??

  Le programme resetsli susmentionné reste sans effet sur une carte
  Obsidian SLI ( à savoir la 100-4440SB ). Rebootez en appuyant sur le
  bouton reset pour réinitialiser complètement la carte.













  Linux AX.25-HOWTO, Amateur Radio.
  Terry Dawson, VK2KTJ, terry@perf.no.itg.telstra.com.au,
  traduit par François Romieu,  <romieu@ensta.fr>
  v1.5, 17 Octobre 1997

  Le système d'exploitation Linux est sûrement le seul au monde à pou­
  voir se vanter d'offrir un support natif du protocole de transmission
  de données AX.25 employé par les radioamateurs à travers le monde. Le
  présent document se veut un guide d'installation et de configuration
  de cette prise en charge.
  ______________________________________________________________________

  Table des matières





















































  1.  Introduction. Le document trouve son origine dans une annexe du HAM-HOWTO. L'importance de son développement devint cependant incompatible avec une telle organisation. L'installation et la prise en charge intégrée d'AX.25, la gestion NetRom et Rose sous Linux sont décrites. Quelques exemples de configurations typiques fournissent une base de travail.

     1.1  Modifications par rapport à la version précédente
     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  Récupération du noyau, des outils et utilitaires
        3.1.1  Sources du noyau
        3.1.2  Les outils réseau
        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 patchés et les 2.1.y ?
     4.2  Les outils de configuration du réseau
        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.  Numéros d'identification, adresses et préliminaires divers

     5.1  Que sont les T1, T2, N2 ?
     5.2  Paramètres configurables dynamiquement

  6.  Configuration d'un port AX.25

     6.1  Création des périphériques AX.25
        6.1.1  Création des périphériques KISS
           6.1.1.1  Configuration des TNC Dual Port
        6.1.2  Création d'un périphérique Baycom
        6.1.3  Configuration des paramètres d'accès au canal AX.25
           6.1.3.1  Configuration d'AX.25 avec le pilote BayCom
        6.1.4  Création d'un périphérique modem-son
           6.1.4.1  Configuration de la carte son
           6.1.4.2  Configuration des périphériques modem-son
           6.1.4.3  Configuration des paramètres d'accès 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  Création d'un périphérique à base de carte PI
        6.1.6  Création d'un périphérique PacketTwin
        6.1.7  Création d'un périphérique SCC générique
           6.1.7.1  Récupération et compilation des outils de configuration
           6.1.7.2  Configurer le pilote pour sa carte
              6.1.7.2.1  Configuration des paramètres matériels
           6.1.7.3  Configuration du canal
           6.1.7.4  Utilisation du pilote
           6.1.7.5 Les outils
        6.1.8  Création d'un périphérique 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  Création des périphériques réseau NetRom
     8.4  Lancement du démon NetRom
     8.5  Routage NetRom

  9.  TCP/IP sur une interface NetRom

  10.  Configuration des ports Rose

     10.1  Le fichier
     10.2  Création des périphériques réseau 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  Exécution de
     13.4  Exécution 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.  Entrées du système de fichier

  20.  Programmation réseau AX.25, NetRom, Rose

     20.1  Familles d'adresses
     20.2  Fichiers d'en-tête
     20.3  Mise en forme des identifiants et exemples

  21.  Quelques configurations-types

     21.1  Un petit réseau Ethernet local avec un routeur Linux vers un réseau 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  Exécuter
        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 matériel

  23.  Groupes de discussion radioamateurs et Linux

  24.  Remerciements

  25.  Copyright.



  ______________________________________________________________________

  11..  LLee ddooccuummeenntt ttrroouuvvee ssoonn oorriiggiinnee ddaannss uunnee aannnneexxee dduu HHAAMM--HHOOWWTTOO..
  LL''iimmppoorrttaannccee ddee ssoonn ddéévveellooppppeemmeenntt ddeevviinntt cceeppeennddaanntt iinnccoommppaattiibbllee aavveecc
  uunnee tteellllee oorrggaanniissaattiioonn.. LL''iinnssttaallllaattiioonn eett llaa pprriissee eenn cchhaarrggee iinnttééggrrééee
  dd''AAXX..2255,, llaa ggeessttiioonn NNeettRRoomm eett RRoossee ssoouuss LLiinnuuxx ssoonntt ddééccrriitteess.. QQuueellqquueess
  eexxeemmpplleess ddee ccoonnffiigguurraattiioonnss ttyyppiiqquueess ffoouurrnniisssseenntt uunnee bbaassee ddee ttrraavvaaiill..
  IInnttrroodduuccttiioonn..

  La mise en oeuvre des protocoles radioamateurs sous Linux est très
  souple.  Les personnes peu familières du système d'exploitation Linux
  trouveront peut-être la configuration un peu obscure. Il vous faudra
  un certain temps pour maîtriser l'interaction des différents éléments.
  Attendez-vous à une configuration pénible si vous ne vous êtes pas
  auparavant familiarisé avec Linux. N'espérez pas passer à Linux depuis
  un autre environnement en faisant l'économie de tout apprentissage.


  11..11..  MMooddiiffiiccaattiioonnss ppaarr rraappppoorrtt àà llaa vveerrssiioonn pprrééccééddeennttee


  Ajouts:
          Page ouaibe de Joerg Reuters
          Section "Informations supplémentaires"
          configuration d'ax25ipd.

  Corrections/Mises à jour:
          Prévention des conflits dus aux pty
          Nouvelles versions du module et des ax25-utils

  A faire:
          Mettre au point la section SCC qui est sûrement erronée
          Étoffer la section touchant à la programmation





  11..22..  NNoouuvveelllleess vveerrssiioonnss dduu ddooccuummeenntt

  Les archives du Projet de Documentation Linux (LDP ou Linux
  Documentation Project) constituent le meilleur emplacement où trouver
  la dernière 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 différents formats à l'adresse suivante : archive ftp
  sunsite.unc.edu <ftp://sunsite.unc.edu/pub/Linux/docs/howto/>.  La
  version française 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 sûrement que je ne l'ai pas terminée.


  11..33..  AAuuttrreess ddooccuummeennttss

  La documentation sur les sujets apparentés ne manque pas. Bon nombre
  de textes traitent de l'utilisation générale de Linux en réseau 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 générales sur Linux sont disponibles : Linux
  HOWTO <http://sunsite.unc.edu/LDP/HOWTO/>


  22..  LLeess pprroottooccoolleess ddee ppaaqquueettss ppaarr rraaddiioo eett LLiinnuuxx

  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 réseau
  complet.  Il repose sur AX.25 au niveau liaison de données et procure
  une couche réseau dérivée d'AX.25. Le protocole NetRom autorise le
  routage dynamique et la création d'alias pour les noeuds.

  Le protocole Rose a été initialement conçu et réalisé par Tom Moulton
  alias W2VY. Il constitue une mise en oeuvre du protocole par paquets
  X25 et peut inter-opérer avec AX.25 au niveau liaison. Il fournit des
  services de couche réseau. Les adresses Roses comportent 10 digits.
  Les quatre premiers constituent le code d'identification du réseau de
  données (DNIC ou Data Network Identification Code) et sont référencés
  dans l'Appendice B de la recommandation X121 du CCITT. Des
  informations supplémentaires sur le protocole Rose sont disponibles
  sur le site suivant : Serveur Web RATS <http://www.rats.org/>.

  Alan Cox a créé les toutes premières versions de support noyau pour
  AX.25.  Jonathon Naylor <g4klx@g4klx.demon.co.uk> a poursuivi le
  développement, ajouté la gestion de NetRom et de Rose et assure à
  présent 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 matériels Baycom et SoundModem. J'assure pour ma part le
  suivi des utilitaires AX.25.

  Linux gère les TNC (Terminal Node Controllers) KISS, les cartes Ottawa
  PI, les PacketTwin Gracilis et autres cartes à base de SCC Z8530 via
  le pilote SCC générique ainsi que les modems sur ports série et
  parallèle 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 récupération 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 gère les demandes de connexions AX.25 et un démon
  qui se charge de l'essentiel du travail pour le protocole NetRom.


  22..11..  FFoonnccttiioonnnneemmeenntt

  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 configurée pour se comporter de façon voisine
  aux autres mais le processus n'en reste pas moins radicalement
  différent.

  Pour vous aider à comprendre la démarche intellectuelle à suivre lors
  de la configuration, cette section décrit les fonctionnalités
  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 précédent 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 différent au niveau de l'interface de
  programmation. Les noms `AF_' correspondent aux noms donnés 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    ||  Démons  | 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
                 +-----------+--------------+-------------+-------------+----------
                 |Périph.    |    ax0,ax1   |  nr0,nr1    | rose0,rose1 | eth0,ppp0
                 +-----------+--------------+-------------+-------------+----------
                 |Pilotes    |  Kiss   PI2   PacketTwin   SCC   BPQ     | slip ppp
                 |           |    modems type son   Baycom              | ethernet
  ---------------+-----------+------------------------------------------+-----
  Matériel | Cartes PI2, PacketTwin, SCC, Série, Ethernet
  ----------------------------------------------------------------------------


  Ce diagramme est plus général que le précédent. Il montre les rela­
  tions entre les applications, le noyau et le matériel ainsi qu'entre
  l'interface de programmation des sockets, les modules de protocoles,
  les périphériques réseau et leurs pilotes. Chaque niveau dépend de
  celui sur lequel il repose et, de façon générale, la configuration
  doit se faire de bas en haut. Par exemple, si vous souhaitez exécuter
  le programme _c_a_l_l, vous devez configurer le matériel, vérifier que le
  pilote adéquat est inclus dans le noyau, créer les périphériques noy­
  aux correspondants et inclure le protocole requis par le programme
  _c_a_l_l. J'ai essayé d'organiser le présent document de cette façon.


  33..  CCoommppoossaannttss llooggiicciieellss ddee llaa ssuuiittee AAXX..2255//NNeettRRoomm//RRoossee

  Le paquetage AX.25 comprend trois volets : les sources du noyau, les
  outils de configuration réseau 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 améliorent substantiellement. L'emploi d'un noyau 2.1.* dans un
  système de production est vivement déconseillé. Pour y remédier,
  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 très simple et apporte une palette de fonctionnalités
  autrement absentes du noyau tel le support Rose.  L'emploi d'un noyau
  2.2.x est également envisageable.


  33..11..  RRééccuuppéérraattiioonn dduu nnooyyaauu,, ddeess oouuttiillss eett uuttiilliittaaiirreess



  33..11..11..  SSoouurrcceess dduu nnooyyaauu

  Les sources du noyau sont disponibles via le réseau de miroirs de
  ftp.kernel.org : ffttpp..xxxx..kkeerrnneell..oorrgg où xx désigne un code pays tel fr,
  uk, de, us, etc...  Les différentes version du noyau se trouvent en :


       /pub/linux/kernel/




  Version courante de mise à jour d'AX.25 : ffttpp..ppsspptt..ffii


  /pub/linux/ham/ax25/ax25-module-14e.tar.gz





  33..11..22..  LLeess oouuttiillss rréésseeaauu

  Dernière version alpha des outils réseau standard pour Linux gérant
  AX.25 et NetRom : ffttpp..iinnkkaa..ddee


       /pub/comp/Linux/networking/net-tools/net-tools-1.33.tar.gz





  Paquetage ipfwadm : ffttpp..xxooss..nnll


       /pub/linux/ipfwadm/




  En 2.2.x, le paquetage _i_p_c_h_a_i_n_s remplace ipfwadm devenu obsolète.


  33..11..33..  LLeess uuttiilliittaaiirreess AAXX..2255

  Il existe deux familles distinctes d'outils AX.25. L'une dédiée aux
  noyaux 2.0.* et l'autre destinée aussi bien aux version 2.1.*  qu'aux
  noyaux 2.0.* patchés. Le numéro 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
  appropriée.  Les combinaisons suivantes fonctionnent,  uuttiilliisseezz lleess .


       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




  NNoottee: les versions ax25-utils-2.0.* identifiées ci-dessus avec le
  symbole '**' sont à présent obsolètes. Le document couvre l'emploi des
  logiciels conseillés dans les tables. Bien que les paquetages
  diffèrent, 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/>


  44..  IInnssttaallllaattiioonn ddeess llooggiicciieellss AAXX..2255//NNeettRRoomm//RRoossee

  Une mise en oeuvre correcte d'AX.25 dans votre système Linux nécessite
  l'installation et la configuration d'un noyau approprié ainsi que des
  utilitaires AX.25.


  44..11..  CCoommppiillaattiioonn dduu nnooyyaauu

  Si vous êtes un habitué de la compilation du noyau Linux, contentez-
  vous de vérifier que vous avez activé les options adéquates et sautez
  cette section.  Si ce n'est pas le cas, lisez ce qui suit.

  En principe, les sources du noyau sont décompactées au niveau du
  répertoire /usr/src dans un sous-répertoire nommé linux. Pour ce
  faire, prenez l'identité du super-utilisateur root et exécutez 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 décompactées et la mise à jour
  appliquée, lancez le script de configuration et activez les options
  qui correspondent à la configuration matérielle dont vous souhaitez
  disposer. Vous utiliserez la commande :


       # make menuconfig




  Si vous êtes bête^H^H^H^Hcourageux, vous pouvez essayer


       # make config




  Les claviophobes se serviront de :


       # make xconfig




  Je vais décrire la méthode plein-écran (menuconfig) dont j'apprécie la
  facilité de déplacement mais vous êtes libre d'en utiliser une autre.

  Dans tous les cas, vous devrez choisir parmi une série d'options
  auxquelles il faudra répondre 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 ddeevveezz répondre `Y' aux options marquées d'un *'. Le reste dépend
  de votre configuration matérielle et d'options laissées à votre choix.
  Certaines de ces options sont décrites un peu plus loin. Si vous ne
  voyez pas ce dont il retourne, continuez la lecture et revenez à cette
  section ultérieurement.

  Une fois la configuration du noyau achevée, vous devriez pouvoir
  compiler proprement un nouveau noyau :



       # make dep
       # make clean
       # make zImage




  Déplacez ensuite le fichier arch/i386/boot/zImage et éditez le fichier
  /etc/lilo.conf en conséquence avant de relancer _l_i_l_o pour être sûr que
  vous démarrerez bien sur le bon noyau.





  44..11..11..  UUnn mmoott ssuurr lleess mmoodduulleess

  Je vous recommande de ne ppaass 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 problèmes avec les modules, non par la faute du code, mais parce
  que les modules sont plus compliqués à installer et à configurer.
  [NdT:manifestement nous ne faisons pas le même 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 adéquat.

  Certains ajouts au fichier /etc/conf.modules sont nécessaires afin que
  _k_e_r_n_e_l_d sache gérer l'interface d'accès aux fonctions modularisées.
  Les entrées suivantes doivent être présentes :


       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.


  44..11..22..  QQuu''yy aa--tt--iill ddee nnoouuvveeaauu ddaannss lleess nnooyyaauuxx 22..00..xx ppaattcchhééss eett lleess
  22..11..yy ??

  Les noyaux 2.1.* présentent des améliorations au niveau de quasiment
  tous les pilotes et protocoles. Citons les plus significatives :

     MMoodduullaarriissaattiioonn
        tous les protocoles et gestionnaires ont été modularisés de
        façon à être gérés via _i_n_s_m_o_d et _r_m_m_o_d. La mémoire demandée par
        le noyau diminue dans le cas de modules employés par
        intermittence. Le développement et la mise au point des
        gestionnaires devient également plus facile. Cela étant, la
        configuration devient légèrement plus compliquée.

     UUnniiffoorrmmiissaattiioonn ddeess ppiillootteess
        l'accès aux périphériques tels les Baycom, SCC, PI, PacketTwin
        et autres a maintenant lieu via une interface réseau usuelle
        semblable à celle du gestionnaire ethernet. Ils n'apparaissent
        désormais plus comme des TNC KISS. L'utilitaire _n_e_t_2_k_i_s_s permet
        de créer une interface KISS pour ces périphériques si on le
        souhaite.

     bbuuggss
        il y a eu de nombreuses corrections et des fonctionnalités ont
        été ajoutées tel le protocole Rose.



  44..22..  LLeess oouuttiillss ddee ccoonnffiigguurraattiioonn dduu rréésseeaauu

  A présent que le noyau est compilé, vous devez faire de même avec les
  nouveaux outils de configuration du réseau. Ces outils permettent de
  modifier la configuration des périphériques réseau et des tables de
  routage.

  Le nouveau paquetage alpha des net-tools standard gère AX.25 et
  NetRom. Je l'ai essayé et il semble fonctionner correctement chez moi.


  44..22..11..  PPaattcchh ccoorrrreeccttiiff iinncclluuaanntt llaa ggeessttiioonn RRoossee

  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>.



  44..22..22..  CCoommppiillaattiioonn ddeess nneett--ttoooollss ssttaannddaarrdd

  Lisez le fichier Release et suivez les indications qui y sont données.
  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




  Arrivés à ce point, vous devrez répondre à une série de questions de
  configuration d'une façon similaire à ce qui se fait pour le noyau.
  N'oubliez pas d'inclure tous les protocoles et gestionnaires de
  périphériques dont vous souhaitez vous servir ultérieurement. Dans le
  doute, répondez par l'affirmative (``Y'').

  Une fois la compilation effectuée :

  # make install




  installera les programmes à leur place définitive.


  Pour disposer des fonctionnalités de type pare-feu IP (firewall), vous
  aurez besoin des derniers outils d'administration ipfwadm.  Ils
  remplacent ipfw qui ne fonctionne à présent 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





  44..33..  UUttiilliittaaiirreess eett aapppplliiccaattiioonnss AAXX..2255

  Une fois les étapes de compilation et de redémarrage du noyau menées à
  leur terme avec succès, 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 installés par défaut dans les sous-répertoires bin,
  sbin, etc et man du répertoire /usr.

  S'il s'agit de la première installation des utilitaires AX.25 sur
  votre système, vous devrez installer quelques fichiers de
  configuration type dans le répertoire /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.)

  vérifiez encore une fois que les _n_c_u_r_s_e_s sont correctement installées.
  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.


  55..  NNuumméérrooss dd''iiddeennttiiffiiccaattiioonn,, aaddrreesssseess eett pprréélliimmiinnaaiirreess ddiivveerrss

  Chaque port AX.25 et NetRom sur votre système doit se voir allouer un
  numéro d'identification (callsign/ssid). Il se configure dans les
  fichiers dont il va être à présent question.

  Certaines mises en oeuvre d'AX.25 telles NOS et BPQ permettent
  l'emploi d'un ssid commun sur un même port AX.25 et NetRom. Pour des
  raisons techniques assez compliquées, Linux l'interdit. En pratique,
  ça ne s'avère pas un problème aussi important qu'on pourrait le
  croire.

  Cela signifie que vous devez garder présents à l'esprit certains
  éléments lorsque vous configurez votre système.


  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 reçoit
     (celui dont il est question juste au-dessus).

  3. NetRom emploie le ssid spécifié dans son fichier de configuration
     mais seulement lorsqu'il dialogue avec un autre NetRom. Il ne
     s'agit ppaass du ssid que les clients AX.25 de votre noeud NetRom vont
     employer.  Davantage de détails sur ce point tout à l'heure.

  4. Rose utilise par défaut le ssid du port AX.25 à moins qu'on ne lui
     en spécifie explicitement un autre grâce à la commande `_r_s_p_a_r_m_s'
     qui forcera le même ssid sur ttoouuss 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
     différents.

  6. Si le routage est fait avec attention, vous pouvez affecter la même
     adresse IP à tous les ports.


  55..11..  QQuuee ssoonntt lleess TT11,, TT22,, NN22 ??

  Toutes les piles AX.25 ne sont pas de type TNC2. La nomenclature Linux
  diffère sur certains points de celle du monde des TNC. Le tableau ci-
  dessous vous aidera à établir les correspondances entre les différents
  concepts.
















  -------+----------+------------------------------------------------
  Linux  | TAPR TNC | Description
  -------+----------+------------------------------------------------
  T1     | FRACK    | Temps d'attente avant retransmission d'une
         |          | trame privée d'accusé de réception.
  -------+----------+------------------------------------------------
  T2     | RESPTIME | Temps minimum d'attente entre trames avant
         |          | émission d'un acquittement.
  -------+----------+------------------------------------------------
  T3     | CHECK    | Périodicité d'émission d'un paquet de
         |          | vérification de l'état de la connexion.
  -------+----------+------------------------------------------------
  N2     | RETRY    | Nombre de tentatives de retransmission avant
         |          | de signaler un échec.
  -------+----------+------------------------------------------------
  Idle   |          | Durée d'inactivité d'une connexion avant sa
         |          | fermeture.
  -------+----------+------------------------------------------------
  Window | MAXFRAME | Nombre maximal de trames transmises sans
         |          | acquittement.
  -------+----------+------------------------------------------------





  55..22..  PPaarraammèèttrreess ccoonnffiigguurraabblleess ddyynnaammiiqquueemmeenntt

  Les noyaux 2.1.* et 2.0.* +moduleXX permettent la modification à la
  volée de paramètres auparavant statiques. Un examen attentif de la
  structure du répertoire /proc/sys/net/ révèle de nombreux fichiers
  dont les noms correspondent à ceux de paramètres réseau.  Les fichiers
  dans le répertoire /proc/sys/net/ax25/ représentent chacun un port
  AX.25 configuré. Le nom du fichier reflète celui du port.  La
  structure des fichiers dans /proc/sys/net/ax25/<portname>/ est la
  suivante :

  Fichier               Signification         Valeur                   Défaut
  ip_default_mode       Mode IP par défaut    0=DG 1=VC                0
  ax25_default_mode     Mode AX.25 par défaut 0=normal 1=étendu        0
  backoff_type          Backoff               0=Linéaire 1=exponentiel 1
  connect_mode          Mode connecté         0=non 1=oui              1
  standard_window_size  Fenètre standard      1  <= N <= 7             2
  extended_window_size  Fenètre étendue       1  <= N <= 63            32
  t1_timeout            Délai maximal T1      1s <= N <= 30s           10s
  t2_timeout            Délai maximal T2      1s <= N <= 20s           3s
  t3_timeout            Délai 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 donnés en secondes tandis que la durée d'inactivité
  est en minutes. Notez que les valeurs employées dans l'interface
  sysctl s'expriment dans une unité interne multiple par 10 du temps en
  secondes. La résolution atteint donc le dixième de seconde. Dans le
  cas d'une alarme qui peut être nulle, c'est à dire pour T3 et pour la
  durée d'inactivité, une valeur nulle équivaut à une désactivation.


  La structure des fichiers dans /proc/sys/net/netrom/ est la suivante :





  Fichier                                    Valeur par défaut
  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 défaut
  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 paramètre se fait simplement en l'écrivant dans
  le fichier. Par exemple, pour vérifier puis modifier la taille de
  fenêtre Rose, vous pourriez exécuter :


       # cat /proc/sys/net/rose/window_size
       3
       # echo 4 >/proc/sys/net/rose/window_size
       # cat /proc/sys/net/rose/window_size
       4





  66..  CCoonnffiigguurraattiioonn dd''uunn ppoorrtt AAXX..2255

  Chaque application AX.25 nécessite un fichier de configuration
  spécifique pour obtenir les paramètres des ports AX.25 définis sur
  votre système.  Pour les ports AX.25, il s'agit du fichier
  /etc/ax25/axport. Chaque port dont vous souhaitez vous servir doit
  être répertorié dans ce fichier.


  66..11..  CCrrééaattiioonn ddeess ppéérriipphhéérriiqquueess AAXX..2255

  Le périphérique réseau correspond à ce qui apparaît 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 reçoit des données
  réseau. Presque tous les périphériques réseau sont associés à une
  entité matérielle mais il y a certaines exceptions. Le périphérique
  réseau se rattache directement à un gestionnaire de périphérique.

  Le code AX.25 de Linux inclut un grand nombre de gestionnaires de
  périphériques. Le pilote KISS est sûrement le plus courant mais on
  peut également citer les pilotes SCC, Baycom et modem-son.

  Chacun de ces pilotes crée un périphérique lors de son invocation.


  66..11..11..  CCrrééaattiioonn ddeess ppéérriipphhéérriiqquueess KKIISSSS

  OOppttiioonnss ddee ccoonnffiigguurraattiioonn dduu nnooyyaauu :


       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 série constitue sûrement la configuration la
  plus courante. À vous de préconfigurer et de connecter le TNC à un
  port série.  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 créer les périphériques KISS.
  Par exemple :


       # /usr/sbin/kissattach /dev/ttyS0 radio
       # kissparms -p radio -t 100 -s 100 -r 25




  Les périphériques KISS se retrouvent sous la dénomination `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 périphérique KISS est associé à un port série.

  _k_i_s_s_p_a_r_m_s permet de positionner divers paramètres sur un périphérique
  KISS.

  De façon précise, l'exemple précédent créerait un périphérique KISS
  reposant sur le périphérique série `/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.


  66..11..11..11..  CCoonnffiigguurraattiioonn ddeess TTNNCC DDuuaall PPoorrtt

  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 contrôle du périphérique série connecté au TNC
  multiports et à le faire ressembler à une collection de périphériques
  chacun connecté à un TNC monoport. Vous devrez le faire _a_v_a_n_t toute
  autre configuration AX.25. Les périphériques que vous configurerez
  correspondent à des pseudo-TTY (/dev/ttyq*) et non aux ports série.
  Les pseudo-TTY mettent en place un équivalent de tuyau via lequel des
  programmes prévus pour dialoguer avec des périphériques de type tty
  peuvent communiquer. Chaque tuyau possède une extrémité maître
  (`/dev/ptyq*') et une esclave (`/dev/ttyq*'). Les extrémités sont en
  relation telles que si /dev/ptyq0 est l'extrémité maître d'un tuyau,
  alors /dev/ttyq0 est son extrémité esclave. Le côté maître doit être
  ouvert avant le côté esclave. _m_k_i_s_s divise un périphérique série grâce
  à ce mécanisme.


  Par exemple, pour un TNC double-port connecté au port série /dev/ttyS0
  en 9600 bps, les commandes suivantes créeront deux pseudo-tty qui se
  comporteront comme des ports séries 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
  décrit précédemment dans l'exemple relatif à port1 et port2.
  N'utilisez pas directement _k_i_s_s_a_t_t_a_c_h sur le port série car _m_k_i_s_s y
  accède.

  _m_k_i_s_s accepte de nombreux arguments optionnels. En voici un résumé :

     --cc provoque l'ajout d'un octet de contrôle à chaque trame KISS.  La
        plupart des mises en oeuvre de KISS ne le gèrent pas. La rom
        KISS G8BPG en est capable.

     --ss <<ssppeeeedd>>
        fixe le débit du port série.

     --hh active la négociation matérielle sur le port série (inactive par
        défaut). La plupart des mises en oeuvre KISS ne la gèrent pas.

     --ll déclenche l'émission de messages à destination de _s_y_s_l_o_g.


  66..11..22..  CCrrééaattiioonn dd''uunn ppéérriipphhéérriiqquuee BBaayyccoomm

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 très bien sous Linux, Thomas
  Sailer(<sailer@ife.ee.ethz.ch>) en a développé le gestionnaire. Son
  pilote gère les ports série Ser12 et Par96 ainsi que les modems
  parallèles PicPar.  Vous trouverez davantage d'informations concernant
  les modems à l'adresse : Baycom Web site <http://www.baycom.de/>.

  La première étape consiste à déterminer les ports d'entrée/sortie et
  les adresses des ports série ou parallèle auxquels se connecte(nt)
  le(s) modem(s).

  Les périphériques BayCom se retrouvent sous la dénomination bc0, bc1,
  bc2 etc...

  L'utilitaire _s_e_t_h_d_l_c permet de configurer le pilote avec les
  paramètres précédents. Si votre système 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. Désactivation du gestionnaire du port série COM1: puis
  configuration du pilote BayCom pour un modem série Ser12 sur ce même
  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 parallèle de type Par96 sur le port LPT1: utilisant la
  détection DCD matérielle :


       # insmod hdlcdrv
       # insmod baycom mode="par96" iobase=0x378 irq=7 options=0




  Ce n'est pas la meilleure façon de faire. L'utilitaire _s_e_t_h_d_l_c
  fonctionne également avec plusieurs périphériques.

  La page de _m_a_n d'_s_e_t_h_d_l_c est très détaillée mais quelques exemples
  mettront en lumière les aspects les plus importants de la
  configuration.  On suppose que le module BayCom a déjà é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 parallèle BayCom sur LPT1 avec
  détection DCD logicielle :


       # sethdlc -p -i bc0 mode par96 io 0x378 irq 7




  Configuration de bc1 pour un modem série sur COM1 :


       # sethdlc -p -i bc1 mode "ser12*" io 0x3f8 irq 4





  66..11..33..  CCoonnffiigguurraattiioonn ddeess ppaarraammèèttrreess dd''aaccccèèss aauu ccaannaall AAXX..2255

  Ces paramètres é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 complète 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 paramètres de durée sont donnés en millisecondes.


  66..11..33..11..  CCoonnffiigguurraattiioonn dd''AAXX..2255 aavveecc llee ppiilloottee BBaayyCCoomm

  Le pilote BayCom crée des périphériques réseau standard dont la
  configuration pour AX.25 est voisine de celle liée à l'emploi des
  cartes PI ou PacketTwin.

  Tout d'abord il faut donner un numéro d'identification AX.25 au
  périphérique.  _i_f_c_o_n_f_i_g le fait très bien :


       # /sbin/ifconfig bc0 hw ax25 VK2KTJ-15 up




  La commande précédente affecte l'identité AX.25 VK2KTJ-15 au
  périphérique bc0. Vous disposez également de _a_x_p_a_r_m_s mais vous aurez
  de toute façon besoin d'_i_f_c_o_n_f_i_g pour activer le périphérique :


       # ifconfig bc0 up
       # axparms -setcall bc0 vk2ktj-15




  L'étape suivante consiste à ajouter une entrée dans le fichier
  /etc/ax25/axports comme vous le feriez pour tout autre périphérique.
  Les données du fichier axports étant associées aux périphériques
  réseau par l'intermédiaire du numéro d'identification, la ligne que
  vous rajouterez devra comprendre celui de votre BayCom.

  La nouvelle interface AX.25 se comporte à présent comme les autres.
  Vous pouvez la configurer pour IP, la gérer via ax25d et l'utiliser
  pour NetRom ou Rose si bon vous semble.


  66..11..44..  CCrrééaattiioonn dd''uunn ppéérriipphhéérriiqquuee mmooddeemm--ssoonn

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :






  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 développé 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
  numérique 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 supportées. Un
  soupçon d'électronique est nécessaire 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
  possibilités sont nombreuses : récupération à la sortie de la carte
  son, traitement sur les ports parallèle, série ou midi. Des exemples
  de schémas illustrent tout ces cas sur le site de Thomas.


  Les périphériques modem-son se retrouvent sous la dénomination sm0,
  sm1, sm2, etc...

  RReemmaarrqquuee: le pilote SoundModem et le sous-système de gestion du son
  entrent en compétition sous Linux. Assurez-vous que le son est
  désactivé avant d'utiliser le pilote SoundModem. Vous pouvez bien sûr
  compiler les deux en tant que modules, les insérer et les ôter en
  fonction de vos besoins.


  66..11..44..11..  CCoonnffiigguurraattiioonn ddee llaa ccaarrttee ssoonn

  Le pilote SoundModem n'initialise pas la carte réseau. 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 modèle
  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 paramètre [-f synthio] correspond à l'adresse du synthétiseur. Le
  paramètre [-c dma2] détermine le second canal DMA pour un
  fonctionnement simultané dans les deux sens (full-duplex).


  66..11..44..22..  CCoonnffiigguurraattiioonn ddeess ppéérriipphhéérriiqquueess mmooddeemm--ssoonn

  Une fois la carte son configurée, vous devez spécifier 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 paramètres. Si vous
  n'avez qu'une seule carte installée, vous pouvez les passer en
  arguments à l'insertion du module SoundModem.

  Par exemple, avec une seule carte de type SoundBlaster configurée
  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 façon de faire. L'utilitaire _s_e_t_h_d_l_c fonc­
  tionne également avec plusieurs périphériques.

  La page de _m_a_n d'_s_e_t_h_d_l_c est très détaillée mais quelques exemples
  mettront ici encore en lumière les aspects les plus importants de la
  configuration. On suppose que le module modem-son a déjà é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
  périphérique sm0 avec la carte WindowsSoundSystem précédente et le
  port parallèle 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
  périphérique sm1 avec la carte SoundBlaster précédente et le port
  série 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
  périphérique sm1 avec la carte SoundBlaster précédente et le port
  série en 0x2f8 pour alimenter l'émetteur :


       # sethdlc -p -i sm1 mode sbc:afsk1200 io 0x388 irq 10 dma 1 serio 0x2f8





  66..11..44..33..  CCoonnffiigguurraattiioonn ddeess ppaarraammèèttrreess dd''aaccccèèss aauu ccaannaall AAXX..2255

  Ces paramètres é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 complète 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 paramètres de durée sont donnés en millisecondes.


  66..11..44..44..  CChhooiixx dduu vvoolluummee eett aajjuusstteemmeenntt dduu ppiilloottee

  Il est _t_r_è_s important que les niveaux audio soient correctement
  ajustés pour qu'un modem-radio fonctionne correctement. Les modem-son
  n'échappent pas à la règle. Thomas a mis au point des utilitaires pour
  faciliter cette tâche : _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
        réception.

  _s_m_d_i_a_g en mode 'visuel' avec un périphérique SoundModem en sm0 :


       # smdiag -i sm0 -e




  _s_m_m_i_x_e_r avec un périphérique SoundModem en sm0 :


       # smmixer -i sm0

  66..11..44..55..  CCoonnffiigguurraattiioonn dd''AAXX..2255 aavveecc llee ppiilloottee SSoouunnddMMooddeemm

  Le pilote soundmodem crée des périphériques réseau standard dont la
  configuration pour AX.25 est voisine de celle liée à l'emploi des
  cartes PI ou PacketTwin.

  Tout d'abord il faut donner un numéro d'identification AX.25 au
  périphérique.  _i_f_c_o_n_f_i_g le fait très bien :


       # /sbin/ifconfig sm0 hw ax25 VK2KTJ-15 up




  La commande précédente affecte l'identité AX.25 VK2KTJ-15 au
  périphérique sm0. Vous disposez également de _a_x_p_a_r_m_s mais vous aurez
  de toute façon besoin d'_i_f_c_o_n_f_i_g pour activer le périphérique :


       # ifconfig sm0 up
       # axparms -setcall sm0 vk2ktj-15




  L'étape suivante consiste à ajouter une entrée dans le fichier
  /etc/ax25/axports comme vous le feriez pour tout autre périphérique.
  Les données du fichier axports étant associées aux périphériques
  réseau par l'intermédiaire du numéro d'identification, la ligne que
  vous rajouterez devra comprendre celui de votre modem-son.

  La nouvelle interface AX.25 se comporte à présent comme les autres.
  Vous pouvez la configurer pour IP, la gérer via ax25d et l'utiliser
  pour NetRom ou Rose si bon vous semble.


  66..11..55..  CCrrééaattiioonn dd''uunn ppéérriipphhéérriiqquuee àà bbaassee ddee ccaarrttee PPII

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Ottawa PI and PI/2 support for AX.25




  Les périphériques PI se retrouvent sous la dénomination `pi[0-9][ab]'
  où la première carte détectée se verra allouer `pi0', la seconde
  `pi1', etc... `a' et `b' se rapportent à la première et à la seconde
  interface physique des cartes PI. Si vous avez inclus le pilote de
  cartes PI dans votre noyau et que la détection s'est effectuée
  correctement, vous pouvez configurer le périphérique :


       # /sbin/ifconfig pi0a hw ax25 VK2KTJ-15 up




  La commande précédente affecte l'identité AX.25 VK2KTJ-15 au premier
  port de la carte PI et l'active. Pour utiliser le périphérique, il
  vous reste à ajouter au fichier /etc/ax25/axports l'entrée
  correspondant à son identité AX.25.


  Le gestionnaire de cartes PI a été écrit par : David Perry,
  <dp@hydra.carleton.edu>


  66..11..66..  CCrrééaattiioonn dd''uunn ppéérriipphhéérriiqquuee PPaacckkeettTTwwiinn

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] Gracilis PackeTwin support for AX.25




  Les périphériques PacketTwin se retrouvent sous la dénomination
  `pt[0-9][ab]' où la première carte détectée se verra allouer `pt0', la
  seconde `pt1', etc. `a' et `b' se rapportent à la première et à la
  seconde interfaces physiques des cartes PacketTwin. Si vous avez
  inclus le pilote de cartes PI dans votre noyau et que la détection
  s'est effectuée correctement, vous pouvez configurer le périphérique :



       # /sbin/ifconfig pt0a hw ax25 VK2KTJ-15 up




  La commande précédente affecte l'identité AX.25 VK2KTJ-15 au premier
  port de la carte PacketTwin et l'active. Pour utiliser le
  périphérique, il vous reste à ajouter au fichier /etc/ax25/axports
  l'entrée correspondant à son identité AX.25.


  Le gestionnaire de cartes PacketTwin a été écrit par : Craig Small
  VK2XLZ, <csmall@triode.apana.org.au>.


  66..11..77..  CCrrééaattiioonn dd''uunn ppéérriipphhéérriiqquuee SSCCCC ggéénnéérriiqquuee

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 générique
  de gestion des cartes à base de SCC Z8530. Son pilote supporte une
  large gamme de cartes différentes et offre une interface similaire à
  un TNC KISS que vous pouvez traiter comme telle.


  66..11..77..11..  RRééccuuppéérraattiioonn eett ccoommppiillaattiioonn ddeess oouuttiillss ddee ccoonnffiigguurraattiioonn

  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 récentes.

  Vous trouverez le paquetage des outils de configuration à une des
  adresses suivantes : Joerg's web page <http://www.rat.de/jr/>

  ddbb00bbmm..aauuttoommaattiioonn..ffhh--aaaacchheenn..ddee


       /incoming/dl1bke/




  iinnssll11..eetteecc..uunnii--kkaarrllssrruuhhee..ddee


       /pub/hamradio/linux/z8530/




  ffttpp..uuccssdd..eedduu


       /hamradio/packet/tcpip/linux
       /hamradio/packet/tcpip/incoming/





  Différentes versions s'offrent à vous. Choisissez la plus adaptée à
  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 employées 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 préférez un pilote inclus dans le noyau
       # make install



  Au terme de ces opérations, trois nouveaux exécutables devraient
  s'être installés dans votre répertoire /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 périphériques apparaîtront également dans votre répertoire
  /dev sous les noms scc0-scc7. Ils joueront plus tard le rôle de
  périphériques KISS que vous pourrez employer.

  Si vous lancez 'make for_kernel', vous devrez également recompiler
  votre noyau. Afin que le pilote z8530 soit inclus, vérifiez que vous
  avez bien répondu `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-répertoire adéquat de /lib/modules et il ne vous sera pas
  nécessaire de recompiler tout le noyau. N'oubliez pas d'exécuter un
  _i_n_s_m_o_d afin de charger le module avant d'essayer de le configurer.


  66..11..77..22..  CCoonnffiigguurreerr llee ppiilloottee ppoouurr ssaa ccaarrttee

  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 détaillée et vous aurez
  tout intérêt à vous y reporter si vous rencontrez le moindre problème.
  Intéressez-vous plus particulièrement à doc/scc_eng.doc et à
  doc/scc_ger.doc. J'ai repris les points les plus importants mais de
  nombreux détails sont passés 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 paramètres matériels 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 réseau et le périphérique
  sera initialisé conformément au contenu du fichier de configuration.
  Effectuez ces opérations avant d'utiliser le gestionnaire.


  66..11..77..22..11..  CCoonnffiigguurraattiioonn ddeess ppaarraammèèttrreess mmaattéérriieellss

  La première partie se divise en strophes, chacune correspondant à un
  composant 8530. Une strophe comprend une liste de mots clefs et
  d'arguments.  Le fichier peut décrire jusqu'à quatre composants SCC
  par défaut. 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 :


     cchhiipp
        le terme chip sert à séparer les strophes. Il ne nécessite pas
        d'arguments et ceux-ci sont de toute façon ignorés.

     ddaattaa__aa
        adresse du port de données pour le canal `A' du z8530. Un nombre
        hexadécimal est attendu en argument (par exemple 0x300).
     ccttrrll__aa
        adresse du port de contrôle pour le canal `A' du z8530. Un
        nombre hexadécimal est attendu en argument (par exemple 0x304).

     ddaattaa__bb
        adresse du port de données pour le canal `B' du z8530. Un nombre
        hexadécimal est attendu en argument (par exemple 0x301).

     ccttrrll__bb
        adresse du port de contrôle pour le canal `B' du z8530. Un
        nombre hexadécimal est attendu en argument (par exemple 0x305).

     iirrqq
        interruption (IRQ) utilisée par le SCC 8530. Un entier, 5 par
        exemple, est attendu.

     ppcclloocckk
        fréquence du signal d'horloge sur la broche PCLK du 8530.
        L'argument est donné en Hz par un nombre entier (4915200 par
        défaut).

     bbooaarrdd
        modèle de la munie du 8530 :         <<====== ne manque-t-il pas
        un mot ?

        PPAA00HHZZPP
           carte SCC PA0HZP

        EEAAGGLLEE
           carte Eagle

        PPCC110000
           carte SCC PC100 DRSI

        PPRRIIMMUUSS
           carte PRIMUS-PC (DG9BL)

        BBAAYYCCOOMM
           carte (U)SCC BayCom

     eesscccc
        optionnel, active la gestion des cartes SCC étendues (ESCC)
        telles la 8580, la 85180 ou la 85280. L'argument est une chaîne
        de caractères qui peut prendre les valeurs `yes' ou `no' (`no'
        par défaut).

     vveeccttoorr
        optionnel, donne l'adresse du vecteur d'acquittement pour les
        cartes PA0HZP. Il est commun à l'ensemble des composants et
        prend par défaut la valeur nulle.

     ssppeecciiaall
        optionnel, donne l'adresse du registre spécial sur diverses
        cartes. Nul par défaut.

     ooppttiioonn
        optionnel. Nul par défaut.

  Quelques exemples de configuration des cartes les plus courantes :


     BBaayyCCoomm UUSSCCCC




     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





     PPAA00HHZZPP SSCCCC ccaarrdd


          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





     DDRRSSII SSCCCC ccaarrdd


          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 déjà 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 mêmes paramètres que ceux
  employés 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





  66..11..77..33..  CCoonnffiigguurraattiioonn dduu ccaannaall

  Vous préciserez tous les autres paramètres relatifs au port que vous
  configurez dans la section spécifique 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
  paramètres matériels puisque chaque SCC 8530 inclut deux ports.

  Les mots-clefs et leurs arguments s'inscrivent également dans le
  fichier /etc/z8530drv.conf, àà llaa ssuuiittee de la section des paramètres
  matériels.

  L'ordre est très important dans cette section mais tout devrait
  marcher même si vous vous écartez de celui proposé.

      ddeevviiccee
        en première position, spécifie le nom du périphérique auquel le
        reste de la configuration s'applique (par exemple /dev/scc0)

      ssppeeeedd
        débit de l'interface en bits par seconde. Un nombre entier est
        attendu (par exemple 1200)

      cclloocckk
        origine de l'horloge de synchronisation des données. Les valeurs
        possibles sont :

         ddppllll
           fonctionnement normal monodirectionnel (half-duplex) ;

         eexxtteerrnnaall
           le modem dispose de sa propre horloge Rx/Tx ;

         ddiivviiddeerr
           utilisation du diviseur bidirectionnel (si disponible).

      mmooddee
        type de codage des données. À choisir entre nrzi et nrz

      rrxxbbuuffffeerrss
        nombre de tampons de réception à allouer en mémoire.  Un nombre
        entier est attendu (8 par exemple)

      ttxxbbuuffffeerrss
        nombre de tampons d'émission à allouer en mémoire. Un nombre
        entier est attendu (8 par exemple )

      bbuuffssiizzee
        taille des tampons d'émission et de réception. La valeur est
        donnée en octets et correspond à la longueur totale d'une trame.
        Elle doit donc prendre en compte aussi bien les données que
        l'en-tête. Cet argument est optionnel et prend par défaut la
        valeur 384

      ttxxddeellaayy
        délai d'attente de la transmission KISS. Un nombre entier de ms
        est attendu

      ppeerrssiisstt
        paramètre persist (KISS). Argument de type entier

      sslloott
        slot time (KISS). Argument de type entier en ms

      ttaaiill
        the KISS transmit tail value. Argument entier en ms

      ffuulllldduupp
        indicateur de fonctionnement bidirectionnel (KISS), à choisir
        entre 1 pour le bidirectionnel et  0 pour le monodirectionnel

      wwaaiitt
        paramètre d'attente (KISS). Argument de type entier en ms

      mmiinn
        paramètre min (KISS). Argument de type entier en secondes

      mmaaxxkkeeyy
        temps de keyup (?) maximal (KISS). Argument de type entier en
        secondes

      iiddllee
        délai d'attente sur inactivité (KISS). Argument de type entier
        en secondes

      mmaaxxddeeff
        paramètre maxdef (KISS). Argument de type entier

      ggrroouupp
        paramètre group (KISS). Argument de type entier

      ttxxooffff
        valeur de txoff (KISS). Argument de type entier en ms

      ssooffttddccdd
        valeur de softdcd (KISS). Argument de type entier

      sslliipp
        indicateur slip (KISS). Argument de type entier


  66..11..77..44..  UUttiilliissaattiioonn dduu ppiilloottee

  Il suffit d'employer les périphériques /dev/scc* comme on le ferait
  avec n'importe quel tty série connecté à un TNC KISS. Par exemple,
  avec une carte SCC, vous exécuteriez quelque chose du style :


       # kissattach -s 4800 /dev/scc0 VK2KTJ




  NOS permet également d'attacher le périphérique de la même façon. Avec
  JNOS, vous entreriez une commande du style :

  attach asy scc0 0 ax25 scc0 256 256 4800





  66..11..77..55..  LLeess oouuttiillss ssccccssttaatt  eett ssccccppaarraamm

  Afin de diagnostiquer les problèmes, _s_c_c_s_t_a_t affiche la configuration
  courante de n'importe quel périphérique SCC. Essayez :


       # sccstat /dev/scc0




  Vous devriez récupérer 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 après 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





  66..11..88..  CCrrééaattiioonn dd''uunn ppéérriipphhéérriiqquuee BBPPQQ

  OOppttiioonnss ddee ccoonnffiigguurraattiioonn dduu nnooyyaauu :



       General setup  --->
           [*] Networking support
       Network device support  --->
           [*] Network device support
           ...
           [*] Radio network interfaces
           [*] BPQ Ethernet driver for AX.25





  Linux gère le BPQ compatible Ethernet. Vous pouvez ainsi dialoguer en
  AX.25 via un réseau Ethernet local et interconnecter votre poste Linux
  avec d'autres machines BPQ sur réseau local.

  Les périphériques BPQ se retrouvent sous la dénomination `bpq[0-9]'.
  `bpq0' est associé à `eth0', `bpq1' à `eth1' etc.

  La configuration est simple. Mettez d'abord en place un périphérique
  Ethernet standard. Pour cela, vous aurez pris soin d'inclure dans le
  noyau la gestion de votre adaptateur Ethernet. Pour plus de détails,
  reportez vous à : Ethernet-HOWTO <Ethernet-HOWTO.html>.

  Avant d'activer la gestion BPQ, le périphérique Ethernet doit s'être
  vu affecter un numéro d'identification AX.25. Par exemple :


  # /sbin/ifconfig bpq0 hw ax25 vk2ktj-14 up




  Vérifiez bien que l'identifiant correspond à celui qui figure dans le
  fichier /etc/ax25/axports pour ce port.


  66..11..99..  CCoonnffiigguurraattiioonn dd''uunn nnooeeuudd BBPPQQ ppoouurr llee ddiiaalloogguuee aavveecc llaa ccoouucchhee
  AAXX..2255 ddee LLiinnuuxx

  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 générales (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 défaut

               ETH_ADDR  FF:FF:FF:FF:FF:FF  ; adresse de la cible





  66..22..  MMiissee aauu ppooiinntt dduu ffiicchhiieerr //eettcc//aaxx2255//aaxxppoorrttss

  /etc/ax25/axports est un fichier texte standard que vous créerez avec
  n'importe quel éditeur. Son format est le suivant :


       portname  callsign  baudrate  paclen  window  description




  avec :

      ppoorrttnnaammee
        nom affecté au port

      ccaallllssiiggnn
        identifiant AX.25

      bbaauuddrraattee
        vitesse de communication avec le TNC


      ppaacclleenn
        longueur de paquet maximale applicable au port pour les
        communications AX.25 en mode connecté

      wwiinnddooww
        paramètre de fenêtre (K) AX.25. Il s'agit de la même chose que
        le paramètre  MAXFRAME  de nombreux TNC.

      ddeessccrriippttiioonn
        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 numéro d'identification
  (ssid) unique à chaque port AX.25 que vous créez. Ajoutez une ligne
  pour chaque périphérique que vous emploierez ; cela concerne les ports
  KISS, BayCom, SCC, PI, PT et modem-son. Les entrées dans le fichier
  sont associées aux périphériques réseau par le biais de
  l'identificateur AX.25 : au moins une bonne raison de les prendre
  différents.


  66..33..  RRoouuttaaggee AAXX..2255

  Vous pouvez décider de mettre en place des routes par défaut
  spécifiques à certains hôtes, par exemple pour des connexions AX.25
  courantes ou des connexions IP. L'utilitaire _a_x_p_a_r_m_s effectue cette
  tâche. 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 entrée pour VK2XLZ via VK2SUT sur le port
  AX.25 nommé radio.


  77..  TTCCPP//IIPP eett ll''iinntteerrffaaccee AAXX..2255

  Si vous disposez d'interfaces KISS, deux méthodes 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 précédent de façon à créer 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
  paramètres.
  Si vous disposez d'autre interfaces, utilisez _i_f_c_o_n_f_i_g pour configurer
  l'adresse IP et le masque de réseau 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
  façon similaire avec un périphérique 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 précédentes correspondent à une configuration familière
  aux utilisateurs de NOS et de ses variantes ou de toute autre logiciel
  IP.  Notez que la route par défaut n'est pas nécessaire si un autre
  périphérique réseau la met lui-même 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 requêtes ICMP toutes les 5
  secondes et non chaque seconde.


  88..  CCoonnffiigguurraattiioonn dd''uunn ppoorrtt NNeettRRoomm

  Le protocole NetRom s'appuye sur les ports AX.25 que vous créerez. Sa
  configuration s'effectue par l'intermédiaire de deux fichiers. L'un
  décrit les interfaces NetRom et l'autre les ports AX.25 sous-jacents.
  La procédure détaillée ci-dessous s'appliquera à toutes les interfaces
  NetRom que vous souhaiterez définir.


  88..11..  LLee ffiicchhiieerr //eettcc//aaxx2255//nnrrppoorrttss

  Ce fichier est l'analogue pour les ports NetRom du fichier
  /etc/ax25/axports pour les ports AX.25. Tous les périphériques 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 périphériques AX.25.
  Pour certains services tels un BBS, le besoin de définir plusieurs
  alias NetRom peut se manifester ; on ajoute alors des périphériques
  NetRom en conséquence.

  Le format du fichier est le suivant :


       name callsign  alias  paclen   description




  Avec :

      nnaammee
        nom affecté au port.

      ccaallllssiiggnn
        identifiant pour le trafic NetRom transitant par ce port.
        Attention, il ne s'agit ppaass de l'adresse à laquelle les clients
        doivent se connecter pour disposer d'une interface de type _n_o_e_u_d
        (ce mode sera décrit un peu plus loin). L'identifiant doit être
        unique et ne réapparaître nulle part dans les fichiers
        /etc/ax25/axports et /etc/ax25/nrports.

      aalliiaass
        alias NetRom du port.

      ppaacclleenn
        taille maximale des trames NetRom transmises par le port.

      ddeessccrriippttiioonn
        commentaire.

  Par exemple, pour créer un port NetRom connu du reste du réseau 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.


  88..22..  LLee ffiicchhiieerr //eettcc//aaxx2255//nnrrbbrrooaaddccaasstt

  Ce second fichier peut contenir une nombre d'entrées 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 :

      aaxxppoorrtt
        nom du port tiré du fichier /etc/ax25/axports.  En l'absence
        d'entrée 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 ignorée.

      mmiinn__oobbss
        paramètre d'obsolescence minimale du port.

      ddeeff__qquuaall
        qualité par défaut.

      wwoorrsstt__qquuaall
        qualité minimale admissible. Toute route de qualité moindre sera
        ignorée.

      vveerrbboossee
        activation de la diffusion des informations de routage globales
        ou seulement relatives au noeud.

  Par exemple :

  radio    1       200      100         1





  88..33..  CCrrééaattiioonn ddeess ppéérriipphhéérriiqquueess rréésseeaauu NNeettRRoomm

  Une fois les deux fichiers mis au point, il faut créer les
  périphériques NetRom. La démarche est proche du cas AX.25 à ceci près
  que l'on se sert à présent 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 crée des périphériques NetRom qui se
  retrouvent sous la dénomination `nr[0-9]' (la première invocation
  produit `nr0', la seconde `nr1' etc.) Pour associer un périphérique
  NetRom au port défini précédemment, on utilise :


       # nrattach netrom




  Cette commande active le périphérique NetRom (nr0) nommé netrom con­
  figuré conformément au contenu du fichier /etc/ax25/nrports.


  88..44..  LLaanncceemmeenntt dduu ddéémmoonn NNeettRRoomm

  Le noyau Linux gère le protocole NetRom et assure la commutation mais
  il ne prend pas en charge certaines fonctions. Le démon 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 démarrage ou d'en créer un dédié à l'automatisation du processus.


  88..55..  RRoouuttaaggee NNeettRRoomm

  Peut-être voudrez-vous mettre en place des routes statiques pour
  certains hôtes 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
  complète. 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 créer manuellement de nouveau voisins.  La
  commande suivante crée un voisin NetRom VK2SUT-9 d'une qualité de 120
  qui ne sera pas supprimé automatiquement.

  # /usr/sbin/nrparms -routes radio VK2SUT-9 + 120





  99..  TTCCPP//IIPP ssuurr uunnee iinntteerrffaaccee NNeettRRoomm

  La configuration ressemble à celle d'AX.25 pour TCP/IP.

  Soit vous précisez 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 caractéristiques _a_r_p des hôtes concernés par votre routage
  puisque votre machine ne dispose d'aucun mécanisme pour déterminer une
  adresse NetRom utilisable afin d'atteindre une interface IP
  particulière.

  Pour créer une interface nr0 d'adresse IP 44.136.8.5, de MTU 512 et
  configuré conformément aux spécifications 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 méthode :


       # /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 exécuterait :


       # 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' passés à la _n_r_p_a_r_m_s fixent les paramètres
  de qualité et d'obsolescence NetRom pour la route.


  1100..  CCoonnffiigguurraattiioonn ddeess ppoorrttss RRoossee

  Le protocole de transmission de paquets Rose est semblable à la couche
  trois des spécifications X.25. La gestion Rose du noyau est une
  version mmooddiiffiiééee de FPAC Rose implementation
  <http://fpac.lmi.ecp.fr/f1oat/f1oat.html>.

  La couche Rose s'appuie sur les ports AX.25 que vous définissez. La
  procédure détaillée ci-dessous s'appliquera à toutes les interfaces
  NetRom que vous souhaiterez définir.


  1100..11..  LLee ffiicchhiieerr //eettcc//aaxx2255//rrssppoorrttss

  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 :

      nnaammee
        nom affecté au port.

      aaddddrreessss
        adresse Rose sur 10 digits.

      ddeessccrriippttiioonn
        commentaire.

  Par exemple :


       rose  5050294760  Rose Port




  Notez que Rose emploie par défaut 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





  1100..22..  CCrrééaattiioonn ddeess ppéérriipphhéérriiqquueess rréésseeaauu RRoossee

  Une fois le fichier /etc/ax25/rsports mis au point, vous pouvez créer
  les périphériques Rose en reprenant la démarche AX.25. Vous emploierez
  la commande _r_s_a_t_t_a_c_h qui crée des périphériques sous l'appellation
  `rose[0-5]' (la première invocation produit `rose0', la seconde
  `rose1' etc...). Par exemple :


       # rsattach rose




  Cette commande active le périphérique Rose (rose0) nommé `rose' con­
  figuré conformément au contenu du fichier /etc/ax25/rsports.





  1100..33..  RRoouuttaaggee RRoossee

  Le protocole Rose ne gère pour l'instant que le routage statique. Il
  se définit 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 différentes
  destinations Rose sur une seule route. Par exemple :


       # rsparms -nodes add 5050295502/4 radio vk2xlz




  On retrouve l'exemple précédent à ceci près que toute adresse de des­
  tination dont les quatre premiers digits correspondent (toute adresse
  commençant par 5050 donc) sera routée. La variante suivante s'avère
  sûrement la moins ambiguë :


       # rsparms -nodes add 5050/4 radio vk2xlz





  1111..  CCoommmmuunniiccaattiioonnss AAXX..2255//NNeettRRoomm//RRoossee

  Maintenant que vos interfaces AX.25, NetRom et Rose sont activées,
  vous devriez être capable de procéder à des essais.

  Le paquetage des utilitaires AX.25 comprend le programme `_c_a_l_l' qui
  sert d'intermédiaire 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 préciser à _c_a_l_l le port à employer, vu que le
  même noeud de destination peut être joignable via n'importe lequel des
  ports que vous aurez configurés.

  _c_a_l_l fournit un terminal de contrôle en mode ligne de commande pour
  les appels AX.25. Les lignes commençant par `~' sont identifiées comme
  des commandes. La commande `~.' coupe la communication.

  Reportez-vous à la page de man sous /usr/man pour davantage
  d'informations.


  1122..  CCoonnffiigguurreerr LLiinnuuxx ppoouurr aacccceepptteerr lleess ccoonnnneexxiioonnss

  Linux est un système d'exploitation puissant qui présente beaucoup de
  flexibilité dans sa configuration. Le coût de cette flexibilité se
  retrouve dans la mise au point de la configuration souhaitée. 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 connectés ?"
  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 même écrire vos propres
  programmes tels une base de données maison ou un jeu. Quoi que vous
  fassiez, il faut spécifier à AX.25 le programme à exécuter quand une
  connexion s'établit.

  Le démon _a_x_2_5_d joue un rôle 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 détecte une, il examine par
  l'intermédiaire 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 à présent décrire
  les étapes de sa configuration.


  1122..11..  LLee ffiicchhiieerr //eettcc//aaxx2255//aaxx2255dd..ccoonnff

  Ce fichier contient la configuration du démon _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'avère rapidement des plus simples à l'usage, avec quelques pièges à
  éviter.

  Le format général 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 début de ligne pour indiquer un commentaire ignoré du
        programme _a_x_2_5_d

      <<ppoorrtt__nnaammee>>
        nom du port AX.25, NetRom ou Rose tel que spécifié 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 précède le
        nom du port par `callsign/ssid via' pour indiquer que vous
        voulez accepter les appels vers l'identificateur cité par
        l'intermédiaire de cette interface. Un exemple l'illustrera.

      <<ppeeeerr>>
        est l'identifiant du noeud auquel la configuration s'applique.
        Si vous ne spécifiez pas de ssid, tous seront considérés comme
        valables.

      wwiinnddooww
        paramètre de fenêtre AX.25 (K) ou valeur de MAXFRAMDE pour cette
        configuration.

      TT11
        délai de retransmission de trame (T1) exprimé en demi-secondes.

      TT22
        délai d'attente par le logiciel AX.25 d'une seconde trame avant
        de préparer une réponse. S'exprime en secondes.

      TT33
        délai d'inactivité avant qu'une connexion inactive ne soit
        coupée. S'exprime en secondes.

      iiddllee
        période d'inactivité en secondes.

      NN22
        nombre d'essais de retransmission avant qu'une connexion ne soit
        coupée.

      <<mmooddee>>
        procure un mécanisme d'établissement de certains types de
        permissions. Les modes sont activés ou inhibés grâce à une
        combinaison de caractères représentant chacun un droit.
        L'accentuation ne joue pas et les caractères doivent former un
        bloc ininterrompu.

         uu//UU
           UTMP                   - non-supporté

         vv//VV
           Validate call          - non-supporté

         qq//QQ
           Quiet                  - pas d'enregistrement des connexions

         nn//NN
           check NetRom Neighbour - non-supporté

         dd//DD
           Disallow Digipeaters   - les connexions doivent être directes

         ll//LL
           Lockout                - connexion interdite


         **//00
           marker                 - marqueur, pas de mode spécifique

      <<uuiidd>>
        userid sous laquelle le programme maintenant la connexion sera
        exécuté.

      <<ccmmdd>>
        nom complet de la commande à lancer, sans arguments.

      <<ccmmdd--nnaammee>>
        texte qui apparaîtra à l'invocation de _p_s comme commande du
        programme (en général la même chose que <cmd> mais sans le
        chemin d'accès).

      <<aarrgguummeennttss>>
        arguments de ligne de commande passés à <:cmd> lorsqu'il est
        lancé. Les éléments suivants permettent de passer des
        informations utilisées :

         %%dd
           nom du port recevant la connexion

         %%UU
           identificateur AX.25 de l'extrémité connectée, sans ssid, en
           majuscules

         %%uu
           identificateur AX.25 de l'extrémité connectée, sans ssid, en
           minuscules

         %%SS
           identificateur AX.25 de l'extrémité connectée, avec ssid, en
           majuscules

         %%ss
           identificateur AX.25 de l'extrémité connectée, avec ssid, en
           minuscules

         %%PP
           identificateur AX.25 du noeud distant initiateur de la
           connexion, sans ssid, en majuscules

         %%pp
           identificateur AX.25 du noeud distant initiateur de la
           connexion, sans ssid, en minuscules

         %%RR
           identificateur AX.25 du noeud distant initiateur de la
           connexion, avec ssid, en majuscules

         %%rr
           identificateur AX.25 du noeud distant initiateur de la
           connexion, avec ssid, en minuscules

  Ue section au format précédent est requise pour chaque interface
  AX.25, NetRom ou Rose que vous voulez voir accepter des connexions.

  Le paragraphe comprend deux lignes particulières, l'une commençant par
  la chaîne `parameters' et l'autre par la chaîne `default' (il y a une
  différence).

  `default' couvre tous les cas qui ne sont pas spécifiés ailleurs.
  Ainsi, tous les appels sur l'interface <interface_call> ne disposant
  pas d'une règle spécifique se retrouvent dans la rubrique `default'.
  En l'absence d'une telle section, toutes les connexions hors règle
  sont immédiatement interrompues sans autre forme de procès.

  `parameters' est plus subtil et dissimule le piège mentionné
  précédemment. Si le caractère `*' est présent dans un champ, une
  valeur par défaut issue de la section `parameters' est employée. Le
  noyau possède d'ailleurs une liste de valeurs utilisées en l'absence
  de `parameters'. Le danger réside en ce que les entrées spécifiées via
  `parameters' ne s'appliquent qu'aux règles qui les suivent.  Une même
  interface peut comporter plusieurs entrées `parameters'.  Notez que
  les règles `parameters' ne permettent pas de positionner les champs
  `uid' et `command'.


  1122..22..  UUnn eexxeemmppllee ddee ffiicchhiieerr aaxx2255dd..ccoonnff



       # ax25d.conf pour VK2KTJ - 02/03/97
       # Ce fichier de configuration utilise le port AX.25 défini 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 réclamant une connexion via
  l'identificateur `VK2KTJ-0' du port AX.25 `radio' se verra appliquer
  les règles suivantes :

  Tout appel depuis un identifiant `NOCALL' se verra rejeté. Notez
  l'emploi du mode `L'.

  La ligne parameters modifie deux paramètres par défaut du noyau
  (Window et T1) et exécutera _/_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 appelées ainsi apparaîtront en tant que _a_x_s_p_a_w_n dans
  un affichage issu de _p_s. Les deux lignes qui suivent définissent deux
  stations auxquelles s'appliqueront les permissions.

  La dernière ligne de la section est la règle fourre-tout appliquée au
  reste des connexions (VK2XLZ et VK2DAY inclus dès lors qu'ils ont
  recours à un ssid différent de -1). Tous les paramètres prennent leurs
  valeurs par défaut et le programme _p_m_s sera lancé avec un argument de
  ligne de commande spécifiant une connexion AX.25 d'identifiant VK2KTJ
  (reportez-vous à la partie `Configuration du PMS' pour davantage de
  détails).

  La configuration suivante accepte les appels à VK2KTJ-1 via le port
  radio. Le programme _n_o_d_e est exécuté à chaque connexion.

  Vient ensuite une spécification de connexions NetRom (notez l'emploi
  des signes inférieur et supérieur à la place des crochets). Toute
  personne se connectant via le port `netrom' déclenche le programme
  _n_o_d_e si son identifiant est différent de `NOCALL'. Dans le cas
  contraire, tout accès est refusé.

  Les deux dernières configurations concernent des connexions entrantes
  Rose, la première 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 même façon. 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 propriétés importantes de la syntaxe du fichier de
  configuration. La page de _m_a_n explique dans son intégralité le contenu
  du fichier ax25d.conf.  Le paquetage ax25-utils inclut un exemple plus
  détaillé qui pourrait également vous être utile.


  1122..33..  LLaanncceerr aaxx2255dd

  Une fois les deux fichiers de configuration mis au point, lancez la
  commande :


       # /usr/sbin/ax25d




  À présent, les gens devraient pouvoir se connecter en AX.25 à votre
  machine.  N'oubliez pas de modifier les fichiers de commande de démar­
  rage du système de façon que ax25d soit invoqué automatiquement à
  chaque réinitialisation de la station.


  1133..  LLee llooggiicciieell nnooddee

  Le logiciel _n_o_d_e a été développé par Tomi Manninen
  <tomi.manninen@hut.fi>. Il a été conçu à partir du programme PMS et
  offre une fonctionnalité de noeud facilement configurable. Une fois
  les utilisateurs connectés, il leur permet de se servir de telnet, de
  NetRom, de Rose et de AX.25 vers l'extérieur ainsi que d'obtenir
  diverses informations telles finger, la liste des noeuds et des
  écoutes etc. Le noeud peut être configuré assez simplement pour
  exécuter 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 démon IP _i_n_e_t_d pour permettre aux
  utilisateurs d'obtenir un accès telnet à votre machine. Le lancement
  depuis la ligne de commande est également possible.


  1133..11..  LLee ffiicchhiieerr //eettcc//aaxx2255//nnooddee..ccoonnff

  node.conf est un fichier texte qui spécifie 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 ignorée.

       # Nom d'hôte de la machine noeud
       hostname        radio.gw.vk2ktj.ampr.org

       # Réseau local
       # définit ce qui doit être considéré comme 'local' du point de vue de la
       # vérification des permissions grâce à nodes.perms.
       localnet        44.136.8.96/29

       # Ports cachés
       # rend certains ports invisibles aux utilisateurs. Les ports n'apparaîtront pas
       # via la commande Ports.
       hiddenports     rose netrom

       # Identification du noeud
       # apparaîtra à 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

       # Délai d'inactivité du noeud
       # en secondes
       idletimout      1800

       # Délai d'inactivité des connexions
       # en secondes
       conntimeout     1800

       # Reprise de connexion
       # indique si les utilisateurs doivent être reconnectés spontanément en cas
       # de rupture de la connexion distante ou bien s'ils doivent être complètement
       # déconnectés.
       reconnect       on

       # Alias
       alias           CONV    "telnet vk1xwt.ampr.org 3600"
       alias           BBS     "connect radio vk2xsb"

       # Alias (commandes externes)
       # exécution de commandes externes au noeud
       # extcmd <cmd> <flag> <userid> <commande>
       # Flag == 1 pour l'instant
       # <commande> a le même format que dans ax25d.conf
       extcmd          PMS     1       root    /usr/sbin/pms pms -u %U -o VK2KTJ

       # Enregistrement
       # le niveau 3 est le plus détaillé, 0 désactive l'enregistrement
       loglevel        3

       # Caractère de contrôle
       # 20 = (Control-T)
       EscapeChar      20








  1133..22..  LLee ffiicchhiieerr //eettcc//aaxx2255//nnooddee..ppeerrmmss

  _n_o_d_e affecte des permissions aux utilisateurs. On décide 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 caractère
  `*' dans l'un d'eux indique une absence de contraintes pour son
  application. On construit ainsi facilement des règles applicables par
  défaut.


      uusseerr
        Le premier champ indique l'identifiant d'appel concerné par les
        permissions.  Une éventuelle partie ssid sera ignorée.

      mmeetthhoodd
        Chaque protocole et chaque méthode d'accès disposent également
        de permissions.  Par exemple, les utilisateurs connectés via
        AX.25 ou NetRom peuvent être autorisés à se servir de (C)onnect
        tandis que ceux issus d'une session telnet depuis un noeud non-
        local s'en verront refuser l'accès. Le deuxième champ spécifie
        donc à quelle méthode d'accès les permissions s'appliquent.
        Voici les classes de méthodes d'accès :


          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 hôte 'local'
          netrom  connexion NetRom
          rose    connexion Rose
          *       n'importe quelle connexion




      ppoorrtt
        Vous pouvez également contrôler les permissions pour les
        utilisateurs AX.25 sur la base des ports employés. Le troisième
        champ contient un nom de port si vous décidez d'employer cette
        possibilité (disponible seulement pour les connexions AX.25).

      ppaasssswwoorrdd
        Un mot de passe peut également être demandé lors de
        l'établissement de la connexion. Cela s'avère pratique pour
        protéger des comptes utilisateurs spécifiques disposant de
        privilèges particulièrement élevés. Si le quatrième champ est
        positionné, il correspond au mot de passe attendu.

      ppeerrmmiissssiioonnss
        Les permissions sont fixées par le biais du dernier champ de
        chaque ligne.  L'information est codée 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 hôtes locaux
      16     (T)elnet vers amprnet (44.0.0.0)
      32     (T)elnet vers les hôtes non-locaux, de type non-amprnet
      64     (C)onnect AX.25 pour les ports cachés
      128    (C)onnect Rose




     On additionne ensuite les puissances de deux associées aux bits des
     permissions activées. Le résultat va dans le cinquième champ.

  Un exemple de fichier nodes.perms :



       # /etc/ax25/node.perms
       #
       # L'opérateur a pour identité VK2KTJ, s'identifie par le mot de passe 'secret'
       # et dispose de toutes les permissions pour toutes les méthodes 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, liés à l'hôte ou AMPR disposent de
       # (C)onnect et de (T)elnet vers les hôtes locaux et ampr mais se voient
       # interdire les autres adresses IP.
       *       ax25    *       *       159
       *       netrom  *       *       159
       *       local   *       *       159
       *       host    *       *       159
       *       ampr    *       *       159





  1133..33..  EExxééccuuttiioonn ddee nnooddee  ddeeppuuiiss aaxx2255dd

  L'invocation du programme _n_o_d_e par le démon _a_x_2_5_d nécessite l'ajout de
  règles appropriées 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 création astucieuse d'alias de ports. Par exemple, partant de la
  configuration d'_a_x_2_5_d donnée plus haut, on veut que tous les
  utilisateurs se connectant à VK2KTJ-1 reçoivent le noeud. Pour cela,
  on ajoute la règle suivante au fichier /etc/ax25/ax25d.conf :


       [vk2ktj-1 via radio]
       default    *     *    *   *   *   0    root /usr/sbin/node node




  Linux répondra à toute demande de connexion sur le port AX.25 `radio'
  d'identifiant `VK2KTJ-1' en exécutant le programme _n_d_e.


  1133..44..  EExxééccuuttiioonn ddee nnooddee  ddeeppuuiiss iinneettdd

  Offrir la possibilité d'ouvrir une session telnet sur votre machine et
  d'accéder au programme _n_o_d_e est une tache plutôt facile. Commencez par
  choisir le port auquel les utilisateurs se connecteront. Dans mon
  exemple, j'ai pris arbitrairement le port 3694 bien que Tomi détaille
  dans sa documentation la marche à suivre pour remplacer le démon
  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 redémarré, 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.


  1144..  CCoonnffiigguurraattiioonn ddee aaxxssppaawwnn ..

  _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
  décrit ci-dessus d'une façon 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'achève sur le caractère +, l'utilisateur devra appuyer
  sur la touche d'entrée avant de pouvoir s'identifier. Par défaut, il
  n'y a pas d'attente. Toutes les configurations d'hôtes qui suivent la
  ligne précédente déclencheront l'appel d'_a_x_s_p_a_w_n lorsqu'ils se con­
  necteront. Quand _a_x_s_p_a_w_n s'exécute, il vérifie 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 présence 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 façon à en créer
  un automatiquement.




  1144..11..  MMiissee aauu ppooiinntt dduu ffiicchhiieerr //eettcc//aaxx2255//aaxxssppaawwnn..ccoonnff

  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




  Détail des huit caractéristiques configurables de _a_x_s_p_a_w_n :


     ##  indique un commentaire.

     ccrreeaattee
        si ce champ est positionné à yes alors _a_x_s_p_a_w_n tentera de créer
        un compte pour tout utilisateur qui n'apparaît pas dans le
        fichier /etc/passwd.

     gguueesstt
        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.

     ggrroouupp
        indique le groupe pour les utilisateurs qui n'apparaissent pas
        dans le fichier /etc/passwd.

     ffiirrsstt__uuiidd
        valeur de départ des identités utilisateur lors de la création
        automatique

     mmaaxx__uuiidd
        identité utilisateur maximale disponible à la création
        automatique

     hhoommee
        répertoire dans lequel seront créés les comptes utilisateurs

     sshheellll
        shell de login des nouveaux utilisateurs

     aassssoocciiaattee
        indique si les connexions sortantes de l'utilisateur ont lieu
        avec son identifiant d'appel personnel ou avec celui de votre
        station


  1155..  CCoonnffiigguurraattiioonn ddee ppmmss

  _p_m_s fournit un système simple de messagerie personnelle. Il a été
  écrit à l'origine par Alan Cox. Dave Brown, N2RJT, <dcb@vectorbd.com>
  en a repris le développement. Les fonctionnalités sont restées
  simples : envoi de courrier électronique au propriétaire de la station
  et obtention d'informations limitée. Dave travaille actuellement à les
  enrichir.

  Il faut tenir à jour quelques fichiers contenant des informations sur
  le système et ajouter les entrées adéquates au fichier ax25d.conf de
  telle sorte qu'il s'exécute pour les utilisateurs connectés.



  1155..11..  MMiissee aauu ppooiinntt dduu ffiicchhiieerr //eettcc//aaxx2255//ppmmss..mmoottdd

  Le fichier /etc/ax25/pms.motd contient l'équivalent du message du jour
  affiché aux utilisateurs après qu'ils se sont connectés et ont reçu
  l'en-tête usuel de BBS. Il s'agit d'un simple fichier texte qui sera
  transmis tel quel.


  1155..22..  MMiissee aauu ppooiinntt dduu ffiicchhiieerr //eettcc//aaxx2255//ppmmss..iinnffoo

  /etc/ax25/pms.info est également un simple fichier texte dans lequel
  vous renseignerez des informations plus détaillées relatives à votre
  station ou à sa configuration. Ce fichier est transmis aux
  utilisateurs en réponse à la commande Info depuis l'invite PMS.


  1155..33..  AAssssoocciieerr lleess iiddeennttiiffiiaannttss AAXX..2255 aauuxx ccoommpptteess uuttiilliissaatteeuurrss

  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 décrit le
  processus.


  1155..44..  AAjjoouutt ddee PPMMSS aauu ffiicchhiieerr //eettcc//aaxx2255//aaxx2255dd..ccoonnff

  L'ajout de _p_m_s au fichier ax25d.conf est très simple. Il vous faut
  néanmoins garder un élément en tête : Dave a ajouté la prise en compte
  d'arguments de ligne commande à PMS afin de gérer différentes
  conventions de fin de ligne. AX.25 et NetRom requièrent une fin de
  ligne et un saut de ligne tandis que le standard Unix comprend juste
  le caractère de fin de ligne.  Par exemple, pour une entrée
  correspondant au lancement par défaut 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 exécute _p_m_s en lui précisant qu'il s'agit d'une connexion
  AX.25 et que PMS a pour propriétaire vk2ktj. Consultez la page de _m_a_n
  pour l'emploi d'autres méthodes de connexion.


  1155..55..  TTeesstteerr PPMMSS

  Exécutez depuis la ligne de commande :

  # /usr/sbin/pms -u vk2ktj -o vk2ktj


  En remplaçant 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.


  1166..  CCoonnffiigguurraattiioonn ddeess pprrooggrraammmmeess uusseerr__ccaallll

  On trouve derrière 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 très simples destinés à être lancés par _a_x_2_5_d
  pour automatiser les connexions depuis des hôtes distants. On peut
  bien sûr les employer dans des scripts ou via d'autres démons tels
  _n_o_d_e.

  Ils équivalent au programme _c_a_l_l et n'effectuent aucun traitement sur
  les données, ce qui vous épargne le problème des conversions de fin de
  lignes.

  Un exemple pour commencer. On suppose que vous disposez d'un petit
  réseau personnel, d'une station Linux tenant lieu de passerelle radio
  et d'une autre machine -- on prendra un noeud BPQ -- qui lui est
  connectée 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'intermédiaire de
  votre noeud Linux ou se connecter au démon 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' désignera 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
  démon 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' opèrent de façon similaire.
  Un radioamateur en a fait usage pour faciliter l'accès à un BBS
  distant. En principe, on aurait dû entrer à la main une chaîne de
  connexion démesurément longue. Il a donc ajouté une entrée faisant
  apparaitre le BBS comme une entité appartenant au réseau local, _a_x_2_5_d
  servant en fait de proxy pour l'accès à la machine distante.


  1177..  CCoonnffiigguurraattiioonn ddeess ccoommmmaannddeess RRoossee UUpplliinnkk eett DDoowwnnlliinnkk

  Si vous avez l'habitude des réalisations Rose à base de ROM, vous ne
  serez pas dépaysé par la méthode d'appel AX.25 à travers un réseau
  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 digipétée par
  l'intermédiaire de l'identifiant des noeuds Rose distants.

  La couche protocolaire Rose de Linux ne gère 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.


  1177..11..  CCoonnffiigguurraattiioonn dd''uunnee lliiaaiissoonn RRoossee ddeesscceennddaannttee

  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 défaut pour les connexions Rose entrantes. Par
  exemple, vous êtes à l'écoute des demandes d'accès Rose aux
  destinations telles NODE-0 ou HEARD-0 que vous gérez localement, mais
  toutes les autres connexions sont transmises à la commande _r_s_d_w_n_l_i_n_k
  sous l'hypothèse 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.


  1177..22..  CCoonnffiigguurraattiioonn dd''uunn lliiaaiissoonn RRoossee mmoonnttaannttee

  Pour que votre station Linux accepte les connexions AX.25 d'une façon
  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 particulière pour l'identifiant local. Le caractère
  `*' indique que l'application doit être invoquée si l'identifiant est
  reconnu dans le chemin de répétition d'une connexion.

  Avec cette configuration, un appel AX.25 peut établir des appels Rose
  au moyen de la séquence présentée 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.


  1188..  AAssssoocciiaattiioonn ddeess iiddeennttiiffiiaannttss AAXX..2255 aauuxx ccoommpptteess uuttiilliissaatteeuurrss

  Dans de nombreuses situations, il est fortement souhaitable d'associer
  un identifiant à compte utilisateur. Par exemple lorsque plusieurs
  opérateurs radioamateurs partagent la même machine et souhaitent
  employer leur propre identifiant lorsqu'ils effectuent des appels ou
  lorsque des utilisateurs de PMS désirent dialoguer avec quelqu'un en
  particulier sur une station.

  Les utilitaires AX.25 permettent de réaliser cette association. On l'a
  déjà évoqué dans la section relative à PMS mais je le répète ici afin
  de m'assurer que vous ne passerez pas à côté.

  L'association s'effectue grâce à 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 démarrage
  afin qu'elles soient disponibles à chaque réinitialisation.

  NNootteezz que vous ne devez surtout pas associer un identifiant au compte
  root vu que cela  pourrait poser des problèmes de configuration à
  d'autres programmes.


  1199..  EEnnttrrééeess dduu ssyyssttèèmmee ddee ffiicchhiieerr //pprroocc//

  Le pseudo système de fichiers /proc contient divers fichiers
  spécifiques aux programmes AX.25 et NetRom. Ces fichiers sont
  normalement employés par les utilitaires AX.25 mais leur formatage est
  tel qu'ils peuvent vous intéresser. Le format est suffisamment simple
  pour ne pas nécessiter beaucoup d'explications.


     //pprroocc//nneett//aarrpp
         : 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.

     //pprroocc//nneett//aaxx2255
         : sockets AX.25 ouverts. Elles peuvent être en attente de
        connexion ou actives.

     //pprroocc//nneett//aaxx2255__bbppqqeetthheerr
         : identifiants AX.25 de type Ethernet BPQ.

     //pprroocc//nneett//aaxx2255__ccaallllss
         : équivalences entre identités d'utilisateurs Linux et
        identifiants d'appel telles que définies par la commande _a_x_p_a_r_m_s
        _-_a_s_s_o_c.

     //pprroocc//nneett//aaxx2255__rroouuttee
         : informations sur les chemins AX.25

     //pprroocc//nneett//nnrr
         : sockets NetRom ouvertes. Elles peuvent être en attente de
        connexion ou actives.

     //pprroocc//nneett//nnrr__nneeiigghh
         : liste de voisins NetRom

     //pprroocc//nneett//nnrr__nnooddeess
         : informations sur les voisins NetRom

     //pprroocc//nneett//rroossee
         : sockets Rose ouvertes. Elles peuvent être en attente de
        connexion ou actives.

     //pprroocc//nneett//rroossee__nnooddeess
         : correspondances entre destinations et voisins Rose

     //pprroocc//nneett//rroossee__nneeiigghh
         : liste de voisins Rose

     //pprroocc//nneett//rroossee__rroouutteess
         : connexions Rose en cours


  2200..  PPrrooggrraammmmaattiioonn rréésseeaauu AAXX..2255,, NNeettRRoomm,, RRoossee

  L'avantage le plus important lié à l'utilisation des protocoles par
  paquets radioamateurs du noyau réside en la facilité de développement
  des programmes et applications qui les emploient.

  Bien que la programmation réseau sous Unix déborde du cadre de ce
  document, je vais décrire les principaux éléments d'utilisation des
  protocoles AX.25, NetRom et Rose au sein de vos programmes.


  2200..11..  FFaammiilllleess dd''aaddrreesssseess

  La programmation AX.25, NetRom et Rose est assez semblable à la
  programmation TCP/IP sous Linux. LEs principales différences 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.


  2200..22..  FFiicchhiieerrss dd''eenn--ttêêttee

  Incluez toujours les fichiers `ax25.h', `netrom.h' ou `rose.h' si vous
  vous servez de ces protocoles. Les débuts 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;





  2200..33..  MMiissee eenn ffoorrmmee ddeess iiddeennttiiffiiaannttss eett eexxeemmpplleess

  La librairie lib/ax25.a du paquetage des utilitaires AX.25 contient
  des routines de conversion des identifiants. Vous pouvez bien sûr
  écrire les vôtres 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 à
  préparer 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 prêter à confusion. Si
  vous avez des questions, adressez-vous directement à la liste de
  diffusion linux-hams où quelqu'un vous aidera sûrement.


  2211..  QQuueellqquueess ccoonnffiigguurraattiioonnss--ttyyppeess

  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 façons de
  configurer un réseau qu'il y a de réseaux disponibles mais il peut
  vous servir de point de départ.


  2211..11..  UUnn ppeettiitt rréésseeaauu EEtthheerrnneett llooccaall aavveecc uunn rroouutteeuurr LLiinnuuxx vveerrss uunn
  rréésseeaauu rraaddiioo llooccaall


  Nombre d'entre vous disposent de petits réseaux locaux chez eux et
  désirent connecter les stations de ce réseau à un réseau radio local.
  J'ai ce type de configuration chez moi. J'ai réussi à obtenir un bloc
  d'adresses contiguës que je gère par une route unique sur mon Ethernet
  local. Votre coordinateur IP local vous aidera si vous souhaitez
  procéder ainsi. Les adresses du réseau 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 activée dans le noyau.

  ·  Les fichiers de configuration AX.25 correspondent essentiellement à
     ceux donnés dans les sections précédentes. Reportez-y vous si
     nécessaire.

  ·  J'ai décidé d'attribuer au port radio une adresse qui n'appartient
     pas au bloc attribué à mon réseau 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 défaut.

  ·  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 paramètres _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 accès radio.

  ·  smail, http, ftp et d'autres démons s'exécutent également sur le
     routeur qui est ainsi la seule station à fournir aux autres des
     services.

  ·  Le routeur est un 386DX20 d'entrée de gamme avec 20 Mo de disque et
     une configuration Linux minimaliste.


  2211..22..  PPaasssseerreellllee dd''eennccaappssuullaattiioonn IIPP ddaannss IIPP

  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 encapsulées et rend obsolète l'ancien
  démon _i_p_i_p.

  Un schéma 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 intéressants :



       # /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 paramètre _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 ppoouuvveezz attribuer la même adresse à deux interfaces réseau.
     Dans l'exemple courant, sl0 et tunl0 ont tous deux été munis de
     l'adresse IP du port Radio. La passerelle distante récupère ainsi
     la bonne adresse de votre passerelle dans les datagrammes
     encapsulés qu'elle reçoit.

  ·  Les commandes de routage relatives aux routes encapsulées peuvent
     être générées automatiquement via une version modifiée du script
     _m_u_n_g_e incluse ci-dessous. Les instructions de routage sont écrites
     dans un fichier séparé et appelées par la commande source
     /etc/ipip.routes de _b_a_s_h (en supposant que vous employez les mêmes
     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
     paramètre améliore 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"





  2211..33..  CCoonnffiigguurraattiioonn dd''uunnee ppaasssseerreellllee dd''eennccaappssuullaattiioonn AAXXIIPP

  Nombre de passerelles Radio Amateur avec l'Internet encapsulent AX.25,
  NetRom et Rose dans IP. Le cas des trames AX.25 relève du RFC 1226
  écrit par Brian Kantor. Mike Westerhof a réalisé un démon
  d'encapsulation AX.25 sous Unix en 1991. Le paquetage des utilitaires
  ax25-utils en contient une version légèrement améliorée.

  Un programme d'encapsulation AXIP reçoit des trames AX.25 d'un côté,
  examine la destination AX.25 afin d'en déduire 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 dernières et les traite comme s'il
  s'agissait de trames AX.25 reçues depuis un port AX.25. La distinction
  des trames IP contenant de l'AX.25 se fait par l'intermédiaire d'un
  identifiant de protocole égal à 4 (la valeur 94 est possible quoique
  désuète). Le RFC 1226 décrit tout ça en détail.

  L'outil _a_x_2_5_i_p_d inclus dans le paquetage ax25-utils se présente comme
  un programme gérant une interface KISS, au travers de laquelle
  passeront des trames AX.25, et une interface d'adaptation TCP/IP. Il
  se configure par l'intermédiaire du fichier /etc/ax25/ax25ipd.conf.


  2211..33..11..  OOppttiioonnss ddee ccoonnffiigguurraattiioonn dd''AAXXIIPP

  _a_x_2_5_i_p_d opère dans deux modes : "digipeater" et "tnc". En mode "tnc",
  le démon 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 démon agit comme un noeud de
  transmission AX.25.  Les différences 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 désirez également transmettre des paquets
  AX.25. Chaque route dispose d'options qui seront expliquées un peu
  plus tard.
  Voici les autres options à configurer :

  le tty du démon _a_x_2_5_i_p_d ainsi que sa vitesse (en général l'extrémité
  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 situées derrière des filtres
  qui ne laisseront passer que les datagrammes UDP/IP. Le choix doit
  coïncider avec ce qui est attendu à l'autre extrémité.


  2211..33..22..  ttyyppiiqquuee UUnn ffiicchhiieerr ddee ccoonnffiigguurraattiioonn //eettcc//aaxx2255//aaxx2255iippdd..ccoonnff

















































  #
  # 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
  #
  #





  2211..33..33..  EExxééccuutteerr aaxx2255iippdd


      CCoommmmeenncceezz ppaarr mmeettttrree eenn ppaallccee llee ffiicchhiieerr /etc/ax25/axports


          # /etc/ax25/axports
          #
          axip    VK2KTJ-13       9600    256     AXIP port
          #





      EExxééccuutteezz _k_i_s_s_a_t_t_a_c_h ppoouurr ccrrééeerr llee ppoorrtt ::


          /usr/sbin/kissattach /dev/ptyq0 axip





      LLaanncceezz _a_x_2_5_i_p_d ::


          /usr/sbin/ax25ipd &





      TTeesstteezz llaa lliiaaiissoonn AAXXIIPP ::


          call axip vk5xxx






  2211..33..44..  RReemmaarrqquueess ccoonncceerrnnaanntt cceerrttaaiinnss iinnddiiccaatteeuurrss ddeess rroouutteess

  "route" met en place les destinations d'envoi de vos trames AX.25
  encapsulées. Lorsque le démon _a_x_2_5_i_p_d reçoit un paquet sur son
  interface, il compare l'identifiant de destination avec chacun de ceux
  présents dans sa table de routage. S'il trouve une correspondance, le
  paquet est alors encapsulé dans un datagramme IP et transmis à l'hôte
  spécifié.

  Deux indicateurs peuvent être ajoutés à n'importe quelle route du
  fichier ax25ipd.conf :

     bb  tout trafic à destination d'une adresse repérée par le mot-clef
        "broadcast" doit transiter par cette route.

     dd  tout paquet ne correspondant à aucune autre route doit suivre ce
        chemin.

  L'indicateur de broadcast est très 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 gérer des paquets de diffusion générale.


  2211..44..  LLiieerr NNOOSS àà LLiinnuuxx aauu mmooyyeenn dd''uunn ppiippee

  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 habituées. La plupart d'entre eux souhaitent que leur version de
  NOS puisse dialoguer avec le noyau Linux de façon à offrir certaines
  des possibilités 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'intermédiaire de tuyaux (pipe).

  Linux et NOS gérant tous deux le protocole SLIP, il est possible de
  les relier au moyen d'une liaison slip. Vous pourriez le faire grâce à
  deux ports série et à un câble null-modem mais ce serait aussi coûteux
  qu'inefficace. Comme d'autres systèmes de type Unix, Linux dispose de
  tuyaux dits `pipes' (prononcer paillepeu). Il s'agit de pseudo-
  périphériques 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'extrémité mmaaîîttrree d'un
  tuyau après quoi un second programme peut ouvrir la terminaison
  eessccllaavvee. Lorsque les deux bouts sont ouverts, les programmes peuvent
  communiquer l'un avec l'autre en écrivant des caractères 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 répertoire /dev en regorge : les extrémités
  maîtres 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 maître à Linux
  et l'esclave à NOS (le noyau démarre le premier et l'extrémité maître
  doit être la première ouverte). N'oubliez pas que le noyau Linux doit
  être muni d'une adresse IP différente de celle de NOS. A mettre en
  place si ce n'est pas déjà le cas.

  Le tuyau se configure comme un périphérique série. Pour une liaison
  slip, les commandes à exécuter 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 dernière 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) après toutes
  les autres commandes de configuration réseau afin que la liaison slip
  apparaisse automatiquement à la réinitialisation du système.
  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-têtes
  qu'à transmettre toutes les données).

  Essayez les commandes suivantes pour configurer la terminaison du côté
  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 créent un port slip nommé `linux' sur l'extrémité
  esclave du tuyau et ajoutent une route qui y pointe. Une fois NOS
  démarré, vous devriez pouvoir exécuter des ping et des telnet de NOS
  vers Linux et vice-versa. Si ce n'est pas le cas, vérifiez encore une
  fois que vous ne vous êtes trompé nulle part, surtout au niveau des
  adresses et des tuyaux.


  2222..  OOùù ttrroouuvveerr ddee ll''iinnffoorrmmaattiioonn ssuurr...... ??

  Ce document suppose une certaine expérience de la transmission paquets
  par radio, et, comme ce n'est pas forcément le cas, j'ai regroupé un
  ensemble de références à d'autres informations utiles.



  2222..11..  TTrraannssmmiissssiioonn ppaaqquueettss ppaarr rraaddiioo

  Vous trouverez des informations générales 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/>



  2222..22..  DDooccuummeennttaattiioonn ssuurr lleess pprroottooccoolleess


  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>



  2222..33..  DDooccuummeennttaattiioonn ssuurr llee mmaattéérriieell


  Informations sur la carte PPII22 : Ottawa Packet Radio Group
  <http://hydra.carleton.ca/>.

  Informations sur le matériel BBaayyccoomm : Baycom Web Page
  <http://www.baycom.de/>.

  2233..  GGrroouuppeess ddee ddiissccuussssiioonn rraaddiiooaammaatteeuurrss eett LLiinnuuxx

  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 réseau
  irc linuxnet.

  Pour vous abonner à la liste de diffusion Linux lliinnuuxx--hhaammss, envoyez un
  courrier à :


       Majordomo@vger.rutgers.edu




  avec dans le corps du message la ligne suivante :


       subscribe linux-hams




  La ligne de sujet sera ignorée.

  La liste de diffusion lliinnuuxx--hhaammss est archivée 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 débutants sont priés de commencer par utiliser les
  archives. Celles-ci contiennent des réponses à 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




  RReemmaarrqquuee :: n'oubliez pas que tcp-group a pour thème les discussions
  autour de l'emploi des protocoles évolués 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_.


  2244..  RReemmeerrcciieemmeennttss

  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.

  2255..  CCooppyyrriigghhtt..

  Copyright (c) 1996 Terry Dawson.

  La distribution de ce document doit se conformer aux termes de la
  licence LDP tels que définis à 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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  PPoolliittiiqquuee ddee ddiissttrriibbuuttiioonn

       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.

  22..  CCoommppaarraaiissoonn eennttrree LLiinnuuxx eett lleess aauuttrreess ssyysstteemmeess dd''eexxppllooiittaattiioonn

  22..11..  CCoommppaarraaiissoonn GGeenneerraallee

  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.

  22..22..  DDiissppoonniibbiilliittee ddee llaa tteecchhnnoollooggiiee aaddaappttiivvee

  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.

  22..33..  UUssaaggee pprraattiiqquuee

  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.

  33..  MMaallvvooyyaannttss

  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.

  33..11..  VVooiirr ll''eeccrraann aavveecc uunnee vviissiioonn bbaassssee

  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.

  33..11..11..  SSVVGGAATTeexxttMMooddee

  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.

  33..11..22..  SSyysstteemmee XX WWiinnddooww

  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.

  33..11..22..11..  DDiiffffeerreenntteess rreessoolluuttiioonnss dd''eeccrraann

  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 XXFFrreeee8866.

  33..11..22..22..  AAggrraannddiisssseemmeenntt ddee ll''eeccrraann

  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.

  33..11..22..33..  CChhaannggeerr llaa ffoonnttee eeccrraann

  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.

  33..11..22..44..  CCuurrsseeuurrss eenn ccrrooiixx,, eettcc..

  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>

  33..11..33..  SSoonnoorriissaattiioonn

  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.

  33..11..44..  PPrroodduuiirree uunnee iimmpprreessssiioonn llaarrggee

  Utiliser  une  impression  large  avec  Linux est assez facile. Il y a
  plusieurs techniques.

  33..11..44..11..  LLaaTTeeXX // TTeeXX

  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.

  33..11..55..  SSoorrttiirr dduu tteexxttee llaarrggee

  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.

  33..22..  AAiiddeess ppoouurr cceeuuxx qquuii nnee ppeeuuvveenntt ppaass uuttiilliisseerr ddee ssoorrttiiee vviissuueellllee

  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>

  33..22..11..  TTeerrmmiinnaauuxx BBrraaiillllee

  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.

  33..22..22..  SSyynntthheessee vvooccaallee

  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.

  33..22..33..  MMaanniippuulleerr llaa ssoorrttiiee ccoonnssoollee

  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)

  33..22..44..  RReeccoonnnnaaiissssaannccee ooppttiiqquuee ddee ccaarraacctteerreess

  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.

  33..33..  CCoommmmeenncceerr aa aapppprreennddrree LLiinnuuxx

  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)

  33..44..  LLee BBrraaiillllee eenn rreelliieeff

  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.

  44..  PPrroobblleemmeess dd''aauuddiittiioonn

  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.

  44..11..  LLeess cclloocchheess vviissuueelllleess

  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.

     xxtteerrmm ((ssoouuss XX))
        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.

     llaa ccoonnssoollee ((ssaannss XX))
        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.

  55..  PPrroobblleemmeess pphhyyssiiqquueess

  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.

  55..11..  IInnccaappaacciittee aa uuttiilliisseerr uunnee ssoouurriiss oouu uunn ppooiinntteeuurr

  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.

  55..11..11..  IInnccaappaacciittee aa uuttiilliisseerr uunn ccllaavviieerr

  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''.

  55..11..11..11..  AAuuttrree mmaatteerriieell dd''eennttrreeee ((ssyysstteemmee XX WWiinnddooww sseeuulleemmeenntt))

  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.

  55..11..22..  CCoonnttrroolleerr llee mmaatteerriieell pphhyyssiiqquuee ddeeppuuiiss LLiinnuuxx

  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.

  55..22..  RReeccoonnnnaaiissssaannccee vvooccaallee

  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'').

  55..33..  RReennddrree llee ccllaavviieerr ddoocciillee

  55..33..11..  LLee ssyysstteemmee XX WWiinnddooww

  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

  55..33..22..  SSee ddeebbaarraasssseerr ddee llaa rreeppeettiittiioonn aauuttoommaattiiqquuee

  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.

  55..33..33..  MMaaccrrooss :: bbeeaauuccoouupp dd''eennttrreeee ppoouurr ppeeuu ddee ttoouucchheess pprreesssseeeess

  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.

  55..33..44..  LLeess ttoouucchheess ccoollllaanntteess

  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.

  66..  PPrroobblleemmeess ddee pprrooggrraammmmaattiioonn ggeenneerraauuxx

  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.

  66..11..  EEssssaayyeezz ddee ffaacciilliitteerr llaa mmiissee eenn ppllaaccee dd''iinntteerrffaacceess mmuullttiipplleess

  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.

  66..22..  RReennddeezz llee llooggiicciieell ccoonnffiigguurraabbllee

  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.

  66..33..  TTeesstteezz llee llooggiicciieell ssuurr lleess uuttiilliissaatteeuurrss

  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.

  66..44..  RReennddeezz llaa ssoorrttiiee ddiissttiinnccttee

  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.

  66..55..  LLiicceenncceess

  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.

  77..  AAuuttrreess iinnffoorrmmaattiioonnss

  77..11..  DDooccuummeennttaattiioonn ssuurr LLiinnuuxx

  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/

  77..11..11..  LLaa FFeeuuiillllee dd''IInnffoorrmmaattiioonnss LLiinnuuxx

  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.

  77..11..22..  LLaa MMeettaa--FFAAQQ LLiinnuuxx

  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.
  77..11..33..  LLaa ccaarrttee ddeess llooggiicciieellss LLiinnuuxx

  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''.

  77..11..44..  LLeess ddooccuummeennttss HHOOWWTTOO LLiinnuuxx

  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''.

  77..11..55..  LLaa FFAAQQ LLiinnuuxx

  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''.

  77..22..  LLiisstteess ddee ddiissttrriibbuuttiioonn

  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.

  77..22..11..  LLaa lliissttee LLiinnuuxx AAcccceessss

  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>

  77..22..22..  LLaa lliissttee LLiinnuuxx BBlliinndd

  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.

  77..33..  RReeffeerreenncceess WWWWWW

  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/>.

  77..44..  FFoouurrnniisssseeuurrss

  Voici un fournisseur britannique pour le Braillex

       Alphavision Limited

  77..55..  FFaabbrriiccaannttss

  77..55..11..  AAllpphhaavviissiioonn

  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.

     TTeelleepphhoonnee ::
        +44 1494-530 555

  77..55..11..11..  PPrroodduuiittss AAllpphhaavviissiioonn AATT ssuuppppoorrtteess ppaarr LLiinnuuxx

  +o  Braillex

  77..55..22..  BBllaazziiee EEnnggiinneeeerriinngg

  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.

     TTeelleepphhoonnee ::
        +1 (410) 893-9333

     FFAAXX ::
        +1 (410) 836-5040

     BBBBSS ::
        +1 (410) 893-8944

     EE--MMaaiill ::
        <info@blazie.com>

     WWWWWW ::
        <http://www.blazie.com/>

  77..55..22..11..  PPrroodduuiittss AATT BBllaazziiee

  +o  Braille Lite (support arrete)

  77..55..33..  DDiiggiittaall EEqquuiippmmeenntt CCoorrppoorraattiioonn

  Digital Equipment Corporation
  P.O. Box CS2008
  Nashua
  NH 03061-2008
  U.S.A

     CCoommmmaannddeess ::
        +1 800-722-9332

     IInnffooss tteecchhnniiqquueess ::
        +1 800-722-9332

     FFAAXX ::
        +1 603-884-5597

     WWWWWW ::
        <http://www.digital.com/>

  77..55..33..11..  PPrroodduuiittss DDEECC AATT ssuuppppoorrtteess ppaarr LLiinnuuxx

  +o  DECTalk Express

  77..55..44..  KKoommmmuunniikkaattiioonnss--TTeecchhnniikk SSttoollppeerr GGmmbbHH

       KTS Stolper GmbH
       Herzenhaldenweg 10
       73095 Albershausen
       Germany

     TTeelleepphhoonnee ::
        +49 7161 37023

     FFaaxx ::
        +49 7161 32632

  77..55..44..11..  PPrroodduuiittss KKTTGG AATT ssuuppppoorrtteess ppaarr LLiinnuuxx

  +o  Brailloterm

  88..  PPaaqquueettaaggeess llooggiicciieellss

  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.

  88..11..  EEmmaaccssppeeaakk

  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

  88..22..  BBRRLLTTTTYY

  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

  88..33..  SSccrreeeenn

  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).

  88..44..  RRssyynntthh

  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.

  88..55..  xxooccrr

  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.

  88..66..  xxzzoooomm

  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

  88..77..  NNFFBBttrraannss

  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.

  88..77..11..  CCoommppiilleerr NNFFBBttrraannss ssuurr LLiinnuuxx

  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.

  88..88..  UUnnWWiinnddoowwss

  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.

  88..88..11..  ddyynnaammaagg

  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.

  88..88..22..  ccoolloorreeyyeess

  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.

  88..88..33..  bboorrddeerr

  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.

  88..88..44..  uunn--ttwwmm

  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.

  99..  MMaatteerriieell

  99..11..  TTeerrmmiinnaauuxx BBrraaiillllee ppiillootteess aa ppaarrttiirr ddee llaa mmeemmooiirree eeccrraann

  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''.

  99..11..11..  BBrraaiilllleexx

  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: ????

  99..11..22..  BBrraaiillllootteerrmm

  ``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: ????

  99..11..33..  PPaattcchheerr llee nnooyyaauu ppoouurr llee BBrraaiilllleexx eett llee BBrraaiillllootteerrmm

  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). AA ppaarrttiirr  ddee
  11..33..7755  llee  ppaattcchh nn''eesstt pplluuss nneecceessssaaiirree 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. CCeeccii nnee
  ss''aapppplliiqquuee ppaass aauuxx nnooyyaauuxx aanntteerriieeuurrss aa 11..33..7755.

       *** 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)

  99..22..  TTeerrmmiinnaauuxx BBrraaiillllee ppiillootteess ppaarr llooggiicciieell

  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.

  99..22..11..  TTiieemmaann BB..VV..

  99..22..11..11..  CCoommbbiiBBrraaiillllee

  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)

  99..22..22..  AAllvvaa BB..VV..

  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)

  99..22..33..  AAffffiicchheeuurrss TTeelleesseennssoorryy SSyysstteemmss IInncc..

  Les  afficheurs  Telesensory  sont  supportes  a la fois par BRLTTY et
  screen, parce qu'ils ont fourni des informations sur la  programmation
  aux developpeurs.

  99..22..33..11..  PPoowweerrBBrraaiillllee

  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

  99..22..33..22..  NNaavviiggaattoorr

  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)

  99..22..44..  BBrraaiillllee LLiittee

  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

  99..33..  SSyynntthheettiisseeuurrss vvooccaauuxx

  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.

  99..33..11..  DDEECCTTaallkk EExxpprreessss

  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.

  99..33..22..  AAcccceenntt SSAA

  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.

  99..33..33..  ppuuccee SSppeeaakk aanndd SSppeellll SSPPOO225566--AALL22

  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.

  1100..  RReemmeerrcciieemmeennttss

  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.

  11..  QQuu''eesstt--ccee qquuee AAllpphhaa ??

  "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.

  22..  QQuu''eesstt--ccee qquuee DDiiggiittaall SSeemmiiccoonndduuccttoorr ??

  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.

  33..  PPrroocceesssseeuurrss AAllpphhaa

  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:

     2211006644--115500,,116666
        EV4 (initialement), EV4S (maintenant)

     2211006644--220000
        EV4S

     2211006644AA--223333,,227755,,330000
        EV45

     2211006666
        LCA4S (base EV4, avec coprocesseur EV4)

     2211006666AA--223333
        LCA45 (base EV4, mais avec coprocesseur EV45)

     2211116644--223333,,330000,,333333
        EV5

     2211116644AA--441177
        EV56

     2211226644
        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.

  44..  PPeerrffoorrmmaanncceess ccoommppaarreeeess dduu 2211006644 eett dduu 2211006666

  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
  ?"

  55..  QQuueellqquueess nnootteess ssuurr lleess ffrreeqquueenncceess

  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.

  NNoottee:: 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.

  66..  LLeess cchhiippsseett

  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.

  77..  LLeess ssyysstteemmeess

  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.

  88..  LLeess oocctteettss eett lleeuurr mmuullttiipplleess

  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.

  99..  LLee PPAALLccooddee

  Cet emplacement est destine a une section expliquant  le  PALcode.  Je
  l'ecrirai s'il y a suffisemment d'interet.

  1100..  PPoorrttaabbiilliittee

  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

  1111..  PPlluuss dd''iinnffoorrmmaattiioonnss

  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>.

  1122..  RReeffeerreenncceess

  [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

  11..  IInnttrroodduuccttiioonn

  11..11..  CCooppyyrriigghhtt

  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>.

  11..22..  NNoottee iimmppoorrttaannttee

  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 pprreennddrree eenn cchhaarrggee ccee ddooccuummeenntt.  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>.

  11..33..  AAvvaanntt--PPrrooppooss

  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.

  11..33..11..  CCoommmmeenntt uuttiilliisseerr ccee ddooccuummeenntt

  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/>

  11..33..22..  AAuuttrreess ddooccuummeennttss ddee rreeffeerreennccee

  +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.

  11..44..  HHiissttoorriiqquuee ddee ddooccuummeenntt

  Chaque  version inclue quelques modifications et corrections mineures,
  qui ne sont pas indiquees a chaque fois.

     VVeerrssiioonn 00..11     2233 AAvvrriill 11999966
        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''

     VVeerrssiioonn 00..22       44 MMaaii 11999966
        *

     VVeerrssiioonn 00..33cc      1155 JJuuiinn 11999966
        *

     VVeerrssiioonn 00..33ff    1177 OOccttoobbrree 11999966
        Tim  Potter indique l'option -fasm pour activer l'assembleur en-
        ligne de GCC sans le reste des optimisations de -O.

     VVeerrssiioonn 00..33gg    22 NNoovveemmbbrree 11999966
        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).

     VVeerrssiioonn 00..33hh    66 NNoovveemmbbrree 11999966
        plus sur la compilation croisee - voir sur sunsite: devel/msdos/

     VVeerrssiioonn 00..33ii    1166 NNoovveemmbbrree 11999966
        NASM commence a etre particulierement interessant

     VVeerrssiioonn 00..33jj    2244 NNoovveemmbbrree 11999966
        Reference sur la version francaise

     VVeerrssiioonn 00..33kk    1199 DDeecceemmbbrree 11999966
        Quoi? J'avais oublie de parler de Terse?

     VVeerrssiioonn 00..33ll    1111 JJaannvviieerr 11999977
        *

     VVeerrssiioonn 00..44pprree11 1133 JJaannvviieerr 11999977
        Le mini-HOWTO au format texte est transforme en  un  authentique
        HOWTO  au  format  linuxdoc-sgml, pour explorer les possibilites
        dudit format.

     VVeerrssiioonn 00..44     2200 JJaannvviieerr 11999977
        Premiere diffusion de ce HOWTO.

     VVeerrssiioonn 00..44aa    2200 JJaannvviieerr 11999977
        Ajout de la section CREDITS

     VVeerrssiioonn 00..44bb    33 FFeevvrriieerr 11999977
        NASM mis avant AS86

     VVeerrssiioonn 00..44cc    99 FFeevvrriieerr 11999977
        Ajout   de   la   partie   "Avez-vous    besoin    d'utilisateur
        l'assembleur?"

     VVeerrssiioonn 00..44dd      2288 FFeevvrriieerr 11999977
        Annonce fantome d'un nouveau responsable de ce HowTo.

     VVeerrssiioonn 00..44ee      1133 MMaarr 11999977
        Version diffusee pour DrLinux

     VVeerrssiioonn 00..44ff      2200 MMaarrss 11999977
        *

     VVeerrssiioonn 00..44gg      3300 MMaarrss 11999977
        *

     VVeerrssiioonn 00..44hh      1199 JJuuiinn 11999977
        Ajouts a propos de "Comment ne pas utiliser l'assembleur"; mises
        a jour concernant NASM et GAS.

     VVeerrssiioonn 00..44ii      1177 JJuuiilllleett 11999977
        Informations sur l'acces au mode 16 bits a partir de Linux.

     VVeerrssiioonn 00..44jj      77 SSeepptteemmbbeerr 11999977
        *

     VVeerrssiioonn 00..44kk      1199 OOccttoobbrree 11999977
        je (Fare) reprends en main la traduction francaise du HowTo

     VVeerrssiioonn 00..44ll      1166 NNoovveemmbbrree 11999977
        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''.

  11..55..  CCrreeddiittss

  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.

  22..  AAvveezz--vvoouuss bbeessooiinn ddee ll''aasssseemmbblleeuurr??

  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.

  22..11..  LLee PPoouurr eett llee CCoonnttrree

  22..11..11..  LLeess aavvaannttaaggeess ddee ll''aasssseemmbblleeuurr

  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.)

  22..11..22..  LLeess iinnccoonnvveenniieennttss ddee ll''aasssseemmbblleeuurr

  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.

  22..11..33..  AAffffiirrmmaattiioonn

  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.

  22..22..  CCoommmmeenntt nnee ppaass uuttiilliisseerr ll''aasssseemmbblleeuurr

  22..22..11..  MMeetthhooddee ggeenneerraallee ppoouurr oobbtteenniirr dduu ccooddee eeffffiiccaaccee

  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.''

  22..22..22..  LLaannggaaggeess aavveecc ddeess ccoommppiillaatteeuurrss ooppttiimmiissaatteeuurrss

  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.

  22..22..33..  PPrroocceedduurree ggeenneerraallee aa ssuuiivvrree ppoouurr aacccceelleerreerr vvoottrree ccooddee

  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.

  22..22..44..  IInnssppeeccttiioonn dduu ccooddee pprroodduuiitt ppaarr llee ccoommppiillaatteeuurr

  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!

  33..  AAsssseemmbblleeuurrss

  33..11..  AAsssseemmbblleeuurr eenn--lliiggnnee ddee GGCCCC

  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.

  33..11..11..  OOuu ttrroouuvveerr GGCCCC

  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/>

  33..11..22..   OOuu ttrroouuvveerr ddee llaa ddooccuummeennttaattiioonn ssuurr ll''aasssseemmbblleeuurr eenn lliiggnnee aavveecc
  GGCCCC??

  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.

  33..11..33..  AAppppeelllleerr GGCCCC ppoouurr oobbtteenniirr dduu ccooddee  aasssseemmbblleeuurr  eenn  lliiggnnee  ccoorr--
  rreeccttee??

  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).

  33..22..  GGAASS

  GAS est l'assembleur GNU, utilise par gcc.

  33..22..11..  OOuu llee ttrroouuvveerr??

  Au meme endroit ou vous avez trouve gcc, dans le paquetage binutils.

  33..22..22..  QQuu''eesstt--ccee qquuee llaa ssyynnttaaxxee AATT&&TT

  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.

  33..22..33..  mmooddee 1166 bbiittss lliimmiittee

  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.

  33..33..  GGAASSPP

  GASP est un preprocesseur pour GAS.   Il  ajoute  des  macros  et  une
  syntaxe plus souple a GAS.

  33..33..11..  OOuu ttrroouuvveerr ggaasspp??

  gasp est livre avec gas dans le paquetage binutils GNU.

  33..33..22..  CCoommmmeenntt iill ffoonnccttiioonnnnee??

  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.

  33..44..  NNAASSMM

  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.

  33..44..11..  OOuu ttrroouuvveerr NNAASSMM??

  <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.

  33..44..22..  SSoonn rroollee

  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.

  33..55..  AASS8866

  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.

  33..55..11..  WWhheerree ttoo ggeett AASS8866

  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...

  33..55..22..  CCoommmmee aappppeelllleerr ll''aasssseemmbblleeuurr??

  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.

  33..55..33..  OOuu ttrroouuvveerr ddee llaa ddooccuummeennttaattiioonn

  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...

  33..55..44..  vveerrssiioonn QQuuee ffaaiirree ssii jjee nnee ppeeuuxx pplluuss ccoommppiilleerr LLiinnuuxx aavveecc cceettttee
  nnoouuvveellllee

  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.

  33..66..  AAuuttrreess aasssseemmbblleeuurrss

  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).

  33..66..11..  LL''aasssseemmbblleeuurr ddee WWiinn3322FFoorrtthh

  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/>

  33..66..22..  TTeerrssee

  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.

  33..66..33..  AAsssseemmbblleeuurrss nnoonn lliibbrreess eett//oouu nnoonn 3322 bbiittss

  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.

  44..  MMeettaa--pprrooggrraammmmaattiioonn//mmaaccrroo--ttrraaiitteemmeenntt

  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.

  44..11..  DDeessccrriippttiioonn

  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...

  44..11..11..  GGCCCC

  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.

  44..11..22..  GGAASS

  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.

  44..11..33..  GGAASSPP

  Il ajoute toutes les fonctionnalites habituelles de macro a GAS.  Voir
  sa documentation sous forme texinfo.

  44..11..44..  NNAASSMM

  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.

  44..11..55..  AASS8866

  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).

  44..11..66..  AAuuttrreess aasssseemmbblleeuurrss

  +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.

  44..22..  FFiillttrreess eexxtteerrnneess

  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@
  ______________________________________________________________________

  44..22..11..  CCPPPP

  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).

  44..22..22..  MM44

  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?).

  44..22..33..  MMaaccrroo--ttrraaiitteemmeenntt aavveecc vvoottrree pprroopprree ffiillttrree

  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.

  44..22..44..  MMeettaa--pprrooggrraammmmaattiioonn

  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!

  44..22..44..11..  BBaacckkeennddss pprroovveennaanntt ddee ccoommppiillaatteeuurr eexxiissttaannttss

  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.

  44..22..44..22..  LLee NNeeww--JJeerrsseeyy MMaacchhiinnee--CCooddee TToooollkkiitt

  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/>

  44..22..44..33..  TTuunneess

  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/>

  55..  CCoonnvveennttiioonnss dd''aappppeell

  55..11..  LLiinnuuxx

  55..11..11..  EEddiittiioonn ddee lliieennss aavveecc GGCCCC

  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::

  55..11..22..  PPrroobblleemmeess EELLFF eett aa..oouutt

  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.

  55..11..33..  AAppppeellss ssyysstteemmeess ddiirreeccttss

  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.

  55..11..44..  EEnnttrreeeess//ssoorrttiieess ssoouuss LLiinnuuxx

  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.

  55..11..55..  AAcccceeddeerr aauuxx ggeessttiioonnnnaaiirreess 1166 bbiittss aavveecc LLiinnuuxx//ii338866

  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.

  55..22..  DDOOSS

  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.

  55..33..  WWiinnddaauubbeerriieess......

  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...

  55..44..  VVoottrree pprroopprree ssyysstteemmee dd''eexxppllooiittaattiioonn

  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>

  66..  AA ffaaiirree eett ppooiinntteeuurrss

  +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 Wieërs, en anglais et néerlandais dag@mind.be et en
  français par Dany Vanderroost, danyv@euronet.be
  v1.0.22, 17 Février 2000

  Ce document décrit comment peaufiner la configuration de Linux pour
  les utilisateurs belges et recense les groupes d'utilisateurs belges,
  commerciaux et autres en Belgique.

  ______________________________________________________________________

  Table des matières






















































  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 possibiltés/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 Néerlandais
        2.4.2 Français
        2.4.3 Allemand
        2.4.4 Wallon
     2.5 Support de langue et des codepages maternels

  3. Configurer l'accés à 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 Réseau
        3.1.5 Accorder des permissions aux fichiers
        3.1.6 Connection + déconnection
        3.1.7 Informations dépendantes 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 + déconnection
     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 néerlandais
        6.1.3 Linux-sites en français
        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 Néerlandais
        6.3.2 Français
        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


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  PPoouurrqquuooii ccee ddooccuummeenntt??

  Puisqu'il n'y avait nulle part des informations sur internet pour les
  utilisateurs belges, nous avons commencé à récolter celles qui nous
  paraissaient les plus importantes. Ce HOWTO vise à être la liste
  définitives de toutes les informations propre à la Belgique pour
  Linux. Si vous ne le pensez pas, vous n'avez aucune excuses pour
  réclamer et certainement pas pour y participer. ;)

  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  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 placées en premier lieu sur internet
  (WWW) aux adresses suivantes  <http://dag.mind.be/howto/> et
  <http://club.euronet.be/howto.html>, veuillez vérifier régulièrement
  que la copie que vous avez est la dernière mise à jour.

  11..33..  VVeerrssiioonnss ttrraadduuiitteess

  Ce document est actuellement traduit en 3 langues (Anglais, Français
  et Néerlandais), nous essayons de les garder toutes 3 en
  synchronisation mais la version Anglaise en est la source!

  Les versions anglaise et néerlandaise sont maintenues par Dag Wieërs
  dag@mind.be et se trouvent à:  <http://dag.mind.be/howto/>.

  La version française est maintenue par Dany Vanderroost
  danyv@euronet.be et se trouve à:
  <http://club.euronet.be/dany.vanderroost/howto.html>.

  11..44..  CCoonnttrriibbuuttiioonnss

  Quelques personnes nous ont écrits leurs suggestions et améliorations,
  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.

  11..55..  FFeeeeddbbaacckk

  Si quelques informations vous sembles fausses, décevantes ou
  manquantes, nous apprécierions que vous nous envoyiez les
  améliorations. Comme nous ne sommes que des êtres humains, ce document
  ne peut être sans fautes mais votre contribution peut et fera la
  différence.

  Pour vous ajouter à un groupe d'utlisateur Linux ou commercial,
  envoyez nous toutes les informations utiles.

  11..66..  LLeeggaall ssttuuffff

  Les trademarks restent la propriétés de leurs auteurs.

  Même si les informations données 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.

  11..77..  TTooddoo

  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.

  22..  CCoonnffiigguurraattiioonn

  22..11..  LLee ccllaavviieerr

  Linux offre 2 méthodes pour configurer votre clavier. En mode console,
  vous pouvez utiliser loadkeys et sous XFree86 vous utiliserez xmodmap.

  22..11..11..  MMooddee ccoonnssoollee

  Pour utiliser la table de caractères d'un clavier belge, voici la
  marche à suivre

          loadkeys be2-latin1



  ou

          loadkeys be-latin1



  La seule différence 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 démarrage par des scripts situés
  quelque part dans _/_e_t_c_/_r_c_._d Certaines distributions le font
  différemment. Mais la plupart utilisent un simple programme (comme
  kbdconfig chez RedHat ou yast chez SuSE) pour en changer les valeurs.

  22..11..22..  XXFFrreeee8866

  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
  paramétres 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

  Vérifiez (et changez si nécessaire) que vous avez les entrées
  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 réfutant le
  pingouin ;p) vous pouvez activer ces 3 touches supplémentaires 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 préfèrent utiliser un alias (compose key) pour les
  caractères spéciaux, 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 caractère 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.

  22..22..  LLeess aapppplliiccaattiioonnss eett lleess ppoossssiibbiillttééss//mmooddeess dd''aaffffiicchhaaggee

  Certaines applications ont besoin d'être compilées avec l'option
  "8-bit clean" pour pouvoir fonctionner correctement avec la table de
  caractère européenne. D'autres le font automatiquement.

  22..22..11..  UUttiilliissaattiioonn ddee ffoonntteess IISSOO--88885599--11 eenn mmooddee ccoonnssoollee

  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 caractères ë, è, é 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 désirez l'activer
  par défaut 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




  )

  NNoottee:: 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




  22..22..22..  SSuuppppoorrtt dduu ssyymmbbooll EEuurroo

  Depuis que l'Europe a inventé un nouveau caractère, 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 caractère qui sont incluses dans le paquet EURO que
  vous pouvez downloader sur: <ftp://ftp.freshmeat.net/pub/euro-patch/>.
  Bientôt, 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 activée:

          SYSFONT=lat0-16.psf



  pour être sure que vous utilisez la bonne fonte.

  22..33..  FFuusseeaauu hhoorraaiirree

  Comme la Belgique est située 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é).

  NNoottee:: certaines distributions ont un chemin d'accés différent,
  l'information du fuseau horaire peut se trouver dans _/_u_s_r_/_s_h_a_r_e ou
  autre...

  NNoottee22:: 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 définie en tant que local (local time) (qui est
  fortement découragé 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 différence ? ;p]

  22..44..  LLooccaallee ssuuppppoorrtt oouu llee ssuuppppoorrtt mmuullttiillaanngguueess

  Pas beaucoups de programmes ont ce support, si vous désirez 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 problèmes plus
  difficile à résoudre si peu de personne peuvent vous aider !! Vous
  pouvez comprendre un problème quand il est écrit en anglais technique
  mais il n'en est pas de même avec certains termes obscure venant de la
  francisation ?!? Certains, manifestement, ne comprennent ni l'un ni
  l'autre. ;p

  22..44..11..  NNééeerrllaannddaaiiss

  Pour activer le support du Néerlandais en Belgique sur un système
  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.

  22..44..22..  FFrraannççaaiiss

  Si vous désirez le support Français, mettez:

          LANG=fr
          LANGUAGE=fr_BE



  Essayez fr_BE.ISO_8859-1 si fr_BE ne fonctionne pas.

  22..44..33..  AAlllleemmaanndd

  Si, enfin, vous désirez le support Allemand, mettez:

          LANG=de
          LANGUAGE=de_BE



  Essayez de_BE.ISO_8859-1 si de_BE ne fonctionne pas.

  22..44..44..  WWaalllloonn

  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.

  22..55..  SSuuppppoorrtt ddee llaanngguuee eett ddeess ccooddeeppaaggeess mmaatteerrnneellss

  Ces options ajoutent le support des characterset et codepages belges.
  Si vous désirez les avoir, il vous faudra recompiler le kernel avec
  ces options incluses.Ils ne s'appliquent que sur certains systèmes
  (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)


  Situés 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




  33..  CCoonnffiigguurreerr ll''aaccccééss àà IInntteerrnneett ((iinnffoorrmmaattiioonnss ssuurr lleess IISSPP bbeellggeess))

  33..11..  CCoonnnneeccttiioonn aavveecc uunn mmooddeemm ((PPPPPP))

  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 brièvement, mais si vous avez des questions ou
  problèmes, lisez trés attentivement les HOWTO.

  33..11..11..  CCoonnffiigguurraattiioonn dduu mmooddeemm

  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/>.

  AAtttteennttiioonn: si vous possédez un winmodem, vous ne pourrez l'utiliser.
  Pour plus d'informations sur ceux-ci, allez à:
  <http://linmodems.org/>

  33..11..22..  IInnssttaalllleerr ppppppdd

  Maintenant, vous devez avoir installé le paquet ppp (verifiez en
  tapant pppd --version), soyez certain d'avoir une version récente.
  Ensuite, vérifiez 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 numéro de téléphone
                  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 nécessaire. Normallement 0.0.0.0
                  DEVICE=/dev/ttyS1       # Port série 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 dés que tout fonctionne normalement.

  PPSS:: Vous pouvez remplacer


                  CONNECT         ''                              \



  par

                  CONNECT         \\d\\c                          \



  si vous avez des problèmes 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 système. Celles par
  défauts 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



  Dés que la connection fonctionne à merveille, vous pouvez ôter la
  fonction debug .

  AAtttteennttiioonn:: il est important de formater certains caractères spéciaux,
  ainsi, tout caractère différent de [a-zA-Z0-9] et '_', sera passé en
  le précédant du caractère '\'. Ainsi, 'e!b$l+' deviendra 'e\!b\$l\+'.
  Essayez si vous avez des problèmes !

  33..11..33..  ppaapp--sseeccrreettss // cchhaapp--sseeccrreettss

  Si votre FAI (ISP) requière 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       *






  33..11..44..  RRéésseeaauu

  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 accéder à une URL:
  c'est probablement l'erreur.

          domain nom_de_domaine_de_votre_isp
          nameserver votre_premier_DNS
          nameserver votre_second_DNS




  33..11..55..  AAccccoorrddeerr ddeess ppeerrmmiissssiioonnss aauuxx ffiicchhiieerrss

  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 données inclues dans ces
  fichiers. Si toutefois, vous autorisez d'autres utilisateurs à faire
  des connections, il est préférable 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




  33..11..66..  CCoonnnneeccttiioonn ++ ddééccoonnnneeccttiioonn

  Dés 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 déconnecter avec:

          ppp off



  et pour prendre quelques statistiques, tapez:

          ppp status



  ou

          pppstats




  33..11..77..  IInnffoorrmmaattiioonnss ddééppeennddaanntteess ddeess FFAAII ((IISSPP))


     DDiiggiibbeell::

        CCeerrttiiffiiccaattiioonn::
           PAP

        DDNNSS::
           194.119.240.62

        WWeebb::
           <http://www.digibel.org/>

        SSuuppppoorrtt::
           <http://support.digibel.be/linuxsup.htm>

     DDMMAA::

        CCeerrttiiffiiccaattiioonn::
           texte

        DDNNSS::
           195.13.24.1

        WWeebb::
           <http://www.dma.be/>

        SSuuppppoorrtt::
           <http://bewoner.dma.be/robvdw/ned/dma-nl.txt>

     EEuunneett::

        CCeerrttiiffiiccaattiioonn::
           texte

        OOppttiioonnss::
           proxyarp

        DDNNSS::
           193.74.208.135

        WWeebb::
           <http://www.eunet.be/>

        SSuuppppoorrtt::
           <http://www.Belgium.EU.net/customer/support/personnal/linux/>

     FFrreeeebbeell::

        CCeerrttiiffiiccaattiioonn::
           PAP

        DDNNSS::
           194.149.160.9, 194.149.160.1

        WWeebb::
           <http://www.freebel.net/>

        SSuuppppoorrtt
           pas encore officiel

     OOnnlliinnee::

        CCeerrttiiffiiccaattiioonn::
           texte

        OOppttiioonnss::
           noccp

        DDNNSS::
           62.112.0.7, 194.88.127.7

        WWeebb::
           <http://www.online.be/>


        SSuuppppoorrtt::
           pas encore officiel

     PPiinngg::

        CCeerrttiiffiiccaattiioonn::
           texte

        WWeebb::
           <http://www.ping.be/>

        SSuuppppoorrtt::
           <http://www.ping.be/Support/redhat.shtml>

     PPllaanneett IInntteerrnneett::

        CCeerrttiiffiiccaattiioonn::
           CHAP

        DDNNSS::
           194.119.232.3, 194.119.232.2

        WWeebb::
           <http://www.planetinternet.be/>

        SSuuppppoorrtt::
           pas encore officiel

     SSkkyynneett ((BBeellggaaccoomm))::

        CCeerrttffiiccaattiioonn::
           PAP

        DDNNSS::
           195.238.2.21, 195.238.2.22

        OOppttiioonnss::
           defaultroute

        WWeebb::
           <http://www.skynet.be/>

        SSuuppppoorrtt::
           pas encore officiel

     UUUUNNeett::

        CCeerrttiiffiiccaattiioonn::
           PAP

        WWeebb::
           <http://www.uunet.be/>

        DDNNSS::
           194.7.1.4, 194.7.15.70

        SSuuppppoorrtt::
           pas encore officiel

     VVTT44::

        CCeerrttiiffiiccaattiioonn::
           PAP

        WWEEBB::
           <http://www.vt4.net/>
        SSuuppppoorrtt::
           pas encore officiel

     WWaannaaddoooo ((EEuurroonneett))::

        CCeerrttiiffiiccaattiioonn::
           texte

        DDNNSS::
           195.74.193.12, 194.134.0.12

        WWeebb::
           <http://www.euronet.be/>  <www.wanadoo.be>

        SSuuppppoorrtt::
           <http://www.euronet.be/support/uk/linux/>

     WWoorrlldd OOnnlliinnee::

        CCeerrttiiffiiccaattiioonn::
           CHAP

        DDNNSS::
           212.233.1.34, 212.233.2.34

        WWeebb::
           <http://www.worldonline.be/>

        SSuuppppoorrtt::
           pas encore officiel

     XXSS44AALLLL::

        CCeerrttiiffiiccaattiioonn::
           PAP

        DDNNSS::
           194.109.6.66, 194.109.9.99

        WWeebb::
           <http://www.xs4all.be/>

        SSuuppppoorrtt::
           <http://pws1.xs4all.be/~helpdesk/new/linux/linuxconnect.html>

     YYuuccoomm::

        CCeerrttiiffiiccaattiioonn::
           CHAP

        WWeebb::
           <http://www.yucom.be/>

        SSuuppppoorrtt::
           pas encore officiel

  33..22..  CCoonnnneeccttiioonn aavveecc vvoottrree aaddaappttaatteeuurr RRNNIISS ((IISSDDNN))

  CCoonnttrriibbuutteedd bbyy CChhrriissttoopphhee LLaammbbiinn ccllaammbbiinn@@sskkyynneett..bbee

  Cette section ne vise pas à être un guide définitif sur l'ISDN pour
  Linux. Pour plus de détails sur ce sujet, référez-vous à Paul
  Slootman's ISDN4Linux HOWTO et ISDN4Linux-FAQ.



  33..22..11..  MMiissee àà jjoouurr dduu kkeerrnneell

  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>

  AAtttteennttiioonn:: si vous avez acheté récemment 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 datée du 1
  juillet 1999 ou ultérieure !

  Dés que l'ISDN est en place, vous démarrez le driver. Par exemple:

          modprobe hisax type=11 protocol=2



  Référez-vous aux Readme's pour les paramétres et valeurs correctes
  selon votre carte.

  33..22..22..  IISSDDNN44LLiinnuuxx

  Ensuite, vous avez besoin du kit ISDN4Linux.  Vous pouvez downloader
  la dernière version de ce kit à:  <ftp://ftp.suse.com/pub/isdn4linux/>

  33..22..33..  CCoonnffiigguurraattiioonn ddee ll''iinntteerrffaaccee

  Dés que ce kit est installé et configuré, écrivez un script
  configurant l'interface pour faire la connection. Comme toujours sous
  Linux, il y a différentes manière d'y arriver.

  _/_e_t_c_/_r_c_._d_/_r_c_._i_s_d_n:

          #!/bin/sh
          MSNREMOTE='555-1212'    # Numéro du FAI
          MSNLOCAL='555-1313'     # mon nuémro 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'éxécuter dés le démarrage de la machine, il faut le rendre
  exécutable 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 paramétres 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




  AAtttteennttiioonn:: Ne pas spécifier +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 spécifié.

  AAtttteennttiioonn:: il est important de formater certains caractères spéciaux,
  ainsi, tout caractère différent de [a-zA-Z0-9] et '_', sera passé en
  le précédant du caractère '\'. Ainsi, 'e!b$l+' deviendra 'e\!b\$l\+'.
  Essayez si vous avez des problèmes !

  Finalement, créez _/_e_t_c_/_p_p_p_/_i_p_-_d_o_w_n_._l_o_c_a_l pour manipuler la
  déconnection de l'interface:

          #!/bin/sh
          /sbin/ifconfig $1 down
          sleep 1
          /sbin/ifconfig $1 10.0.0.2 pointopoint




  NNoottee:: ceci est pour traiter quelques problèmes avec le routage lors
  des déconnnections.  Quelqu'un a-t-il une solution plus élégantes?

  33..22..44..  ppaapp--sseeccrreettss // cchhaapp--sseeccrreettss

  Si votre FAI utilise PAP ou CHAP, créez 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       *




  33..22..55..  NNeettwwoorrkk

  Pas réellement relatif à l'ISDN, mais de nombreuses personnes oublient
  cette phase (trops passionnées pour essayer de suite toute la matière
  apprise plus haut? :-)).

  Dans tous le cas, vous devez configure le DNS en créant 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




  33..22..66..  PPeerrmmiissssiioonnss ddeess ffiicchhiieerrss

  Avant de pouvoir exécuter un script, vous devez le rendre exécutable.
  Souez sûr d'avoir mis les bonnes permissions afin qu'aucun autres
  utilisateurs ne puisse lir les mots de passe contenus dans ces
  fichiers. Si vous désirez qu'un autre utilisateur puisse communiquer,
  référez-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




  33..22..77..  CCoonnnneeccttiioonn ++ ddééccoonnnneeccttiioonn

  Finalement, vous pouvez créer un petit script pour démarrer 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




  Dés 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




  33..33..  CCaabblleemmooddeemm ((DDHHCCPP))

  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 décrit
  tout ce que vous voulez savoir (en plus des informations ci-dessous)

  Beaucoups de personnes veulent connecter un réseau entier sur leur
  cablemodem, ce n'est pas un problème.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 problèmes) est de redémarrer votre cablemodem.


     CChheelllloo ((TTVVDD))::

        WWeebb::
           <http://www.chello.be/>

        SSuuppppoorrtt::
           pas encore officiel

        PPlluuss dd'' iinnffoorrmmaattiioonnss::
           <http://foobar.starlab.net/~soggie/tvd_linux/>

     PPaannddoorraa ((TTeelleenneett))::

        PPrrooxxyy aauuttoommaattiiqquuee::
           http://pac.pandora.be:8080

        hhttttpp pprrooxxyy::
           export http_proxy="http://proxy.pandora.be:8080/"

        WWeebb::
           <http://www.pandora.be/>

        SSuuppppoorrtt::
           pas encore officiel

        PPlluuss dd''iinnffoorrmmaattiioonnss::
           <http://users.pandora.be/de.boeve/pandora.html>

  33..44..  AADDSSLL


     TTuurrbboolliinnee ((BBeellggaaccoomm))::

        QQuueellqquueess rreennsseeiiggnneemmeenntt::
           utiliser DANA

        WWeebb::
           <http://www.turboline.be/>

        SSuuppppoorrtt::
           pas encore officiel

        PPlluuss dd''iinnffoorrmmaattiioonnss::
           <http://foobar.starlab.net/~soggie/turboline/>

  44..  GGrroouuppee ddeess uuttiilliissaatteeuurrss bbeellggeess ddee LLiinnuuxx((BBeellggiiaann LLiinnuuxx uusseerr ggrroouuppss
  oouu BBLLUUGG))

  Plus d'informations peuvent être trouvées dans le User Group HOWTO
  situé à: <http://www.ntlug.org/~kclark/> Une liste compléte des
  Groupes d'Utilisateurs de Linux est sur:
  <http://www.ssc.com/linux/glue/> et sur:
  <http://limestone.uoregon.edu/woven/lugww/>



  44..11..  AALLLLIINN LLiinnuuxx UUsseerr GGrroouupp


          Mechelbaan 260
          B-3130 Begijnendijk




     EEmmaaiill::
        allin@linuxfreak.com

     WWeebb::
        <http://come.to/allin/>

     CCoonnttaacctt::
        Paul Terweduwe paul@faes.be

     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        13 Avril 1999.

  44..22..  AAnnttwweerrpp LLiinnuuxx UUsseerr GGrroouupp ((AALLUUGG))


          Van Luppenstraat 70
          B-2018 Antwerp




     TTéélléépphhoonnee::
        +32 3 218 63 54

     EEmmaaiill::
        fv.alug@advalvas.be

     WWeebb::
        <http://sunsite.belnet.be/alug/>

     CCoonnttaacctt::
        Patrick Op de Beeck alug@pandora.be

     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        26 Décembre 1999.

  44..33..  BBrruusssseellss LLiinnuuxx UUsseerr GGrroouupp ((BBLLUUGG))


          Brussels Linux User Group (BLUG)




     EEmmaaiill::
        johanb@linux.rave.org

     WWeebb::
        <http://linux.rave.org/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        24 Février 1999.




  44..44..  CChhaarrlleerrooii LLiinnuuxx UUsseerr GGrroouupp ((CCAARROOLLIINNUUXX))


     Charleroi Linux User Group (CAROLINUX)




     EEmmaaiill::
        spirou@carolo.net

     WWeebb::
        <http://carolo.net/carolinux/>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        23 Septembre 1999.

  44..55..  HHCCCC LLiimmbbuurrggssee LLiinnuuxx GGeebbrruuiikkeerrss GGrrooeepp ((HHLLLLGGGG))


          HCC Limburgse Linux Gebruikers Groep




     EEmmaaiill::
        Linuxgg@hotmail.com

     WWeebb::
        <http://www.uunet.be/hcc/Limburg/Linuxgg>

     CCoonnttaacctt::
        Andy Peeters & Bruno Tony


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        31 Mai 1999.

  44..66..  HHCCCC LLiinnuuxx GGeebbrruuiikkeerrss GGrrooeepp AAnnttwweerrppeenn


          Armand Verachtert
          Turnhoutsebaan 421
          2140 Borgerhout




     WWeebb::
        <http://users.glo.be/~poe/index.html>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        25 Février 1999.

  44..77..  HHCCCC LLiinnuuxx GGeebbrruuiikkeerrss GGrrooeepp LLeeuuvveenn


          Diegemstraat 61
          B-1930 Zaventem




     EEmmaaiill::
        Yvo.Dries@village.uunet.be
     WWeebb::
        <http://www.uunet.be/hcc/>

     CCoonnttaacctt::
        Yvo Dries Yvo.Dries@village.uunet.be


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        2 Août 1999.

  44..88..  IInnddeeppeennddeenntt GGrroouupp ooff UUnniixx--AAlliikkeess aanndd NNeettwwoorrkk AAccttiivviissttss ((IIGGUUAANNAA))


          Milcampslaan 101
          B-1040 Schaarbeek




     TTéélléépphhoonnee::
        +32 2 657 77 36

     FFaaxx::
        +32 2 657 77 38

     EEmmaaiill::
        info@iguana.be

     WWeebb::
        <http://www.iguana.be/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        5 Mars 1999.

  44..99..  IInnffooggrrooeepp ((IIGGWWEE))


          Pleinlaan 2, 5F218 (building F)
          B-1050 Brussels




     TTéélléépphhoonnee::
        +32 2 629 33 56

     FFaaxx::
        +32 2 629 33 89

     EEmmaaiill::
        ig@igwe.vub.ac.be

     WWeebb::
        <http://igwe.vub.ac.be/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        6 Juillet 1999.

  44..1100..  LLeeuuvveennssee LLiinnuuxx UUsseerrss ((LL22UU))


          Leuvense Linux Users (L2U)


     EEmmaaiill::
        darkcompanion@village.uunet.be

     WWeebb::
        <http://l2u.iguana.be/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        28 Novembre 1999.

  44..1111..  LLiimmbbuurrggssee LLiinnuuxx UUsseerr GGrroouupp ((LLIILLUUGG))


          Limburgse Linux User Group (LILUG)




     EEmmaaiill::
        frank.eersels@ping.be

     WWeebb::
        <http://lilug.linuxatwork.at/>

     CCoonnttaacctt::
        Frank Eersels frank.eersels@ping.be


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        6 Mai 1999.

  44..1122..  LLiinnuuxx..bbee vvzzww//aassbbll


          Linux.be vzw/asbl
          Organisation pour la promotion de Linux en Belgique




     EEmmaaiill::
        info@linux.iguana.be

     WWeebb::
        <http://linux.iguana.be/>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        23 Septembre 1999.

  44..1133..  LLiinnuuxx BBeellggiiaann TTeeaamm


          Rue d'Aineffe 4
          B-4317 Borlez Faimes




     EEmmaaiill::
        manu@rtfm.be

     WWeebb::
        <http://linux.rtfm.be/>

     CCoonnttaacctt::
        Alexandre J.D. Dulaunoy adulau@rtfm.be
     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        25 Février 1999.

  44..1144..  LLiinnuuxx GGeebbrruuiikkeerrss OOoosstt--VVllaaaannddeerreenn ((LLGGOOVVLL))


          Linux Gebruikers Oost-Vlaanderen




     EEmmaaiill::
        dennis@lgovl.freeservers.com

     WWeebb::
        <http://lgovl.freeservers.com/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        25 Février 1999.

  44..1155..  LLiinnuuxx UUsseerr GGrroouupp DDee BBrruuxxeelllleess ((BBxxLLUUGG))


          Linux User Group De Bruxelles (BxLUG)




     EEmmaaiill::
        bxl_information@linuxbe.org

     WWeebb::
        <http://bxlug.linuxbe.org/>

     CCoonnttaacctt::
        Raphael Bauduin bxl_information@linuxbe.org


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        17 Juillet 1999.

  44..1166..  LLiinnuuxx UUsseerr GGrroouupp DDee NNaammuurr


          Linux User Group De Namur




     EEmmaaiill::
        namur@linuxbe.org

     WWeebb::
        <http://namur.linuxbe.org/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        17 Juillet 1999.

  44..1177..  LLiinnuuxx UUsseerr GGrroouupp MMoonnss


          Linux User Group Mons


     EEmmaaiill::
        webmaster@linuxwallonie.org

     WWeebb::
        <http://www.linuxwallonie.org/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        26 Mai 1999.

  44..1188..  LLiinnuuxx UUsseerr MMoovveemmeenntt UUnnddeerrggrroouunndd MMaadd BBeellggiiaann AAlliieennss ((LLUUMMUUMMBBAA))


          Universiteitslaan 1, Filii Lamberti
          3590 Diepenbeek




     EEmmaaiill::
        helpdesk@lumumba.luc.ac.be

     WWeebb::
        <http://lumumba.luc.ac.be/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        25 Février 1999.

  44..1199..  lliinnuuxxbbee..oorrgg


          linuxbe.org




     EEmmaaiill::
        team@linuxbe.org

     WWeebb::
        <http://linuxbe.org/>

     CCoonnttaacctt::
        Cedric Gavage niddle@linuxbe.org


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        7 Février 2000.

  44..2200..  LLooccaall LLiinnuuxx SSuuppppoorrtt GGrroouupp GGeenntt ((LLLLSSGGGG))


          Wim Vandeputte
          PB 144
          B-9000 Gent 12




     TTéélléépphhoonnee::
        +32 9 240 29 17

     FFaaxx::
        +32 9 240 34 39

     EEmmaaiill::
        wvdputte@reptile.rug.ac.be

     WWeebb::
        <http://llsgg.rug.ac.be/>

     CCoonnttaacctt::
        Wim Vandeputte wvdputte@reptile.rug.ac.be


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        4 Mars 1999.

  44..2211..  OOppeenn TTeecchhnnoollooggyy AAsssseemmbbllyy LLiinnuuxx SSppeecciiaall IInntteerreesstt GGrroouupp


          Kruipstraat 14
          B-1850 Grimbergen




     TTéélléépphhoonnee::
        +32 11 27 58 98

     FFaaxx::
        +32 11 27 03 89

     EEmmaaiill::
        info@ota.be

     WWeebb::
        <http://www.ota.be/sigs/linux/>

     CCoonnttaacctt::
        Jan Vanhercke jan.vanhercke@c-cure.be


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        4 Mars 1999.

  44..2222..  SSttuuddeenntt IInnffoorrmmaattiioonn NNeettwwoorrkkiinngg ((SSIINN))


          Kleinhoefstraat 4
          B-2440 Geel




     EEmmaaiill::
        sin@sin.khk.be

     WWeebb::
        <http://www.sin.khk.be/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        12 Juin 1999.

  44..2233..  TTIINNAA





     EEmmaaiill::
        vraagtina@digibel.org

     WWeebb::
        <http://tina.digibel.org/>

     CCoonnttaacctt::
        Roman Pauwels art@ping.be


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        3 Septembre 1999.

  44..2244..  UUnniixx LLoovveerrss YYiieelldd SSttuuddeenntt SSeerrvviicceess && IInntteerrnneett SSuuppppoorrtt ((UULLYYSSSSIISS))


          Blijde Inkomsstraat 21, lokaal 01.17
          B-3000 Leuven




     TTéélléépphhoonnee::
        +32 16 32 48 61

     EEmmaaiill::
        ulyssis@ulyssis.student.kuleuven.ac.be

     WWeebb::
        <http://www.ulyssis.student.kuleuven.ac.be/org/ulyssis/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        25 Février 1999.

  44..2255..  ZZeeuuss WWPPII -- WWeerrkkggrrooeepp IInnffoorrmmaattiiccaa RRUUGG


          Krijgslaan 281 S9
          B-9000 Gent




     TTéélléépphhoonnee::
        +32 09 264 47 51

     EEmmaaiill::
        info@zeus.rug.ac.be

     WWeebb::
        <http://www.zeus.rug.ac.be/>

     CCoommmmeennttaaiirree::
        Réservé aux étudiants de la RUG


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        22 Juin 1999.

  55..  LLeess sseerrvviicceess ccoommmmeerrcciiaauuxx bbeellggeess ddee LLiinnuuxx

  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/>.

  55..11..  aaDDOOCC SSeerrvviicceess


          Avenue du Pesage, 31-33
          B-1050 Brussels




     TTéélléépphhoonnee::
        +32 2 646 00 76

     EEmmaaiill::
        sales@adoc-services.com

     WWeebb::
        <http://www.adoc-services.com/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        25 Février 1999.

  55..22..  AArraaffooxx


      Avenue Joseph Wybranlaan 40
      B-1070 Brussels




     PPhhoonnee::
        +32 2 529 59 91

     FFaaxx::
        +32 2 529 59 92

     EEmmaaiill::
        info@arafox.com

     WWeebb::
        <http://www.arafox.com/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        11 February 2000.

  55..33..  BBeetttteerr AAcccceessss NN..VV..


          Geldenaakse Vest 6
          3000 Leuven




     TTéélléépphhoonnee::
        +32 16 29 80 45

     FFaaxx::
        +32 16 29 80 46

     EEmmaaiill::
        info@ba.be


     WWeebb::
        <http://www.ba.be/>

     TTyyppee ddee ssuuppppoorrtt::
        Aprés une installation sur site, nous aidons nos clients via une
        administration à distance avecSSH. La plupart des problèmes sont
        transmis via email ou par notre propre system basé sur le web.
        Cela ne signifie pas qu'une fois en passant, un support
        téléphonique arrive..

     EExxppeerrttiissee ssppéécciiaallee::
        Sécurité, administration système et setup, sécurity
        (firewalling, tigerteaming, VPN, etc.),définition de éseaux,
        réseaux sans fils, perturbations, développement de produit, etc.
        Visitez http://www.ba.be pour plus d'informations.


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        7 Mars 1999.

  55..44..  DD.. CCoonnnneecctt


          Av. Van Goidtsnoven 33
          B-1180 Uccle




     EEmmaaiill::
        webmaster@dconnect.be

     WWeebb::
        <http://www.dconnect.be/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        25 Février 1999.

  55..55..  DDoouubbllee BBaarrrreell CCoonnssuullttaannccyy aanndd PPrroodduuccttiioonnss


          Sportstraat 28
          B-9000 Gent




     TTéélléépphhoonnee::
        +32 9 222 77 64

     FFaaxx::
        +32 9 222 49 76

     EEmmaaiill::
        mvergall@double-barrel.be

     WWeebb::
        <http://www.double-barrel.be/>

     CCoonnttaacctt::
        Michael C. Vergallen mvergall@double-barrel.be

     TTyyppee ddee ssuuppppoorrtt::
        téléphone, email, administration à distance, chez nous, sur
        site.
     EExxppeerriiccee ssppéécciiaallee::
        installation, administration système, connection internet et
        intranet, sendmail, firewalls, proxys, DNS, perturbations
        software & hardware.


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        5 Mars 1999.

  55..66..  ggrrmmbbll pprroodduuccttiioonnss


          Korte Vuldersstraat
          B-8000 Brugge




     TTéélléépphhoonnee::
        +32 50 344366

     EEmmaaiill::
        info@grmbl.com

     WWeebb::
        <http://www.grmbl.com/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        2 Mars 1999.

  55..77..  LLIIFFEE


          Mgr. Vanwaeyenberglaan 6/10
          B-3000 Leuven




     TTéélléépphhoonnee::
        +32 477 57 50 71

     EEmmaaiill::
        info@life.be

     WWeebb::
        <http://www.life.be/>

     CCoonnttaacctt::
        Jasper Nuyens jasper@life.be

     TTyyppee ddee ssuuppppoorrtt::
        LIFE est la première 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.

     EExxppeerrttiissee ssppéécciiaallee::
        Kernel driver development, database interconnectivity (VPN,
        wireless networking), security auditing (firewall, VPN, ethical
        hacking), e-commerce. Visitez notre WWW.



     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        20 April 1999.

  55..88..  MMIINNDD NNVV


          Naamsesteenweg 296
          B-3001 Heverlee - Leuven




     PPhhoonnee::
        +32 476 594 217 or +32 476 468 405

     EEmmaaiill::
        info@mind.be

     WWeebb::
        <http://mind.be/>

     CCoonnttaacctt::
        Peter Vandenabeele peter@mind.be ou Dag Wieërs dag@mind.be

     TTyyppee ooff ssuuppppoorrtt::
        Installation & configuration, auditing & consultancy, support &
        maintenance, training & education, research & development.

     SSppeecciiaall eexxppeerrttiissee::
        Large Linux deployements, company security and network audits,
        remote server maintenance, application and kernel development,
        cluster computing, data recovery, ... See our website.


     LLaasstt mmooddiiffiieedd::
        11 Février 2000.

  55..99..  PPhhiiddaannii SSooffttwwaarree SSPPRRLL


          Rue de l'autonomie 1
          B-1070 Brussels




     EEmmaaiill::
        info@phidani.be

     WWeebb::
        <http://www.phidani.be/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        25 Février 1999.

  55..1100..  SSppiieerr BBVVBBAA


          Knaptandstraat 96-98
          B-9100  Sint-Niklaas





     EEmmaaiill::
        info@spier,be

     WWeebb::
        <http://www.spier.be/>


     DDeerrnniièèrree mmooddiiffiiccaattiioonn::
        02 Mars 1999.

  55..1111..  VViirrggooPPlluuss sspprrll


          Rue Dartois 1
          B-4000 Liège




     TTéélléépphhoonnee::
        +32 4 253 00 59

     FFaaxx::
        +32 4 253 00 49

     EEmmaaiill::
        contact@virgoplus.com

     WWeebb::
        <http://www.virgoplus.com/>

     CCoonnttaacctt::
        Bruno Mairlot bruno@virgoplus.com

     TTyyppee ddee ssuuppppoorrtt::
        téléphonique, email,ou administration réseaux à distance, chez
        nous, sur site

     EExxppeerrttiissee ssppéécciiaallee::
        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
        expérience avec les distributions Red Hat.


     DDeerrnniièèrree mmooddiiffiiccaattiioonnyy::
        28 Juin 1999.

  66..  BBeellggiiaann LLiinnuuxx rreessoouurrcceess

  66..11..  WWeebbssiitteess

  66..11..11..  LLiinnuuxx eenn BBeellggiiqquuee


  ·  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>


  66..11..22..  LLiinnuuxx--ssiitteess eenn nnééeerrllaannddaaiiss


  ·  <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>

  66..11..33..  LLiinnuuxx--ssiitteess eenn ffrraannççaaiiss


  ·  linuxbe.org <http://linuxbe.org/>

  ·  linux-france.org <http://www.linux-france.org/>

  66..11..44..  SSiitteess mmiirrooiirrss eenn BBeellggiiqquuee


  ·  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>

  66..22..  HHOOWWTTOO

  La collection la plus importante d'informations sur Linux est sur
  internet. SVP, si vous découvrez des informations erronées dans l'un
  d'eux, prenez contact avec l'auteur. C'est la seule manière de le
  corriger et de rester ensemble ;)

  66..22..11..  WWeebb


  ·  HOWTO's at KULeuven <http://www.kulnet.kuleuven.ac.be/LDP/HOWTO/>

  ·  HOWTO's at SIN <http://www.sin.khk.be/mirror/LDP/>

  66..22..22..  FFTTPP


  ·  HOWTO's at Belnet
     <ftp://ftp.belnet.be/mirror/sunsite.unc.edu/pub/Linux/docs/HOWTO/INDEX.html>




  66..33..  TTrraadduuccttiioonnss ddeess HHOOWWTTOOss

  Comme le Néerlandais est le moins répandu, c'est la dernière version
  supportée. Mais c'est en passe d'être résolu ;) (et peut-être, pouvez-
  vous nous aider ?!?) Les versions Française et Allemande sont
  maintenues.

  66..33..11..  NNééeerrllaannddaaiiss

  Une bonne initiative est en chantier mais il y a encore beaucoups à
  faire. Si vous désirez y participer, commencez la traduction et
  envoyez la à:  <http://nl.linux.org/doc/HOWTO/>.

  66..33..22..  FFrraannççaaiiss

  Les versions françaises des HOWTOs peuvent être trouveées sur:
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/french/>

  66..33..33..  AAlllleemmaanndd

  Les versions allemandes sont sur:
  <ftp://sunsite.unc.edu/pub/Linux/HOWTO/translations/german/>

  66..44..  FFTTPP

  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 préférable de le
  prendre prés de chez vous ;) Naturellement, si j'en ai oublié, envoyez
  moi votre adresse ou correction.

  66..44..11..  KKeerrnneell--ssoouurrcceess


  ·  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/>

  66..44..22..  DDiissttrriibbuuttiioonnss


  ·  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/>

  66..44..33..  SSooffttwwaarree


  ·  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/>

  66..55..  UUsseenneett


  ·  <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>




  66..66..  MMaaiilliinngglliissttss

  66..66..11..  LLiinnuuxx eenn BBeellggiiqquuee


  ·  info@linux.iguana.be

  ·  lugs@linux.iguana.be

  66..66..22..  LLiinnuuxx uusseerr ggrroouuppss


  ·  BLUG Mailinglist

  ·  L2U Mailinglist

  ·  LILUG Mailinglist

  ·  LGOVL Mailinglist

  66..77..  IIRRCC

  La façon 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...

  11..  IInnttrroodduuccttiioonn

  _"_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  mmeessuurreerr  la
  vitesse a laquelle un ordinateur execute une tache calculatoire, et ce
  de   facon   a    pouvoir    comparer    differentes    configurations
  logicielles/materielles.  Ceci  n'a  aauuccuunn  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.

  11..11..  PPoouurrqquuooii ll''eevvaalluuaattiioonn ddee ppeerrffoorrmmaanncceess eesstt--eellllee ssii iimmppoorrttaannttee ??

  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  ccoouutt  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 ssttaabbiilliittee est toujours plus importante que
  la vitesse d'execution.

  11..22..  NNoonn--ccrriitteerreess eenn mmaattiieerree dd''eevvaalluuaattiioonn ddee ppeerrffoorrmmaanncceess

  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.

  22..  PPrroocceedduurreess dd''eevvaalluuaattiioonn  ddee  ppeerrffoorrmmaanncceess  eett  iinntteerrpprreettaattiioonn  ddeess
  rreessuullttaattss

  Quelques recommendations semi-evidentes :

  1. Premierement et avant tout, iiddeennttiiffiieezz vvooss  oobbjjeeccttiiffss  dd''eevvaalluuaattiioonn
     ddee  ppeerrffoorrmmaanncceess. 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. UUttiilliisseezz ddeess oouuttiillss ssttaannddaarrdd. 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 ddeessccrriippttiioonn ccoommpplleettee de votre  configuration  materielle
     (voir le formulaire de compte-rendu plus loin).

  4. Essayez  d'iissoolleerr uunnee vvaarriiaabbllee uunniiqquuee. L'evaluation de performances
     comparative est plus informative que l'evaluation  de  performances
     "absolue". JJee nn''iinnssiisstteerraaii jjaammaaiiss aasssseezz llaa--ddeessssuuss.

  5. VVeerriiffiieezz  vvooss  rreessuullttaattss.  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,  ppaarrttaaggeezz--llaa   avec   la
     communaute Linux de facon pprreecciissee et ccoonncciissee.

  7. OOuubblliieezz  lleess  BBooggooMMiippss 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 !

  22..11..  CCoommpprreennddrree lleess cchhooiixx eenn mmaattiieerree ddee bbeenncchhmmaarrkkss

  22..11..11..  BBeenncchhmmaarrkkss ssyynntthheettiiqquueess vvss.. bbeenncchhmmaarrkkss aapppplliiccaattiiffss

  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  WWhheettssttoonnee,  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 ssppeecciiffiiqquuee 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 SSPPEECC, 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.

  22..11..22..  BBeenncchhmmaarrkkss ddee hhaauutt--nniivveeaauu vvss.. ddee bbaass--nniivveeaauu

  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.

  22..22..  BBeenncchhmmaarrkkss ssttaannddaarrdd ddiissppoonniibblleess ppoouurr LLiinnuuxx

  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 iissoollee 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.

  22..33..  LLiieennss eett rreeffeerreenncceess

  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 5566 bbeenncchhmmaarrkkss ddiiffffeerreennttss 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
  lliibbrreemmeenntt  a  ete  mis  en place par Alfred Aburto. La suite Whetstone
  utilisee dans le LBT est disponible sur ce site.

  Une FFAAQQ  mmuullttii--ffiicchhiieerr  ppaarr  EEuuggeennee  MMiiyyaa  est  egalement  postee  sur
  comp.benchmarks; c'est une excellente reference.

  33..  LLee LLiinnuuxx BBeenncchhmmaarrkkiinngg TToooollkkiitt ((LLBBTT))

  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.

  33..11..  MMoottiivvaattiioonnss

  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 ssyynntthheettiiqquueess devrait pousser un  sous-systeme
     particulier a ses limites.

  6. Les  resultats  des  benchmarks  ssyynntthheettiiqquueess ne devraient ppaass 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.

  33..22..  SSeelleeccttiioonn ddeess bbeenncchhmmaarrkkss

  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.

  33..33..  DDuurreeee ddeess tteessttss

  1. Compilation du noyau 2.0.0 : 5 - 30 minutes, selon  la  performance
     rreeeellllee 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.

  33..44..  CCoommmmeennttaaiirreess

  33..44..11..  CCoommppiillaattiioonn dduu nnooyyaauu 22..00..00

  +o  QQuuooii :: 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  RReessuullttaattss  ::  la  duree de compilation en minutes et secondes (s'il
     vous plait, ne rapportez pas les fractions de secondes).

  33..44..22..  LLaa ssuuiittee WWhheettssttoonnee

  +o  QQuuooii :: 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  RReessuullttaattss  :: un indice de performance en calcul flottant exprime en
     MWIPS.

  33..44..33..  XXbbeenncchh--00..22

  +o  QQuuooii :: 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  RReessuullttaattss :: un indice de performances exprime en xStones.

  +o  Note : ce test, en l'etat, est depasse. Il devrait etre re-ecrit.

  33..44..44..  UUnniixxBBeenncchh vveerrssiioonn 44..0011

  +o  QQuuooii : 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  RReessuullttaattss :: un indice de performance du systeme.

  (ndt  :  la  moyenne  geometrique se definit comme la racine n-ieme du
  produit des n termes consideres)
  33..44..55..  LLeess bbeenncchhmmaarrkkss BByytteemmaarrkk dduu mmaaggaazziinnee BBYYTTEE

  +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'iinnddiiccee  mmeemmooiirree. Calculez  la moyenne geometrique des indices des
     tests NUMERIC SORT, IDEA, HUFFMAN et FP EMULATION:  c'est  l'iinnddiiccee
     eennttiieerr.

  +o  RReessuullttaattss  ::  un  indice memoire et un indice entier calcules comme
     explique ci-dessus.

  33..55..  AAmmeelliioorraattiioonnss ppoossssiibblleess

  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.

  33..66..  FFoorrmmuullaaiirree ddee rraappppoorrtt LLBBTT

  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.
  ______________________________________________________________________

  33..77..  TTeesstt ddee ppeerrffoorrmmaanncceess rreesseeaauu

  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)

  33..88..  LLeess tteessttss SSMMPP

  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)

  44..  UUnnee eexxeeccuuttiioonn ttyyppee eett lleess rreessuullttaattss

  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 !

  55..  PPiieeggeess eett mmiisseess eenn ggaarrddee eenn mmaattiieerree dd''eevvaalluuaattiioonn ddee ppeerrffoorrmmaanncceess

  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.

  55..11..  CCoommppaarreerr ddeess ppoommmmeess eett ddeess oorraannggeess

  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.

  55..22..  IInnffoorrmmaattiioonn iinnccoommpplleettee

  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.

  55..33..  MMaatteerriieell//llooggiicciieell pprroopprriieettaaiirree

  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).

  55..44..  PPeerrttiinneennccee

  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...

  66..  FFAAQQ

     QQ11..
        Existe-t-il un indice de performances  specifique  aux  machines
        Linux ?
     AA.. 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.

     QQ22..
        Alors,  pourquoi  ne  pas choisir une douzaine de metriques pour
        resumer la performance de diverses machines Linux ?

     AA.. Ca serait une situation ideale. J'aimerai voir  ca  devenir  une
        realite. Y-a-t-il des volontaires pour un pprroojjeett dd''eevvaalluuaattiioonn ddee
        ppeerrffoorrmmaanncceess ssoouuss LLiinnuuxx ? Avec  un  site  Web  et  une  base  de
        donnees de rapports bien concus, complete et en ligne ?

     QQ33..

     AA.. Les  BogoMips  n'ont strictement rien a voir avec la performance
        de votre machine. Voir le BogoMips Mini-HOWTO.

     QQ44..
        Quel est le "meilleur" benchmark pour Linux ?

     AA.. 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.

     QQ55..
        Quel est le processeur le plus rapide pour Linux ?

     AA.. 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).

     QQ66..
        Laissez-moi reformuler la derniere question, alors : y-a-t-il un
        processeur qui soit le plus rapide dans les applications d'usage
        general ?

     AA.. 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...

     QQ77..
        Donc la frequence d'horloge du processeur a une influence sur la
        performance d'un systeme ?

     AA.. 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.

     QQ88..
        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
        ?

     AA.. 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...

     QQ99..
        Qu'est-ce qu'une amelioration significative des performances ?

     AA.. 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.
     QQ1100..
        Comment   puis-je  obtenir  une  amelioration  significative  de
        performance a moindre cout ?

     AA.. 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,  ll''iimmpplliiccaattiioonn  dd''uunn
        ccoonnssuullttaanntt LLiinnuuxx eesstt nneecceessssaaiirree. Cf. le Consultants-HOWTO.

  77..  CCooppyyrriigghhtt,, rreemmeerrcciieemmeennttss eett ddiivveerrss

  77..11..  CCoommmmeenntt ccee ddooccuummeenntt aa--tt--iill eettee pprroodduuiitt

  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 : LLyyXX eett
  SSGGMMLL--TToooollss.

  77..22..  CCooppyyrriigghhtt

  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).

  77..33..  NNoouuvveelllleess vveerrssiioonn ddee ccee ddooccuummeenntt

  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.

  77..44..  RReettoouurr

  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.

  77..55..  RReemmeerrcciieemmeennttss

  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.

  77..66..  PPaarraavveenntt

  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.

  77..77..  MMaarrqquueess ddeeppoosseeeess

  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­
  allèle, et inclut des liens vers des documents plus spécifiques et des
  pages web.
  ______________________________________________________________________

  Table des matières






















































  1. Préambule

     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. Aperçu de l'Architecture

     3.1 A quoi cela ressemble-t-il ?
     3.2 Comment utiliser les autres noeuds ?
     3.3 En quoi un Beowulf diffère-t-il d'un COW ?

  4. Conception du Système

     4.1 Brefs rappels sur la programmation parallèle
     4.2 Les méthodes de programmation parallèle
        4.2.1 Pourquoi plus d'un CPU ?
        4.2.2 La "caisse" en programmation parallèle
           4.2.2.1 Systèmes d'exploitation Mono-Tâche:
           4.2.2.2 Systèmes d'exploitation Multi-Tâches:
           4.2.2.3 Systèmes d'exploitation Multi-Tâches avec plusieurs CPU:
           4.2.2.4 Sous-tâches (Threads) sur les autres CPU d'un Système d'exploitation Multi-Tâches:
           4.2.2.5 Envoyer des messages sur des Systèmes d'exploitation Multi-Tâches avec plusieurs CPU:
     4.3 Architectures pour le calcul parallèle
        4.3.1 Architectures Matérielles
        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 parallèles
        4.5.1 Déterminer les parties concurrentes de votre programme
        4.5.2 Estimer le parallélisme efficacement
        4.5.3 Décrire les parties concurrentes de votre programme
           4.5.3.1 Les méthodes explicites
           4.5.3.2 Méthodes Implicites

  5. Ressources Beowulf

     5.1 Points de départ
     5.2 Documentation
     5.3 Publications
     5.4 Logiciels
     5.5 Machines Beowulf
     5.6 D'autres Sites Intéressants
     5.7 Histoire

  6. Code Source

     6.1 sum.c
     6.2 sigmasqrt.c
     6.3 prun.sh


  ______________________________________________________________________



  11..  PPrrééaammbbuullee

  11..11..  MMiissee eenn ggaarrddee

  Nous n'accepterons aucune responsabilité pour toute information
  incorrecte présente dans ce document, ni pour aucun des dommages qui
  pourraient en résulter.



  11..22..  CCooppyyrriigghhtt

  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.


  11..33..  AAuu ssuujjeett ddee ccee HHOOWWTTOO


  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 août 1998,
  il a été découpé 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 espérons que ce ne soit que le début de ce qui
  deviendra une documentation complète du Projet de Documentation
  Beowulf (Beowulf Documentation Project).


  11..44..  AAuu ssuujjeett ddeess aauutteeuurrss


  ·  Jacek Radajewski est Administrateur Réseau, et prépare 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 manière
     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, année où il a construit
     sa première machine pour l'utiliser avec l'instrumentation
     chimique. A ujourd'hui, le Dr. Eadline s'intéresse à Linux, aux
     clusters Beowulf, et aux algorithmes parallèles.  Le Dr. Eadline
     peut être joint par courriel à deadline@plogic.com


  11..55..  RReemmeerrcciieemmeennttss

  L'écriture du HOWTO Beowulf a été longue, et il est finalement complet
  grâce à 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 compréhension.

  ·  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 supérieur Christopher Vance pour de nombreuses bonnes idées.

  ·  Mon ami Russell Waldron pour de grandes idées de programmation, son
     intérêt général 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'idées.

  ·  Toutes les personnes qui sont responsables du système
     d'exploitation Linux et de tous les autres outils gratuits utilisés
     sur _t_o_p_c_a_t et les diverses machines Beowulf.



  22..  IInnttrroodduuccttiioonn

  Au fur et à mesure que les niveaux de performance et de commodité des
  ordinateurs et des réseaux augmentent, il devient de plus en plus
  facile de construire des systèmes informatiques parallèles à partir de
  composants facilement disponibles, plutôt que de construire des
  processeurs sur de très coûteux 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 matériel, puisque la pluspart des
  logiciels sont gratuits.


  22..11..  AA qquuii ss''aaddrreessssee ccee HHOOWWTTOO ??

  Ce HOWTO s'adresse aux personnes qui ont déjà eu au moins des contacts
  avec le système d'exploitation Linux. La connaissance de la
  technologie Beowulf ou d'un système d'exploitation plus complexe et de
  concepts réseaux n'est pas essentielle, mais des aperçus de la
  programmation parallèle sont bienvenus (après tout, vous devez avoir
  de bonnes raisons de lire ce document). Ce HOWTO ne répondra pas à
  toutes les questions que vous pourriez vous poser au sujet de Beowulf,
  mais, espérons-le, vous donnera des idées et vous guidera dans la
  bonne direction. Le but de ce HOWTO est de fournir des informations de
  base, des liens et des références vers des documents plus approfondis.


  22..22..  QQuu''eesstt--ccee qquuee BBeeoowwuullff ??

  _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
  poème épique le plus ancien en Anglais qui ait été conservé.  C'est
  l'histoire d'un héros d'une grande force et d'un grand courage qui a
  défait un monstre appelé Grendel. Voir l'``Historique'' pour en savoir
  plus sur le héros Beowulf.


  Il y a peut-être de nombreuses définitions de Beowulf, autant que de
  personnes qui construisent ou utilisent des Superordinateurs Beowulf.
  Certains disent qu'ils peuvent appeler leur système Beowulf seulement
  s'il est construit de la même façon que la machine d'origine de la
  NASA. D'autres vont à l'extrême inverse et appellent ainsi n'importe
  quel système de stations qui exécutent du code parallèle. Ma
  définition d'un Beowulf se situe entre ces deux avis, et est fondée
  sur de nombreuses contributions dans la liste de diffusion Beowulf.

  Beowulf est une architecture multi-ordinateurs qui peut être utilisée
  pour la programmation parallèle. Ce système comporte habituellement un
  noeud serveur, et un ou plusieurs noeuds clients connectés entre eux à
  travers Ethernet ou tout autre réseau. C'est un système construit en
  utilisant des composants matériels existants, comme tout PC capable de
  faire tourner Linux, des adaptateurs Ethernet standards, et des
  switches. Il ne contient aucun composant matériel propre et est
  aisément reproductible. Beowulf utilise aussi des éléments comme le
  système d'exploitation Linux, Parallel VirtualMachine (PVM) et Message
  Passing Interface (MPI). Le noeud serveur contrôle 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 extérieur. De grandes machines Beowulf peuvent avoir plus d'un
  noeud serveur, et éventuellement aussi d'autres noeuds dédiés à des
  tâches particulières, par exemple comme consoles ou stations de
  surveillance.  Dans de nombreux cas, les noeuds clients d'un système
  Beowulf sont idiots (dumb): plus ils sont idiots, mieux ils sont. Les
  noeuds sont configurés et contrôlés 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 même pas leur
  adresse IP ou leur nom jusqu'à ce que le serveur leur dise qui ils
  sont. Une des principales différences entre Beowulf et un Cluster de
  Stations de travail (COW) est le fait que Beowulf se comporte plus
  comme une simple machine plutôt 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 accède que par une connection
  distante ou par un terminal série. Les noeux Beowulf peuvent être
  envisagés comme un CPU + des ensembles de mémoires qui peuvent être
  branchés dans le cluster, exactement comme un CPU ou un module mémoire
  peut être branché dans une carte mère.


  Beowulf n'est pas un ensemble de matériels spécialisés, une nouvelle
  topologie réseau ou le dernier hack du kernel. Beowulf est une
  technologie de clustering d'ordinateurs Linux pour former un
  superordinateur parallèle, virtuel. Même 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 réseau qui partagent au moins le même système
  de fichier racine via NFS, et qui se font confiance pour exécuter des
  sessions distantes (rsh), alors on peut dire que vous avez un simple
  Beowulf de deux noeuds.



  22..33..  CCllaassssiiffiiccaattiioonn

  Les systèmes Beowulf ont été construits à partir de nombreux
  constituants.  Pour des considérations de performances, des composants
  moins communs (i.e.  produits par un seul fabricant) ont été utilisés.
  Afin de recenser les différents types de systèmes et de rendre les
  discussions au sujet des machines un peu plus faciles, nous proposons
  la méthode simple de classification suivante:

  CLASSE I BEOWULF:

  Cette classe concerne des machines faites d'éléments globalement
  disponibles.  Nous devrons utiliser les tests de certification
  "Computer Shopper" pour définir 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 assemblée à partir
  de pièces trouvées dans au moins quatre journaux de publicité de
  grande diffusion.


  Les avantages des systèmes de CLASS I sont:

  ·  le matériel est disponible de noubreuses sources (faible coût,
     maintenance facile)

  ·  ne dépendant pas d'un seul vendeur de matériel

  ·  support des drivers par les commodités Linux

  ·  basé habituellement sur des standards (SCSI, Ethernet, etc.)

  Les désavantages d'un système de CLASSE I sont:

  ·  de meilleures performances peuvent nécessiter du matériel 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 plutôt d'une classification
  de la machine.

  Les avantages d'un système de CLASSE II sont:

  ·  les performances peuvent être assez bonnes !

  Les désavantages des systèmes de CLASSE II sont:

  ·  le support des drivers peut varier

  ·  reposent sur un seul vendeur de matériel

  ·  peuvent être plus chers que les systèmes de CLASSE I.

  Une CLASSE n'est pas nécessairement meilleure qu'une autre. Cela
  dépend surtout de vos besoins et de votre budget. Cette classification
  des systèmes sert seulement à rendre les discussions sur les systèmes
  Beowulf un peu plus succintes. La "Conception du Système" peut aider à
  déterminer quelle sorte de système est le plus approprié à vos
  besoins.





  33..  AAppeerrççuu ddee ll''AArrcchhiitteeccttuurree



  33..11..  AA qquuooii cceellaa rreesssseemmbbllee--tt--iill ??

  Je pense que la meilleure façon de décrire l'architecture d'un
  superordinateur Beowulf est d'utiliser un exemple qui est très proche
  du vrai Beowulf, mais aussi familier à beaucoup d'administrateurs
  systèmes.  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 spécifique, 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 système 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 entrée pour le serveur et
  tous les autres clients dans son fichier /etc/hosts.equiv: ainsi tous
  les clients peuvent exécuter 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 mêmes 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 même 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 même
  présentation est que le système d'exploitation est installé et
  configuré de la même façon sur toutes les machines, les espaces /home
  et /usr/local sont physiquement sur le même serveur et les clients y
  accèdent via NFS. Pour plus d'informations sur NIS et NFS, reportez-
  vous à NIS et NFS.



  33..22..  CCoommmmeenntt uuttiilliisseerr lleess aauuttrreess nnooeeuuddss ??


  Maintenant que nous avons une vision correcte de l'architecture du
  système, 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
  répertoire de base, mais peut aussi éclater la même tâche sur
  différentes machines simplement en exécutant un shell distant. Par
  exemple, si nous voulons calculer la somme des racines carrées 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 carrées des nombres de
  1 à 10, nous exécutons :

  [jacek@beldin sigmasqrt]$ time ./sigmasqrt 1 10
  22.468278

  real    0m0.029s
  user    0m0.001s
  sys     0m0.024s


  La commande time nous permet de vérifier le temps mis en exécutant
  cette tâche. Comme nous pouvons le voir, cet exemple a pris seulement
  une petite fraction de seconde (0.029 sec) pour s'exécuter, mais que
  se passe-t-il si je veux ajouter la racine carrée 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'exécution de ce programme est considérablement
  supérieur.  La question évidente qui se pose est: est-il possible de
  diminuer le temps d'exécution de cette tâche et comment ? La réponse
  évidente est de découper la tâche en un ensemble de sous-tâches et
  d'exécuter ces sous-tâches en parallèle sur tous les ordinateurs. Nous
  pouvons séparer la grande tâche d'addition en 20 parties en calculant
  un intervalle de racines carrées et en les additionnant sur un seul
  noeud.  Quand tous les noeuds ont fini les calculs et retournent leurs
  résultats, les 20 nombres peuvent être additionnés ensemble et fournir
  la solution finale. Avant de lancer ce processus, nous allons créer un
  "named pipe" qui sera utilisé par tous les processus pour écrire leurs
  résultats:


  [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é
  nécessaire entre le démarrage du processus et le moment où les noeuds
  ont fini leurs calculs et écrit leurs résultats dans la pipe. Ce temps
  n'inclut pas l'addition finale des 20 nombres, mais il représente une
  petite fraction de seconde et peut être ignoré. Nous pouvons voir
  qu'il y a un avantage significatif à exécuter une tâche en parallèle.
  En fait la tâche en parallèle s'est exécutée 17 fois plus vite, ce qui
  est très raisonnable pour un facteur 20 d'augmentation du nombre de
  CPU. Le but de l'exemple précédent est d'illustrer la méthode la plus
  simple de paralléliser du code concurrent. En pratique, des exemples
  aussi simples sont rares et différentes techniques (les API de PVM et
  PMI) sont utilisées pour obtenir le parallélisme.



  33..33..  EEnn qquuooii uunn BBeeoowwuullff ddiiffffèèrree--tt--iill dd''uunn CCOOWW ??

  Le laboraroire d'informatique décrit plus haut est un exemple parfait
  d'un cluster de stations (COW). Qu'est-ce qui rend donc Beowulf si
  spécial et en quoi diffère-t-il d'un COW ? En réalité il n'y a pas
  beaucoup de différence, mais un Beowulf a quelques caractéristiques
  uniques. La première 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 accès aux noeuds clients sont
  faits par une connection distante du noeud serveur, un noeud dédié à
  une console, ou une console série. Cela parce qu'il n'y a aucun besoin
  pour un noeud client d'accéder à des machines en dehors du cluster, ni
  pour des machines en dehors du cluster d'accéder à des noeuds clients
  directement; c'est une pratique habituelle que les noeuds clients
  utilisent des adresses IP privées 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 connectée au monde externe en utilisant
  une seconde carte réseau est le noeud serveur. La façon la plus
  habituelle d'accéder au système 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 tâches sur tous les noeuds du cluster. Dans la
  plupart des cas, les COW sont utilisées pour des calculs parallèles la
  nuit et les week-ends, quand les stations ne sont pas utilisées
  pendant les journées de travail, utilisant ainsi les périodes de
  cycles libres des CPU. D'autre part, le Beowulf est une machine dédiée
  au calcul parallèle, et optimisée pour cette tâche. 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.



  44..  CCoonncceeppttiioonn dduu SSyyssttèèmmee

  Avant d'acheter du matériel, il serait de bon aloi de considérer le
  design de votre système. Il y a deux approches matérielles qui sont
  impliquées dans le design d'un système Beowulf: le type de noeuds ou
  d'ordinateurs que vous allez utiliser, et la méthode 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 matériel: la
  librairie de communication ou API. Une discussion plus détaillée sur
  le matériel 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
  considérations de conception qui doivent être prises pour la
  construction d'un cluster Beowulf. La science (ou art) de la
  "programmation parallèle" étant l'objet de nombreuses interprétations,
  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
  défninitif de matériel.


  44..11..  BBrreeffss rraappppeellss ssuurr llaa pprrooggrraammmmaattiioonn ppaarraallllèèllee

  Cette section fournit des informations générales sur les concepts de
  la programmation parallèle. Ceci n'est PAS exhaustif, ce n'est pas une
  description complète de la programmation parallèle ou de sa
  technologie. C'est une brève description des enjeux qui peuvent
  influer fortement sur le concepteur d'un Beowulf, ou sur son
  utilisateur.


  Lorsque vous déciderez de construire votre Beowulf, de nombreux points
  décrits plus bas deviendront importants dans votre processus de choix.
  A cause de la nature de ses "composants", un Superordinateur Beowulf
  nécessite de prendre de nombreux facteurs en compte, car maintenant
  ils dépendent de nous. En général, il n'est pas du tout difficile de
  comprendre les objectifs impliqués dans la programmation parallèle.
  D'ailleurs, une fois que ces objectifs sont compris, vos attentes
  seront plus réalistes, et le succès plus probable. Contrairement au
  "monde séquentiel", où la vitesse du processeur est considérée comme
  le seul facteur important, la vitesse des processeurs dans le "monde
  parallèle" n'est que l'un des paramètres qui détermineront les
  performances et l'efficacité du système dans son ensemble.



  44..22..  LLeess mméétthhooddeess ddee pprrooggrraammmmaattiioonn ppaarraallllèèllee

  La programmation parallèle peut prendre plusieurs formes. Du point de
  vue de l'utilisateur, il est important de tenir compte des avantages
  et inconvénients de chaque méthodologie. La section suivante tente de
  fournir quelques aperçus sur les méthodes de programmation parallèle
  et indique où la machine Beowulf fait défaut dans ce continuum.


  44..22..11..  PPoouurrqquuooii pplluuss dd''uunn CCPPUU ??

  Répondre à 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 données, un programme de
  ray-tracing, ou un planificateur de projets ? Peut-être plus de CPU
  peuvent-ils améliorer les performances. Mais qu'en est-il de
  simulations plus complexes, de la dynamique des fluides, ou d'une
  application de Fouille de Données (Data Mining) ? Des CPU
  supplémentaires sont absolument nécessaires dans ces situations.
  D'ailleurs, de multiples CPU sont utilisés pour résoudre de plus en
  plus de problèmes.

  La question suivante est habituellement: "Pourquoi ai-je besoin de
  deux ou quatre CPU ? Je n'ai qu'à attendre le méga super rapide
  processeur 986." Il y a de nombreuses raisons:

  1. Avec l'utilisation de systèmes d'exploitations multi-tâches, il est
     possible de faire plusieurs choses en même temps. Cela est un
     "parallélisme" 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 mémoire ? Malheureusement, celle-ci
     n'augmente pas aussi vite que celle des processeurs. Gardez à
     l'esprit que beaucoup d'applications ont besoin de mémoire autre
     que celle du cache processeur et de l'accès disque. Faire les
     choses en parallèle est une façon de contourner ces limitations.

  3. Les prédictions indiquent que la vitesse des processeurs ne
     continuera pas à doubler tous les 18 mois après l'an 2005. Il y a
     divers obstacles à surmonter pour maintenir ce rythme.

  4. Suivant l'application, la programmation parallèle peut accélérer
     les choses de 2 à 500 fois (et même plus dans certains cas). De
     telles performances ne sont pas disponibles sur un seul processeur.
     Même les Superordinateurs qui utilisaient à un moment un seul
     processeur spécialisé très rapide sont maintenant constitués de
     nombreux CPU plus banals.

  Si vous avez besoin de vitesse -- à cause d'un problème lié au calcul
  et/ou aux entrées/sorties --, il vaut la peine de considérer
  l'approche parallèle.  Comme le calcul parallèle est implémenté selon
  de nombreuses voies, résoudre votre problème en parallèle nécessitera
  de prendre quelques décisions importantes. Ces décisions peuvent
  affecter dramatiquement la protabilité, la performance, et le coût de
  votre application.

  Avant d'être par trop technique, regardons un vrai "problème de calcul
  parallèle" en utilisant un exemple qui nous est familier: faire la
  queue à une caisse.


  44..22..22..  LLaa ""ccaaiissssee"" eenn pprrooggrraammmmaattiioonn ppaarraallllèèllee

  Considérons un grand magasin avec 8 caisses regroupées 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 utilisées pour illustrer les concepts de la programmation
  parallèle:


  44..22..22..11..  SSyyssttèèmmeess dd''eexxppllooiittaattiioonn MMoonnoo--TTââcchhee::

  Une caisse ouverte (et en service) qui ne peut traiter qu'un client à
  la fois.

  Exemple en Informatique : MS DOS



  44..22..22..22..  SSyyssttèèmmeess dd''eexxppllooiittaattiioonn MMuullttii--TTââcchheess::

  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 même 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


  44..22..22..33..  SSyyssttèèmmeess dd''eexxppllooiittaattiioonn MMuullttii--TTââcchheess aavveecc pplluussiieeuurrss CCPPUU::

  Maintenant on ouvre plusieurs caisses dans le magasin. Chaque commande
  peut être traitée par une caisse différente et la queue peut avancer
  plus vite.  Ceci est appelé SMP - Gestion Multiple Symétrique
  (Symmetric Multi-processing).  Même 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



  44..22..22..44..  SSoouuss--ttââcchheess ((TThhrreeaaddss)) ssuurr lleess aauuttrreess CCPPUU dd''uunn SSyyssttèèmmee
  dd''eexxppllooiittaattiioonn MMuullttii--TTââcchheess::

  Si vous "séparez" les objets de votre commande, vous pouvez être
  capable d'avancer plus vite en utilisant plusieurs caisses en même
  temps. D'abord, nous postulons que vous achetez une grande quantité
  d'objets, parce que le temps que vous investirez pour "séparer" votre
  commande doit être regagné en utilisant plusieurs caisses. En théorie,
  vous devriez être capables de vous déplacer 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'accélération de l'application est liée à
  la portion séquentielle la plus lente exécutée par le programme (NdT:
  i.e. majorée par la tâche la plus lente).

  Exemple en Informatique : UNIX ou NT avec plusieurs CPU sur la même
  carte-mère avec des programmes multi-threads.



  44..22..22..55..  pplluussiieeuurrss CCPPUU:: EEnnvvooyyeerr ddeess mmeessssaaggeess ssuurr ddeess SSyyssttèèmmeess
  dd''eexxppllooiittaattiioonn MMuullttii--TTââcchheess aavveecc

  De façon à améliorer la performance, la Direction ajoute 8 caisses à
  l'arrière du magasin. Puisque les nouvelles caisses sont loin du
  devant du magasin, les caissiers doivent téléphoner pour envoyer leurs
  sous-totaux vers celui-ci. La distance ajoute un délai supplémentaire
  (en temps) dans la communication entre caissiers, mais si la
  communication est minimisée, cela ne pose pas de problème. Si vous
  avez vraiment une grosse commande, une qui nécessite toutes les
  caisses, alors comme avant votre vitesse peut être améliorée en
  utilisant toutes les caisses en même temps, le temps sopplémentaire
  devant être pris en compte. Dans certains cas, le magasin peut n'avoir
  que des caisses (ou des îlots de caisses) localisés dans tout le
  magasin : chaque caisse (ou îlot) doit communiquer par téléphone.
  Puisque tous les caissiers peuvent discutter par téléphone, leur
  emplacement importe peu.

  Exemple en Informatique : Une ou plusieurs copies d'UNIX ou NT avec
  plusieurs CPU sur la même, ou différentes cartes-mères communiquant
  par messages.

  Les scénarios précédents, même s'ils ne sont pas exacts, sont une
  bonne représentation des contraintes qui agissent sur les systèmes
  parallèles.  Contrairement aux machines avec un seul CPU (ou caisse),
  la communication est importante.


  44..33..  AArrcchhiitteeccttuurreess ppoouurr llee ccaallccuull ppaarraallllèèllee

  Les méthodes et architectures habituelles de la programmation
  parallèle sont représentées ci-dessous. Même si cette description
  n'est en aucun cas exhaustive, elle est suffisante pour comprendre les
  impératifs de base dans la conception d'un Beowulf.


  44..33..11..  AArrcchhiitteeccttuurreess MMaattéérriieelllleess


  Il y a typiquement deux façons d'assembler un ordinateur parallèle:


  1. La mémoire locale des machines qui communiquent par messages
     (Clusters Beowulf)

  2. Les machines à mémoire partagée qui communiquent à travers la
     mémoire (machines SMP)

  Un Beowulf typique est une collection de machines mono-processeurs
  connectées utilisant un réseau Ethernet rapide, et qui est ainsi une
  machine à mémoire locale. Une machine à 4 voies SMP est une machine à
  mémoire partagée et peut être utilisée pour du calcul parallèle -- les
  applications parallèles communiquant via la mémoire partagée. Comme
  pour l'analogie du grand magasin, les machines à mémoire locale (donc
  à caisse individuelle) peuvent être scalairisées jusqu'à un grand
  nombre de CPU ; en revanche, le nombre de CPU que les machines à
  mémoire partagée 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 mémoire.

  Il est toutefois possible de connecter des machines à mémoire partagée
  pour créer une machine à mémoire partagée "hybride". Ces machines
  hybrides "ressemblent" à une grosse machine SMP pour l'utilisateur et
  sont souvent appelées des machines NUMA (accès mémoire non uniforme)
  parce que la mémoire globale vue par le programmeur et partagée par
  tous les CPU peut avoir différents temps d'accès. A un certain niveau
  d'ailleurs, une machine NUMA doit "passer des messages" entre les
  groupes de mémoires partagées.

  Il est aussi possible de connecter des machines SMP en tant que noeuds
  de mémoire locale. Typiquement, les cartes-mères de CLASSE I ont soit
  2 ou 4 CPU et sont souvent utilisées comme moyens pour réduire le coût
  global du système.  L'arrangeur (scheduler) interne de Linux détermine
  combien de ces CPU sont partagés. L'utilisateur ne peut (à ce jour)
  affecter une tâche à un processeur SMP spécifique. Cet utilisateur
  peut quand même démarrer deux processus indépendants ou un programme
  multi-threads et s'attendre à voir une amélioration de performance par
  rapport à un système à simple CPU.




  44..33..22..  AArrcchhiitteeccttuurreess LLooggiicciieelllleess eett AAPPII

  Il y a basiquement deux façons d'"exprimer" la concurrence dans un
  programme:

  1. En envoyant des Messages entre les processeurs

  2. En utilisant les threads du système d'exploitation (natives)

  D'autres méthodes existent, mais celles-là sont le plus généralement
  employées. Il est important de se souvenir que l'expression de
  concurrence n'est pas nécessairement contrôlée par la couche
  matérielle. Les Messages et les Threads peuvent être implémentés sur
  des SMPn NUMA-SMP, et clusters -- même si, comme expliqué ci-dessous,
  l'efficacité et la portabilité sont des facteurs importants.



  44..33..22..11..  MMeessssaaggeess

  Historiquement, la technologie de passage de messages reflétait les
  débuts des ordinateurs parallèles à mémoire locale. Les messages
  nécessitent la copie des données tandis que les Threads utilisent des
  données à la place. Le temps de latence et la vitesse à laquelle les
  messages peuvent être copiés sont les facteurs limitants des modèles
  de passage de messages. Un message est assez simple: des données et un
  processeur de destination. Des API de passage de messages répandues
  sont entre autres PVM ou MPI. Le passage de Messages peut être
  implémenté 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
  décidez d'utiliser des clusters dans le futur, il est facile d'ajouter
  des machines ou de scalairiser vos applications.


  44..33..22..22..  TThhrreeaaddss

  Les Threads ont été développés sur les systèmes d'exploitation parce
  que la mémoire partagée des SMP (moutiprocessorage symmétrique)
  permettait une communication très rapide et une synchronisation de la
  mémoire partagée entre les parties d'un programme. Les Threads
  marchent bien sur les systèmes SMP parce que la communication a lieu à
  travers la mémoire partagée. Pour cette raison, l'utilisateur doit
  isoler les données locales des données globales, sinon les programmes
  ne fonctionneront pas correctement.  Cela est en contraste avec les
  messages: une grande quantité de copie peut être éliminée avec les
  threads car les données sont partagées entre les processus (threads).
  Linux implémente les Threads POSIX. Le problème avec les Threads vient
  du fait qu'il est difficile de les étendre au-delà d'une machine SMP,
  et, comme les données sont partagées entre les CPU, la gestion de la
  cohérence du cache peut contribuer à le charger. Etendre les Threads
  au-delà des limites des performances des SMP nécessite la technologie
  NUMA qui est chère et n'est pas nativement supportée par Linux.
  Implémenter des Threads par dessus les messages a été fait
  ((http://syntron.com/ptools/ptools_pg.htm)), mais les Threads sont
  souvent inefficients une fois implémentés en utilisant des messages.

  On peut résumer ainsi les performances:








            performance        performance
            machine SMP     cluster de machines  scalabilité
            -----------     -------------------  -----------
  messages     bonne             meilleure        meilleure

  threads    meilleure           mauvaise*        mauvaise*

  * nécessite une technologie NUMA coûteuse.




  44..33..33..  AArrcchhiitteeccttuurree ddeess AApppplliiccaattiioonnss

  Pour exécuter une application en parallèle sur des CPU multiples,
  celle-ci doit être explicitement découpée en parties concurrentes. Une
  application standard mono-CPU ne s'exécutera pas plus rapidement même
  si elle est exécutée sur une machine multi-processeurs. Certains
  outils et compilateurs peuvent découper les programmesn mais la
  parallélisation n'est pas une opération "plug and play".  Suivant
  l'application, la parallélisation peut être facile, extrêmement
  difficile, voire impossible suivant les contraintes de l'algorithme.

  Avant de parler des besoins applicatifs, il nous faut introduire le
  concept de Convenance (Suitability).


  44..44..  CCoonnvveennaannccee

  Beaucoup de questions au sujet du calcul parallèle ont la même
  réponse:

  "Cela dépend entièrement de l'application."

  Avant de passer directement aux opportunités, il y a une distinction
  très importante qui doit être faite: la différence entre CONCURRENT et
  PARALLELE.  Pour clarifier cette discussion, nous allons définir ces
  deux termes ainsi:

  les parties CONCURRENTES d'un programme sont celles qui peuvent être
  calculées indépendamment.

  Les parties PARALLELES d'un programme sont celles qui sont exécutées
  sur des éléments de calculs au même moment.

  La distinction est très importante, parce que la CONCURRENCE est une
  propriété d'un programme et l'efficacité en PARALLELISME est une
  propriété de la machine.  Idéalement, l'exécution en parallèle doit
  produire des performances plus grandes. Le facteur limitant les
  performances en parallèle 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 threadées à cause de la cohérence du
  cache). De nombreux tests de performances communs sont hautement
  parallèles, et ainsi la communication et le temps de latence ne sont
  pas les points importants. Ce type de problème peut être appelé
  "évidemment parallèle".  D'autres applications ne sont pas si simples
  et exécuter des parties CONCURRENTES du programme en PARALLELE peut
  faire en sorte que le programme fonctionne plus lentement, et ainsi
  décaler toute performance de gain dans d'autres parties CONCURRENTES
  du programme. En termes plus simples, le coût en temps de
  communication doit en pâtir au profit de celui gagné en temps de
  calcul, sinon l'exécution PARALLELE des parties CONCURRENTES est
  inefficace.

  La tâche du programmeur est de déterminer quelles parties CONCURRENTES
  le programmeur DOIT exécuter en PARALLELE et pour quelles parties il
  NE DOIT PAS le faire. Sa réponse déterminera l'EFFICACITE de
  l'application. Le graphe suivant résume la situation pour le
  programmeur:





           | *
           | *
           | *
   % des   | *
   appli-  |  *
   cations |  *
           |  *
           |  *
           |    *
           |     *
           |      *
           |        ****
           |            ****
           |                ********************
           +-----------------------------------
            temps de communication/temps de calcul



  Dans un ordinateur parallèle parfait, le rapport communication/calcul
  devrait être égal et tout ce qui est CONCURRENT pourrait être
  implémenté en PARALLELE.  Malheureusement, les vrais ordinateurs
  parallèles, incluant les machines à mémoire partagée, sont sujets aux
  effets décrits dans ce graphe. En concevant un Beowulf, l'utilisateur
  devrait garder celui-ci en tête parce que la performance dépend 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 parallèles, mais il n'y a aucune
  garantie qu'elles seront efficaces sur une plateforme différente.

  EN GENERAL, IL N'EXISTE PAS DE PROGRAMME PORTABLE EFFICACE EN
  PARALLELE

  Il y a encore une autre conséquence au graphe précédent. Puisque
  l'efficacité dépend du rapport communication/calcul, changer juste un
  composant du rapport ne signifie pas nécessairement qu'une application
  s'exécutera plus rapidement. Un changement de vitesse processeur, en
  gardant la même vitesse de communication, peut avoir des effets
  inattendus sur votre programme. Par exemple, doubler ou tripler la
  vitesse du processeur, en gardant la même vitesse de communication,
  peut maintenant rendre des parties de votre programme qui sont
  efficaces en PARALLELE, plus efficaces si elles étaient exécutées
  SEQUENTIELLEMENT. Cela dit, il se peut qu'il soit plus rapide
  maintenant d'exécuter les parties qui étaient avant PARALLELES en tant
  que SEQUENTIELLES. D'autant plus qu'exécuter des parties inefficaces
  en PARALLELE empêchera votre application d'atteindre sa vitesse
  maximale. Ainsi, en ajoutant un processeur plus rapide, vous avez
  peut-être ralenti votre application (vous enpêchez 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 matériel parallèle, vous devez avoir un bon aperçu des
  capacités d'une machine particulière pour votre application. Vous
  devez tenir compte de beaucoup de facteurs: vitesse de la CPU,
  compilateur, API de passage de messages, réseau... 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 connaître son coût au niveau de la
  communication. Il se peut que pour un certain système, le coût de
  communication ne rende pas efficace de paralléliser ce code.


  Une note finale sur une erreur commune: on dit souvent qu'"un
  programme est PARALLELISE", mais en réalité seules les parties
  CONCURRENTES ont été identifiées. Pour toutes les raisons précédentes,
  le programme n'est pas PARALLELISE. Une PARALLELISATION efficace est
  une propriété de la machine.



  44..55..  EEccrriirree eett ppoorrtteerr ddeess llooggiicciieellss ppaarraallllèèlleess

  A partir du mmoment où vous avez décidé de concevoir et de construire
  un Beowulf, considérer un instant votre application en accord avec les
  observations précédentes est une bonne idée.

  En général, vous pouvez faire deux choses:

  1. Y aller et construire un Beowulf CLASSE I et après y ajuster votre
     application. Ou exécuter des applications parallèles que vous savez
     fonctionner sur votre Beowulf (mais attention à la portabilité et à
     l'efficacité en accord avec les informations citées ci-dessus).

  2. Examiner les applications dont vous avez besoin sur votre Beowulf,
     et faire une estimation quant au type de matériel et de logiciels
     qu'il vous faut.

  Dans chaque cas, vous devrez considérer les besoins en efficacité.  En
  général, il y a trois choses à faire:

  1. Déterminer les parties concurrentes de votre programme

  2. Estimer le parallélisme efficacement

  3. Décrire les parties concurrentes de votre programme

  Examinons-les successivement:


  44..55..11..  DDéétteerrmmiinneerr lleess ppaarrttiieess ccoonnccuurrrreenntteess ddee vvoottrree pprrooggrraammmmee

  Cette étape est couvent considérée comme "paralléliser votre
  programme".  Les décisions de parallélisation seront faites à l'étape
  2. Dans cette étape, vous avez besoin de déterminer les liens et les
  besoins dans les données.

  D'un point de vue pratique, les applications peuvent présenter deux
  types de concurrence: calcul (travaux numériques) et E/S (Bases de
  Données). Même 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 conçus pour le
  FORTRAN. Il y a deux raisons pour lesquelles le FORTRAN est utilisé:
  historiquement, la majorité des applications gourmandes en calculs
  numériques é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.




  44..55..22..  EEssttiimmeerr llee ppaarraalllléélliissmmee eeffffiiccaacceemmeenntt

  Sans l'aide d'outils, cette étape peut nécessiter un cycle de tests et
  erreurs, ou seulement de bons vieux réflexes bien éduqués. Si vous
  avez une application spécifique en tête, essayez de déterminer la
  limite du CPU (liée au calcul) ou les limites des disques (liées aux
  E/S). Les spécifités de votre Beowulf peuvent beaucoup dépendre de vos
  besoins. Par exemple, un problème lié au calcul peut ne nécessiter
  qu'un petit nombre de CPU très rapides et un réseau très rapide à
  faible temps de latence, tandis qu'un problème 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 systèmes peuvent avoir des contraintes de coûts qui doivent être
  optimisées.  Pour les problèmes liés aux E/S, il existe une loi peu
  connue (appelée la loi de Eadline-Dedkov) qui est assez utile:

  Soient deux machines parallèles avec le même index de performance CPU
  cumulée, celle qui a les processeurs les plus lents (et probablement
  un réseau de communication interprocesseur plus lent) aura les
  meilleures performances pour des applications dominées par les E/S.

  Même si les preuves de cette règle vont au-delà de ce document, vous
  pouvez trouver intéressant 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 déterminé quel type de concurrence vous avez
  dans votre application, vous devrez estimer à quel point elle sera
  efficace en parallèle. 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 liée aux calculs est mesurée
  en minutes et que les données peuvent être transférées en secondes,
  alors c'est un bon candidat pour la parallélisation. Mais souvenez-
  vous que si vous prenez une boucle de 16 minutes et la coupez en 32
  morceaux, et que vos transferts de données ont besoin de quelques
  secondes par partie, alors cela devient plus réduit en termes de
  performances. Vous atteindrez un point de retours en diminution.


  44..55..33..  DDééccrriirree lleess ppaarrttiieess ccoonnccuurrrreenntteess ddee vvoottrree pprrooggrraammmmee

  Il y a plusieurs façons de décrire les parties concurrentes de votre
  programme:

  1. L'exécution parallèle explicite

  2. L'exécution parallèle implicite

  La différence principale entre les deux est que le parallélisme
  explicite est déterminé parl'utilisateur, alors que le parallélisme
  implicite est déterminé par le compilateur.


  44..55..33..11..  LLeess mméétthhooddeess eexxpplliicciitteess

  Il y a principalement des méthodes où l'utilisateur peut modifier le
  code source spécifique pour une machine parallèle. 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 déplacer
  entre les cartes-mères SMP).

  Les méthodes explicites tendent à être les plus difficiles à
  implémenter et à déboguer. 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 méthodes
  parallèles plus faciles à implémenter (i.e. les fonctions
  scatter/gather). De plus, il est aussi possible d'ajouter des
  librairies standard qui ont été écrites pour des ordinateurs
  parallèles.  Souvenez-vous quand même 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 parallèle (outils,
  librairies ...). De nombreux programmeurs utilisent maintenant C ou
  réécrivent leurs applications FORTRAN existantes en C, avec l'idée que
  C permettra une exécution plus rapide.  Même si cela est vrai puisque
  C est la chose la plus proche du code machine universel, il a quelques
  inconvénients majeurs. L'utilisation de pointeurs en C rend la
  détermination des dépendances entre données et l'analyse automatique
  des pointeurs extrêmement difficiles. Si vous avez des applications
  existantes en FORTRAN et que vous voudrez les paralléliser dans le
  futur - NE LES CONVERTISSEZ PAS EN C !


  44..55..33..22..  MMéétthhooddeess IImmpplliicciitteess

  Les méthodes implicites sont celles dans lesquelles l'utilisateur
  abandonne quelques décisions de parallélisation (ou toutes) au
  compilateur. Par exemple le FORTRAN 90, High Performance FORTRAN
  (HPF), Bulk Synchronous Parallel (BSP), et toute une série de méthodes
  qui sont en cours de développement.

  Les méthodes implicites nécessitent de la part de l'utilisateur des
  informations concernant la nature concurrente de leur application,
  mais le compilateur prendra quand même beaucoup de décicions sur la
  manière d'exécuter cette concurrence en parallèle. Ces méthodes
  procurent un niveau de portabilité et d'efficacité, mais il n'y a pas
  de "meilleure façon" de décrire un problème concurrent pour un
  ordinateur parallèle.


  55..  RReessssoouurrcceess BBeeoowwuullff



  55..11..  PPooiinnttss ddee ddééppaarrtt



  ·  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



  55..22..  DDooccuummeennttaattiioonn



  ·  La dernière version du Beowulf HOWTO en
     Anglaishttp://www.sci.usq.edu.au/staff/jacek/beowulf.

  ·  La dernière version du Beowulf HOWTO en Françaishttp://www.e-
     nef.com/linux/beowulf.

  ·  Construire un système 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



  55..33..  PPuubblliiccaattiioonnss



  ·  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




  55..44..  LLooggiicciieellss


  ·  PVM - Parallel Virtual Machine/Machine Parallèle 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




  55..55..  MMaacchhiinneess BBeeoowwuullff


  ·  Avalon consiste en 140 processeurs Alpha, 36 Go de RAM, et est
     probablement la machine Beowulf la plus rapide, allant à 47.7
     Gflops et classée 114ème 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, constituée de 16 CPU
     et 1.2 Go de RAM. http://www.sci.usq.edu.au/staff/jacek/topcat

  ·  MAGI cluster -- c'est un très bon site avec de nombreux liens de
     qualité. http://noel.feld.cvut.cz/magi/




  55..66..  DD''aauuttrreess SSiitteess IInnttéérreessssaannttss



  ·  Linux SMPhttp://www.linux.org.uk/SMP/title.html

  ·  Paralogic - Achetez un Beowulf http://www.plogic.com


  55..77..  HHiissttooiirree



  ·  Légendes - Beowulf  http://legends.dm.net/beowulf/index.html

  ·  Les Aventures de Beowulf
     http://www.lnstar.com/literature/beowulf/beowulf.html


  66..  CCooddee SSoouurrccee


  66..11..  ssuumm..cc


  /* 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;

  }




  66..22..  ssiiggmmaassqqrrtt..cc

























  /* 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;

  }





  66..33..  pprruunn..sshh































  #!/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 LLiinnuuxx 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 LLiinnuuxx    sont  aussi  inclues.
  CCeettttee vveerrssiioonn ffrraannccaaiissee aa eettee rreeaalliisseeee ppaarr
   _L_a_u_r_e_n_t _R_E_N_A_U_D (lrenaud@hol.fr).

  11..  IInnttrroodduuccttiioonn

  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  LLiinnuuxx   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.]

  11..11..  RReessppoonnssaabbiilliittee eett CCooppyyrriigghhtt

  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.

  11..22..  DDooccuummeennttaattiioonn AAssssoocciieeee

  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.

  11..33..  LLee ggrroouuppee ddee ddiissccuussssiioonn LLiinnuuxx

  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 LLiinnuuxx (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.

  11..44..  NNoouuvveelllleess VVeerrssiioonnss ddee ccee DDooccuummeenntt

  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 LLiinnuuxx 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>

  22..  VVuuee dd''EEnnsseemmbbllee ddeess PPaarraammeettrreess ddee DDeemmaarrrraaggee

  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*
  ______________________________________________________________________

  22..11..  LLIILLOO ((LLIInnuuxx LLOOaaddeerr))

  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,  LLiinnuuxx,  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.

  22..22..  LLooaaddLLiinn

  L'autre chargeur de noyau couramment utilise est `LoadLin' qui est  un
  programme  DOS  qui  est  capable de lancer un noyau LLiinnuuxx 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 LLiinnuuxx  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 LLiinnuuxx 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 LLiinnuuxx.

  Il y a aussi  d'autres  programmes  qui  peuvent  etre  utilises  pour
  demarrer LLiinnuuxx. Pour une liste complete, regardez sur votre miroir ftp
  LLiinnuuxx  local,  les   programmes   disponibles   dans   le   repertoire
  system/Linux-boot/.

  22..33..  LL''uuttiilliittaaiirree ````rrddeevv''''

  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).

  22..44..  CCoommmmeenntt llee nnooyyaauu ggeerree tt--iill lleess ppaarraammeettrreess ??

  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.

  22..55..  PPoossiittiioonnnneemmeenntt ddeess VVaarriiaabblleess dd''EEnnvviirroonnnneemmeenntt..

  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.

  22..66..  PPaasssseerr ddeess ppaarraammeettrreess aauu pprrooggrraammmmee ``iinniitt''

  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.

  33..  PPaarraammeettrreess GGeenneerraauuxx nnoonn ssppeecciiffiiqquueess aa uunn PPeerriipphheerriiqquuee

  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.

  33..11..  OOppttiioonnss dduu ssyysstteemmee ddee ffiicchhiieerrss rraacciinnee

  Les  options  suivantes  determinent  toutes  la  facon  dont le noyau
  selectionne et manipule le systeme de fichiers racine.

  33..11..11..  LLee ppaarraammeettrree ``rroooott==''

  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.

  33..11..22..  LLee ppaarraammeettrree ``rroo''

  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.

  33..11..33..  LLee ppaarraammeettrree ``rrww''

  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

  33..22..  OOppttiioonnss lliieeeess aa llaa ggeessttiioonn ddeess ddiissqquueess vviirrttuueellss ((ddiissqquueess RRAAMM))

  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.

  33..22..11..  LLee ppaarraammeettrree ``rraammddiisskk__ssttaarrtt==''

  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.

  33..22..22..  LLee ppaarraammeettrree ``llooaadd__rraammddiisskk==''

  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.

  33..22..33..  LLee ppaarraammeettrree ``pprroommpptt__rraammddiisskk==''

  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.

  33..22..44..  LLee ppaarraammeettrree ``rraammddiisskk__ssiizzee==''

  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.

  33..22..55..  LLee ppaarraammeettrree ``rraammddiisskk=='' ((oobbssoolleettee))

  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.

  33..22..66..  LLee ppaarraammeettrree ``nnooiinniittrrdd'' ((ddiissqquuee RRAAMM iinniittiiaall))

  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.

  33..33..  PPaarraammeettrreess ddee DDeemmaarrrraaggee rreellaattiiffss aa llaa GGeessttiioonn ddee llaa MMeemmooiirree..

  Les  parametres suivants modifient la facon dont linux detecte ou gere
  la memoire physique et virtuelle de votre systeme.

  33..33..11..  LLee ppaarraammeettrree ``mmeemm==''

  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  LLiinnuuxx  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.

  33..33..22..  LLee ppaarraammeettrree ``sswwaapp==''

  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.

  33..33..33..  LLee ppaarraammeettrree ``bbuuffff==''

  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.

  33..44..  PPaarraammeettrreess ddee ddeemmaarrrraaggee ppoouurr lleess ssyysstteemmeess ddee ffiicchhiieerrss rraacciinnee NNFFSS

  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.

  33..44..11..  LLee ppaarraammeettrree ``nnffssrroooott==''

  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

  33..44..22..  LLee ppaarraammeettrree ``nnffssaaddddrrss==''

  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.

  33..55..  DD''aauuttrreess ppaarraammeettrreess ddee ddeemmaarrrraaggee ddiivveerrss

  Ces  differents  parametres de demarrage permettent a l'utilisateur de
  gerer certains parametres internes du noyau.

  33..55..11..  LLee ppaarraammeettrree ``ddeebbuugg''

  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.

  33..55..22..  LLee ppaarraammeettrree ``iinniitt==''

  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.

  33..55..33..  LLee PPaarraammeettrree ``nnoo338877''

  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 LLiinnuuxx 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 LLiinnuuxx ne peut pas.

  33..55..44..  LLee PPaarraammeettrree ``nnoo--hhlltt''

  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 LLiinnuuxx 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
  LLiinnuuxx,  bien  qu'ils doivent etre informes du fait que le remplacement
  dans le cadre de la garantie est possible.

  33..55..55..  LLee ppaarraammeettrree ``nnoo--ssccrroollll''

  L'utilisation de ce parametre au  demarrage  desactive  le  defilement
  d'ecran  (scrolling) qui rend difficile l'emploi de terminaux Braille.

  33..55..66..  LLee ppaarraammeettrree ``ppaanniicc==''

  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.

  33..55..77..  LLee ppaarraammeettrree ``pprrooffiillee==''

  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.

  33..55..88..  LLee ppaarraammeettrree ``rreebboooott==''

  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.

  33..55..99..  LLee ppaarraammeettrree ``rreesseerrvvee==''

  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.

  33..55..1100..  LLee ppaarraammeettrree ``vvggaa==''

  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.

  44..  PPaarraammeettrreess ddee ddeemmaarrrraaggee ppoouurr lleess PPeerriipphheerriiqquueess SSCCSSII

  Cette section contient une description des parametres de demarrage qui
  sont  utilises pour passer des informations concernant les adaptateurs
  hotes et les peripheriques SCSI.
  44..11..  PPaarraammeettrreess ppoouurr lleess ppiillootteess ddee nniivveeaauu iinntteerrmmeeddiiaaiirree

  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.

  44..22..  NNoommbbrree mmaaxxiimmuumm ddee LLUUNN ccoonnttrroolleess ((``mmaaxx__ssccssii__lluunnss==''))

  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.

  44..33..  PPaarraammeettrreess ppoouurr lleess LLeecctteeuurrss ddee BBaannddeess SSCCSSII ((``sstt==''))

  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.

  44..44..  PPaarraammeettrreess ppoouurr lleess aaddaappttaatteeuurrss SSCCSSII

  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.

  44..44..11..   AAddaapptteecc  aahhaa115511xx,,  aahhaa115522xx,,   aaiicc66226600,,   aaiicc66336600,,   SSBB1166--SSCCSSII
  ((``aahhaa115522xx==''))

  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.

  44..44..22..  AAddaapptteecc aahhaa115544xx ((``aahhaa11554422==''))

  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.

  44..44..33..  AAddaapptteecc aahhaa227744xx,, aahhaa228844xx,, aaiicc77xxxxxx ((``aaiicc77xxxxxx==''))

  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.

  44..44..44..  AAddaappttaatteeuurrss SSCCSSII AAddvvaannSSyyss ((``aaddvvaannssyyss==''))

  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.

  44..44..55..  AAddaappttaatteeuurr AAllwwaayyss IINN22000000 ((``iinn22000000==''))

  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
  ______________________________________________________________________

  44..44..66..  MMaatteerriieell bbaassee ssuurr uunn AAMMDD AAMM5533CC997744 ((``AAMM5533CC997744==''))

  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

  44..44..77..  LLeess sseerrvveeuurrss SSCCSSII BBuussLLooggiicc aavveecc lleess nnooyyaauuxx vv11..22 ((``bbuussllooggiicc==''))

  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.

  44..44..88..  LLeess sseerrvveeuurrss SSCCSSII BBuussLLooggiicc aavveess lleess nnooyyaauuxx vv22..xx ((``BBuussLLooggiicc==''))

  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.

  44..44..99..  LLeess ccaarrtteess SSCCSSII EEAATTAA ((``eeaattaa==''))

  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.

  44..44..1100..  FFuuttuurree DDoommaaiinn TTMMCC--88xxxx,, TTMMCC--995500 ((``ttmmcc88xxxx==''))

  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.

  44..44..1111..  FFuuttuurree DDoommaaiinn TTMMCC--1166xxxx,, TTMMCC--33226600,, AAHHAA--22992200 ((``ffddoommaaiinn==''))

  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]
  ______________________________________________________________________

  44..44..1122..  LLee lleecctteeuurr ZZIIPP IIOOMMEEGGAA // PPoorrtt PPaarraalllleellee ((``ppppaa==''))

  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.

  44..44..1133..  CCoonnttrroolleeuurrss uuttiilliissaanntt uunn NNCCRR55338800 ((``nnccrr55338800==''))

  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.

  44..44..1144..  CCoonnttrroolleeuurrss uuttiilliissaanntt uunn NNCCRR5533cc440000 ((``nnccrr5533cc440000==''))

  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.

  44..44..1155..  CCoonnttrroolleeuurrss uuttiilliissaanntt uunn NNCCRR5533cc440066aa ((``nnccrr5533cc440066aa==''))

  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).

  44..44..1166..  PPrroo AAuuddiioo SSppeeccttrruumm ((``ppaass1166==''))

  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.

  44..55..  SSeeaaggaattee SSTT--00xx ((``sstt00xx==''))

  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.

  44..66..  TTrraannttoorr TT112288 ((``tt112288==''))

  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.

  44..66..11..  CCaarrtteess SSCCSSII UUllttrraassttoorr ((``uu1144--3344ff==''))

  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.

  44..66..22..  CCaarrtteess WWeesstteerrnn DDiiggiittaall WWDD77000000 ((``wwdd77000000==''))

  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
  ______________________________________________________________________

  44..77..  CCaarrtteess nn''aacccceeppttaanntt ppaass lleess ppaarraammeettrreess ddee ddeemmaarrrraaggee

  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)

  55..  DDiissqquuee DDuurrss

  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='.

  55..11..  PPaarraammeettrreess ddeess lleecctteeuurrss ddee DDiissqquueess//CCDD--RROOMM IIDDEE

  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).

  55..22..  OOppttiioonnss dduu ppiilloottee ssttaannddaarrdd SSTT--550066 ((``hhdd==''))

  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.

  55..33..  OOppttiioonnss dduu ppiilloottee ddee ddiissqquuee XXTT ((``xxdd==''))

  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
  ______________________________________________________________________

  66..  CCDD--RROOMMss ((NNoonn--SSCCSSII//AATTAAPPII//IIDDEE))

  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.

  66..11..  LL''iinntteerrffaaccee AAzztteecchh ((``aazzttccdd==''))

  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.

  66..22..  LL''iinntteerrffaaccee SSoonnyy CCDDUU--3311AA eett CCDDUU--3333AA ((``ccdduu3311aa==''))

  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.

  66..33..  LL''iinntteerrffaaccee SSoonnyy CCDDUU--553355 ((``ssoonnyyccdd553355==''))

  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.

  66..44..  LL''iinntteerrffaaccee GGoollddSSttaarr ((``ggssccdd==''))

  La syntaxe pour cette interface de CD-ROM est :

  ______________________________________________________________________
          gscd=iobase
  ______________________________________________________________________

  66..55..  LL''iinntteerrffaaccee ssttaannddaarrdd MMiittssuummii ((``mmccdd==''))

  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.

  66..66..  LL''iinntteerrffaaccee IISSPP1166 ((``iisspp1166==''))

  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.

  66..77..  LL''iinntteerrffaaccee MMiittssuummii XXAA//MMuullttiiSSeessssiioonn ((``mmccddxx==''))

  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.

  66..88..  LL''iinntteerrffaaccee OOppttiiccss SSttoorraaggee ((``ooppttccdd==''))

  La syntaxe pour ce type de carte est :

  ______________________________________________________________________
          optcd=iobase
  ______________________________________________________________________

  66..99..  LL''iinntteerrffaaccee PPhhiilllliippss CCMM220066 ((``ccmm220066==''))

  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.

  66..1100..  LL''iinntteerrffaaccee SSaannyyoo ((``ssjjccdd==''))

  La syntaxe pour ce type de carte est :

  ______________________________________________________________________
          sjcd=iobase[,irq[,dma_channel]]
  ______________________________________________________________________

  66..1111..  LL''iinntteerrffaaccee SSoouunnddBBllaasstteerr PPrroo ((``ssbbppccdd==''))

  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.

  77..  AAuuttrreess PPeerriipphheerriiqquueess MMaatteerriieellss

  Tous les autres peripheriques qui ne peuvent etre classes dans une des
  categories ci-dessus sont entasses ici.

  77..11..  PPeerriipphheerriiqquueess EEtthheerrnneett ((``eetthheerr==''))

  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>

  77..22..  LLee ppiilloottee dduu LLeecctteeuurr ddee DDiissqquueetttteess ((``ffllooppppyy==''))

  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).

  77..33..  LLee ppiilloottee ddee ssoonnss ((``ssoouunndd==''))

  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.

  77..44..  LLee ppiilloottee ddee ssoouurriiss ssuurr bbuuss ""BBuuss MMoouussee"" ((``bbmmoouussee==''))

  Le pilote des souris sur bus accepte un seul  parametre,  qui  est  la
  valeur de l'IRQ materielle a utiliser.

  77..55..  LLee ppiilloottee MMSS BBuuss MMoouussee ((``mmssmmoouussee==''))

  Le pilote MS mouse accepte un seul parametre, qui correspond a l'IRQ a
  utiliser.
  77..66..  LLee ppiilloottee dd''iimmpprriimmaanntteess ((``llpp==''))

  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.

  77..77..  LLee ppiilloottee IICCNN IISSDDNN ((``iiccnn==''))

  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.

  77..88..  LLee ppiilloottee PPCCBBIITT IISSDDNN ((``ppccbbiitt==''))

  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.

  77..99..  LLee ppiilloottee TTeelleess IISSDDNN ((``tteelleess==''))

  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.

  77..1100..  LLee ppiilloottee DDiiggiiBBooaarrdd ((``ddiiggii==''))

  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.

  77..1111..  llee ppiilloottee RRIISSCCoomm//88 MMuullttiippoorrtt SSeerriiaall ((``rriissccoomm88==''))

  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.

  77..1122..  LLee mmooddeemm SSeerriiee//PPaarraalllleellee RRaaddiioo BBaayyccoomm ((``bbaayyccoomm==''))

  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/.

  88..  CCoonncclluussiioonn

  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 décrit comment définir et créer vos propres disquettes
  d'amorce et racine pour Linux. Ces disquettes peuvent être utilisées
  comme disques de secours, ou pour tester de nouveaux composants du
  système. Si vous n'avez pas lu la FAQ Linux et autres documents du
  même genre, tels que le HOWTO d'installation Linux et le Guide
  d'Installation de Linux, vous ne devriez pas essayer de créer de dis­
  quettes d'amorce. Si vous souhaitez juste créer des disquettes pour
  prévenir les cas urgents, lisez l'annexe "Disques d'amorce préfab­
  riqués".
  ______________________________________________________________________

  Table des matières

















































  1. Préface

     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 démarrage

     3.1 Démarrage
     3.2 Types de disques

  4. Construire un système racine

     4.1 Aperçu
     4.2 Création du système de fichiers
     4.3 Remplissage du système 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 détails
     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 mémoire
     6.4 Transfert du système racine

  7. En cas de problème, ou L'agonie de la défaite

  8. Sujets divers

     8.1 Réduire la taille du système racine
     8.2 Système racine sans disque mémoire
     8.3 Construire un disque utilitaire

  9. La méthode des pros

  10. Foire Aux Questions (FAQ)

  11. Ressources et pointeurs

     11.1 Disques d'amorce préfabriqués
     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 mémoire
     11.7 Le processus de démarrage de Linux

  12. Codes d'erreur du démarrage de LILO

  13. Exemple de contenu de répertoires sur un disque racine

  14. Exemple de contenu des répertoires d'un disque utilitaire
  ______________________________________________________________________

  11..  PPrrééffaaccee


  NNoottee :: ccee ddooccuummeenntt ppeeuutt êêttrree oobbssoollèèttee.. Si la date sur la page de titre
  a plus de six mois, vérifiez la page du Linux Documentation Project
  <http://metalab.unc.edu/LDP/HOWTO/Bootdisk-HOWTO.html> (et sa
  traduction française  <http://www.freenix.fr/linux/HOWTO/Bootdisk-
  HOWTO.html>) au cas où une version plus récente 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 utilisée. Nous vous conseillons de choisir une de ces
  versions. La version Info est, pour l'instant, tellement mal générée
  qu'elle en est inutilisable.



  11..11..  NNootteess


  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 désormais la maintenance du document, depuis
  la version 3.2. Il contient toujours une bonne partie écrite par
  Chapman.

  Ce document concerne llee nnooyyaauu LLiinnuuxx 22..00 eett lleess vveerrssiioonnss uullttéérriieeuurreess.
  Si vous avez un vieux noyau (1.2.xx ou antérieur), veuillez consulter
  les versions précédentes du Bootdisk-HOWTO archivées 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 IInntteell. Bien des éléments doivent pouvoir être appliqués à Linux
  sur d'autres processeurs, mais nous n'en avons pas personnellement
  l'expérience, ni ne possédons d'informations de ce type. Si quelqu'un
  a expérimenté les disques d'amorce sur d'autres plate-formes, qu'il
  nous contacte.



  11..22..  RReettoouurrss eett rreemmeerrcciieemmeennttss


  Tout retour, bon ou mauvais, sur le contenu de ce document est le
  bienvenu. Nous avons fait de notre mieux pour vérifier que les
  instructions et informations ici présentes sont précises 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'améliorer
  ce document bien au delà de ce que nous aurions pu réaliser seuls.

  Envoyez vos commentaires, corrections et questions à l'auteur à
  l'adresse ci-dessus (ou au traducteur pour des problèmes dans la
  version française). Cela ne me dérange pas d'essayer de répondre à vos
  questions, mais merci de lire la section ``En cas de problème''
  d'abord.






  11..33..  PPoolliittiiqquuee ddee ddiissttrriibbuuttiioonn


  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 wwiitthhoouutt aannyy wwaarrrraannttyy; without even the implied
  warranty of mmeerrcchhaannttaabbiilliittyy or ffiittnneessss ffoorr aa ppaarrttiiccuullaarr ppuurrppoossee.

  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 à récupérer la licence.

  Cette documentation est libre. Elle est distribuée dans l'espoir
  d'être utile, mais ssaannss aauuccuunnee ggaarraannttiiee ; sans même la garantie
  implicite de vvaalleeuurr mmaarrcchhaannddee ou de ccoorrrreessppoonnddrree àà uunn bbuutt ppaarrttiiccuulliieerr.

  Vous utilisez les informations contenues dans ce document à vos
  propres risques. Nous déclinons toute responsabilité quant à son
  contenu. L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entièrement à vos propres risques.

  Tous les droits sont détenus par leurs propriétaires 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 particulière ne constitue
  pas un endossement.

  Il est fortement conseillé d'effectuer une sauvegarde de votre système
  avant une installation importante ainsi qu'à intervalles réguliers.


  11..44..  NNootteess dduu ttrraadduucctteeuurr


  Correspondances anglais/français utilisées dans la traduction :

  ·  I/O : E/S, entrées/sorties.

  ·  backup : archive.

  ·  boot loader : chargeur, lanceur.

  ·  boot : amorce, amorcer, démarrage, démarrer.

  ·  boot/root disk : disquette d'amorce/racine.

  ·  dynamic library : bibliothèque partagée.

  ·  filesystem : système de fichiers, système.

  ·  inode : i-noeud.

  ·  library : bibliothèque.

  ·  loopback device : périphérique de boucle.

  ·  package : paquetage.

  ·  path : chemin.

  ·  ramdisk : disque virtuel en mémoire, disque mémoire.

  ·  root device : périphérique racine.

  ·  root : racine.

  ·  runlevel : niveau d'exécution.

  ·  swap : pagination.


  22..  IInnttrroodduuccttiioonn


  Les disques d'amorce Linux sont utiles dans nombre de situations,
  telles que :


  ·  Tester un nouveau noyau ;

  ·  Redémarrer après un problème de disque : tout depuis la perte d'un
     secteur d'amorce à l'atterrissage d'une tête de lecture sur le
     disque ;

  ·  Réparer un système endommagé. Une petite erreur en tant que root
     peut rendre le système inutilisable, et il peut alors être
     nécessaire de démarrer depuis une disquette pour corriger le
     problème ;

  ·  Mettre à jour des fichiers critiques du système, tels que libc.so.

  Les disques d'amorce peuvent être obtenus de différentes manières :


  ·  Utiliser ceux d'une distribution telle que la Slackware. Cela vous
     permettra au moins de démarrer ;

  ·  Utiliser un paquetage de création de disques de secours, prévus
     pour les cas d'urgence ;

  ·  Apprendre ce que nécessite le fonctionnement de chaque type de
     disque, puis créer les vôtres.

  Certaines personnes choisissent la dernière solution afin de tout
  faire eux-mêmes. Ainsi, si quelque chose ne marche plus, ils peuvent
  se débrouiller pour corriger le problème. Et c'est un excellent moyen
  pour apprendre le fonctionnement d'un système Linux.

  Ce document suppose une certaine familiarité avec les concepts
  d'administration d'un système Linux. Par exemple, vous devez connaître
  les répertoires, les systèmes de fichiers, les disquettes. Vous devez
  savoir utiliser mount et df, à quoi servent les fichiers /etc/passwd
  et fstab et quelle tête ils ont. Enfin, vous devez savoir que la
  plupart des commandes dans ce HOWTO doivent être exécutées en tant que
  root.

  Créer vos propres disquettes d'amorce à partir de zéro peut être
  compliqué. Si vous n'avez pas lu la FAQ Linux et autres documents du
  même genre, tels que le HOWTO d'installation Linux et le Guide
  d'Installation de Linux, vous ne devriez pas essayer de créer de
  disques d'amorce. Si vous souhaitez juste créer des disques pour
  prévenir les cas urgents, il est bbiieenn plus simple d'en récupérer des
  préfabriqués. Lisez l'appendice ``Disques d'amorce préfabriqués'' ci-
  dessous pour savoir où en trouver.
  33..  DDiissqquueess dd''aammoorrccee eett ddéémmaarrrraaggee


  Un disque d'amorce est essentiellement un système Linux miniature et
  auto-suffisant contenu sur une disquette. Il doit pouvoir effectuer
  nombre d'opérations possibles sur un système Linux de taille normale.
  Avant d'essayer d'en créer un, vous devez comprendre les bases du
  démarrage de Linux. Nous en faisons ici une présentation qui devrait
  suffire à la compréhension de la suite du document. Bien des détails
  ou des possibilités ont été omis.



  33..11..  DDéémmaarrrraaggee



  Tous les PC démarrent en exécutant du code situé en mémoire 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'exécuter 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'exécute pour réaliser le démarrage proprement dit,

  ·  soit le début du noyau d'un système 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-
  même. Ce premier secteur continuera le démarrage en chargeant le reste
  du noyau depuis le périphérique d'amorce.

  Une fois que le noyau est complètement chargé, il effectue certaines
  initialisations de périphériques. Il essaye ensuite de charger et
  monter un ssyyssttèèmmee ddee ffiicchhiieerrss rraacciinnee depuis un périphérique
  quelconque. Un système de fichiers racine est simplement celui qui est
  monté en tant que "/". Il faut dire au noyau où trouver ce système
  racine ; s'il ne peut trouver d'image à charger, il s'arrête.

  Dans certains cas au démarrage (souvent lors du démarrage depuis une
  disquette), le système de fichiers racine est chargé dans un ddiissqquuee
  mméémmooiirree, auquel le système accède ensuite en mémoire comme s'il
  s'agissait d'un vrai disque. Il y a deux raisons à un tel chargement
  en mémoire. Premièrement, la mémoire vive est plusieurs ordres de
  magnitude plus rapide qu'une disquette, et le système est donc
  rapide ; deuxièmement, le noyau peut charger un ssyyssttèèmmee ddee ffiicchhiieerrss
  ccoommpprreesssséé depuis la disquette et le décompresser en mémoire,
  permettant ainsi de stocker plus de fichiers sur la disquette.

  Une fois le système de fichiers racine chargé et monté, vous voyez un
  message tel que :


          VFS: Mounted root (ext2 filesystem) readonly.




  A ce moment, le système trouve le programme init dans le système
  racine (dans /bin ou /sbin) et l'exécute. init lit sa configuration
  dans /etc/inittab, cherche une ligne nommée sysinit, et exécute le
  script indiqué. Le script sysinit est en général 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 système, tels que :
  ·  Lancer fsck sur tous les disques ;

  ·  Charger les modules nécessaires du noyau ;

  ·  Lancer la pagination ;

  ·  Initialiser le réseau ;

  ·  Monter les disques indiqués dans fstab.

  Ce script appelle lui-même souvent nombre d'autres scripts pour
  réaliser une initialisation modulaire. Par exemple, dans la structure
  SysVinit habituelle, le répertoire /etc/rc.d/ contient une structure
  complexe de sous-répertoires dont les fichiers indiquent comment
  lancer et arrêter la plupart des services du système. Par contre, sur
  un disque d'amorce, le script sysinit est souvent très simple.

  Quand le script sysinit se termine, le contrôle 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, spécifié dans
  inittab par le mot clé initdefault. La ligne du niveau d'exécution
  indique en général 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-même
  exécute à son tour le programme login pour gérer la validation du
  login et mettre en place la session de l'utilisateur.



  33..22..  TTyyppeess ddee ddiissqquueess


  Après avoir revu les bases du démarrage, nous pouvons définir les
  différents types de disques mis en jeu. Ces disques sont classés en
  quatre catégories. Ça et là dans le document, on emploie le terme
  "disque" pour désigner une disquette, sauf précision contraire, bien
  que la majeure partie de la discussion puisse également s'appliquer à
  des disques durs.



     AAmmoorrccee
        Un disque contenant un noyau pouvant être amorcé. Il peut être
        utilisé pour démarrer le noyau, qui pourra alors charger un
        système racine depuis un autre disque. Il est en général
        nécessaire d'indiquer au noyau où se trouve ce système racine.

        Souvent un disque d'amorce charge le système racine depuis une
        autre disquette, mais il est possible de lui indiquer un disque
        dur d'où il chargera le système racine à la place. Souvent,
        c'est dans le but de tester un nouveau noyau (d'ailleurs, "make
        zdisk" crée un tel disque d'amorce automatiquement à partir du
        code source du noyau).


     RRaacciinnee
        Un disque avec un système de fichiers contenant les fichiers
        nécessaires au fonctionnement d'un système Linux. Un tel disque
        ne contient pas forcément un noyau ou un chargeur.

        Un disque racine peut être utilisé pour faire tourner le système
        indépendamment de tout autre disque, une fois le noyau amorcé.
        En général le disque racine est copié automatiquement vers un
        disque mémoire. Cela permet un accès au disque racine bien plus
        rapide, et libère le lecteur pour une disquette d'utilitaires.


     AAmmoorrccee//rraacciinnee
        Un disque contenant à la fois un noyau et un système de fichiers
        racine. Autrement dit, il contient tout ce qui est nécessaire au
        démarrage et au fonctionnement d'un système 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. Néanmoins, la taille
        toujours plus importante des programmes implique une difficulté
        croissante pour tout faire tenir sur une seule disquette, même
        avec de la compression.


     UUttiilliittaaiirree
        Un disque contenant un système de fichier non destiné à être
        monté en tant que racine. Il s'agit d'un disque de données
        supplémentaires. Vous pouvez utiliser ce genre de disque pour
        rajouter des utilitaires, quand vous en avez trop pour un seul
        disque amorce.



  En général, lorsque l'on parle de "construire un disque d'amorce",
  c'est de la création des parties amorce (noyau) et racine (fichiers)
  qu'il est question, soit en un seul morceau (un seul disque
  amorce/racine), soit séparément (un disque amorce et un racine).
  L'approche la plus flexible pour des disquettes de secours est
  d'utiliser des disquettes amorce et racine séparées, et une ou
  plusieurs disquettes utilitaires pour supporter le trop-plein.




  44..  CCoonnssttrruuiirree uunn ssyyssttèèmmee rraacciinnee


  Pour créer un système racine, il faut sélectionner les fichiers
  nécessaires au système pour fonctionner. Dans cette section nous
  décrivons comment créer 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 créer un système non compressé sur une disquette que
  l'on monte directement ; cette alternative est décrite dans la section
  ``Système racine sans disque mémoire''.


  44..11..  AAppeerrççuu


  Un système racine doit contenir tout ce qui est nécessaire au bon
  fonctionnement d'un système Linux complet. Pour cela, le disque doit
  contenir un système Linux minimum :


  ·  La structure de base des fichiers ;

  ·  Un ensemble minimum de répertoires : /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 périphériques : /dev/hd*, /dev/tty*, /dev/fd0, etc ;

  ·  Des bibliothèques d'exécution fournissant les fonctions de base
     nécessaires aux utilitaires.


  Bien sûr, n'importe quel système devient utile dès que l'on peut faire
  tourner quelque chose dessus, et une disquette racine ne devient en
  général utilisable que lorsque vous pouvez faire quelque chose du
  genre :


  ·  Contrôler un système de fichiers sur un autre disque ; par exemple,
     pour contrôler le système racine de votre disque dur, vous devez
     pouvoir démarrer 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é ;

  ·  Récupérer 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 décrirons comment construire un système _c_o_m_p_r_e_s_s_é, ainsi appelé
  car il est compressé sur disque et qu'une fois démarré, le noyau le
  décompresse dans un disque mémoire.  Avec un système compressé vous
  pouvez faire tenir beaucoup de fichiers (à peu près six mégaoctets)
  sur une disquette standard de 1440K. Puisque le système 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.


  44..22..  CCrrééaattiioonn dduu ssyyssttèèmmee ddee ffiicchhiieerrss


  Pour créer un tel système racine, il vous faut un autre périphérique
  capable de stocker tous les fichiers avant leur compression. Ce
  périphérique doit pouvoir contenir à peu près quatre mégaoctets.
  Plusieurs solutions s'offrent à vous :


  ·  Utiliser un ddiissqquuee mméémmooiirree (PÉRIPHÉRIQUE = /dev/ram0). Dans ce cas,
     la mémoire est utilisée pour simuler un disque physique. Le disque
     mémoire doit être suffisamment grand pour contenir un système 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 détermine combien de mémoire peut être au plus allouée à un disque
  mémoire. La valeur par défaut est de 4096 Ko, ce qui devrait suffire.
  Il ne sert probablement à rien de créer un tel disque mémoire sur une
  machine possédant moins de 8 Mo de RAM.

  Vérifiez que vous avez un périphérique tel que /dev/ram0, /dev/ram ou
  /dev/ramdisk. Si ce n'est pas le cas, créez /dev/ram0 avec mknod
  (numéro majeur 1, numéro mineur 0).

  ·  Une partition de disque dur inutilisée et assez grande (plusieurs
     mégaoctets) est aussi une bonne solution.

  ·  Utiliser un ppéérriipphhéérriiqquuee ddee bboouuccllee ((llooooppbbaacckk)), qui permet
     d'utiliser un fichier comme s'il s'agissait d'un périphérique
     normal. Avec un périphérique de boucle, vous pouvez créer un
     fichier de 3 mégaoctets sur votre disque dur et construire le
     système de fichiers dedans.

     Tapez man losetup pour savoir comment utiliser un périphérique de
     boucle. Si vous n'avez pas losetup, vous pouvez le récupérer, ainsi
     que des versions compatibles de mount et umount, dans le paquetage
     util-linux disponible dans le répertoire
     <ftp://ftp.win.tue.nl/pub/linux/utils/util-linux/>.


     Si vous n'avez pas de périphérique de boucle (/dev/loop0,
     /dev/loop1, etc) sur votre système, vous devez en créer un avec
     "mknod /dev/loop0 b 7 0". Une fois les exécutables mount et umount
     spéciaux installés, créez 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 créer un fichier de _n_n_n blocs.

  Utilisez le nom du fichier à la place de PÉRIPHÉRIQUE ci-dessous.
  Quand vous exécutez une commande mount, vous devez inclure l'option
  "-o loop" pour dire au programme d'utiliser un périphérique de boucle.
  Par exemple :

          mount -o loop -t ext2 /tmp/fsfile /mnt



  va monter /tmp/fsfile (par périphérique de boucle) sur le point de
  montage /mnt. Un coup de df le confirmera.



  Après avoir choisi une de ces options, préparez le PÉRIPHÉRIQUE avec :

          dd if=/dev/zero of=PÉRIPHÉRIQUE bs=1k count=3000



  Cette commande initialise à zéro le périphérique. Cette étape est
  importante pour la compression ultérieure du système de fichiers, afin
  que toutes les portions inutilisées soient remplies de zéro pour une
  compression maximum.

  Ensuite, créez le système de fichiers. Le noyau Linux sait charger
  automatiquement deux types de système de fichiers dans un disque
  mémoire : minix et ext2, avec une préférence pour ext2. Si vous le
  choisissez, vous voudrez peut-être utiliser l'option -i afin de créer
  plus d'i-noeuds que par défaut ; -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 crée
  par défaut 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 périphériques dans le
  répertoire /dev vous dépasserez facilement les 360. L'utilisation d'un
  système racine compressé permet de créer un système de fichiers plus
  grand, contenant donc plus d'i-noeuds par défaut, mais vous pourrez
  quand même vouloir réduire le nombre de fichiers ou augmenter le
  nombre d'i-noeuds.

  Vous allez donc taper une commande du genre :

          mke2fs -m 0 -i 2000 PÉRIPHÉRIQUE



  (Si vous utilisez un périphérique de boucle, le fichier que vous
  utilisez doit être indiqué à la place de ce PÉRIPHÉRIQUE. mke2fs vous
  demandera alors si vous voulez vraiment faire cela ; répondez oui.)

  La commande mke2fs détectera automatiquement l'espace disponible et se
  configurera selon. Le paramètre -m 0 permet de ne pas réserver
  d'espace pour root, et laisse donc plus d'espace disponible sur le
  disque.

  Ensuite, montez le périphérique :


          mount -t ext2 PÉRIPHÉRIQUE /mnt



  (Vous devez créer un point de montage /mnt s'il n'existe pas encore.)
  Dans les sections suivantes, tous les répertoires destination sont
  supposés relatifs à /mnt.



  44..33..  RReemmpplliissssaaggee dduu ssyyssttèèmmee ddee ffiicchhiieerrss


  Voici un minimum raisonnable de répertoires à créer sur votre système
  racine :


  ·  /dev : Périphériques, nécessaires aux E/S ;

  ·  /proc : Répertoire de base nécessaire au système de fichiers proc ;

  ·  /etc : Fichiers de configuration du système ;

  ·  /sbin : Exécutables systèmes critiques ;

  ·  /bin : Exécutables de base considérés comme partie intégrante du
     système ;

  ·  /lib : Bibliothèques partagées nécessaires à l'exécution des
     programmes ;

  ·  /mnt : Un point de montage pour la maintenance des autres disques ;

  ·  /usr : Utilitaires et applications supplémentaires.

  (La structure de répertoires présentée ici concerne uniquement les
  disquettes racines. Les vrais systèmes Linux ont une politique plus
  complexe et disciplinée, appelée la Hiérarchie Standard de Système de
  Fichiers (Filesystem Hierarchy Standard), qui détermine où les
  fichiers doivent se trouver.)


  Trois de ces répertoires resteront vides sur les systèmes racine, il
  suffit donc de les créer avec mkdir. Le répertoire /proc n'est qu'une
  base sous laquelle le système proc est placé. /mnt et /usr ne sont que
  des points de montage utilisés une fois que le système amorce/racine
  tourne. Encore une fois, il suffit de créer ces répertoires.

  Les quatre autre répertoires sont décrits dans les sections suivantes.





  44..33..11..  //ddeevv


  Tous les systèmes Linux ont besoin d'un répertoire /dev contenant un
  fichier spécial par périphérique accessible au système. Le répertoire
  en lui-même est normal, et peut être créé avec mkdir de la manière
  habituelle. Les fichiers spéciaux de périphérique doivent par contre
  être créés différemment, à l'aide de la commande mknod.

  Il y a un raccourci par contre : copiez le contenu de votre répertoire
  /dev existant, puis supprimez ceux dont vous n'avez pas besoin. Il
  suffit juste de copier les fichiers spéciaux avec l'option -R. Cela
  copie le répertoire 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 précautions, et
  utilisez la commande :


          cp -dpR /dev /mnt



  en supposant que la disquette est montée sur /mnt. Les options dp
  demandent la copie des liens symboliques en tant que lien, plutôt que
  celle du fichier qui se trouve au bout de celui-ci, et la conservation
  des attributs originaux des fichiers, pour garder les bons
  propriétaires.

  Si vous voulez le faire vous-mêmes, utilisez ls -l pour afficher les
  numéros majeurs et mineurs des périphériques qui vous intéressent, et
  créez-les sur la disquette en utilisant mknod.

  Quelle que soit la manière retenue pour copier les périphériques, il
  faut vérifier que tous les périphériques dont vous aurez besoin sont
  bien présents sur la disquette de secours. Par exemple, ftape utilise
  les périphériques 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 nécessaire pour chaque fichier de
  périphérique, et que les i-noeuds sont parfois une ressource rare,
  spécialement sur les systèmes de fichiers sur disquette. Il n'est donc
  pas idiot d'enlever tous les fichiers de périphérique dont vous n'avez
  pas besoin du répertoire /dev de la disquette. Bien des périphériques
  ne sont clairement pas nécessaires sur des systèmes spécifiques. Par
  exemple, si vous n'avez pas de disques SCSI vous pouvez tranquillement
  enlever tous les fichiers commençant par sd. De même, si vous ne
  comptez pas utiliser de port série vous pouvez supprimer tous les
  fichiers commençant 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.


  44..33..22..  //eettcc


  Ce répertoire doit contenir un certain nombre de fichiers de
  configuration. Sur la plupart des systèmes, on peut les répartir en
  trois groupes :


  1. Nécessaires à tout moment, par exemple rc, fstab, passwd ;


  2. Peut-être nécessaires, mais on n'en est pas sûr ;

  3. Du bazar oublié là.

  Les fichiers non essentiels peuvent être identifiés avec la commande :



               ls -ltru




  Les fichiers sont classés dans l'ordre inverse de dernière date
  d'accès, 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 réduit alors à gérer trois groupes de fichiers :


  1. Ceux que je dois configurer pour un système d'amorce et racine :


     a. rc.d/* : scripts de démarrage du système et de changement de
        niveau d'exécution ;

     b. fstab : liste des systèmes de fichiers à monter ;

     c. inittab : paramètres pour le processus init, le premier à être
        lancé au démarrage.


  2. Ceux que je dois nettoyer pour un système d'amorce et racine :

     a. passwd : liste des utilisateurs, des répertoires utilisateurs,
        etc ;

     b. group : groupes d'utilisateurs ;

     c. shadow : mots de passe cachés des utilisateurs. Il se peut que
        vous n'ayez pas ce fichier ;

     d. termcap : la base de données de fonctionnalités des terminaux.


     Si la sécurité est importante, passwd et shadow doivent être net­
     toyés pour ne pas copier de mots de passe d'utilisateurs hors du
     système et pour qu'en cas de démarrage sur disquette, les logins
     indésirables soient rejetés.

     Assurez-vous que passwd contienne au moins root. Si vous comptez
     donner accès à d'autres utilisateurs, vérifiez l'existence de leurs
     répertoires utilisateurs et de leurs shells.

     termcap, la base de données de terminaux, fait en général plusieurs
     centaines de kilo-octets. Vous devrez faire du ménage dans la ver­
     sion de votre disquette d'amorce/racine pour ne conserver que le ou
     les terminaux que vous utilisez, ce qui se réduit en général à
     l'entrée linux-console.


  3. Le reste. Ils fonctionnent très bien tels quel, je ne les modifie
     donc pas.


  Parmi tout cela, je n'ai en réalité 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



  Vérifiez que ce sont les bons répertoires. Il n'est pas réellement
  nécessaire 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 série, commentez
  toutes les entrées getty qui référencent des périphériques 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 décrit ce que va lancer le système dans divers
  états, dont le démarrage, le passage en mode multi-utilisateurs, etc.
  Attention aux noms de fichiers référencés dans inittab ; si init ne
  peut trouver le programme, le disque d'amorce s'arrêtera, et vous
  n'aurez peut-être même pas de message d'erreur.


  Notez que certains programmes ne peuvent être déplacés en raison
  d'autres programmes qui référencent en dur leur position. Par exemple
  sur mon système, /etc/shutdown référence en dur /etc/reboot. Si je
  déplace 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
  répertoire /etc, ainsi que tous les exécutables présents dans /etc
  dont vous n'êtes pas sûr de pouvoir vous passer. Basez-vous sur
  l'exemple de la section ``Exemple de contenu des répertoires d'un
  disque racine''. Il vous suffira probablement de copier ces fichiers,
  mais les systèmes pouvant être très différents, il n'est pas certain
  que le même ensemble de fichiers sur votre système soit équivalent aux
  fichiers listés. La seule méthode sure est de partir d'inittab et d'en
  déduire ce qui est nécessaire.

  La plupart des systèmes utilisent maintenant un répertoire /etc/rc.d/
  contenant des scripts shell pour les différents niveaux d'exécution.
  Il faut au minimum avoir un script rc unique, mais il peut être plus
  simple de carrément copier inittab et le répertoire /etc/rc.d depuis
  votre système puis de nettoyer les scripts shell dans le répertoire
  rc.d pour enlever tous les traitements inutiles pour un système sur
  disquette.


  44..33..33..  //bbiinn eett //ssbbiinn


  Le répertoire /bin est un endroit pratique pour tous les utilitaires
  nécessaires aux opérations de base, tels que ls, mv, cat et dd. Voir
  l'appendice ``Exemple de contenu des répertoires d'un disque racine''
  pour un exemple d'ensemble de fichiers pouvant aller dans les
  répertoires /bin et /sbin. Il ne contient aucun des utilitaires
  nécessaires à la récupération d'une sauvegarde, tels que cpio, tar et
  gzip. C'est parce que je place ceux-ci sur une disquette utilitaire
  séparée, pour conserver de la place sur la disquette d'amorce et
  racine. Une fois la disquette d'amorce/racine démarrée, elle est
  copiée sur le disque mémoire, laissant ainsi le lecteur de disquette
  libre pour en monter une autre, la disquette utilitaire. En général je
  la monte sur /usr.

  La création d'une disquette utilitaire est décrite ci-dessous dans la
  section ``Construire un disque utilitaire''. Il est probablement
  souhaitable d'y maintenir une copie des mêmes versions d'utilitaires
  de sauvegarde que ceux utilisés 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.



  44..33..44..  //lliibb


  Vous mettez dans /lib les bibliothèques partagées et chargeurs
  nécessaires. Si les bibliothèques nécessaires ne sont pas trouvées
  dans /lib, le système ne pourra pas démarrer. Avec de la chance, un
  message vous expliquera pourquoi.

  Pratiquement tous les programmes ont au moins besoin de la
  bibliothèque libc, libc.so._N, _N étant le numéro de version courant.
  Vérifiez votre répertoire /lib, libc.so.N est en général un lien
  symbolique vers un fichier avec un numéro 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 présent, il vous faut libc-2.1.1.so. Pour trouver les
  autres bibliothèques nécessaires, il faut lancer la commande ldd sur
  tous les exécutables que vous prévoyez 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 nécessaires. Le fichier peut en
  réalité être un lien symbolique.

  Notez que certaines bibliothèques sont _a_s_s_e_z _g_r_o_s_s_e_s et ne tiendront
  pas facilement sur votre système racine. Par exemple, la libc.so citée
  précédemment fait environ 4 mégas. Vous devrez probablement nettoyer
  les bibliothèques en les copiant sur votre système racine. Reportez-
  vous à la section ``Réduire la taille du système racine'' pour plus
  d'informations.

  Il faut également inclure dans /lib un chargeur pour les
  bibliothèques. Il s'agira soit de ld.so (pour les bibliothèques
  a.out), soit de ld-linux.so (pour les bibliothèques ELF). Les versions
  récentes 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 forcément. Si vous ne savez pas duquel vous avez besoin,
  utilisez la commande file sur la bibliothèque. 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 bibliothèques 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 système racine
  que vous êtes en train de construire. Les bibliothèques et chargeurs
  doivent être testés _a_t_t_e_n_t_i_v_e_m_e_n_t avec les exécutables inclus. Si le
  noyau ne peut charger une bibliothèque nécessaire, il s'arrêtera en
  général net, sans message d'erreur.



  44..44..  UUttiilliissaattiioonn ddee PPAAMM eett NNSSSS


  Votre système peut utiliser des bibliothèques chargées dynamiquement
  mais invisible à ldd.


  44..44..11..  PPAAMM ((PPlluuggggaabbllee AAuutthheennttiiccaattiioonn MMoodduulleess))


  Si votre système 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 méthode modulaire
  sophistiquée pour authentifier les utilisateurs et contrôler leur
  accès aux services. Pour déterminer simplement si votre système
  utilise PAM, cherchez dans le répertoire /etc de votre disque dur un
  fichier pam.conf ou un répertoire pam.d ; si l'un des deux existe,
  vous devez prévoir un minimum de support pour PAM. (Vous pouvez aussi
  lancer ldd sur votre exécutable login ; si la sortie contient
  libpam.so, vous avez besoin de PAM.)

  Heureusement, la sécurité est rarement un problème avec les disques
  d'amorce étant donné que quiconque avec un accès physique à la machine
  peut en général faire tout ce qu'il veut dessus. Vous pouvez donc
  complètement désactiver PAM en créant un fichier /etc/pam.conf simple
  sur votre système 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
  système racine. Cette bibliothèque ne fait qu'environ 8 Ko et ne coûte
  donc pas grand chose.

  Notez bien que cette configuration donne à tous un accès complet aux
  fichiers et services de votre machine. Si vous avez des impératifs de
  sécurité 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 système racine. Lisez bien attentivement la
  documentation de PAM, et copiez toutes les bibliothèques nécessaires
  depuis /lib/security vers votre système racine.

  Vous devez aussi inclure /lib/libpam.so sur le disque racine. Mais
  vous le saviez déjà puisque vous avez lancé ldd sur /bin/login qui
  vous a montré la dépendance.



  44..44..22..  NNSSSS ((NNaammee SSeerrvviiccee SSwwiittcchh))


  Si vous utilisez glibc (appelée aussi libc6), vous devez tenir compte
  des services de noms sans quoi vous ne pourrez pas vous loguer. Le
  fichier /etc/nsswitch.conf contrôle les recherches dans les bases de
  données pour divers services. Si vous ne comptez pas accéder à des
  services du réseau (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 spécifie 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 gérer les
  recherches dans les fichiers.

  Si vous comptez accéder au réseau depuis votre disque d'amorce, vous
  pouvez créer un fichier nsswitch.conf plus complet. Voir la page de
  manuel de nsswitch pour plus de détails. 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.



  44..55..  MMoodduulleess


  Si votre noyau est modulaire, vous devez savoir quels modules vous
  voudrez charger depuis votre disque d'amorce une fois le système
  démarré. Il vous faudra inclure les modules ftape et zftape si vos
  sauvegardes sont sur bandes, les modules pour périphériques SCSI si
  vous en avez, et éventuellement ceux pour le support PPP ou SLIP si
  vous souhaitez accéder au réseau en cas d'urgence.

  Ces modules doivent être placés 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.

  Néanmoins, le principal avantage à utiliser les modules est que vous
  pouvez déplacer les modules non essentiels sur un disque utilitaire et
  ne les charger que lorsque nécessaire, ce qui prend alors moins de
  place sur le disque racine. Si vous devez gérer beaucoup de
  périphériques, il vaut mieux procéder de cette manière plutôt 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 installés par modules.



  44..66..  QQuueellqquueess uullttiimmeess ddééttaaiillss


  Certains programmes, tels que login, se plaignent si le fichier
  /var/run/utmp et le répertoire /var/log n'existent pas.  Donc :


          mkdir -p /mnt/var/{log,run}
          touch /mnt/var/run/utmp



  Enfin, après avoir installé toutes les bibliothèques dont vous avez
  besoin, lancez ldconfig pour refabriquer /etc/ld.so.cache sur le
  système racine. Le cache indique au loader où trouver les
  bibliothèques. Pour refabriquer ld.so.cache, lancez les commandes
  suivantes :


          chdir /mnt; chroot /mnt /sbin/ldconfig



  La commande chroot est nécessaire car ldconfig reconstruit toujours le
  cache pour le système racine courant.
  44..77..  CC''eesstt ddaannss llaa ppoocchhee


  Une fois le système racine construit, démontez-le, copiez-le dans un
  fichier et compressez-le :


          umount /mnt
          dd if=PÉRIPHÉRIQUE bs=1k | gzip -v9 > rootfs.gz



  Une fois cette étape effectuée, vous obtenez un fichier rootfs.gz
  contenant votre système racine compressé. Vérifiez sa taille pour être
  sûr qu'il tient sur une disquette. Si ça n'est pas le cas vous devrez
  y retourner pour supprimer certains fichiers. La section ``Réduire la
  taille du système racine'' vous donnera des astuces pour y arriver.



  55..  CChhooiissiirr uunn nnooyyaauu


  Vous avez maintenant un système 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 démarrer la disquette avec. Cependant dans certains cas, vous
  voudrez peut-être construire un noyau différent.

  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 réduire la taille au maximum. Pour ce
  faire, construisez-le avec le minimum de fonctionnalités nécessaires
  au bon fonctionnement du système cible. Cela implique de retirer tout
  ce dont vous n'avez pas besoin. Le support réseau est un bon candidat,
  tout comme le support pour tout type de disque et de périphérique dont
  vous n'avez pas l'usage sur un système lancé par disquette. Comme
  indiqué précédemment, votre noyau doit contenir le support pour disque
  mémoire et ext2.

  Une fois les fonctionnalités nécessaires déterminées, vous devez
  trouver ce qu'il faut rajouter. L'utilisation la plus courante d'une
  disquette d'amorce/racine est l'examen et la récupération d'un système
  racine endommagé, ce qui peut nécessiter le support de certaines
  fonctionnalités supplémentaires dans le noyau. Par exemple, si vos
  sauvegardes sont stockées sur bande avec Ftape pour gérer l'accès au
  lecteur de bande et que vous perdez votre disque racine ainsi que ceux
  contenant Ftape, vous ne pourrez plus récupérer vos sauvegardes depuis
  les bandes. Vous devrez réinstaller Linux, rapatrier et réinstaller
  ftape, puis essayer de lire vos sauvegardes.

  Ce que je veux dire, c'est que quelle que soit la méthode d'E/S que
  vous utilisez au niveau du noyau pour les sauvegardes, elle doit se
  trouver aussi sur votre noyau d'amorce.


  La procédure de construction d'un noyau est décrite 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 problèmes pour construire un noyau, vous ne devriez
  probablement pas essayer de faire de disquette d'amorce/racine de
  toute manière. Pensez à compresser le noyau avec "make zImage".




  66..  AAsssseemmbbllaaggee eett ffaabbrriiccaattiioonn ddee llaa oouu ddeess ddiissqquueetttteess


  Vous avez maintenant un noyau et un système de fichiers compressé. Si
  vous construisez un disque d'amorce/racine unique, vérifiez que leur
  taille ne dépasse pas celle du disque. Si vous avez un découpage sur
  deux disquettes, vérifiez que la taille du système racine ne dépasse
  pas celle de la disquette.

  Il vous faut choisir entre l'utilisation de LILO pour démarrer 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 paramètres au noyau, ce qui peut être nécessaire pour
  initialiser votre matériel (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 paramètres). Son inconvénient est une
  complexité accrue dans la construction du disque d'amorce, ainsi
  qu'une place occupée sur la disquette légèrement plus importante. Vous
  devrez configurer un petit système de fichier séparé que nous
  appellerons le ssyyssttèèmmee nnooyyaauu, où vous transférerez le noyau ainsi que
  quelques autres fichiers nécessaires à LILO.


  Si vous décidez 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''.


  66..11..  TTrraannssffeerrtt dduu nnooyyaauu aavveecc LLIILLOO



  La première chose à faire est de créer 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 paramètres, 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 créer un petit système de fichier, que nous
  appellerons ssyyssttèèmmee nnooyyaauu, pour le différencier du système racine.

  Tout d'abord, calculez la taille que celui-ci doit faire. Prenez la
  taille de votre noyau en blocs (la taille donnée par "ls -l NOYAU"
  divisée par 1024 et arrondie au chiffre supérieur), et ajoutez 50.
  Cinquante blocs sont en gros la taille nécessaire aux i-noeuds ainsi
  qu'aux autres fichiers. Vous pouvez calculer le nombre exact si vous
  voulez, ou simplement utiliser 50. Si vous créez un ensemble avec deux
  disques, vous pouvez carrément surestimer l'espace nécessaire puisque
  le disque n'est utilisé que par le noyau de toute manière. Appelez ce
  nombre BLOCS_NOYAU.

  Mettez une disquette dans le lecteur (pour simplifier, supposons qu'il
  s'agit de /dev/fd0) et créez le système 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 système, supprimez le répertoire lost+found
  et créez des répertoire dev et boot pour LILO :


          mount /dev/fd0 /mnt
          rm -rf /mnt/lost+found
          mkdir /mnt/{boot,dev}



  Ensuite, créez les périphériques /dev/null et /dev/fd0. Au lieu de
  chercher leurs numéros de périphériques, 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
  répertoire /boot.


          cp /boot/boot.b /mnt/boot



  Enfin, copiez le fichier de configuration de LILO que vous avez créé
  précédemment, avec votre noyau. Les deux peuvent être placés dans le
  répertoire racine :


          cp bdlilo.conf NOYAU /mnt



  Tout ce dont LILO a besoin est maintenant sur le système noyau, vous
  pouvez donc le lancer. Le paramètre -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'exécuter sans erreur, après quoi le système 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 inquiétez pas si la taille des fichiers n'est pas exactement
  la même que la votre.

  Laissez maintenant le disque dans le lecteur et allez à la section
  ``Mise en place du mot disque mémoire''.


  66..22..  TTrraannssffeerrtt dduu nnooyyaauu ssaannss LLIILLOO


  Si vous n'utilisez _p_a_s LILO, transférez 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 périphérique racine doit être la disquette
  elle-même, 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.



  66..33..  MMiissee eenn ppllaaccee dduu mmoott ddiissqquuee mméémmooiirree


  Le mmoott ddiissqquuee mméémmooiirree situé dans l'image du noyau permet de spécifier
  où se trouve le système racine, ainsi que d'autres options. Le mot
  peut être lu et modifié avec la commande rdev, et sa valeur
  s'interprète de la manière suivante :
          bits  0-10 :    Décalage jusqu'au début du disque mémoire, en blocs
                          de 1024 octets
          bits 11-13 :    Inutilisé
          bit     14 :    Drapeau indiquant s'il faut charger un disque mémoire
          bit     15 :    Drapeau pour faire une pause avant de charger le
                          système racine



  Si le bit 15 est mis à 1, le noyau vous demandera au moment du
  démarrage de changer la disquette dans le lecteur. C'est nécessaire si
  vous utilisez un ensemble de deux disques.

  Il y a deux cas, suivant que vous créez une disquette d'amorce/racine
  unique ou un ensemble "amorce+racine" séparé.


  1. Si vous créez un disque unique, le système racine compressé sera
     placé juste après le noyau, et donc le décalage sera le premier
     bloc libre (qui doit être au même 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
     système racine doit commencer au bloc 253 (valeur décimale). Le mot
     disque mémoire devrait valoir 253 (toujours en décimal) avec le bit
     14 à 1 et le bit 15 à 0. Pour calculer sa valeur vous pouvez
     simplement additionner les valeurs décimales. 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 créez par contre un ensemble de deux disques, le système
     racine sera au bloc zéro du second disque, et le décalage sera donc
     zéro. Le bit 14 sera mis à 1 tout comme le bit 15. La valeur
     décimale sera donc de 2^14 + 2^15 = 49152 dans ce cas.


  Après avoir bien calculé la valeur du mot disque mémoire, é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 périphérique du lecteur de disquette
  (c'est à dire /dev/fd0).


          rdev -r NOYAU_OU_LECTEUR_DE_DISQUETTE VALEUR



  Si vous avez utilisé LILO, démontez maintenant la disquette.



  66..44..  TTrraannssffeerrtt dduu ssyyssttèèmmee rraacciinnee


  La dernière étape concerne le transfert du système racine.


  ·  Si le système racine doit être placé sur le même disque que le
     noyau, transférez-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 système racine doit être placé sur un second disque, sortez
     la première disquette, mettez la seconde dans le disque, puis
     transférez-y le système 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 à démarrer, continuez à lire.



  77..  EEnn ccaass ddee pprroobbllèèmmee,, oouu LL''aaggoonniiee ddee llaa ddééffaaiittee



  Lorsque l'on crée des disques d'amorce, les premiers essais n'amorcent
  souvent pas la machine. En général, la méthode utilisée consiste à
  construire le disque racine à partir de composants de votre système
  actuel pour essayer d'obtenir que le système de la disquette commence
  à afficher des messages sur la console. Une fois qu'il a commencé à
  vous parler, la bataille est presque gagnée puisque vous pouvez voir
  de quoi il se plaint et corriger les problèmes un à un jusqu'à ce que
  le système fonctionne normalement. Si le système s'arrête brutalement
  sans explication, il peut être difficile d'en trouver la cause. Pour
  que le système en arrive au point où il commence à afficher ses
  messages, un certain nombre de composants doivent être présents et
  bien configurés. La procédure à suivre pour déterminer les raisons du
  silence de votre système est la suivante :


  ·  Si vous voyez un message du genre :


     Kernel panic: VFS: Unable to mount root fs on XX:YY



  C'est un problème courant qui ne peut avoir que quelques causes. Tout
  d'abord, cherchez le périphérique _X_X_:_Y_Y dans la listes de codes des
  périphériques ; s'agit-il du bon périphérique 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 périphérique est correct, vérifiez
  attentivement quels gestionnaires de périphériques ont été compilés
  dans le noyau. Assurez-vous le support pour le lecteur de disquettes,
  les disques mémoires et le système de fichiers ext2 sont bien inclus ;

  ·  Vérifiez que le disque racine contient bien les répertoires 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 ;

  ·  Vérifiez qu'il y a un /lib/libc.so avec le même lien que celui
     présent dans le répertoire /lib de votre disque dur ;

  ·  Vérifiez que tous les liens symboliques du répertoire /dev de votre
     système actuel existent également sur le système racine, quand ces
     liens sont vers des périphériques inclus sur la disquette racine.
     Notamment, les liens sur /dev/console sont souvent essentiels ;

  ·  Vérifiez que vous avez inclus les fichiers /dev/tty1, /dev/null,
     /dev/zero, /dev/mem, /dev/ram et /dev/kmem ;

  ·  Vérifiez la configuration de votre noyau : le support pour toutes
     les ressources nécessaires 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 ;

  ·  Vérifiez que le périphérique racine et le disque mémoire sont
     correctement configurés dans le noyau.

  Une fois ces points généraux vérifiés, vous pouvez vous pencher sur
  ces points plus précis :


  1. Vérifiez qu'init est présent en tant que /sbin/init ou /bin/init,
     et qu'il est exécutable ;

  2. Lancez ldd init pour vérifier les bibliothèques d'init. Il n'y a
     normalement que libc.so, mais sait-on jamais... Vérifiez que vous
     avez bien inclus les bibliothèques et leurs chargeurs ;

  3. Vérifiez que vous avez le bon chargeur pour vos bibliothèques :
     ld.so pour a.out et ld-linux.so pour ELF ;

  4. Vérifiez 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. Vérifiez les pages de manuel du
     programme que vous utilisez pour être sûr de sa cohérence. inittab
     peut être le morceau le plus difficile en raison de sa syntaxe et
     du contenu qui dépendent de la version d'init utilisée et de la
     nature du système. La seule manière de s'en débarrasser, c'est de
     lire les pages de manuel d'init et inittab afin de comprendre
     exactement ce que fait le système lorsqu'il démarre. Vérifiez que
     /etc/inittab contient bien une entrée concernant l'initialisation
     du système. Elle doit contenir une commande lançant le script
     d'initialisation du système, qui doit lui aussi exister ;

  5. Comme pour init, lancez ldd sur votre getty pour voir ses besoins,
     et vérifiez que les bibliothèques et chargeurs nécessaires sont
     présents sur le système racine ;

  6. Assurez-vous d'avoir inclus un exécutable 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 démarre mais vous obtenez un message du type :


          Id xxx respawning too fast: disabled for 5 minutes




  il provient d'init et indique généralement que getty ou login meurt
  aussitôt après son lancement.  Vérifiez les exécutables de getty et
  login, et les bibliothèques dont ils dépendent. Vérifiez 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'après avoir entré un nom de
  login valide, le système vous en demande un autre aussitôt, le
  problème peut venir de PAM ou NSS. Lisez la section ``Utilisation de
  PAM et NSS''. Le problème peut aussi venir du fait que vous utilisez
  les mots de passe cachés et que vous n'avez pas copié le fichier
  /etc/shadow sur votre disque d'amorce.

  Si vous essayez de lancer un exécutable tel que df présent sur votre
  disque de secours, mais n'obtenez qu'un message du type : df: not
  found, vérifiez deux chose : (1) que le répertoire contenant le
  binaire est bien dans votre PATH, et (2) que vous avez les
  bibliothèques (et chargeurs) nécessaires au programme.



  88..  SSuujjeettss ddiivveerrss



  88..11..  RRéédduuiirree llaa ttaaiillllee dduu ssyyssttèèmmee rraacciinnee


  Parfois un système racine est trop gros pour tenir sur une disquette,
  même après compression. Voici quelques techniques pour réduire sa
  taille, citées par ordre décroissant d'efficacité :


     AAuuggmmeenntteezz llaa ddeennssiittéé dduu ddiissqquuee
        Par défaut, les disquettes sont formattées à 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.


     CChhaannggeezz ddee sshheellll
        Certains shells populaires sous Linux, tels que bash et tcsh,
        sont gros et nécessitent de nombreuses bibliothèques. D'autres
        options plus légères existent, telles que ash, lsh, kiss et
        smash, bien plus petites et nécessitant peu (ou pas) de
        bibliothèques. La plupart de ces shells de remplacement sont
        disponibles sur
        <http://metalab.unc.edu/pub/Linux/system/shells/>. Vérifiez que
        le shell que vous utilisez sait faire tourner les commandes de
        tous les scripts rc que vous incluez sur le disque d'amorce.


     NNeettttooyyeezz lleess bbiibblliiootthhèèqquueess eett bbiinnaaiirreess
        De nombreux binaires et bibliothèques restent non nettoyés (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 système
        racine, une bonne habitude à prendre est d'utiliser :


                objcopy --strip-all ORIGINE DESTINATION



     Et lorsque vous copiez des bibliothèques :


             objcopy --strip-debug ORIGINE DESTINATION

     DDééppllaacceezz lleess ffiicchhiieerrss nnoonn eesssseennttiieellss vveerrss uunn ddiissqquuee uuttiilliittaaiirree
        Si certains binaires ne sont pas immédiatement nécessaires au
        démarrage ou au login, vous pouvez les déplacer sur un disque
        utilitaire. Lisez la section ``Construire un disque utilitaire''
        pour les détails. Vous pouvez aussi déplacer les modules vers un
        disque utilitaire.



  88..22..  SSyyssttèèmmee rraacciinnee ssaannss ddiissqquuee mméémmooiirree



  La section ``Construire un système racine'' explique comment
  construire un système racine compressé chargé en mémoire lors du
  démarrage du système. Cette méthode qui présente beaucoup d'avantages
  est souvent utilisée. Néanmoins, certains systèmes possédant peu de
  mémoire ne peuvent se permettre d'utiliser de la RAM pour un disque
  mémoire, et doivent donc utiliser un système racine monté directement
  depuis la disquette.

  De tels systèmes sont en réalité plus facile à construire que les
  systèmes racines compressés car on peut les créer directement sur
  disquette plutôt qu'en passant par un autre périphérique
  intermédiaire, et ne nécessitent pas de compression. Nous indiquerons
  les différences de procédure par rapports aux instructions
  précédentes. Si vous choisissez cette méthode, 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 système d'amorce/racine unique, vous devez
     arriver à faire tenir tous les blocs du noyau ainsi que tous les
     blocs du système racine sur un seul disque.

  2. A l'aide de mke2fs, créez un système racine de la bonne taille sur
     une disquette.

  3. Remplissez le système comme décrit précédemment.

  4. Après cela, démontez le système et transférez-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. Transférez le noyau sur une disquette comme décrit précédemment.
     Lorsque vous calculerez le mot disque mémoire, mettez le bit 14 à 0
     pour indiquer que le système racine ne doit pas être chargé en
     mémoire. Lancez la commande rdev indiquée.

  6. Transférez le système racine comme précédemment.

  Vous pouvez prendre quelques raccourcis. Si vous construisez un
  système avec deux disques, vous pouvez construire le système de
  fichiers racine directement sur le second disque au lieu de le
  transférer sur le disque dur puis à nouveau sur la disquette. De même,
  si vous construisez un disque d'amorce/racine unique et si vous
  utilisez LILO, vous pouvez créer un système 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 dernière étape.



  88..33..  CCoonnssttrruuiirree uunn ddiissqquuee uuttiilliittaaiirree



  Construire un disque utilitaire est assez facile : créez simplement un
  système de fichiers sur une disquette formattée et copiez les fichiers
  dessus. Pour l'utiliser depuis un disque d'amorce, montez-le
  manuellement une fois le système démarré.

  Les instructions précédentes indiquent qu'un disque utilitaire peut
  être monté en tant que /usr. Dans ce cas, les binaires doivent être
  placés dans un répertoire /bin du disque utilitaire, afin d'être
  référencés si vous mettez /usr/bin dans votre chemin. Les
  bibliothèques supplémentaires nécessaires aux binaires sont à placer
  dans /lib sur le disque utilitaire.

  Il faut penser à plusieurs choses lorsque l'on crée un disque
  utilitaire :


  1. Ne placez pas de binaires ou de bibliothèques essentiels au système
     sur le disque utilitaire, puisqu'il ne sera montable qu'une fois le
     système démarré ;

  2. Vous ne pouvez pas utiliser de lecteur de disquette et de lecteur
     de bande sur port disquette en même temps. Ce qui veut dire que si
     votre lecteur de bande est sur un port disquette, vous ne pourrez
     pas y accéder tant que votre disque utilitaire sera monté ;

  3. L'accès 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 idées de fichiers qui
  peuvent vous être utiles : programmes de diagnostic et de manipulation
  de disques (format, fdisk) et systèmes de fichiers (mke2fs, fsck,
  debugfs, isofs.o), un éditeur de texte léger (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 périphériques (setseriad, mknod).


  99..  LLaa mméétthhooddee ddeess pprrooss


  Vous avez peut-être remarqué comme les disques d'amorce utilisés par
  les principales distributions comme Slackware, RedHat ou Debian
  paraissent plus sophistiqués que ce que décrit ce document. Les
  disques d'amorce de distribution professionnelles se basent sur les
  mêmes principes que ceux décrits ici, mais utilisent diverses astuces
  pour satisfaire aux besoins supplémentaires de leurs disques d'amorce.
  Tout d'abord, ils doivent pouvoir fonctionner sur une grande variété
  de matériel et doivent donc pouvoir interagir avec l'utilisateur et
  charger divers gestionnaires de périphériques. Ensuite, ils doivent
  pouvoir travailler avec beaucoup d'options d'installation différentes,
  de manière plus ou moins automatique. Enfin, les disques d'amorce des
  distributions combinent en général la possibilité d'installer le
  système avec celle de le réparer.


  Certains disques d'amorce utilisent une fonctionnalité appelée iinniittrrdd
  (iinniittiiaall rraammddiisskk, ou ddiissqquuee mméémmooiirree iinniittiiaall). Cette fonctionnalité est
  apparue aux alentours de la version 2.0.x et permet au noyau de
  démarrer en deux étapes. Quand le noyau commence son démarrage, il
  charge une première image de disque mémoire depuis le disque d'amorce.
  Ce disque mémoire initial est un système racine contenant un programme
  à exécuter avant le chargement du vrai système racine. Ce programme
  inspecte en général l'environnement et/ou demande à l'utilisateur de
  sélectionner diverses options de démarrage, telles que le périphérique
  sur lequel on va trouver le vrai disque racine. En général, il charge
  des modules supplémentaires ne faisant pas partie du noyau. Quand ce
  programme initial se termine, le noyau charge la vraie image racine et
  continue son démarrage 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 résumés sur la manière dont les disques
  d'installation de chaque distribution semblent marcher, après étude de
  leurs systèmes de fichiers et/ou code source. Nous ne garantissons pas
  l'exactitude des informations, ni qu'elles n'ont pas changé depuis les
  versions indiquées.

  Slackware (v.3.1) utilise un démarrage 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 démarrage ("Welcome to
  the Slackware Linux bootkernel disk!") en utilisant le paramètre
  message de LILO. Ce message indique à l'utilisateur d'entrer une ligne
  de paramètres de démarrage si nécessaire. Après le démarrage, un
  système  racine est chargé depuis une seconde disquette. L'utilisateur
  lance un  script de configuration (setup) qui démarre l'installation.
  Au lieu d'utiliser  un noyau modulaire, Slackware fournit un certain
  nombre de noyaux différents, et c'est à l'utilisateur de fournir celui
  qui correspond à sa configuration matérielle.

  RedHat (v.4.0) utilise aussi un démarrage avec LILO. Il charge un
  disque mémoire compressé sur le premier disque, qui fait tourner une
  version personnalisée d'init. Ce programme demande quels gestionnaires
  utiliser puis charge des fichiers supplémentaires depuis un autre
  disque si nécessaire.

  Debian (v.1.3) possède probablement le groupe de disques
  d'installation le plus sophistiqué. Il utilise le chargeur SYSLINUX
  pour choisir différentes options de chargement, puis utilise une image
  initrd pour guider l'utilisateur dans l'installation. Il semble
  utiliser à la fois des versions personnalisées d'init et du shell.



  1100..  FFooiirree AAuuxx QQuueessttiioonnss ((FFAAQQ))


  QQ.. JJee ddéémmaarrrree ddeeppuuiiss mmeess ddiissqquueess dd''aammoorrccee//rraacciinnee eett rriieenn nnee ssee ppaassssee..
  QQuuee ffaaiirree ??


  Voir la section précédente ``En cas de problèmes''.

  QQ.. CCoommmmeenntt ffoonnccttiioonnnnee llee ddiissqquuee dd''aammoorrccee SSllaacckkwwaarree//DDeebbiiaann//RReeddHHaatt ??


  Voir la section précédente ``La méthode des pros''.

  QQ.. CCoommmmeenntt ffaaiirree uunn ddiissqquuee dd''aammoorrccee aavveecc uunn ggeessttiioonnnnaaiirree ppoouurr XXYYZZ ??


  Le plus simple est d'obtenir un noyau Slackware depuis le site miroir
  de Slackware le plus proche. Les noyaux Slackware sont des noyaux
  génériques contenant le plus de gestionnaires pour le plus de
  périphériques différents possibles. Si vous avez un contrôleur SCSI ou
  IDE, vous avez de bonnes chances de trouver un gestionnaire
  correspondant dans le noyau Slackware.

  Allez dans le répertoire a1 et sélectionnez un noyau SCSI ou IDE
  suivant votre type de contrôleur. Vérifiez 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 démarrer votre ordinateur. Récupérez 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 vérifier le périphérique racine indiqué dans le
  noyau, en utilisant la commande :

          rdev zImage



  rdev vous montrera alors le périphérique 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 dépasse le cadre de ce HOWTO, et je vous suggère donc
  de consulter le Guide d'Installation de Linux ou de récupérer la
  distribution Slackware. Voir la section ``Références'' de ce HOWTO.

  QQ.. CCoommmmeenntt mmeettttrree àà jjoouurr llee nnooyyaauu ddee mmaa ddiissqquueettttee dd''aammoorrccee ??


  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 système de
  fichier, ou par la commande cp pour un disque d'amorce/racine.
  Reportez-vous à la section ``Démarrage'' de ce HOWTO pour les détails
  de création d'un disque d'amorce. Le processus décrit s'applique aussi
  bien à la mise à jour d'un noyau sur le disque d'amorce.

  QQ.. CCoommmmeenntt mmeettttrree àà jjoouurr mmaa ddiissqquueettttee rraacciinnee aavveecc ddee nnoouuvveeaauuxx
  ffiicchhiieerrss ??


  Le plus simple est de recopier le système de fichiers depuis le disque
  racine vers le PÉRIPHÉRIQUE que vous avez utilisé (comme dans la
  section précédente ``Création du système racine''). Montez ensuite le
  système de fichiers et modifiez-le. Vous devez vous souvenir d'où
  partait votre système racine et du nombre de blocs qu'il occupait :


          dd if=/dev/fd0 bs=1k skip=DEBUTRACINE count=BLOCS | \
                  gunzip > PÉRIPHÉRIQUE
          mount -t ext2 PÉRIPHÉRIQUE /mnt



  Une fois les modifications effectuées, recommencez comme précédemment
  (dans la section ``C'est dans la poche'') et retransférez le système
  racine sur le disque. Vous ne devriez pas avoir à retransférer le
  noyau ou à recalculer le mot disque mémoire si vous ne changez pas la
  position de départ du nouveau système de fichiers.

  QQ.. CCoommmmeenntt rreettiirreerr LLIILLOO ppoouurr ppoouuvvooiirr rreeddéémmaarrrreerr DDOOSS ??

  Ce n'est pas réellement un problème 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
  effectuée 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 Maître), et
  il remplace le secteur de démarrage avec une version propre du DOS,
  sans modifier la table de partitions. Certains puristes n'apprécient
  pas cette méthode, mais même l'auteur de LILO, Werner Almesberger, le
  suggère. C'est facile et ça marche.

  QQ.. CCoommmmeenntt ppuuiiss--jjee ddéémmaarrrreerr ssii jj''aaii ppeerrdduu mmoonn nnooyyaauu _e_t mmoonn ddiissqquuee
  dd''aammoorrccee ??


  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 contrôleur de disque
  (IDE ou SCSI) comme décrit précédemment dans "Comment faire un disque
  d'amorce avec un gestionnaire pour XYZ ?". Vous pouvez alors démarrer
  votre ordinateur avec ce noyau, puis réparer les dommages éventuels.

  Le noyau que vous récupérerez peut ne pas avoir comme périphérique
  racine ce que vous souhaitez comme disque et partition. Par exemple,
  le noyau générique SCSI de Slackware utilise /dev/sda2 comme
  périphérique racine, alors que ma partition racine Linux se trouve
  être /dev/sda8. Dans ce cas il faut changer le périphérique racine.

  Vous pouvez changer les paramètres de périphérique racine et disque
  mémoire du noyau même si vous n'avez que le noyau, et un autre système
  d'exploitation tel que DOS.

  rdev modifie les paramètres du noyau en changeant les valeurs à un
  décalage fixé dans le fichier du noyau, et vous pouvez donc faire de
  même si vous avez un éditeur hexadécimal disponible sous quelque
  système d'exploitation fonctionnant encore -- par exemple, Norton
  Utilities Disk Editor sous DOS. Vous devez alors vérifier puis
  éventuellement modifier les valeurs dans le noyau, aux décalages
  suivants :



       HEX     DEC  DESCRIPTION
       0x01F8  504  Octet de poids faible du mot disque mémoire
       0x01F9  505  Octet de poids fort du mot disque mémoire
       0x01FC  508  Numéro mineur du périphérique racine : voir ci-dessous
       0X01FD  509  Numéro majeur du périphérique racine : voir ci-dessous




  L'interprétation du mot disque mémoire était décrite dans la
  précédente section ``Mise en place du mot disque mémoire''.


  Les numéros majeurs et mineurs de périphérique doivent correspondre au
  périphérique à partir duquel le système 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 commençant à partir du secteur d'amorce, au lieu de
  l'écrire dans le système de fichiers. Si vous utilisez Norton
  Utilities, vous devez écrire le fichier un disque physique en
  commençant au début du disque.

  QQ.. CCoommmmeenntt ffaaiirree ddeess ccooppiieess ssuupppplléémmeennttaaiirreess ddeess ddiissqquueetttteess
  dd''aammoorrccee//rraacciinnee ??


  Les supports magnétiques se détériorant 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 réutiliser la même 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 périphérique.

  Pour copier l'original, entrez la commande :


               dd if=NOMPÉRIPHÉRIQUE of=NOMFICHIER
               où NOMPÉRIPHÉRIQUE est le nom du périphérique du lecteur de disquette
               et NOMFICHIER le nom du fichier de sortie (sur le disque dur)




  Ne pas mettre le paramètre count permet à dd de copier la disquette en
  entier (2880 blocs en haute densité).

  Pour recopier le fichier résultant sur une nouvelle disquette, insérez
  celle-ci et entrez la commande inverse :


               dd if=NOMFICHIER of=NOMPÉRIPHÉRIQUE




  A noter que la discussion précédente suppose que vous n'avez qu'un
  seul lecteur de disquette. Si vous en avez deux du même type, vous
  pouvez copier les disquettes à l'aide d'une commande du type :

               dd if=/dev/fd0 of=/dev/fd1




  QQ.. CCoommmmeenntt ppuuiiss--jjee ddéémmaarrrreerr ssaannss aavvooiirr àà ttaappeerr ""aahhaaxxxxxxxx==nnnn,,nnnn,,nnnn"" àà
  cchhaaqquuee ffooiiss ??


  Quand un périphérique disque ne peut pas être détecté automatiquement,
  il faut fournir au noyau une chaîne de paramètres de commande du
  périphérique, telle que :


               aha152x=0x340,11,3,1




  Cette chaîne peut être fournie de différentes manières grâce à LILO :


  ·  En l'entrant sur la ligne de commande à chaque démarrage du système
     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 défaut, ce qui fera
     utiliser à LILO les mêmes options à chaque démarrage ;

  ·  En utilisant la directive append= dans le fichier de configuration
     de LILO. Attention à encadrer la chaîne de paramètres avec des
     guillemets.

  Par exemple, une ligne de commande utilisant la chaîne ci-dessus
  serait :


               zImage  aha152x=0x340,11,3,1 root=/dev/sda1 lock




  Cela passerait la chaîne de paramètres pour le périphérique tout en
  demandant au noyau d'utiliser /dev/sda1 comme périphérique racine et
  de sauvegarder la ligne de commande pour la réutiliser pour tous les
  démarrages futurs.

  Un exemple de directive APPEND peut être :


               APPEND = "aha152x=0x340,11,3,1"




  Attention, la chaîne de paramètres ne doit PAS être entourée de
  guillemets sur la ligne de commande, mais DOIT l'être dans la
  directive APPEND.

  Notez aussi que pour que la chaîne de paramètres soit utilisée, le
  noyau doit contenir le gestionnaire pour ce type de disque. Si ce
  n'est pas le cas, personne n'écoute la chaîne de paramètres, et vous
  devrez reconstruire le noyau pour inclure le gestionnaire requis. Pour
  plus de détails 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 générique pour votre
  type de disque et l'installer.

  Il est fortement recommandé aux lecteurs de lire la documentation de
  LILO avant de faire des expériences d'installation de LILO. Une
  utilisation imprudente de la directive BOOT peut endommager des
  partitions.

  QQ.. AAuu ddéémmaarrrraaggee,, jj''oobbttiieennss ll''eerrrreeuurr ""AA:: ccaannnnoott eexxeeccuuttee BB""..  PPoouurrqquuooii ??


  Il existe plusieurs utilitaires qui référencent en dur le nom d'autres
  programmes. Ça n'arrive pas tout le temps, mais cela peut expliquer
  pourquoi un exécutable peut ne pas être trouvé sur votre système même
  si vous l'y voyez. Vous pouvez vérifier si un programme donné est
  référence en dur dans un autre en utilisant la commande strings et en
  passant son résultat par grep.

  On trouve comme exemples connus de référence en dur :

  ·  shutdown dans certaines versions référence /etc/reboot en dur, et
     reboot doit donc être placé dans le répertoire /etc ;

  ·  init a posé des problèmes à au moins une personne, pour qui le
     noyau ne trouvait pas init.

  Pour corriger ces problèmes, vous pouvez soit déplacer les programmes
  vers le répertoire attendu, soit changer les fichiers de configuration
  (par exemple inittab) pour référencer le bon répertoire. En cas de
  doute, mettez les programmes dans le même répertoire que sur votre
  disque dur, et utilisez les mêmes fichiers inittab et /etc/rc.d que
  sur celui-ci.

  QQ.. MMoonn nnooyyaauu ggèèrree lleess ddiissqquueess mméémmooiirreess,, mmaaiiss lleess iinniittiiaalliissee àà 00 KKoo


  Quand cela arrive, un message du noyau apparaîtra au moment du
  démarrage, du type :


          Ramdisk driver initialized : 16 ramdisks of 0K size



  C'est probablement parce que la taille a été fixée par les paramètres
  du noyau à 0 au moment du démarrage. Cela peut être dû à un paramètre
  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
  paramètres antérieurs du noyau. Si vous trouvez une telle ligne,
  supprimez-la.

  Attention, si vous essayez d'utiliser un disque mémoire dont la taille
  est de 0 Ko, le comportement est imprévisible et peut conduire à une
  panique (panic) du noyau.




  KK..  RReessssoouurrcceess eett ppooiinntteeuurrss


  Lorsque vous récupérez un paquetage, prenez toujours la dernière
  version, sauf si vous avez de bonnes raisons pour ne pas le faire.


  KK..11..  DDiissqquueess dd''aammoorrccee pprrééffaabbrriiqquuééss


  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 précision contraire, elles
  sont disponibles dans le répertoire
  <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
     fonctionnalités. Il support IDE, SCSI, les bandes, les adaptateurs
     réseaux, PCMCIA et plus encore. Environ 100 programmes utilitaires
     et autres outils sont inclus, pour réparer et récupérer les
     disques. Le paquetage contient aussi des scripts pour désassembler
     et reconstruire les images afin de pouvoir ajouter des compléments
     si nécessaire ;



  ·  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 système. Certains modules peuvent
     être chargés après le démarrage pour d'autres cartes SCSI. Il ne
     fonctionnera probablement pas sur les systèmes avec 4 Mo de RAM car
     il utilise un disque mémoire 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 contrôleurs SCSI, et ELF/a.out. Il
     contient aussi nombre de modules et d'utilitaires pour réparer et
     récupérer un disque dur ;



  ·  les images de cramdisk, à base de noyau 2.0.33, disponibles pour
     machines à 4 et 8 Mo de mémoire. Elles contiennent l'émulation
     mathématique et le réseau (PPP et script dialin, NE2000, 3C509), ou
     le support pour lecteur ZIP sur port parallèle. Ces images de
     disquettes peuvent démarrer un 386 avec 4 Mo de RAM. Le support de
     MSDOS est inclus, ce qui fait que vous pouvez les récupérer sur le
     réseau vers une partition DOS.

     <http://metalab.unc.edu/pub/Linux/system/recovery/images>



  KK..22..  PPaaqquueettaaggeess ddee sseeccoouurrss


  Plusieurs paquetages de création de disques de secours existent sur
  metalab.unc.edu. Vous précisez à ces paquetages un ensemble de
  fichiers à inclure, et le logiciel automatise (à divers degrés) la
  création 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 années et ne supportent
  pas la création d'un système racine compressé sur disque mémoire. A
  notre connaissance, Yard est le seul paquetage le permettant.



  KK..33..  SSccrriippttss sshheellll eett GGrraahhaamm CChhaappmmaann


  Graham Chapman a écrit un ensemble de scripts pouvant être utiles
  comme exemple sur la manière de créer des disques d'amorce. Dans les
  précédentes versions de ce HOWTO, les scripts apparaissaient en
  annexe, mais ils ont été supprimés du document et placés 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 précisez le
  mauvais périphérique de pagination, vous verrez votre système racine
  se faire complètement et définitivement effacer. Vérifiez que vous
  l'avez bien configuré avant de le lancer !



  KK..44..  LLIILLOO :: llee cchhaarrggeeuurr LLiinnuuxx


  Ecrit par Werner Almesberger. Excellent chargeur d'amorce, dont la
  documentation comprend des informations sur le contenu du secteur
  d'amorce et les premières étapes du processus de démarrage.

  Ftp depuis  <ftp://tsx-11.mit.edu/pub/linux/packages/lilo/>. Il est
  aussi disponible sur Metalab et ses miroirs.


  KK..55..  FFAAQQ LLiinnuuxx eett HHOOWWTTOOss


  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 française).

  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 français, sur
  <http://www.freenix.fr/linux/HOWTO/>).
  La plupart des documentations sur Linux peuvent être trouvées sur la
  page principale du Linux Documentation Project
  <http://metalab.unc.edu/LDP/>.

  Si vous êtes désespéré, envoyez un courrier électronique à mail-
  server@rtfm.mit.edu avec le mot "help" dans le message, puis suivez
  les instructions.



  KK..66..  UUttiilliissaattiioonn dduu ddiissqquuee mméémmooiirree


  La documentation fournie avec le noyau Linux contient une excellente
  description de la manière dont fonctionne le nouveau code de disque
  mémoire. Voir /usr/src/linux/Documentation/ramdisk.txt. C'est écrit
  par Paul Gortmaker, et comprend une section sur la création d'un
  disque mémoire compressé.



  KK..77..  LLee pprroocceessssuuss ddee ddéémmaarrrraaggee ddee LLiinnuuxx


  Pour plus de détails sur le processus de démarrage de Linux, voici
  quelques pointeurs :


  ·  Le Linux System Administrators' Guide (Guide des Administrateurs
     Systèmes Linux) contient une section sur le démarrage. 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>
     décrit d'une manière extrêmement poussée le processus de démarrage,
     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 démarrage. 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 très sympathique navigateur
     hypertexte pour le noyau à  <http://wafu.netgate.net/linux/>. Voici
     quelques fichiers correspondants :



     aarrcchh//ii338866//bboooott//bboooottsseecctt..SS,,sseettuupp..SS
        Contient le code assembleur pour le secteur d'amorce.


     aarrcchh//ii338866//bboooott//ccoommpprreesssseedd//mmiisscc..cc
        Contient le code pour décompresser le noyau.


     aarrcchh//ii338866//kkeerrnneell//
        Répertoire contenant le code d'initialisation du noyau. setup.c
        contient le mot disque mémoire.


     ddrriivveerrss//bblloocckk//rrdd..cc
        Contient le gestionnaire de disque mémoire. Les procédures
        rd_load et rd_load_image chargent des blocs depuis un
        périphérique vers un disque mémoire. La procédure
        identify_ramdisk_image détermine quel type de système de
        fichiers est trouvé, et s'il est compressé.





  LL..  CCooddeess dd''eerrrreeuurr dduu ddéémmaarrrraaggee ddee LLIILLOO


  Les questions sur ces erreurs sont posées si souvent sur Usenet que
  nous les incluons ici en tant que service public. Ce résumé 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
  imprimée avant ou après l'exécution d'une action spécifique. Si LILO
  échoue à un moment donné, les lettres affichées jusque là peuvent être
  utilisées pour identifier le problème.



     ((rriieenn))
        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.


     LL  Le premier morceau du chargeur d'amorce a été chargé et démarré,
        mais il ne peut charger le second morceau. Les codes d'erreur à
        deux chiffres indiquent le type de problème. (Voir également la
        section "Codes d'erreur disque".) Ce cas indique en général une
        panne de périphérique ou une incohérence de géométrie (c'est à
        dire de mauvais paramètres disques).


     LLII Le premier morceau du chargeur d'amorce a pu charger le second
        morceau, mais n'a pas réussi à l'exécuter. Cela peut être causé
        par une incohérence de géométrie ou par le déplacement de
        /boot/boot.b sans lancer l'installateur de carte.


     LLIILL
        Le second morceau du chargeur d'amorce a été démarré, mais il ne
        trouve pas la table de descripteurs dans le fichier carte. C'est
        en général dû à une panne de périphérique ou une incohérence de
        géométrie.


     LLIILL??
        Le second morceau du chargeur d'amorce a été chargé à un adresse
        incorrecte. C'est en général causé par une subtile incohérence
        de géométrie, ou par le déplacement de /boot/boot.b sans lancer
        l'installateur de carte.


     LLIILL--
        La table de descripteurs est corrompue. Cela peut être dû à une
        incohérence de géométrie ou au déplacement de /boot/map sans
        lancer l'installeur.


     LLIILLOO
        Tous les éléments de LILO ont été correctement chargés.


  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.



  MM..  EExxeemmppllee ddee ccoonntteennuu ddee rrééppeerrttooiirreess ssuurr uunn ddiissqquuee rraacciinnee



  Voici le contenu d'un exemple de système racine et d'une disquette
  utilitaire.





















































  Répertoire 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 périphériques que pour les partitions IDE que
  ***  j'utilise. Si vous utilisez du SCSI, prenez les périphériques
  ***  /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 bibliothèques. Beaucoup de choses ne
  ***  fonctionnent pas au démarrage si ld.so.cache n'est pas là.
  ***  Vous pouvez soit le régénérer après création 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 système ELF avec glibc qui nécessite 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

  ***  Répertoires 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:






  NN..  EExxeemmppllee ddee ccoonntteennuu ddeess rrééppeerrttooiirreess dd''uunn ddiissqquuee uuttiilliittaaiirree





       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 française
  Chris Bagwell, cbagwell@sprynet.com
  v2.0, 14 février 2000

  (Adaptation et maintenance de la version française 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 répondre aux ques­
  tions les plus courantes qui apparaissent dans les forums de discus­
  sion sur Usenet et les listes de distribution.
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 Copyright et dénégations
     1.2 Réactions
     1.3 Remerciements
     1.4 Notes sur la version française

  2. Détermination 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 combinés 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 Réglage 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 récent
     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


  ______________________________________________________________________



  11..  IInnttrroodduuccttiioonn

  Ce document est un guide pour faire marcher votre souris à bus sous
  Linux. Avec les distributions les plus avancées qui sont disponibles
  actuellement, la configuration de ce type de souris est en général
  facile, mais si vous rencontrez vraiment des problèmes, ce document
  vous donnera une meilleure compréhension sur la façon de configurer
  manuellement votre souris, au niveau matériel et logiciel.

  Aussi loin que je me souvienne, le support des souris à bus a toujours
  été implémenté dans le noyau, et il n'y a pas eu de réelles
  modifications pendant une longue période. Ce document devrait donc
  être valable pour n'importe quelle version de Linux que vous pourriez
  vraisemblablement avoir.



  11..11..  CCooppyyrriigghhtt eett ddéénnééggaattiioonnss

  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 déclinons toute responsabilité quant à son
  contenu. L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entièrement à vos propres risques.

  Tous les droits sont détenus par leurs propriétaires 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 particulière ne constitue
  pas un endossement.

  Il est fortement conseillé d'effectuer une sauvegarde de votre système
  avant une installation importante ainsi qu'à intervalles réguliers.




  11..22..  RRééaaccttiioonnss

  Si vous trouvez des erreurs dans ce document, si vous avez le moindre
  commentaire à propos du contenu, une mise à jour ou bien un supplément
  à ajouter, envoyez-le moi par un courriel à l'adresse électronique
  signalée tout au début.



  11..33..  RReemmeerrcciieemmeennttss

  Ce howto a été, dans l'esprit de Linux, un effort collectif. Tous mes
  remerciements à Mike Battersby, mib@deakin.edu.au qui commença cette
  FAQ. La plupart des erreurs ont probablement été rajoutées par moi-
  même.


  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 variées 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.




  11..44..  NNootteess ssuurr llaa vveerrssiioonn ffrraannççaaiissee

  L'adaptation de ce document a été commencée et maintenue par Patrick
  Robbe jusqu'à la version 1.2, puis par Géraud Canet jusqu'à la version
  1.8.



  22..  DDéétteerrmmiinnaattiioonn dduu ttyyppee ddee vvoottrree ssoouurriiss

  Il y a deux caractéristiques différentes et importantes que vous aurez
  besoin de savoir concernant votre souris avant de continuer : quelle
  interface est utilisée par la souris et quel est le protocole employé.


  L'interface est l'aspect matériel de la souris, et elle inclut des
  choses comme les ports d'entrées/sorties utilisés ou comment vérifier
  que c'est installé. C'est la partie qui concerne le noyau, afin qu'il
  sache comment lire les données provenant de la souris.


  Le protocole est l'aspect programmation de la souris. Les applications
  ont besoin de connaître ce protocole pour interpréter les données
  brutes provenant de la souris, et qui leur sont envoyées par
  l'intermédiaire du noyau.



  22..11..  LLeess iinntteerrffaacceess ddee ssoouurriiss

  Le noyau de Linux jusqu'au 2.2 reconnaît actuellement quatre types
  différents de souris bus : Inport (Microsoft), Logitech, PS/2 et ATI-
  XL.


  La série 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 discutés avec les souris à bus car elles ne rentrent pas
  dans le cadre des interfaces séries les plus courantes.


  Il n'y a pas de méthode miracle pour déterminer le type d'interface de
  votre souris -- les constructeurs de souris ont généralement leur
  propre idée de ce qu'est un standard.  Les sections suivantes
  devraient vous aider, sinon il faudra improviser.


  22..11..11..  LLeess ssoouurriiss IInnppoorrtt

  Elles comprennent la plupart des souris Microsoft ancien style, celles
  qui ont la forme d'une savonnette Dove.  Les souris Inport se
  connectent généralement à une carte d'interface qui se branche sur le
  bus de la carte mère. Si la prise du câble de votre souris est ronde,
  qu'elle a 9 contacts et une encoche sur l'un des côtés, vous avez
  certainement une souris Inport.



  ATI affirme actuellement que toutes les cartes combo ATI VGA + bus
  pour souris utilisent le matériel 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 théorie compatible avec
  le pilote pour souris à bus Microsoft Inport mais a une utilisation
  des interruptions légèrement différentes et donc il y a un pilote
  spécifique.  Évitez autant que possible ce pilote qui n'est pas très
  bien supporté.




  22..11..22..  LLeess ssoouurriiss LLooggiitteecchh

  Les souris Logitech, en général, 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 livrées
  dans des boîtes Logitech, ou bien il y a marqué "Logitech" sur la
  carte d'interface, de façon à ce qu'on puisse formellement reconnaître
  que c'est une souris Logitech.




  22..11..33..  LLeess ssoouurriiss PPSS//22

  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 connectée au port de périphérique
  auxiliaire PS/2 sur le contrôleur 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.


  22..11..44..  LLeess ccoommbbiinnééss AATTII ssoouurriiss--vviiddééoo

  Les souris ATI-XL sont une variante des souris Inport, avec de légères
  différences dans la configuration des interruptions. Elle sont
  fournies avec les cartes ATI-XL combinant l'adaptateur vidéo et
  l'interface souris. Si vous n'êtes pas sûr d'avoir une carte ATI-XL
  (et donc une souris du même 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 ; même si le premier devrait donner de meilleurs
  résultats.

  Il existe aussi une carte adaptateur vidéo/souris, plus ancienne,
  appelée VGA1024 ou ATI VGA Wonder. Ces cartes sont faites de la même
  façon que les ATI-XL, mais utilisent le protocole des souris Logitech.
  En ce qui concerne ces souris, bien que leur conception matérielle
  soit la même que celle des ATI-XL, vous devez les configurer (IRQ) de
  la même façon que les souris Logitech.



  22..11..55..  LLeess ddiiggiittaalliisseeuurrss PPaallmmppiilloott IIBBMM PPCC111100

  Le palmpilot IBM PC110 contient un pad digitaliseur qui peut être
  utilisé pour émuler une souris grâce au protocole des souris PS/2.
  Dans un tel cas, vous configurez l'interface matérielle à l'aide du
  pilote du périphérique IBM PC110 and configurez l'interface logicielle
  comme vous le feriez pour une souris PS/2.

  22..11..66..  LLeess ssoouurriiss ddeess oorrddiinnaatteeuurrss AAppppllee ddee bbuurreeaauu

  Ce bus de souris est commun à tous les Macintoshs et utilise un
  connecteur à 4 broches. La souris est controlée par le noyau mais
  toute application nécessitera d'être informée 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.



  22..11..77..  SSoouurriiss hhyybbrriiddee

  A l'époque où les souris à bus étaient populaires, les compagnies
  vendant du matériel ont beaucoup expérimenté et ont échangé leurs
  technologies entre elles. Par conséquent vous pourriez avoir une
  souris ATI qui utilise l'interface matériel 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'expérimenter en utilisant différents pilotes d'interfaces avec
  différents protocoles de souris.




  22..22..  LLeess pprroottooccoolleess ddee ssoouurriiss

  Le monde PC baigne dans des protocoles différents qui entrent en
  conflit les uns avec les autres. Heureusement, le choix de souris se
  connectant sur le bus est considérablement plus réduit que celui des
  souris série. 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.


  33..  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr vvoottrree ssoouurriiss

  Une fois que vous avez déterminé le type d'interface de votre souris
  et son protocole, vous êtes prêt à poursuivre.


  33..11..  RRééggllaaggee ddee ll''iinntteerrrruuppttiioonn ddee llaa ssoouurriiss



  Maintenant que vous avez trouvé quelle interface matérielle 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 périphériques que vous avez installés. Ce
  dernier point mérite d'être répété : aassssuurreezz--vvoouuss qquu''eellllee nn''eennttrree eenn
  ccoonnfflliitt aavveecc aauuccuunn ddeess aauuttrreess ppéérriipphhéérriiqquueess qquuee vvoouuss aavveezz iinnssttaallllééss !!


  Assurez-vous que votre souris n'essaie pas d'utiliser la même
  interruption que l'un de vos autres périphériques -- la souris ne peut
  pas partager une ligne d'interruption sous Linux, même si elle le peut
  sous d'autres systèmes d'exploitation. Consultez la documentation de
  tous vos autres périphériques pour voir quelle interruption ils
  utilisent.



  Les souris à bus sous Linux ne déclarent pas quelle IRQ elles
  utilisent jusqu'à ce qu'elles soient sollicitées par une application.
  Les matériels Plug-n-Play déclarent souvent leurs interruptions
  pendant la phase de démarrage. Cela rend possible qu'une carte Plug-n-
  Play de votre matériel s'empare de l'IRQ de votre souris. Gardez à
  l'esprit que, si d'autres systèmes d'exploitation peuvent initialiser
  ces cartes à une IRQ qui n'est pas utilisée 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 connaît pas de
  conflit.



  Dans la plupart des  cas, l'IRQ4 est utilisée  par le premier port
  série (/dev/ttyS0),    l'IRQ3   par  le  second (/dev/ttyS1)  (en
  supposant que vous ayez réellement ces périphériques  -- sinon vous
  pouvez en toute quiétude utiliser leur IRQ),  l'IRQ5 pour certains
  adaptateurs SCSI, et l'IRQ12 pour  certaines cartes réseau. Avoir une
  carte utilisant l'IRQ12 est un sérieux  problème,  dans  la  mesure
  où généralement, vous ne pouvez utiliser que l'IRQ12 pour le port
  PS/2.


  Pour les  souris ATI-XL, Inport  et Logitech,  le  noyau utilise par
  défaut 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 récent, vous devriez pouvoir passer une option par la
  ligne de commande au noyau, lui indiquant les interruptions que vous
  utilisez, sans avoir à recompiler.


  33..11..11..  LLeess ssoouurriiss IInnppoorrtt eett LLooggiitteecchh

  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
  appelées IRQ) numéro 2,3,4 et 5. Pour changer d'interruption,
  déplacez  simplement le   cavalier de  sa  position actuelle à la
  paire de connecteurs appropriée.



       ******************************************************
       ***     ASSUREZ-VOUS QUE L'ORDINATEUR EST ÉTEINT   ***
       ***         AVANT DE TOUCHER AUX CAVALIERS         ***
       ******************************************************





  33..11..22..  LLeess ssoouurriiss AATTII--XXLL

  Les souris ATI-XL, ainsi que quelques autres souris ATI, ont une
  interruption réglable   par logiciel  -- vous  devriez  avoir reçu
  avec  votre souris un programme MS-DOS (VSETUP.EXE) pour régler l'IRQ.
  Pour ce faire, vous devez (provisoirement) redémarrer sous MS-DOS et
  exécuter ce programme. Notez que  le programme VSETUP  reconnaît un
  paramètre optionnel « /70 » pour augmenter le   taux de
  rafraîchissement   vertical (ce qui   diminue le scintillement). Le
  programme VSETUP vous permet  également de  choisir entre l'adresse
  primaire  et l'adresse secondaire     --   vous avez intérêt    à
  sélectionner  l'adresse  primaire, sinon  le  noyau  ne  sera pas
  capable de détecter votre souris.


  Une  fois que  VSETUP aura été   exécuté,  vous devrez  faire  un
  redémarrage à froid (_h_a_r_d _r_e_s_e_t) pour que la nouvelle configuration
  prenne effet.


  33..11..33..  LLeess ssoouurriiss PPSS//22

  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 périphérique utilise l'IRQ 12, il vous faudra le reconfigurer
  pour qu'il utilise une autre ligne d'interruption.


  33..22..  CCoonnffiigguurraattiioonn dduu nnooyyaauu

  Pour que votre souris bus  fonctionne correctement, vous devrez
  recompiler le noyau en  y intégrant le support de   souris bus. Si
  vous utilisez un noyau précompilé, sachez que ces noyaux sont souvent
  munis d'un support intégré des trois  souris  bus. Ce ne   sera
  peut-être pas  suffisant.  Le noyau pourrait essayer  d'utiliser une
  mauvaise     interruption, ou la  détection  pourrait s'embrouiller et
  se tromper de type  de souris.


  Dans la série pre-2.4 des noyaux il n'y a pas de support pour l'auto-
  détection de l'IRQ qu'une souris à bus utilise. Donc si votre carte
  est configurée pour autre chose que la valeur par défaut IRQ5 du
  noyau, vous allez avoir besoin de faire reconnaître au noyau l'IRQ
  effectivement utilisée. Cela peut être fait plusieures manières. La
  plus simple est de passer l'information au noyau au moment du
  démarrage dans une ligne de commande. Lire s'il-vous-plait la section
  ``Compilation du noyau'' mais après avoir d'abord lu la section
  ``Modification des interruptions sous un noyau récent''. Une grande
  aide dans ce type de problème : le Bootprompt-HOWTO, disponible sur la
  plupart des sites qui distribuent ce HOWTO.





  33..22..11..  CCoommppiillaattiioonn dduu nnooyyaauu

  Allez   dans le   répertoire  du noyau    (on  suppose  ici qu'il
  s'agit  de /usr/src/linux) et faites un



       make config




  Si vous n'êtes  pas sûr du  type de votre souris, la  première  fois
  que vous recompilez le noyau, vous pouvez sélectionner  toutes les
  souris bus qui vous sont proposées en option, dans l'espoir  que le
  noyau détecte automatiquement le bon type.  Cette  méthode a  un
  succès mitigé :  ça ne  marche  pas toujours,  mais d'un autre côté ça
  peut vous éviter  d'avoir à recompiler le noyau plusieurs fois.

  Répondez "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 système 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  inconvénient  à
  répondre  "y", ce qui  intégrera directement le support dans le noyau.

  Par exemple, si vous avez une souris Inport, vous devrez répondre "y"
  à la question


       Microsoft busmouse support


  et "n"  à toutes les  autres  questions sur les  souris bus.  Répondez
  comme d'habitude à toutes les questions qui ne concernent pas les
  souris.

  Pour compiler le noyau avec le support des souris PS/2, répondez "y" à
  la question


       PS/2 mouse (aka "auxiliary device") support


  Le pilote de souris PS/2 reconnaît en fait deux types de
  périphériques : le contrôleur standard PS/2 et une interface PS/2
  spéciale de Chips &Technologies,   qui   est utilisée  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, répondez "y" à la
  question


       C&T 82C710 mouse port support (as on TI Travelmate)


  Notez que   vous devrez auparavant avoir répondu  "y" à la  question
  sur le pilote PS/2 standard pour avoir la possibilité de  répondre à
  cette question, puisque le pilote 82C710 en est en fait un supplément.

  Lorsqu'il est configuré à la fois  pour une interface PS/2 standard
  et pour le  contrôleur 82C710,  le pilote recherche d'abord une  puce
  82C710 lors du  démarrage. 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 dotée d'un port
  PS/2 standard.  Toutefois, il y a eu un  cas rapporté où  le pilote a
  détecté  par erreur  un processeur 82C710, alors pour mettre toutes
  les chances  de votre côté,   ne choisissez pas  le support du 82C710
  si vous n'en avez pas besoin.

  Compilez votre nouveau noyau et redémarrez normalement.

  Maintenant, vous  allez pouvoir  indiquer  au  noyau quelle
  interruption est utilisée 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 réellement utilisée par votre souris (Cf. la
  section ``Réglage de l'interruption de la souris'' pour des détails
  concernant le réglage 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 réellement utilisée 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 redémarrez avec le  nouveau noyau.  Le support  de
  votre souris bus  devrait maintenant être correctement inclus dans le
  noyau compilé.




  33..22..22..  MMooddiiffiiccaattiioonn  ddeess iinntteerrrruuppttiioonnss aavveecc uunn nnooyyaauu rréécceenntt

  Ces indications concernant la modification des interruptions utilisées
  par le noyau fonctionnent avec n'importe quelle  version. Les noyaux
  plus récents (à partir de quelque part dans les 2.x.x)  permettent de
  passer des arguments au noyau pendant le démarrage, par le biais de
  LILO ou LOADLIN, afin de préciser le numéro 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 façon  à 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 démarrage avec LILO :



       bmouse=3 (pour une souris Logitech)
       msmouse=3 (pour une Microsoft Inport)




  Remplacez les 3  par  le numéro   d'interruption de  votre  souris.
  Voici  un exemple de cette méthode 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
  démarrage.

  Si  vous     utilisez les   modules,    vous  pouvez   définir les
  interruptions manuellement, en utilisant insmodcomme suit :



       insmod msbusmouse.o mouse_irq=3 (souris Inport)
       insmod busmouse.o mouse_irq=3 (Logitech)




  Si  votre     système   utilise kerneld    pour    charger  les
  modules automatiquement, vous pouvez  éditer votre fichier
  /etc/conf.modules ou /etc/modules.conf (celui que votre système
  utilise), et y ajouter une des lignes suivantes :



       options msbusmouse mouse_irq=3
       options busmouse mouse_irq=3





  33..33..  LLeessppéérriipphhéérriiqquueess aassssoocciiééss aauuxx ssoouurriiss..

  Sous Linux,  on  accède  aux  souris  via  les périphériques   du
  répertoire /dev. Le tableau qui  suit donne la liste  des types
  d'interfaces et les périphériques associés.



       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.  Périphériques associés aux souris.





     NNoottee ::
        Si vous utilisez votre souris ATI-XL avec le pilote Inport, vous
        devez  utiliser  le périphérique  /dev/inportbm, et non  pas le
        périphérique /dev/atibm.

  Les colonnes  majeur   et   mineur donnent   les   numéros  de
  périphérique correspondants.

  Si  vous n'avez pas  ces périphériques, il  vous faut tout d'abord les
  créer.  Pour ce faire, vous devez exécuter 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


     NNoottee ::
        Il y a un certain temps dans l'histoire (de moins en moins)
        récente de Linux, le nom des périphériques  a changé. Les noms
        suivants ont été  remplacés  par    ceux donnés   plus   haut,
        et  doivent être  effacés : bmousems, bmouseps2, bmouseatixl,
        bmouselogitech.

  Nombreux   sont  ceux qui  aiment   à  créer  un   lien symbolique
  entre  le périphérique associé  à leur souris et /dev/mouse  de façon
  à ne pas avoir à se rappeler quel périphérique ils doivent utiliser.
  Si vous avez une distribution récente de  Linux, vous avez
  certainement  un tel lien. Si c'est le cas, ou si  vous créez  ce
  lien, assurez-vous qu'il   pointe bien sur  le périphérique
  correspondant à votre type de souris.


  44..  UUttiilliissaattiioonn ddee vvoottrree ssoouurriiss


  Cette section traite de l'utilisation générale de votre souris avec
  différentes applications



  44..11..  CCoonnffiigguurraattiioonn ddeess aapppplliiccaattiioonnss

  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 sélectionnez pas le protocole correct de souris ou si
  vous installez une nouvelle souris avec une nouvelle interface, vous
  pouvez en général lancer un programme qui reconfigurera pour vous et
  gpm et X-Window afin d'utiliser le nouveau protocole.



  44..11..11..  RReeddHHaatt

  Sous RedHat, vous pouvez lancer le programme /usr/sbin/mouseconfig.



  44..11..22..  AAuuttrreess ddiissttrriibbuuttiioonnss

  Consultez les documents qui sont livrés avec.


  44..22..  ggppmm..

  gpm est un programme qui vous permet de réaliser des opérations de
  copier-coller entre différents terminaux virtuels sous Linux, de la
  même façon 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
  exécutable de gpm précompilé.

  En lançant gpm, utilisez l'option -t pour préciser votre protocole de
  souris, et l'option -m pour indiquer quel périphérique vous utilisez.
  Trois protocoles utiles aux souris bus sont logi, bm et ps2. Par
  défaut, le périphérique souris est /dev/mouse, aussi pouvez-vous
  omettre l'option -m si vous avez déjà 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 déplacer 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.


  44..33..  XXFFrreeee8866

  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  présence d'un troisième bouton en
  pressant simultanément les deux seuls que  vous avez.  Toutes les
  autres  lignes  se rapportant   à  la souris,   comme  "BaudRate"  et
  "SampleRate" devraient être commentées, car elles n'ont aucun effet
  sur les souris bus.


  44..44..  XXFFrreeee8866 eett ggppmm

  Durant une longue période du développement du noyau,  il n'était pas
  possible de partager  les souris bus entre les  différents processus.
  À cause de cela, il était  difficile  d'utiliser XFree86 et   gpm en
  même 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 façons de faire marcher gpm avec XFree86 sous ces noyaux.
  La première  consiste à  tuer  toute  instance de gpm   en  cours
  avant  de démarrer XFree86.      La     seconde  consiste     à
  utiliser     l'option « repeater »  de  gpm (qui prend les  données
  de la souris et répète 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 méthode
  permettant   de faire fonctionner ensemble XFree86 et gpm avec ces
  vieux  noyaux. Veuillez vous reporter à la   documentation  de gpm
  si vous souhaitez   utilisez  la méthode du répéteur.


  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 début de votre script startx  pour que gpm soit
  arrêté automatiquement. Vous pouvez également placer à la fin du
  script une commande qui redémarre gpm, de telle sorte qu'il se relance
  à  la sortie de votre session X.


  55..  VVoouuss nn''aarrrriivveezz ttoouujjoouurrss ppaass àà ffaaiirree mmaarrcchheerr vvoottrree ssoouurriiss ??

  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  expériences. C'est sûr,  vous
  allez en baver, mais  au bout du compte la seule façon 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 spécifique, ou un problème pour lequel vous
  pensez que je peux vous aider,  n'hésitez pas à me contacter  à
  l'adresse qui  figure  au début 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 plaît, 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  hiérarchie Linux,
  ils sont  déjà assez en   désordre comme ça ! Lorsque vous postez une
  question, vous  aurez une meilleure réponse (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  modéré fr.comp.os.linux.moderated.



  55..11..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  Voici quelques sources d'information concernant Linux et les souris.



  55..11..11..  33--BBuuttttoonn MMoouussee HHOOWWTTOO

  Pour les souris PS/2 à 3 boutons. Il donne des indications pour faire
  marcher le bouton intermédiaire.




  55..11..22..  LLaappttoopp--HHOOWWTTOO

  Il donne des indications pour faire marcher une souris externe en même
  temps que la souris fournie avec.




  55..11..33..  WWaaccoomm TTaabblleett HHOOWWTTOO

  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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  AAvveerrttiisssseemmeenntt

  JJee ((WWiinnffrriieedd TTrruueemmppeerr)) rreejjeettttee ttoouuttee ggaarraannttiiee ccoonncceerrnnaanntt ccee  ddooccuummeenntt,,
  iinncclluuaanntt  ttoouutteess  lleess  ggaarraannttiieess  iimmpplliicciitteess  ddee mmiissee ssuurr llee mmaarrcchhee eett
  dd''uuttiilliittee ppoouurr uunn cceerrttaaiinn uussaaggee ;; eenn aauuccuunn ccaass oonn nnee ppoouurrrraa  mmee  tteenniirr
  ccoommppttee  ddee  ddoommmmaaggeess  ssppeecciiaauuxx,, iinnddiirreeccttss oouu ccoonnsseeccuuttiiffss aa,, nnii dd''aauuccuunn
  ddoommmmaaggee qquueellqquu''iill ssooiitt rreessuullttaanntt ddee llaa ppeerrttee dd''uuttiilliissaattiioonn,, ddee ddoonnnneeeess
  oouu  ddee  pprrooffiittss,,  qquuee  ccee  ssooiitt  ddaannss  uunnee  aaccttiioonn  ccoonnttrraaccttuueellllee,,  ddee
  nneegglliiggeennccee  oouu  aauuttrree  aaccttiioonn,,  ddeeccoouullaanntt  ddee  oouu  eenn  rreellaattiioonn   aavveecc
  ll''uuttiilliissaattiioonn  ddee  ccee  ddooccuummeenntt..   En  gros,  lisez  et utilisez a vos
  propres risques.

  11..22..  LLeeccttuurreess ssuuggggeerreeeess

  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.

  11..33..  TTeerrmmiinnoollooggiiee...... LLaasseerrss aauu mmaaxxiimmuumm...... FFeeuu !!

  _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 qquu''uunnee sseeuullee ffooiiss 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.

  11..44..  GGrraavveeuurrss ddee CCDD--RROOMM ssuuppppoorrtteess

  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).

  11..55..  PPoossssiibbiilliitteess"" ssuuppppoorrtteeeess

  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.

  11..66..  LLiisstteess ddee ddiissttrriibbuuttiioonn

  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.

  11..77..  DDiissppoonniibbiilliittee

  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.)

  22..  PPrreeppaarreezz vvoottrree mmaacchhiinnee LLiinnuuxx ppoouurr ggrraavveerr ddeess CCDD--RROOMMss

  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.

  22..11..  CCoonnffiigguurreezz llee mmaatteerriieell

  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 ?)

  22..22..  NNoottee ssuurr llee ggrraavvaaggee ddee CCDDss ssoouuss LLiinnuuxx

  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.

  22..33..  CCrreeeezz lleess ppeerriipphheerriiqquueess ggeenneerriiqquueess

  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.

  22..44..  EEttaabblliisssseezz ll''uuttiilliissaattiioonn ddeess  ppeerriipphheerriiqquueess  _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.

  22..55..  CCoonnssttrruuiirree eett iinnssttaalllleerr llee nnooyyaauu

  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)

  22..66..  RReeddeemmaarrrreerr ll''oorrddiinnaatteeuurr ppoouurr aammoorrcceerr llee cchhaannggeemmeenntt

  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.

  22..77..  CCrreeaattiioonn ddeess _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 ``''.

  22..88..  OObbtteenneezz llee llooggiicciieell ppoouurr ggrraavveerr lleess CCDDss

  22..88..11..  UUttiilliittaaiirreess eenn lliiggnnee ddee ccoommmmaannddee

  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 ``'').

  22..88..22..  UUnnee iinntteerrffaaccee uuttiilliissaatteeuurr ggrraapphhiiqquuee ((ooppttiioonnnneellllee))

  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.

  33..  EEccrriirree uunn CCDD

  ``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.

  33..11..   DDeetteerrmmiinneezz  aa  qquueell  ppeerriipphheerriiqquuee SSCCSSII ggeenneerriiqquuee llee ggrraavveeuurr eesstt
  aattttaacchhee

  (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.

  33..22..  RRaasssseemmbblleerr lleess llooggiicciieellss

  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).

  33..33..  SSttoocckkeerr lleess ddoonnnneeeess ssuurr uunn CCDD

  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.

  33..44..  CCrreeeerr uunn ssyysstteemmee ddee ffiicchhiieerrss IISSOO 99666600

  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).

  NNee ppaanniiqquueezz ppaass ::

       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.
  33..55..  TTeesstteerr ll''iimmaaggee CCDD

  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.

  33..66..  RReemmaarrqquueess ssuurr lleess ddiissqquueess CCDD RReeiinnssccrriippttiibblleess vviieerrggeess

  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.

  33..77..  EEccrriivveezz ll''iimmaaggee dduu CCDD ssuurr uunn CCDD

  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.

  33..88..  SSii qquueellqquuee cchhoossee vvaa mmaall......

  dessous de bouteilles. :-)

  44..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess,, aavveecc lleess rreeppoonnsseess

  44..11..  AA qquueell ppooiinntt llee pprroocceessssuuss ddee bbrruulluurree eesstt--iill sseennssiibbllee ??""

  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.

  44..22..  LLaa ffrraaggmmeennttaattiioonn aa--tt--eellllee ddeess mmaauuvvaaiiss eeffffeettss ssuurr llee fflloott ??""

  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.

  44..33..   EEsstt--iill ppoossssiibbllee ddee ssttoocckkeerr ll''iimmaaggee CCDD ssuurr uunn ssyysstteemmee ddee ffiicchhiieerr
  UUMMSSDDOOSS ??""

  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.

  44..44..  YY aa--tt--iill uunn mmooyyeenn ddee ppaasssseerr oouuttrree lleess lliimmiittaattiioonnss ddee IISSOO 99666600 ??""

  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).

  44..55..  CCoommmmeenntt lliirree eett eeccrriirree ddeess CCDDss aauuddiioo ??""

  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.

  44..66..  CCoommmmeenntt rreecchheerrcchheerr ddeess ppeerriipphheerriiqquueess SSCCSSII aapprreess llee ddeemmaarrrraaggee  ??""

  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.
        */

  44..77..   EEsstt--iill ppoossssiibbllee ddee ffaaiirree uunnee ccooppiiee eexxaaccttee dd''uunn CCDD ddee ddoonnnneeeess ??""

  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 !

  44..88..  LLiinnuuxx ppeeuutt--iill lliirree ddeess CCDDss JJoolliieett ??""

  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>

  44..99..   CCoommmmeenntt  ppuuiiss--jjee lliirree//mmoonntteerr ddeess CCDD--RROOMMss aavveecc llee ggrraavveeuurr ddee CCDDss
  ??""

  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

  55..  DDeeppaannnnaaggee

  55..11..  CCaa nnee mmaarrcchhee ppaass :: ssoouuss LLiinnuuxx

  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.

  55..22..  CCaa nnee mmaarrcchhee ppaass :: ssoouuss DDOOSS eett aassssiimmiilleess

  Essayez  d'utiliser  Linux.  L'installation  et  la  configuration des
  pilotes SCSI pour DOS est une horreur. Linux est trop complique ? Ha !

  55..33..  EErrrreeuurrss SSCCSSII ppeennddaanntt llaa pphhaassee ddee ggrraavvaaggee

  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

  66..  RReemmeerrcciieemmeennttss

     AAnnddrreeaass EErrddmmaannnn <<eerrddmmaannnn@@zzpprr..uunnii--kkooeellnn..ddee>>
        a fourni l'exemple du graveur Yamaha ;

     AArrtt SSttoonnee <<ssttoonnee@@mmaatthh..uubbcc..ccaa>>
        a eu l'idee de mettre des systemes de fichiers non ISO 9660  sur
        un CD ;

     BBaarrttoosszz MMaarruusszzeewwsskkii <<BB..MMaarruusszzeewwsskkii@@zzssmmeeiiee..ttoorruunn..ppll>>
        a rapporte des erreurs de prononciation ;

     BBeerrnnhhaarrdd GGuubbaannkkaa <<bbeegg@@iipppp--ggaarrcchhiinngg..mmppgg..ddee>>
        a  remarque  le  besoin  d'une  version  recente  de  mount pour
        utiliser le peripherique loopback ;

     BBrriiaann HH.. TToobbyy
        a fignole l'orthographe ;

     BBrruuccee PPeerreennss <<bbrruuccee@@ppiixxaarr..ccoomm>>
        a donne des informations sur la liste de distribution cdwrite ;

     DDaallee SScchheeeettzz <<ddwwaarrff@@ppoollaarriiss..nneett>>
        a aide a ameliorer la section sur la creation de l'image du CD ;

        a donne l'URL de l'outil mkhybrid ;

     EEddwwiinn HH.. KKrriibbbbss
        a remarque que '-K' necessite de patcher mkisofs ;

     GGeerraalldd CC SSnnyyddeerr <<ggccssnnyydd@@lloooopp..ccoomm>>
        a teste l'ecriture d'un CD-ROM ext2 (voir ``'') ;

     IInnggoo FFiisscchheenniisscchh <<iinnggoo@@mmii..uunnii--kkooeellnn..ddee>>
        a   fourni   l'exemple  des  deux  controleurs  hebergeant  deux
        peripheriques ;

     JJaannnnee HHiimmaannkkaa <<sshheemm@@ooyytt..oouulluu..ffii>>
        pointeur vers le patch du noyau pour lire des CDs Joliet ;

     JJooeerrgg SScchhiilllliinngg <<sscchhiilllliinngg@@ffookkuuss..ggmmdd..ddee>>
        informations sur cdrecord ;

     JJooss vvaann GGeeffffeenn <<jjooss@@ttnnjj..pphhyyss..ttuuee..nnll>>
        a note le probleme dans ``'' ;

     MMaarrkkuuss DDiicckkeebboohhmm <<mm..ddiicckkeebboohhmm@@uunnii--kkooeellnn..ddee

     PPiieerrrree PPffiisstteerr <<pppp@@uupplliifftt..ffrr>>
        a aide a developper la recette des copies exactes ;

     RRiicckk CCoocchhrraann <<rriicckk@@mmsscc..ccoorrnneellll..eedduu>>
        indice sur dis-/reconnect desactive par defaut  dans  le  pilote
        NCR ;

     SStteepphhaann NNooyy <<ssttnnooyy@@mmii..uunnii--kkooeellnn..ddee>>
        des informations et son experience sur l'ecriture de CDs audio ;

     SStteepphheenn HHaarrrriiss <<sswweehh@@mmppnn..ccoomm>>
        a donne des indices sur l'ecriture des CDs audio ;

     TThhee SShheeeeppyy OOnnee <<kkeerroo@@eessccaappee..ccoomm>>
        a suggere l'utilisation des CD rates en dessous de bouteilles ;

     VVoollkkeerr KKuullhhmmaannnn <<kkuuhhllmmaavv@@eelleecc..ccaanntteerrbbuurryy..aacc..nnzz>>
        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 française Bruno
  Cornec, bruno@victoria.frmug.org
  v1.14, 24 Mars 1999

  Ce document décrit l'installation, la configuration et l'utilisation
  d'un lecteur de CD-ROM sous Linux. Il indique les matériels pris en
  charge et répond à certaines questions fréquemment posées. Le but est
  de rendre les nouveaux utilisateurs rapidement opérationnels et de
  réduire le trafic des forums USENET et des listes de discussion.
  ______________________________________________________________________

  Table des matières





















































  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. Matériels 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 propriétaire
     3.4 Lecteur sur port parallèle
     3.5 Pilotes alternatifs

  4. Installation

     4.1 Installation du matériel
     4.2 Configuration et fabrication du noyau Linux
     4.3 Création des fichiers de périphérique et passage de paramètres à 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 Amorçage du noyau Linux
     4.5 Montage, Démontage, et Éjection du media
     4.6 Dépannage
        4.6.1 Étape 1: Assurez vous d'exécuter le noyau que vous avez compilé
        4.6.2 Étape 2: Assurez vous que les pilotes adéquats sont dans le noyau
        4.6.3 Étape 3: Le noyau a-t-il détecté votre lecteur lors de l'amorçage ?
        4.6.4 Étape 4: Pouvez-vous lire des données du lecteur ?
        4.6.5 Étape 5: Pouvez-vous monter le disque ?
        4.6.6 Diagnostiquer des problèmes audio-numériques
        4.6.7 Si rien ne marche

  5. Les applications

     5.1 Platines de lecture de CDs audio-numériques
     5.2 Le CD-Photo
     5.3 Mkisofs
     5.4 Outils ISO-9660

  6. Réponses aux questions fréquemment posées (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 données des CDs audio-numériques ?
     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'arrête le système ?
     6.10 J'ai un CD "spécial" 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 accordée"
     6.13 Comment dois-je interpréter 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 arrêté de fonctionner après l'installation de Linux
     6.16 Il y a des fichiers cachés sur un CD que je ne peux lire
     6.17 Où est documentée 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 système 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. Références



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ce document indique comment utiliser un lecteur de CD-ROM sous  Linux.
  Il est conçu comme un guide de référence rapide, couvrant tout ce que
  vous avez besoin de savoir pour installer et configurer un lecteur de
  CD-ROM sous Linux. Les questions fréquemment posées au sujet des CD-
  ROMs y trouvent une réponse, et des références sont données concernant
  d'autres sources d'informations relatives à la technologie et aux
  applications liées au CD-ROM.


  11..11..  RReemmeerrcciieemmeennttss


  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.

  Grâce au logiciel SGML Tools ce document est maintenant disponible
  dans plusieurs formats, tous générés à partir d'un même source.


  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  De nouvelles versions de ce document seront diffusées périodiquement
  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 répertoire
  /usr/doc, et vous pouvez aussi en acheter des exemplaires imprimés
  chez de nombreux vendeurs. Quelques fois, les HOWTOs disponibles par
  l'intermédiaire des vendeurs de CD-ROM, des sites ftp ou sous forme
  imprimée sont périmés. 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>

  Française :  <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>

  Suédoise :  <http://www.swe-doc.linux.nu/>

  La majorité des traductions de ce HOWTO et des autres HOWTO consacrés
  à Linux peut aussi être trouvée à l'adresse
  <http://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/> et
  <ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/translations/>.  [NDT :
  les versions françaises peuvent aussi être trouvées 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 référence ici.


  11..33..  SSuuggggeessttiioonnss


  Je me repose sur vous, lecteur pour rendre ce HOWTO utile.  Si vous
  avez des suggestions, des corrections, ou des commentaires, n'hésitez
  pas à me les envoyer tranter@pobox.com, et j'essaierai de les
  incorporer dans une prochaine révision. [NDT : Pour ce qui concerne
  la traduction, veuillez les faire parvenir au traducteur
  bruno@victoria.frmug.org]

  Je souhaite aussi répondre aux questions générales sur les CD-ROM sous
  Linux, du mieux possible. Avant de les poser, lisez s'il vous plaît
  toutes les informations de ce HOWTO, et ensuite envoyez moi un rapport
  détaillé de votre problème. Veuillez ne pas me poser de questions sur
  les lecteurs de CD-ROM sur d'autres systèmes d'exploitation que Linux.

  Si vous publiez ce document sur un CD-ROM ou sous forme papier, une
  copie de remerciement serait appréciée; envoyez moi un courrier
  électronique pour obtenir mon adresse postale. Considérez é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.


  11..44..  LLiicceennccee ddee DDiissttrriibbuuttiioonn


  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 mêmes termes que ceux en
  vigueur dans la licence LDP consultable à l'adresse
  <http://metalab.unc.edu/LDP/COPYRIGHT.html>.





  22..  LLaa tteecchhnnoollooggiiee dduu CCDD--RROOMM



  "Un CD-ROM est de la mémoire morte, et un système de disque compact
  audio-numérique est disponible en tant que média organisé de données numériques
  pour cet usage. Pour lire des CDs audio-numériques, veuillez insérer 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 Mémoire accessible en lecture uniquement), un média de stockage,
  utilisant un laser optique pour lire des trous microscopiques sur la
  couche d'aluminium du disque en polycarbonate.  Il utilise le même
  format que les disques compacts audio-numériques.  En raison de sa
  haute capacité de stockage, de sa fiabilité et de son faible coût, le
  CD-ROM est devenu un moyen de stockage de plus en plus répandu.

  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 dactylographiées.

  La première génération 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 propriétaire. Ils permettent aussi généralement l'écoute
  de disques audio-numériques, 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 données issues d'un disque
  audio-numérique, sous une forme numérique.

  Les CD-ROM sont habituellement formatés avec un système de fichier
  ISO-9660 (précédemment 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
  caractères). Les _E_x_t_e_n_s_i_o_n_s _R_o_c_k _R_i_d_g_e utilisent des champs non-
  définis dans la norme ISO-9660, pour autoriser les noms de fichiers
  plus longs et l'ajout d'informations propres à Unix (par exemple, les
  droits associés au fichier, les liens symboliques, etc).  Microsoft a
  défini un système de fichiers ISO propriétaire appelé Joliet, qui
  prend en charge les noms de fichiers longs en utilisant l'encodage de
  caractères 16 bits UNICODE.

  Le _C_D _P_h_o_t_o est un standard développé par Kodak, pour permettre le
  stockage d'images photographiques sous forme de données numériques sur
  un CD-ROM. Grâce à un logiciel approprié, il est possible de
  visualiser les images sur un ordinateur, de les manipuler, ou de les
  imprimer. Des informations peuvent être ajoutées sur un CD Photo à une
  date ultérieure; 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 spécial
  "doré", qui peut être lu par n'importe quel lecteur de CD-ROM. Les
  données ne peuvent y être écrites qu'une fois, bien que l'utilisation
  du format multi-session, permette d'ajouter de nouvelles données 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 données sur le CD. Ils utilisent des disques
  spéciaux qui ne peuvent pas être lus sur des lecteurs de CD-ROM
  standard, bien que les lecteurs de CD-RW eux-mêmes sachent lire des
  disques standard.

  Le DVD-ROM étend la capacité de stockage du CD jusqu'à 17 gigaoctets.
  Ils sont couramment utilisés comme média de distribution pour les
  films longue durée encodés avec le format MPEG-2. L'encodage vidéo
  MPEG est habituellement utilisé conjointement avec des décodeurs
  matériels spécialisés.


  33..  MMaattéérriieellss pprriiss eenn cchhaarrggee


  Cette section présente les lecteurs de CD-ROM et les interfaces qui
  sont actuellement pris en charge par Linux. Les informations sont ici
  basées 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 même manière.


  33..11..  LLeess lleecctteeuurrss ddee CCDD--RROOMM AATTAAPPII


  L'ATAPI (ATA Packet Interface - Interface par paquets ATA) est un
  protocole pour le contrôle des périphériques de stockage. Il est
  construit sur l'interface ATA (Attachement AT), le nom officiel du
  standard ANSI pour l'interface IDE, développé pour les disques durs.
  L'ATAPI est communément utilisé pour les disques durs, les lecteurs de
  CD-ROM, les lecteurs de bandes, et d'autres périphériques. Étant
  actuellement le type d'interface le plus populaire, il offre la
  plupart des fonctions du SCSI, sans besoin d'un contrôleur ou de
  câbles 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é
  récemment un lecteur de CD-ROM, en particulier s'il est quadruple
  vitesse au moins, vous êtes quasiment assurés qu'il est IDE/ATAPI.

  Linux propose également un pilote du noyau d'émulation IDE SCSI, qui
  permet à un périphérique IDE/ATAPI d'apparaître, au niveau logiciel,
  comme un périphérique SCSI, ce qui autorise l'utilisation d'un pilote
  de périphérique SCSI au lieu du pilote natif ATAPI. Ceci est utile
  quand vous disposez d'un périphérique 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
  périphérique SCSI approprié.


  33..22..  LLeess lleecctteeuurrss ddee CCDD--RROOMM SSCCSSII


  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é à reconnaître
  de multiples périphériques, et sa prise en compte par une grande
  variété d'ordinateurs. Quelques désavantages du SCSI sont le besoin
  d'une carte contrôleur et de câbles 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 contrôleur SCSI; Cf "Comment
  utiliser des périphériques SCSI ("SCSI HOWTO") pour plus d'information
  sur le matériel d'interface.

  Il est à noter que certains lecteurs de CD-ROM comprennent un
  contrôleur propriétaire ayant une interface modifiée, non entièrement
  compatible avec le standard SCSI (par exemple, ne permettant pas
  d'ajouter d'autres périphériques SCSI sur le bus). Ceux-ci ne
  fonctionneront vraisemblablement _p_a_s avec Linux.


  33..33..  LLeess lleecctteeuurrss ddee CCDD--RROOMM àà iinntteerrffaaccee pprroopprriiééttaaiirree


  De nombreux lecteurs utilisant des interfaces propriétaires sont
  disponibles; l'interface est souvent fournie par l'entremise d'une
  carte son. De simples cartes d'interface, équivalentes à l'interface
  proposée sur les cartes son, sont également disponibles. Ces lecteurs
  sont généralement moins chers et de taille inférieure aux lecteurs
  SCSI. Leur désavantage est le manque de standardisation et
  d'évolutivité.

  Il est à noter que ces interfaces propriétaires sont parfois appelées
  abusivement IDE, parce que, à l'instar des disques durs IDE, elles
  utilisent une simple interface basée sur le bus PC/AT. Pour ajouter à
  la confusion, certains fabriquants, et de façon notable Creative Labs,
  ont fourni différents types de lecteurs de CD-ROM et ont proposé des
  interfaces propriétaires, SCSI et ATAPI sur leurs cartes son.

  Les lecteurs de CD-ROM suivants, à interface propriétaire, sont
  reconnus au niveau du noyau Linux (les lecteurs présentés sur la même
  ligne sont compatibles entre eux):

  Le tableau ci-dessous donne les lecteurs de CD-ROM propriétaires qui
  sont connus pour fonctionner sous Linux. Des pilotes pour des lecteurs
  additionnels peuvent être disponibles dans les derniers noyaux de
  développement ou en tant que rustine du noyau. Ces dernières peuvent
  le plus souvent être trouvées à l'adresse
  <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cdrom/>.  Vérifiez
  aussi les fichiers de documentation inclus avec la distribution du
  noyau, habituellement installés dans le répertoire
  /usr/src/linux/Documentation/cdrom, pour obtenir les dernières
  informations.



















                  Lecteurs de CD-ROM propriétaires

  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 même 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
     modèles, y compris le CDA268-03I et le CDA269-031SE ne sont pas
     propriétaires et doivent utiliser le pilote du noyau IDECD (ATAPI).

  5. Peut aussi être vendu dans le kit multimédia Reveal.

  6. Le lecteur Philips CM205 n'est pas pris en charge par ce pilote,
     mais il existe un pilote séparé 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 reliés à
     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 modèles mentionnés ici, en
  particulier s'il a été acheté récemment et s'il est quadruple vitesse
  ou plus rapide, il utilise probablement l'interface IDE/ATAPI
  mentionnée dans une section précédente. _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 propriétaire, ils suivent le
  standard de l'interface ATAPI/IDE.


  33..44..  LLeecctteeuurr ssuurr ppoorrtt ppaarraallllèèllee


  Il existe des périphériques de stockage externes, y compris des
  lecteurs de CD-ROM, qui se connectent sur le port parallèle des
  ordinateurs personnels. Dans la plupart des cas, ces périphériques
  utilisent en interne une interface IDE ainsi qu'un adaptateur qui
  interconnecte le bus IDE interne au port parallèle du PC.

  Linux dispose d'un pilote IDE pour port parallèle qui prend en charge
  la majorité des périphériques sur port parallèle. Au moment où
  j'écris, il prend en charge les périphériques 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 trouvées à l'adresse
  <http://www.torque.net/linux-pp.html>.


  33..55..  PPiillootteess aalltteerrnnaattiiffss


  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>.


  44..  IInnssttaallllaattiioonn


  L'installation d'un lecteur de CD-ROM sous Linux comporte les étapes
  suivantes :


  1. Installation du matériel.

  2. Configuration et fabrication du noyau Linux.

  3. Création des fichiers de périphérique et positionnement des
     paramètres d'amorçage.

  4. Amorçage du noyau Linux

  5. Montage du média.

  Les sections suivantes vont couvrir chacune de ces étapes en détail.



  44..11..  IInnssttaallllaattiioonn dduu mmaattéérriieell


  Veuillez suivre les instructions du fabricant pour l'installation du
  matériel, ou laissez votre revendeur effectuer l'opération. Les
  détails varieront suivant la nature du lecteur, interne ou externe, et
  le type de l'interface utilisée. Il n'y a aucune exigence spécifique
  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 configurés par cavalier comme "seul" ("single") ou
  "maître" ("master"), et non "esclave" ("slave") lorsqu'un seul
  périphérique IDE est raccordé à l'interface (bien que cette
  restriction ne soit plus obligatoire avec les noyaux récents).


  44..22..  CCoonnffiigguurraattiioonn eett ffaabbrriiccaattiioonn dduu nnooyyaauu LLiinnuuxx


  Lors de la première installation de Linux à partir d'un CD-ROM, vous
  utiliserez vraisemblablement les disquettes d'amorçage (boot et root)
  fournies avec votre distribution Linux. Si possible, choisissez une
  disquette d'amorçage avec un pilote de noyau pour votre type de
  lecteur de CD-ROM. Si vous ne pouvez pas trouver de disque d'amorçage
  avec le pilote de CD-ROM nécessaire 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 réseau

  3. Amorcer DOS, et installer les fichiers Linux sur votre disque dur.

  4. Amorcer DOS, et créer un jeu de disquettes pour installer Linux

  5. Trouver quelqu'un qui peut fabriquer pour vous une disquette
     d'amorçage contenant le pilote nécessaire 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'intérieur du boîtier
  de disque, et/ou des fichiers sur le CD).

  Une fois Linux installé, la plupart des utilisateurs voudra compiler
  son propre noyau, en général pour l'une des raisons suivantes :


  ·  prendre en charge un lecteur de CD-ROM ou un autre matériel

  ·  évoluer vers une nouvelle version du noyau

  ·  libérer des ressources mémoire 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 détails de fabrication du noyau. Je mentionnerai
  uniquement ici les points qui sont spécifiques aux lecteurs de CD-ROM.


  Évidemment, vous devez intégrer 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 répondre yes aux
  questions:



       Enhanced IDE/MFM/RLL disk/cdrom/tape support (CONFIG_BLK_DEV_IDE) [Y/n/?]
       (Prise en charge évoluée 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 propriétaire, activez le
  pilote approprié. Vous pouvez utiliser le tableau présenté dans la
  section précédente pour déterminer le pilote à utiliser pour votre
  modèle.

  Virtuellement tous les CD-ROM utilisent le système 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 système de fichier ISO9660)




  Bien que cela ne soit pas nécessaire 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
  même temps. Le Guide de configuration du Son (Sound HOWTO)
  <http://metalab.unc.edu/LDP/HOWTO/Sound-HOWTO.html> peut être une
  référence utile pour cela.

  Vous devez ensuite suivre la procédure habituelle de fabrication et
  d'installation du noyau .  N'amorcez pas le système avec le nouveau
  noyau, tant que vous n'avez pas créé les fichiers de périphériques et
  que vous n'avez pas réglé les paramètres d'amorçage, ainsi que décrit
  dans la section suivante.

  Le système de fichiers ISO-9660 et presque tous les pilotes de
  lecteurs de CD-ROM peuvent être compilés comme modules chargeables du
  noyau. Ce procédé permet aux pilotes du noyau d'être chargés et
  déchargés sans réamorcer le système, ce qui libère aussi de la
  mémoire. Je vous recommande d'avoir votre installation du CD-ROM
  fonctionnelle en utilisant des pilotes compilés dans le noyau d'abord.
  L'utilisation des modules est décrite 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 récente.

  Il est possible que vous ayez à utiliser un pilote distribué
  séparément 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 basée
  sur X11, invoquée par "make xconfig". Les trois moyens de
  configuration offrent tous une aide en ligne.


  44..33..  CCrrééaattiioonn ddeess ffiicchhiieerrss ddee ppéérriipphhéérriiqquuee eett ppaassssaaggee ddee ppaarraammèèttrreess àà
  ll''iinniittiiaalliissaattiioonn


  Le noyau utilise des fichiers de périphériques pour identifier quel
  pilote utiliser. Si vous utilisez une distribution standard de Linux,
  il est possible que les fichiers de périphérique nécessaires aient été
  créés pendant l'installation. Sous la distribution Slackware de Linux,
  par exemple, il y a un outil de paramétrage, setup doté de menus, qui
  inclut le paramétrage des lecteurs de CD-ROM, et la plupart des
  systèmes dispose d'un script /dev/MAKEDEV. Si vous n'utilisez pas ces
  méthodes, vous pouvez appliquer la procédure manuelle décrite dans
  cette section. Même si vous utilisez l'une de ces méthodes, il est
  recommandé de vérifier au moins les fichiers de périphérique par
  rapport aux informations de cette section.

  Vous créez le fichier de périphérique en exécutant 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 périphériques de CD-ROM légèrement
  différents de ceux mentionnés ici.

  Il est recommandé de créer aussi un lien symbolique vers le
  périphérique de CD-ROM pour s'en souvenir plus facilement. Par
  exemple, pour un lecteur de CD-ROM IDE qui se trouve en deuxième
  position sur la seconde interface, le lien serait créé en utilisant :



       # ln -s /dev/hdd /dev/cdrom




  Si vous voulez écouter des CDs audio-numériques, vous devrez
  positionner les protections sur le fichier de périphérique (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 périphérique tente de déterminer
  si les périphériques appropriés sont présents, typiquement en testant
  des adresses spécifiques. De nombreux pilotes testent automatiquement
  à plusieurs adresses, mais en raison des différences de configuration,
  de conflits possibles entre pilotes et de limitations du matériel, les
  pilotes ont parfois besoin d'aide pour identifier les adresses et
  d'autres paramètres. La plupart des pilotes acceptent une option
  passée au niveau de la ligne de commande par le noyau au pilote de
  périphérique. Ceci peut s'effectuer interactivement, ou plus
  commodément, se configurer dans votre outil d'amorçage. 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 présente les problèmes spécifiques à un
  pilote de périphérique particulier, y compris les fichiers de
  périphérique, les paramètres d'amorçage, et les possibilités des
  différents pilotes. Vous avez seulement besoin de lire la section
  relative à votre type de lecteur. Les fichiers de documentation se
  trouvent généralement dans le répertoire
  /usr/src/linux/Documentation/cdrom.


  44..33..11..  LLee ppiilloottee SSbbppccdd



            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 périphérique: /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 paramètre est l'adresse de base du périphérique (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 désactive la
  détection automatique ainsi que le pilote.

  Le fichier de périphérique peut être créé par:



       # mknod /dev/sbpcd b 25 0




  Jusqu'à quatre lecteurs par contrôleur sont pris en charge. Les trois
  lecteurs suivants sur le premier contrôleur utiliseront les nombres de
  périphérique mineurs 1 à 3. Si vous avez plus d'un contrôleur, créez
  les fichiers de périphérique avec des nombres majeurs 26, 27 et 28,
  jusqu'à un maximum de 4 contrôleurs (soit 16 lecteurs de CD-ROM au
  total; il est à espérer 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_.


  44..33..22..  PPiilloottee SSoonnyyccdduu553355



            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 périphérique: /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 contrôleur (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 périphérique peut être créé par:



       # mknod /dev/sonycd535 b 24 0


  Certaines distributions Linux utilisent /dev/sonycd pour ce
  périphérique. D'anciennes versions de ce pilote utilisaient un nombre
  majeur de périphérique 21; vérifiez que votre fichier de périphérique
  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.


  44..33..33..  PPiilloottee CCdduu3311aa



            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 périphérique: /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'entrée/sortie de base de la carte
  (par ex. 0x340), le second est le numéro d'interruption à utiliser (0
  indique l'utilisation d'entrées/sorties scrutées en cycle (polled). le
  troisième paramètre, 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
  légèrement différent. Si on charge le pilote en utilisant les
  commandes modprobe ou insmod, les paramètres prennent la forme
  suivante :



       cdu31a_port=<io-address> cdu31a_irq=<interrupt>




  L'adresse d'entrée/sortie de base est requise, alors que le numéro
  d'interruption est optionnel.

  Le fichier de périphérique 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 problèmes courants
  avec ces lecteurs. On peut la trouver à l'adresse
  <http://lemures.shinma.symix.com/~zureal/cdu31a.html>.


  44..33..44..  PPiilloottee AAzzttccdd



            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 périphérique: /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 paramètre est l'adresse d'entrée/sorties de base de la carte
  (par ex. 0x340).

  Le fichier de périphérique peut être créé par:



       # mknod /dev/aztcd0 b 29 0




  Veuillez noter que ce pilote ne fonctionne que pour le modèle
  CDA268-01A. Les autres modèles, y compris les CDA268-03I et
  CDA269-031SE ne sont pas propriétaires et doivent utiliser le pilote
  IDECD (ATAPI) du noyau.

  Consultez le fichier aztcd pour plus d'informations sur ce pilote.


  44..33..55..  PPiilloottee GGssccdd











            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 périphérique: /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>




  spécifiant l'adresse d'entrée/sortie de base de la carte (par ex.
  0x340).

  Le fichier de périphérique 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.


  44..33..66..  PPiilloottee MMccdd



            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 périphérique: /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 déjà 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>

  spécifiant l'adresse d'entrée/sortie de base de la carte (par ex.
  0x340) et le numéro d'interruption requis (IRQ).

  Le fichier de périphérique peut être créé par:



       # mknod /dev/mcd b 23 0




  Consultez le fichier mcd pour plus d'informations sur ce pilote.


  44..33..77..  PPiilloottee MMccddxx



            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 matériel)
            Test automatique: non
        Fichier périphérique: /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>




  spécifiant l'adresse d'entrée/sortie de base de la carte (par ex.
  0x340) et le numéro d'interruption requis (IRQ).

  Le fichier de périphérique peut être créé par:



       # mknod /dev/mcdx0 b 20 0




  Si vous avez acheté récemment un lecteur de CD-ROM Mitsumi, ne
  présupposez 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.




  44..33..88..  PPiilloottee CCmm220066



            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 périphérique: /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'entrée/sortie de base de la carte
  (par ex. 0x340). Le second est le numéro d'interruption.

  Le fichier de périphérique peut être créé par:



       # mknod /dev/cm206cd b 32 0




  Consultez le fichier cm206 pour plus d'informations sur ce pilote.


  44..33..99..  PPiilloottee OOppttccdd



            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 périphérique: /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 spécifier l'adresse d'entrée/sortie de base de la carte (par ex.
  0x340).

  Le fichier de périphérique peut être créé par:



       # mknod /dev/optcd0 b 17 0




  Consultez le fichier optcd pour plus d'informations sur ce pilote.


  44..33..1100..  PPiilloottee SSjjccdd



            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 périphérique: /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 périphérique peut être créé par:



       # mknod /dev/sjcd b 18 0




  Consultez le fichier sjcd pour plus d'informations sur ce pilote.


  44..33..1111..  PPiilloottee PPaarriiddee









            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 périphérique: /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 périphériques de stockage
  qui se relient sur un port parallèle. Normalement, le pilote détectera
  automatiquement le périphérique sur port parallèle. La documentation
  indique les paramètres qui peuvent être utilisés pour spécifier des
  paramètres au périphérique si l'auto-détection ne fonctionne pas.

  Le fichier de périphérique 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
  présent dans les anciens noyaux.


  44..33..1122..  PPiilloottee SSCCSSII



            Auteur principal: David Giller
      Support multi sessions: oui (dépendant du lecteur)
      Support multi lecteurs: oui
   Support module chargeable: oui
     Lecture de trames audio: non
            Test automatique: oui
        Fichier périphérique: /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 spécifiques à
  chaque contrôleur SCSI. Consultez le SCSI HOWTO pour plus
  d'informations.

  Plusieurs lecteurs sont pris en charge (à concurrence du nombre
  maximum de périphériques sur le bus SCSI). Créez les fichiers de
  périphérique avec un nombre majeur de 11 et des nombres mineurs
  commençant à 0:



       # mknod /dev/scd0 b 11 0
       # mknod /dev/scd1 b 11 1


  Alors que le pilote du noyau ne prend pas lui-même en charge la
  lecture de trames audio-numériques, certains lecteurs SCSI en ont la
  capacité et fonctionneront avec le programme cdda2wav (qui utilise
  l'interface générique SCSI du noyau).

  Reportez vous également à la discussion sur le pilote d'émulation SCSI
  en IDE précédemment dans ce document.


  44..33..1133..  PPiilloottee IIDDEECCDD



            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 périphérique: /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 désigner le prochain lecteur en séquence. Seuls les trois
  premiers paramètres 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 délicat, spécialement si vous avez plus de 2 périphériques
  ou plus d'un contrôleur IDE. Habituellement, il est seulement
  nécessaire 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 récents disposent d'une meilleure prise en charge des
  périphériques IDE multiples. Si vous avez des problèmes avec un ancien
  noyau, le mettre à jour peut aider.

  Certains contrôleurs IDE ont des problèmes matériels que le pilote du
  noyau peut contourner. Vous devrez peut-être passer des paramètres
  additionnels au pilote pour l'activer. Consultez la documentation pour
  plus de détails.


  44..44..  AAmmoorrççaaggee dduu nnooyyaauu LLiinnuuxx


  Vous pouvez maintenant redémarrer avec le nouveau noyau. Vérifier la
  présence d'un message comme celui montré ci-dessous, indiquant que le
  lecteur de CD-ROM a été trouvé par le pilote de périphérique (le
  message change suivant le type de lecteur):



       hdd: NEC CD-ROM DRIVE:282, ATAPI CDROM drive




  Si les messages affichés lors de l'amorçage défilent 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 problème s'est alors produit.
  Consultez la section concernant le dépannage.


  44..55..  MMoonnttaaggee,, DDéémmoonnttaaggee,, eett ÉÉjjeeccttiioonn dduu mmeeddiiaa


  Pour monter un CD-ROM, insérez un disque dans le lecteur, et exécutez
  la commande mount, en tant que superutilisateur (Ceci suppose que vous
  avez créé un lien symbolique vers votre fichier de périphérique, comme
  recommandé précédemment et qu'un répertoire vide /mnt/cdrom existe):



       # mount -t iso9660 -r /dev/cdrom /mnt/cdrom




  Le contenu du CD-ROM peut maintenant être accédé sous le répertoire
  /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 détails.

  Vous pouvez ajouter une entrée au fichier /etc/fstab pour monter
  automatiquement un CD-ROM lors de l'amorçage de Linux, ou pour
  spécifier des paramètres à utiliser au montage; voir la page du manuel
  de fstab(5).

  Il est à noter que pour écouter des CDs audio-numériques vous _n_e _d_e_v_e_z
  _p_a_s essayer de les monter.

  Pour démonter un CD-ROM, utiliser la commande umount en tant que
  superutilisateur :



       # umount /mnt/cdrom




  Le disque ne peut être démonté que si aucun processus n'accède au
  lecteur à ce moment-là (donc, n'ayant pas non plus leur répertoire par
  défaut sur un répertoire 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 façon
  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 démonté et faire rentrer le tiroir du CD quand un disque est monté
  (vous pouvez désactiver cette fonction à la compilation du noyau ou
  par commande logicielle).

  Il est possible qu'après avoir écouté un CD audio-numérique, 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-
  numériques) avant d'essayer le montage. Ce problème semble apparaître
  seulement avec le pilote SBPCD.

  Les noyaux récents incluent un autochargeur fonctionnant en mode noyau
  qui fournit le montage transparent des médias amovibles, y compris les
  CD-ROM. Vous pouvez trouver les outils nécessaires à son utilisation à
  l'adresse  <ftp://ftp.kernel.org/pub/linux/daemons/autofs/>.


  44..66..  DDééppaannnnaaggee


  Si vous continuez à rencontrer des problèmes après avoir suivi les
  instructions de ce HOWTO, voici un certain nombre de points à
  vérifier. Ces vérifications sont données par ordre croissant de
  complexité. Si une vérification échoue, résolvez le problème avant de
  passer à l'étape suivante.


  44..66..11..  ÉÉttaappee 11:: AAssssuurreezz vvoouuss dd''eexxééccuutteerr llee nnooyyaauu qquuee vvoouuss aavveezz ccoomm­­
  ppiilléé


  Vous pouvez vérifier le marquage temporel du noyau, pour voir si vous
  exécutez 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 exécuter un ancien noyau. Vous rappelez-vous
  avoir redémarré ? Si vous utilisez LILO, l'avez-vous réinstallé
  (typiquement en exécutant /sbin/lilo)? Si vous démarrez depuis une
  disquette, avez-vous recréé une nouvelle disquette d'amorçage et
  l'avez-vous utilisée pour redémarrer ?


  44..66..22..  ÉÉttaappee 22:: AAssssuurreezz vvoouuss qquuee lleess ppiillootteess aaddééqquuaattss ssoonntt ddaannss llee
  nnooyyaauu



  Vous pouvez voir quels pilotes sont compilés 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 périphérique de CD-ROM. Ce sont tous
  des périphériques en mode bloc, dans ce cas nous pouvons voir que le
  pilote idecd de nombre majeur 22 est présent.

  Assurez vous également que le système 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 vérifier les adresses d'entrées/sorties utilisées
  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 commençant par la configuration et la
  construction du noyau.


  44..66..33..  ÉÉttaappee 33:: LLee nnooyyaauu aa--tt--iill ddéétteeccttéé vvoottrree lleecctteeuurr lloorrss ddee
  ll''aammoorrççaaggee ??


  Assurez vous que le périphérique CD-ROM a été détecté par le noyau.
  Vous devriez avoir vu un message à l'amorçage. 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 câbles sont correctement
  connectés. Si votre lecteur dispose de cavaliers pour l'adressage,
  vérifiez qu'ils sont correctement positionnés (par ex. lecteur 0 si
  vous avez un seul lecteur). Les CD-ROM ATAPI doivent être paramétrés
  comme "seul" (single) ou "maître" (master), et non "esclave" (slave)
  lorsqu'un seul périphérique IDE est raccordé à l'interface. Si le
  lecteur fonctionne sous DOS, alors vous pouvez être relativement
  confiant dans le fonctionnement du matériel.

  De nombreux pilotes du noyau utilisent la détection automatique, mais
  certains non, et de toute façon, 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 différentes,
  si vous n'êtes pas sûr des adresses d'entrée/sortie ou d'autres
  paramètres. LILO peut être (et est généralement) configuré pour vous
  permettre d'entrer les paramètres manuellement lors de l'amorçage.

  Une autre possibilité est que vous ayez utilisé le mauvais pilote de
  noyau pour votre lecteur de CD-ROM. Certaines documentations se
  réfèrent à des interfaces propriétaires 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 nécessite une
  initialisation par un pilote DOS. Essayez d'amorcer le DOS et de
  charger le pilote de périphérique 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 vérifier avec certaines des références mentionnées à la fin de
  ce document pour obtenir de l'aide.


  44..66..44..  ÉÉttaappee 44:: PPoouuvveezz--vvoouuss lliirree ddeess ddoonnnnééeess dduu lleecctteeuurr ??


  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 reportée. Utilisez le fichier de
  périphérique adapté à votre lecteur et assurez vous qu'un CD-ROM est
  inséré; 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 réside dans le fichier de périphérique.
  Assurez vous que le fichier de périphérique dans le répertoire /dev
  dispose de nombres majeur et mineur corrects, comme mentionné
  précédemment pour votre type de lecteur. Vérifiez que les permissions
  du fichier de périphérique permettent la lecture et l'écriture.

  Une possibilité éloignée peut être un problème matériel. Essayez de
  tester le lecteur sous un autre système d'exploitation, si possible,
  pour déterminer si ceci pourrait être le cas.


  44..66..55..  ÉÉttaappee 55:: PPoouuvveezz--vvoouuss mmoonntteerr llee ddiissqquuee ??


  Si vous pouvez lire depuis le lecteur, mais ne pouvez monter le
  disque, vérifiez d'abord que vous avez compilé la prise en charge du
  système de fichiers ISO-9660 en consultant /proc/filesystems, comme
  décrit précédemment.

  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-
  numérique) a été inséré 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 répertoire vide.

  Si vous montez automatiquement le CD-ROM à l'amorçage, assurez vous
  que vous avez des entrées correctes dans votre fichier /etc/fstab.

  Si vous exécutez le démon 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 reportées dans des fichiers situés
  sous /var/log, suivant la manière dont votre système est configuré.


  44..66..66..  DDiiaaggnnoossttiiqquueerr ddeess pprroobbllèèmmeess aauuddiioo--nnuumméérriiqquueess


  Si le lecteur fonctionne pour les CD-ROM, mais pas pour écouter des
  CDs audio-numériques, voici quelques pistes possibles :

  Vous avez besoin d'un programme pour écouter les CDs audio-numériques.
  Certaines applications peuvent mal fonctionner ou ne pas être
  compatibles avec votre lecteur. Essayez une autre application, et/ou
  essayez de les recompiler vous-même. 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-
  numériques. Vérifiez le fichier de documentation ou le code source
  pour voir si c'est le cas.

  Vérifiez si le son peut être entendu au travers de la prise casque. Si
  c'est le cas, alors le problème est probablement dû à votre carte son.
  Utilisez un programme de table de mixage pour positionner le niveau du
  volume et du périphérique d'entrée. Assurez vous d'avoir installé le
  câble audio reliant le lecteur de CD-ROM à la carte son. Assurez vous
  que le pilote du noyau de votre carte son est installé et opérationnel
  (consultez le Sound HOWTO).


  44..66..77..  SSii rriieenn nnee mmaarrcchhee


  Si vous avez toujours des problèmes, voici quelques suggestions
  finales à essayer :


  ·  Relisez attentivement ce HOWTO

  ·  Lisez les références mentionnées à 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 :-)


  55..  LLeess aapppplliiccaattiioonnss


  Cette section présente brièvement quelques unes des nombreuses
  applications concernant les CD-ROMs et disponibles sous Linux.
  Vérifiez la liste des logiciels sous Linux (Linux Software Map) quant
  aux dernières versions et aux sites où elles sont archivées.


  55..11..  PPllaattiinneess ddee lleeccttuurree ddee CCDDss aauuddiioo--nnuumméérriiqquueess


  De nombreux programmes de lecture de CDs audio-numériques sont
  disponibles, soit au moyen d'un casque relié au lecteur, soit par
  l'entremise de la carte son à laquelle le lecteur est relié.



     WWoorrkkmmaann
        Une platine graphique, s'exécutant en environnement X11 avec une
        base de données des CDs et de nombreuses autres fonctions.


     WWoorrkkBBoonnee
        Une platine interactive s'exécutant en mode texte.


     xxccddppllaayyeerr
        Une platine simple s'exécutant en environnement X11.


     ccddppllaayyeerr
        Une platine très simple pilotée par la ligne de commandes.


     XXmmccdd
        Une platine s'exécutant en environnement X11/Motif.


     xxmmiittssuummii
        Une autre platine s'exécutant en environnement X11 pour les
        lecteurs Mitsumi.


     xxppllaayyccdd
        Une autre platine s'exécutant en mode X11, livrée avec une
        platine de mixage son et des programmes VU-mètre.


     ccddttooooll
        Des outils en mode ligne de commande pour écouter des CDs audio-
        numériques.

  Certains de ces programmes sont codés pour utiliser un fichier de
  périphérique précis pour accéder au CD-ROM (par exemple, /dev/cdrom).
  Il est dans ce cas soit possible de passer le nom correct de ce
  fichier en paramètre, soit de créer un lien symbolique dans le
  répertoire /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 sélectionner l'entrée du CD-ROM pour enregistrer.


  55..22..  LLee CCDD--PPhhoottoo


  Les CDs Photo utilisent un système de fichiers ISO-9660 contenant les
  fichiers images dans un format propriétaire. 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 même auteur a écrit le programme xpcd, en environnement X11, pour
  manipuler les images de CDs Photo. Vous pouvez sélectionner des images
  à la souris, visualiser l'image dans une petite fenêtre, et charger
  l'image à n'importe laquelle de ses 5 résolutions 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/>.


  55..33..  MMkkiissooffss


  Le paquetage mkisofs d'Eric Youngdale permet de créer un système de
  fichiers ISO-9660 sur une partition du disque dur. Celui-ci peut
  ensuite être utilisé pour aider à la création et au test de systèmes
  de fichiers de CD-ROM avant le pressage des disques.

  Les outils pour graver réellement les données sur des lecteurs de CDs
  réinscriptibles tendent à être propres à chaque fournisseur. Ils
  requièrent également une écriture des données sans interruption, ce
  qui fait qu'un système d'exploitation multi-tâches comme Linux n'y est
  pas particulièrement adapté.


  55..44..  OOuuttiillss IISSOO--99666600


  Il existe quelques outils pour vérifier 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.


  66..  RRééppoonnsseess aauuxx qquueessttiioonnss ffrrééqquueemmmmeenntt ppoossééeess ((FFAAQQ))



  66..11..  CCoommmmeenntt uunn uuttiilliissaatteeuurr nn''ééttaanntt ppaass ssuuppeerruuttiilliissaatteeuurr  ppeeuutt--iill
  mmoonntteerr//ddéémmoonntteerr ddeess ddiissqquueess ??


  La plupart des commandes mount comprennent une option _u_s_e_r.  Si vous
  ajoutez une entrée de cette nature au fichier /etc/fstab:



       /dev/sbpcd  /mnt/cdrom   iso9660     user,noauto,ro




  alors, un utilisateur ordinaire pourra monter et démonter le disque en
  utilisant ces commandes :



       % mount /mnt/cdrom
       % umount /mnt/cdrom




  Par défaut, le disque sera monté avec certaines options qui assurent
  la sécurité (par exemple, des programmes ne pourront être exécutés,
  des fichiers de périphériques seront ignorés). Si cela est trop
  restrictif, vous pouvez utiliser des options additionnelles (par
  exemple, l'option "exec" autorisera l'exécution de programmes).
  Consultez la page de manuel de mount(8) pour les détails.

  Une autre méthode consiste à obtenir le paquetage usermount qui permet
  à des utilisateurs n'étant pas superutilisateur de monter et démonter
  des périphériques amovibles tels que disquettes et CD-ROMs, mais
  restreint l'accès aux autres périphériques (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 démonte le
  CD-ROM et l'installer en tant qu'exécutable 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'exécute en tant que programme setuid.


  66..22..  PPoouurrqquuooii aaii--jjee ddeevviiccee iiss bbuussyy  qquuaanndd jjee ddéémmoonnttee uunn CCDD--RROOMM ??


  Le disque ne peut être démonté s'il y a encore un processus accédant
  au lecteur, ceci comprend les processus ayant leur répertoire par
  défaut positionné sur le système de fichiers monté. Si vous ne pouvez
  pas identifier le processus utilisant le disque, utilisez la commande
  fuser, comme dans l'exemple ci-après.



       % umount /cdrom
       umount: /dev/hdd: device is busy
       % fuser -v /cdrom
                            USER       PID ACCESS COMMAND
       /mnt/cdrom           tranter    133 ..c..  bash




  Sur certains systèmes, vous pouvez avoir besoin d'être
  superutilisateur pour exécuter la commande fuser de manière à voir les
  processus d'autres utilisateurs.


  66..33..  CCoommmmeenntt eexxppoorrtteerr uunn CCDD--RROOMM vveerrss dd''aauuttrreess mmaacchhiinneess vviiaa NNFFSS ??


  Vous avez besoin d'ajouter une ligne au fichier /etc/exports. Les
  utilisateurs sur les autres machines pourront alors monter le
  périphérique. Consultez la page de manuel de exports(5), pour plus de
  détails.


  66..44..  PPuuiiss--jjee aammoorrcceerr LLiinnuuxx àà ppaarrttiirr dd''uunn CCDD--RROOMM ??


  Quand on installe initialement Linux, la méthode la plus ordinaire est
  d'utiliser une disquette d'amorçage. Certaines distributions Linux
  autorisent l'amorçage 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 dernière version
  de mkisofs prend également en charge la création de tels disques qui
  utilisent le standard El Torito pour les CDs amorçables.




  66..55..  CCoommmmeenntt ppeeuutt--oonn lliirree lleess ddoonnnnééeess ddeess CCDDss aauuddiioo--nnuumméérriiqquueess ??


  Heiko Eissfeldt (heiko@colossus.escape.de) et Olaf Kindel ont écrit un
  utilitaire qui lit les données audio-numériques 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 données audio-numériques est
  cdparanoia disponible à l'adresse
  <http://www.mit.edu/afs/sipb/user/xiphmont/cdparanoia>.

  Étant donné que les lecteurs de CD-ROM changent très vite, il est
  difficile de donner une liste des modèles prenant en charge la lecture
  de données audio-numériques. 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
  mentionnée dans la section des références.


  66..66..  PPoouurrqquuooii llaa ccoommmmaannddee ffiinndd  nnee ffoonnccttiioonnnnee--tt--eellllee ppaass nnoorrmmaalleemmeenntt
  ??


  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 détails.

  (selon mon expérience, virtuellement tous les CDs Linux récents
  utilisent les extensions Rock Ridge, donc ce problème ne devrait se
  produire que très rarement.)


  66..77..  EEsstt--ccee qquuee LLiinnuuxx pprreenndd eenn cchhaarrggee lleess ggrraavveeuurrss ddee CCDD ??


  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>.


  66..88..  PPoouurrqquuooii eesstt--ccee qquuee jj''oobbttiieennss mmoouunntt:: RReeaadd--oonnllyy ffiillee ssyysstteemm
  lloorrssqquuee jjee mmoonnttee uunn CCDD--RROOMM ??


  Le CD-ROM est un media en lecture seule. Avec certains noyaux
  précédents, il était possible de monter des CD-ROMs en
  lecture/écriture; les tentatives pour écrire des données sur le CD
  était simplement ignorées. À partir de la version 1.1.33 du noyau,
  ceci a été corrigé de telle manière que les CD-ROMs doivent être
  montés en lecture seule (par ex. en utilisant l'option -r de la
  commande mount).


  66..99..  PPoouurrqquuooii llee ttiirrooiirr dduu lleecctteeuurr ss''oouuvvrree--tt--iill qquuaanndd jj''aarrrrêêttee llee
  ssyyssttèèmmee ??



  Le pilote sbpcd prend en charge automatiquement l'éjection du CD quand
  il est démonté. Dans d'anciennes versions du noyau, c'était le
  comportement par défaut. Si vous arrêtez votre système, un CD monté
  sera démonté, entraînant 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 problèmes qu'avec peu de
  programmes (par ex. cdplay et workbone). A partir de la version 1.1.60
  du noyau, vous pouvez contrôler 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
  contrôler le comportement par défaut, en éditant le fichier source du
  noyau sbpcd.h.


  66..1100..  JJ''aaii uunn CCDD ""ssppéécciiaall"" qquuii nnee ppeeuutt êêttrree mmoonnttéé


  Le CD "spécial" a toutes les chances d'être un disque XA (comme tous
  les CDs Photo ou les pseudos créés 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 déterminer si le disque est au format XA en
  utilisant la procédure suivante : allez dans le fichier sbpcd.c et
  activez l'affichage de la table des matières [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
  première valeur affichée dans l'en-tête 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 différentes plages, c'est
  aussi un signe qu'il s'agit d'un disque au format XA.

  (Remerciements à Eberhard Moenkeberg pour les informations
  précédentes)

  D'autres possibilités pour des CDs illisibles sont :


  1. Le disque n'utilise pas un système de fichiers ISO-9660 (par ex.
     certains utilisent SunOS ou HFS)

  2. C'est un CD audio-numérique

  3. Le CD est endommagé ou défectueux

  4. Vous avez mis le disque à l'envers :-)


  66..1111..  EEsstt--ccee qquuee ddeess lleecctteeuurrss mmuullttii--CCDDss ffoonnccttiioonnnneenntt aavveecc LLiinnuuxx ??


  Plusieurs utilisateurs ont mentionné leur réussite 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
  périphérique SCSI ou "Probe all LUNs on each SCSI device" (Ce n'est
  pas utile si votre lecteur multi-CDs est déjà 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 symptôme 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 système de fichiers,
  mauvaise option, mauvais superbloc sur /dev/sr5, ou trop de systèmes
  de fichiers montés") lors de la tentative de montage d'un CD pour la
  première fois, alors qu'un second essai immédiatement après réussit.
  Pour augmenter la temporisation, augmenter la valeur de IOCTL_TIMEOUT
  au début du fichier /usr/src/linux/drivers/scsi/sr_ioctl.c et
  recompilez votre noyau. Une valeur de 10000 au lieu de la valeur par
  défaut de 3000 a fonctionné avec un lecteur NEC Multispin 4Xc.

  Il peut être nécessaire de créer des fichiers spéciaux supplémentaires
  de type block, de façon à ce que toutes les LUNs puissent être
  accédées. Un fichier de périphérique est nécessaire 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 créer ces fichiers spéciaux de type block,
  exécutez 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é mentionnés comme opérationnels.

  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
  sélectionner l'emplacement disque, ou vous pouvez utiliser des outils
  différents comme le programme eject, décrit précédemment.


  66..1122..  JJ''oobbttiieennss ddeess eerrrreeuurrss ""//ccddrroomm:: PPeerrmmiissssiioonn ddeenniieedd"" oouu ""//ccddrroomm::
  ppeerrmmiissssiioonn nnoonn aaccccoorrddééee""


  Certains CDs ont des permissions du répertoire 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 réel souci.
  Certaines personnes ont fourni une rustine pour leur noyau de façon à
  contourner le problème.

  Consultez aussi la question relative aux fichiers cachés plus loin
  dans ce document.


  66..1133..  CCoommmmeenntt ddooiiss--jjee iinntteerrpprréétteerr lleess mmeessssaaggeess dd''eerrrreeuurr nnooyyaauu dduu
  ppiilloottee IIDDEE CCDD ??


  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
  défaut, le pilote IDECD donne une information brute, plutôt que de
  gâcher de l'espace du noyau avec des messages d'erreur. Vous pouvez
  changer ce défaut et afficher les messages d'erreur réels 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.


  66..1144..  CCoommmmeenntt ppuuiiss--jjee ssaavvooiirr llaa vviitteessssee ddee mmoonn lleecctteeuurr ddee CCDD--RROOMM ??


  Il y a un moyen. Cette commande mesure combien de temps est nécessaire
  à la lecture de 1500Ko de données 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 données à transférer pour obtenir des
  valeurs plus précises (au cas où vous vous le demanderiez, les données
  ne sont pas mises en cache). Vous devriez probablement exécuter 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.


  66..1155..  MMoonn lleecctteeuurr ddee CCDD--RROOMM ss''eesstt aarrrrêêttéé ddee ffoonnccttiioonnnneerr aapprrèèss
  ll''iinnssttaallllaattiioonn ddee LLiinnuuxx


  Le symptôme usuel est que la disquette d'amorçage utilisée pour
  installer initialement Linux reconnaissait votre lecteur de CD-ROM,
  mais après l'installation de Linux sur votre disque dur ou votre
  disquette, il ne le reconnaît plus.

  La cause la plus fréquente de ce problème est qu'avec certaines
  distributions Linux, le noyau qui est installé sur votre disque dur
  (ou votre disquette) n'est pas nécessairement le même que celui qui
  était sur votre disquette d'amorçage. Vous avez choisi une disquette
  d'amorçage qui correspondait à votre matériel et votre CD-ROM, alors
  que le noyau qui est installé est un noyau "générique" qui ne prend
  pas en charge le lecteur de CD-ROM. Vous pouvez vérifier cela en
  suivant la rubrique "Dépannage" exposée précédemment dans ce document
  (par ex. en commençant par vérifier /proc/devices).

  La solution est de recompiler votre noyau, en vous assurant que les
  pilotes pour votre lecteur de CD-ROM et tout autre nécessaire (par ex.
  le contrôleur SCSI, le système 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 réaliser cela.

  Si vous avez passé des options en ligne de commande à la disquette
  d'amorçage (par ex. "hdc=cdrom") vous devez ajouter celles-ci au
  fichier de configuration de votre programme d'amorçage (typiquement
  /etc/lilo.conf).


  66..1166..  IIll yy aa ddeess ffiicchhiieerrss ccaacchhééss ssuurr uunn CCDD qquuee jjee nnee ppeeuuxx lliirree


  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" (décacher), alors les fichiers devraient être
  accessibles (cela ne semble pas être documenté quelque part).



  66..1177..  OOùù eesstt ddooccuummeennttééee ll''AAPPII dduu CCDD--RROOMM ??


  Si vous voulez écrire votre propre application, telle qu'une
  application de platine de lecture de CD audio-numérique, 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 spécifiques à chaque
  lecteur. Des fichiers d'en-tête, tel que /usr/include/linux/sbpcd.h
  les décrivent. Étant donné que de nombreux pilotes étaient basés sur
  d'autres pilotes, les interfaces, bien que non identiques,
  partageaient beaucoup de choses communes.

  Plus récemment, il y a eu une initiative dirigée 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 façon 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 détail dans la
  programmation des lecteurs de CD-ROM, en particulier pour les
  fonctions audio-numériques. Consultez la fin de la section Références.


  66..1188..  PPoouurrqquuooii nnee vvooiiss--jjee ppaass lleess nnoommss ddee ffiicchhiieerrss lloonnggss ssuurr ccee CCDD--
  RROOMM WWiinnddoowwss??


  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 propriétaire Microsoft de système de fichiers Joliet. Consultez
  la prochaine question pour obtenir une solution.


  66..1199..  LLee ssyyssttèèmmee ddee ffiicchhiieerrss JJoolliieett ddee MMiiccrroossoofftt eesstt--iill pprriiss eenn
  cchhaarrggee ??


  Microsoft a créé une extension au format ISO-9660 intitulée 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 système 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 caractères nationaux, vous devrez activer la prise en
  charge des jeux de caractères ISO8859 appropriés dans le noyau.


  66..2200..  LLiinnuuxx pprreenndd--iill eenn cchhaarrggee lleess CCDDss ""eexxttrraa"" ??


  Certains CDs audio-numériques sont "étendus" (extra) avec des données
  additionnelles. Typiquement, vous trouverez sur ces CDs les plages
  audio traditionnelles sur un CD, ainsi qu'une plage de données qui
  peut être montée comme système 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 sûr, bien que j'aie connu un succès
  partiel en exécutant l'application Windows sous l'émulateur Windows
  WINE). Il y avait des images GIF qui pouvaient être visualisées à
  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.


  66..2211..  LLiinnuuxx pprreenndd--iill eenn cchhaarrggee lleess DDVVDD--RROOMM ??


  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 système 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 système de fichiers UDF. Au
  moment de l'écriture de ce document, ceci est encore en développement.
  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 vidéo à encodage MPEG-2, ni par logiciel, ni en conjonction
  avec un décodeur DVD matériel. Apparemment, le standard décrivant le
  format d'encodage ne peut être obtenu que contre une forte somme et
  sous accord de non-divulgation (NDA). Un autre problème est que le
  décodage MPEG utilise généralement du matériel propriétaire pour
  lequel le fabriquant pourrait ne pas vouloir fournir d'informations
  sur sa programmation. Ces facteurs pourraient empêcher le
  développement de tout logiciel libre de lecture des DVD vidéo pour
  Linux.


  66..2222..  LLiinnuuxx pprreenndd--iill eenn cchhaarrggee lleess CCDD--RRWW ??


  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 système de fichiers ISO-9660. Ceci comprend la possibilité
  d'écrire sur le disque.

  De nombreux disques CD-RW utilisent le système de fichiers UDF. Au
  moment de l'écriture de ce document, ceci est encore en développement.
  Des rustines pour le noyau sont disponibles à l'adresse
  <http://trylinux.com/projects/udf/>.


  77..  RRééfféérreenncceess


  J'ai déjà mentionné les fichiers de documentation, installés
  typiquement sous le répertoire /usr/src/linux/Documentation/cdrom. Ils
  peuvent se révéler une mine d'or d'informations utiles.

  Les FAQ (Foires aux questions) suivantes sont diffusées périodiquement
  sur Usenet dans le forum news.answers et archivées 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 français 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
     français HOWTO Compatibilité Linux <-> Matériel
     <http://www.freenix.org/unix/linux/HOWTO/Hardware-HOWTO.html>)

  ·  Sound HOWTO <http://metalab.unc.edu/LDP/HOWTO/Sound-HOWTO.html>
     (NDT: ou en français 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 français 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 français 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 français HOWTO Graveur de CDs
     <http://www.freenix.org/unix/linux/HOWTO/CD-Writing-HOWTO.html>)

  Au moins une douzaine de sociétés vendent des distributions Linux sur
  CD-ROM; la plupart d'entre elles sont mentionnées 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
  spécifiques à 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 périphériques IDE et ATA peut être trouvée 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 société 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 multimédia 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
  référence inévaluable pour trouver du logiciel sous Linux. La LSM peut
  être trouvée sur divers sites FTP anonymes, y compris
  <ftp://metalab.unc.edu/pub/Linux/docs/LSM/> (précédemment sunsite). Il
  y a aussi de nombreux sites Web qui maintiennent des bases de données
  d'applications Linux. Un de ces sites est  <http://www.freshmeat.net>.

  La liste de diffusion Linux dispose d'un certain nombre de "canaux"
  consacrés à différents 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 achetés sous forme de livres imprimés.

  Enfin, une publicité honteuse : si vous voulez en apprendre beaucoup
  plus sur le multimédia 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 français et en japonais sont maintenant
  imprimées. Pour tout détail appeler le 800-998-9938 pour l'Amérique du
  Nord ou vérifiez 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/

  11..  IInnttrroodduuccttiioonn

  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>

  22..  LLaa vveerrssiioonn cchhiinnooiissee ddee XX--WWiinnddooww

  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.

  22..11..  OOuu ttrroouuvveerr ttoouutt cceellaa

  22..11..11..  CCXXwwiinn 33..11

  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.

  22..11..22..  CCXXwwiinn 33..22

  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

  22..11..33..  LLeess ppaattcchheess

  Si vous disposez des sources de XFree86, vous pouvez  en  obtenir  des
  patches au meme endroit et compiler les binaires vous-meme.

  22..22..  CCoommmmeenntt iinnssttaalllleerr

  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>.

  33..  CCXXtteerrmm eett HHzzttttyy

  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.

  33..11..  RReeccuuppeerreerr llee ppaaqquueettaaggee ccxxtteerrmm eett hhzzttttyy

  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

  33..22..  IInnssttaalllleerr ccxxtteerrmm

  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

  33..33..  IInnssttaalllleerr hhzzttttyy

  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.

  33..44..  PPaattcchh ccoouulleeuurr ppoouurr ccxxtteerrmm

  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.

  33..55..  LLeess aannoommaalliieess

  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''.

  44..  LLeess eeddiitteeuurrss cchhiinnooiiss

  44..11..  CCeellvviiss eett CCVViimm --  ddeess cclloonneess ddee vvii//eexx

  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.

  44..11..11..  RReeccuuppeerreerr cceellvviiss

  Le site ftp de celvis est

  celvis-1.3.tar.gz               ifcss.org:/pub/software/unix/editor

  44..11..22..  IInnssttaalllleerr cceellvviiss

       # 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.

  44..11..33..  CCvviimm

  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

  44..22..  CCjjooee -- JJooee''ss OOwwnn CChhiinneessee EEddiittoorr

  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.

  44..22..11..  RReeccuuppeerreerr ccjjooee

  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

  44..22..22..  CCoommppiilleerr eett iinnssttaalllleerr ccjjooee

  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

  44..33..  CCeemmaaccss eett CCCChheellpp ppoouurr EEmmaaccss

  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.

  44..33..11..  RReeccuuppeerreerr CCeemmaaccss eett CCCChheellpp

  On      peut      les      trouver      tous      les     deux     sur
  ftp.math.psu.edu:/pub/simpson/chinese

  44..33..22..  IInnssttaallllaattiioonn

  Suivez les indications fournies dans les fichiers README respectifs de
  cemacs et cchelp.

  44..44..  MMuullee eett XXeemmaaccss 2200..00

  44..44..11..  RReeccuuppeerreerr MMuullee--22..33 eett llee ppaattcchh ppoouurr LLiinnuuxx

  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

  44..44..22..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn

  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.

  44..44..33..  LL''uuttiilliissaattiioonn dduu CChhiinnooiiss ssoouuss MMuullee--22..33

  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.

  44..44..44..  XXeemmaaccss 2200..00

  Pas encore essaye.

  55..  IInnssttaallllaattiioonn ddee ffoonntteess cchhiinnooiisseess

  55..11..  IInnssttaallllaattiioonn ddee ffoonntteess XX--WWiinnddooww

  55..11..11..  OOuu ttrroouuvveerr ddeess ffoonntteess GGBB eett BBIIGG55

  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.

  55..11..22..  IInnssttaalllleerr ddeess ffoonntteess XX

  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 &

  55..22..  LLeess ffoonntteess HHBBFF

  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.

  66..  UUttiilliittaaiirreess dd''iimmpprreessssiioonn

  66..11..  CCNNPPRRIINNTT

  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.

  66..11..11..  OOuu ssee ttrroouuvvee ccnnpprriinntt

  Vous         pouvez        trouver        cnprint260.tar.gz        sur
  ftp.ifcss.org:/pub/software/unix/print

  66..11..22..  IInnssttaalllleerr ccnnpprriinntt

  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''

  66..22..  GGBB22PPSS

  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.

  66..22..11..  OOuu ttrroouuvveerr GGBB22PPSS

  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

  66..22..22..  IInnssttaalllleerr GGBB22PPSS

  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

  66..33..  DDTToopp

  Je ne sais pas grand chose a ce sujet.

  77..  AAffffiicchheerr dduu CChhiinnooiiss ddaannss NNeettssccaappee

  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.

  88..  LLee TTeexx cchhiinnooiiss

  Je ne connais pas vraiment ces paquetages.

  88..11..  CCJJKK

  88..22..  LLee TTeexx dduu ppaauuvvrree

  88..33..  CChhTTeexx

  99..  UUttiilliissaattiioonn dduu CChhiinnooiiss ddaannss uunnee ccoonnssoollee ---- CChhddrrvv eett WWZZCCEE

  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

  99..11..  RReeccuuppeerreerr cchhddrrvv

  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

  99..22..  IInnssttaalllleerr cchhddrrvv

  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

  99..33..  CCoonnssoollee cchhiinnooiissee GGBB -- WWZZCCEE

  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.

  99..33..11..  OOuu eesstt--iill ??

  wzce_linux_elf_2.21n.tgz    ftp.ifcss.org:/pub/software/linux/tty

  99..33..22..  IInnssttaallllaattiioonn

  Lisez le fichier wzce_linux.readme

  1100..  UUnn ttrraaiitteemmeenntt ddee tteexxttee cchhiinnooiiss ---- CChhiinneesseePPoowweerr

  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.

  1100..11..  OOuu oobbtteenniirr cchhppoowweerr

  chpower-2.0.tar.gz       ftp.ifcss.org:/pub/software/x-win/editor/

  1100..22..  IInnssttaalllleerr cchhppoowweerr

  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

  1111..  WWaabbii 22..22 eett llee ssyysstteemmee ddee ffeenneettrraaggee cchhiinnooiiss

  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.

  1122..  DD''aauuttrreess ggaatteerriieess

  1122..11..  CCrrxxvvtt

  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.

  1122..11..11..  RReeccuuppeerreerr CCrrxxvvtt

  xcin-2.1a.tgz       ftp.ifcss.org:/pub/software/x-win/xcin

  1122..11..22..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn

  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

  1122..22..  KKttttyy

  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

  1122..33..  TTiinnTTiinn++++

  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

  1133..  EEnnccoorree bbeessooiinn dd''aaiiddee ??

  +o  rtfm.mit.edu:/pub/usenet/news.answers/chinese-text/big5-faq

  +o  CXterm.FAQ

  1144..  AAppppeennddiiccee -- CCaattaalloogguuee ddee llooggiicciieellss cchhiinnooiiss ddee FFTTPP..IIFFCCSSSS..OORRGG

  _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 française 16 juin 1999 Linux Commercial HOWTO
  Mr. Poet <poet@linuxports.com>, d'après un travail de Martin
  Michlmayr (jusqu'à la version 5.36).  Adaptation française
  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 matières






















































  1. A propos de ce document

  2. Information sur la propriété

  3. Avertissement

  4. Information associée

  5. Linux pour le marché commercial ?

     5.1 systèmes dédiés
     5.2 Grands comptes
     5.3 Niches de marché
     5.4 Biographie

  6. Développement 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 données

     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 données 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 développement

     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 Dévermineur)
     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. Bibliothèques

     12.1 FontScope
     12.2 INTERACTER
     12.3 Matrix<LIB> - bibliothèque C++ mathématique matricielle
     12.4 Bibliothèque de compression de données PKWARE pour Linux
     12.5 ReadyBase
     12.6 SIMLIB IG

  13. Mathématiques

     13.1 Maple V Release 4 - The Power Edition
     13.2 MATCOM et bibliothèque MATCOM MATH
     13.3 Mathematica 3.0
     13.4 MATLAB et Simulink

  14. Multimédia

     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 réseau

     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 système

     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-têtes 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 matériel commercial

     21.1 Cartes série multi-ports Stallion Technologies


  ______________________________________________________________________

  11..  AA pprrooppooss ddee ccee ddooccuummeenntt


  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 complémentaires sur le Linux Documentation Project
  ou les HOWTO Linux sont nécessaires, il est possible de contacter le
  superviseur Tim Bynum <linux-howto@metalab.unc.edu>.


  Tim Bynum poste mensuellement le listing sur différents 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 placées d'abord sur ce site.  Contrôlez donc si la
  copie que vous lisez actuellement est toujours à jour !


  NdT : La version française est disponible à : Jussieu (LIP6).

  Par définition, elle se trouve moins à jour que l'original.  N'hésitez
  donc pas à rechercher dans la version anglaise si nécessaire.

  Ce document comportant de nombreux termes techniques correspondant à
  de nombreux corps de métiers, le traducteur prie ses lecteurs et les
  entreprises concernées de bien vouloir excuser les erreurs qui se sont
  certainement glissées dans cette adaptation.

  Par ailleurs, s'il est habituel aux États-Unis de présenter son
  produit en des termes élogieux et hyperboliques (the wold's premier,
  the best software in the world, etc.), la mentalité française 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 négatif 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
  indiqués -- cette liste est destinée 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
     possibilités de contacts ;

  ·  Elle est faite pour prouver l'utilisabilité commerciale de Linux et
     ainsi encourager les vendeurs à porter leur logiciel dessus.

  Les entreprises et développeurs qui proposent leurs produits sous
  Linux et sont intéressés par une inscription dans le Commercial-HOWTO
  sont invités à remplir le formulaire suivant et à me contacter à :
  poet@linuxports.com.


  Ce HOWTO contiendra des entrées tabulaires pour chaque produit (comme
  dans l'exemple ci-après).  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-même.  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 placée
  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.



     CCaattééggoorriiee
        Bases de données, visualisation de données, outils de
        développement, mathématiques, multimédia, gestion de réseau,
        traitement de texte, X Window ou autre logiciel.


     NNoomm
        Nom de l'application.
     ddeessccrriippttiioonn ::
        Courte description du paquetage, seulement les fonctionnalités
        de base.


     SSuuppppoorrtt ddee ddiissttrriibbuuttiioonn ::
        disquettes, CD-ROM, bandes ou autres


     PPoolliittiiqquuee ddee lliicceennccee ::
        ce qui s'applique -- y a-t-il une version de démonstration ou
        shareware disponible par FTP ou WWW ? Où ?


     CCoonnffiigguurraattiioonn OOSS ::
        versions de noyau, de XFree86, de Motif, RAM, occupation disque
        etc.


     DDooccuummeennttaattiioonn ::
        documentation imprimée, nombre de pages, aide en ligne, langue.


     EElléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        et leur prix.


     OOrrddrree ddee pprriixx ::
        ce qu'il coûte.


     VVeennddeeuurr ::
        adresse, téléphone (en France, ajoutez le préfixe de
        l'international : 33, et retirez le 0 en tête de votre numéro.
        Par exemple : 33-1.23.45.67.89 pour le numéro 01.23.45.67.89),
        fax, e-mail, URL et nom de la personne à contacter.


  22..  IInnffoorrmmaattiioonn ssuurr llaa pprroopprriiééttéé


  Ce HOWTO est la propriété intellectuelle de :

  ·  Martin Michlmayr © 1996, 1997, 1998 ;

  ·  Mr. Poet © 1999

  ·  Bernard Choppy (en ce qui concerne l'adaptation française) © 1996,
     1997, 1998, 1999.


  Une copie exacte peut être réalisée et diffusée sur tout support
  physique ou électronique sans autorisation de l'auteur.  Les
  traductions sont de même permises sans autorisation de l'auteur si
  elles comportent une indication sur le traducteur.


  De courtes citations peuvent être utilisées sans consentement
  préalable de l'auteur.  Les travaux dérivés et diffusions partielles
  du Linux Commercial HOWTO doivent être accompagnées, soit d'une copie
  exacte de ce fichier (NdT : de la version originale anglaise, bien
  sûr), soit d'un pointeur vers une copie exacte.


  Le redistribution commerciale est autorisée et encouragée, néammoins
  l'auteur souhaite être informé de telles redistributions.
  En bref, nous souhaitons promouvoir la dissémination de l'information
  à travers autant de canaux que possible.  Néammoins, nous souhaitons
  conserver le copyright des documents HOWTO, et souhaitons être
  informés de tout plan de redistribution des HOWTO.


  Nous voulons même que _t_o_u_t_e l'information fournie dans les HOWTO soit
  diffusée.  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 française de ce document, les
  mêmes restrictions s'appliquent de la même manière, ainsi que les
  droits de reproduction et diffusion.  Dans tous les cas, la mention :
  " Adaptation française par Bernard Choppy " doit être jointe à toute
  citation, partielle ou totale, diffusion ou distribution, de quelque
  nature qu'elle soit.


  33..  AAvveerrttiisssseemmeenntt


  Ce HOWTO n'est pas exactement un HOWTO au sens du : Linux
  Documentation Project.  En revanche, c'est un instrument
  d'investigation parmi les opportunités commerciales sous Linux et
  d'inventaire des applications déjà portées 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 liée 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
  mémoire).  De telles applications ne se trouveront pas ici.

  Je ne sélectionnerai ni désélectionnerai aucun produit en particulier.
  Au contraire, quiconque souhaite voir son produit inclus verra son
  souhait exaucé.  Néammoins, je me réserve le droit de limiter les
  entrées 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
     répondu ;

  ·  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 découvrez une erreur dans ce fichier (NdT :
  pour tout problème concernant la traduction elle-même, n'hésitez pas à
  contacter le traducteur).


  Quelquefois, deux adresses sont mentionnées dans le champ "Vendeur :"
  Dans ces cas j'ai reçu l'information de l'importateur/distributeur
  allemand.  L'adresse du constructeur original est toujours mentionnée
  en premier.





  44..  IInnffoorrmmaattiioonn aassssoocciiééee

  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 trouvée à :
  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 présentés par ce
  HOWTO..


  55..  LLiinnuuxx ppoouurr llee mmaarrcchhéé ccoommmmeerrcciiaall ??

  Copyright © 1996 iX Multiuser Multitasking Magazin
  Avec l'autrisation de iX Multiuser Multitasking Magazin !


  Certains me demandent : "Quand Linux sera-t-il prêt pour le _m_a_c_h_é
  _c_o_m_m_e_r_c_i_a_l ?"  Je pense que la première 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 sociétés d'assurance.  D'autres personnes
  regardent leurs produits avec dédain 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
  même 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 "propriétaire" (certains disent maintenant qu'Unix
     est "propriétaire") ;

  ·  `"Station de travail" contre "PC" (Mais en fait, qu'est-ce qu'une
     station de travail, réellement ?).

  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
  français : GAP) était majoritaire.  Le marché technique était un
  marché scientifique, de l'ingénierie et de l'industrie dans lesquels
  FORTRAN et l'assembleur étaient utilisés.  A un moment donné, le terme
  "commercial" semble avoir changé de sémantique au profit de "adapté au
  marché de masse" contre "adapté aux bidouilleurs".


  Pour les besoins de cet article, j'utiliserai la seconde sémantique et
  expliquerai pourquoi je pense que Linux est adapté aux besoins
  commerciaux plutôt qu'à celui des dilettantes et bidouilleurs et
  adapté au marché de masse plutôt qu'à des segments limités.


  Pour ceux d'entre vous qui détestent les longs articles, ou qui
  disposent de peu de temps, je vais indiquer tout de suite mes
  conclusions.  Ensuite, vous pourrez aller boire une bière ou avoir
  d'autres activités amusantes :


  "Oui, Linux est adapté au marché commercial...  dans certains cas".

  Pour qu'un système 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 considérations dans le marché de
  masse d'aujourd'hui si une seule prémisse est vraie :


  Vous disposez de nombreuses applications.


  Après tout, il n'y aurait pas 170 000 000 systèmes 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 coût total de la propriété, Apple aurait certainement gagné la
  guerre contre le PC.  Mais les gens ignorent les coûts humains des
  autres (et même d'eux-mêmes), alors qu'ils se cognent la tête contre
  les murs pour faire fonctionner quelque chose, que le système plante
  régulièrement, 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
  dépenser 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'intégration multimédia sur leur système
  d'exploitation, et disposer de toutes les applications que leur voisin
  (ou chef, ou compatriote) avait sur _s_o_n système.  Et ils voulaient
  avoir ces applications facilement, certainement pas plus difficilement
  en tout cas que de décrocher leur téléphone 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 pléthore
  d'applications pour un système d'exploitation ? La facilité de
  programmation ? De bons outils de développement ? Les fonctionnalités
  du système d'exploitation ? La stabilité dans le temps des
  interfaces ?


  La réponse est "aucune d'entre elles".  Bien que toutes ces
  caractéristiques puissent aider à convaincre un développeur
  d'applications d'effectuer un portage, le seul critère déterminant est
  le parc de la plate-forme d'un système d'exploitation.  A nouveau, si
  MS-DOS était comparé à MacOS, ou même à Unix et que le parc n'entrait
  pas en ligne de compte, nous savons quels sont les deux systèmes 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 représentatifs en nombre.  Il faudra
  longtemps aux vendeurs de Linux pour disposer du nombre d'applications
  nécessaire pour toucher le marché de masse, en particulier si celles-
  ci ne dépendent de la compatibilité ni iBCS2, ni DOS/Windows (qui
  peuvent actuellement fournir un grand nombre d'applications), mais
  sont plutôt des applications "natives" Linux.


  Donc les applications sont le roi (et la reine) du marché de masse et
  la base installée (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 réponse 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 :


  ·  systèmes "dédiés" ;

  ·  grands comptes ;

  ·  niches de marché.


  55..11..  ssyyssttèèmmeess ddééddiiééss


  Quand je parle de système dédiés, je pense spécifiquement à un
  ordinateur qui dispose d'une application spécifique (ou pas si
  spécifique) qui tourne dessus.  Des exemples de systèmes dédiés sont
  les terminaux point de vente, systèmes 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 considérés
  comme "dédiés", puisqu'ils ne disposent que des quelques programmes
  nécessaires pour le système.


  Habituellement, les systèmes dédiés sont ceux pour lesquels un
  indépendant (ISV) ou un revendeur à valeur ajoutée (VAR) choisit un
  matériel, un système d'exploitation, porte une application dessus,
  puis duplique ce système 500 ou 1 000 fois sans modifier l'application
  de base.  Ces ISV et VAR vont essayer de choisir la solution la moins
  chère qui colle aux besoins de leur clientèle.

  Linux est parfait pour ce genre d'applications.  Le système
  d'exploitation est suffisamment stable pour porter et tester
  complètement 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 système d'exploitation peut être librement copié et qu'il
  tourne sur du matériel bon marché, les coûts variables (NdT : _i_._e_.
  _m_a_r_g_i_n_a_u_x) sont minimaux.  Même un développeur non familier du système
  Linux (qui a donc besoin d'aide pour le faire tourner sur une plate-
  forme) aura un retour sur investissement rapide grâce aux économies de
  1 000 à 5 000 F par licence du système d'exploitation.  De plus, le
  code source est entièrement disponible pour le système complet, en cas
  de problème ultérieur.  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'accès
  Internet (ISP) dans la population concernée par les systèmes "dédiés",
  à 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 têtes
  d'enterrement pour me demander s'il était possible de vendre un
  système d'exploitation sans application.  J'ai inventé le terme
  "Turbocharging" qui permettait à un système Digital Unix d'utiliser la
  vitesse et la puissance du processeur Alpha (ainsi que le débit de nos
  équipements réseau) pour décharger NIS, NFS, bind et autres des
  machines SPARC surchargées.  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
  résultats à la SPARC sur leur bureau.  Cela permettait aux SPARC de
  travailler plus sur les applications et moins sur les autres tâches
  d'"administration système".  Nous avons vendu des tas de systèmes
  Digital Unix fondés exclusivement sur l'exécution de ces tâches.
  Aujourd'hui, bien sûr, Digital Unix dispose de beaucoup plus
  d'applications et des bases de données mémoire très vastes qui sont
  extrêmement rapides.  Mais le même principe s'applique.  Le moteur de
  base de données tourne sur le système Alpha, fournit les données à des
  moteurs SPARC comme un "Turbochargeur".  Je peux voir les systèmes
  Linux s'orienter dans la même direction, en suivant le même chemin.



  55..22..  GGrraannddss ccoommpptteess


  Les grands comptes ont souvent des applications maison qui doivent
  être déployées sur un vaste réseau.  Ou encore ils ont une direction
  qui impose une certaine suite d'applications qui peuvent ensuite être
  portées sur Linux.  Puisque ces grands comptes sont très vastes, leurs
  coûts de systèmes d'explotation sont très importants et l'économie
  d'échelle engendrée par l'utilisation de Linux peut couvrir
  complètement les coûts de portage.


  Ou encore ces grands comptes peuvent "influencer" leurs fournisseurs
  de logiciels pour effectuer le portage sous Linux.  Finalement, il
  peuvent même changer certaines de leurs habitudes informatiques
  (utiliser des programmes existants) si les économies d'échelle sont
  suffisantes.


  Des entreprises comme Caldera créent des suites d'applications et se
  rapprochent des grands comptes pour leur montrer les économies de
  systèmes 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 mélange d'applications natives, iBCS2,
  DOSEMU et WABI peut constituer une jolie suite qui couvre leurs
  besoins.


  55..33..  NNiicchheess ddee mmaarrcchhéé


  Enfin, il y a ce que j'appelle des "niches de marché".  Les marchés
  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 marchés principaux :

  ·  administration ;

  ·  "informatique de campus" ;

  ·  cours d'informatique.

  La partie administrative est l'aspect "commercial" du marché.  Elle
  cherche des systèmes simples à utiliser qui puissent assurer les
  tâches 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 modélisation
  moléculaire).


  Enfin, il y a les cours d'informatique, aussi bien dans l'enseignement
  secondaire qu'en supérieur ainsi que la recherche en informatique.


  Alors que le sous-marché administratif s'appuie plus sur des
  applications spécifiques, 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 déjà portées sous Linux.  Cela leur donne une plateforme très
  é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
  résultats de la recherche peuvent être librement distribués à d'autres
  travaillant dans le même domaine ou même publiés en code source pour
  illustrer les résultats.  Cela ne peut se faire avec des systèmes
  d'exploitation "commerciaux".


  Certaines universités utilisent Linux de plus en plus pour leur
  campus.  D'un point de vue "commercial", leurs besoins sont les mêmes
  que ceux de nombreux métiers.  Les étudiants venant du milieu scolaire
  connaîtront Linux, et passeront le mot à leurs employeurs futurs.

  Finalement, il y a le bidouilleur informatique et le marché du
  développement logiciel.  Je fais partie de ce marché par celui des
  radio-amateurs.  Dans ce sous-marché des radio-amateurs, la radio est
  souvent utilisée simplement pour parler à d'autres gens, mais en même
  temps, les utilisateurs recherchent de nouvelles manières d'utiliser
  la radio, et de l'améliorer.  De nombreux ingénieurs en électricité
  ont commencé comme radio-amateurs.  Ainsi, cela peut se faire avec
  Linux puisque pour la première fois, le prix du matériel et le code
  source du système d'exploitation sont à la portée du simple mortel.


  En conclusion, je pense que Linux contient les éléments nécessaires
  pour certains types d'utilisation "commerciale" :


  ·  stabilité et qualité ;

  ·  faibles coûts variables pour les systèmes dédiés ;

  ·  taille explosive pour attirer les ISV.

  Ce dont Linux a réellement 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 accroîtra 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 après l'événement, 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 conférence de
  développement conjointe USENIX/Linux et bien qu'une certaine partie de
  la conférence Linux ait été orientée vers le développement du système
  d'exploitation Linux, l'essentiel de la conférence a été orienté vers
  les développeurs d'application et les gens du marketing pour leur
  permettre de mieux comprendre le système d'exploitation Linux et
  comment vendre leurs applications et services dans le marché Linux.
  Nous espérons avoir montré aux ISV, VAR, revendeurs et distributeurs
  comment faire de l'argent en vendant leurs applications et services
  sur le système Linux.



  55..44..  BBiiooggrraapphhiiee


  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 systèmes d'exploitation, y compris Linux sur Alpha.
  Il a un MS (NdT : Master in Science) en informatique.


  66..  DDéévveellooppppeemmeenntt ddee ssiittee wweebb


  66..11..  AASSWWeeddiitt,, ééddiitteeuurr HHTTMMLL


     ddeessccrriippttiioonn ::
        ASWedit est un éditeur de texte HTML commercial, intuitif et
        facile à utiliser.  Il fonctionne dans trois modes
        indépendants : un mode d'édition texte simple et deux modes de
        validation sensibles au contexte destinés à la production de
        documents destinés aussi bien à InterNet qu'à l'intranet.  Les
        deux modes HTML sont : standard et expérimental.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, DAT 4 mm, cartouche quart de pouce et
        cartouches 8 mm, InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par machine.  Le nombre d'utilisateurs sur la machine
        porteuse de licence est illimité.  Une version du programme,
        appelée 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 détails
        sont disponibles à : http://www.advasoft.com/asWedit.html.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2.13 ou supérieur (ELF), X11R6, Motif 2.0 (sauf pour la
        version liée statiquement), 5 Mo de RAM, 1,5 à 3,5 Mo d'espace
        disque.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée, aide en ligne, langage : Manuel
        utilisateur (44 pages), Manuel de référence de HTML 3.2 étendu
        (89 pages), Manuel de référence HTML 3.2 expérimental (106
        pages).  Aide en ligne hypertexte sensible au contexte (560 ko).
        Des fichiers de ressources traduits sont disponibles pour les
        langues suivantes : anglais (par défaut), tchèque, danois,
        hollandais, français, allemand, polonais, portugais, espagnol et
        suédois.  Les commandes et messages sont traduits dans chaque
        langue, mais l'aide en ligne et la documentation sont
        disponibles seulement en anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        La licence comprend une année de mises à jour gratuites par FTP.


     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Possibilité d'interfaçage avec des filtres Unix externes.
        Hautement configurable.  Supporte quatre butineurs différents
        pour la prévisualisation.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 149.  Remises par quantités.

     VVeennddeeuurr ::
        AdvaSoft Ltd.


           30 Hatch Road London SW16 4PN Angleterre




     TTéélléépphhoonnee ::
        +44 181 251 0033

     FFaaxx ::
        +44 181 251 0011
     EE--mmaaiill ::
        as@advasoft.com

     UURRLL ::
        http://www.advasoft.com

     CCoonnttaacctt ::
        Andre Stochniol

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        30 août 1997.


  66..22..  EEmmpprreessss DDaattaaWWEEBB


     ddeessccrriippttiioonn ::
        Empress DataWEB permet de construire rapidement des applications
        dynamiques, interactives et alimentées par bases de données.
        Aucun langage de programmation n'est à apprendre ; les
        développeurs d'applications peuvent simplement utiliser HTML
        avec les extensions Empress pour l'accès au SGBD/R.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Contacter le vendeur pour des copies d'évaluation.

     CCoonnffiigguurraattiioonn OOSS ::
        16 Mo de RAM; 60 Mo d'espace disque (éléments complémentaires :
        un butineur est indispensable).

     DDooccuummeennttaattiioonn ::
        Aide en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique complet, facturé séparément.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Des éléments supplémentaires comme un serveur HTTP et d'autres
        outils facilitant la création d'applications web sont livrées
        avec le paquetage logiciel.

     DDiissppoonniibbllee ddeeppuuiiss ::
        avril, 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter le vendeur.

     VVeennddeeuurr ::
        Empress Software Inc.


           6401 Golden Triangle Drive Greenbelt, MD 20770 États-Unis.






           3100 Steeles Avenue East Markham, ON L3R 8T3 Canada

     TTéélléépphhoonnee ::
        +1 301 220 1919 (États-Unis), +1 905 513 8888 (Canada)

     FFaaxx ::
        +1 301 220 1919 (États-Unis), +1 905 513 1668 (Canada)

     EE--mmaaiill ::
        sales@empress.com

     UURRLL ::
        http://www.empress.com

     CCoonnttaacctt ::
        Dick Naedel

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  66..33..  EEZZ--EEDDIITT


     ddeessccrriippttiioonn ::
        EZ-EDIT est un éditeur HTML en ligne, qui permet aux
        utilisateurs de gérer complètement leur site web depuis un
        navigateur (éditer, créer, recharger, renommer/déplacer/copier,
        créer et supprimer des répertoires).  EZ-EDIT est le seul
        éditeur qui dispose de la fonction "filtre de fichiers" qui
        permet de spécifier les types des fichiers autorisés sur votre
        système.  Créez l'identité visuelle de votre choix à partir des
        16 fichiers prototypes EZ-EDIT de plus de 80 paramètres.  Il est
        aussi possible de déterminer des limites en espace disque.  Le
        support du téléchargement de fichiers depuis un formulaire est
        inclus, ainsi qu'un générateur de pages Java.  Toute
        l'administration est réalisée depuis un navigateur web.


     SSuuppppoorrtt ::
        disquettes 3,5 pouces, InterNet (FTP et web).


     PPoolliittiiqquuee ddee lliicceennccee ::
        une démonstration gratuite est disponible sur notre site web.
        La version de démonstration est déverrouillée en version
        complète à l'aide de la clef d'enregistrement.


     CCoonnffiigguurraattiioonn OOSS ::
        Linux/Intel.


     DDooccuummeennttaattiioonn ::
        Manuels de l'utilisateur et de l'administrateur en ligne HTML
        (anglais seulement).


     EElléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Service de mise à jour, support (par e-mail).


     DDiissppoonniibbllee ddeeppuuiiss ::
        17 septembre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD149 ,95.

     VVeennddeeuurr ::
        Relative Web


           P.O. Box 351
          Saylorsburg, PA 18353-0351
          États-Unis




     TTéélléépphhoonnee ::
        +1 610 381 3072

     FFaaxx ::
        +1 610 381 3072

     EE--mmaaiill ::
        ez-edit@relative-web.com

     UURRLL ::
        http://www.relative-web.com/dynamic/ez-edit

     CCoonnttaacctt ::
        John Bergeron

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        6 octobre 1997.


  66..44..  LLiinnkkSSccaann 22..00


     ddeessccrriippttiioonn ::
        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 contrôleur 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 révolutionnaires de cartes de sites
        web.  La carte des sites de LinkScan contient chaque lien d'un
        site web dans un format hiérarchique qui ressemble à une table
        des matières.  La carte dépliable de LinkScan permet de naviguer
        parmi les divers niveaux d'un site web via un ensemble restreint
        d'icônes de navigation.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Par machine.  Des copies d'évaluation gratuites peuvent être
        téléchargées depuis notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Nécessite Perl 5 ou supérieur.

     DDooccuummeennttaattiioonn ::
        La documentation complète et une FAQ intuitive peuvent être
        trouvées sur notre site web.

     SSuuppppoorrtt pprroodduuiitt ::
        Ce produit est en permanence mis à jour et maintenu.  Toute
        question par e-mail ou téléphone aura une réponse rapide.  Le
        support technique est gratuit.

     DDiissppoonniibbllee ddeeppuuiiss ::
        7 janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 495.

     VVeennddeeuurr ::
        Electronic Software Publishing Corporation


           1504 #8-00200 main Street Gardnerville, NV 89410-5273 États-Unis.




     EE--mmaaiill ::
        ken@elsop.com

     UURRLL ::
        http://www.elsop.com

     CCoonnttaacctt ::
        Ken Churilla

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        6 novembre 1997.


  66..55..  TTaalleennttSSoofftt WWeebb++ ((WWeebbPPlluuss))


     ddeessccrriippttiioonn ::
        TalentSoft Web+ est un outil dédié au développement
        d'applications client/serveur sur le web sans écriture de
        programmes CGI de bas niveau.  Web+ permet la création rapide et
        facile de pages web hautement fonctionnelles qui s'interfacent
        avec des bases de données, des systèmes de fichiers, l'e-mail,
        des applets Java, des applications propriétaires (EXEs, DLLs),
        et qui communiquent avec d'autres applications à l'aide des
        sockets TCP/IP.  Web+ fonctionne avec tous les serveurs web,
        bases de données et systèmes d'exploitation habituels et
        s'interface de près avec les serveurs Netscape via NSAPI et CGI.
        Web+ agit aussi comme middleware multi-thread qui interface les
        serveurs web avec les bases de données, 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'interprétation dynamique de code sur Internet !  Vous
        pouvez dès maintenant commencer à écrire et à faire tourner
        votre propre application web sans acheter ni installer Web+.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, CD-ROM et InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Copie d'évaluation gratuite disponible à
        http://www.TalentSoft.com.  Des messages sont affichés sur les
        versions d'essai mais celles-ci n'expirent pas.

     CCoonnffiigguurraattiioonn OOSS ::
        16 Mo RAM, 5 Mo d'espace disque.
     DDooccuummeennttaattiioonn ::
        Documentation imprimée (environ 200 pages) et aide en ligne
        HTML.  Anglais seulement.

     SSuuppppoorrtt pprroodduuiitt ::
        e-mail gratuit, conférence web+, et support téléphonique.
        Formation payante disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er mai 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis, Royaume Uni, Hong Kong, Chine, Singapour.

     OOrrddrree ddee pprriixx ::
        de USD 195 à USD 1295.

     VVeennddeeuurr ::
        TalentSoft / Talent Information Management, LLC.


           900 Nicollet Mall, Suite 700 Minneapolis, MN 55402 États-Unis.






           P.O.
          Box 2997 Minneapolis, MN 55402 États-Unis.




     TTéélléépphhoonnee ::
        +1 612 338 8900

     FFaaxx ::
        +1 612 904 0010

     EE--mmaaiill ::
        info@TalentSoft.com

     UURRLL ::
        http://www.TalentSoft.com

     CCoonnttaacctt ::
        Victor Tong, Ian Gorrie, Jeff Persche, Tony Tong

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        8 août 1997.


  66..66..  VViirrttuuFFlleexx 11..11


     ddeessccrriippttiioonn ::
        VirtuFlex 1.1 est un générateur d'applications web permettant
        d'ajouter des fonctionnalités dynamiques à un site web.
        VirtuFlex permet de transformer des sites web en applications
        vivantes par l'interfaçage des bases de données, du fax, de l'e-
        mail et des "pagers" avec le web.  VirtuFlex dispose de
        fonctionnalités sophistiquées qui peuvent être ajoutées aux
        sites web par un simple développeur HTML.  VirtuFlex est
        réutilisable, modulaire, facile d'emploi, performant et permet
        la connectivité avec à peu près n'importe quelle base de
        données.  VirtuFlex est composé d'un langage de macros, d'un
        processeur de macros, d'un serveur de bases de données et de
        paquetages de prototypes.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par domaine.  Copie d'évaluation gratuite disponible sur
        notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        format binaire Linux ELF (noyaux 1.2.x ou supérieur).  VirtuFlex
        tourne sur des stations Unix standard de 8 Mo de RAM minimum,
        16 Mo recommandés.

     DDooccuummeennttaattiioonn ::
        Téléchargeable en anglais depuis notre site web.

     SSuuppppoorrtt pprroodduuiitt ::
        Support de base de quatre heures.  Autres options de support
        disponibles -- détails par téléphone.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Des paquetages de prototypes pré-construits sont fournis
        gratuitement avec VirtuFlex pour le télé-achat, les groupes de
        discussion thématiques, la construction d'applications bases de
        données, des questionnaires à choix multiples, des robots
        d'exploration et des journaux cycliques.  De nouveaux paquetages
        apparaissent régulièrement.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier par UniDirect, Soft Export et InterNet.

     OOrrddrree ddee pprriixx ::
        USD 995, remises éducation.

     VVeennddeeuurr ::
        VirtuFlex Software Corp.


           930 Massachusetts Avenue
          Cambridge, MA 02139 États-Unis.




     TTéélléépphhoonnee ::
        +1 617 497 8006

     FFaaxx ::
        +1 617 492 0486

     EE--mmaaiill ::
        comments@virtuflex.com

     UURRLL ::
        http://www.virtuflex.com

     CCoonnttaacctt ::
        Dan Housman


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        17 mars 1997.


  66..77..  WWeebb CCrroossssiinngg


     ddeessccrriippttiioonn ::
        Serveur de conférences 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.

     SSuuppppoorrtt ::
        InterNet.

     SSyyssttèèmmee ddee lliicceennccee ::
        commercial.  Version de démonstration totalement fonctionnelle.

     OOrrddrree ddee pprriixx ::
        USD 995 illimitée.

     VVeennddeeuurr ::
        Lundeen & Associates


           P.O.
          Box 2900 Alameda, CA 94501 États-Unis.




     TTéélléépphhoonnee ::
        +1 510 521 5855

     FFaaxx ::
        +1 510 522 6647

     EE--mmaaiill ::
        sales@lundeen.com

     UURRLL ::
        http://webcrossing.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        30 septembre 1997.


  66..88..  TThhrreeaaddTTrraacckk eett WWeebbTTaaiilloorr ddee WWeebbtthhrreeaaddss..


     ddeessccrriippttiioonn ::
        ThreadTrack et WebTailor sont des paquetages légers de scripts
        CGI indépendants des serveurs et butineurs, développés 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 réponse à l'action ou au profil d'un visiteur.
        WebTailor utilise un langage simple de script côté serveur pour
        modifier le contenu du site.  Le langage, conçu 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 paramètres en fonction du visiteur
        entre des scripts qui tournent sur différentes pages.
        ThreadTrack marque chaque visiteur du site avec un
        identificateur unique durant toute la visite La session de
        chaque visiteur est enregistrée clic par clic, ainsi une base de
        données de l'activité individuelle et consolidée est disponible.
        Des rapports intuitifs sont inclus, et les données (dBase III)
        sont facilement transférables vers des paquetages de rapports
        spécifiques.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Version de démonstration totalement fonctionnelle 30 jours
        disponible à : http://www.webthreads.com

     CCoonnffiigguurraattiioonn OOSS ::
        Toute version de Linux sur x86, a.out et ELF.

     DDooccuummeennttaattiioonn ::
        Site web et en ligne fournies avec le paquetage.

     SSuuppppoorrtt pprroodduuiitt ::
        support e-mail.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Interface msql.  Option gestion d'enregistrement de sites.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juin 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        ThreadTrack à partir de USD 295.  WebTailor à partir de USD 895.

     VVeennddeeuurr ::
        Webthreads, L.L.C.


           1919 Gallows Road, 10th floor Vienna, VA 22182 États-Unis.




     TTéélléépphhoonnee ::
        +1 703 848 9027

     FFaaxx ::
        +1 703 848 2444

     EE--mmaaiill ::
        info@webthreads.com

     UURRLL ::
        http://www.webthreads.com

     CCoonnttaacctt ::
        Gavin Sutcliffe

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        18 mars 1997.



  77..  BBaasseess ddee ddoonnnnééeess


  77..11..  cc--ttrreeee PPlluuss


     ddeessccrriippttiioonn ::
        Fondé sur un algorithme avancé B+tree (équilibré), l'API c-tree
        Plus gère tous les aspects des entrées/sorties de base de
        données.  Programmes mono-utilisateurs ou multi-utilisateurs
        sans serveur diffusables sans royalties, et migration
        d'application existantes c-tree Plus par recompilation.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par programmeur.  Diffusion mono-utilisateur, multi-
        utilisateurs ou multi-utilisateurs sans serveur sans royalties.
        Contactez FairCom pour les restrictions possibles : les bases de
        données généralistes et les systèmes de développement
        d'applications sont interdits.

     CCoonnffiigguurraattiioonn OOSS ::
        3 Mo d'espace disque, 128 ko de RAM.

     DDooccuummeennttaattiioonn ::
        Manuels imprimés fournis.  Documentation en ligne complète sur
        CD-ROM, disponible en anglais et japonais.

     SSuuppppoorrtt pprroodduuiitt ::
        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.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 895 sources comprises.

     VVeennddeeuurr ::
        FairCom


           4006 W.Broadway Columbia, MO 65203-0100 États-Unis.




     TTéélléépphhoonnee ::
        +1 573 445 6833

     FFaaxx ::
        +1 573 445 9698

     EE--mmaaiill ::
        Faircom@faircom.com

     UURRLL ::
        http://www.faircom.com


     CCoonnttaacctt ::
        Tamra Brown <tami@faircom.com>

     VVeennddeeuurr ::
        FairCom Europe


           Via Patrioti 6 I-24021 Albino Italie




     TTéélléépphhoonnee ::
        +39 35 773 464

     FFaaxx ::
        +39 35 773 806

     EE--mmaaiill ::
        Europe@faircom.com

     VVeennddeeuurr ::
        FairCom Japon


           Ikeda Bldg.
          #3 4F, 112-5 Komei-chou, Tsu-city MIE 514 Japon




     TTéélléépphhoonnee ::
        +81 059 229 7504

     FFaaxx ::
        +81 059 249 723

     VVeennddeeuurr ::
        FairCom do Brasil Ltda.

     TTéélléépphhoonnee ::
        +55 11 3872 9802

     FFaaxx ::
        +55 11 3862 1752

     EE--mmaaiill ::
        Brésil@faircom.com


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  77..22..  EEmmpprreessss


     ddeessccrriippttiioonn ::
        Empress pour Linux est un SGBD/R multimédia destiné aux membres
        de la communauté Linux en augmentation rapide.  Les éléments-
        clefs du paquetage comprennent le puissant SGBD/R Empress ainsi
        que dynamic SQL, Empress 4GL, Empress GUI Builder pour le
        développement 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
        développement du SGBD/R Empress.  Une version allégée mono-
        utilisateur de ce produit, Personal Empress pour Linux est aussi
        disponible.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Versions de démonstrations disponibles par FTP.  Contactez
        impérativement le vendeur.

     CCoonnffiigguurraattiioonn OOSS ::
        Empress GUI Builder nécessite OSF Motif version 1.2.4 ou 2.0.
        16 Mo RAM.  80 Mo d'espace disque.  CPU 486 ou suivant.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique complet payant.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Les autres possibilités offertes par le paquetage comprennent
        les bibliothèques partagées, la mémoire partagée, les fonctions
        de bibliothèque mathématique et une interface avec le langage C.

     DDiissppoonniibbllee ddeeppuuiiss ::
        décembre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Base par utilisateur simultané.  Contacter le vendeur.

     VVeennddeeuurr ::
        Empress Software Inc.


           6401 Golden Triangle Drive Greenbelt, MD 20770 États-Unis.






           3100 Steeles Avenue East Markham, ON L3R 8T3 Canada




     TTéélléépphhoonnee ::
        +1 301 220 1919 (États-Unis), +1 905 513 8888 (Canada)

     FFaaxx ::
        +1 301 220 1919 (États-Unis), +1 905 513 1668 (Canada)

     EE--mmaaiill ::
        sales@empress.com

     UURRLL ::
        http://www.empress.com

     CCoonnttaacctt ::
        Dick Naedel


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  77..33..  EEsssseennttiiaa


     ddeessccrriippttiioonn ::
        Moteur de base de données.  Quelques fonctionnalités : bases
        distantes, client/serveur, contrôle de cohérence automatique,
        sauvegardes incrémentales, miroir, shadowing, base distribuée,
        journalisation, versions, RISE, SGBD objet, architecture
        client/serveur implémentant le modèle relationnel trois tiers,
        serveurs coopératifs, indépendance de langue configurable au
        niveau utilisateur (anglais, espagnol, portugais).

     SSuuppppoorrtt ::
        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

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial.  Version gratuite pour Linux.

     CCoonnffiigguurraattiioonn OOSS ::
        10 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Disponible en PostScript et HTML.

     SSuuppppoorrtt pprroodduuiitt ::
        Contacter essentia-info@inter-soft.com pour plus de
        renseignements.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        SQL Server, interface ODBC pour Windows, interface JDBC,
        serveurs utilisateurs.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1993.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Argentine, Brésil, Russie, Mexique, Venezuela et États-Unis.

     OOrrddrree ddee pprriixx ::
        Version Linux gratuite (avec quelques restrictions).  Autres
        prix disponibles sur demande.

     VVeennddeeuurr ::
        InterSoft Argentine S.A.


           Córdoba 883 9th.
          Floor Capital Federal (1054) Argentine




     TTéélléépphhoonnee ::
        +54 1 318 8900

     FFaaxx ::
        +54 1 318 8997
     EE--mmaaiill ::
        info@inter-soft.com

     UURRLL ::
        http://www.inter-soft.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  77..44..  FFaaiirrCCoomm SSeerrvveerr


     ddeessccrriippttiioonn ::
        Moniteur transactionnel hautes performances multi-thread.  Parmi
        les fonctionnalités : traitement de transactions de qualité
        industrielle, comprenant le commit et le rollback intégraux ;
        points de sauvegarde intermédiaires et trace complète ; gestion
        automatique des traces ; reprise sur redémarrage/désastre ; mots
        de passe utilisateurs ; administration de la sécurité d'accès et
        en ligne ; verrous en lecture/écriture aux niveaux
        enregistrement/clef individuelle, etc.


     SSuuppppoorrtt ::
        disquettes 3,5 pouces et CD-ROM.


     SSyyssttèèmmee ddee lliicceennccee ::
        Base par machine.  Contacter FairCom pour les questions
        spécifiques de licence.


     CCoonnffiigguurraattiioonn OOSS ::
        2 Mo de RAM.


     DDooccuummeennttaattiioonn ::
        Manuels imprimés fournis avec le produit.  documentation en
        ligne complète sur CD-ROM, disponible en anglais et japonais.


     SSuuppppoorrtt pprroodduuiitt ::
        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.


     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1995.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 445-USD 6795 selon la plate-forme et le nombre
        d'utilisateurs.  Licences spéciales et accords OEM disponibles.


     VVeennddeeuurr ::
        FairCom



     4006 W.
     Broadway Columbia,
     MO 65203-0100
     États-Unis.





     TTéélléépphhoonnee ::
        +1 573 445 6833


     FFaaxx ::
        +1 573 445 9698


     EE--mmaaiill ::
        Faircom@faircom.com


     UURRLL ::
        http://www.faircom.com


     CCoonnttaacctt ::
        Tamra Brown <tami@faircom.com>


     VVeennddeeuurr ::
        FairCom Europe


           Via Patrioti 6 I-24021 Albino Italie





     TTéélléépphhoonnee ::
        +39 35 773 464


     FFaaxx ::
        +39 35 773 806


     EE--mmaaiill ::
        Europe@faircom.com


     VVeennddeeuurr ::
        FairCom Japon


           Ikeda Bldg.
          #3 4F, 112-5 Komei-chou, Tsu-city MIE 514 Japon





     TTéélléépphhoonnee ::
        +81 059 229 7504


     FFaaxx ::
        +81 059 249 723


     VVeennddeeuurr ::
        FairCom do Brasil Ltda.


     TTéélléépphhoonnee ::
        +55 11 3872 9802


     FFaaxx ::
        +55 11 3862 1752


     EE--mmaaiill ::
        Brésil@faircom.com


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.



  77..55..  IINNFFOORRMMIIXX--SSEE



     ddeessccrriippttiioonn ::
        INFORMIX-SE est un moteur de bases de données SQL pour des
        applications de petite à moyenne dimension.  C'est la solution
        idéale pour les entreprises qui souhaitent la puissance du SQL
        sans les nécessités d'administration complexe de bases de
        données.  Avec plus de dix ans de fiabilité prouvée, INFORMIX-SE
        est une référence dans le monde des serveurs de bases de données
        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 développeurs peuvent
        continuer à utiliser ces langages de troisième génération
        familiers pour développer des applications et bénéficier des
        avantages de l'utilisation de SQL pour accéder aux données
        depuis celles-ci.


     SSuuppppoorrtt ::
        CD-ROM et Internet (FTP).


     SSyyssttèèmmee ddee lliicceennccee ::
        Licence de développement gratuite.  Les licences d'utilisation
        doivent être acquises séparément.  Les informations concernant
        les deux licences sont disponibles sur
        http://www.informix.com/informix/solutions/linux/lx.html.


     CCoonnffiigguurraattiioonn OOSS ::
        Le processus serveur nécessite 1,2 Mo de RAM pour s'exécuter, et
        peut être installé avec 6 Mo d'espace disque.


     DDooccuummeennttaattiioonn ::
        Documentation en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique annuel et contrats de maintenance du logiciel.


     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        TBD.


     DDiissppoonniibbllee ddeeppuuiiss ::
        22 juillet 1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        Pour avancer avec votre licence de développement, Informix
        propose des contrats de maintenance à des prix attractifs au-
        travers du système Informix-Assurance :
        http://www.informix.com/informix/services/csp/assurance/assurance.htm

     VVeennddeeuurr ::
        Informix Software, Inc.


     EE--mmaaiill ::
        sales@informix.com http://www.informix.com/cgi-bin/contact.pl


     UURRLL ::
        http://www.informix.com


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        21 septembre 1998.


  77..66..  JJuusstt LLooggiicc//SSQQLL


     ddeessccrriippttiioonn ::
        Système de gestion de bases de données relationnelles

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Runtime illimité fourni.

     DDooccuummeennttaattiioonn ::
        Manuel imprimé, exemples.

     SSuuppppoorrtt pprroodduuiitt ::
        e-mail, fax ou téléphone.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::

     ·  option client/serveur : permet d'exécuter les applications sur
        plusieurs ordinateurs sous Windows ou Linux, avec accès à une
        base centrale sous Linux ;

     ·  option web-enabling : passerelle entre un serveur HTTP et une
        base de données Just Logic/SQL.  Ni C ni Perl nécessaire.  Les
        commandes SQL sont directement incluses dans les fichiers HTML.
        Compatible avec Netscape, Apache, NCSA et tous les autres
        serveurs HTTP compatibles CGI.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1993.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 149-USD 395.

     VVeennddeeuurr ::
        Just Logic Technologies


          P.O. Box 63050,
          40 Commerce Street
          Nun's Island, Montréal, QC H3E 1V6
          Canada




     TTéélléépphhoonnee ::
        +1 514 761 6887

     FFaaxx ::
        +1 514 642 6480

     EE--mmaaiill ::
        sales@justlogic.com

     UURRLL ::
        http://www.justlogic.com

     CCoonnttaacctt ::
        Luc Vallieres

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        5 août 1997.


  77..77..  KKEE TTeexxpprreessss


     ddeessccrriippttiioonn ::
        KE Texpress est un moteur de base de données très rapide qui
        supporte les structures et opérations objet, relationnelles et
        texte libre.  Il est particulièrement adapté aux applications à
        jeux de données importants, opérations complexes et grand nombre
        d'utilisateurs concurrents.  KE Texpress est utilisé pour une
        grande variété d'applications bases de données web.  Parmi les
        applications verticales, on trouve la gestion de collections,
        des systèmes de bibliothèques, des statistiques vitales, des
        archives, de la recherche de texte et de la gestion
        d'enregistrements.

     SSuuppppoorrtt ::
        InterNet (FTP et web) et cartouche.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par utilisateur simultané.  Version de démonstration
        totalement fonctionnelle 30 jours disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        bibliothèques Linux ELF et a.out.  Nécessite environ 30 Mo
        d'espace disque.  Tourne sur plus de 20 autres variétés d'Unix
        et sur Windows NT.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée et HTML disponible.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique annuel (e-mail, fax et téléphone) et contrats
        de maintenance logicielle.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::

     ·  module Texhtml web - publie les bases KE Texpress sur le web ;

     ·  Texql - langage SQL-like ;

     ·  TexAPI - API avec bibliothèques client pour Windows (C, C++ et
        VB), Unix et Macintosh Système 7 ;

     ·  TexODBC - pilotes ODBC pour Windows.

        KE Software dispose d'un grand service de consultants qui
        assiste les client dans le développement d'applications bases de
        données KE Texpress.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1984.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis, Canada, Australie, Hong Kong, Japon et Malaisie.

     OOrrddrree ddee pprriixx ::
        USD 2 000 à USD 100 000+.

     VVeennddeeuurr ::
        KE Software Inc.


           303-601 West Broadway Vancouver, BC V5Z 4C2 Canada




     TTéélléépphhoonnee ::
        +1 604 877 1960

     FFaaxx ::
        +1 604 877 1961

     EE--mmaaiill ::
        info@kesoftware.com

     UURRLL ::
        http://www.kesoftware.com

     CCoonnttaacctt ::
        Andrzej Kowalski

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  77..88..  QQddddbb



     ddeessccrriippttiioonn ::
        Qddb est un logiciel de bases de données rapide, puissant et
        flexible qui tourne sous Unix.  Parmi ses fonctionnalités : API
        Tcl/Tk, simplicité, une application base de données peut être
        réalisée en environ 5 minutes avec nxqddb.  Interface CGI pour
        des bases de données en ligne rapides et faciles.  Fonction de
        recherche rapide et puissante.  Générateur d'états.  Graphiques
        et diagrammes.  Publipostage par e-mail, courrier et cartes
        postales.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, cartouche et InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Versions GNU et Commerciale disponibles.

     CCoonnffiigguurraattiioonn OOSS ::
        La version GNU est livrée avec sources.  Paquetages binaires
        disponibles pour Linux, FreeBSD et BSD/OS(BSDI) -- formats rpm
        et kit d'installation.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne et fichiers PostScript disponibles.
        Manuels imprimés aussi disponibles sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Supports utilisateur et programmeur disponibles avec les
        contrats de mise à jour.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        API Tcl/Tk, interface CGI, générateur d'états, de nombreuses
        applications libres et commerciales bâties avec Qddb.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Voir http://www.hsdi.com/orders

     VVeennddeeuurr ::
        Herrin Software Développement, Inc.


           41 South Highland Avenue Prestonsburg, KY 41653 États-Unis.




     TTéélléépphhoonnee ::
        +1 606 886 8202

     FFaaxx ::
        +1 606 277 3239

     EE--mmaaiill ::
        info@hsdi.com

     UURRLL ::
        http://www.hsdi.com

     CCoonnttaacctt ::
        Eric Herrin

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  77..99..  RRaaiimmaa DDaattaabbaassee MMaannaaggeerr++++


     ddeessccrriippttiioonn ::
        Moteur de bases de données bas niveau hautes performances avec
        API C bibliothèque de classes C++, à inclure dans des
        applications.  Cette base de données est utilisée dans des
        centaines d'applications commerciales.  Elle inclut le source de
        la bibliothèque 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 orientée objet.
        Elle supporte de multiples modèles de bases de données, y
        compris relationnel, réseau et combiné.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et cartouche.

     SSyyssttèèmmee ddee lliicceennccee ::
        Licence de développement payante, runtime illimité.

     DDooccuummeennttaattiioonn ::
        Documentation étendue disponible auprès de Raima Corporation,
        couvrant tous les aspects de la base de données, de l'API C et
        de la bibliothèque de classes C++.

     SSuuppppoorrtt pprroodduuiitt ::
        Disponible auprès de Raima Corporation sur une base annuelle,
        arrosage disponible.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        IHM Windows, générateur d'états.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1984, initialement appelée db_VISTA.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        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.

     OOrrddrree ddee pprriixx ::
        Module base de données 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 données
        RDM++, l'outil de requêtes 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 système ; USD 6 195 avec les
        utilitaires système.

     VVeennddeeuurr ::
        Raima Corporation


           4800 Columbia Center 701 5th Avenue Seattle, WA 98104




     TTéélléépphhoonnee ::
        +1 800 327 2462, +1 206 515 9477
     FFaaxx ::
        +1 206 748 5200

     EE--mmaaiill ::
        sales@raima.com

     UURRLL ::
        http://www.raima.com

     CCoonnttaacctt ::
        Dave Morse

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        18 mars 1997.


  77..1100..  EEmmpprreessss EEmmbbeeddddeedd SSGGBBDD//RR


     ddeessccrriippttiioonn ::
        Le SGBD/R Empress Embedded est un jeu d'outils de développement
        de systèmes incorporés.  Le moteur SGBD/R est rapide, compact et
        facile à incorporer.  De plus, ce paquetage possède des
        capacités supérieures de gestion d'objets bruts.  Le SGBD/R
        Embedded Empress est adapté à InterNet via la passerelle
        JDBC/ODBC disponible.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Contacter le vendeur pour des copies d'évaluation.

     CCoonnffiigguurraattiioonn OOSS ::
        32 Mo de RAM, 60 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique payant complet.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Les fonctionnalités supplémentaires 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.

     DDiissppoonniibbllee ddeeppuuiiss ::
        janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        À partir de USD 1 000 pour PC, USD 4 000 pour les stations de
        travail, USD 16 000 pour les serveurs intermédiaires.

     VVeennddeeuurr ::
        Empress Software Inc.


           6401 Golden Triangle Drive Greenbelt, MD 20770 États-Unis.



           3100 Steeles Avenue East Markham, ON L3R 8T3 Canada




     TTéélléépphhoonnee ::
        +1 301 220 1919 (États-Unis), +1 905 513 8888 (Canada)

     FFaaxx ::
        +1 301 220 1919 (États-Unis), +1 905 513 1668 (Canada)

     EE--mmaaiill ::
        sales@empress.com

     UURRLL ::
        http://www.empress.com

     CCoonnttaacctt ::
        Dick Naedel

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  77..1111..  SSOOLLIIDD SSeerrvveerr


     ddeessccrriippttiioonn ::
        SOLID Server est un moteur de bases de données pour de nouvelles
        applications et de nouveaux produits.  Il est extrêmement facile
        à configurer, et nécessite peu de ressources.  SOLID Server est
        standard et très puissant.  Il est parfaitement adapté à
        l'utilisation distribuée en copies non décomptées.  Sa
        maintenance est sans problème, nécessitant peu ou pas de travail
        de l'administrateur.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Protection contre la copie.

     CCoonnffiigguurraattiioonn OOSS ::
        Au moins 2 Mo de RAM, 8 Mo recommandés.  Environ 3-4 Mo d'espace
        disque.

     DDooccuummeennttaattiioonn ::
        Manuels et aide en ligne en anglais.  web.

     SSuuppppoorrtt pprroodduuiitt ::
        Disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        SOLID Desktop USD 99, SOLID Server USD 199/machine, SOLID Web
        Engine USD 495.

     VVeennddeeuurr ::
        Solid Information Technology Ltd


      Huovitie 3 FIN-00400 Helsinki Finlande




     TTéélléépphhoonnee ::
        +358 9 477 4730

     FFaaxx ::
        +358 9 477 47 390

     EE--mmaaiill ::
        info@solidtech.com

     UURRLL ::
        http://www.solidtech.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  77..1122..  VVeelloocciiss DDaattaabbaassee SSeerrvveerr


     ddeessccrriippttiioonn ::
        Velocis Database Server est conçu pour les développeurs
        d'applications bases de données qui recherchent un moteur
        performant client/serveur ou web.  Velocis est un moteur de
        bases de données é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, bibliothèques de classes C++, et
        support d'API spécifiques.  Contrairement aux produits de bases
        de données client/serveurs habituels, Velocis supporte aussi
        bien les bases de modèle relationnel que réseau à pointeurs dans
        toutes leurs combinaisons, aussi bien que le traitement de
        chaque côté de l'équation client/serveur.  Les choix de plates-
        formes multiples, API, localisation de traitement (client ou
        serveur), et de modèle de base de données peuvent être mélangés
        et combinés pour satisfaire les besoins de performance de
        virtuellement n'importe quelle application.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et cartouche.

     SSyyssttèèmmee ddee lliicceennccee ::
        Licence de développement.  Des runtimes sont nécessaires pour
        distribuer les applications.

     DDooccuummeennttaattiioonn ::
        Documentation extensive disponible auprès de Raima Corporation,
        couvrant tous les aspects de base de données, API C et
        bibliothèque de classes C++.


     SSuuppppoorrtt pprroodduuiitt ::
        Disponible auprès de Raima Corporation sur base annuelle,
        arrosage disponible.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        IHM Windows, générateur d'états, Gestionnaire d'objets Raima.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1993, initialement appelé Raima Database Server.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.
     OOrrddrree ddee pprriixx ::
        1-8 utilisateurs : USD 1 995, 1-25 utilisateurs : USD 3 995,
        illimité : USD 8 995.

     VVeennddeeuurr ::
        Raima Corporation


           4800 Columbia Center 701 5th Avenue Seattle, WA 98104




     TTéélléépphhoonnee ::
        +1 800 327 2462, +1 206 515 9477

     FFaaxx ::
        +1 206 748 5200

     EE--mmaaiill ::
        sales@raima.com

     UURRLL ::
        http://www.raima.com

     CCoonnttaacctt ::
        Dave Morse

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  77..1133..  YYaarrdd SSQQLL


     ddeessccrriippttiioonn ::
        YARD propose les produits suivant :

     ·  YARD-SQL -- SGBD/R SQL client/serveur compatible X/Open XPG4 et
        ANSI SQL 92 avec support d'accès réseau à des bases distantes ;

     ·  YARD-ESQLC -- Embedded SQL pour C ;

     ·  YARD-ODBC -- interface ODBC pour clients MS Windows ;

     ·  YARD-X -- client Motif pour accès aux bases de données (sans
        outil de développement) ;

     ·  YARD-JDBC -- interface Java.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Numéro de licence et clef d'activation pour chaque produit et
        installation avec licence par utilisateur.  Une Édition Privée
        (limitée à 1 utilisateur et à une base de données de 5 Mo) est
        disponible pour usage privé non commercial et évaluation à :
        ftp://ftp.yard.de.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux version ELF.  1 Mo de RAM (minimum) pour la mémoire
        partagée, 500 ko par utilisateur.  Espace disque : YARD-SQL
        10 Mo, YARD-ESQLC 1 Mo, YARD-ODBC 1.5 Mo et YARD-X 5 Mo.


     DDooccuummeennttaattiioonn ::
        Manuel de référence et utilisateur de 600 pages imprimé en
        allemand.  Documentation en anglais disponible au format
        PostScript.

     SSuuppppoorrtt pprroodduuiitt ::
        Sur demande.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Tous nos produits sont aussi disponibles pour les autres
        systèmes Unix courants (i.e.  SCO Unix, SPARC Solaris, IBM, HP,
        SGI).

     DDiissppoonniibbllee ddeeppuuiiss ::
        janvier 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Contacter YARD Software GmbH pour toute information sur les
        revendeurs.

     OOrrddrree ddee pprriixx ::
        Sur demande.

     VVeennddeeuurr ::
        YARD Software GmbH


           Wikingerstr.
          18 D-51107 Köln Allemagne




     FFaaxx ::
        +49 221 98664 99

     EE--mmaaiill ::
        yard@yard.de

     UURRLL ::
        http://www.yard.de

     FFTTPP ::
        ftp://ftp.yard.de

     CCoonnttaacctt ::
        Thomas Schonhoven <thomass@yard.de>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  88..  VViissuuaalliissaattiioonn ddee ddoonnnnééeess eett CCAAOO


  88..11..  IIDDLL ((IInntteerraaccttiivvee DDaattaa LLaanngguuaaggee))


     ddeessccrriippttiioonn ::
        IDL est un logiciel puissant d'analyse et de visualisation de
        données et de développement d'applications.  Les fonctionnalités
        d'IDL comportent : entrées/sorties flexibles, dessin 2D,
        graphiques 3D, rendu volumique, traitement d'image,
        mathématiques, statistiques, kit de développement d'IHM trans-
        plate-forme, plus un langage de programmation de haut niveau
        orienté tableaux.  IDL s'utilise pour l'analyse de données
        visuelle, le prototypage rapide ou le développement
        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 limitée en fonctionnalités par
        rapport à IDL 5.0.  Elle est conçue pour correspondre aux
        environnements d'enseignement en laboratoires, et donner accès
        aux étudiants à un logiciel spécifiquement dessiné pour les
        cursus techniques, tels que physique, astronomie, génie,
        sciences de la terre, médicales ou informatiques.  Pour plus
        d'informations ou pour commander, consultez notre site web.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        CD-ROM de démonstration gratuit disponible ou téléchargement par
        FTP.

     CCoonnffiigguurraattiioonn OOSS ::
        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.

     DDooccuummeennttaattiioonn ::
        Plus de 3 000 pages de documentation imprimée et aide en ligne
        hypertexte.

     SSuuppppoorrtt pprroodduuiitt ::
        Service clientèle, maintenance/mise à jour, formation et
        consulting sont disponibles.  De plus, un groupe Usenet est
        dédié à IDL.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        ENVI : application de traitement d'image à détection à distance,
        Data Miner : accès aux bases de données ODBC, support HDF, CDF,
        NetCDF, animation, trancheur de volumes, cartographie haute
        résolution intégrés.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Contactez le vendeur.

     OOrrddrree ddee pprriixx ::
        Contactez le vendeur/distributeur.

     VVeennddeeuurr ::
        Research Systems, Inc.


           2995 Wilderness Place
          Boulder, CO 80301
          États-Unis.




     TTéélléépphhoonnee ::
        +1 303 786 9900

     FFaaxx ::
        +1 303 786 9909

     EE--mmaaiill ::
        info@rsinc.com

     UURRLL ::
        http://www.rsinc.com

     FFTTPP ::
        ftp://ftp.rsinc.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        5 novembre 1997.


  88..22..  MMeeggaahheeddrroonn


     ddeessccrriippttiioonn ::
        Un moteur graphique 3D flexible et puissant contrôlé par un
        langage interprété 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 même
        écrire votre propre ombreur, paramétrer les objets et
        déplacements procéduraux, et utiliser jusqu'à 64 ordinateurs
        simultanément pour le calcul réseau.  Comporte les exécutables
        pour Windows 95, Windows NT x86 et Alpha, SGI Irix et Linux.

     SSuuppppoorrtt ::
        CD-ROM ISO-9660 et Rock Ridge.

     SSyyssttèèmmee ddee lliicceennccee ::
        Très adaptable.  Le propriétaire peut lancer autant de copies
        qu'il le peut, sur autant de plates-formes.  Version de
        démonstration, documentation complète et exemples d'images et de
        scripts disponibles sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Supporte les noyaux 1.2.8 or 1.3.15.  Exécutable non-ELF, a.out
        (QMAGIC).  16 Mo de RAM minimum recommandé.  7 Mo d'espace
        disque recommandé.

     DDooccuummeennttaattiioonn ::
        En HTML sur CDROM.

     SSuuppppoorrtt pprroodduuiitt ::
        Serveur de nouvelles privé, e-mail.  Corrections sur le site
        web.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Tout est inclus sur un seul CD-ROM.

     DDiissppoonniibbllee ddeeppuuiiss ::
        août 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier, direct et par revendeurs.

     OOrrddrree ddee pprriixx ::
        USD 99

     VVeennddeeuurr ::
        Syndesis Corporation


           235 South main Street Jefferson, WI 53549 États-Unis.


     TTéélléépphhoonnee ::
        +1 414 674 5200

     FFaaxx ::
        +1 414 674 6363

     EE--mmaaiill ::
        syndesis@threedee.com

     UURRLL ::
        http://www.threedee.com

     CCoonnttaacctt ::
        John Foust <jfoust@threedee.com>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        3 novembre 1997.


  88..33..  TTeeccpplloott 77..00


     ddeessccrriippttiioonn ::
        Tecplot est un logiciel de visualisation de données interactif
        pour le dessin XY, graphique 2D et 3D, contour, vecteur et
        points ombrés (NdT : Que les spécialistes excusent la pauvreté
        de la traduction:-(().  Pour plus d'informations, Voyez le site
        web Amtec Engineering.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Licences individuelles (verrou par noeud) ou réseau.  Copies
        d'évaluation disponibles sur CD-ROM ou par FTP anonyme.

     CCoonnffiigguurraattiioonn OOSS ::
        12 Mo minimum, Linux 1.2 ou supérieur (disponible en versions
        liées statiquement ou dynamiquement).  La version dynamique
        nécessite Motif 1.2 ou supérieur.  32 Mo RAM recommandé.

     DDooccuummeennttaattiioonn ::
        Manuels utilisateur et de référence imprimés, aide en ligne
        complète.  Anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Mise à jour et support technique inclus avec la licence pour les
        trois premiers mois.  Payant ensuite (demander EUSS).  Formation
        possible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        V7 depuis septembre 1996, V6 depuis août 1993.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Nombreux, voir le site web Amtec.

     OOrrddrree ddee pprriixx ::
        USD 1 795 par licence individuelle, USD 2 395 par licence réseau
        mono-utilisateur, USD 1 795 par utilisateur supplémentaire.
        Prix pour les États-Unis et le Canada seulement.

     VVeennddeeuurr ::
        Amtec Engineering, Inc



      PO Box 3633 Bellevue, WA 98009-3633 États-Unis.




     TTéélléépphhoonnee ::
        +1 800 676 7568, +1 425 827 3304

     FFaaxx ::
        +1 425 827 3989

     EE--mmaaiill ::
        tecplot@amtec.com

     UURRLL ::
        http://www.amtec.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  88..44..  VVaarriiCCAADD


     ddeessccrriippttiioonn ::
        Système de DAO mécanique disponible pour Linux, Windows 95 et
        Windows NT

        Le système est équipé avec toutes les ressources de base
        nécessaire pour le travail de génie des constructeurs et
        dessinateurs.  Il inclut des fonction de modélisation 3D, dessin
        2D, édition, transformations, objets utilisateurs et création de
        blocs, groupes et symboles.  Le système entier est hautement
        paramétrable et largement ouvert.


     SSuuppppoorrtt ::
        CD-ROM, InterNet (web).


     SSyyssttèèmmee ddee lliicceennccee ::
        Version de démonstration gratuite disponible sur notre site web


     CCoonnffiigguurraattiioonn OOSS ::
        Noyau version 2.0 ou supérieure, XFree version 3?1 ou
        supérieure, 16 Mo de RAM, 20 Mo d'espace disque et libc 5.4.


     DDooccuummeennttaattiioonn ::
        Aide en ligne en anglais.


     SSuuppppoorrtt pprroodduuiitt ::
        Nouvelle version tous les trois mois environ.


     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Gratuité des nouvelles versions pendant la première année.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1991.



     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        De USD 199 à USD 499.


     VVeennddeeuurr ::
        VariCAD



          931 Greenbriar Avenue
          Ottawa, ON K2C 0J8
          Canada





     TTéélléépphhoonnee ::
        +1 613 723 5319


     FFaaxx ::
        +1 613 723 5319


     EE--mmaaiill ::
        mail@varicad.com


     UURRLL ::
        http://www.varicad.com


     CCoonnttaacctt ::
        Petr Placek

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        15 août 1998.


  88..55..  VVAARRKKOONN


     ddeessccrriippttiioonn ::
        Un outil de développement de haut niveau pour la DAO et les
        applications de modélisation de produits.  Modélisation
        paramétrique interactive en 2D et 3D avec base de données
        orientée objet.  DAO de haut niveau et langage de modélisation
        MoS inclus.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Binaires libres pour Linux.

     CCoonnffiigguurraattiioonn OOSS ::
        Nécessite X mais pas Motif.  Besoins : 3 Mo d'espace disque pour
        l'installation de base et 3 Mo de RAM pour l'exécution.

     DDooccuummeennttaattiioonn ::
        400 pages de documentation inclues dans la version libre pour
        Linux.

     SSuuppppoorrtt pprroodduuiitt ::
        Service de mise à jour en continu et consultation libre
        disponible pour USD 75/mois.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Pilotes de traceurs supplémentaires disponibles gracieusement.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        La version Linux est gratuite.

     VVeennddeeuurr ::
        Microform AB


           Henningsholmsgatan 4 S-703 69 Orebro Suède




     TTéélléépphhoonnee ::
        +46 19314932

     FFaaxx ::
        +46 19314969

     EE--mmaaiill ::
        info@microform.se

     UURRLL ::
        http://www.microform.se

     CCoonnttaacctt ::
        Johan Kjellander

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        5 février 1997.


  88..66..  XXVVSSccaann


     ddeessccrriippttiioonn ::
        Logiciel de numérisation et de manipulation d'images pour
        numériseurs HP ScanJet.

     SSuuppppoorrtt ::
        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).

     SSyyssttèèmmee ddee lliicceennccee ::
        XVScan est fondé sur XV et n'est pas disponible en version de
        démonstration pour des raisons de limites de licences.  Fourni
        avec code source complet.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux, testé avec 1.2.x et 2.0.x, nécessite un pilote SCSI
        récent (pas inférieur à 1.1.79).  Motif n'est pas nécessaire.
        Toute version XFree (X11R5, X11R6).

     DDooccuummeennttaattiioonn ::
        En ligne, web, Anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Mises à jour gratuites la première année.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Aussi disponible pour HP-UX, BSD/OS 2.2 et 3.0, SunOS 4.1.x,
        Solaris 2.x et FreeBSD.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 50 pour envoi par FTP ou e-mail.  USD 15 de plus pour les
        média aux États-Unis, USD 15 à l'international.  Cartes
        accréditives Mastercard, Visa, Discover, et Américan Express
        acceptées.

     VVeennddeeuurr ::
        tummy.com, ltd.


           3506 Stratton Drive Fort Collins, CO 80525-2722 États-Unis.




     TTéélléépphhoonnee ::
        +1 970 223 8215

     FFaaxx ::
        +1 408 490 2728

     EE--mmaaiill ::
        xvscan@tummy.com

     UURRLL ::
        http://www.tummy.com/xvscan

     CCoonnttaacctt ::
        Sean Reifschneider <jafo@tummy.com> ou Evelyn Mitchell
        <efm@tummy.com>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  99..  OOuuttiillss ddee ddéévveellooppppeemmeenntt



  99..11..  AACCUUCCOOBBOOLL--GGTT


     ddeessccrriippttiioonn ::
        ACUCOBOL-GT est un système de développement COBOL ANSI-85 avec
        compilateur, bibliothèque d'exécution, dévermineur, outils de
        support et documentation.  Il offre l'indépendance matérielle du
        code source, une IHM graphique COBOL, des fonctionnalités
        client/serveur, le support du multi-thread et la flexibilité de
        la source de données.  De plus, ACUCOBOL-GT est compatible
        an 2 000.

     SSuuppppoorrtt ::
        Disquettes 3,5 pouces actuellement (un CD-ROM est prévu pour le
        deuxième trimestre 1998).

     SSyyssttèèmmee ddee lliicceennccee ::
        Une licence d'exécution pour chaque application installée y
        compris les droits de licence pour chaque produit en copie
        d'évalutation 30 jours est disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux a.out et ELF. Testé sur Linux Red Hat 4.1 avec noyau
        2.0.30.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée en anglais pour chaque produit, aide en
        ligne pour la version d'évaluation web.

     SSuuppppoorrtt pprroodduuiitt ::
        Service de mise à jour pour 20% par an du prix de licence du
        produit.  Formations d'entraînement aux produits de base
        (DDM 600 par jour à dates prédéfinies).  Support technique
        inclus dans le service de mise à jour.

     DDiissppoonniibbllee ddeeppuuiiss ::
        février 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 1 500 pour un système de développement mono-utilisateur
        (Linux), USD 300 par développeur supplémentaire, tarifs de
        diffusion d'exécutables sur demande (prix variables selon la
        forme du contrat).

     VVeennddeeuurr ::
        (Allemagne) Acucobol Deutschland GmbH


          Otto-Hahn-Str. 9
          D-61381 Friedrichsdorf
          Allemagne




     TTéélléépphhoonnee ::
        +49 6175 93310

     FFaaxx ::
        +49 6175 1429

     EE--mmaaiill ::
        aschmidt@acucobol.de

     CCoonnttaacctt ::
        Annette Schmidt


     VVeennddeeuurr ::
        (États-Unis) Acucobol, Inc.


     7950 Silverton Avenue, Suite #201
     San Diego, CA 92126
     États-Unis




     TTéélléépphhoonnee ::
        +1 800 COBOL 85, +1 619 6897220

     FFaaxx ::
        +1 619 566 3071

     EE--mmaaiill ::
        info@acucobol.com

     UURRLL ::
        http://www.acucobol.com

     CCoonnttaacctt ::
        Jeff Freedman

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        1er novembre 1997.



  99..22..  AAmmzzii!! SSeerrvveeuurr PPrroolloogg && LLooggiicc


     ddeessccrriippttiioonn ::
        Amzi! permet l'intégration aisée de composants intelligents avec
        des applications conventionnelles, autorisant des bases logiques
        proposant des avis, la configuration et l'ajustement de
        systèmes, le diagnostic de problèmes, l'application de règles
        professionnelles, le contrôle de processus et l'interprétation
        de documents.  Votre application accède à une base logique de
        règles exactement comme à des enregistrements de base de
        données.  Les règles sont exprimées en Prolog, un langage qui
        dispose de puissantes possibilités 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, dévermineur, éditeur de liens,
        exécutables, générateur, API d'appels bidirectionnels du
        serveur, documentation complète, tutoriel Prolog intuitif et des
        quantités d'exemples de code.

     SSuuppppoorrtt ::
        InterNet.

     SSyyssttèèmmee ddee lliicceennccee ::
        L'Édition Professionnelle comprend une licence illimitée.
        L'Édition Personnelle est limitée à la distribution
        d'application non-commerciales.

     CCoonnffiigguurraattiioonn OOSS ::
        Environ 350 ko de RAM pour une petite application, 3-4 Mo
        d'espace disque.

     DDooccuummeennttaattiioonn ::
        Format HTML, y compris le tutoriel Prolog complet.

     SSuuppppoorrtt pprroodduuiitt ::
        Les service Subscription Plus comprend les mises à jour
        automatiques pour un an, USD 198.  Services de développement
        spécifique disponibles.
     LLiinnuuxx SSuuppppoorrtt::
        Pas de système Linux inclus.  Pour Amzi!, support technique
        gratuit par téléphone, fax et e-mail.

     DDiissppoonniibbllee ddeeppuuiiss ::
        3 novembre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Édition personnelle, USD 49 (Shareware).  Édition
        Professionnelle, USD 298.

     VVeennddeeuurr ::
        Amzi! inc.


           40 Samuel Prescott Drive Stow, MA 01775 États-Unis.




     TTéélléépphhoonnee ::
        +1 508 897 7332

     FFaaxx ::
        +1 508 897 2784

     EE--mmaaiill ::
        info@amzi.com

     UURRLL ::
        http://www.amzi.com

     CCoonnttaacctt ::
        Mary Kroening

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  99..33..  BBaassmmaarrkk QQuuiicckkBBAASSIICC


     ddeessccrriippttiioonn ::
        Le compilateur Basmark QuickBASIC est un compilateur BASICA,
        MoASIC et Microsoft QuickBASIC multi-utilisateurs conçu pour
        apporter des performances et un comportement homogène sur
        différentes machines (i.e. i386 et i486, Pentium, SPARC,
        RS/6000, HP PA-RISC) sous Unix, AIX, SunOS, Linux, HP-UX et
        Xenix.

     SSuuppppoorrtt ::
        InterNet.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par machine, sans limitation d'exécution.

     CCoonnffiigguurraattiioonn OOSS ::
        GNU GAS et LD doivent être installés.

     DDooccuummeennttaattiioonn ::
        Manuel de plus de 400 pages, notes de version et d'installation
        disponibles en version imprimée pour USD 50 (plus frais
        d'envoi).
     SSuuppppoorrtt pprroodduuiitt ::
        Mises à jour disponibles pour USD 139 moins frais d'envoi.
        Contrats de maintenance disponibles.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Interface C-ISAM (Informix Inc.) en source C pour USD 35.

     DDiissppoonniibbllee ddeeppuuiiss ::
        décembre 1993.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 195 (moins frais d'envoi)

     VVeennddeeuurr ::
        Basmark Corporation


           P.O.
          Box 40450 Cleveland, OH 44140 États-Unis.




     TTéélléépphhoonnee ::
        +1 216 871 8855

     FFaaxx ::
        +1 216 871 9011

     EE--mmaaiill ::
        jgo@basmark.com (pour commander)

     UURRLL ::
        http://www.basmark.com

     CCoonnttaacctt ::
        Joseph O'Toole (pour commander)

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  99..44..  MMaassssee CCrriittiiqquuee CCMM33


     ddeessccrriippttiioonn ::
        Compilateur et environnement d'exécution de développement de
        systèmes.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial avec source des bibliothèques, licences d'évaluation
        disponibles par téléchargement à : http://www.cmass.com/cm3.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux/ELF.

     DDooccuummeennttaattiioonn ::
        En ligne.


     SSuuppppoorrtt pprroodduuiitt ::
        Optionnel.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Voir http://www.cmass.com/cm3

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis.

     OOrrddrree ddee pprriixx ::
        USD 479/site.

     VVeennddeeuurr ::
        Critical Mass, Inc.


           Critical Mass, Inc.
          225R Concord Avenue Cambridge, MA 02138 États-Unis.




     TTéélléépphhoonnee ::
        +1 617 354 6277

     FFaaxx ::
        +1 617 354 5027

     EE--mmaaiill ::
        info@cmass.com

     UURRLL ::
        http://www.cmass.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        19 mai 1997.


  99..55..  DDyynnaaccee


     ddeessccrriippttiioonn ::
        Dynace (prononcer "dynastie" sans le "t") est un ensemble
        préprocesseur, fichiers include et bibliothèque qui étend le
        langage C avec des fonctionnalités objet avancées, ramasse-
        miettes automatique et multi-threading.  Dynace est capable
        d'ajouter des fonctionnalités disponibles auparavant seulement
        dans des langages comme Smalltalk et CLOS sans toute la
        surcharge habituellement associée à ces environnements.

     SSuuppppoorrtt ::
        InterNet (web) y compris tout le code source.

     SSyyssttèèmmee ddee lliicceennccee ::
        Une licence par programmeur ; les applications sont libres à la
        diffusion.  Le système complet se trouve à :
        http://www.edge.net/algorithms.  Libre pour usage non
        commercial.

     CCoonnffiigguurraattiioonn OOSS ::
        Tout Linux.


     DDooccuummeennttaattiioonn ::
        310 pages en Postscript, HP PCL, ou TeX DVI.

     SSuuppppoorrtt pprroodduuiitt ::
        Dynace-support@edge.net

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Système de développement Windows complet.

     DDiissppoonniibbllee ddeeppuuiiss ::
        décembre 1993.

     OOrrddrree ddee pprriixx ::
        USD 599.

     VVeennddeeuurr ::
        Algorithms Corporation


           3020 Liberty Hills Drive Franklin, TN 37067 États-Unis.




     TTéélléépphhoonnee ::
        +1 800 566 8991, +1 615 791 1636

     FFaaxx ::
        +1 615 791 7736

     EE--mmaaiill ::
        blake@edge.net

     UURRLL ::
        http://www.edge.net/algorithms

     CCoonnttaacctt ::
        Blake McBride

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  99..66..  AAbbssoofftt FFOORRTTRRAANN 7777


     ddeessccrriippttiioonn ::
        Compilateur et dévermineur ANSI FORTRAN 77 compatible VAX/VMS.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        licence mono-utilisateur ; paquetages multi-utilisateurs
        disponibles.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2.13.

     DDooccuummeennttaattiioonn ::
        Plus de 300 pages de documentation papier.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit.


     DDiissppoonniibbllee ddeeppuuiiss ::
        mars 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 525-USD 2 000.

     VVeennddeeuurr ::
        Absoft Corporation


           2781 Bond Street Rochester Hills, MI 48309 États-Unis.




     TTéélléépphhoonnee ::
        +1 248 853 0050

     FFaaxx ::
        +1 248 853 0108

     EE--mmaaiill ::
        sales@absoft.com

     UURRLL ::
        http://www.absoft.com

     CCoonnttaacctt ::
        Wood Lotz

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  99..77..  FFiinneessssee


     ddeessccrriippttiioonn ::
        IHM graphique OSF/Motif pour les scripts shell.

     SSuuppppoorrtt ::
        InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Finesse est un produit entièrement commercial pour les Unix
        lorsqu'une licence par noeud est possible.  La version Linux est
        librement disponible à : FTP.  Le support disquette est à
        DDM 90.

     CCoonnffiigguurraattiioonn OOSS ::
        Bibliothèques ELF.  X11R6.  Motif non nécessaire.

     DDooccuummeennttaattiioonn ::
        Fichier PostScript.

     SSuuppppoorrtt pprroodduuiitt ::
        Aucun support pour la version libre.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.
     OOrrddrree ddee pprriixx ::
        Démonstration gratuite.  Version commerciale avec support sur
        demande.

     VVeennddeeuurr ::
        science + computing GmbH


           Hagellocher Weg 71 D-72070 Tübingen Allemagne




     TTéélléépphhoonnee ::
        +49 7071 9457 0

     FFaaxx ::
        +49 7071 9457 27

     EE--mmaaiill ::
        info@science-computing.de

     UURRLL ::
        http://www.science-computing.de

     FFTTPP ::
        ftp://ftp.science-computing.de/pub/finesse.

     CCoonnttaacctt ::
        Olaf Flebbe

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        25 février 1997.


  99..88..  IISSEE EEiiffffeell


     ddeessccrriippttiioonn ::
        ISE Eiffel est un environnement de développement orienté objet.
        ISE Eiffel fournit une solution complète pour les développeurs
        de logiciels avec de pures méthodes orientées objet, de
        l'analyse et de la conception à la génération de code, la
        maintenance et la rétro-ingénierie.  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 (mécanisme de
        distribution/concurrence).

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP et web)

     SSyyssttèèmmee ddee lliicceennccee ::
        Aucune charge de distribution pour les produits, commerciaux ou
        autres, développés 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) Fonctionnalités "ISE Eiffel"
        (NdT : la validité légale de la traduction n'est pas garantie)
        clairement visible dans la documentation du produit, et (b) une
        fenêtre logicielle ou un message jaillissant "ISE Eiffel" (NdT :
        la validité légale de la traduction n'est pas garantie)
        clairement visible durant le processus d'installation du produit
        faisant mention du copyright.
     CCoonnffiigguurraattiioonn OOSS ::
        Linux ELF ou a.out.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée.  Aide en ligne complémentaire.

     SSuuppppoorrtt pprroodduuiitt ::
        service de mise à jour, maintenance, formation disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        août 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        À partir de USD 99.

     VVeennddeeuurr ::
        Interactive Software Engineering, Inc.


           ISE Building
          270 Storke Road, 2nd Floor
          Goleta, CA 93117
          États-Unis.




     TTéélléépphhoonnee ::
        +1 805 685 1006

     FFaaxx ::
        +1 805 685 6869

     EE--mmaaiill ::
        info@eiffel.com

     UURRLL ::
        http://www.eiffel.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        3 octobre 1997.


  99..99..  EEiiffffeellBBeenncchh


     ddeessccrriippttiioonn ::
        Outil CASE orienté objet.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Aucune charge de distribution pour les produits, commerciaux ou
        autres, développés 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) Fonctionnalités "ISE Eiffel"
        (NdT : la validité légale de la traduction n'est pas garantie)
        clairement visible dans la documentation du produit, et (b) une
        fenêtre logicielle ou un message jaillissant "ISE Eiffel" (NdT :
        la validité légale de la traduction n'est pas garantie)
        clairement visible durant le processus d'installation du produit
        faisant mention du copyright.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux ELF ou a.out.

     DDooccuummeennttaattiioonn ::
        Eiffel : l'environnement.

     SSuuppppoorrtt pprroodduuiitt ::
        service de mise à jour, maintenance, formation disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        août 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        À partir de USD 99.

     VVeennddeeuurr ::
        Interactive Software Engineering, Inc.


           ISE Building
          270 Storke Road, 2nd Floor
          Goleta, CA 93117
          États-Unis.




     TTéélléépphhoonnee ::
        +1 805 685 1006

     FFaaxx ::
        +1 805 685 6869

     EE--mmaaiill ::
        info@eiffel.com

     UURRLL ::
        http://www.eiffel.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        3 octobre 1997.


  99..1100..  IIddeeaaFFiixx


     ddeessccrriippttiioonn ::
        L'environnement de développement d'applications InterSoft sous
        Unix (ou IdeaFix  InterSoft Developpement Environment of
        Applications For unIX), est un ensemble d'outils de
        développement conçu pour constituer un environnement intégré
        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 agréable et un système d'aide en
        ligne.  IdeaFix fournit au développeur des outils qui
        simplifient le développement de critères de conception tels que
        les bases relationnelles et la programmation structurée
        modulaire.

     SSuuppppoorrtt ::
        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

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial.

     CCoonnffiigguurraattiioonn OOSS ::
        20 Mo d'espace disque, et compilateur GNU C/C++.

     DDooccuummeennttaattiioonn ::
        Disponible en PostScript.

     SSuuppppoorrtt pprroodduuiitt ::
        Contact ideafix-info@inter-soft.com pour plus d'informations.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        SQL server, environnement de développement Dali, Cracker pour
        Windows.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1986.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Argentine, Brésil, Russie, Mexique, Vénézuéla et États-Unis.

     OOrrddrree ddee pprriixx ::
        Versions Linux libres (avec quelques restrictions).  Autres prix
        disponibles sur demande.

     VVeennddeeuurr ::
        InterSoft Argentine S.A.


           Córdoba 883 9th.
          Floor Capital Federal (1054) Argentine




     TTéélléépphhoonnee ::
        +54 1 318 8900

     FFaaxx ::
        +54 1 318 8997

     EE--mmaaiill ::
        info@inter-soft.com

     UURRLL ::
        http://www.inter-soft.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  99..1111..  jj--ttrreeee


     ddeessccrriippttiioonn ::
        Bénéficiez de la puissance de clients Java tout en maintenant
        une base de données consolidées sur un grand nombre de systèmes
        d'exploitation.  L'API Java associée aux fonctionnalités ISAM c-
        tree Plus permet des fonctionnalités Java au travers de méthodes
        natives/RMI.  j-tree utilise la puissance/flexibilité de toute
        la gemme de serveurs de bases de données FairCom.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Une licence de c-tree Plus, puis déploiement libre.

     CCoonnffiigguurraattiioonn OOSS ::
        2 Mo de RAM.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne complète sur CD-ROM, disponible en
        anglais et japonais.

     SSuuppppoorrtt pprroodduuiitt ::
        Trois mois de support technique complet à compter de la date
        d'achat.

     DDiissppoonniibbllee ddeeppuuiiss ::
        août 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Sur demande.

     VVeennddeeuurr ::
        FairCom


           4006 W.
          Broadway Columbia, MO 65203-0100 États-Unis.




     TTéélléépphhoonnee ::
        +1 573 445 6833

     FFaaxx ::
        +1 573 445 9698

     EE--mmaaiill ::
        Faircom@faircom.com

     UURRLL ::
        http://www.faircom.com

     CCoonnttaacctt ::
        Tamra Brown <tami@faircom.com>

     VVeennddeeuurr ::
        FairCom Europe


           Via Patrioti 6 I-24021 Albino Italie





     TTéélléépphhoonnee ::
        +39 35 773 464

     FFaaxx ::
        +39 35 773 806

     EE--mmaaiill ::
        Europe@faircom.com

     VVeennddeeuurr ::
        FairCom Japon


           Ikeda Bldg.
          #3 4F, 112-5 Komei-chou, Tsu-city MIE 514 Japon




     TTéélléépphhoonnee ::
        +81 059 229 7504

     FFaaxx ::
        +81 059 249 723

     VVeennddeeuurr ::
        FairCom do Brasil Ltda.


     TTéélléépphhoonnee ::
        +55 11 3872 9802


     FFaaxx ::
        +55 11 3862 1752

     EE--mmaaiill ::
        Brésil@faircom.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        9 août 1997.


  99..1122..  KKAAII CC++++


     ddeessccrriippttiioonn ::
        Le compilateur KAI C++ est conforme au dernier standard, hautes
        performances, faible coût d'abstraction, syntaxe et
        bibliothèques identiques sur toutes les plates-formes supportées
        et support client de haut niveau.  Aucun autre compilateur n'est
        aussi proche du standard.

     SSuuppppoorrtt ::
        InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial.  Version d'évaluation gratuite 30 jours disponible
        sur http://www.kai.com/kcc_howto.shtml

     CCoonnffiigguurraattiioonn OOSS ::
        Red Hat Linux 2.1 ou supérieur.  Autres logiciels : gcc 2.7.2.1.
        15 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne complète fournie.
     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit.  Le service de support annuel
        comprend les mises à jour automatiques pour une année complète,
        USD 79.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 395 monoprocesseur ; USD 545 multiprocesseur.

     VVeennddeeuurr ::
        Kuck & Associates, Inc.


           1906 Fox Drive Champaign, IL  61820-7345 États-Unis.




     TTéélléépphhoonnee ::
        +1 217 356 2288

     FFaaxx ::
        +1 217 356 5199

     EE--mmaaiill ::
        kai@kai.com

     UURRLL ::
        http://www.kai.com/kcc_howto.shtml

     CCoonnttaacctt ::
        Bruce Leasure <bruce@kai.com>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        14 juillet 1997.


  99..1133..  KKhhoorrooss PPrroo 22..11


     ddeessccrriippttiioonn ::
        Khoros Pro 2.2 est un environnement de développement logiciel
        muni de fonctions avancées de traitement d'image, développement
        logiciel, et visualisation de données.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        La licence mono-utilisateur est incluse dans le CD-ROM Khoros
        Pro.  Licences disponibles pour les développeurs et
        indépendants.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.18, gcc 2.7.2, compilateur FORTRAN f2c 19951025+ AT&T
        Bell Labs.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée ; Guides d'installation et utilisateur
        sur CD-ROM.  Jeu de cinq manuels du développeur disponibles
        auprès de KRI.
     SSuuppppoorrtt pprroodduuiitt ::
        Formations développement logiciel et traitement numérique
        d'images prévues en 1998.  Voir
        http://www.khoral.com/formation/formation.html.  Maintenance,
        support technique et de développement payants auprès de KRI.

     DDiissppoonniibbllee ddeeppuuiiss ::
        août 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.  Tarif éducation via Addison Wesley.

     OOrrddrree ddee pprriixx ::
        Khoros Pro 2.2 mono-utilisateur à USD 549.  licences indépendant
        à partir de USD 5 000 en fonction de la plate-forme et de la
        structure organisationnelle.  Accords de distribution payants.

     VVeennddeeuurr ::
        Khoral Research Inc.


           6001 Indian School NE Suite 200 Albuquerque, NM 87110 États-Unis.




     TTéélléépphhoonnee ::
        +1 505 837 6500

     FFaaxx ::
        +1 505 881 3842

     EE--mmaaiill ::
        info@khoral.com

     UURRLL ::
        http://www.khoral.com

     FFTTPP ::
        ftp://ftp.khoral.com

     CCoonnttaacctt ::
        Annie MacFarlane <annie@khoral.com>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  99..1144..  MMeettaaCCaarrdd


     ddeessccrriippttiioonn ::
        MetaCard est un outil de développement d'IHM graphiques
        multimédia compatible avec HyperCard d'Apple Corporation.
        Chacun peut utiliser MetaCard pour bâtir des applications
        graphiques et des documents hypermédia à l'aide d'un éditeur
        puissant, par manipulation directe et d'un langage de script
        facile à apprendre.

        MetaCard dépasse HyperCard par l'inclusion de contrôles en
        couleur et d'images, de graphiques vectoriels, ascenseurs et
        boîtes de dialogue.  Le langage de script MetaCard supporte les
        tableaux, les propriétés spécifiques (utilisateur), et est fondé
        sur la technologie du "compilateur virtuel" hautes performances.
        Les piles développées avec MetaCard sont portables sur toutes
        les plates-formes Unix classiques et Windows 95/NT et peuvent
        être diffusées sans limite.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (FTP et e-mail).

     SSyyssttèèmmee ddee lliicceennccee ::
        La licence MetaCard est attribuée à un utilisateur individuel
        nommé, mais peut être utilisée sur toute machine ou combinaison
        de machines par cet utilisateur.  Des paquetages multi-
        utilisateurs sont aussi disponibles.

        La distribution de démonstration (sauvegarde désactivée) est
        disponible par FTP anonyme à : ftp://ftp.metacard.com/MetaCard
        et ftp://ftp.uu.net/vendor/MetaCard.

     CCoonnffiigguurraattiioonn OOSS ::
        Le moteur Linux est bâti autour d'un système 1.2.13 ELF.
        Minumum 8 Mo RAM pour l'exécution, 16 Mo RAM pour le
        développement.  Résolution minimum 640x480x8 pour l'exécution,
        800x600x8 pour le développement.  Le système de développement
        nécessite environ 5 Mo d'espace disque.  GUI est compatible
        Motif, mais ne nécessite pas les bibliothèques Motif.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne complète fournie.  Documentation imprimée
        en option payante.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique e-mail gratuit, support téléphonique payant
        disponible.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Une version bibliothèque de MetaCard directement linkable à des
        programmes C (Embedded MetaCard) est disponible en option
        payante.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juin 1992.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Licence de développement mono-utilisateur toutes plateformes :
        USD 995.

     VVeennddeeuurr ::
        MetaCard Corporation


           4710 Shoup pl.
          Boulder, CO 80303 États-Unis.




     TTéélléépphhoonnee ::
        +1 303 447 3936

     FFaaxx ::
        +1 303 499 9855

     EE--mmaaiill ::
        info@metacard.com


     UURRLL ::
        http://www.metacard.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  99..1155..  OObbjjeeccttMMaannuuaall RReelleeaassee 33..00


     ddeessccrriippttiioonn ::
        Générateur automatique de documentation de programmes C++.
        Génère de la documentation en différents formats, y compris
        HTML, RTF, MIF ainsi que classes Java.

     SSuuppppoorrtt ::
        InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Licences mono-, multi-utilisateurs, site et flottante.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux ELF.

     DDooccuummeennttaattiioonn ::
        Fournie en PostScript avec la distribution.

     SSuuppppoorrtt pprroodduuiitt ::
        Gratuit 30 jours.  Ensuite, par cycle contractuel de six mois à
        un an.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Une nouvelle version par trimestre.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis.

     OOrrddrree ddee pprriixx ::
        USD 2 295 pour la plupart des Unix.  Gratuit pour les
        utilisateurs Linux en environnement non commercial.

     VVeennddeeuurr ::
        ObjectSoftware, Inc.


           3519 Misty Meadow Drive
          Dallas, TX 75287
          États-Unis.




     TTéélléépphhoonnee ::
        +1 214 373 2021

     FFaaxx ::
        +1 972 662 0756

     EE--mmaaiill ::
        objsoft@netcom.com

     UURRLL ::
        http://www.obsoft.com
     CCoonnttaacctt ::
        Bobby Sardana

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        30 septembre 1997.


  99..1166..  CCrriittiiccaall MMaassss RReeaaccttoorr


     ddeessccrriippttiioonn ::
        Environnement distribué de développement d'applications.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial avec source des bibliothèques, licences d'évaluation
        disponibles à la vente.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux/ELF.

     DDooccuummeennttaattiioonn ::
        Documentation complète incluse (imprimée et en ligne)

     SSuuppppoorrtt pprroodduuiitt ::
        Optionnel.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Voir
        http://www.cmass.com/reactor/overview/index.html#reactor_features

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis.

     OOrrddrree ddee pprriixx ::
        USD 479-USD 3 500/site.  Remises pour usages non commerciaux et
        éducation.

     VVeennddeeuurr ::
        Critical Mass, Inc.


           Critical Mass, Inc.
          225R Concord Avenue Cambridge, MA 02138 États-Unis.




     TTéélléépphhoonnee ::
        +1 617 354 6277

     FFaaxx ::
        +1 617 354 5027

     EE--mmaaiill ::
        info@cmass.com

     UURRLL ::
        http://www.cmass.com


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        19 mai 1997.


  99..1177..  RReessoouurrccee SSttaannddaarrdd MMeettrriiccss


     ddeessccrriippttiioonn ::
        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 systèmes d'exploitation.  L'analyse qualitative
        contrôle des erreurs sémantiques que de nombreux compilateurs
        manquent et renforce les standard de développement logiciel.

     SSuuppppoorrtt ::
        Le logiciel peut être chargé sur notre site web ou envoyé par e-
        mail ou encore sur disquettes aux formats tar et ZIP.

     SSyyssttèèmmee ddee lliicceennccee ::
        Licence de partagiciel pour la version de démonstration qui
        traite un fichier.  Les licences commerciales mono-utilisateur
        et réseau traitent n'importe quel nombre de fichiers de toute
        taille depuis les caractères jokers de la ligne de commande,
        depuis une liste ou en descendant récursivement une arborescence
        de répertoires.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2.

     DDooccuummeennttaattiioonn ::
        Documentation complète incluse (imprimée et en ligne). Anglais
        seulement.

     SSuuppppoorrtt pprroodduuiitt ::
        1 support e-mail. Maintenance logicielle de 1 an disponible.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Certaines licences sont fournies avec le code source non
        modifiable pour compilation sur un système spécifique.  Chaque
        version est livrée avec un outil d'impression améliorée et un
        utilitaire de conversion DOS vers Unix.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mars 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        De USD 99,99 pour une licence mono-utilisateur sans code source
        jusqu'à USD 999,95 pour une licence site réseau.

     VVeennddeeuurr ::
        M Squared Technologies


           2128 Hidden Pine Lane
          Apopka, FL 32712
          États-Unis.





     TTéélléépphhoonnee ::
        +1 407 880 2627

     FFaaxx ::
        +1 407 880 2627

     EE--mmaaiill ::
        m2tech@reachus.com

     UURRLL ::
        http://www.m2tech.net

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        25 septembre 1998.


  99..1188..  rr--ttrreeee


     ddeessccrriippttiioonn ::
        Générateur d'états r-tree en source C.

        Réalise des états complexes, multi-lignes en tenant compte de
        virtuellement tous les aspects de la génération d'états.  Le
        seul besoin en programmation est l'appel de la fonction report
        de r-tree, qui lit les fichiers de données c-tree, effectue les
        calculs, supervise les ruptures et totaux et réalise l'état
        formaté.  Complet avec source C.  Nécessite c-tree Plus.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par programmeur.  Contacter FairCom pour les restrictions
        possibles.

     DDooccuummeennttaattiioonn ::
        Manuels imprimés fournis avec le produit ; documentation en
        ligne complète sur CD-ROM, disponible en anglais et japonais.

     SSuuppppoorrtt pprroodduuiitt ::
        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.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 445.

     VVeennddeeuurr ::
        FairCom


           4006 W.
          Broadway Columbia, MO 65203-0100 États-Unis.




     TTéélléépphhoonnee ::
        +1 573 445 6833
     FFaaxx ::
        +1 573 445 9698

     EE--mmaaiill ::
        Faircom@faircom.com

     UURRLL ::
        http://www.faircom.com

     CCoonnttaacctt ::
        Tamra Brown <tami@faircom.com>

     VVeennddeeuurr ::
        FairCom Europe


           Via Patrioti 6 I-24021 Albino Italie




     TTéélléépphhoonnee ::
        +39 35 773 464

     FFaaxx ::
        +39 35 773 806

     EE--mmaaiill ::
        Europe@faircom.com

     VVeennddeeuurr ::
        FairCom Japon


           Ikeda Bldg.
          #3 4F, 112-5 Komei-chou, Tsu-city MIE 514 Japon




     TTéélléépphhoonnee ::
        +81 059 229 7504

     FFaaxx ::
        +81 059 249 723

     VVeennddeeuurr ::
        FairCom do Brasil Ltda.


     TTéélléépphhoonnee ::
        +55 11 3872 9802


     FFaaxx ::
        +55 11 3862 1752

     EE--mmaaiill ::
        Brésil@faircom.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.




  99..1199..  ssddoocc ((SSoouurrccee DDooccuummeenntteerr))


     ddeessccrriippttiioonn ::
        Ce programme aide à la réalisation de documentation complète et
        indexée à partir de sources (C, tcl, Perl actuellement
        disponible, d'autres suivront bientôt).  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 aisées à apprendre, mais
        suffisamment puissantes pour créer des documents de belle
        allure.  sdoc utilise cette information pour créer un document
        pod qui, à son tour, peut être transformé en HTML, LaTeX (et
        PostScript), nroff ou texte simple.  La fonction de
        prévisualisation de tdoc vous permet de créer la documentation
        interactivement - ajouter ou modifier vos insertions dans le
        fichier source et contrôler la validité du résultat.  Quelques
        points majeurs :

     ·  la documentation est fournie en source, aucun fichier séparé
        n'est nécessaire ;

     ·  options de formatage puissantes combinées à un apprentissage
        aisé ;

     ·  une documentation de belle allure peut être créée sans fatigue ;

     ·  indexation automatique ;

     ·  résultat 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 fonctionnalités suivantes :

     ·  significativement plus rapide ;

     ·  utilisation possible de Netscape pour la prévisualisation ;

     ·  inclut le concept de paquetage pour l'automatisation de la
        sélection de fichiers ;

     ·  connexion directe à emacs pour l'édition de fichiers ;

     ·  création directe en PostScript ;

     ·  support complet, mises à jour ;

     ·  documentation complète.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (e-mail et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        version domaine public de sdoc disponible sur l'archive tcl de
        neosoft :

     ·  http://www.neosoft.com/tcl/ftparchive/sorted/développement

     ·  ftp://ftp.neosoft.com/pub/tcl/sorted/développement

     CCoonnffiigguurraattiioonn OOSS ::
        Système ELF avec X11.

     DDooccuummeennttaattiioonn ::
        Aide sensible au contexte et documentation complète au format
        Pod.  Disponible en PostScript sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation inclus, support complémentaire
        disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter softWorks pour les détails de tarification.  Remises
        éducation.

     VVeennddeeuurr ::
        softWorks, Richard Schwaninger


           Theodor-Körnerstr.
          173 A-8010 Graz Autriche




     TTéélléépphhoonnee ::
        +43 316 686590

     FFaaxx ::
        +43 316 686590

     EE--mmaaiill ::
        risc@ping.at

     UURRLL ::
        http://members.ping.at/risc

     CCoonnttaacctt ::
        Richard Schwaninger

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  99..2200..  SSEEDDIITT,, SS//RREEXXXX


     ddeessccrriippttiioonn ::
        SEDIT est un puissant éditeur qui ressemble au XEDIT d'IBM.  Il
        fonctionne sous X window ou en mode caractère.  S/REXX est une
        implémentation Unix complète du langage procédural SAA d'IBM, à
        la différence que la spécification numérique est limitée à
        15 chiffres.  S/REXX fonctionne comme un macro-langage intégré
        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
        séparément.  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 cités sur le site web,
        ou écrivez-nous à : sedit@dialup.FranceNet.fr

     SSuuppppoorrtt ::
        4mm, 8 mm, quart de pouce ou disquettes 3,5 pouces et InterNet
        (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        SEDIT et S/REXX sont des produits commerciaux.  Voir le site web
        ci-dessus pour les détails.  Pour les besoins de démonstration,
        une licence provisoire sera fournie sur demande à quiconque
        charge le produit par FTP.

     CCoonnffiigguurraattiioonn OOSS ::
        Nous pensons que ces produits doivent fonctionner avec tout
        noyau Linux récent (depuis 1.1.18) supportant le format a.out.
        Motif est inclus totalement dans SEDIT et SEDIT est distribué
        avec les bibliothèques partagées XFree86 3.1.

     DDooccuummeennttaattiioonn ::
        La documentation est fournie en PostScript, en fichiers complets
        d'aide en ligne, et en manuels imprimés optionnels.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique disponible pour tous les utilisateurs
        enregistrés.  Pour la maintenance, voir les URL ci-dessus.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Un dévermineur interactif graphique REXX est disponible en
        option comme les manuels imprimés, les supports physiques et la
        maintenance.  Voir les URL ci-dessus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        La version Linux originelle est disponible depuis le troisième
        trimestre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.  voir les URL ci-dessus pour l'information à jour.

     OOrrddrree ddee pprriixx ::
        Les informations tarifaires doivent être demandées au
        distributeur local responsable de votre pays.  Une licence
        économique 2 utilisateurs est disponible pour Linux sans média
        ni documentation imprimée avec d'autres options pour plus
        d'utilisateurs, S/REXX, manuels, etc.

     VVeennddeeuurr ::
        Benaroya


           31 Rue de Constantinople F-75008 Paris France




     TTéélléépphhoonnee ::
        +33 1 47 22 22 13

     FFaaxx ::
        +33 1 47 22 06 17

     EE--mmaaiill ::
        sedit@dialup.FranceNet.fr

     UURRLL ::
        http://www.sedit.com

     CCoonnttaacctt ::
        Robert Benaroya


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  99..2211..  SSNNiiFFFF++


     ddeessccrriippttiioonn ::
        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 créer un
        environnement de programmation efficace et portable avec une IHM
        confortable et un support spécial pour la programmation orientée
        objet.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Licence d'essai disponible.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2 ou 2.0.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée et version HTML.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Extensions disponibles pour d'autres langages de programmation.

     VVeennddeeuurr ::
        TakeFive Software GmbH


           Jakob-Haringer-Straße 8 A-5020 Salzburg Autriche




     TTéélléépphhoonnee ::
        +43 662 4579150

     FFaaxx ::
        +43 662 4579156

     EE--mmaaiill ::
        info@takefive.co.at

     UURRLL ::
        http://www.takefive.co.at

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        3 novembre 1997.


  99..2222..  SSTT//XX ((SSmmaallllttaallkk//XX))


     ddeessccrriippttiioonn ::
        ST/X est une implémentation complète du langage de programmation
        Smalltalk avec un environnement de développement qui fournit
        tous les avantages que l'on puisse attendre du langage
        Smalltalk : un langage totalement orienté objet, un
        environnement de développement graphique avec éditeurs,
        tableurs, dévermineur symbolique, compilateur incrémental et
        compilation juste-à-temps en code machine aussi bien qu'une
        bibliothèque de classes complète.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Licences non-commerciales, d'évaluation et commerciales
        disponibles.  Version de démonstration sur InterNet, assez
        ancienne, qui doit être mise à jour courant 1997.

     CCoonnffiigguurraattiioonn OOSS ::
        ST/X nécessite 32 Mo ou plus de RAM et 100 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        La documentation de ST/X est disponible en ligne en hypertexte
        (HTML).

     SSuuppppoorrtt pprroodduuiitt ::
        eXept Software AG fournit assistance, formation, et consulting.
        Support sur site disponible.  Service de mise à jour et de
        maintenance pour la licence commerciale.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        ST/X inclut un compilateur en code machine supplémentaire et la
        possibilité d'intégrer du code C directement dans les méthodes
        Smalltalk.  Cela permet l'exploitation et l'utilisation de
        bibliothèques existantes ou l'amélioration des performances dans
        les opérations critiques.  Intégré dans ST/X se trouve un
        butineur HTML totalement implémenté en Smalltalk.  Il supporte
        les applets et scripts Smalltalk intégrés dans des pages HTML.
        Cela permet le développement d'application InterNet et Intranet
        de manière analogue à celle de Java.

     DDiissppoonniibbllee ddeeppuuiiss ::
        ST/X est disponible depuis assez longtemps en version bêta.
        eXept Software AG a développé et commercialisé ST/X ensuite
        depuis 1996.  Claus Gittinger (le développeur de ST/X) est
        membre fondateur de eXept.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        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.

     VVeennddeeuurr ::
        eXept Software AG


           Besigheimerstr.
          1 D-74369 Löchgau Allemagne




     TTéélléépphhoonnee ::
        +49 7143 870045

     FFaaxx ::
        +49 7143 870048

     EE--mmaaiill ::
        info@exept.de
     UURRLL ::
        http://home.t-online.de/home/exept

     CCoonnttaacctt ::
        David Queeney

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        5 août 1997.


  99..2233..  ttddbb ((TTccll DDéévveerrmmiinneeuurr))


     ddeessccrriippttiioonn ::
        Dévermineur pour scripts tcl.  Il permet le déverminage
        interactif de programmes tcl/tk et accélère le cycle de
        développement.  Points majeurs :

     ·  exécution pas à pas avec points d'arrêt ;

     ·  affichage et manipulation de variables locales et globales ;

     ·  modifications de code source à la volée et redémarrages rapides
        de programme ;

     ·  interface utilisateur graphique facile à utiliser ;

     ·  configuration et installation aisées.

        La version commerciale ajoute les fonctionnalités 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 complète.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (e-mail et web)

     SSyyssttèèmmee ddee lliicceennccee ::
        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

     CCoonnffiigguurraattiioonn OOSS ::
        Système ELF avec X11.

        Notez que tdb nécessite des modifications aux bibliothèques C
        tcl et dépend aussi du chargement dynamique.  Consultez le
        paquetage info pour plus de détails.  tcl n'est pas nécessaire
        pour utiliser le dévermineur, tout le code nécessaire 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 détails.

     DDooccuummeennttaattiioonn ::
        Aide sensible au contexte et documentation complète au format
        HTML.  Disponible en PostScript sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Aide à l'installation incluse, support additionnel disponible.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Dévermineur-PlugIns pour les tâches de déverminages spécialisées
        (e.g.  pour déverminer les hiérarchies de widget tk) est aussi
        disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 450 pour une version binaire, USD 750 pour le source, remise
        éducation de 10%.

     VVeennddeeuurr ::
        softWorks, Richard Schwaninger


           Theodor-Körnerstr.
          173 A-8010 Graz Autriche




     TTéélléépphhoonnee ::
        +43 316 686590

     FFaaxx ::
        +43 316 686590

     EE--mmaaiill ::
        risc@ping.at

     UURRLL ::
        http://members.ping.at/risc

     CCoonnttaacctt ::
        Richard Schwaninger

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  99..2244..  ttpprrooff ((TTccll PPrrooffiilleerr))


     ddeessccrriippttiioonn ::
        Profileur pour scripts tcl.  Il permet la création de données de
        profil pour les programmes tcl ainsi que l'analyse et
        l'inspections détaillées par une présentation graphique.  Cet
        outil est particulièrement adapté si l'on rencontre des
        problèmes de performances avec les scripts tcl.  Plutôt que de
        réécrire toute l'application en C, il est possible d'isoler les
        procédures critiques et de les accélérer (en utilisant C si
        nécessaire).  Points majeurs :
     ·  affichage des flux d'appels ;

     ·  graphiques de nombres d'appels, temps CPU et temps réel ;

     ·  tableau du jeu de données de profil ;

     ·  analyse conjointe de procédures tcl et de commandes C ;

     ·  IHM graphique facile d'utilisation ;

     ·  aquisition simplifiée de données de profil ;

     ·  configuration et installation aisées.

        tprof est disponible aussi bien dans le domaine public et en
        version commerciale.  La version commerciale ajoute les
        fonctionnalités suivantes :

     ·  _z_o_o_m sur les sous-ensembles de données intéressants ;

     ·  impression des jeux de données ;

     ·  images PostScript (eps) des graphiques et tableaux ;

     ·  concaténation de jeux de données multiples ;

     ·  export de jeux de données à différents formats (i.e. sc/xspread,
        Wingz, DBase, texte) ;

     ·  beaucoup plus rapide ;

     ·  support complet, mises à jour ;

     ·  documentation complète.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, InterNet (e-mail et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        La version domaine public de tprof est disponible sur
        sunsite.unc.edu et ses miroirs.

     CCoonnffiigguurraattiioonn OOSS ::
        système ELF avec X11.

     DDooccuummeennttaattiioonn ::
        Aide sensible au contexte et documentation complète au format
        HTML.  Disponible en PostScript sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Aide à l'installation incluse, support additionnel disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter softWorks pour les détails et remises.

     VVeennddeeuurr ::
        softWorks, Richard Schwaninger



      Theodor-Körnerstr.
     173 A-8010 Graz Autriche




     TTéélléépphhoonnee ::
        +43 316 686590

     FFaaxx ::
        +43 316 686590

     EE--mmaaiill ::
        risc@ping.at

     UURRLL ::
        http://members.ping.at/risc

     CCoonnttaacctt ::
        Richard Schwaninger

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  99..2255..  VViieeww DDeessiiggnnoorr//XX ((VVDDXX))


     ddeessccrriippttiioonn ::
        Générateur d'interfaces Motif qui génère 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.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Version de démonstration gratuite.  Clefs de licence payantes
        supprimant les limitations de la version de démonstration.
        Trois types de licences sont disponibles : entreprise, poste et
        étudiant.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux, ELF, X11R6, Libc.5, 5 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Aide en ligne, anglais.  Manuel PostScript, anglais. Une version
        allemande du manuel est disponible.

     SSuuppppoorrtt pprroodduuiitt ::
        Mises à jour mineures (1.x vers 1.x) gratuites.  Support e-mail
        gratuit.

     DDiissppoonniibbllee ddeeppuuiiss ::
        décembre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        DDM 800 (approximativement USD 470), Mise à jour majeure (1.x
        vers 2.x) DDM 500 (approximativement USD 295).

     VVeennddeeuurr ::
        Bredex GmbH
           Fallersleber-Tor-Wall 23 D-38100 Braunschweig Allemagne




     TTéélléépphhoonnee ::
        +49 531 24 33 00

     FFaaxx ::
        +49 531 24 33 099

     EE--mmaaiill ::
        info@bredex.de

     UURRLL ::
        http://www.bredex.de

     CCoonnttaacctt ::
        Regina Heine

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        13 octobre 1997.


  99..2266..  XXBBaassiicc


     ddeessccrriippttiioonn ::
        XBasic est un environnement de développement de programmes
        visuels intuitifs qui intègre un puissant éditeur, un
        compilateur BASIC 32/64 bits avancé, un dévermineur et les
        outils de conception d'IHM et graphique.  XBasic est entièrement
        écrit en XBasic.

     SSuuppppoorrtt ::
        InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par machine.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux (ELF 1.2.13 ou supérieur).

     DDooccuummeennttaattiioonn ::
        Manuel de plus de 300 pages (format Word).

     SSuuppppoorrtt pprroodduuiitt ::
        USD 3 par minute.

     DDiissppoonniibbllee ddeeppuuiiss ::
        janvier 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 195.

     VVeennddeeuurr ::
        Basmark Corporation


          P.O. Box 40450
          Cleveland, OH 44140
          États-Unis.

     TTéélléépphhoonnee ::
        +1 216 871 8855

     FFaaxx ::
        +1 216 871 9011

     EE--mmaaiill ::
        jgo@basmark.com

     UURRLL ::
        http://www.basmark.com

     CCoonnttaacctt ::
        Joseph G. O'Toole

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  99..2277..  XXMMoovvee 44..00 ppoouurr LLiinnuuxx


     ddeessccrriippttiioonn ::
        XMove est un paquetage logiciel de conception, prototypage et
        test d'IHM graphique de système logiciel fondé sur des valeurs à
        modification dynamique.  Le nom XMove est aussi l'abréviation de
        "X Window System Meter Object Visualization and Editing Tool"
        (Outil système X-Window de visualisation et d'édition d'objets
        de métrique - NdT : Ouf !).  Système X Window : XMove est
        totalement fondé sur le standard X Window.  XMove a été
        spécifiquement conçu pour ce standard d'IHM graphiques.  Dans de
        nombreuses applications, XMove peut être utilisé en complément
        d'OSF/Motif.  Objets de métrique : l'objet de métrique est la
        référence aux fonctions dynamiques de XMove.  A l'aide de Xmove,
        l'utilisateur peut affecter des attributs dynamiques à tout
        objet graphique en complément de la définition de son
        comportement statique.  Visualisation : indique que l'affichage
        et la manipulation des graphiques spécifiques de l'application,
        qui peuvent être conçus interactivement avec XMove, sont
        réalisés par XMove pendant l'exécution de l'application.  Outil
        d'édition : indique les possibilités interactives de création
        des éléments graphiques spécifiques de l'application statiques
        et dynamiques à l'aide des éditeurs XMove.  XMove génère le code
        C++ nécessaire pour développer l'application de manière très
        simple dans le système X-Window.  XMove est un système de
        développement graphique orienté objet.

     SSuuppppoorrtt ::
        CD-ROM, InterNet (e-mail et web).

     DDooccuummeennttaattiioonn ::
        Manuels PostScript inclus dans le paquetage.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mars 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     TTaarriiffiiccaattiioonn ((EEuurrooppee,, AAssiiee,, AAuussttrraalliiee)) ::

     ·  USD 6 000 (y compris éditeur et bibliothèques).

     ·  USD 3 500 (éditeur seul)


     ·  USD 3 500 (bibliothèques seules)

      TTaarriiffiiccaattiioonn((AAmméérriiqquuee))::

     ·  USD 5 000 (y compris éditeur et bibliothèques).

     ·  USD 3 000 (éditeur seul)

     ·  USD 3 000 (bibliothèques seules)

     VVeennddeeuurr ::
        Future Technologies


           Via B.
          Cairoli, 1 I-33170 Pordenone Italie




     TTéélléépphhoonnee ::
        +39 434 20 91 07

     FFaaxx ::
        +39 434 20 95 10

     EE--mmaaiill ::
        info@futuretg.com

     UURRLL ::
        http://www.futuretg.com

     CCoonnttaacctt ::
        Giovanni A.  Orlando

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        12 août 1997.


  1100..  EEmmuullaattiioonn


  1100..11..  EEmmuulluuss


     ddeessccrriippttiioonn ::
        Emulus est une application X-Window/Motif qui s'appuie sur
        TCP/IP pour établir une connexion vers un hôte grand système
        IBM, en émulation 3270.  Emulus supporte les graphiques grand
        système, y compris les extensions flux de données graphiques
        3270 utilisées par le logiciel grand système SAS.  Parmi les
        autres fonctionnalités, on trouve le paramétrage par des
        dialogues, une fonction de script d'enregistrement et exécution
        de sessions hôte, EasyPads (fenêtres de boutons paramétrées), et
        le copier/coller entre Emulus et d'autres applications X.
        Emulus est aussi fourni avec Helplus, un outil d'aide hypertexte
        modélisé de manière similaire à celle de WinHelp.  Il est
        utilisé pour fournir une aide en ligne à Emulus, mais peut aussi
        être utilisé pour développer une aide pour d'autres applications
        X.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par CPU.
     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2 ou supérieur, 8-16 Mo RAM, 5 Mo d'espace disque ;
        Motif lié statiquement.

     DDooccuummeennttaattiioonn ::
        Manuel imprimé, pages de man, aide en ligne, anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique de l'institut SAS.

     OOrrddrree ddee pprriixx ::
        USD 99 ; comprend la documentation imprimée et le support
        technique pour un an.

     VVeennddeeuurr ::
        SAS Institute Inc.


           SAS Campus Drive Cary, NC 27513 États-Unis.




     TTéélléépphhoonnee ::
        +1 919 677 8000

     FFaaxx ::
        +1 919 677 8166

     EE--mmaaiill ::
        saspjh@unx.sas.com

     UURRLL ::
        http://www.sas.com

     CCoonnttaacctt ::
        Phil Herold

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  1100..22..  EExxeeccuuttoorr 22


     ddeessccrriippttiioonn ::
        Executor 2 Permet à votre système Linux d'exécuter 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 démonstrations Macintosh.  Une base de
        compatibilité est disponible sur notre site web.  Executor 2
        vous permet aussi de lire et écrire les média formatés pour
        Macintosh sans perte des importantes méta-données telles que le
        type et le créateur du fichier.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Logiciel commercial avec version de démonstration limitée dans
        le temps disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux/X et Linux/SVGAlib.

     DDooccuummeennttaattiioonn ::
        Mini-manuel de 30 pages dans le coffret du CD-ROM, informations
        complémentaires disponibles sur notre site web et dans le groupe
        de nouvelles comp.emulators.mac.executor.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        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.

     OOrrddrree ddee pprriixx ::
        Prix conseillé : USD 249.  Tarif éducation : USD 149, tarif
        étudiants : USD 65.

     VVeennddeeuurr ::
        ARDI


          Suite 4-101
          1650 University Boulevard, NE
          Albuquerque, NM 87102
          États-Unis.




     TTéélléépphhoonnee ::
        +1 505 766 9115

     FFaaxx ::
        +1 505 766 5153

     EE--mmaaiill ::
        questions@ardi.com

     UURRLL ::
        http://www.ardi.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 novembre 1997.


  1100..33..  WWaabbii 22..22 ppoouurr OOppeennLLiinnuuxx


     ddeessccrriippttiioonn ::
        Caldera a porté et diffuse sous licence la technologie Wabi de
        SunSoft qui permet d'exécuter les principales applications
        Windows 3.1 sur des systèmes Linux.  Caldera Wabi 2.2 pour Linux
        peut être utilisé sur Caldera OpenLinux, un environnement
        ouvert, pour gérer à distance des application Windows 3.1 à
        domicile, au travail ou en déplacement.  Les sociétés
        partenaires qui créent des solutions clefs en mains fondées sur
        des environnements comme SCO OpenServer 5 ou Windows NT peuvent
        maintenant utiliser la solution Wabi/COL pour augmenter leurs
        revenus par la réduction du coût global et des besoins système.
        Le prix conseillé de Wabi 2.2 pour Linux est de USD 199.  Le
        produit nécessite Linux sur un processeur Intel 386 (ou
        supérieur), 16 Mo RAM (24 Mo recommandé), vidéo VGA et 10 Mo
        d'espace disque.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par utilisateur.  Ni shareware, ni FTP.
     CCoonnffiigguurraattiioonn OOSS ::
        Fonctionne sur Caldera Network Desktop et OpenLinux.

     DDooccuummeennttaattiioonn ::
        En ligne et manuel imprimé.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation de 30 jours par e-mail et téléphone.

     DDiissppoonniibbllee ddeeppuuiiss ::
        18 novembre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        47 pays dans le monde ; voir notre site web pour la liste des
        revendeurs.

     OOrrddrree ddee pprriixx ::
        USD 199 et licences additionnelles à USD 179.  Tarif étudiant
        USD 149 et licences additionnelles à USD 129.

     VVeennddeeuurr ::
        Caldera, Inc.


           633 S.
          550 E.
          Provo, UT 84606 États-Unis.




     TTéélléépphhoonnee ::
        +1 800 850 7779, +1 801 377 7687

     FFaaxx ::
        +1 801 377 8752

     EE--mmaaiill ::
        orders@caldera.com

     UURRLL ::
        http://www.caldera.com

     CCoonnttaacctt ::
        Nathan Hatch

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        14 novembre 1997.


  1111..  LLooggiicciieellss ffiinnaanncciieerrss


  1111..11..  BBBB SSttoocckk PPrroo eett BBBB SSttoocckk TTooooll


     ddeessccrriippttiioonn ::
        BB Stock Pro et BB Stock Tool sont des outils de suivi et
        d'analyse de stocks pour investisseurs.  Les fonctionnalités
        incluent la représentation de stocks, l'analyse technique, le
        timing du marché et la gestion de portefeuille.  De plus, il
        dispose d'alertes ajustables, la détection et la gestion
        automatique de scission de stocks, l'affichage écran des stocks,
        des éléments les plus actifs et des fortes variations de prix,
        d'une liste de points de contrôles personnalisée, exécution
        automatique et mise à jour aisée par InterNet soit par connexion
        directe, soit derrière un pare-feu via un serveur proxy.

     SSuuppppoorrtt ::
        InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par machine.  Une version d'évaluation gratuite de 30 jours
        est disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0 ELF.

     DDooccuummeennttaattiioonn ::
        Aide en ligne sensible au contexte, et manuel utilisateur en
        HTML, visualisable par un butineur web.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit.  Foire aux questions et réponses
        disponibles sur notre site web.

     DDiissppoonniibbllee ddeeppuuiiss ::
        Version Sun SPARC disponible depuis décembre 1993.  Version
        Linux disponible depuis avril 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis, Canada, Suède, Allemagne, Singapour, Malaisie,
        Taiwan.

     OOrrddrree ddee pprriixx ::
        Version Linux à USD 99.

     VVeennddeeuurr ::
        Falkor Technologies


           P.O.
          Box 14201 Fremont, CA 94539 États-Unis.




     TTéélléépphhoonnee ::
        +1 510 505 0700

     EE--mmaaiill ::
        skyline@falkor.com

     UURRLL ::
        http://www.falkor.com

     CCoonnttaacctt ::
        Henry Chen

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        18 mars 1997.


  1111..22..  TTiimmeeCClloocckk


     ddeessccrriippttiioonn ::
        Paquetage pointeuse de temps de travail et de visiteurs pour
        PME.  Comprend un module d'états paramétrables, une interface
        pour lecteurs barcode/cartes magnétiques et un module d'export
        de données.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par CPU, nombre d'utilisateurs illimité.

     DDooccuummeennttaattiioonn ::
        Manuel imprimé et aide en ligne HTML inclus avec le logiciel.

     SSuuppppoorrtt pprroodduuiitt ::
        Gratuit, temps de réponse habituel en 20 minutes.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        interface pour lecteurs barcode/cartes magnétiques.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1992 versions XENIX et MS-DOS version, 1994 version AIX, octobre
        1996 version Linux.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis.

     OOrrddrree ddee pprriixx ::
        USD 149.99.

     VVeennddeeuurr ::
        Quality Software Solutions, Inc.


          1322 Dodds Avenue
          Chattanooga, TN 37404
          États-Unis.




     TTéélléépphhoonnee ::
        +1 888 423 5757, +1 423 821 5757

     FFaaxx ::
        +1 423 629 0744

     EE--mmaaiill ::
        dbryson@tclock.com

     UURRLL ::
        http://www.tclock.com

     CCoonnttaacctt ::
        Donald Bryson

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  1122..  BBiibblliiootthhèèqquueess


  1122..11..  FFoonnttSSccooppee


     ddeessccrriippttiioonn ::
        Bibliothèque de rasterisation de polices type 1.  Permet aux
        utilisateurs d'échelonner, faire pivoter les caractères de
        type 1 et d'obtenir une bitmap en sortie.  Le produit inclut les
        sources complètes.
     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Licence mono-utilisateur avec le produit.  Puisque celui-ci
        inclut les sources complètes et que nos ressources sont
        limitées, 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.

     DDooccuummeennttaattiioonn ::
        Manuel joliment composé en deux colonnes au format PostScript
        fourni avec le paquetage.

     SSuuppppoorrtt pprroodduuiitt ::
        Contrats de support disponibles à la vente.

     DDiissppoonniibbllee ddeeppuuiiss ::
        15 octobre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 39,95. Les habitants de Californie sont soumis aux taxes sur
        la vente.  Prix sujet à modification sans avertissement.

     VVeennddeeuurr ::
        CurveSoft Inc.


          2053 Grant Road, Suite 555
          Los Altos, CA 94024
          États-Unis




     TTéélléépphhoonnee ::
        +1 800 563 0843, +1 510 843 6485 (ventes seulement)

     FFaaxx ::
        +1 650 254 0900

     EE--mmaaiill ::
        info@curvesoft.com

     UURRLL ::
        http://www.curvesoft.com

     CCoonnttaacctt ::
        Munagala V. S. Ramanath

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        24 octobre 1997.


  1122..22..  IINNTTEERRAACCTTEERR


     ddeessccrriippttiioonn ::
        INTERACTER est une bibliothèque de fonctions graphiques et d'IHM
        portable pour les développeurs FORTRAN.  Les programmes fondés
        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,
        fenêtres texte, formulaires, primitives graphiques, graphiques
        de présentation, impression (nombreux formats) et interface
        système d'exploitation.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et DAT 4mm.

     SSyyssttèèmmee ddee lliicceennccee ::
        Les programmes fondés sur INTERACTER peuvent être distribués
        sans royalties.  Version de démonstration Linux disponible à
        http://www.démonstrationn.co.uk/issltd.

     CCoonnffiigguurraattiioonn OOSS ::
        La version Linux supporte X Window (via Xlib), les terminaux
        graphiques ou la console Linux console (mode texte couleur).
        Nécessite g77 ou f2c.

     DDooccuummeennttaattiioonn ::
        Manuel imprimé de deux volumes en anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit illimité.  Nouvelles versions tous les
        six mois.  Mises à jour téléchargeables.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Jeu d'outils optionnel INTERACTER comprenant un générateur de
        formulaires, outil de visualisation graphique, aide en ligne,
        post-processeur d'impression et éditeur de fichiers de
        configuration.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Distributeurs en Amérique du nord, Europe et Australie.

     OOrrddrree ddee pprriixx ::
        Version Linux : USD 675 (Royaume Uni £450).

     VVeennddeeuurr ::
        Interactive Software Services Ltd.


           Westwood House Littleton Drive Huntington Staffs WS12 4TS Royaume Uni




     TTéélléépphhoonnee ::
        +44 1543 503611

     FFaaxx ::
        +44 1543 574566

     EE--mmaaiill ::
        support@issltd.démonstrationn.co.uk

     UURRLL ::
        http://www.démonstrationn.co.uk/issltd

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        1er octobre 1997.




  1122..33..  MMaattrriixx<<LLIIBB>> -- bbiibblliiootthhèèqquuee CC++++ mmaatthhéémmaattiiqquuee mmaattrriicciieellllee


     ddeessccrriippttiioonn ::
        Matrix<LIB> est une bibliothèque C++ mathématique matricielle
        compatible Matlab, conçue pour le développement 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 déjà comment
        utiliser notre bibliothèque mathématique Matrix<LIB>.  Le code a
        aussi été optimisé avec précaution pour des performances
        maximales.  Matrix<LIB> est aussi inclus dans la distribution
        MATCOM V2.  La bibliothèque inclut des opérateurs mathématiques
        complexes, binaires et unaires, de puissantes capacités
        d'indexation, du traitement de signal, des entrées/sorties
        fichiers, de l'algèbre linéaire, des opérations sur les chaînes
        et des graphiques.  Plus de 300 fonctions mathématiques sont
        incluses dans Matrix<LIB>.  MS Windows et de nombreuses plates-
        formes Unix sont supportées avec une variété de compilateurs
        C++.  Une version d'évaluation (complètement fonctionnelle,
        limitée à 30 jours) est disponible en téléchargement gratuit sur
        notre site web.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        De la licence individuelle à la licence site.  Contacter The
        MathTools pour les détails.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2, gcc 2.6.3 ou supérieur, 8 Mo de RAM, 15 Mo d'espace
        disque.

     DDooccuummeennttaattiioonn ::
        Manuels utilisateur et référence de la bibliothèque en
        différents formats (MS Word, MS Write, texte, PostScript).

     SSuuppppoorrtt pprroodduuiitt ::
        Support produit rapide par e-mail seulement.  Le section support
        de la page web donne un accès immédiat à un ensemble de
        ressources, support technique, réponses à la foire aux
        questions, documents techniques, etc.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        MathTools Accelerator : apporte un gain de performances
        significatif aux programmes Matrix<LIB> à l'aide de l'algèbre
        linéaire et des multiplications de matrices, sur un Pentium avec
        le compilateur Visual C++.

     DDiissppoonniibbllee ddeeppuuiiss ::
        novembre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 499 (version éducation pour USD 249).

     VVeennddeeuurr ::
        MathTools, Ltd.




      P.O.
     Box 855 Horsham, PA 19044-0855 États-Unis.




     TTéélléépphhoonnee ::
        +1 212 208 4476

     FFaaxx ::
        +1 888 628 4866, +1 215 957 1719

     EE--mmaaiill ::
        info@mathtools.com

     UURRLL ::
        http://www.mathtools.com

     CCoonnttaacctt ::
        Robert G.  Ford

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  1122..44..  BBiibblliiootthhèèqquuee ddee ccoommpprreessssiioonn ddee ddoonnnnééeess PPKKWWAARREE ppoouurr LLiinnuuxx


     ddeessccrriippttiioonn ::
        La bibliothèque effectue de la compression sans perte de données
        et consiste en routines de compression, extraction et contrôle
        d'erreur.  Pour conserver la flexibilité et garder la taille de
        code de la bibliothèque à un minimum, la Bibliothèque de
        compression de données PKWARE ne crée pas d'archives compatibles
        .ZIP.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par machine sans royalties.

     CCoonnffiigguurraattiioonn OOSS ::
        Intel x86, 36 ko RAM pour la compression et 13 ko RAM pour la
        décompression, 1 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Manuel imprimé de 33 pages et notes d'installation séparées en
        anglais.  Exemples de code fournies sur disque.

     SSuuppppoorrtt pprroodduuiitt ::
        Gratuit.  Support technique par téléphone, fax ou e-mail.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Aussi compatible avec FreeBSD.

     DDiissppoonniibbllee ddeeppuuiiss ::
        14 septembre 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Australie, Brésil, France, Allemagne, Inde, Italie, Allemagne,
        Pays-Bas, Japon, et Royaume Uni.

     OOrrddrree ddee pprriixx ::
        USD 450.  Remises éducation.

     VVeennddeeuurr ::
        PKWARE, Inc.


           9025 N.
          Deerwood Drive Brown Deer, WI 53223-2480 États-Unis.




     TTéélléépphhoonnee ::
        +1 414 354 8699

     FFaaxx ::
        +1 414 354 8559

     EE--mmaaiill ::
        info@pkware.com

     UURRLL ::
        http://www.pkware.com

     CCoonnttaacctt ::
        Bob Gorman

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        5 août 1997.


  1122..55..  RReeaaddyyBBaassee


     ddeessccrriippttiioonn ::
        Une bibliothèque dynamique de base de données encapsulable avec
        une API C, un module Perl et une interface Java.


     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP et web).


     SSyyssttèèmmee ddee lliicceennccee ::
        Licence commerciale.  Une démonstration gratuite de 30 jours est
        disponible.


     CCoonnffiigguurraattiioonn OOSS ::
        Noyau 2.0.x, 1 Mo de RAM.


     DDooccuummeennttaattiioonn ::
        Documentation en ligne.


     SSuuppppoorrtt pprroodduuiitt ::
        Service de mise à jour, maintenance et formation payants.


     DDiissppoonniibbllee ddeeppuuiiss ::
        mars 1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis.


     OOrrddrree ddee pprriixx ::
        USD 1295 pour 50 licences utilisateur final.


     VVeennddeeuurr ::
        Dynamical Systems, Ltd.



          175 W. Jackson Boulevard, Suite A253
          Chicago, IL 60604
          États-Unis





     TTéélléépphhoonnee ::
        +1 312 341 1755

     FFaaxx ::
        +1 312 341 1891

     EE--mmaaiill ::
        info@dynamical-systems.com

     UURRLL ::
        http://www.dynamical-systems.com

     CCoonnttaacctt::
        Gary Kuper

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        22 avril 1998



  1122..66..  SSIIMMLLIIBB IIGG


     ddeessccrriippttiioonn ::
        SIMLIB IG est une bibliothèque C.  Elle permet à l'utilisateur
        de communiquer avec un générateur d'images Evans & Sutherland
        (systèmes Liberty et ESIG) à l'aide d'un protocole Ethernet de
        base très efficace.  Il n'est pas nécessaire d'utiliser des
        opcodes, puisque SIMLIB IG fournit une API pour les
        fonctionnalités des générateurs d'images.

     SSuuppppoorrtt ::
        DAT 4mm format tar et disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.

     DDooccuummeennttaattiioonn ::
        Manuel imprimé en anglais, exemples de code source sur le
        support.

     OOrrddrree ddee pprriixx ::
        USD 2 500.

     VVeennddeeuurr ::
        KNIENIEDER Simulationstechnik
           Technologiezentrum Tirol Eduard Bodemgasse 5 A-6020 Innsbruck Autriche




     TTéélléépphhoonnee ::
        +43 512 390415 650

     FFaaxx ::
        +43 512 364000 20, +43 512 364000 30

     EE--mmaaiill ::
        office@knienieder.co.at

     CCoonnttaacctt ::
        Stephan Haidacher

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        29 septembre 1997.


  1133..  MMaatthhéémmaattiiqquueess


  1133..11..  MMaappllee VV RReelleeaassee 44 -- TThhee PPoowweerr EEddiittiioonn


     ddeessccrriippttiioonn ::
        Maple V Release 4 est le puissant système d'algèbre informatique
        utilisé par les mathématiciens, ingénieurs et scientifiques pour
        l'enseignement et la recherche.  Maple V vous permet de réaliser
        une grande quantité de calculs symboliques et numériques
        rapidement et de manière fiable.  Il inclut plus de 2 500
        fonctions mathématiques, graphiques 2D et 3D, animation, et
        plus.  Les nouvelles fonctionnalités de la Release 4 incluent le
        surlignage, les styles et hyper-liens, la notation au format
        mathématique en entrée, sortie et texte, la recherche en texte
        intégrale de la base d'aide et de nouvelles fonctions de calcul
        et traçage.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Licence d'utilisation illimité de la version acquise, licence
        flottante à tarif par utilisateur.

     CCoonnffiigguurraattiioonn OOSS ::
        Noyau Linux 2.0.0 ou supérieur, X11 R6.1 ou supérieur (pour
        exécuter les composants d'IHM X11), 12 Mo de RAM conseillés.
        Les binaires sont disponibles au format ELF seulement.

     DDooccuummeennttaattiioonn ::
        3 manuels : "Maple V - Learning Guide", "Maple V - Programming
        Guide", "The Maple V Handbook".  Aussi disponible en allemand :
        "Einführung in Maple V" et "Programmieren mit Maple V".
        Documentation et aide en anglais, une variété de manuels
        disponibles dans des langues différentes.

     SSuuppppoorrtt pprroodduuiitt ::
        Mises à jour/maintenance selon la licence, contacter le
        distributeur ou WMSI.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Bibliothèque partagée par e-mail et FTP.  Liste de diffusion
        gratuite disponible (maple_group@daisy.waterloo.edu).
     DDiissppoonniibbllee ddeeppuuiiss ::
        septembre 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis/Canada, Europe et Asie.

     VVeennddeeuurr ::
        Waterloo Maple Inc.


           450 Phillip Street Waterloo, ON N2L 5J2 Canada




     TTéélléépphhoonnee ::
        +1 519 747 2373

     FFaaxx ::
        +1 519 747 5284

     EE--mmaaiill ::
        info@maplesoft.com

     VVeennddoorr iinn AAlllleemmaaggnnee::
        Scientific Computers GmbH


           Franzstr.
          106 D-52064 Aachen Allemagne




     TTéélléépphhoonnee ::
        +49 241 47075 0

     FFaaxx ::
        +49 241 44983

     EE--mmaaiill ::
        maple@scientific.de

     CCoonnttaacctt ::
        Andreas Himmeldorf

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  1133..22..  MMAATTCCOOMM eett bbiibblliiootthhèèqquuee MMAATTCCOOMM MMAATTHH


     ddeessccrriippttiioonn ::
        MATCOM est un compilateur Matlab vers C++ et une bibliothèque
        mathématique matricielle C++.  MATCOM compile les fichiers
        source Matlab (Fichiers M) en code source C++.  Le code
        résultant est lié avec la bibliothèque de classes matricielles
        C++ fournie pour créer des exécutables autonomes ou des fichiers
        MEX.

        Le code C++ et la bibliothèque peuvent être inclus dans des
        produits, sans royalties, évitant de traduire le prototype
        algorithmique.

        Le code compilé tourne significativement plus vite que le source
        interprété originel.

        Les matrices de doubles, floats, ints et chars sont supportées,
        réduisant l'utilisation de mémoire pour de nombreuses
        applications, en particulier celles de traitement de signal et
        d'image.

        MS Windows et de nombreuses plates-formes Unix sont supportées
        avec une variété de compilateurs C++.  Une version d'évaluation
        (complètement fonctionnelle, limitée à 30 jours) est disponible
        en téléchargement gratuit sur notre site web.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        De la licence individuelle à la licence site.  Contacter The
        MathTools pour les détails.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2, gcc 2.6.3 ou supérieur, 8 Mo de RAM, 15 Mo d'espace
        disque.

     DDooccuummeennttaattiioonn ::
        Manuels utilisateur et référence de la bibliothèque en
        différents formats (MS Word, MS Write, texte, PostScript).

     SSuuppppoorrtt pprroodduuiitt ::
        Support produit rapide par e-mail seulement.  Le section support
        de la page web donne un accès immédiat à un ensemble de
        ressources, support technique, réponses à la foire aux
        questions, documents techniques, etc.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        MathTools Accelerator : apporte un gain de performances
        significatif aux programmes MATCOM à l'aide de l'algèbre
        linéaire et des multiplications de matrices, sur un Pentium avec
        le compilateur Visual C++.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 499 (version éducation pour USD 249).

     VVeennddeeuurr ::
        MathTools, Ltd.


           P.O.
          Box 855 Horsham, PA 19044-0855 États-Unis.




     TTéélléépphhoonnee ::
        +1 212 208 4476

     FFaaxx ::
        +1 888 628 4866, +1 215 957 1719

     EE--mmaaiill ::
        info@mathtools.com
     UURRLL ::
        http://www.mathtools.com

     CCoonnttaacctt ::
        Robert G.  Ford

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  1133..33..  MMaatthheemmaattiiccaa 33..00


     ddeessccrriippttiioonn ::
        Mathematica 3.0 -- connu pour fournir des solutions numériques
        et symboliques rapides et fiables -- est idéal pour la création
        d'états techniques et présentations interactifs qui incluent
        texte, formules actives, graphiques et boutons et palettes
        paramétrables.  D'importantes nouvelles fonctionnalités, comme
        un nouveau système typographique compatible mathématiques
        rendent Mathematica encore plus aisé d'utilisation.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial, CD-ROM de démonstration 30 jours pleinement
        fonctionnel.

     CCoonnffiigguurraattiioonn OOSS ::
        Noyau 1.2 ou supérieur.

     DDooccuummeennttaattiioonn ::
        The Mathematica Book 1 400 pages.  Manuel complet et fichiers
        d'aide en ligne additionnels.

     SSuuppppoorrtt pprroodduuiitt ::
        Trois niveaux de service, voir http://www.wolfram.com/service
        pour les détails.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Environ 15 paquetages applicatifs.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 1 295, remises éducation, licences site disponibles.

     VVeennddeeuurr ::
        Wolfram Research Europe Ltd


          10 Blenheim Office Park
          Lower Road
          Long Hanborough
          Oxfordshire
          OX8 8LN
          Royaume Uni




     TTéélléépphhoonnee ::
        +44 1993 883400

     FFaaxx ::
        +44 1993 883800

     EE--mmaaiill ::
        info@wolfram.co.uk

     UURRLL ::
        http://www.wolfram.co.uk

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        25 mai 1998.


  1133..44..  MMAATTLLAABB eett SSiimmuulliinnkk


     ddeessccrriippttiioonn ::
        MATLAB est un langage de hautes performances pour le calcul
        technique.  Il intègre le calcul, la visualisation et la
        programmation dans un environnement facile à utiliser dans
        lequel les problèmes et leurs solutions sont exprimées dans une
        notation mathématique familière.  MATLAB supporte le
        développement de grandes applications complexes.  Les
        fonctionnalités incluent le the M-file Performance Profiler pour
        l'optimisation algorithmique, les éditeur et dévermineur
        graphiques interactifs, et de puissants outils interactifs pour
        le traitement du signal et la conception de systèmes de
        contrôle.  Simulink est un paquetage logiciel puissant et
        interactif de modélisation, analyse et simulation de systèmes
        dynamiques.  Il fournit des simulations extrêmement fiables de
        systèmes en temps continu non-linéaires et de systèmes à
        plusieurs modes opératoires.  Les fonctionnalités incluent le
        support de l'exécution conditionnelle de sous-systèmes, des
        solveurs à l'état de l'art, des améliorations ergonomiques comme
        l'étiquetage des signaux et ports et de nouveaux blocs.

     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Utilisant les options de verrouillage par CPU GlobeTrotter
        (FLEXlm) ou flottant en réseau.  Contacter The MathWorks pour
        les détails.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.18, 32 Mo de RAM, 40 Mo d'espace disque (60 Mo avec
        tous les fichiers d'aide et la documentation).

     DDooccuummeennttaattiioonn ::
        Documentation imprimée, aide en ligne, MATLAB Reference Guide
        (HTML).

     SSuuppppoorrtt pprroodduuiitt ::
        The MathWorks supporte une variété de services autour d'InterNet
        pour fournir l'information produit et les services 24h/24.  Ces
        services donnent un accès immédiat à un ensemble de ressources,
        feuilles de données produits, support technique, réponses à la
        foire aux questions, éléments fournis par les utilisateurs,
        forums de discussion ouverts, et plus.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Extensions MATLAB : Compilateur MATLAB, Bibliothèque
        mathématique C++ MATLAB.  Boîtes à outils : Logique floue,
        traitement du signal, traitement d'image, Spline, réseau
        neuronal, système de contrôle, contrôle de robustesse, analyse
        Mu & synthèse, identification de système, optimisation,
        statistiques, finances, identification de systèmes en domaines
        de fréquences, analyse spectrale d'ordre élevé, communication,
        contrôle LMI, contrôle sur le modèle prédictif, fondation NAG,
        équation différentielle partielle, conception de contrôle QFT,
        mathématiques symboliques et mathématiques symboliques étendues,
        Wavelet.  Extensions Simulink : accélérateur Simulink,
        environnement temps réel.  Jeux de blocs : virgule fixe, DSP,
        conception de contrôle non linéaire.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juin 1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Sur demande.

     VVeennddeeuurr ::
        The MathWorks, Inc.


           24 Prime Park Way Natick, MA 01760 États-Unis.




     TTéélléépphhoonnee ::
        +1 508 647 7000 x7322

     FFaaxx ::
        +1 508 647 7002

     EE--mmaaiill ::
        efroio@mathworks.com, brian@mathworks.com

     UURRLL ::
        http://www.mathworks.com

     CCoonnttaacctt ::
        Enza Froio (marketing), Brian Bourgault (technique)

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        27 mars 1997.


  1144..  MMuullttiimmééddiiaa


  1144..11..  PPeetteerr LLiippaa eett sseess vvooyyaaggeess


     ddeessccrriippttiioonn ::
        Il s'agit d'un CD-ROM multimédia sur le jazzman bien connu Peter
        Lipa.  C'est le premier produit de la collection Voyages de
        groupes et chanteurs de la société 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 vidéo, 2 heures de
        conversation, plus de 120 photos, 10 chansons karaoké et de
        nombreuses autres informations (Journées du jazz de Bratislava,
        divers concerts partout dans le monde, apparitions TV et au
        théâtre...).  Le CD-ROM est multilingue anglais, allemand et
        slovaque.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Le programme est gratuit, les données sont soumises à licence
        par machine.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.27 ou supérieur (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.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne et description rapide des contrôles dans
        le livret du CD-ROM (anglais, allemand et slovaque).

     DDiissppoonniibbllee ddeeppuuiiss ::
        14 octobre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 30 plus frais d'envoi.  Comprend la mise à jour illimitée
        des programmes par FTP.

     VVeennddeeuurr ::
        KDK Company, Ltd.


          Vodna 8
          040 01 Kosice
          Slovaquie




     TTéélléépphhoonnee ::
        +421 95 6233335

     FFaaxx ::
        +421 95 6233336

     EE--mmaaiill ::
        linux@kdk.sk

     UURRLL ::
        http://www.kdk.sk, http://obchod.kdk.sk (magasin virtuel).

     CCoonnttaacctt ::
        Ivan Schreter

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        1er novembre 1997.


  1144..22..  LLuucckkaa VVoonnddrraacckkoovvaa eett sseess vvooyyaaggeess


     ddeessccrriippttiioonn ::
        Il s'agit d'un CD-ROM multimédia sur la jeune chanteuse et
        actrice Lucka Vondrackova.  Ce CD-ROM est multi-lingue anglais,
        slovaque et tchèque.  Le produit ne contient pas actuellement la
        version Linux du programme directement sur le CD-ROM (celle-ci
        est fournie sur une disquette supplémentaire ou peut être
        téléchargée par FTP).  Le CD-ROM contient plus de trois heures
        de musique (toutes les chansons de Lucka en entier), 9 clips
        vidéo, toutes les paroles des chansons de Lucka avec musique et
        accords de guitare, plus de 130 photos, de nombreuses interviews
        intéressantes, 10 chansons karaoké et de nombreuses autres
        informations sur Lucka.

     SSuuppppoorrtt ::
        Données multimédia sur CD-ROM, programme sur disquette ou par
        FTP.

     SSyyssttèèmmee ddee lliicceennccee ::
        Le programme est gratuit, les données sont soumises à licence
        par machine.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.27 ou supérieur (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.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne et description rapide des contrôles dans
        le livret du CD-ROM (anglais, allemand et slovaque).

     DDiissppoonniibbllee ddeeppuuiiss ::
        14 octobre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 34 plus frais d'envoi.  Comprend la mise à jour illimitée
        des programmes par FTP.

     VVeennddeeuurr ::
        KDK Company, Ltd.


          Vodna 8
          040 01 Kosice
          Slovaquie




     TTéélléépphhoonnee ::
        +421 95 6233335

     FFaaxx ::
        +421 95 6233336

     EE--mmaaiill ::
        linux@kdk.sk

     UURRLL ::
        http://www.kdk.sk, http://obchod.kdk.sk (magasin virtuel).

     CCoonnttaacctt ::
        Ivan Schreter

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        1er novembre 1997.

  1144..33..  PPeetteerr NNaaggyy eett sseess vvooyyaaggeess


     ddeessccrriippttiioonn ::
        Il s'agit d'un CD-ROM multimédia 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 supplémentaire ou peut être téléchargée par FTP).
        Le CD-ROM contient plus de quatre heures de musique
        (154 exemples de chansons, 38 chansons en entier), 9 clips
        vidéo, 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.

     SSuuppppoorrtt ::
        Données multimédia sur CD-ROM, programme sur disquette ou par
        FTP.

     SSyyssttèèmmee ddee lliicceennccee ::
        Le programme est gratuit, les données sont soumises à licence
        par machine.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.27 ou supérieur (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.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne et description rapide des contrôles dans
        le livret du CD-ROM (anglais, allemand et slovaque).

     DDiissppoonniibbllee ddeeppuuiiss ::
        14 octobre 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 34 plus frais d'envoi.  Comprend la mise à jour illimitée
        des programmes par FTP.

     VVeennddeeuurr ::
        KDK Company, Ltd.


          Vodna 8
          040 01 Kosice
          Slovaquie




     TTéélléépphhoonnee ::
        +421 95 6233335

     FFaaxx ::
        +421 95 6233336

     EE--mmaaiill ::
        linux@kdk.sk

     UURRLL ::
        http://www.kdk.sk, http://obchod.kdk.sk (magasin virtuel).

     CCoonnttaacctt ::
        Ivan Schreter

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        1er novembre 1997.


  1144..44..  MMppeegg TTVV PPllaayyeerr 11..00


     ddeessccrriippttiioonn ::
        Afficheur vidéo  et CD-vidéo temps-réel MPEG (avec audio).

     SSuuppppoorrtt ::
        InterNet

     SSyyssttèèmmee ddee lliicceennccee ::
        Partagiciel pour une utilisation personnelle sans but lucratif.
        Licences commerciales indispensables pour une utilisation
        commerciale ou gouvernementale.

     DDooccuummeennttaattiioonn ::
        Aide en ligne et manuel HTML sur le site web.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Transferts de flux vidéo au-travers de réseaux.

     OOrrddrree ddee pprriixx ::
        Licence partagiciel pour USD 10.  Licences commerciales :
        prendre contact avec MpegTV à : sales@mpegtv.com.

     VVeennddeeuurr ::
        MpegTV LLC


          90 Divisadero Street, #15
          San Francisco, CA 94117
          États-Unis.




     TTéélléépphhoonnee ::
        +1 415 864 6466

     EE--mmaaiill ::
        info@mpegtv.com

     UURRLL ::
        http://www.mpegtv.com,

     CCoonnttaacctt ::
        Tristan Savatier

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        23 décembre 1998.


  1144..55..  XXaauuddiioo


     ddeessccrriippttiioonn ::
        Reproduction sonore MP3.  (avec audio).

     SSuuppppoorrtt ::
        InterNet
     SSyyssttèèmmee ddee lliicceennccee ::
        Libre pour une utilisation personnelle sans but lucratif.
        Licences commerciales indispensables pour une utilisation
        commerciale ou gouvernementale.

     DDooccuummeennttaattiioonn ::
        Aide en ligne et manuel HTML sur le site web.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Transferts de flux audio de qualité CD au travers de réseaux.

     OOrrddrree ddee pprriixx ::
        Gratuit pour une utilisation personnelle sans but lucratif.
        Licences commerciales : prendre contact avec MpegTV à :
        sales@mpegtv.com.

     VVeennddeeuurr ::
        MpegTV LLC


          90 Divisadero str, #15
          San Francisco, CA 94117
          États-Unis.




     TTéélléépphhoonnee ::
        +1 415 864 6466

     EE--mmaaiill ::
        xaudio@mpegtv.com

     UURRLL ::
        http://www.xaudio.com,

     CCoonnttaacctt ::
        Gilles Boccon-Gibod

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        23 décembre 1998.



  1155..  SSeerrvveeuurrss ddee rréésseeaauu


  1155..11..  CCrriittiiccaall AAnnggllee XX..550000 EEnnaabblleerr


     ddeessccrriippttiioonn ::
        Critical Angle X.500 Enabler permet à un serveur de répertoires
        LDAP-seulement d'être intégré dans un service de répertoire
        X.500 tel que le répertoire PARADISE international white pages
        ou un service de répertoire d'entreprise.  Il supporte toutes
        les opérations X.500(88), y compris l'authentification.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par serveur.

     CCoonnffiigguurraattiioonn OOSS ::
        La plate-forme de référence est Red Hat Linux 3 ou supérieur
        pour Intel.
     DDooccuummeennttaattiioonn ::
        Documentation en anglais incluse.

     SSuuppppoorrtt pprroodduuiitt ::
        Souscription aux mises à jour disponible.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Licence mono-serveur pour USD 495.

        Il existe aussi (en 1997) une version spéciale, PARADISE X.500
        Enabler, exclusivement pour les universités.  Cette version
        n'inclut pas le support de l'authentification ni les opérations
        de modifications ; il est prévu seulement pour la recherche
        d'informations publiques.  Une licence mono-serveur de PARADISE
        X.500 Enabler est actuellement à USD 95.

     VVeennddeeuurr ::
        Critical Angle Inc.


           4815 W.
          Braker Lane #502-385
          Austin TX 78759
          États-Unis




     EE--mmaaiill ::
        info@critical-angle.com

     UURRLL ::
        http://www.critical-angle.com

     CCoonnttaacctt ::
        Mark Wahl

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        5 août 1997.


  1155..22..  SSeerrvveeuurr ddee nnoouuvveelllleess DDNNEEWWSS


     ddeessccrriippttiioonn ::
        DNEWS est un serveur de nouvelles NNTP avancé, complet.  Il
        convient pour les fournisseurs d'accès InterNet et les
        Intranets.  DNEWS peut être utilisé en remplacement de INN ou
        cnews et résultera généralement en des performances accrues et
        une administration fortement réduite.  Les fonctionnalités
        incluent : installation et gestion aisées, configuration des
        expirations flexible, restrictions d'accès flexibles,
        confirmation e-mail des dépôts d'articles, extensions XOVER,
        extensions de streaming , option de synchronisation dynamique,
        passerelle news vers web.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial, DNEWS est un logiciel en libre essai et peut être
        téléchargé depuis notre site web pour essai libre.

     CCoonnffiigguurraattiioonn OOSS ::
        Rien de spécial

     DDooccuummeennttaattiioonn ::
        Un manuel utilisateur est fourni au format HTML.  Aide en ligne
        incluse.

     SSuuppppoorrtt pprroodduuiitt ::
        Support par Netwin LTD.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        DNEWSWEB - passerelle news vers web.  Permet aux groupes locaux
        et Usenet d'être ajoutés à des pages HTML ordinaires, et permet
        de lire et poster dans les groupes locaux et Usenet directement
        depuis n'importe quel butineur web.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 485 (Enregistrement gratuit pour écoles et universités).

     VVeennddeeuurr ::
        Netwin LTD


           P.O Box 27574 MT Roskill Auckland Nouvelle Zélande




     FFaaxx ::
        +64 9 6300 689

     EE--mmaaiill ::
        netwin@netwinsite.com

     UURRLL ::
        http://netwinsite.com

     CCoonnttaacctt ::
        Stephen Pugmire

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  1155..33..  AAvveennttaaiill IInntteerrNNeett PPoolliiccyy MMaannaaggeerr


     ddeessccrriippttiioonn ::
        Serveur commercial SOCKS5 pour Linux avec support de multiples
        méthodes d'authentification, contrôle d'accès sophistiqué,
        filtrage de flux de données et fonctions d'audit intelligent.
        NdT : le chiffrement est soumis à autorisation spécifique en
        France.


     SSuuppppoorrtt ::
        CD-ROM et InterNet (FTP).



     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial, démonstration gratuite disponible à
        http://www.aventail.com/download.html


     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.x, 32 Mo de RAM recommandés, l'outil d'administration
        nécessite X11R6 ou supérieur.  Approximativement 14 Mo d'espace
        disque nécessaire (moins avec Perl 5.003 et Perl/Tk déjà
        installés).


     DDooccuummeennttaattiioonn ::
        Documentation en anglais disponible au format PDF ou Microsoft
        Word.


     SSuuppppoorrtt pprroodduuiitt ::
        Support technique gratuit 90 jours.  Maintenance annuelle à 20%
        du prix d'achat initial.  La maintenance inclut les mises à jour
        du produit.


     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Modules d'authentification et de filtrage permettant d'ajouter
        des fonctionnalités lors de l'exécution.


     DDiissppoonniibbllee ddeeppuuiiss ::
        novembre 1996.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        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.


     OOrrddrree ddee pprriixx ::
        IPM à partir de USD 6 495.  VPN à partir de USD 7 995.


     VVeennddeeuurr ::
        Aventail Corporation



          808 Howell Street, 2nd Floor
          Seattle, WA 98101
          États-Unis.





     TTéélléépphhoonnee ::
        +1 888 762 5785, +1 206 215 1111


     FFaaxx ::
        +1 206 215 1120


     EE--mmaaiill ::
        info@aventail.com

     UURRLL ::
        http://www.aventail.com


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        23 juin 1998.



  1155..44..  AAvveennttaaiill VVPPNN


     ddeessccrriippttiioonn ::
        Aventail VPN fonctionne sous Linux, Unix et Windows :NT.  Il se
        compose de multiples méthodes d'authentification et chiffrement,
        de contrôles d'accès sophistiqués, de filtrages intelligents et
        ne nécessite aucune modification du système 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 numérique et sécurité par
        tokens.  Les modules de chiffrement comportent DES, Triple DES
        et MD 4/5.  Les contrôles d'accès d'Aventail VPN permettent
        d'attribuer des droits aux utilisateurs selon des variables
        telles que le rôle d'un utilisateur dans une entreprise,
        l'association de groupes, la destination prévue, le type
        d'application, le type de chiffrement et/ou d'authentification,
        ou même des informations encore plus spécifiques.  Aventail VPN
        est le seul produit fonctionnant par-dessus PPTP, IPSec et L2TP.
        NdT : le chiffrement est soumis à autorisation spécifique en
        France.


     SSuuppppoorrtt ::
        CD-ROM.


     SSyyssttèèmmee ddee lliicceennccee ::
        Version d'évaluation 60 jours ; Le prix est fonction des
        connexions du serveur et de la quantité de clients.


     SSuuppppoorrtt pprroodduuiitt ::
        Garantie automatique 90 jours et support technique téléphonique.
        Un Programme Annuel de Support est disponible en option, au prix
        de 20% du prix total de licence, renouvelable chaque année.


     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1997.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        À partir de USD 6 995.  Prix en fonction du nombre de
        connexions.


     VVeennddeeuurr ::
        Aventail Corporation




     808 Howell Street, 2nd Floor
     Seattle, WA 98101
     États-Unis.





     TTéélléépphhoonnee ::
        +1 888 762 5785, +1 206 215 1111


     FFaaxx ::
        +1 206 215 1120


     EE--mmaaiill ::
        info@aventail.com


     UURRLL ::
        http://www.aventail.com


     CCoonnttaacctt ::
        Deanna Leung


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        23 juin 1998.



  1155..55..  WWaannppiippee


     ddeessccrriippttiioonn ::
        Wanpipe s'intègre dans la pile de routage Linux pour réaliser le
        routage IP ou IPX sur des réseaux à 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...???!!) intégré.  Des
        fonctions étendues de déverminage et surveillance en rendent
        l'installation et l'utilisation aisées.


     SSuuppppoorrtt ::
        InterNet (FTP).


     SSyyssttèèmmee ddee lliicceennccee ::
        Source Linux distribué librement.


     CCoonnffiigguurraattiioonn OOSS ::
        Toutes versions de Linux.


     DDooccuummeennttaattiioonn ::
        Fournie avec le source pour Linux.


     SSuuppppoorrtt pprroodduuiitt ::
        Support par Sangoma, unlimited.


     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        CSU/DSU T1 ou FT1 intégré optionnel, choix du câblage V.35,
        EIA530, X.21 ou RS232.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1995.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis, Royaume-Uni, Israël, Pologne, Canada, Allemagne,
        Corée, Chine.


     OOrrddrree ddee pprriixx ::
        USD 589 à  USD 859.


     VVeennddeeuurr ::
        Sangoma Technologies Inc.


          1001 Denison Street, Suite 101
          Markham, ON L3R 2Z6
          Canada





     TTéélléépphhoonnee ::
        +1 905 474 1990 +1 800 388 2475


     FFaaxx ::
        +1 905 474 9223


     EE--mmaaiill ::
        dm@sangoma.com


     UURRLL ::
        http://www.sangoma.com


     FFTTPP ::
        ftp://ftp.sangoma.com/pub/linux


     CCoonnttaacctt ::
        David Mandelstam


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        8 mai 1998.


  1155..66..  SSeerrvveeuurr wweebb ZZeeuuss


     ddeessccrriippttiioonn ::
        Serveur d'applications web échelonnable pour hébergement FAI
        (fournisseur d'accès InterNet), intranets et commerce
        électronique sécurisé (NdT : rappel : le chiffrement est soumis
        à autorisation préalable en France).  Support Frontpage complet,
        SSL3 128 bits mondial, compatibilité Apache, interface
        d'administration délégable centrée web.

        Le développement d'applications est en ISAPI, applets serveur
        Java et CGI.  Un Java distribué côté serveur permet une
        connectivité bases de données à hautes performances.

        Nombre de serveurs virtuels illimité avec configuration par
        groupes, statistiques temps-réel, ajustement de bande passante
        et traces étendues.


     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Une licence par machine exécutant le logiciel.  Licences
        d'évaluation de 30 jours disponibles sur notre site web.

     DDooccuummeennttaattiioonn ::
        Aide en ligne, disponible en allemand et espagnol.

     OOrrddrree ddee pprriixx ::
        Licence éducation : UKL 50. Licence commerciale : UKL 999.

     VVeennddeeuurr ::
        Zeus Technology LTD


          St Johns Innovations Centre, Cowley Road
          Cambridge, CB4 4WS
          UK




     TTéélléépphhoonnee ::
        +44 1223 42 17 27

     FFaaxx ::
        +44 1223 42 17 31

     EE--mmaaiill ::
        sales@zeustech.net

     UURRLL ::
        http://www.zeustech.net

     CCoonnttaacctt ::
        Bryan Amesbury bames@zeustech.net

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        23 décembre 1997.


  1166..  OOuuttiillss ddee bbuurreeaauu


  1166..11..  CCoorreell WWoorrddppeerrffeecctt 88



     ddeessccrriippttiioonn ::
        Wordperfect 8 for Linux Personal Edition est un traitement de
        texte de classe mondiale, natif sous Linux.  Il offre les mêmes
        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 exécutable pour
        terminaux texte et un certain nombre d'utilitaires puissants,
        comme une fusion/impression en arrière-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),  français (national et
        canadien), allemand, italien, espagnol et hollandais.




     SSuuppppoorrtt ::
        CD-ROM et InterNet (web).


     SSyyssttèèmmee ddee lliicceennccee ::
        Par machine pour Personal Edition.  Licence concurrente pour
        Server Edition.


     CCoonnffiigguurraattiioonn OOSS ::
        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 supplémentaire, 43 à 104 Mo d'espace disque (selon
        les options d'installation).  Pour les terminaux caractères,
        2 Mo de RAM pour le premier utilisateur, puis 1 Mo de RAM par
        utilisateur supplémentaire, 31 à 40 Mo d'espace disque (selon
        les options d'installation).



     DDooccuummeennttaattiioonn ::
        Documentation imprimée pour les versions graphique et mode
        caractères (environ 750 pages chacune).  Manuels disponibles en
        ligne (format Adobe Acrobat) pour la version graphique.


     SSuuppppoorrtt pprroodduuiitt ::
        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.  Compléments de support et paquetages de
        maintenance disponibles.


     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Des centaines de modules de langues (fournis par Corel) qui
        fournissent des prototypes de claviers, des dictionnaires
        orthographiques et autres outils nécessaires pour créer des
        documents dans d'autres langues.  Dictionnaires orthographiques
        médicaux (tierce partie - contacter info@sdcorp.com pour les
        détails.


     DDiissppoonniibbllee ddeeppuuiiss ::
        septembre 1998.



     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        De USD 39.95 à USD 495


     VVeennddeeuurr ::
        Software Development Corporation



          512 East 1860 South
          Provo, UT 84606
          États-Unis.





     TTéélléépphhoonnee ::
        +1 801 370 9600


     FFaaxx ::
        +1 801 370 9696


     EE--mmaaiill ::
        info@sdcorp.com


     UURRLL ::
        http://www.sdcorp.com


     CCoonnttaacctt ::
        John Gleave


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        15 août 1998.


  1166..22..  TThhee AAmmeerriiccaann HHeerriittaaggee DDiiccttiioonnaarryy DDeelluuxxee


     ddeessccrriippttiioonn ::
        Cette version attendue depuis longtemps est idéale pour les
        rédacteurs techniques, auteurs et chercheurs.  Auparavant
        disponible seulement sur PC, le produit offre la référence
        ultime pour les utilisateurs Linux, avec les définitions
        complètes de plus de 200 000 mots, plus prononciations,
        dérivations, utilisation correcte, idiomes et exemples de
        phrases.  Le Thesaurus mondialement connu de 500 000 mots de
        Roget est entièrement inclus avec le AHD.  Navigation, recherche
        par mot et par sujet, anagrammes et plus.  Licences mono-
        utilisateur, réseau, éducation et site disponibles pour Linux et
        les principales plates-formes Unix.

     SSuuppppoorrtt ::
        CD-ROM, cartouches, InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Mono-utilisateur verrouillé par noeud ou licence serveur
        (partagée).  Une démonstration unclockable gratuite est
        disponible sur notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Motif, 8-16 Mo RAM, 15 Mo d'espace disque ou lancement depuis le
        CD-ROM.

     DDooccuummeennttaattiioonn ::
        Documentation sous forme de fichier d'aide.  Anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        maintenance disponible.  Appeler DUX pour les détails.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Volumes de référence et autres langues annoncés.

     DDiissppoonniibbllee ddeeppuuiiss ::
        février 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Actuellement aux États-Unis et en Allemagne.  Néanmoins, les
        ventes sont effectuées à l'international par des copies
        unclockables FTP/web et vendues via les principales cartes de
        crédit.

     OOrrddrree ddee pprriixx ::
        USD 49.95 pour la version mono-utilisateur à verrouillage de
        noeud.  Appeler DUX ou un revendeur autorisé pour les remises
        par quantités ou les tarifs de licences site.

     VVeennddeeuurr ::
        DUX Software Corporation


           425 Sherman Avenue
          Ste 330 Palo Alto, CA 94306 États-Unis.




     TTéélléépphhoonnee ::
        +1 800 543 4999, +1 415 473 1800

     FFaaxx ::
        +1 415 462 8723

     EE--mmaaiill ::
        sales@dux.com

     UURRLL ::
        http://www.dux.com

     CCoonnttaacctt ::
        Bob Adams, Rob DuFrane

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  1166..33..  AApppplliixxwwaarree OOffffiiccee SSuuiittee ppoouurr LLiinnuuxx


     ddeessccrriippttiioonn ::
        Suite bureautique totalement graphique et totalement intégrée
        pour Linux.  Inclut traitement de texte, tableur, grapheur de
        présentation, e-mail, client base de données et logiciel de
        création HTML.  Comprend aussi Builder, un programme de
        développement rapide d'applications (RAD).

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Licence par utilisateur simultané.

     CCoonnffiigguurraattiioonn OOSS ::
        Noyau 1.2.13 ou supérieur, XFree86 3.1.2 ou supérieur, 16 Mo
        RAM, 150 Mo d'espace disque.

     DDooccuummeennttaattiioonn ::
        Manuel de mise en route.  Documentation en ligne en anglais,
        français et allemand.

     SSuuppppoorrtt pprroodduuiitt ::
        Support payant disponible.  Les utilisateurs peuvent s'inscrire
        sur la liste applixware-list@redhat.com et accéder aux archives
        et FAQ sur le site web.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Interfaces en français et allemand, dictionnaires
        internationaux.

     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Amérique du nord, Europe, Japon, Australie.

     OOrrddrree ddee pprriixx ::
        USD 99.  Mises à jour pour USD 79.

     VVeennddeeuurr ::
        Applix, Inc.


          112 Turnpike Road
          Westboro, MA 01581
          États-Unis.




     TTéélléépphhoonnee ::
        +1 508 870 0300

     EE--mmaaiill ::
        mrlinux@applix.com

     UURRLL ::
        http://linux.applixware.com

     CCoonnttaacctt ::
        Richard Manly <rmanly@applix.com>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        1er octobre 1998.


  1166..44..  DDooccuummeenntt MMaannaaggeemmeenntt SSyysstteemm DD..MM..SS..



     ddeessccrriippttiioonn ::
        Le système collecte des documents en Tiff-g4, PostScript et JPEG
        et les organise en dossiers avec des informations
        d'enregistrement comme noms et descriptions.  Le système est
        accessible par tout butineur web : visualisation, modification,
        texte intégral et fax sont fournis par une interface web.  Les
        nouveaux documents sont réalisés par simple impression.

     SSyyssttèèmmee ddee lliicceennccee ::
        Le système est installé par le vendeur sur votre machine Linux
        avec une licence serveur, clients et nombre de documents
        illimités.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 2.0.

     DDooccuummeennttaattiioonn ::
        HTML.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Intégration SQL server, capture d'impression depuis un logiciel
        d'accounting.

     OOrrddrree ddee pprriixx ::
        Sur demande.

     VVeennddeeuurr ::
        Studio LEADER Pro


           Via Pietrastretta, 76 I-38100 Trento Italie




     TTéélléépphhoonnee ::
        +39 461 828229

     FFaaxx ::
        +39 461 829826, +39 461 829877

     EE--mmaaiill ::
        DMS@leader.it

     UURRLL ::
        http://www.leader.it

     CCoonnttaacctt ::
        Guido Brugnara <brugnara@leader.it>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        19 août 1997.


  1166..55..  HHoottWWiirree EEaassyyFFAAXX


     ddeessccrriippttiioonn ::
        Programme de gestion de fax avec IHM graphique totalement
        fonctionnel.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Évaluation gratuite totalement fonctionnelle depuis notre site
        web.

     CCoonnffiigguurraattiioonn OOSS ::
        5.5 Mo d'espace disque, 4 Mo RAM.

     DDooccuummeennttaattiioonn ::
        Aide en ligne sensible au contexte.

     SSuuppppoorrtt pprroodduuiitt ::
        Par e-mail et Usenet seulement.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis/Canada (Unisource Systems, Inc.),  Allemagne/Europe
        (Delix Computer, GmbH).

     OOrrddrree ddee pprriixx ::
        USD 99.

     VVeennddeeuurr ::
        Unisource Systems, Inc.


           1409 N.
          Cove Boulevard
          Longwood, FL 32750 États-Unis.




     TTéélléépphhoonnee ::
        +1 407 834 1973

     FFaaxx ::
        +1 407 834 8013

     EE--mmaaiill ::
        sales@unisrc.com

     UURRLL ::
        http://www.unisrc.com

     CCoonnttaacctt ::
        Gary Heller

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        3 octobre 1997.


  1166..66..  NNEExxSS,, tthhee NNeettwwoorrkk EExxtteennssiibbllee SSpprreeaaddsshheeeett


     ddeessccrriippttiioonn ::
        NExS est un paquetage tableur graphique complet conçu pour tirer
        avantage des fonctionnalités avancées d'Unix et du système X
        Window.  Il inclut plus de 230 fonctions de calcul et 13 types
        de graphiques 2D et 3D pour les applications d'ingénierie,
        scientifiques et commerciales.  NExS est extensible par une API
        réseau qui permet de réaliser des modules annexes dans
        différents langages de programmation.  Le bus logiciel de NExS
        inclut 63 "prises" permettant à des processus distants de se
        connecter et d'étendre les fonctionnalités de base, ce qui
        autorise le développement d'applications réseau sophistiquées.

     SSuuppppoorrtt ::
        InterNet (FTP et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        NExS Personal Edition est mono-utilisateur et pour un seul type
        de plate-forme.  L'utilisateur peut utiliser la licence sur
        différentes machines.  La licence Professional Edition est une
        licence réseau flottante qui permet à un ensemble de licences
        d'être utilisées sur n'importe quelle plate-forme supportée de
        votre réseau.  Sans licence, NExS fonctionne en "mode
        démonstration" avec des fonctionnalités limitées.

     CCoonnffiigguurraattiioonn OOSS ::
        NExS tourne sur les noyaux Linux ELF.  Deux versions existent
        pour Linux, l'une nécessite les bibliothèques partagées Motif
        2.0, et l'autre qui inclut Motif 2.0 lié statiquement.

     DDooccuummeennttaattiioonn ::
        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
        séparément du guide de l'utilisateur, aussi en PostScript et
        HTML.  Documentation imprimée aussi disponible.  Toute la
        documentation est en anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Le support e-mail gratuit est standard.  Support téléphonique
        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.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Modules NExS et contributions utilisateurs sont disponibles à
        http://www.xess.com/plugins.html.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::

     ·  USD 149 (USD 99 éducation) pour Personal Edition

     ·  USD 249 (USD 125 éducation) pour Professional Edition

     VVeennddeeuurr ::
        X Engineering Software Systems (XESS) Corp.


           P.O.
          Box 33091 Raleigh, NC 27636 États-Unis.




     TTéélléépphhoonnee ::
        +1 800 961 7840, +1 919 387 0076

     FFaaxx ::
        +1 919 387 1302

     EE--mmaaiill ::
        info@xess.com
     UURRLL ::
        http://www.xess.com

     FFTTPP ::
        ftp://ftp.vnet.net/pub/users/xess/NExS

     CCoonnttaacctt ::
        Dave Van den Bout <devb@xess.com>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        15 mars 1997.


  1166..77..  AAxxeennee OOffffiiccee


     ddeessccrriippttiioonn ::
        La suite Axene Office inclut Xclamation (publication
        bureautique), XQuad (tableur), XAllWrite (traitement de texte)
        et XMayday (navigateur de documentation HTML).  Disponible en
        anglais, français, allemand et espagnol.


     SSuuppppoorrtt ::
        CD-ROM, cartouche et InterNet (FTP).


     SSyyssttèèmmee ddee lliicceennccee ::
        Licences poste ou flottantes.  Version de démonstration
        téléchargeable par FTP


     CCoonnffiigguurraattiioonn OOSS ::
        8 à 16 Mo de RAM, 10 Mo d'espace disque ou exécution depuis le
        CD-ROM.  Versions a.out ou ELF.


     DDooccuummeennttaattiioonn ::
        Aide en ligne HTML et documentation imprimée.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 49.


     VVeennddeeuurr ::
        Axene Inc.


          30, Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          États-Unis.






     TTéélléépphhoonnee ::
        +1 201 434 4244


     EE--mmaaiill ::
        info@axene.com


     UURRLL ::
        http://www.axene.com/english/showroom.html
        ftp://ftp.axene.com/pub


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        8 février 1998.


  1166..88..  PPrroojjeeccttoorr eett PPrroojjeeccttoorr//NNeett


     ddeessccrriippttiioonn ::
        Crée des plannings de projets et diagrammes de Gantt par analyse
        de chemin critique depuis des listes d'activités (tâches) et
        leurs durées et contraintes associées.  Projector produit des
        résultats imprimés et PRojector/Net, du HTML pour les clients
        web.


     SSuuppppoorrtt ::
        disquettes 3,5 pouces.


     SSyyssttèèmmee ddee lliicceennccee ::
        Licences mono-utilisateur et serveur.  Une version de
        démonstration est disponible en téléchargement sur notre site
        web.


     CCoonnffiigguurraattiioonn OOSS ::
        Projector nécessite Ghostscript ou une imprimante PostScript.
        Projector/Net nécessite seulement un navigateur web capable
        d'afficher des graphiques (Netscape et IE conviennent).  Les
        besoins en mémoire sont pour les deux versions (très
        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 côté client.


     DDooccuummeennttaattiioonn ::
        Contenue en entier dans le README de la distribution et les
        exemples de fichiers de description de projets (anglais).


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 200 pour Projector.  USD 2 500 pour Projector/Net.


     VVeennddeeuurr ::
        IEDU
          Morris Dovey
          1001 Office Park Road, Suite 300
          West Des Moines, IA 50265
          États-Unis.





     TTéélléépphhoonnee ::
        +1 515 225 1636


     EE--mmaaiill ::
        mrdovey@iedu.com


     UURRLL ::
        http://www.iedu.com/project


     CCoonnttaacctt ::
        Morris Dovey


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        8 mai 1998.


  1166..99..  TThhee VViirrttuuaall OOffffiiccee SSyysstteemm


     ddeessccrriippttiioonn ::
        Gestion de documents d'entreprise (GED) client/serveur à
        fonctionnalités Internet.  Numérise directement dans Linux
        depuis un client MS-Windows sans utiliser le courrier
        électronique ni FTP.


     SSuuppppoorrtt ::
        disquettes 3,5 pouces, cartouche et InterNet (FTP).


     SSyyssttèèmmee ddee lliicceennccee ::
        Client de démonstration MS-Windows gratuit disponible sur notre
        site web.  Serveur d'évaluation 30 jours disponible sur demande.


     CCoonnffiigguurraattiioonn OOSS ::
        Serveur : Linux 2.0.  Client : Ms-Windows :95 et MS-Windows NT
        Desktop.


     DDooccuummeennttaattiioonn ::
        Aide en ligne et manuel de l'administrateur imprimé.


     EElléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Archivage de fichiers MS-Windows.


     OOrrddrree ddee pprriixx ::
        USD 4995 - 5 utilisateurs, 1 numériseur, édition entreprise.



     VVeennddeeuurr ::
        CONTEXT Information Systems, Ltd.



          314 S. 2nd Street
          Oakland, MD 21550
          États-Unis.





     TTéélléépphhoonnee ::
        +1 301 334 6550


     EE--mmaaiill ::
        sales@contextis.com


     UURRLL ::
        http://www.contextis.com


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        13 juin 1998.


  1166..1100..  XXAAllllWWrriittee


     ddeessccrriippttiioonn ::
        L'application de traitement de texte Axene XAllWrite autorise la
        création de documents d'excellente qualité avec facilité, depuis
        la simple lettre à la vaste publication complexe.  Il dispose
        d'outils de gestion multi-documents, intégration d'images bitmap
        ou vectorielles, diverses possibilités de polices et l'export au
        format HTML.  Disponible en anglais, français, allemand et
        espagnol.


     SSuuppppoorrtt ::
        CD-ROM, cartouche et InterNet (FTP).


     SSyyssttèèmmee ddee lliicceennccee ::
        Licences poste ou flottantes.  Version de démonstration
        téléchargeable par FTP.


     CCoonnffiigguurraattiioonn OOSS ::
        8 à 16 Mo de RAM, 10 Mo d'espace disque ou exécution depuis le
        CD-ROM.  Versions a.out ou ELF.


     DDooccuummeennttaattiioonn ::
        Aide en ligne HTML et documentation imprimée.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.
     OOrrddrree ddee pprriixx ::
        USD 25.


     VVeennddeeuurr ::
        Axene Inc.


          30, Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          États-Unis.





     TTéélléépphhoonnee ::
        +1 201 434 4244


     EE--mmaaiill ::
        info@axene.com


     UURRLL ::
        http://www.axene.com/english/xallwrite.html
        ftp://ftp.axene.com/pub


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        8 février 1998.


  1166..1111..  AAxxeennee XXccllaammaattiioonn


     ddeessccrriippttiioonn ::
        Xclamation dispose de fonctionnalités multi-documents, multi-
        colonnes et gouttières, marques de règle magnétiques,
        intégration de texte, d'images bitmap ou vetorielles avec des
        cadres polymorphes, fonctions d'édition avancée de cadres (y
        compris logiques, zoom, contourage, rotation, fond transparent,
        etc.) et exportation de texte au format HTML.  Disponible en
        anglais, français, allemand et espagnol.


     SSuuppppoorrtt ::
        CD-ROM, cartouche et InterNet (FTP).


     SSyyssttèèmmee ddee lliicceennccee ::
        Licences poste ou flottantes.  Version de démonstration
        téléchargeable par FTP


     CCoonnffiigguurraattiioonn OOSS ::
        8 à 16 Mo de RAM, 10 Mo d'espace disque ou exécution depuis le
        CD-ROM.  Versions a.out ou ELF.


     DDooccuummeennttaattiioonn ::
        Aide en ligne HTML et documentation imprimée.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.
     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 25.


     VVeennddeeuurr ::
        Axene Inc.


          30, Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          États-Unis.





     TTéélléépphhoonnee ::
        +1 201 434 4244


     EE--mmaaiill ::
        info@axene.com


     UURRLL ::
        http://www.axene.com/english/xclamation.html
        ftp://ftp.axene.com/pub


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        8 février 1998.


  1166..1122..  XXQQuuaadd


     ddeessccrriippttiioonn ::
        Xquad présente toutes les fonctions nécessaires au calcul
        scientifique et à la présentation graphique de données
        numériques, y compris plus de 100 fonctions mathématiques,
        logiques et de manipulation de chaînes, différents types de
        graphes (de l'histogramme au radar), l'importation de fichiers
        de données externes (Texte, Excel, etc.), des outils de
        production qui permettent au texte contenu dans des cellules
        d'avoir un effet direct sur la présentation graphique.
        Disponible en anglais, français, allemand et espagnol.


     SSuuppppoorrtt ::
        CD-ROM, cartouche et InterNet (FTP).


     SSyyssttèèmmee ddee lliicceennccee ::
        Licences poste ou flottantes.  Version de démonstration
        téléchargeable par FTP.


     CCoonnffiigguurraattiioonn OOSS ::
        8 à 16 Mo de RAM, 10 Mo d'espace disque ou exécution depuis le
        CD-ROM.  Versions a.out ou ELF.


     DDooccuummeennttaattiioonn ::
        Aide en ligne HTML et documentation imprimée.


     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        USD 25.


     VVeennddeeuurr ::
        Axene Inc.


          30, Montgomery street, suite 604
          Jersey City, NJ 07302-3821
          États-Unis.





     TTéélléépphhoonnee ::
        +1 201 434 4244


     EE--mmaaiill ::
        info@axene.com


     UURRLL ::
        http://www.axene.com/english/xquad.html ftp://ftp.axene.com/pub


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        8 février 1997.


  1177..  TTrraaiitteemmeenntt ddee tteexxttee


  1177..11..  EEddiitthh PPrroo ppoouurr XX1111


     ddeessccrriippttiioonn ::
        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 disposés à passer beaucoup de temps à
        apprendre ni à configurer leur application.  Il inclut un
        butineur rapide texte-seulement avec l'accès au manuel système
        et info.

     SSuuppppoorrtt ::
        InterNet (web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Vous êtes seulement autorisé à télécharger 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 régulièrement des messages indiquant que la copie ne
        dispose pas de licence.  L'utilisation personnelle sans licence
        est autorisée, mais les organisations doivent acquérir une
        licence.

     CCoonnffiigguurraattiioonn OOSS ::
        Binaire ELF.  1 Mo est suffisant pour éditer des textes de
        taille normale.

     DDooccuummeennttaattiioonn ::
        L'aide en ligne HTML reprend entièrement le manuel imprimé.  Le
        manuel imprimé contient des illustrations qui ne sont pas dans
        l'aide en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Les mises à jour gratuites peuvent être téléchargées depuis les
        pages web de ZFC.  Les détenteurs de licence seront avisés des
        mises à jour.  Les détenteurs de licence peuvent contacter ZFC
        par e-mail pour un support immédiat.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier directement par ZFC.

     OOrrddrree ddee pprriixx ::
        NLG 70 (environ USD 35) par machine, NLG 400 (environ USD 200)
        licence site.  Remise éducation 50%.

     VVeennddeeuurr ::
        ZFC


           P.O.
          Box 15813 1001 NH Amsterdam Pays-Bas




     TTéélléépphhoonnee ::
        +31 20 4 208 248

     EE--mmaaiill ::
        zfc@zfc.nl

     UURRLL ::
        http://www.zfc.nl

     CCoonnttaacctt ::
        Annius V.  Groenink

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  1177..22..  TTeerraaSSppeellll 9977 ppoouurr EEmmaaccss


     ddeessccrriippttiioonn ::
        TeraSpell 97 pour Emacs est le correcteur orthographique
        intuitif pour Emacs qui met en valeur les mots mal orthographiés
        et effectue un contrôle à la volée de l'orthographe.  TeraSpell
        97 pour Emacs définit un nouveau standard de qualité pour les
        vérificateurs orthographiques en fournissant le système de
        correction le plus avancé disponible sur le marché.  TeraSpell
        élimine le traditionnel dialogue de correction et accélère 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 contrôler l'orthographe durant la frappe.  Dès
        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 apparaît.

     SSuuppppoorrtt ::
        InterNet (e-mail et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Version d'évaluation disponible gratuitement sur notre site web.
        Licence mono-utilisateur, 3, 5, 10, 20 utilisateurs.  Licences
        site et universités.

     CCoonnffiigguurraattiioonn OOSS ::
        Emacs 19.29.1 ou supérieur.  XEmacs 19.14 ou supérieur.

     DDooccuummeennttaattiioonn ::
        Documentation en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Support e-mail.  Mises à jour web.  FAQ sur le web.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Langues additionnelles disponibles.

     DDiissppoonniibbllee ddeeppuuiiss ::
        août 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 29,99 licence étudiant mono-utilisateur Linux.  USD 89 mono-
        utilisateur Linux, Solaris, Irix, HPUX.

     VVeennddeeuurr ::
        Teragram Corporation


           236 Huntington Avenue Boston MA 02115-4701 États-Unis.




     TTéélléépphhoonnee ::
        +1 617 369 0100

     FFaaxx ::
        +1 617 369 0101

     EE--mmaaiill ::
        info@teragram.com

     UURRLL ::
        http://www.teragram.com

     CCoonnttaacctt ::
        Yves Schabes

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        16 août 1997.

  1188..  OOuuttiillss dd''aaddmmiinniissttrraattiioonn ssyyssttèèmmee


  1188..11..  HHoosstt FFaaccttoorryy


     ddeessccrriippttiioonn ::
        Host Factory est un système de contrôle du contenu logiciel
        complet d'un parc de machines Unix.  Host Factory vous permet de
        paramétrer un système Unix prototype et de l'utiliser pour bâtir
        des centaines de systèmes similaires.  Vous pouvez effectuer des
        modifications incrémentales sur des systèmes actifs et annuler
        celles-ci si elles échouent.  Les modifications sont tracées
        dans un système de fichiers de contrôle de versions.  Host
        Factory fournit un environnement de gestion de configuration et
        de contrôle de version de hôtes complets.

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial et GPL.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée.

     SSuuppppoorrtt pprroodduuiitt ::
        e-mail.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Sur demande.  Tarifs éducation.

     VVeennddeeuurr ::
        Working Version


           31 Shea Road Cambridge, MA 02140 États-Unis.




     EE--mmaaiill ::
        bb@wv.com

     UURRLL ::
        http://www.wv.com

     CCoonnttaacctt ::
        Brian Bartholomew

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        22 juillet 1997.


  1188..22..  PPeerrffeeccttBBAACCKKUUPP++


     ddeessccrriippttiioonn ::
        PerfectBACKUP+ est un utilitaire de sauvegarde/restauration pour
        Unix/Linux.  C'est un outil de sauvegarde/restauration très
        rapide qui existe depuis 1985.  Préalablement dénommé aux États-
        Unis FASTBACK PLUS pour Unix, le pendant de l'outil DOS FASTBACK
        PLUS, il dispose maintenant d'interfaces en mode caractère et
        Motif, du support du réseau, de la compression, de la
        vérification et de la reprise, de la planification et est
        compatible aussi bien tar que cpio.  Sauvegarde tous les
        fichiers, périphériques, partitions, etc.  Et peut sauvegarder
        aussi des disques Windows, Netware et Windows NT.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, InterNet (web), DAT 4/8 mm et bientôt CD-
        ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Copie d'évaluation gratuite sur notre site web.  Manuel en ligne
        gratuit à la même adresse.  Base par CPU, utilisateurs
        illimités.

     CCoonnffiigguurraattiioonn OOSS ::
        Noyaux 1.2.x et 2.0.x,  X11R6, Motif 1.2, 3 Mo de RAM, 3 Mo
        d'espace disque.

     DDooccuummeennttaattiioonn ::
        Imprimée (188 pages), PostScript en ligne, et aide en ligne.
        Documentation en anglais, mais aide par téléphone et e-mail
        disponible aussi en espagnol.

     SSuuppppoorrtt pprroodduuiitt ::
        Supports e-mail et téléphone illimités gratuits.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Fourni avec des programmes libres PC pour lire des disquettes
        tar/cpio.  Module AutoChanger avec recyclage de cartouches.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        États-Unis, Canada, Royaume Uni, Suisse, Singapour, Malaisie,
        Allemagne.

     OOrrddrree ddee pprriixx ::
        De USD 79 à USD 499.  Linux par le Net (sans médium) à USD 79 et
        HP/UX à USD 499.  Produit complet.

     VVeennddeeuurr ::
        Unisource Systems, Inc.


           1409 North Cove Boulevard
          Longwood, FL 32750 États-Unis.




     TTéélléépphhoonnee ::
        +1 407 834 1973

     FFaaxx ::
        +1 407 834 1973

     EE--mmaaiill ::
        sales@unisrc.com

     UURRLL ::
        http://www.unisrc.com

     CCoonnttaacctt ::
        Gary Heller
     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        15 mars 1997.


  1188..33..  VVeennuuss


     ddeessccrriippttiioonn ::
        Venus est un outil d'administration distribué pour tout réseau
        bâti avec des stations Unix de différents constructeurs.  Un
        réseau Venus se présente à l'utilisateur comme un système
        informatique homogène et garantit l'accès transparent à toute
        ressource réseau.  Il fournit des outils logiciels pour les
        principales tâches de gestion de grappes, distribution
        logicielle et administration de systèmes de fichiers et
        d'utilisateurs.

     SSyyssttèèmmee ddee lliicceennccee ::
        Commercial.

     CCoonnffiigguurraattiioonn OOSS ::
        Actuellement bâti sur la distribution S.u.S.E.

     DDooccuummeennttaattiioonn ::
        Documentation imprimée, aide en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Hotline, e-mail, cours.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Sur demande.  Tarifs éducation.

     VVeennddeeuurr ::
        science + computing GmbH


           Hagellocher Weg 71 D-72070 Tübingen Allemagne




     TTéélléépphhoonnee ::
        +49 7071 9457 0

     FFaaxx ::
        +49 7071 9457 27

     EE--mmaaiill ::
        info@science-computing.de

     UURRLL ::
        http://www.science-computing.de

     CCoonnttaacctt ::
        Olaf Flebbe

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        25 février 1997.


  1199..  PPrroodduuiittss XX WWiinnddooww


  1199..11..  SSeerrvveeuurr dd''aaffffiicchhaaggee AAcccceelleerraatteedd--XX


     ddeessccrriippttiioonn ::
        Serveur d'affichage X de niveau commercial avec des
        fonctionnalités de classe station de travail comme afficheurs
        multiples, overlays, et correction gamma, FreeBSD, et Linux.  Le
        serveur Accelerated-X pilote les matériels graphiques les plus
        populaires, y compris les dernières cartes de ATI, Diamond,
        Matrox, NeoMagic, Number 9, et S3.  En tout, plus de 490
        différentes cartes sont supportées.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Par CPU.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problème connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages relié.

     SSuuppppoorrtt pprroodduuiitt ::
        Support illimité inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 États-Unis.




     TTéélléépphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        14 août 1997.

  1199..22..  BBXXwwiiddggeettss


     ddeessccrriippttiioonn ::
        BXwidgets est un jeu de widgets supplémentaire destiné
        spécifiquement au développement d'applications Motif
        commerciales.  Il inclut des widgets spéciaux pour les champs
        d'entrée tabulaires, masques, formatés et le support complet
        d'un système d'aide.  Tout a l'apparence Motif et est
        indépendant de la plate-forme.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Licence en code source.

     CCoonnffiigguurraattiioonn OOSS ::
        Tout noyau, X11R5 ou X11R6, Motif 1.1 or Motif 1.2.

     DDooccuummeennttaattiioonn ::
        Environ 250 pages de documentation avec exemples.  Quelques
        programmes de démonstration.

     SSuuppppoorrtt pprroodduuiitt ::
        Support et service de mise à jour disponible (DDM 1 200; environ
        USD 750)

     DDiissppoonniibbllee ddeeppuuiiss ::
        1992.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Allemagne, Royaume Uni et États-Unis.

     OOrrddrree ddee pprriixx ::
        DDM 1 600 (environ USD 1 000) pour une licence complète source.

     VVeennddeeuurr ::
        BREDEX GmbH


           Fallersleber-Tor-Wall 23 D-38100 Braunschweig Allemagne




     TTéélléépphhoonnee ::
        +49 531 24 33 0 0

     FFaaxx ::
        +49 531 24 33 0 99

     EE--mmaaiill ::
        info@bredex.de

     UURRLL ::
        http://www.bredex.de

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        3 novembre 1997.


  1199..33..  BBXXwwiiddggeettss//DDBB



     ddeessccrriippttiioonn ::
        BXwidgets/DB est un jeu de widgets supplémentaire pour l'accès
        aux bases de données relationnelles.  Les données peuvent être
        automatiquement demandées sur la base de données, affichées en
        différents formats, modifiées et stockées dans la base.  Toutes
        les applications bâties avec BXwidgets/DB sont indépendantes de
        la base de données.  L'accès à la base de données est réalisé
        par des serveurs transactionnels.  Serveur transactionnel et
        base de données peuvent résider sur d'autres hôtes du réseau.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par système d'exploitation, sans restriction d'utilisation.
        Licence d'évaluation disponible.

     CCoonnffiigguurraattiioonn OOSS ::
        X11R5 et Motif 1.2.

     DDooccuummeennttaattiioonn ::
        Manuel imprimé en anglais.

     SSuuppppoorrtt pprroodduuiitt ::
        Support et service de mise à jour disponible.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1996.

     OOrrddrree ddee pprriixx ::
        DDM 4 900 (environ USD 2 900).

     VVeennddeeuurr ::
        BREDEX GmbH


           Fallersleber-Tor-Wall 23 D-38100 Braunschweig Allemagne




     TTéélléépphhoonnee ::
        +49 531 24 33 0 0

     FFaaxx ::
        +49 531 24 33 0 99

     EE--mmaaiill ::
        info@bredex.de

     UURRLL ::
        http://www.bredex.de

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        3 novembre 1997.


  1199..44..  SSeerrvveeuurr ggrraapphhiiqquuee ddee ppoorrttaabbllee AAcccceelleerraatteedd--XX


     ddeessccrriippttiioonn ::
        Serveur d'affichage X de niveau commercial avec des
        fonctionnalités de classe station de travail comme afficheurs
        multiples, overlays, et correction gamma, FreeBSD, et Linux.  Le
        serveur Accelerated-X pilote les matériels graphiques les plus
        populaires, y compris les dernières cartes de Dell, IBM,
        Toshiba, et Neo Magic.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Par CPU.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problème connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages relié.

     SSuuppppoorrtt pprroodduuiitt ::
        Support illimité inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 États-Unis.




     TTéélléépphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        14 août 1997.


  1199..55..  MMaaXXiimmuumm ccddee DDeevveellooppeerr''ss EEddiittiioonn vv11..00


     ddeessccrriippttiioonn ::
        Un bureau réseau complet qui permet aux administrateurs
        d'intégrer des PC standard dans des réseaux Unix existants avec
        une meilleure internationalisation et les mêmes fonctionnalités
        que sur des stations plus chères.  Inclut aussi des outils de
        développement.

     SSuuppppoorrtt ::
        CD-ROM.
     SSyyssttèèmmee ddee lliicceennccee ::
        Par CPU.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problème connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages relié pour Accelerated-X et manuel de
        300 pages relié pour CDE.

     SSuuppppoorrtt pprroodduuiitt ::
        Support illimité inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 États-Unis.




     TTéélléépphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        14 août 1997.


  1199..66..  SSeerrvveeuurr dd''aaffffiicchhaaggee MMuullttii--ttêêtteess AAcccceelleerraatteedd--XX


     ddeessccrriippttiioonn ::
        Serveur d'affichage X de niveau commercial avec des
        fonctionnalités de classe station de travail comme afficheurs
        multiples, overlays, et correction gamma pour FreeBSD et Linux.
        Le serveur Accelerated-X pilote les matériels graphiques les
        plus populaires, y compris les dernières cartes de
        Colorgraphics, STB, et Matrox.  En tout, plus de 10 cartes
        différentes supportées.


     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Par CPU.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problème connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages relié.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 États-Unis.




     TTéélléépphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        14 août 1997.


  1199..77..  SSeerrvveeuurr dd''aaffffiicchhaaggee OOppeennGGLL AAcccceelleerraatteedd--XX


     ddeessccrriippttiioonn ::
        Serveur d'affichage X de niveau commercial avec des
        fonctionnalités de classe station de travail comme afficheurs
        multiples, overlays, et correction gamma pour FreeBSD et Linux.
        Le serveur Accelerated-X pilote les matériels graphiques les
        plus populaires, y compris les dernières cartes de ATI, Diamond,
        Matrox, NeoMagic, Number 9, et S3.  La dernière version de
        OpenGL de Silicon Graphics Inc.  En tout, plus de 450 cartes
        différentes supportées.


     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Par CPU.

     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problème connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Manuel de 100 pages relié.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


           1801 Broadway, Suite 1710 Denver, CO 80202 États-Unis.




     TTéélléépphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        14 août 1997.


  1199..88..  MMoottiiff cceerrttiiffiiéé OOSSFF


     ddeessccrriippttiioonn ::
        Une licence Motif complète certifiée OSF avec environnement de
        développement.

     SSuuppppoorrtt ::
        CD-ROM.

     SSyyssttèèmmee ddee lliicceennccee ::
        Par CPU.


     CCoonnffiigguurraattiioonn OOSS ::
        Aucun problème connu avec aucune distribution Linux.

     DDooccuummeennttaattiioonn ::
        Notes de version qui incluent des références à d'excellents
        manuels de références commerciaux.

     SSuuppppoorrtt pprroodduuiitt ::
        Support d'installation inclus.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1995.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter votre revendeur local, ou Xi Graphics.

     VVeennddeeuurr ::
        Xi Graphics


          1801 Broadway,
          Suite 1710
          Denver, CO 80202
          États-Unis.




     TTéélléépphhoonnee ::
        +1 303 298 7478

     FFaaxx ::
        +1 303 298 1406

     EE--mmaaiill ::
        sales@xig.com

     UURRLL ::
        http://www.xig.com

     CCoonnttaacctt ::
        Kyle Fink

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        14 août 1997.


  2200..  AAuuttrreess llooggiicciieellss


  2200..11..  AABBAACCUUSS 44


     ddeessccrriippttiioonn ::
        Le système de contrôle de processus ABACUS 4 est un système
        logiciel par blocs destiné au contrôle de processus temps réel
        industriels et autres.


     SSuuppppoorrtt ::
        Disponible sur http://www.arosnet.se/bbab/abacus-4.980708.tar.gz


     SSyyssttèèmmee ddee lliicceennccee ::
        Licence par machine


     CCoonnffiigguurraattiioonn OOSS ::
        Testé sur Slackware 3.4, devrait fonctionner sur toute
        distribution de Linux.


     DDooccuummeennttaattiioonn ::
        Le manuel de référence est en HTML et inclus dans le produit.
        Il est consultable à :
        http://www.arosnet.se/bbab/abacusmanual/index.html


     SSuuppppoorrtt pprroodduuiitt ::
        Support e-mail.


     DDiissppoonniibbllee ddeeppuuiiss ::
        juillet 1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier


     OOrrddrree ddee pprriixx ::
        USD 1 995 par processeur, remises par quantités.


     VVeennddeeuurr ::
        McHedlund Associates


          c/o Bristol Babcock AB
          Fallhammargatan 2a
          S-72133 Västerås
          Suède





     TTéélléépphhoonnee ::
        +46 21 350450


     FFaaxx ::
        +46 21 350455


     EE--mmaaiill ::
        abacusabacus@hotmail.com abacus4@geocities.com


     UURRLL ::
        http://www.geocities.com/Eureka/Enterprises/2275/abacus4.html


     CCoonnttaacctt ::
        Franck McNamara


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        12 juillet 1998.
  2200..22..  BBBBBBSS


     ddeessccrriippttiioonn ::
        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-tâches, CD-ROM, HYDRA, Zmodem, kermit,
        BZLink, TCP/IP, vocal, fax, jeux de caractères, comptes, IRC, et
        beaucoup, beaucoup plus.  Tout ce qu'il faut pour faire un BBS !


     SSuuppppoorrtt ::
        Disquettes 3,5 pouces et InterNet (FTP et web)


     SSyyssttèèmmee ddee lliicceennccee ::
        Base par noeud. La version shareware peut être téléchargée
        depuis http://www.bbbs.net

     CCoonnffiigguurraattiioonn OOSS ::
        La version en cours, 3.33, est pour la libc5.  La prochaine
        version et la bêta en cours sont pour la libc6.


     DDooccuummeennttaattiioonn ::
        Documentation ASCII et HTML en anglais.


     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        De nombreux utilitaires tierce partie.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier


     OOrrddrree ddee pprriixx ::
        USD 60 pour une licence deux noeuds.


     VVeennddeeuurr ::
        Foobar Oy



          Paavolankatu 3 D 34
          FIN-20240 Turku
          Finlande





     TTéélléépphhoonnee ::
        +358 2 240 1513


     FFaaxx ::
        +358 2 240 7755


     EE--mmaaiill ::
        b@bbs.net

     UURRLL ::
        http://www.bbs.net


     CCoonnttaacctt ::
        Kim Heino


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        2 août 1998.



  2200..33..  CClluussttoorr


     ddeessccrriippttiioonn ::
        Clustor est un programme de gestion de vastes tâches de calcul.
        Clustor simplifie grandement les activités intenses de calculs
        classiques en exécutant de nombreuses fois le même programme
        avec des valeurs d'entrée différentes.  Clustor permet une
        augmentation de performances par la distribution des travaux sur
        le réseau et une gestion de tâches améliorée par une IHM
        agréable.

        Ciblé pour les utilisateurs qui exécutent des tâches lourdes de
        calcul, Clustor supporte toutes les phases de l'exécution de
        celles-ci : préparation, génération de travail et exécution de
        celui-ci.  Avec Clustor, les utilisateurs qui n'ont pas de
        connaissances particulières de programmation d'applications
        parallèles, tels que les scientifiques, ingénieurs et chercheurs
        sont en mesure d'utiliser la puissance d'ordinateurs en réseau.

     SSuuppppoorrtt ::
        InterNet (web).  CD-ROM optionnel.

     SSyyssttèèmmee ddee lliicceennccee ::
        Une licence de démonstration gratuite limitée en fonctionnalités
        et une autre complète limitée à 30 jours sont disponibles sur
        notre site web.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux 1.2 ou supérieur.

     DDooccuummeennttaattiioonn ::
        Site web, documentation imprimée en option.

     SSuuppppoorrtt pprroodduuiitt ::
        Support e-mail.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Fonctionnalité de suivi de charge et de partage de ressources,
        programme d'installation réseau.

     DDiissppoonniibbllee ddeeppuuiiss ::
        février 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier

     OOrrddrree ddee pprriixx ::
        À partir de USD 495.

     VVeennddeeuurr ::
        Active Tools Inc.

     246 First Street, Suite 310
     San Francisco, CA 94105
     États-Unis.




     TTéélléépphhoonnee ::
        +1 415 882 7062

     FFaaxx ::
        +1 415 680 2369

     EE--mmaaiill ::
        info@activetools.com

     UURRLL ::
        http://www.activetools.com

     CCoonnttaacctt ::
        Rok Sosic, Sergij Foski

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  2200..44..  FFoooottPPrriinnttss


     ddeessccrriippttiioonn ::
        Le premier système logiciel de hotline fondé sur le web.  Trace
        problèmes et solutions, tickets d'incidents -- toute information
        que vous devez gérer -- et la rend disponible à vos clients ou
        utilisateurs par le web.  Réside sur serveur web Unix ou NT ;
        accès indépendant de la plate-forme par n'importe quel butineur
        web.

     SSuuppppoorrtt ::
        InterNet (FTP et web).  Aussi disponibles : 3.5" disquettes et
        cartouche.

     SSyyssttèèmmee ddee lliicceennccee ::
        Évaluation gratuite disponible à http://www.unipress.com/cgi-
        bin/free_evals ou ftp://ftp.unipress.com/pub/free_evals.

        Base par utilisateur.

     CCoonnffiigguurraattiioonn OOSS ::
        Tout Linux avec un serveur web.

     DDooccuummeennttaattiioonn ::
        Manuel/aide en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        15% du prix d'achat pour maintenance et mises à jour.  Support
        technique par web et téléphone gratuit.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er janvier 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 1 995 par starter pack (logiciel serveur plus 3 licences
        utilisateur).  Les licences peuvent être groupées (par nombre
        d'utilisateurs ayant accès à votre hotline, i.e. tous vos
        clients utilisent une seule licence groupe) ou individuelles
        (les ingénieurs et administrateurs hotline doivent être
        titulaires chacun d'une licence individuelle).

     VVeennddeeuurr ::
        UniPress Software, Inc.


           2025 Lincoln Highway Edison, NJ 08817 États-Unis.




     TTéélléépphhoonnee ::
        +1 800 222 0550, +1 732 287 2100

     FFaaxx ::
        +1 732 287 4929

     EE--mmaaiill ::
        info@unipress.com

     UURRLL ::
        http://www.unipress.com/footprints

     CCoonnttaacctt ::
        Sue Glassberg <sue@unipress.com>

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        4 août 1997.


  2200..55..  AAllaaddddiinn GGhhoossttssccrriipptt


     ddeessccrriippttiioonn ::
        Interpréteur PostScript, PDF, PCL5e (2Q97), PCL5c (2Q97), et PCL
        XL.  Permet une prévisualisation sous X-Window, la conversion
        vers une demi-douzaine de formats de fichiers graphiques, et la
        sortie sur des quantités d'imprimantes.  Fonctionne dans tous
        les environnements système, pas seulement Linux et sur tout
        processeur (32- ou 64-bit) muni d'un compilateur C.  Peut
        piloter des périphériques 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 nécessaires,
        puisque le produit est libre pour les utilisateurs finaux), ni
        le support utilisateur.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces.

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par CPU en principe.  La licence inclut normalement code
        source, mises à jour, et support.

     CCoonnffiigguurraattiioonn OOSS ::
        X11R5 ou supérieur nécessaire pour la prévisualisation X-Window.
        Des modules spécifiques système sont disponibles pour Unix (y
        compris Linux), VMS, MS Windows (y compris Windows NT), OS/2, et
        Macintosh.  Le portage vers d'autres systèmes est simple :
        toutes les dépendances sont regroupées dans un seul fichier de
        typiquement moins de 10 lignes de codes.

     DDooccuummeennttaattiioonn ::
        documentation en ligne seulement, en anglais.  Actuellement en
        texte ASCII simple ; les versions texinfo et HTML sont en
        préparation.

     SSuuppppoorrtt pprroodduuiitt ::
        Normalement inclus avec la licence ; par e-mail, téléphone et
        fax.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Chaque langage d'entrée est tarifé séparément, avec une remise
        pour plusieurs langages.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1988 en logiciel libre, 1991 commercialement.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Négocié pour chaque client.

     VVeennddeeuurr ::
        Artifex Software Inc.


          454 Las Gallinas Avenue, Suite 108
          San Rafael, CA 94903
          États-Unis.




     TTéélléépphhoonnee ::
        +1 415 492 9861

     FFaaxx ::
        +1 415 492 9862

     EE--mmaaiill ::
        info@arsoft.com

     UURRLL ::
        http://www.cs.wisc.edu/~ghost/index.html

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        30 septembre 1997.


  2200..66..  MMaaggiicciiaann


     ddeessccrriippttiioonn ::
        Magician est une interface Java hautes performances pour les
        implémentations natives OpenGL permettant le développement
        d'applications OpenGL sophistiquées en Java.


     SSuuppppoorrtt ::
        CD-ROM et InterNet (WWW).


     SSyyssttèèmmee ddee lliicceennccee ::
        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 posséder
        une licence d'utilisation.  Des licences source sont aussi
        disponibles.


     CCoonnffiigguurraattiioonn OOSS ::
        Fonctionne sur Linux (libc5 et glibc).


     DDooccuummeennttaattiioonn ::
        Référence des API javadoc librement téléchargeable.  Guide du
        Programmeur librement téléchargeable.


     SSuuppppoorrtt pprroodduuiitt ::
        Support par e-mail, téléphone et fax.  Il existe des listes de
        diffusion inter-développeurs.  L'achat d'une licence
        (personnelle ou commerciale) donne la priorité d'accès au
        support.


     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Support de tous les appels OpenGL 1.1 GL et GLU.  De nombreuses
        fonctionnalités de Aux et GLUT ont aussi été transposée dans
        l'environnement Java.  Support intégré simple des vues
        multiples.  Rendement multi-thread.  Support des appels directs
        OpenGL ou des méthodes polymorphiques.


     DDiissppoonniibbllee ddeeppuuiiss ::
        10 juin 1998.


     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.


     OOrrddrree ddee pprriixx ::
        Licence individuelle : USD 35 Licence commerciale : USD 200 par
        jeu.  Prix de la licence source disponible sur demande.


     VVeennddeeuurr ::
        Arcane Technology Ltd.



          P.O. Box 3738
          Glasgow, G41 4YD
          Écosse
          Royaume-Uni





     TTéélléépphhoonnee ::
        +44 141 423 3449


     FFaaxx ::
        +44 141 423 3449


     EE--mmaaiill ::
        magician-sales@arcana.co.uk
     UURRLL ::
        http://www.arcana.co.uk/products/magician


     CCoonnttaacctt ::
        Alligator Descartes


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        12 juillet 1998.



  2200..77..  jjoouurrnnyyxx WWeebbTTiimmee


     ddeessccrriippttiioonn ::
        Un logiciel de suivi de temps et de présence fondé sur le web.
        Il est possible d'enregistrer et de ressortir les temps de
        présence d'employés partout dans le monde à l'aide de la
        puissance d'InterNet, ou dans toute votre entreprise sur votre
        intranet.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces et InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Gratuit pour les 60 premiers jours d'utilisation, USD 1 000 plus
        USD 25 par utilisateur ensuite.

     CCoonnffiigguurraattiioonn OOSS ::
        Fonctionne sur toute version de Linux.

     DDooccuummeennttaattiioonn ::
        Toute la documentation est en ligne au format HTML et incluse
        avec le produit.

     SSuuppppoorrtt pprroodduuiitt ::
        15% du prix d'achat par année.

     ÉÉlléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Fonctionne avec tout navigateur, y compris ceux en mode texte
        comme lynx.  Export aisé de données vers Microsoft Excel ou
        Quickbooks.  Serveur web et moteur de base de données gratuits
        inclus dans le paquetage.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1er août 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        De USD 1 000 à USD 10 000

     VVeennddeeuurr ::
        journyx


          6716 Beauford Drive
          Austin, TX 78750
          États-Unis.




     TTéélléépphhoonnee ::
        +1 512 345 8282

     FFaaxx ::
        +1 512 342 9379

     EE--mmaaiill ::
        info@journyx.com

     UURRLL ::
        http://journyx.com

     CCoonnttaacctt ::
        Curt Finch

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        24 octobre 1997.


  2200..88..  LLaannSSaaffee


     ddeessccrriippttiioonn ::
        LanSafe III est une application de gestion d'onduleur.  Elle
        fournit les fonctionnalités d'arrêt automatique correct en cas
        de panne de courant de longue durée qui risque de dépasser 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 définies par
        l'utilisateur.

     SSyyssttèèmmee ddee lliicceennccee ::
        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 ;

     ·  PowerWorksÃ30 ;

     ·  PowerWorksÃ40 ;

     ·  séries 9 000 ;

     ·  séries 10 000.

        Il est aussi possible d'acquérir une licence séparée pour
        l'utilisation avec un des modèles pré-cités ou des onduleurs
        d'autres constructeurs.


     CCoonnffiigguurraattiioonn OOSS ::
        Linux noyau 2.0.  Les interfaces sont fournies pour X/Motif et
        en mode caractère.

     DDooccuummeennttaattiioonn ::
        Aide et manuel en ligne.

     SSuuppppoorrtt pprroodduuiitt ::
        Disponible.

     EElléémmeennttss eett ppoossssiibbiilliittééss ssuupppplléémmeennttaaiirreess ::
        Support d'onduleurs d'autres marques.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1997.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 149.

     VVeennddeeuurr ::
        Exide Electronics


          8609 Six Forks Road
          Raleigh, NC 27615
          États-Unis.




     VVeennddeeuurr ((EEuurrooppee,, mmooyyeenn--oorriieenntt,, AAffrriiqquuee)) ::
        Exide Electronics S.A.


          MPL House, Prescott Road
          Poyle, Colnbrook
          Berkshire, SL3 0AE
          Royaume Uni




     TTéélléépphhoonnee ::
        +1 800 554 3448, +1 919 872 3020, +44 1753 686200

     FFaaxx ::
        +1 800 75 EXIDE, +44 1753 686827

     EE--mmaaiill ::
        info@exide.com, mailto:info@deltecpower.com,
        mailto:sales_support@exide.co.uk,

     UURRLL ::
        http://www.exide.com, http://www.deltecpower.com,
        http://www.fpsUPS.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        12 õctobre 1997.


  2200..99..  LLjjeettMMggrr


     ddeessccrriippttiioonn ::
        Les imprimantes Hewlett-Packard (aussi bien laser que jet
        d'encre) disposent d'un jeu étendu d'options configurables.  Ces
        options sont normalement configurées pas le panneau frontal de
        l'imprimante.

        Les options principales sont :

     ·  mode économique pour économiser du toner ;

     ·  mode économie d'énergie ;

     ·  sélection de format de page ;

     ·  police/jeu de caractères et sélection de langue.

        Avec LjetManager il est possible de modifier ces options
        directement à l'écran.  C'est particulièrement pratique pour les
        imprimantes sans panneau frontal (comme la LaserJet 5L) ou si
        l'on dispose de plusieurs imprimantes.

        LjetManager présente une IHM graphique, internationalisable et
        est fourni avec une documentation et des pages d'aide au format
        HTML.

     SSuuppppoorrtt ::
        disquettes 3,5 pouces, InterNet (e-mail et web).

     SSyyssttèèmmee ddee lliicceennccee ::
        Une version de démonstration 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.

     CCoonnffiigguurraattiioonn OOSS ::
        Nécessite une imprimante qui supporte PJL.  Disponible pour
        Linux sur Intel.

     DDooccuummeennttaattiioonn ::
        Aide contextuelle complète et documentation au format HTML.  Une
        version PostScript est disponible sur demande.

     SSuuppppoorrtt pprroodduuiitt ::
        Le tarif inclut le support d'installation et une année de mises
        à jour gratuites.  Support additionnel disponible sur demande.

     DDiissppoonniibbllee ddeeppuuiiss ::
        mai 1996.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        Contacter softWorks pour les tarifs actuels.  Remises éducation.

     VVeennddeeuurr ::
        softWorks, Richard Schwaninger


           Theodor-Körnerstr.
          173 A-8010 Graz Autriche




     TTéélléépphhoonnee ::
        +43 316 686590

     FFaaxx ::
        +43 316 686590

     EE--mmaaiill ::
        risc@ping.at

     UURRLL ::
        http://members.ping.at/risc

     CCoonnttaacctt ::
        Richard Schwaninger

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        7 août 1997.


  2200..1100..  SSyynncchhrroonniizzee//CCyybbeerrSScchheedduulleerr


     ddeessccrriippttiioonn ::
        Logiciel d'ordonnancement pour réseaux locaux, étendus et
        intranets.

     SSuuppppoorrtt ::
        InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Base par utilisateur.

     CCoonnffiigguurraattiioonn OOSS ::
        Linux.

     DDooccuummeennttaattiioonn ::
        Jetez un coup d'oeil à notre site web.

     DDiissppoonniibbllee ddeeppuuiiss ::
        1989.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.

     OOrrddrree ddee pprriixx ::
        USD 100 par utilisateur.

     VVeennddeeuurr ::
        Crosswind Technologies, Inc.


          1505 Ocean street, Suite 1
          Santa Cruz, CA 95060
          États-Unis




     TTéélléépphhoonnee ::
        +1 408 469 1780

     FFaaxx ::
        +1 408 469 1750

     EE--mmaaiill ::
        info@crosswind.com

     UURRLL ::
        http://www.crosswind.com
     CCoonnttaacctt ::
        Anne Becker

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        13 novembre 1997.


  2211..  LLooggiicciieell lliibbrree ppoouurr mmaattéérriieell ccoommmmeerrcciiaall

  Cette section recouvre le logiciel libre (e.g. pilotes) pour des
  matériels spécialisés.

  2211..11..  CCaarrtteess sséérriiee mmuullttii--ppoorrttss SSttaalllliioonn TTeecchhnnoollooggiieess


     ddeessccrriippttiioonn ::
        Stallion fournit un support Linux pour ses gammes de cartes
        multi-ports EasyIO et EasyConnection.  EasyIO est disponible
        soit avec 4 ports série asynchrone avec connecteurs RJ45, soit 8
        ports série asynchrone avec connecteurs RJ45 ou DB25.  EasyIO
        supporte des vitesses de transfert jusqu'à 145 kbps ou 460 kbps
        par port (selon le modèle) et la signalisation modem complète.
        Des pilotes sont disponibles pour de nombreux systèmes sur
        Intel, y compris Linux.  EasyIO est disponible pour le bus ISA.

        EasyConnection est une solution multi-ports extensible qui
        fournit 8 à 64 ports série asynchrone par incréments de 8 ou 16
        ports.  Les connecteurs RJ45 et DB25 sont disponibles.  Les
        fonctions incluent la suppression des surtensions, la
        signalisation modem complète 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.

     SSuuppppoorrtt ::
        InterNet (FTP).

     SSyyssttèèmmee ddee lliicceennccee ::
        Le pilote Linux est disponible gratuitement et est couvert par
        la Licence Publique Générale GNU (GPL).  Le code source est
        fourni.

     CCoonnffiigguurraattiioonn OOSS ::
        Le pilote le plus courant supporte toutes les versions de noyau
        2.0.x.  Les pilotes sont mis à jour régulièrement pour rester en
        concordance avec les modifications de noyaux.

     DDooccuummeennttaattiioonn ::
        Documentation de référence matérielle fournie avec les cartes.
        Le paquetage pilote Linux contient un fichier README avec les
        informations d'installation et d'utilisation.

     SSuuppppoorrtt pprroodduuiitt ::
        Stallion Technologies supporte maintenant complètement les
        pilotes Linux pour cartes Stallion.  Les mises à jour
        logicielles sont disponibles sur InterNet.  Stallion fournit
        aussi le support technique pour le matériel.  Contacter support
        Stallion pour toute assistance.

     DDiissppoonniibbllee ddeeppuuiiss ::
        octobre 1994.

     PPaayyss ddee ddiissttrriibbuuttiioonn ::
        Monde entier.  Disponible dans de nombreux pays.

     OOrrddrree ddee pprriixx ::
        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.

     VVeennddeeuurr ::
        Stallion Technologies Pty Ltd.


           2880 Research Park Drive, Suite 160 Soquel, CA 95073 États-Unis.




     TTéélléépphhoonnee ::
        +1 800 347 7979

     FFaaxx ::
        +1 408 477 0444

     EE--mmaaiill ::
        info@stallion.com

     UURRLL ::
        http://www.stallion.com

     FFTTPP ::
        ftp://ftp.stallion.com

     DDeerrnniièèrree mmooddiiffiiccaattiioonn ::
        30 septembre 1997.




































  traduction $Révision: 1.2 $ du 18 décembre 1998 Configura­
  tion HOWTO (en français)
  Guido Gonzato <mailto:guido@ibogfs.cineca.it> (traduit en
  français par Basile Starynkévitch <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 réglages fins
  de votre système Linux nouvellement installé. Vous trouverez ici un
  jeu de configurations pour les applications les plus courantes, de
  façon à pouvoir bien travailler sur un système agréable à utiliser.
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 Pourquoi ce HOWTO
     1.2 Ce que nous allons configurer

  2. Configuration générale du système

     2.1 Clavier
     2.2 À propos du noyau
     2.3 Blocage de
     2.4 Optimisation des disques durs
     2.5 Lecteur Zip sur port parallèle
     2.6 Pilotes de périphériques
     2.7 Messages de démarrage
     2.8 Nom de machine
     2.9 La souris
     2.10 Répertoires 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 Système de Fenêtrage X
     3.12 Fortran
     3.13 Configurations utilisateurs
     3.14 Mise à jour

  4. Fin

     4.1 Copyright
     4.2 Réactions
     4.3 Décharge


  ______________________________________________________________________



  11..  IInnttrroodduuccttiioonn

  11..11..  PPoouurrqquuooii ccee HHOOWWTTOO

  J'ai installé Linux sur de nombreux PC, et j'ai noté que les
  distributions actuelles sont formidables, mais, hélas, manquent
  souvent de configurations même les plus simples. La plupart des
  programmes fonctionnent dès le départ, mais pas tous. De plus, j'ai
  remarqué que les mêmes questions reviennent sans cesse sur
  comp.os.linux.setup.

  Pour essayer de remédier à cette situation, et pour avoir un aide-
  mémoire 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 décrits dans ce HOWTO dépendent dans une
  certaine mesure de la distribution utilisée. Je n'ai accès 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 façon.


  11..22..  CCee qquuee nnoouuss aalllloonnss ccoonnffiigguurreerr

  Il peut y avoir beaucoup de configurations matérielles pour un PC,
  mais d'après moi voici la plus fréquente: 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 parallèle
  est également de plus en plus courant.

  C'est le matériel 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!


  22..  CCoonnffiigguurraattiioonn ggéénnéérraallee dduu ssyyssttèèmmee

  22..11..  CCllaavviieerr

  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 adéquate dans /usr/lib/kbd/keytables/;
     par exemple, fr-latin1.map y désigne le clavier français Azerty.

  ·  Editer le fichier /etc/sysconfig/keyboard pour qu'il contienne:

     KEYTABLE="/usr/lib/kbd/keytables/fr-latin1.map"



  ·  Pour configurer le taux de répétition et le délai 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 redémarrage, votre clavier fonctionnera convenablement.
  Pour recharger la configuration du clavier sans avoir à réinitialiser
  la machine, placez-vous dans /etc/rc.d/init.d et tapez la commande
  ./keytable start.





  22..22..  ÀÀ pprrooppooss dduu nnooyyaauu

  À mon avis, la première chose à faire ensuite est la fabrication d'un
  noyau bien adapté à votre système. C'est très simple à faire, mais,
  quoi qu'il en soit consultez le fichier README dans  </usr/src/linux/>
  ou le Kernel-HOWTO. Quelques conseils :


  ·  déterminez précisément 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, plutôt que de reconfigurer et
     recompiler tous les mois; ceci est particulièrement vrai si votre
     machine Linux est un serveur. N'oubliez pas d'inclure le support de
     tout matériel que vous envisagez d'ajouter plus tard (SCSI, Zip,
     cartes réseau, etc);

  ·  si votre PC est équipé d'un processeur Cyrix, appliquez les
     rustines appropriées pour en améliorer les performances. Voir
     <http://www.linuxhq.com/patch/20-p0591.html> ;

  ·  les utilisateurs de portables voudront améliorer la lisibilité de
     leur écran LCD en appliquant la rustine noblink. La dernière
     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 série 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 nécessaires
     (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 trouvés, ç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 idée est de sauvegarder votre configuration dans
     un fichier que vous garderez dans un endroit sûr.



  22..33..  BBllooccaaggee ddee sseennddmmaaiill

  Sur certains systèmes, sendmail bloque la machine au démarrage.
  Vérifiez que votre fichier /etc/hosts contient une ligne



       127.0.0.1 localhost






  22..44..  OOppttiimmiissaattiioonn ddeess ddiissqquueess dduurrss

  Vous pouvez énormément améliorer 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.



  22..55..  LLeecctteeuurr ZZiipp ssuurr ppoorrtt ppaarraallllèèllee

  Pour utiliser la version sur port parallèle du lecteur Zip, vous
  pouvez utiliser le pilote par défaut qui se trouve dans les noyaux
  2.x.x récents. 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 même port
  parallèle.

  Les disquettes Zip sont vendues pré-formatées 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 deuxième ligne dans /etc/rc.d/rc.sysinit). Vous pouvez aussi y
  accéder 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>



  22..66..  PPiillootteess ddee ppéérriipphhéérriiqquueess

  Il peut manquer des périphériques en /dev/ (ou des liens vers les
  véritables périphériques). Vérifiez à quoi correspondent vos souris,
  modems, et lecteur de CDROM, puis procédez 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 désirez, faites un chmod 666 sur ces périphériques (les
  vrais périphériques, 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 problèmes de sécurité, mais j'en ignore les détails.
  Tout commentaire à ce propos est bienvenu.



  22..77..  MMeessssaaggeess ddee ddéémmaarrrraaggee

  Si vous souhaitez personnaliser ces messages, vérifiez si votre script
  /etc/rc.d/rc.local écrase les fichiers /etc/issue et /etc/motd; dans
  ce cas, éditez-le convenablement.



  22..88..  NNoomm ddee mmaacchhiinnee

  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




  22..99..  LLaa ssoouurriiss

  Le serveur de souris gpm est utile pour le copier/coller en mode
  console, et pour utiliser la souris dans certaines applications.
  Vérifiez 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 sûr,
  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






  22..1100..  RRééppeerrttooiirreess ddee mmoonnttaaggee

  Il est pratique d'avoir des points de montage pour la disquette et
  d'autres périphériques. Par exemple, vous pouvez procéder comme suit :



       ~#  cd /mnt
       /mnt#  mkdir a: ; mkdir floppy ; mkdir cdrom ; mkdir win ; mkdir zip




  Ceci crée des points de montage pour une disquette formatée DOS, une
  disquette formatée Ext2, un CDROM, la partition DOS, et le lecteur Zip
  du port parallèle.


  Puis éditez le fichier /etc/fstab et ajoutez y les entrées 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 périphérique dans le premier
  champ. Pour accéder 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 nécessaire depuis le noyau 2.0.34.



  22..1111..  lliilloo ((88)) eett LLooaaddLLiinn

  Beaucoup d'utilisateurs veulent que leur PC puisse faire tourner à la
  fois Linux et DOS/Windows, et veulent choisir au démarrage quel
  système utiliser. Supposons que /dev/hda1 contienne DOS/Windows,
  tandis que /dev/hda2 contienne Linux.

  Procédez 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 amorçable (bootable) la partition Linux. Cette étape devrait
  être effectuée 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 première entrée lance Linux par défaut
         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 démarrer Linux depuis DOS sans un arrêt explicite, mettez
  LOADLIN.EXE dans un répertoire (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 démarrera Linux :






  rem   linux.bat
  smartdrv /C
  loadlin c:\dos\vmlinuz root=/dev/hda2 r




  Si vous utilisez Windows 95, modifiez les propriétés de ce fichier
  pour qu'il s'exécute en mode MS-DOS.


  22..1111..11..  UUnn ccoonnsseeiill ddee pprruuddeennccee

  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 désastre, vous pourrez réinstaller 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 montée sous
  /mnt. Vous pouvez également utiliser la commande FDISK /MBR depuis une
  disquette de secours DOS.



  22..1122..  CCoonnffiigguurraattiioonn dd''iimmpprriimmaannttee

  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 déjà
  installé.


  Installer votre imprimante demande quelques étapes :

  ·  Vérifiez sur quel port parallèle elle se trouve; essayez




        ~# echo "hello, world" > /dev/lp0
        ~# echo "hello, world" > /dev/lp1


  et notez laquelle de ces 2 commandes marche.

  ·  Créer deux répertoires-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. Créez 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 exécutable par chmod 755 /var/spool/lpd/raw/filter.

  ·  Faites un filtre pour l'émulation PostScript. Créez 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 vôtre).

  ·  Enfin, ajoutez les entrées suivantes dans /etc/printcap :




       # entrées 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 forcément 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.




  33..  CCoonnffiigguurraattiioonn ddeess llooggiicciieellss

  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.


  33..11..  bbaasshh((11))

  Pour affiner le comportement de bash, voici les fichiers à éditer :


  ·  /etc/bashrc contient les alias et fonctions globales au système;

  ·  /etc/profile positionne globalement les variables d'environnement
     et lance les programmes de démarrage 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 démarrage 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 propriétés de votre système,
  comme illustré ci-dessous :


































  ______________________________________________________________________

  # /etc/profile

  # Environnement global au système et programmes de démarrage
  # Les fonctions et alias vont dans /etc/bashrc

  # Ce fichier configure globalement
  #
  #   o le chemin d'exécution (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'exécution décent

  echo $PATH | grep X11R6 > /dev/null
  if [ $? = 1 ] ; then   # ajouter des entrées 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 caractère é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 défaut 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 système
       # 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 nécessaire pour notifier les utilisateurs qu'ils se trouvent dans un shell sans login

  if [ "$GET_PS1" = "" ] ; then
    COLOUR=45
  # mettre un vrai caractère é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() # Créer 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 démarrage propres à l'utilisateur
  # Ce fichier contient des configurations définies 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 répertoires "par défaut"
  export CDPATH="$CDPATH:$HOME:$HOME/text:$HOME/text/geology"

  # pour réparer l'espace arrière 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 caractères à 8 bits (accentués)
       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   # après avoir pressé TAB
       ______________________________________________________________________





  Pour que les touches arrière (backspace) et suppr (delete)
  fonctionnent correctement dans xterm et d'autres applications X11, il
  vous faut également :


  ·  insérer ce qui suit dans votre .xinitrc :



  # dans $HOME/.xinitrc définir 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 répare votre console.

  Pour corriger xterm :

  ·  insérer 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 détails.

  N'espérez 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
  antérieures à la 2.21.


  33..22..  llss((11))

  La commande ls peut afficher les répertoires avec des couleurs pour
  différencier 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 référence à
  ce fichier de la première ligne).  Ceci positionne la variable
  d'environnement LS_COLORS selon les listes de couleurs définies dans
  /etc/DIR_COLORS. _N_o_t_e_: ne me demandez pas pourquoi, mais ça ne marche
  pas dans certaines anciennes versions de rxvt (antérieures à 2.21);
  utilisez alors xterm ou un programme similaire. Il semble que rxvt ait
  un bogue l'empêchant dans certains cas d'hériter 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"





  33..33..  lleessss((11))

  Avec cet excellent pagineur, vous pouvez visualiser non seulement des
  fichiers de texte ordinaires, mais aussi des fichiers comprimés 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 répertoire 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 crée 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

  # Préprocesseur pour 'less' utilisé quand la variable d'environnement suivante est définie
  # 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 comprimés 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` ; # Vérification 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 exécutable 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 défaut- mettez votre préféré
       LESSCHARSET=latin1              # afficher les caractères accentués
       export LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET
       ______________________________________________________________________





  La variable LESSCHARSET dépend du fait qu'on habite en Europe Occiden­
  tale, où est utilisé le jeu de caractères ISO 8859-1. Les collègues
  Américains, Japonais, Russes, etc.. devraient la configurer autrement.


  33..44..  eemmaaccss((11))

  Je n'utilise pas emacs, donc je n'ai qu'un seul conseil à vous donner.
  Certaines distributions d'emacs ne sont pas préconfigurées pour les
  couleurs et la décoration 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 découvrir comment l'adapter à vos besoins.
  Cela peut prendre des mois de bidouillage!


  33..55..  jjooee((11))

  Certaines personnes rapportent que joe fonctionne en couleurs sous
  X11, mais pas sur la console. De plus, certaines touches spéciales ne
  fonctionnent pas. À ma connaissance, personne n'a réussi à résoudre le
  premier problème; certains ont suggéré de bidouiller /etc/termcap.

  Si vous rencontrez ce problème, voici une solution rapide (et peu
  élégante):



       ~$ export TERM=vt100
       ~$ joe monfichier
          (éditez votre fichier)
       ~$ export TERM=linux





  33..66..  jjeedd((11))

  C'est mon éditeur favori; il fait ce dont j'ai besoin, mais est plus
  léger 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 répertoire-là.


  ·  pour que jed utilise correctement certaines touches, créez un
     fichier /usr/lib/jed/lib/defaults.sl dont la seule ligne est :


       () = evalfile("linux");





  ·  éditez /usr/lib/jed/lib/linux.sl : décommentez la ligne contenant
     Info_Directory = "/usr/info" et ajoutez /bin/mail après UCB_Mailer
     =

  ·  il est très 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é numérique
     pour supprimer des mots entiers au lieu d'un seul caractère,
     ajouter ceci dans .jedrc :



  unsetkey("\eOl");
  unsetkey("\eOP\eOl");
  setkey("edt_wdel", "\eOl");
  setkey("edt_uwdel", "\eOP\eOl");





  après la ligne contenant () = evalfile("edt");.

  ·  Pour que xjed utilise le pavé numérique 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 américain (Qwerty), notez que XkbDisable pose quelques petits
  problèmes. Vous les découvrirez par vous-même.

  ·  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'"abréviation" 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 abréviations fonctionnent par défaut, 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...








  33..77..  eeffaaxx ((11))

  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 particularités m'ont causé
  un gros mal de crâne:


  ·  DIALPREFIX: la simple indication de "T" ou "P" risque de ne pas
     fonctionner dans pas mal de pays. Mettez plutôt "ATDT" ou "ATDP":

  ·  INIT et RESET: ces chaînes de caractères contiennent les séquences
     d'initialisation "-i" et "-k", nécessaires à efax. Si vous voulez
     ajouter une commande AT, ajoutez la à la bonne chaîne en enlevant
     "AT" et en faisant précéder le reste de "-i" ou "-k". Par exemple,
     pour ajouter la commande "ATX3" à INIT, rajoutez "-iX3".



  33..88..  TTeeXX eett ccoommppaaggnniiee

  Je suppose que vous avez la distribution TeTeX. Quelques trucs ici :


  ·  pour configurer les motifs de césure 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, après 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 résolution par défaut déterminent aussi le
     comportement de xdvi. Si vous remarquez des créations intempestives
     de polices (fonts) à chaque exécution, ajoutez dans votre
     .Xdefaults une ligne



       XDvi*mfmode:





  Cela peut aider.



  33..99..  PPPPPP

  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 sûr, votre FAI doit
  utiliser PPP.

  Il y a dorénavant deux façons 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 numéro de téléphone 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-tête. 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 intimidés. 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-mêmes.

  Le mieux est certainement de trouver un ami déjà connecté et de
  télécharger les outils suivants:


  ·  EzPPP, un utilitaire sous X11, dont le site Internet se trouve à
     l'adresse  <http://www.serv.net/~cameron/ezppp/index.html>. Très
     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 numéro de téléphone 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 (plutôt
     naze pour l'instant) à l'adresse:
     <http://www.worldvisions.ca/wvdial>). Très sympathique.



  33..1100..  CClliieenntt PPOOPP

  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 problèmes avec la commande LAST.

  Pour configurer ces clients :


  ·  fetchpop: la première fois que vous le lancez, il vous demandera
     quelques informations. Répondez à 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 démarrer. Cet
  exemple est très rudimentaire, et suppose que sendmail tourne chez
  vous; les possibilités de configuration sont infinies. Reportez-vous à
  <http://www.ccil.org/~esr/fetchmail>.



  33..1111..  SSyyssttèèmmee ddee FFeennêêttrraaggee XX

  Une fois que vous avez réussi à faire marcher X11 (bonne carte
  graphique, etc.), il existe d'inombrables possibilités de
  configuration; cela dépend de votre gestionnaire de fenêtres (window
  manager). Dans tous les cas, il s'agit d'éditer un ou des fichier[s]
  textuel[s] de votre répertoire utilisateur. Selon le gestionnaire de
  fenêtres:


  ·  fvwm: copiez /etc/X11/fvwm/system.fvwmrc dans votre répertoire
     comme .fvwmrc; visualisez-le et commencez à expérimenter. 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 répertoire
     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 répertoire.
     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 mémoire, mais les versions
       # antérieures à la 2.21 souffrent de bogues affectant
       # les couleurs et la récupération de l'environnement.
       # Prenez une version plus récente 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





  33..1122..  FFoorrttrraann


  D'après 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).



  33..1133..  CCoonnffiigguurraattiioonnss uuttiilliissaatteeuurrss

  C'est une bonne idée de fournir aux nouveaux utilisateurs quelques
  fichiers de configurations déjà prêts à leur première 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 complètement adaptable. Vérifiez
  toutefois que les champs user-domain, smtp-server et nntp-server y
  sont corrects.






  33..1144..  MMiissee àà jjoouurr

  Si vous faites une mise à jour complète de votre machine, pensez à
  sauvegarder quelques autres fichiers auparavant, par exemple
  /etc/X11/XF86Config et /usr/bin/fax.



  44..  FFiinn

  44..11..  CCooppyyrriigghhtt

  Sauf indication contraire, les documents HOWTO Linux sont sous le
  copyright de leurs auteurs respectifs. Les documents HOWTO Linux
  peuvent être reproduits et distribués 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 encouragée; toutefois, l'auteur souhaiterait être averti de
  ces distributions.

  Toutes les traductions et oeuvres dérivées 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
  dérivée de ces HOWTO et imposer des restrictions supplémentaires à
  leur distribution; pour toute exception, veuillez contacter le
  coordinateur Linux HOWTO à l'adresse ci-dessous.

  En résumé, nous souhaitons promouvoir la diffusion de cette
  information par tous les canaux. Néanmoins, nous souhaitons conserver
  le copyright sur les documents HOWTO, et voulons être prévenus 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.



  44..22..  RRééaaccttiioonnss

  Ce document nécessite encore plus que les autres HOWTO vos souhaits,
  vos suggestions, critiques et contributions. Les réactions sont non
  seulement utiles, mais nécessaires. 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 différents ou situés dans d'autres répertoires,
  faites-le moi savoir et j'ajouterai vos astuces. Mon but est de rendre
  Linux aussi facilement utilisable que possible.

  Linux comportant un très grand nombre de logiciels, il est donc
  impossible d'en indiquer tous les pointeurs. Veuillez restreindre vos
  requêtes et suggestions aux programmes les plus raisonnables, selon
  votre bon sens.


  44..33..  DDéécchhaarrggee

  Ce Config-HOWTO a été rédigé en anglais par Guido Gonzato
  guido@ibogfs.cineca.it puis traduit en français par Basile
  Starynkévitch 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 précisement que
  possible, mais vous en utilisez l'information à vos risques et périls.
  En aucun cas je ne peux être rendu responsable des dommages résultant
  de son utilisation.
  J'espère que vous trouverez ce travail utile. Quand j'installe un
  nouveau système 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 février 1999

  Comment devenir un administrateur de DNS à la petite semaine.
  ______________________________________________________________________

  Table des matières


  1. Préambule

     1.1 Aspect juridique
     1.2 Remerciements et appel aux bonnes volontés
     1.3 Dédicace

  2. Introduction.

  3. Un Serveur de Noms qui ne sert que de cache.

     3.1 Démarrer named.
     3.2 Le rendre encore meilleur
     3.3 Félicitations !

  4. Un domaine

     4.1 Mais avant tout, un brin de théorie
     4.2 Notre propre domaine
     4.3 La zone inversée
     4.4 Précautions d'usage
     4.5 Pourquoi est-ce que les lookup inversés ne marchent pas ?
        4.5.1 La zone inverse n'est pas déléguée.
        4.5.2 Vous avez un sous-réseau sans classe

  5. Un exemple tiré d'un domaine réel

     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 Réponses

  9. Comment devenir un administrateur DNS de haut vol



  ______________________________________________________________________

  11..  PPrrééaammbbuullee

  Mots-clés : 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.




  11..11..  AAssppeecctt jjuurriiddiiqquuee

  (C)opyright 1995-1999 Nicolai Langfeldt. Ne modifiez pas ce document
  sans en modifier le message de copyright en conséquence. Vous pouvez
  distribuer ce document librement sous réserve de conserver le message
  de copyright.


  11..22..  RReemmeerrcciieemmeennttss eett aappppeell aauuxx bboonnnneess vvoolloonnttééss

  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 problèmes ainsi que de vos succès, cela me
  permettra d'améliorer ce HOWTO. Merci d'envoyer les commentaires et/ou
  les questions et même 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 reçois _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 norvégien.


  Si vous ne parlez ni l'anglais ni le norvégien, vous pouvez toujours
  envoyer vos commentaires en français au traducteur (arn_mat@club-
  internet.fr) qui fera suivre.


  Si vous voulez traduire ce HOWTO, prévenez-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.


  11..33..  DDééddiiccaaccee

  Ce HOWTO est dédié à Anne Line Norheim. Pourtant, elle ne le lira sans
  doute jamais, ce n'est pas du tout son genre.


  22..  IInnttrroodduuccttiioonn..

  CCee qquuee ccee ddooccuummeenntt eesstt eett ccee qquu''iill nn''eesstt ppaass


  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 règles
  utilisées 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 définir de telles correspondances à l'aide d'un système 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 présent ;-) une
  des parties les plus obscures de l'administration de réseau. 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 réseau par tous les services
  possibles, et en particulier pouvoir faire telnet 127.0.0.1, ce qui
  revient à vous connecter à votre propre machine (vérifiez tout de
  suite que ça marche !). Il est aussi nécessaire, pour commencer, que
  les fichiers /etc/nnswitch.conf (ou /etc/host.conf), /etc/resolv.conf
  et /etc/hosts soient correctement configurés car je n'expliquerai pas
  ici à quoi ils servent. Si tout cela n'est pas déjà 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 accéder au réseau.


  Je supposerai par la suite que vous ne vous trouvez pas derrière un
  firewall qui bloque les requêtes de résolution de nom. Si tel est le
  cas, vous aurez besoin d'une configuration spéciale. Reportez-vous
  alors au chapitre ``FAQ''.


  Le service de résolution de nom sous Unix est assuré par un programme
  appelé named. Il fait partie du paquetage ``bind'', géré 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 dernière 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 sécurité fait partie de vos
  préoccupations, vous devriez vraiment passer à bind 8.


  Le service DNS est une base de données à l'échelle du réseau tout
  entier. Faites donc très 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 cohérent et
  vous verrez qu'il vous offrira le meilleur de lui-même. Apprenez a
  l'utiliser, l'administrer, le débogger et vous ferez partie de ces
  administrateurs qui empêchent que le réseau ne s'écroule sous le poids
  des systèmes mal gérés.


  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 ;-) très bien si vous croyez ce que je vous dis.


  AAssttuuccee :: S'ils existent déjà, faites une copie de sauvegarde de tous
  les fichiers que je vous demande de modifier. Ainsi, si plus rien ne
  marche après ce que nous allons faire, vous pourrez toujours revenir
  au bon vieux temps où tout marchait bien.


  33..  UUnn SSeerrvveeuurr ddee NNoommss qquuii nnee sseerrtt qquuee ddee ccaacchhee..

  UUnn pprreemmiieerr aappeerrççuu ddee llaa ccoonnffiigguurraattiioonn dd''uunn DDNNSS,, ttrrèèss uuttiillee ppoouurr cceeuuxx
  qquuii uuttiilliisseenntt uunnee ccoonnnneexxiioonn eenn ddiiaalluupp..


  Un serveur de noms qui ne sert que de cache trouve la réponse aux
  requêtes de résolution de nom et se souvient de cette réponse chaque
  fois qu'on lui posera la même question par la suite. Cela réduira les
  temps de réponse, surtout si vous avez une connexion plutôt 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";
  };
  ______________________________________________________________________




  TTRRÈÈSS IIMMPPOORRTTAANNTT :: Dans certaines versions de ce document, les fichiers
  listés comme ci-dessus présentent un certain nombre de caractères
  espace ou tabulation avant le premier caractère non blanc de la ligne.
  Ils ne sont pas supposés faire partie du fichier. EEffffaacceezz ddoonncc ttoouuss
  lleess ccaarraaccttèèrreess bbllaannccss de début 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 répertoire. Ainsi, pz est un sous-
  répertoire de /var/named, c'est a dire /var/named/pz. D'après 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 répertoire 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 déjà ce
  ; fichier. de toutes façon, 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
  ______________________________________________________________________




  SSoouuvveenneezz--vvoouuss bbiieenn ddee ccee qquuee jj''aaii ddiitt ppoouurr lleess ccaarraaccttèèrreess bbllaannccss eenn
  ttêêttee ddee lliiggnnee !!


  Ce fichier donne une description de tous les serveurs de noms du monde
  qui se trouvent à la racine (au plus haut niveau) de la hiérarchie 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 décrit dans la page de man de named mais
  cette dernière s'adresse plus, à mon humble avis, à ceux qui savent
  déjà comment fonctionne ce programme.


  La section suivante de named.conf est la dernière partie. Elle sera
  expliquée dans un chapitre suivant, pour l'instant, créez un fichier
  appelé 127.0.0 dans le sous répertoire 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.
  ______________________________________________________________________




  Après ça, vous avez besoin d'un fichier /etc/resolv.conf qui ressemble
  à peu près à ça :


  ______________________________________________________________________
  search subdomain.your-domain.edu your-domain.edu
  nameserver 127.0.0.1
  ______________________________________________________________________




  La ligne search spécifie 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 fréquemment à 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 déjà
  nsswitch.conf, c'est celui-là que nous allons modifier, sinon ce sera
  host.conf.


  //eettcc//nnsssswwiittcchh..ccoonnff


  C'est un long fichier qui spécifie où trouver différentes sortes de
  types de données, dans quel fichier ou quelle base de données. Il
  contient généralement des commentaires précieux au début, que vous
  auriez tout intérêt à 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.


  //eettcc//hhoosstt..ccoonnff


  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 résolution de nom de regarder d'abord dans
  /etc/hosts puis de demander au serveur de noms (que vous avez précisé
  dans resolv.conf comme étant 127.0.0.1).


  33..11..  DDéémmaarrrreerr nnaammeedd..

  Après tout ça, il est temps de démarrer named. Si vous utilisez une
  connexion en dialup, commencez par vous connecter. Tapez ``ndc start''
  et appuyez sur la touche entrée, sans donner d'options. Si ça ne
  marche pas, essayez plutôt ``/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 répertoire /var/log
  ou dans le fichier syslog) tout en lançant 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'espère :-). Tuez le processus named et re-vérifiez ce
  fichier.


  Il est maintenant temps de vérifier votre configuration. Lancez
  nslookup pour regarder le résultat 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'espérons tous.
  Si vous obtenez quoi que ce soit d'autre, revenez en arrière et
  vérifiez 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 requête. 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 mentionnés dans
  root.cache et a demandé le chemin à suivre. Il peut s'écouler un
  certain temps avant que vous obteniez le résultat puisqu'il se peut
  qu'il recherche tous les domaines listés dans /etc/resolv.conf.



  Si vous réessayez, 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 accédé au réseau pour
  obtenir la réponse mais a trouvé l'information dans son cache.
  Cependant, l'information cachée _p_o_u_r_r_a_i_t ne plus être à jour. C'est
  pourquoi vous êtes informé de cette possibilité très improbable par le
  message ``Non-authoritative answer:'' Quand nslookup répond ceci la
  seconde fois qu'on lui demande un certain hôte, c'est un signe certain
  que named cache bien les informations et que tout marche. Pour sortir
  de nslookup, utilisez la commande ``exit''.


  33..22..  LLee rreennddrree eennccoorree mmeeiilllleeuurr

  Dans les grands réseaux, bien administrés, des universités ou FAI
  (Fournisseur d'Accès a Internet), vous remarquerez peut-être que les
  administrateurs réseau ont mis en place une hiérarchie de serveurs DNS
  ce qui permet de soulager le réseau interne ainsi que le réseau vers
  l'extérieur. Il n'est pas facile de savoir si vous êtes dans un réseau
  de ce type. Tout cela n'est pas très important, mais en utilisant le
  serveur DNS de votre FAI comme ``forwarder'' vous pouvez rendre les
  réponses plus rapides et alléger la charge de votre réseau. Avec un
  modem, la différence peut être sensible.  Pour améliorer 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 appelée
  ``options'' insérez les lignes :


  ______________________________________________________________________
             forward first;
             forwarders {
                  10.0.0.1;
                  10.1.0.1;
              };
  ______________________________________________________________________




  Redémarrez votre serveur de noms et testez avec nslookup. Cela devrait
  marcher sans problèmes.


  33..33..  FFéélliicciittaattiioonnss !!

  Maintenant, vous savez comment configurer un named qui sert de cache.
  Servez-vous une bière, un verre de lait ou tout ce que vous voudrez
  pour fêter l'événement.


  44..  UUnn ddoommaaiinnee ssiimmppllee

  CCoommmmeenntt mmeettttrree eenn ppllaaccee vvoottrree pprroopprree ddoommaaiinnee


  44..11..  MMaaiiss aavvaanntt ttoouutt,, uunn bbrriinn ddee tthhééoorriiee

  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 théorie avec quand même 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. Arrêtez
  le survol quand vous arrivez à l'endroit où j'explique le contenu du
  fichier named.conf.


  Le service DNS est un système organisé de manière hiérarchique, sous
  forme d'arbre. La racine est désignée 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 reconnaîtrez dans le DNS un arbre de
  recherche, avec des noeuds, des arrêtes et des feuilles.


  Lorsque vous recherchez une machine, la question est posée
  récursivement dans toute la hiérarchie 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 possède déjà 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 requête (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 accélère 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
  précis : 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 requête. Nous avons réussi à 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 commençant à partir de ., nous avons successivement trouvé les
  serveurs de noms des différents niveaux du nom de domaine. Si vous
  aviez utilisé votre propre serveur DNS à la place de tous ces autres
  serveurs, votre named aurait, bien sûr, 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. Dès qu'on l'a trouvée, on
  y grimpe en passant par le serveur qui connaît 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 dernière partie est de
  trouver prep.ai.mit.edu, ce qui est très 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
  hiérarchie des noms de domaine comme un domaine ``normal''.  in-
  addr.arpa nous sert à obtenir le nom d'hôte connaissant l'adresse IP
  d'une machine. Une chose très importante ici est de bien remarquer que
  les adresses IP sont notées en sens inverse à l'intérieur du domaine
  in-addr.arpa. Si vous avez l'adresse d'une machine : 192.128.52.43,
  named procède 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 liée à 43.52.128.192.in-addr.arpa.
  Malin, n'est ce pas ?  (dites oui). En fait, la résolution de noms
  inverse est assez difficile à admettre les premières années.


  À 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
  réalité.


  44..22..  NNoottrree pprroopprree ddoommaaiinnee

  Maintenant, nous en sommes à définir notre propre domaine bien à nous.
  Nous allons créer le domaine linux.bogus et y déclarer quelques
  machines. C'est un nom de domaine totalement factice, afin d'être sûr
  de ne déranger personne dans le Vaste Monde.


  Encore une chose avant de commencer. Tous les caractères ne sont pas
  admis dans les noms de machines. On ne doit utiliser que les
  caractères de l'alphabet anglais (a-z), les nombres (0-9) et le tiret
  ``-''. Utilisez ces caractères, majuscules et minuscules sont
  confondues, donc pat.uio.no est identique à Pat.UiO.No.


  En fait, nous avons déjà commencé à créer 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 définir 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 déjà vu ce fichier, il
  se présente 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 définissant une zone par une directive
  $ORIGIN, mais en fait c'est superflu. L'origine (l'emplacement dans la
  hiérarchie du service DNS) d'un fichier de zone est indiquée 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'abréviation de ``Start Of Authority'' (Origine de l'Autorité). Le
  ``@'' est une notation spéciale qui désigne l'origine. Et comme la
  colonne ``domain'' de ce fichier donne 0.0.127.in-addr.arpa, la
  première 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 début de la ligne, il est implicite,
  puisque la ligne d'avant commence avec un ``@''. Alors, faites-vous
  une fleur en omettant ce caractère. 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 réseau
  0.0.127.in-addr.arpa, donc 127.0.0.1 est appelé localhost.


  Le champ SOA est le préambule 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
  décrit la zone, son origine (une machine appelée 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 paramètres
  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
  données dans ce HOWTO et tout se passera certainement très bien.


  Maintenant, relancez votre named (avec la commande ndc restart) et
  utilisez nslookup pour regarder le résultat :




  $ 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 préoccupe, le domaine linux.bogus,
  insérez 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
  données 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 possédant un champ A. Il n'est pas
  légal d'avoir un champ CNAME pour la machine mentionnée dans le champ
  SOA. Il n'est pas nécessaire que son nom soit ``ns'', ce peut être
  tout autre nom valide. La deuxième chose à noter c'est que
  hostmaster.linux.bogus doit se lire comme hostmaster@linux.bogus. Ce
  doit être un alias de mail, ou une véritable boîte aux lettres
  électronique, et la personne qui maintient le DNS doit la lire
  régulièrement. Tous les mails concernant l'administration du domaine
  seront envoyés à 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 systèmes 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 numéro 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
  numéro de priorité immédiatement supérieur, c'est-à-dire
  mail.friend.bogus qui a une priorité de 20 dans notre cas.


  Relancez named en tapant ndc restart. Examinons le résultat 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 entièrement fausse. Il devrait y avoir



         linux.bogus preference = 10, mail exchanger = mail.linux.bogus





  J'ai fait cette erreur délibérément, 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 ajoutée 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 préfère la deuxième forme parce qu'il y a moins de
  caractères à 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 défaut 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 ``.'' après les noms de
  domaines. Vous ne pouvez pas vous imaginer les ravages qui ont été
  causés pas des ``.'' en trop ou en moins.


  Cela étant dit, voici le nouveau fichier de zone, avec quelques
  informations supplémentaires :









  ______________________________________________________________________
  ;
  ; 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
  première partie est la description matérielle ou le type de processeur
  de la machine tandis que la deuxième partie décrit le logiciel utilisé
  ou le système 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 même machine. Par conséquent, www est un
  alias de ns.


  L'utilisation des champs CNAME est assez controversée. Mais il est
  sage de suivre la règle selon laquelle un champ MX, CNAME ou SOA ne
  doit _j_a_m_a_i_s se référer à un champ CNAME, toujours se référer à un
  champ A, il est donc préférable 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'hôte
  légal pour une adresse de courrier électronique.
  webmaster@www.linux.bogus est une adresse de mail illégale avec la
  configuration ci-dessus. Vous pouvez être sûrs qu'il y a un certain
  nombre d'administrateurs système dans le Vaste Monde qui sont très à
  cheval sur cette règle, même si avec un CNAME ça marche pour vous. Une
  façon de contourner le problème 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 règle.


  Chargez la nouvelle base de données en lançant 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 affichés.








  [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.

  44..33..  LLaa zzoonnee iinnvveerrssééee

  Ç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 inversée pour que l'on puisse retrouver le DNS à partir de
  l'adresse. Ce nom est utilisé par différents types de serveurs (FTP,
  IRC, WWW et autres) pour décider s'ils vont discuter avec vous ou non,
  et s'ils le font, quelle priorité ils vont vous donner. Pour un accès
  complet aux services sur Internet, la zone inversée 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.
  ______________________________________________________________________




  Redémarrez 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 détails 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 pêche aux messages d'erreur dans votre syslog. J'ai expliqué
  comment faire au tout début du chapitre.


  44..44..  PPrrééccaauuttiioonnss dd''uussaaggee

  Je devrais maintenant faire quelques remarques. Les adresses IP
  utilisées dans les exemples précédents sont prises dans le bloc des
  ``réseaux privés'', c'est à dire des adresses qui ne doivent pas être
  utilisées publiquement sur Internet. Donc, il est sage de les avoir
  utilisées dans un exemple d'un HowTo. La deuxième 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
  listés 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 expériences privées cette fonctionnalité doit être mise hors
  service, on ne va quand même pas polluer Internet avec nos
  expériences, non ?


  Bien sûr, ce domaine est très factice, tout comme le sont ses
  adresses. C'est peut-être un peu déroutant pour vous. Un vrai exemple
  tiré d'un vrai domaine vous attend au grand chapitre suivant.


  44..55..  PPoouurrqquuooii eesstt--ccee qquuee lleess llooookkuupp iinnvveerrssééss nnee mmaarrcchheenntt ppaass ??

  Il y a quelques trucs qui sont normalement évités avec les lookups qui
  arrivent souvent quand on met en place des zones inversés. 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 arrière
  et réparez-le avant de continuer.


  Je parlerais des deux problèmes de lookups inversés qui sont vu de
  l'extérieur de votre réseau :
  44..55..11..  LLaa zzoonnee iinnvveerrssee nn''eesstt ppaass ddéélléégguuééee..

  Quand vous demandez à un fournisseur d'accès quelques adresses IP
  ainsi qu'un nom de domaine, le nom de domaine vous est normalement
  délégué. La délégation consiste en un champ NS qui vous aide a passer
  d'un serveur à l'autre comme je l'ai expliqué dans le brin de théorie
  qui précède. Vous l'avez lu, n'est-ce pas ? Si votre zone inversée ne
  marche pas, retournez y et lisez-le. Maintenant.


  La zone inversée a elle aussi besoin d'être déléguée. Si vous avez le
  réseau 192.168.196 avec le domaine linux.bogus de votre fournisseur,
  il devra mettre des champs NS pour votre zone inversée aussi bien que
  pour votre zone directe. Si vous remontez la chaîne à partir de in-
  addr.arpa vous trouverez un trou quelque part. Très certainement au
  niveau de votre fournisseur. Après avoir trouvé le trou dans la
  chaîne, contactez votre fournisseur et demandez-lui de corriger
  l'erreur.


  44..55..22..  VVoouuss aavveezz uunn ssoouuss--rréésseeaauu ssaannss ccllaassssee

  C'est un sujet plutôt pointu, mais les sous réseaux sans classe sont
  très répandus de nos jours et vous en aurez très certainement un si
  vous n'êtes pas une entreprise assez grande.


  Un sous-réseau sans classe est ce qui sauve Internet de nos jours. Il
  y a quelques années, il y avait vraiment beaucoup de discussions sur
  la raréfaction des adresses IP. Les personnes intelligentes de l'IETF
  (Internet Engineering Task Force, ceux qui maintiennent Internet en
  état de marche) se sont penchées sur cet épineux problème et ont
  trouvé une solution. A un certain prix. Le prix est que vous aurez
  moins qu'un sous réseau 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 plaît,
  allez le lire.


  La première partie du problème est que votre FAI doit comprendre la
  technique décrite 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-même en premier
  lieu ;-). Ils mettrons ensuite une jolie zone inversée sur leurs
  serveurs que vous pourrez examiner pour savoir si elle est correcte
  avec nslookup.


  La deuxième et dernière partie du problème est que vous devez en
  comprendre la technique. Si vous n'êtes pas certain, revenez en
  arrière et relisez ce document.  Ensuite, vous pourrez mettre en place
  une zone inversée sans classe comme le décrit _M_r _D_N_S.


  Il y a une autre difficulté qui pointe son nez ici. Les vieux
  résolveurs _n_e _s_e_r_o_n_t _p_a_s capable de suivre les champs CNAME dans la
  chaîne de résolution et n'arriveront pas a résoudre l'IP de votre
  machine. Cela peut entraîner l'assignation d'une mauvaise classe, la
  non-résolution ou quelque chose dans ce goût-là. Si vous butez sur ce
  genre de problème, la seule solution (que je connaisse) est de
  demander à votre FAI d'insérer vos champs PTR dans ses fichiers de
  zone sans classe plutôt que des champs CNAME.

  Certains FAI vous proposeront d'autre méthodes pour gérer cela, comme
  des formulaires web où vous pourrez entrer vos zones inversées, ou
  d'autre systèmes automatisés.


  55..  UUnn eexxeemmppllee ttiirréé dd''uunn ddoommaaiinnee rrééeell

  OOùù nnoouuss aalllloonnss eennffiinn vvooiirr ddee _v_r_a_i_s ffiicchhiieerrss ddee zzoonnee


  Certains utilisateurs ont suggéré que je mette un vrai exemple d'un
  domaine qui marche dans la réalité car mon explication sur la
  différence entre un vrai domaine et l'exemple bidon ci-dessus n'était
  pas très 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é modifiée
  pour être utilisés avec les restrictions de bind 8 et quelques
  extensions de mon cru. Par conséquent, ils peuvent donc différer de ce
  que vous pouvez trouver en questionnant les serveurs de nom de LAND-5
  aujourd'hui.


  Voici les sections pour les deux zones inversées nécessaires : le
  réseau 127.0.0, ainsi que le sous-réseau 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 répertoire pz comme dans ce HowTo, il
  les met dans le répertoire zone.


  55..11..  //eettcc//nnaammeedd..ccoonnff ((oouu //vvaarr//nnaammeedd//nnaammeedd..ccoonnff))



  ______________________________________________________________________
  // 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, PPAARR PPIITTIIÉÉ
  mettez aussi le ``notify no;'' dans les zones des deux land-5.com pour
  éviter les accidents.


  55..22..  //vvaarr//nnaammeedd//rroooott..hhiinnttss

  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 récent, 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
  ______________________________________________________________________




  55..33..  //vvaarr//nnaammeedd//zzoonnee//112277..00..00

  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 nécessaire 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.
  ______________________________________________________________________




  55..44..  //vvaarr//nnaammeedd//zzoonnee//llaanndd--55..ccoomm

  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'après 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 utilisée pour la personne à
  contacter. Le numéro de série est au format obligatoire aaaammjj, avec
  le numéro de série dans la journée ajouté à la fin; il s'agit
  certainement de la sixième version du fichier de zone pour la journée
  du 20 septembre 1996. N'oubliez-pas que le numéro de série 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 numéro de série dans la journée, si bien qu'après 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é effacées}
  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 dernières versions de bind
  4, named fait plus attention aux caractères placés 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 plutôt un préfixe 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.


  55..55..  //vvaarr//nnaammeedd//zzoonnee//220066..66..117777

  Les commentaires se trouvent juste après 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é effacées}
  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 problèmes. Elle est utilisée pour trouver le nom d'hôte 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 norvégien, vous ne voulez
  accepter que les connexions venant de Norvège ou des autres pays
  scandinaves. Ainsi, lorsqu'un client se connecte chez vous, la
  bibliothèque C peut vous dire quelle est l'adresse IP du client,
  puisque cette dernière se trouve dans tous les paquets qui traversent
  le réseau. 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 bibliothèque 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 résolution de
  prep.ai.mit.edu, ce scénario est un peu idéalisé.


  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
  résolution 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 résolution 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 même certains
  http (Web) n'acceptent _p_a_s les connexions venant de machines dont ils
  ne peuvent retrouver le nom. C'est pourquoi la résolution de noms
  inverse pour les machines est _o_b_l_i_g_a_t_o_i_r_e.



  66..  MMaaiinntteennaannccee

  GGaarrddeerr vvoottrree DDNNSS eenn ééttaatt ddee mmaarrcchhee


  En plus des tâches normales, il y a une tâche de maintenance spéciale
  à effectuer sur les serveurs de nom. Il s'agit de garder le fichier
  root.hints à jour. La façon 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 même question à un
  des serveurs de cette liste avec la commande dig @rootserver. Vous
  remarquerez que ce que vous obtenez ressemble énormément à un fichier
  root.hints, avec quelques chiffres en plus. Ces chiffres
  supplémentaires 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 après 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 découvertes par David A. Ranch
  # Test avec un ping suggéré 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 connectés ? Pingons un serveur de notre FAI
   case `ping -qnc some.machine.net` in
     *'100% packet loss'*)
          echo "PAS de connexion réseau. 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é redémarré, de cette manière, la mise a jour est complète."
   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 remarqués que le fichier root.hints est
  aussi disponible via ftp depuis l'Internic. S'il vous plaît,
  n'utilisez pas le ftp pour mettre à jour le root.hints, la méthode ci
  dessus est bien meilleur du point de vue de la nettiquette et de
  l'Internic.


  77..  PPaasssseerr ddee llaa vveerrssiioonn 44 àà llaa vveerrssiioonn 88

  Cette section était au départ sur l'utilisation de bind-8 écrite par
  David E. Smith (dave@bureau42.ml.org). Je l'ai éditée pour refléter 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 répertoire
  bind8/src/bin/named (au cas où vous avez récupéré 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 crée 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 nouveautés que bind-8 permet. Voici une version
  plus complète d'un named.conf qui fait la même chose, mais d'une façon
  plus efficace :


  ______________________________________________________________________
  // Voici le fichier de configuration de named (pour BIND 8.1 et ultérieur).
  // 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é décommentée, car j'ai déjà 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 répertoire 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 instantanément.
  Les formats des fichiers de zone et du root.hints sont les mêmes, tout
  comme les commandes qui les mettent à jour.


  88..  QQuueessttiioonnss eett RRééppoonnsseess

  Dans cette section, je passe en revue quelques-unes des questions les
  plus fréquemment posées à propos du DNS et de ce HOWTO. Et je donne
  même les réponses ;-) Merci de bien lire cette section avant de
  m'écrire.


  1. Mon named me réclame un fichier named.boot


     Vous vous êtes trompés 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 derrière 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
  suggère ``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 ?


     Créez plusieurs champs AA pour www.busy.com et utilisez bind 4.9.3
     ou une version plus récente, qui supporte les réponses à scrutation
     circulaire. Cela ne marchera _p_a_s avec des versions de bind
     antérieures.


  4. Je veux mettre en place un serveur DNS sur un Intranet (fermé).
     Comment faire ?


     Effacez rageusement le fichier root.hints et créez seulement les
     fichiers de zone. Cela veut aussi dire que vous n'aurez pas à créer
     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 maîtres, ajoutez les sur la
  ligne masters en les séparant par un ``;'' (point-virgule)


  6. Je veux faire tourner bind lorsque je suis déconnecté du réseau


     Il y a trois trucs a savoir :


  ·  J'ai reçu 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 déconnecte, 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 déconnecté, named rajoute ceci au fichier messages après la
       première requête concernant un nom de domaine qu'il ne connaît pas~:

       Jan 28 20:10:11 hazchem named[10147]: No root nameserver for class IN

       Ce qui n'est pas très gênant.

       Ça marche très bien dans mon cas.  Je peux utiliser le serveur de noms pour
       les machines locales lorsque je suis déconnecté du Net en évitant les délais
       introduits par les timeout liés à la recherche des noms de domaine extérieurs.
       Et lorsque je suis connecté au Net, les requêtes concernant les noms de
       domaines extérieurs marchent normalement.





  ·  J'ai aussi reçu des informations sur la façon dont bind interagit
     avec NFS et le portmapper sur une machine qui est le plus souvent
     déconnectée de la part de Karl-Max Wanger :

       J'ai pris l'habitude d'utiliser named sur toutes mes machines qui sont
       seulement connectées à Internet de façons occasionnelles grâce à 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 démarré avant nfsd et mountd.

       Avec l'une de mes machines (un portable Libretto 30), j'ai eu le problème
       suivant~: de temps en temps, je pouvais monter ses disques depuis un autre
       système connecté sur mon LAN local, mais la plupart du temps, ça ne marchait
       pas. Il se passait la même chose que ce soit en utilisant PLIP, une carte
       Ethernet PCMCIA ou PPP avec une interface série.

       Après quelques temps de réflexions et d'expériences, j'ai découvert que named
       empêchait nfsd et mountd de s'enregistrer avec portmapper au démarrage (Je
       démarre ces démons au boot d'habitude).  Le fait de lancer named après nfsd
       et mountd éliminait ce problème complètement

       Comme il n'y a pas de désavantages à modifier ainsi la séquence de boot de
       cette façon, j'encourage tout le monde à en faire de même pour éviter des
       problèmes 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 contrôler la taille de ce cache ?


     Le cache est entièrement stocké en mémoire, 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 contrôler le cache. named gère le cache selon
     quelques règles simples, et c'est tout. Vous ne pouvez pas
     contrôler le cache ou sa taille en aucune manière. 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
     redémarrage ?  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 zéro 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.


  99..  CCoommmmeenntt ddeevveenniirr uunn aaddmmiinniissttrraatteeuurr DDNNSS ddee hhaauutt vvooll

  DDooccuummeennttaattiioonn eett oouuttiillss


  La Vraie Documentation existe. En ligne et imprimée. Il faut
  absolument la lire si vous voulez devenir un administrateur DNS du
  plus haut niveau.  Pour ce qui est de la documentation imprimée, 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 deuxième édition est basée sur bind 4, la troisième 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 référence ISBN
  0688052304 entre autres.


  En ligne, vous trouverez des trucs sur DNS Resources Directory,
  www.isc.org/bind.html; Une FAQ, un manuel de référence (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 mentionnées 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
  complément, il y a un certain nombre de RFC sur le DNS, les plus
  importantes sont certainement celles-ci :



     RRFFCC 22005522
        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


     RRFFCC 11991188
        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.


     RRFFCC 11991122
        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.


     RRFFCC 11991122 EErrrroorrss
        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


     RRFFCC 11771133
        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.


     RRFFCC 11771122
        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.


     RRFFCC 11118833
        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.

     RRFFCC 11003355
        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.


     RRFFCC 11003344
        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.


     RRFFCC 11003333
        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.


     RRFFCC 11003322
        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.


     RRFFCC 997744
        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 française : Mark Hoebeke,
  <mh@jouy.inra.fr>.
  v1.3.2, 22 Février 1999

  Ce HOWTO est consacré à tous les (bientôt ex-?) utilisateurs de DOS et
  Windows qui ont décidé 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 manière d'échanger des fichiers
  et des ressources entre les deux systèmes d'exploitation.
  ______________________________________________________________________

  Table des matières



















































  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 préliminaires
     4.2 Liens symboliques
     4.3 Droits d'accès et propriété
     4.4 Fichiers : traduction des commandes
        4.4.1 Exemples
     4.5 Exécution de programmes : le multi-tâches et les sessions
     4.6 Exécution de programmes sur des ordinateurs distants

  5. Utilisation des répertoires

     5.1 Répertoires : notions préliminaires
     5.2 Droits d'accès aux répertoires
     5.3 Répertoires: traduction de commandes
        5.3.1 Exemples

  6. Disquettes, disques durs et consorts

     6.1 Gestion des périphériques «à la DOS»
     6.2 Gestion des périphériques « à la UNIX»
     6.3 Les sauvegardes

  7. Et Windows alors ?

  8. Personnalisation du système

     8.1 Fichiers d'initialisation du système
     8.2 Fichiers d'initialisation de programmes

  9. Le réseau : concepts

  10. Un peu de programmation

     10.1 Les
     10.2 «E-C-iez» par vous-même

  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 Entraînement à 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 Responsabilités

  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  EEsstt--ccee bbiieenn LLiinnuuxx qquu''iill vvoouuss ffaauutt ??


  Vous voulez basculer du monde DOS (cette définition incluant Windows)
  vers Linux ? Bonne idée : Linux est techniquement supérieur au DOS, à
  Windows 9x et même à Windows NT. Mais prenez garde : cela ne vous sera
  peut-être pas si utile que ça. Voici les principales différences entre
  DOS/Windows et Linux :


  ·  Windows peut faire tourner Microsoft Office et des tas de jeux ;
     est considéré comme facile à installer et configurer ; est
     notoirement instable ; est peu performant et sujet à des plantages
     fréquents.

  ·  Linux peut faire tourner StarOffice, un flopée 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'extrêmement rarement.

  C'est à vous de décider ce dont vous avez besoin. En outre, Linux vous
  donne la puissance mais nécessite un temps d'apprentissage pour la
  maîtriser. 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 débutants abandonnent à
  cause des difficultés rencontrées au démarrage.

  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 résultats immédiats. En dépit 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 même
  machine.

  Prérequis pour ce howto : je supposerai que


  ·  vous connaissez les bases des commandes et des concepts du DOS ;

  ·  Linux, et éventuellement le système X Window (X11 en abrégé), sont
     correctement installés sur votre PC ;

  ·  votre interpréteur 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 méchant DOS. On trouvera des informations à propos de Windows
  par-ci par-là, mais gardez à l'esprit que Windows et Linux sont
  totalement différents, contrairement au DOS qui est une espèce 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 récente de ce document est disponible en différents
  formats à l'adresse  <ftp://sunsite.unc.edu:/pub/Linux/docs/howto>.

  11..22..  OOuuii,, cc''eesstt bbiieenn LLiinnuuxx.. JJee vveeuuxx eenn ssaavvooiirr pplluuss..


  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, à
  présent, vous regardez l'écran en vous demandant : «Et maintenant, que
  faire ?»

  Ce n'est pas le moment de désespérer. Vous êtes sur le point de faire
  les mêmes 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 tâches
  suivantes :


  ·  faire tourner des programmes et créer, copier, visualiser, effacer,
     imprimer et renommer des fichiers ;

  ·  faire des CD, des MD, des RD et des DIR dans vos répertoires ;

  ·  formater des disquettes et copier des fichiers vers ou à partir de
     celles-ci ;

  ·  personnaliser le système ;

  ·  surfer sur l'Internet ;

  ·  écrire des fichiers .BAT et des programmes dans votre langage
     préféré ;

  ·  le 1% restant.

  Vous serez ravi de savoir que ces tâches peuvent être accomplies sous
  Linux de manière similaire au DOS. Sous DOS, l'utilisateur moyen
  n'utilise qu'une fraction de la bonne centaine de commandes
  disponibles : la même chose, jusqu'à un certain point, s'applique à
  Linux.


  11..22..11..  CCoonncceeppttss iinnttrroodduuccttiiffss


  La meilleure façon d'apprendre quelque chose de nouveau est de se
  jeter à l'eau. Il vous est chaudement recommandé d'expérimenter et de
  jouer avec Linux : à moins de vous connecter en tant que root cela ne
  peut en aucun cas endommager le système. Quelques points à noter :


  ·  avant tout, comment quitter Linux en toute sécurité ? Si vous êtes
     devant un écran en mode texte, faites <CTRL-ALT-DEL>, attendez que
     le système commence à redémarrer ; à 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
     redémarrer le PC directement : cela pourrait endommager le système
     de fichiers ;

  ·  contrairement au DOS, Linux est pourvu d'origine de mécanismes de
     sécurité. Des droits d'accès sont associés aux fichiers et aux
     répertoires ; par conséquent, l'utilisateur normal ne peut accéder
     à certains d'entre eux, cf. ``Droits d'accès et propriété''. À
     l'inverse, DOS et Windows vous permettront de rayer de la carte
     l'intégralité du contenu de votre disque dur ;


  ·  il existe un utilisateur particulier appelé «root» : c'est
     l'administrateur système 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 sérieusement voire détruire le système, comme avec
     DOS/Win. Ne travaillez pas sous root sauf en cas de nécessité
     absolue ;

  ·  une grande part de la complexité de Linux provient du fait qu'il
     est configurable à l'extrême : tout paramètre et toute application
     peuvent virtuellement être personnalisés grâce à 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 capacités 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 tâches complexes. Je vous encourage fortement à
     apprendre à vous en servir.



  11..22..22..  OObbtteenniirr ddee ll''aaiiddee..


  Il existe de nombreuses manières 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 installés sur votre machine se
     trouve souvent dans les sous-répertoires 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 système de documentation
     à base d'hypertexte, dont l'utilisation n'est peut-être pas
     intuitive au début. 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
     plaît, ne m'envoyez pas de messages d'appel à l'aide car je suis
     quelque peu débordé.



  11..33..  CCoonnvveennttiioonnss


  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 spécifié, 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 lancée que par root.


  22..  PPoouurr lleess iimmppaattiieennttss


  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.



  33..  ÀÀ llaa rreennccoonnttrree dduu bbaasshh



  Bonne nouvelle : avec Linux vous devez taper beaucoup moins de
  caractères à l'invite car l'interpréteur de commandes bash tape à
  votre place autant que possible, et dispose de fonctionnalités
  d'édition de ligne du tonnerre. Pour commencer, la flèche vers le haut
  rappelle les lignes de commandes précédentes ; mais il y a plus.
  L'appui sur <TAB> complète les noms de fichiers et de répertoires,
  ainsi, taper



       $ls /uTABloTABbTAB




  c'est comme taper


       $ ls /usr/local/bin




  S'il y a des ambiguïtés, comme lorsque vous tapez



       $ ls /uTABloTABiTAB




  bash s'arrête parce qu'il ne sait pas si vous voulez dire
  /usr/local/info ou /usr/local/include. Il faut fournir plus de
  caractères 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>
  déplace le curseur d'un mot vers la gauche ; <CTRL-A> l'amène au début
  de la ligne, <CTRL-E> vers la fin. La touche <ALT> est équivalente à
  la touche <ESC>.

  On s'arrête là pour le moment. Une fois habitué(e) à ces raccourcis,
  vous vous lasserez très rapidement de l'invite du DOS...


  44..  FFiicchhiieerrss eett PPrrooggrraammmmeess




  44..11..  FFiicchhiieerrss :: nnoottiioonnss pprréélliimmiinnaaiirreess


  La structure des répertoires et des fichiers sous Linux est très
  similaire à celle de DOSWin. Les fichiers ont des noms qui doivent
  obéir à certaines règles, ils sont stockés dans des répertoires,
  certains d'entre eux sont exécutables et parmi ceux-ci, la plupart
  disposent d'options. De plus, il est possible d'utiliser les
  caractères _j_o_k_e_r, la redirection et les pipes. Seules quelques
  différences 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 système de fichiers comme ext2 ou umsdos,
     vous avez le loisir d'utiliser des noms de fichier plus longs
     (jusqu'à 255 caractères), 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 différenciées. Par conséquent, NOMFIC.tar.tgz et nomfic.tar.gz
     sont deux fichiers différents. De même, 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 néanmoins possible), vous devez
     l'entourer avec des guillemets à chaque fois que vous y faites
     référence. 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 caractères 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
     exécutables sont suivis d'un astérisque «*» 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 exécutables, 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 commençant par un point est considéré 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.

  À présent, vous pouvez aborder la section ``Traduire les commandes DOS
  en Linux'', mais à votre place, je poursuivrais ici.


  44..22..  LLiieennss ssyymmbboolliiqquueess



  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 répertoire, et on peut l'utiliser en lieu et place du fichier ou
  du répertoire 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 référence à  g77manual.txt au lieu de
  /usr/doc/g77/DOC. Les liens apparaissent de la manière suivante dans
  l'affichage du contenu des répertoires :



       $ ls -F
       g77manual.txt@
       $ ls -l
       (des choses et d'autres...)           g77manual.txt -> /usr/doc/g77/DOC






  44..33..  DDrrooiittss dd''aaccccèèss eett pprroopprriiééttéé


  Sous DOS, les fichiers et les répertoires 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 (système). Seuls H et R ont un sens sous Linux : les
  fichiers cachés sont ceux qui commencent par un point, et pour ce qui
  est de l'attribut R, lisez ce qui suit.

  Sous UNIX un fichier possède des «droits d'accès» et un propriétaire,
  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'accès au fichier /bin/ls, qui
  appartient à root et au groupe bin. En laissant de côté 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 = répertoire :
  _d_i_r_e_c_t_o_r_y, l = lien etc.) ; rwx sont les droits d'accès pour le
  propriétaire du fichier (lecture : _r_e_a_d, écriture : _w_r_i_t_e, exécution)
  ; r-x sont les droits d'accès pour le groupe auquel appartient le
  propriétaire du fichier (lecture, exécution) ; (je n'aborderai pas le
  concept de groupe, vous n'en avez pas besoin pour survivre, tant que
  vous êtes débutant ;-) r-x sont les droits d'accès pour tous les
  autres utilisateurs (lecture, exécution).

  Le répertoire /bin dispose lui aussi de droits d'accès : cf.  ``Droits
  d'accès aux répertoires'' 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'accès d'un fichier, la commande est :



       $ chmod <quiXperm> <fic>




  où qui peut être u (utilisateur, ou propriétaire), 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 (exécution). Les usages
  courants pour chmod sont les suivants :



       $ chmod +x fichier




  cela positionne le droit d'exécution pour le fichier.



       $ chmod go-rw fichier




  cela enlève les droits de lecture et d'écriture pour tous excepté le
  propriétaire.



       $ chmod ugo+rwx fichier




  cela donne les droits de lecture, d'écriture et d'exécution à tout le
  monde.



       # chmod +s fichier





  cela fabrique un fichier de type «setuid» ou «suid» -- un fichier que
  tout un chacun peut exécuter avec les privilèges de son propriétaire.
  Typiquement, vous rencontrerez des fichiers suid appartenant à root ;
  souvent, il s'agit de fichiers système importants, comme le serveur X.

  Un moyen plus court de faire référence aux droits d'accès 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'accès de
  quiconque. LPM.


  44..44..  FFiicchhiieerrss :: ttrraadduuccttiioonn ddeess ccoommmmaannddeess


  À 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


  44..44..11..  EExxeemmpplleess





       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 : * désigne tous les fichiers, sauf
     ceux qui sont cachés ; .* désigne tous les fichiers cachés (mais
     également le répertoire courant «.» et son répertoire parent «..» :
     attention !) ; *.* ne désigne que les fichiers qui contiennent, ou
     qui se terminent par un «.» ; p*r désigne aussi bien «papier» que
     «plier» ; *c* désigne 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 flèches ;

  ·  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 possède un autre joker : les []. Utilisation : [abc]* désigne
     les fichiers commençant par a, b ou c ; *[I-N1-3] désigne les
     fichiers se terminant par I, J, K, L, M, N, 1, 2, ou 3 ;

  ·  lpr <fic> imprime un fichier en tâche de fond. Pour vérifier 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é.



  44..55..  EExxééccuuttiioonn ddee pprrooggrraammmmeess :: llee mmuullttii--ttââcchheess eett lleess sseessssiioonnss


  Pour lancer un programme, entrez son nom comme vous le feriez sous
  DOS. Si le répertoire (cf. section ``Utilisation des répertoires'') où
  se trouve le programme est inclus dans le PATH (cf. section ``Fichiers
  d'initialisation du système''), le programme démarrera. Une exception
  : contrairement au DOS, sous Linux, un programme situé dans le
  répertoire courant ne s'exécutera pas à moins que ce répertoire ne
  soit inclus dans le PATH. _E_s_c_a_m_o_t_a_g_e (-- NdT. : En français 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 spécifier plusieurs
  commandes sur une seule ligne :


       $ commande1 ; commande2 ; ... ; commanden




  C'est tout au sujet de l'exécution 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 système
  d'exploitation multi-tâches -- il est capable de faire tourner
  plusieurs programmes (qu'on appellera des processus) en même temps.
  Vous pouvez lancer des processus en arrière-plan et continuer à
  travailler dans la foulée. 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 démarrer une nouvelle session dans la même console virtuelle,
     sans quitter la session courante, tapez  su - <nomdelogin>. Par
     exemple :  su - root. Cela peut être utile pour effectuer une tâche
     que seul root peut accomplir, par exemple.

  ·  Pour clore une session, tapez exit. S'il reste des jobs arrêtés
     (cf. plus loin) vous en serez averti.

  ·  Pour lancer un processus en arrière-plan, ajoutez une éperluette
     «&» à la fin de la ligne de commande :



       $ nomduprog [-options] [arguments] [< entree] [> sortie] &
       [1] 123





  Le shell associe un numéro 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 (-- numéro
  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'arrêter ou de suspendre
     temporairement un processus, de l'envoyer en arrière-plan ou de le
     remettre au premier plan. Dans ce contexte, les processus sont
     appelés «jobs».

  ·  Pour voir combien il y a de jobs, tapez jobs. Dans ce cas, les jobs
     sont identifiés par leur numéro de job, et non pas par leur PID.

  ·  Pour arrêter 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 arrière-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 arrière-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 flopée de fichiers, compiler un programme, et décompresser et
  archiver le tout, tout cela en même temps, tout en gardant la main.
  Essayez-donc de faire cela avec Windows, rien que pour voir la
  différence de performance (si ça ne plante pas, bien sûr).


  44..66..  EExxééccuuttiioonn ddee pprrooggrraammmmeess ssuurr ddeess oorrddiinnaatteeuurrss ddiissttaannttss


  Pour lancer un programme sur une machine distante dont le nom est
  machine.distante.edu, il suffit de faire :





       $ telnet machine.distante.edu




  Après vous être connecté, démarrez votre programme préféré. Cela va
  sans dire, vous devez avoir un compte utilisateur sur la machine
  distante.

  Si vous disposez de X11, il vous est même 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
  résidant sur machine.distante.edu, il faut faire ce qui suit :


  ·  démarrez X11, lancez un émulateur de terminal comme xterm ou ses
     équivalents, et tapez :



       $ xhost +machine.distante.edu
       $ telnet machine.distante.edu





  ·  après 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 dépend du shell distant.)

  _E_t _v_o_i_l_a !  nomduprogramme va maintenant démarrer 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 méthode fruste
  et non sécurisée : veuillez vous reporter au «Remote X Apps mini-
  HOWTO» disponible à l'adresse
  <http://sunsite.unc.edu/LDP/HOWTO/mini/Remote-X-Apps>.


  55..  UUttiilliissaattiioonn ddeess rrééppeerrttooiirreess



  55..11..  RRééppeerrttooiirreess :: nnoottiioonnss pprréélliimmiinnaaiirreess


  Nous avons déjà vu les différences entre les fichiers sous DOSWin et
  Linux. Pour ce qui est des répertoires, sous DOSWin, le répertoire
  racine est \, sous Linux c'est /. De même, les répertoires imbriqués
  sont séparés par \ sous DOSWin, et par / sous Linux. Un exemple de
  chemin d'accès :



       DOS:     C:\ARTICLES\GEOLOGIE\MI_EOC.TEX
       Linux:   /home/guide/articles/geologie/mi_eocene.tex




  Comme d'habitude, .. est le répertoire parent et . est le répertoire
  courant. Rappelez-vous que le système ne vous autorisera pas à faire
  des cd, rd ou des md n'importe où à votre convenance. Chaque
  utilisateur place ses affaires dans son propre répertoire appelé
  répertoire d'accueil (_h_o_m_e _d_i_r_e_c_t_o_r_y), attribué par l'administrateur
  système ; par exemple mon répertoire d'accueil est /home/guido.


  55..22..  DDrrooiittss dd''aaccccèèss aauuxx rrééppeerrttooiirreess


  Les répertoires ont également des droits d'accès. Ce que nous avons vu
  dans la section ``Droits d'accès et propriété'' (propriétaire, groupe
  et autres), s'applique également aux répertoires.  Pour un répertoire,
  rx signifie que vous pouvez vous rendre dans ce répertoire à l'aide de
  cd, et w que vous pouvez effacer un fichier de ce répertoire, ou le
  répertoire lui-même.

  Par exemple, pour empêcher d'autres utilisateurs de venir fouiner dans
  /home/guido/text :



       $ chmod o-rwx /home/guido/text









  55..33..  RRééppeerrttooiirreess:: ttrraadduuccttiioonn ddee ccoommmmaannddeess




       DIR:            ls, find, du
       CD:             cd, pwd
       MD:             mkdir
       RD:             rmdir
       DELTREE:        rm -rf
       MOVE:           mv





  55..33..11..  EExxeemmpplleess




       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 répertoires
     vides. Pour effacer un répertoire et tout son contenu, utilisez rm
     -rf (à vos risques et périls).

  ·  Le caractère «~» est un raccourci pour le nom de votre répertoire
     d'accueil. Les commandes cd ou cd vous emmèneront dans votre
     répertoire d'accueil, quel que soit l'endroit où vous êtes ; la
     commande cd  /tmp/ vous emmènera dans
     /home/votre_rep_d_accueil/tmp.

  ·  cd - «défait» le dernier cd.






  66..  DDiissqquueetttteess,, ddiissqquueess dduurrss eett ccoonnssoorrttss


  Il existe deux manières de gérer les périphériques sous Linux : à la
  manière du DOS, ou à celle d'UNIX. Faites votre choix.


  66..11..  GGeessttiioonn ddeess ppéérriipphhéérriiqquueess ««àà llaa DDOOSS»»


  La plupart des distributions Linux sont accompagnées de la suite
  Mtools, un ensemble de commandes parfaitement équivalentes à leurs
  correspondants DOS, mais commençant par un «m» : mformat, mdir, mdel,
  mmd, etc. Ils sont même capables de conserver les noms de fichiers
  longs, mais pas les droits d'accès aux fichiers. En configurant
  Mtools, par l'édition d'un fichier appelé /etc/mtools.conf (dont un
  exemple est fourni), vous pouvez également accéder à 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 préalablement exécuter, en tant que root, la commande :
  fdformat /dev/fd0H1440

  Note : il ne vous est pas possible d'accéder aux fichiers d'une
  disquette avec une commande de type less a:fic.txt! C'est
  l'inconvénient d'accéder aux disques à la manière du DOS.


  66..22..  GGeessttiioonn ddeess ppéérriipphhéérriiqquueess «« àà llaa UUNNIIXX»»


  UNIX aborde la gestion des périphériques d'une manière totalement
  différente. 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
  système de fichiers local par une opération que l'on appelle le
  «montage». Lorsque vous n'avez plus besoin du disque, avant de
  l'éjecter il vous faut le «démonter».

  Le formatage physique d'un disque est une chose, y créer un système de
  fichiers en est une autre. La commande DOS FORMAT A: fait les deux à
  la fois, mais Linux fournit des commandes séparées. Pour formater une
  disquette, voyez ci-dessus ; pour y créer un système 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 préparé, montez-le avec
  la commande :



       # mount -t ext2 /dev/fd0 /mnt




  en spécifiant le type adapté pour le système de fichiers si vous
  n'utilisez pas ext2. À présent, vous pouvez accéder 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 démonter avec la commande :



       # umount /mnt




  Bien évidemment, vous ne devez utiliser fdformat et mkfs qu'avec des
  disquettes non-formatées, et non pas avec celles déjà utilisées. Si
  vous voulez utiliser le lecteur B:, faites référence à 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 périphériques ; 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 précède était la manière «officielle» de monter les disques,
  mais il y a une astuce. Comme c'est assez pénible de passer root pour
  monter un disque ou un CD--ROM, chaque utilisateur peut être autorisé
  à les monter de la façon 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


  À présent, pour monter un disquette DOS et un CD--ROM vous pouvez
  faire :



       $ mount /mnt/floppy
       $ mount /mnt/cdrom






  /mnt/floppy, et /mnt/cdrom sont à présent accessibles à tous les
  utilisateurs. Souvenez-vous que d'autoriser tout le monde à monter des
  disques de cette manière est un trou de sécurité béant, si cela vous
  préoccupe.

  Deux commandes utiles sont df, qui donne des informations sur les
  systèmes de fichiers montés, et du nomderepertoire qui renseigne sur
  l'espace disque utilisé par le répertoire.


  66..33..  LLeess ssaauuvveeggaarrddeess


  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 formatée dans le lecteur, et un
  paquet d'autres sous la main.  Pour restaurer vos affaires, insérez la
  première disquette dans le lecteur et faites :



       # tar -M -xpvf /dev/fd0H1440






  77..  EEtt WWiinnddoowwss aalloorrss ??


  Le système X Window est «l'équivalent» de Windows. À l'opposé de
  Windows ou du Mac, X11 n'a pas été conçu pour être facile
  d'utilisation ni esthétique, mais uniquement pour munir les stations
  de travail sous UNIX de capacités graphiques (-- NdT. : Et surtout de
  la possibilité de déporter l'affichage sur d'autres machines au
  travers du réseau--) . Voici les principales différences :


  ·  Alors que Windows adopte le même _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 générale est définie par un composant-
     clé appelé le «gestionnaire de fenêtres» (_w_i_n_d_o_w _m_a_n_a_g_e_r) dont il
     existe une large gamme : fvwm, élémentaire mais agréable et peu
     gourmand en mémoire, 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 manière à ce que les
     fenêtres 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 déplace dessus (la
     fenêtre obtient le «focus»). De plus, le placement des fenêtres sur
     l'écran peut être automatique ou interactif : si, au lieu de votre
     programme, il apparaît un cadre étrange, cliquez avec le bouton
     gauche à l'endroit où vous voulez le faire apparaître.

  ·  la plupart des fonctionnalités peuvent être personnalisées en
     éditant un ou plusieurs fichiers de configuration. Lisez la
     documentation de votre gestionnaire de fenêtres ; ces fichiers de
     configuration peuvent être .fvwmrc, .fvwm2rc95, .steprc, etc. Un
     fichier de configuration type se trouve généralement dans :
     /etc/X11/window-manager-name/system.window-manager-name;

  ·  Les applications X11 sont écrites à l'aide de bibliothèques
     spéciales (les «widget sets») ; comme il en existe plusieurs, les
     applications ont des apparences différentes. Les plus élémentaires
     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 bibliothèques fournissent en gros le même look & feel
     que Windows.

  ·  Malheureusement, le mode d'interaction peut se révéler incohérent.
     En l'espèce, lorsque vous sélectionnez 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
     basées sur Athena, mais avec celles utilisant d'autres
     bibliothèques de widgets.

  ·  Le mode de fonctionnement des ascenseurs (_s_c_r_o_l_l_b_a_r_s) et le
     redimensionnement dépendent du gestionnaire de fenêtres et du
     widget set. Astuce : si les ascenseurs ne se comportent pas à votre
     goût, essayez d'utiliser le bouton du milieu, ou les deux boutons
     en même temps pour les déplacer.

  ·  Les applications n'ont pas d'icône par défaut, mais elles peuvent
     en avoir un certain nombre. La plupart des gestionnaires de
     fenêtres 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 sélectionné, il est déjà copié dans
     le presse-papiers : déplacez 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-déplacer est une option, et n'est disponible qu'avec les
     applications et/ou les gestionnaires de fenêtres qui l'intègrent.

  Pour économiser la mémoire, il est préférable d'utiliser des
  applications utilisant les mêmes bibliothèques, mais cela peut se
  révéler difficile à appliquer.

  Il existe des projets visant à doter X11 d'une apparence et d'un
  comportement aussi cohérents 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.


  88..  PPeerrssoonnnnaalliissaattiioonn dduu ssyyssttèèmmee



  88..11..  FFiicchhiieerrss dd''iinniittiiaalliissaattiioonn dduu ssyyssttèèmmee


  Sous DOS, deux fichiers importants sont AUTOEXEC.BAT et CONFIG.SYS,
  utilisés lors du démarrage pour initialiser le système, positionner
  quelques variables d'environnement comme PATH et FILES, et, le cas
  échéant lancer un programme ou un fichier de commandes. Sous Linux, il
  y a une flopée 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
  façon :



       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 désirez changer les messages de login, ou
  souhaitez lancer automatiquement un programme après vous être
  connecté, considérez 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 après que vous vous soyez connecté et les commandes qu'il
  contient seront exécutées.

  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\\$ "





  88..22..  FFiicchhiieerrss dd''iinniittiiaalliissaattiioonn ddee pprrooggrraammmmeess


  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 appelés
  .nomdeprogrammerc et situés dans votre répertoire d'accueil. Les
  premiers que vous aurez envie de modifier sont :


  ·   .inputrc : utilisé par bash pour définir les touches du clavier ;

  ·   .xinitrc : utilisé par  startx pour initaliser le système X Window
     ;

  ·   .fvwmrc : utilisé par le gestionnaire de fenêtres 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 tôt 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> .


  99..  LLee rréésseeaauu :: ccoonncceeppttss


  Non seulement la connexion au réseau 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 intégrant
  le support PPP et d'un outil pour composer les numéros et établir la
  connexion.

  Pour récupérer votre courrier chez votre fournisseur d'accès Internet
  (_F_A_I), vous aurez besoin d'un outil appelé «récupérateur de mail»
  utilisant le protocole POP ; lorsque le courrier est récupéré, 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 gérer votre courrier.

  Alors que sous Windows, le programme de composition de numéros est
  invoqué automatiquement au lancement d'une application Internet, sous
  Linux, on procède dans l'autre sens : on compose d'abord le numéro,
  puis on lance l'application. Un truc du nom de diald fournit le
  comportement habituel. L'installation et la configuration d'un réseau
  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 réseau» : il vous est possible de faire
  croire aux machines Windows du réseau local que votre station Linux
  est un serveur Windows NT/9x. La formule magique est Samba : il ne
  s'agit pas de la danse brésilienne endiablée, mais d'une
  implémentation du protocole SMB pour Linux. Rendez-vous à
  <http://samba.anu.edu.au/samba>.


  1100..  UUnn ppeeuu ddee pprrooggrraammmmaattiioonn



  1100..11..  LLeess sshheellll--ssccrriippttss  :: ddeess ffiicchhiieerrss ..BBAATT ddooppééss aauuxx aannaabboolliissaannttss


  Si vous utilisiez des fichiers .BAT pour créer des raccourcis pour de
  longues lignes de commandes (moi-même j'en ai fait pas mal), vous
  pouvez atteindre ce but en insérant des lignes d'_a_l_i_a_s appropriés (cf.
  l'exemple ci-dessus) dans le profile ou le .bash_profile. Mais si vos
  .BAT étaient plus compliqués, 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 possède des variables, des structures
  comme while, for, case, if... then... else et des tas d'autres
  fonctionnalités : 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 exécutable à
  l'aide de la commande chmod +x <fichierscript>. Pour l'exécuter, tapez
  son nom.

  Un mot d'avertissement. L'éditeur du système s'appelle vi, et, d'après
  mon expérience, la plupart des nouveaux utilisateurs le trouvent très
  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 insérer du texte, tapez i puis votre texte ;

  ·  pour effacer des caractères; 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 débutants est joe : en le lançant avec la
     commande jstar, vous obtiendrez les mêmes raccourcis-clavier que
     ceux de l'éditeur de DOSWin. jed en mode WordStar ou IDE est même
     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
  nécessite un livre en lui-même, 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 règles 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."
  ______________________________________________________________________





  1100..22..  ««EE--CC--iieezz»» ppaarr vvoouuss--mmêêmmee




  Sous UNIX, le langage du système 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 gâtés 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
  général 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 développement intégré), ni d'aide en
  ligne ou de débogueur intégré etc. Il s'agit juste d'un compilateur en
  ligne de commande brut de décoffrage, très puissant et efficace. Pour
  compiler votre hello.c de base, vous ferez :



       $ gcc hello.c




  ce qui créera un fichier exécutable appelé a.out. Pour donner un nom
  différent à l'exécutable, faites :



       $ gcc -o hola hello.c




  Pour intégrer une bibliothèque lors de l'édition de liens, ajoutez
  l'option -l<nomdebibli>. Par exemple, pour intégrer la bibliothèque
  mathématique :



       $ gcc -o progmath progmath.c -lm




  (L'option -l<nomdebibli> oblige gcc à intégrer la bibliothèque
  /usr/lib/lib<nomdebibli>.so; ainsi, -lm intègre /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-tête, 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 dépendances 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 sûr, LPM. Vous pouvez
  accéder à quelques aides sur les fonctions C, qui se trouvent dans les
  pages du man, à la section 3, par exemple,



       $ man 3 printf




  Pour déboguer vos programmes, utilisez gdb. Faites info gdb pour
  apprendre à vous en servir.

  De nombreuses bibliothèques sont disponibles ; les premières 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 bibliothèques qui transforment l'écriture de
  programmes X11 en une promenade de santé. Regardez donc du côté 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'apprécier.


  1111..  LLee 11%% rreessttaanntt


  En fait, il reste beaucoup plus que 1%...



  1111..11..  UUttiilliissaattiioonn ddee ttaarr eett ggzziipp


  Sous UNIX, il y a quelques applications très répandues 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
  obsolète et ne devrait plus être utilisé, ou gzip :



       $ compress <fic>
       $ gzip <fic>




  qui créent un fichier compressé portant l'extension .Z (compress) ou
  .gz (gzip). Ces programmes ne peuvent compresser qu'un fichier à la
  fois. Pour décompresser :



       $ 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
  (archivés avec tar, puis compressés 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





  1111..22..  IInnssttaallllaattiioonn dd''aapppplliiccaattiioonnss


  Tout d'abord : l'installation de paquetages est le travail de root. La
  plupart des applications Linux sont distribuées sous forme d'archives
  .tar.gz qui contiennent typiquement un répertoire portant un nom
  approprié où se trouvent tous les fichiers et/ou sous-répertoires. 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 distribuée sous forme de code source, que vous
  devrez compiler pour créer les binaires ; en général, 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 déballées à partir de / ; c'est
  notamment le cas pour les archives .tgz de Slackware. D'autres
  archives contiennent des fichiers mais pas de sous-répertoires --
  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 bénéficie d'une reconnaissance de plus en
  plus large ; pour installer un paquetage rpm, tapez :



       # rpm -i paquetage.rpm






  1111..33..  AAssttuucceess iinnddiissppeennssaabblleess


  LLee ddééffiilleemmeenntt eenn aarrrriièèrree : l'appui sur <SHIFT + PAG UP> (la touche
  grise) vous permet de remonter en arrière de quelques pages, en
  fonction de la quantité de mémoire vidéo dont vous disposez.


  LLee nneettttooyyaaggee ddee ll''ééccrraann : s'il vous arrive de faire more ou cat sur un
  fichier binaire, votre écran peut se retrouver rempli de caractères
  bizarres. Pour y remedier, tapez reset même si vous n'y voyez plus
  rien, ou entrez cete séquence de caractères : echo CTRL-V ESC c
  RETURN.

  LLee ccoollllaaggee ddee tteexxttee : dans la console, voyez plus loin ; sous X,
  cliquez et déplacez la souris en maintenant le bouton enfoncé pour
  sélectionner le texte dans une fenêtre 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,
  hélas) ; ne vous laissez pas perturber par son très long temps de
  réponse.

  LL''uuttiilliissaattiioonn ddee llaa ssoouurriiss : si vous avez installé gpm, un pilote de
  souris pour la console, alors vous pouvez cliquer et déplacer la
  souris sans relâcher le bouton pour sélectionner du texte, puis
  cliquer avec le bouton droit pour coller le texte sélectionné. Cela
  marche d'une console virtuelle à l'autre.

  MMeessssaaggeess éémmiiss ppaarr llee nnooyyaauu : 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 démarrage. La commande dmesg est
  également bien pratique.


  1111..44..  OOùù ttrroouuvveerr lleess aapppplliiccaattiioonnss


  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 «entrepôts» 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 idéaux pour
  commencer sont la «Linux Applications and Utilities Page» située à
  <http://www.xnet.com/ blatura/linapps.shtml>, et la page «officielle»
  de Linux à  <http://www.linux.org>.


  1111..55..  QQuueellqquueess ttrruuccss iimmppoossssiibblleess ssoouuss DDOOSS


  Linux peut faire tout un tas de choses qui étaient pénibles,
  difficiles ou impossibles sous DOS/Win. Voici une petite liste qui
  devrait vous ouvrir l'appétit :


  ·  at vous permet de lancer des programmes à des heures spécifiques ;

  ·  awk est un langages simple mais néanmoins puissant pour manipuler
     des fichiers de données (mais pas seulement). Par exemple, si
     data.dat est votre fichier contenant des données sur plusieurs
     champs,



       $ awk '$2   "abc" {print $1, "\t", $4}' data.dat





  affiche tous les premiers et quatrièmes champs de chaque ligne de
  data.dat dont le second champ contient «abc».

  ·  cron est utile pour effectuer des tâches de manière périodique, à
     des dates et des heures spécifiques. Tapez man 5 crontab.

  ·  file <nomdefichier> vous indique le type de nomdefichier (texte
     ASCII, exécutable, archive, etc.) ;

  ·  find (cf. également la section ``Répertoires : traduction de
     commandes'') est l'une des commandes les plus puissantes et les
     plus utiles. On l'utilise pour trouver des fichiers répondant à
     certaines caractéristiques, et pour effectuer des actions sur ceux-
     ci. L'utilisation de base de find est :




  $ find <repertoire> <expression>





  où  <expression> inclut les critères 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,
  après vous avoir demandé confirmation ;



       $ find . -perm +111





  trouve tous les fichiers dont les droits d'accès sont 111 (exécuta­
  bles) ;



       $ find . -user root





  trouve tous les fichiers appartenant à root. Il y a plein d'autres
  possibilités -- LPM ;


  ·  grep trouve des motifs de caractères 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 «gzippés». LPM ;

  ·  LLeess eexxpprreessssiioonnss rréégguulliièèrreess constituent un mécanisme complexe mais
     fichtrement puissant pour effectuer des opérations de recherche
     dans un texte. Par exemple, ^a[^a-m]X{4,}txt$ correspond aux lignes
     commençant par un «a», suivi d'un autre caractère ne se trouvant
     pas dans l'intervalle a-m, suivi de de 4 ou plus «X» et finissant
     en «txt». Les expressions régulières sont utilisées avec des
     éditeurs avancés, 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 débogage ;

  ·  sudo autorise les utilisateurs à effectuer certaines tâches de root
     (par ex. : le formatage et le montage des disques.  LPM) ;

  ·  uname -a vous renvoie de l'info sur votre système ;

  ·  zcat et zless sont utiles pour parcourir et rediriger des fichiers
     gzippés sans les décompresser. 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.


  1111..66..  EEnnttrraaîînneemmeenntt àà UUnniixx ssoouuss DDOOSS//WWiinnddoowwss


  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 mêmes outils de développement et
  utilitaires GNU que sous Linux ; vous n'aurez cependant ni la même
  stabilité ni les mêmes performances.

  Si vous voulez avoir un avant-goût de Linux, essayez Djgpp.
  Téléchargez et installez les fichiers suivants (au moment de la
  rédaction de ce document, la version la plus récente 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
  bouffée d'air frais. Pour le configurer correctement, éditez le
  fichier BOOT.BAT fourni pour l'adapter à votre configuration, mettez
  ensuite ces fichiers dans votre répertoire 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





  1111..77..  LLeess eexxtteennssiioonnss ccoouurraanntteess eett lleess pprrooggrraammmmeess ccoorrrreessppoonnddaannttss


  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 fabriquée 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 fabriquée avec gzip.

  ·  info : fichier info (espèce d'alternative aux pages man). Récupérez
     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, réupérez gs et,
     optionnellement ghostview ou gv.

  ·  rpm : paquetage Red Hat. Il est possible de l'installer sur
     n'importe quel système à l'aide du gestionnaire de paquetages rpm.


  ·  taz, tar.Z : archive fabriquée avec tar et compressée avec
     compress.

  ·  tgz, tar.gz : archive fabriquée avec tar et compressée avec gzip.

  ·  tex : fichier texte à fournir en entrée à TeX, un puissant système
     de composition de documents. Récupérez le paquetage tex disponible
     pour de nombreuses distributions.

  ·  texi : fichier texinfo, peut produire aussi bien des fichiers TeX
     et des fichiers info (cf. info). Récupérez texinfo.

  ·  xbm, xpm, xwd : fichiers graphiques.

  ·  Z : archive fabriquée avec compress.



  1111..88..  CCoonnvveerrssiioonn ddee ffiicchhiieerrss


  Si vous devez échanger des fichiers entre DOS/Windows et Linux,
  méfiez-vous du problème des «sauts de ligne». Sous DOS, chaque ligne
  se termine par CR/LF (plus précisément, 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
  caractère «M» ; un texte Linux apparaîtra sous DOS comme une ligne
  unique extrêmement longue et aucun paragraphe ne sera présent. Il
  existe quelques outils, dos2unix et unix2dos, pour convertir les
  fichiers.

  Si vos fichiers texte contiennent des caractères accentués, assurez-
  vous qu'ils ont été saisis sous Windows (avec Notepad) et non sous DOS
  ; sinon tous les caractères accentués seront joyeusement mélangés.



  Pour convertir des fichiers Word ou WordPerfect vers des fichiers
  texte pur, le sujet est un peu plus délicat 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>. Récupérez le paquetage
  word2x du répertoire /pub/tex/tools/, ou essayez l'un des paquetages
  disponibles dans le répertoire /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.


  1111..99..  SSuuiitteess bbuurreeaauuttiiqquueess ggrraattuuiitteess


  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 très bonne quoi qu'il en soit
  : elle offre de nombreuses fonctionnalités 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 téléchargement. Dois-je en dire
  plus ? Allez la récupérer sur :  <http://www.corel.com>.


  1122..  LLaa ffiinn,, dduu mmooiinnss ppoouurr ll''iinnssttaanntt


  Félicitations ! À présent, vous avez quelques notions d'UNIX et êtes
  prêt pour commencer à travailler. Souvenez-vous que votre connaissance
  du système est encore limitée, et qu'il est préférable d'avoir un peu
  plus de pratique de Linux pour l'utiliser confortablement. Mais si
  tout ce que vous aviez à faire était de récupérer 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'espère avoir été compréhensible et avoir rendu service à mes 3 ou 4
  lecteurs.


  1122..11..  DDrrooiittss dd''aauutteeuurr


  Sauf mentionné explicitement, les documents Linux HOWTO sont la
  propriété de leurs auteurs respectifs. Les documents Linux HOWTO
  peuvent être reproduits et distribués en totalité ou en partie, sur
  n'importe quel support physique ou électronique, à condition que cette
  note concernant les droits d'auteur soit présente sur toutes les
  copies. La redistribution commerciale est autorisée et encouragée ;
  cependant, l'auteur aimerait être tenu informé de toute distribution
  de ce type.

  Toute traduction, tous travaux dérivés ou toute compilation intégrant
  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 dérivé d'un HOWTO et d'imposer des
  restrictions supplémentaires à sa distribution. Des exceptions à ces
  règles peuvent être accordées sous certaines conditions ; veuillez
  contacter le coordinateur des Linux HOWTO à l'adresse indiquée ci-
  dessous.

  Bref, nous souhaitons promouvoir la dissémination de cette information
  à travers le plus grand nombre possible de canaux. Néanmoins, 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.



  1122..22..  RReessppoonnssaabbiilliittééss


  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 rédiger
  avec toute l'exactitude possible, mais l'utilisation que vous faites
  de l'information qu'il contient est à vos risques et périls. Je ne
  pourrai en aucun cas être tenu pour responsable de dommages résultant
  de l'utilisation de ce travail.

  Tout retour est le bienvenu. N'hésitez 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.

  11..  IInnttrroodduuccttiioonn

  11..11..  QQuu''eesstt--ccee qquuee ddoosseemmuu?

  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."

  11..22..  QQuueellllee eesstt llaa ddeerrnniieerree vveerrssiioonn ddee ddoosseemmuu 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.

  11..33..  CCoommmmeenntt ssuuiivvrree llee ddeevveellooppppeemmeenntt??

  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

  11..44..  QQuueellllee eesstt llaa ddooccuummeennttaattiioonn ddiissppoonniibbllee ppoouurr ddoosseemmuu?

  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.

  11..55..  CCoommmmeenntt ssoouummeettttrree ddeess ccoorrrreeccttiioonnss oouu aaddddiittiioonnss aa ccee HHOOWWTTOO??

  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. ]

  11..66..  UUnn ppeettiitt mmeessssaaggee ddee GGrreegg ......

  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.

  22..  CCoommppiilleerr eett iinnssttaalllleerr ddoosseemmuu

  22..11..  OOuu ssoonntt lleess iinnssttrruuccttiioonnss dd''iinnssttaallllaattiioonn??

  Les  instructions  d'installation  sont  dans  le  fichier  QuickStart
  present dans la distribution.

  22..22..  LLeess 1100 EErrrreeuurrss SSttuuppiiddeess lleess pplluuss ccoouurraanntteess aa ll''iinnssttaallllaattiioonn

  (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.

  22..33..  CCoommmmeenntt ccrreeeerr uunn eexxeeccuuttaabbllee ssiimmppllee ((ppaass ddee lliibbrraaiirriiee)) ??

  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.

  22..44..  CCoommmmeenntt ccrreeeerr ddeess bbiinnaaiirreess EELLFF ??

  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.

  22..55..  CCoommmmeenntt ccoommppiilleerr ddoosseemmuu ssuurr uunnee mmaacchhiinnee aayyaanntt ppeeuu ddee mmeemmooiirree ??

  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.

  22..66..  CCoommmmeenntt aacccceelleerreerr llaa ccoommppiillaattiioonn__??

  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).

  22..77..  CCoommmmeenntt ccoommppiilleerr ddee mmaanniieerree nnoonn--iinntteerraaccttiivvee__??

  En definissant do_DEBUG dans le Makefile, vous  aurez  -Wall  -g,  une
  compilation non-interactive et sans tex.

  22..88..  AAuuttrreess aassttuucceess ddee ccoommppiillaattiioonn ddee MMaarrttyy ......

  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.

  22..99..  FFaauutt--iill ccoommppiilleerr ddoosseemmuu ssoouuss ll''iiddeennttiittee ""rroooott""__??

  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.

  22..1100..  LLee MMaakkeeffiillee eesstt ddaannss uunnee bboouuccllee iinnffiinniiee ......

  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

  33..  CCoonnffiigguurraattiioonn dduu ddiissqquuee dduurr

  33..11..  CCoommmmeenntt ppuuiiss--jjee uuttiilliisseerr mmoonn ddiissqquuee dduurr aavveecc ddoosseemmuu?

  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 hhoommee 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.

  33..22..   PPuuiiss--jjee  uuttiilliisseerr  uunn  ddiissqquuee  ccoommpprreessssee  aavveecc  ssttaacckkeerr//ddoouubbllee--
  ssppaaccee//ssuuppeerr--ssttoorree??

  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."

  44..  PPoorrttss sseerriieess,, ppaarraalllleelleess eett ssoouurriiss

  44..11..  OOuu ssoonntt lleess ppiillootteess ppoouurr lleess ssoouurriiss ((ccoommppaattiibblleess mmiiccrroossoofftt))??

  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)

  44..22..  PPoouurrqquuooii llee ppiilloottee ddee mmaa ssoouurriiss nnee ffoonnccttiioonnnnee--tt--iill ppaass??

  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.

  44..33..  PPoouurrqquuooii ddoosseemmuu 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).

  44..44..  CCoommmmeenntt uuttiilliisseerr ddoosseemmuu 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.

  44..55..  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr lleess ppoorrttss ppaarraalllleelleess ??

  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.

  55..  MMuullttii--uuttiilliissaatteeuurrss eett sseessssiioonnss nnoonn--iinntteerraaccttiivveess

  55..11..  EEsstt--iill ppoossssiibbllee dd''uuttiilliisseerr ddoosseemmuu 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.]

  55..22..   CCoommmmeenntt eexxeeccuutteerr ddeess ccoommmmaannddeess DDOOSS ddee mmaanniieerree nnoonn--iinntteerraaccttiivvee ??

  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 !

  66..  ddoosseemmuu and Netware

  66..11..  CCoommmmeenntt aacccceeddeerr aa NNeettwwaarree ddeeppuuiiss ddoosseemmuu?

  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.

  66..22..  NNeettwwaarree--HHOOWWTTOO

  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/.--)

  77..  ddoosseemmuu et X-Window

  77..11..   EEsstt--iill ppoossssiibbllee dd''uuttiilliisseerr ddoosseemmuu 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.]

  77..22..  EEsstt--iill ppoossssiibbllee dd''uuttiilliisseerr ddoosseemmuu 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

  77..33..  LL''eemmuullaattiioonn aannssii ffoonnccttiioonnnnee--tt--eellllee ccoorrrreecctteemmeenntt ??

  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.

  88..  ddoosseemmuu eett MMSS--WWiinnddoowwss 33..11

  88..11..  EEsstt--iill ppoossssiibbllee ddee llaanncceerr MMSS--WWiinnddoowwss 33..11 ssoouuss ddoosseemmuu ??

  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 _!_!_!

  99..  VViiddeeoo eett ssoonn

  99..11..  PPeeuutt--oonn uuttiilliisseerr lleess jjeeuuxx 3322--bbiittss ssoouuss ddoosseemmuu ??

  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  !

  99..22..  EEnn qquuiittttaanntt ddoosseemmuu, 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.

  99..33..  CCoommmmeenntt uuttiilliisseerr ddoosseemmuu 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.

  99..44..  PPoouurrqquuooii lleess pprrooggrraammmmeess lliivvrreess aavveecc mmaa ccaarrttee  ssoonn  nnee  ffoonnccttiioonn--
  nneenntt--iillss ppaass ssoouuss ddoosseemmuu?

  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 :-)

  1100..  AAuuttrreess mmaatteerriieellss

  1100..11..  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr mmoonn ppeerriipphheerriiqquuee xxxxxxxxxx aavveecc ddoosseemmuu?

  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?

  1111..  PPrroobblleemmeess eett ssoolluuttiioonnss

  1111..11..  ddoosseemmuu ss''eesstt ppllaannttee eett jjee nnee ppeeuuxx pplluuss rriieenn ttaappeerr

  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".

  1111..22..  JJ''aaii mmiiss ddee ll''EEMMSS ddaannss ddoosseemmuu..ccoonnff, mais cela ne fait rien.

  Rob Janssen (rob@pe1chl.ampr.org) (11/07/94) :

  N'oubliez pasde charger ems.sys depuis le config.sys.

  1111..33..  CCoommmmeenntt mmee ddeebbaarraasssseerr ddee ttoouuss cceess mmeessssaaggeess ""ddiisskk cchhaannggee"?

  (11/08/94)

  Installez klogd.

        sunsite.unc.edu:/pub/Linux/system/Daemons/sysklogd1.2.tgz

  1111..44..  aapprreess eettrree rreevveennuu eenn mmooddee ccoonnssoollee??  PPoouurrqquuooii ddoosseemmuu 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.

  1111..55..  PPoouurrqquuooii ddoosseemmuu 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.

  1111..66..  CCoommmmeenntt aacccceelleerreerr ddoosseemmuu?

  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.

  1111..77..  MMoonn lleecctteeuurr ddee CCDD--RROOMM aa qquueellqquueeffooiiss ddeess pprroobblleemmeess ppoouurr  aacccceeddeerr
  aa cceerrttaaiinnss ffiicchhiieerrss ssoouuss ddoosseemmuu.

  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.

  1111..88..  CCoommmmeenntt oobbtteenniirr ddeess iinnffoorrmmaattiioonnss ddee ddeebboogguuaaggee??

  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.

  1111..99..   PPoouurrqquuooii  lleess  ccaarraacctteerreess  qquuee  jj''eennttrree  aauu  ccllaavviieerr  ssoonntt--iillss
  aaffffiicchheess ddddeeeeuuuuxxxx ffooiiss??

  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).

  1122..  SSii vvoouuss vvoouulleezz ppaarrttiicciippeerr aauu pprroojjeett ddoosseemmuu

  1122..11..  QQuuii eesstt llee ccoooorrddiinnaatteeuurr ddee ddoosseemmuu?

  (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.

  1122..22..  HHiissttoorriiqquuee ddee ddoosseemmuu

      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

  1122..33..  JJ''aaiimmeerraaiiss ppaarrttiicciippeerr.. QQuuii ddooiiss--jjee ccoonnttaacctteerr??

  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 expérimentés à suivre l'état du
  marché de Linux. Il ne cherche pas à couvrir de manière exhaustive
  toutes les distributions pour toutes les plate-formes, mais vise par­
  ticulièrement les principales distributions en langue anglaise pour
  INTEL disponibles sur CD-ROM et accessibles aux néophytes.
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 Nouvelles versions de ce document
     1.2 Changements récents
     1.3 Aperçu 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 entrée
     3.3 Instructions pour la soumission

  4. Aspects administratifs

     4.1 Conditions d'utilisations
     4.2 Remerciements


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  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 présenter brièvement 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é géré par Marco
  Budde mais semble avoir disparu.  Il n'y a pas à notre connaissance de
  distributions de Linux dans d'autres langues.

  L'information présentée ici n'est pas complète. Il existe d'autres
  distributions Linux que celles qui sont citées 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 manière "une distribution". Un
  document comme celui-ci doit donc imposer une certaine limite. J'ai
  choisi le critère : "disponible sur CD", ce qui ne constitue en aucun
  cas une définition 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 présentée ici n'est pas complète. Il existe d'autres
  distributions Linux que celles qui sont citées ici. Si vous êtes
  associés à 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 complète de distributions (mais avec moins
  d'informations sur chacune d'elles), se référer à la Linux HQ
  Distributions List <http://www.linuxhq.com/dist-index.html>.

  DDéénnééggaattiioonn :: Nous n'offrons absolument _a_u_c_u_n_e garantie sur
  l'exactitude des informations, prix et détails de commande donnés dans
  ce document. Vérifiez la date de dernière modification d'une entrée
  pour avoir une idée 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 idées sur l'état du marché Linux. Si elles vous
  intéressent, vous les trouverez à la section ``Recommandation de
  l'éditeur''.

  DDiivvuullggaattiioonn :: Je (esr) n'ai aucun lien financier avec un quelconque
  vendeur Linux, ni n'ai accepté de rémunération ou de condition de la
  part d'un vendeur en dehors d'un produit gratuit à l'essai (et un T-
  shirt de Red Hat).


  11..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  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 dernière version de ce Howto sur le web à
  l'adresse  <http://metalab.unc.edu/mdw/HOWTO/Distribution-HOWTO.html>.

  La traduction française est postée 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'hésitez 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 générales à propos de Linux ni me demander de
  l'aide dans le choix d'une distribution à moins que vous ne soyez
  disposés à me payer au tarif habituel. Je n'ai pas le temps d'y
  répondre, et j'ai mis tout ce que je sais sur le choix d'une
  distribution dans ce document.


  11..22..  CChhaannggeemmeennttss rréécceennttss

  Yggdrasil Plug-And-Play et Craftworks Linux ne semblent plus être
  diponible à la vente, et on été otées de ce document. DOSLINUX a
  également été omise à cause de sa nature particulière.




  11..33..  AAppeerrççuu dduu mmaarrcchhéé LLiinnuuxx

  Au début (disons, en 1993), une distribution Linux était quelque chose
  que l'on téléchargeait d'Internet sur des disquettes. L'installation
  était un processus laborieux et les frustrations répétées liées aux
  supports défectueux étaient la mesure.

  Ensuite vinrent les lecteurs de CD-ROM bon marché et le CD-ROM, un
  média parfaitement adapté à l'expédition peu onéreuse de gros volumes
  de logiciels de systèmes d'exploitation. Toute une mini-industrie
  s'est créée 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 désormais la
  seule distribution non-commerciale d'une certaine importance, et même
  elle semble être propagée 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 développeurs. 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 très utile). Pour les détails
  liés à l'installation proprement dite, consultez le Howto sur
  l'installation de Linux,
  <http://metalab.unc.edu/mdw/HOWTO/Installation-HOWTO.html>, en
  français à  <http://www.freenix.fr/linux/HOWTO/Installation-
  HOWTO.html>.

  Le prix de ces distributions de Linux pour processeurs Intel varie de
  $20 à $50 (la différence peut être tout à fait justifiée).  Plusieurs
  vendeurs proposent des abonnements qui abaissent le coût par CD pour
  les mises à jour durant la période concernée.

  Les prix sont assez bien corrélés avec les caractéristiques et les
  qualités (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
  rentabilisés au travers de bien moins de réinstallations et problèmes
  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 curée a été encore pire
  parmi les distributions non-commerciales; en fait, il n'y a que Debian
  qui survive dans ce rôle.

  Par conséquent, l'ancienne structure en trois tiers composée des
  créateurs de distributions, des redistributeurs à valeur ajoutée et
  des vendeurs de CD à la pelle qui définissait le marché à quasiment
  disparu. Pour être compétitive 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 créateur majeur de distribution, même si elle
  n'en est pas une. Donc, si vous faites attention à ce qu'une
  distribution ait été gelée récemment, vous ne risquez pas beaucoup de
  vous retrouver avec une distribution nulle.


  11..44..  RReeccoommmmaannddaattiioonnss ddee ll''ééddiitteeuurr


  Ci-dessus les faits, ici mes opinions (pour ce qu'elles valent, et
  avec les précautions d'usage des conseils gratuits). Rien ne
  remplacera votre propre évaluation basée sur votre expérience et les
  données de ce guide. Mes opinions sont ici davantage pour expliquer
  mes éventuelles tendances que pour vous guider.

  Des débuts 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
  supérieure, sa vaste collection d'applications et sa politique avisée
  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é dépassés 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 considère
  comme les leaders actuels du marché.

  Si pour des motifs idéologiques 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 considérées comme
  incontournables. Les diverses distributions Linux sont optimisées en
  fonction de divers besoins, et les vôtres peuvent très bien être mieux
  servis par une autre (en particulier si contrairement à moi vous êtes
  plutôt un utilisateur de DOS et cherchez une distribution prévue pour
  cohabiter avec).

  De plus, le status de l'industrie est très volage. Au moment où vous
  lirez ces lignes, Red Hat ou Debian peuvent très bien avoir coulé,
  remplacés par de nouveaux venus aux dents longues.


  22..  LLeess ddiissttrriibbuuttiioonnss LLiinnuuxx

  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 réseau
  (mais les commerciales ne vous donnent dans ce cas pas accès au
  support). Elles sont spécifiquement assemblées et non pas simplement
  redistribuées à partir d'une distribution existant sur le réseau.

  Elles sont listées par ordre alphabétique.


  22..11..  CCaallddeerraa OOppeennLLiinnuuxx


     DDiissttrriibbuutteeuurr ::
        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


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        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 complète est incluse dans les
        produits Base et Standard). OpenLinux Lite peut être téléchargé
        depuis le site FTP de Caldera ou obtenu sur CD pour l'équivalent
        des frais d'expédition. Il est aussi prévu 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 système Linux complet, facile à installer, avec un bureau
        intégré, des clients et serveurs Internet et Intranet. OpenLinux
        Base inclut Netscape Navigator et une documentation complète.

        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 accès à un monde informatique
        nouveau et performant, même 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 systèmes coûtant des miliers de dollars.
        OpenLinux vous offre aussi  :


     ·  Un véritable multitâche exécutant plusieurs applications textes
        ou graphiques en même temps, aucune application ne peut planter
        une autre, contrairement à d'autres systèmes moins robustes.

     ·  Le noyau Linux 2.0 offre un accès TCP/IP à Internet super
        rapide, ainsi que des pilotes de périphériques chargeables pour
        l'utilisation la plus efficace des ressources de votre système.

     ·  Une installation rapide et simple avec des menus et la détection
        automatique de votre matériel rendent l'installation très facile
        sur la plupart des systèmes. Le Getting Started Guide (inclus)
        propose une marche à suivre illustrée et des conseils de
        dépannage.

        Aucun autre système Linux n'inclut un bureau intégré complet
        avec des outils de configuration et un éditeur graphique. Ses
        possibilités de glisser-déposer sont déjà configurées avec des
        milliers d'icônes et de réglages. Le bureau offre un espace
        pratique où vous pouvez déposer vos programmes et fichiers de
        données favoris pour un accès immédiat. Le bureau vous offre  :


     ·  Démarrage des programmes par glisser-déposer des documents.

     ·  Un éditeur de textes graphique intégré.

     ·  L'accès facile à un ensemble d'outils puissants de configuration
        du système.

     ·  Une barre d'icônes configurable, une disposition personnalisée
        et la sélection des préférences.

     ·  Un puissant gestionnaire de fichiers utilisant le glisser-
        déposer ou des boîtes de dialogues graphiques.
     CCoommmmaannddee ::
        Par email avec clé PGP, par téléphone, par fax ou par
        correspondance.  Détails complets à
        <http://www.caldera.com/mpro/orinfo/orderinfo.html>.


     SSuuppppoorrtt ::
        Caldera est l'un des seul distributeurs Linux à offrir un
        support par E-mail et par téléphone. Les utilisateurs de
        OpenLinux Base (seulement E-mail) et Standard (téléphone 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 complète de
        Caldera Desktop, avec une licence illimitée. OpenLinux Lite
        comprend une version d'évaluation du Desktop valable 90 jours.


     DDaattee ddee ddeerrnniièèrree mmooddiiffiiccaattiioonn ::
        mai 1998 (?)


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ddee ll''eennttrrééee ::
        13 août 1998


  22..22..  LLaa ddiissttrriibbuuttiioonn LLiinnuuxx ddee DDeebbiiaann


     DDiissttrriibbuutteeuurr ::
        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>


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Debian Linux est le résultat d'un effort volontaire de créer une
        distribution Linux non-commerciale de haute qualité. Debian
        Linux 2.0 est un système d'exploitation compatible UNIX complet
        et opérationnel pour ordinateurs personnels. Le système utilise
        des exécutables ELF ainsi que la libc6 (contrairement aux
        versions précédentes 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 systèmes. Le support des shadow
        passwords est disponible, bien qu'il doit être considéré comme
        expérimental dans la version 1.1. Des paquetages non libres
        peuvent également être obtenus, ce qui fait de Debian un système
        complet.

        Les avantages de Debian Linux sont son évolutivité,
        l'interdépendance bien établie entre les paquetages et son mode
        de développement ouvert. Elle est la seule distribution de Linux
        a être développée en coopération par plusieurs personnes via
        Internet, dans le même esprit que Linux et d'autres systèmes
        "open source". Plus de 400 personnes maintiennent à jour environ
        1500 paquetages et améliorent Debian Linux. Un système
        sophistiqué de suivi de bogues permet aux utilisateurs de
        soumettre facilement bogues et problèmes de sécurité, qui sont
        rapidement pris en charge par la communauté Debian. Une nouvelle
        version du paquetage arrivera bientôt sur les sites archives FTP
        connus.

        Debian Linux est une distribution très dynamique. Des versions
        "instantanées" sont faites à peu près 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 intéressés à rejoindre ce projet, vous êtes invités
        à 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.


     AAccccèèss ppaarr IInntteerrnneett ::
        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/>


     DDaattee ddee ddeerrnniièèrree mmooddiiffiiccaattiioonn ::
        24 juillet 1998 (2.0)


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ddee ll''eennttrrééee ::
        13 août 1998


  22..33..  LLiinnuuxx PPrroo


     DDiissttrriibbuutteeuurr ::
        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>


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        La charte du CD Linux Pro de WGS est différente des autres
        distributions sur le marché. Nous nous efforçons de faire
        pénétrer Linux dans le marché commercial. Tout ce que nous
        faisons vise à augmenter la taille de la comunauté Linux et à
        aider Linux à devenir LE seul véritable système d'exploitation,
        et non pas un parmi d'autres.

        WGS Linux Pro consiste en notre principal CD Linux "Stable",
        pour lequel nous sélectionnons ce que nous considérons comme
        étant la meilleure distribution disponible. Ensuite, nous
        procédons à des corrections de bogues et autres améliorations
        mineures. Ce CD contient souvent des logiciels qui n'en sont pas
        à leur dernière version, à l'égide du principe selon lequel "le
        plus récent 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
        considérée comme une distribution Linux primaire. En option,
        outre notre CD principal, nous offrons des CD supplémentaires
        avec tous les logiciels Linux les plus récents (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 supplémentaires. Nous
        complétons ces CD au fur et à mesure que de nouveaux logiciels
        sont disponibles. Même avec tout cela, les prix de nos produits
        sont très 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 même plus !

        La version actuelle est la 4.0a, le noyau est le 1.2.13 et le
        2.0.x est sur le CD prêt à être installé.


     AAccccèèss ppaarr IInntteerrnneett ::
        La liste des produits de WGS et les dernières informations à
        propos du CD-ROM se trouvent à  <http://www.wgs.com>.


     CCoommmmaannddee ::
        WGS Linux Pro est disponible sur CD chez les vendeurs et
        distributeurs du monde entier, et bientôt sur notre site FTP.

        Vous pouvez nous contacter par téléphone, fax, email ou nous
        écrire pour acheter ou avoir plus d'information. Nous nous
        réjouissons de répondre à vos questions. Nous acceptons American
        Express, Visa, Discover, et MasterCard.


     DDiivveerrss ::
        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 expérience de Linux
        plus complète et enrichissante. Venez nous voir !


     DDaattee ddee ddeerrnniièèrree mmooddiiffiiccaattiioonn ::
        1 octobre 1996.


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ddee ll''eennttrrééee ::
        13 mars 1997


     CCoommmmeennttaaiirree ddee ll''ééddiitteeuurr ::
        Ils qualifient leur distribution actuelle de "Red Hat 3.03
        plus".


  22..44..  RReedd HHaatt LLiinnuuxx


     DDiissttrriibbuutteeuurr ::
        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>


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Red Hat 6.0 est basée 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 emmène directement sous X pour la grande partie
        de l'installation. Notre script de création de disquette de
        démarrage en facilite la sélection et sauvegarde votre
        configuration réseau 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 télécharger que 3
        images de disquettes -- le reste est fait automatiquement ! Et
        finalement, l'installation inclut le support des périphériques
        PCMCIA -- l'installation de Red Hat sur votre portable est aussi
        facile que sur votre machine de bureau !

        Après avoir installé Red Hat une fois, vous n'aurez plus jamais
        besoin de réinstaller Linux ! le nouveau système de paquetages
        RPM est suffisamment sophistiqué pour vous permettre de passer à
        une nouvelle version de Red Hat sans devoir tout réinstaller :
        plus de partitionnement, de backup, de prise de tête.


     CCoommmmaannddee ::
        Disponible directement auprès 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 indiqués sont de $49.95 pour la version Intel et
        de $99.95 pour les versions Sparc et Alpha.


     DDaattee ddee ddeerrnniièèrree mmooddiiffiiccaattiioonn ::
        10 mars 1999.


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ddee ll''eennttrrééee ::
        7 juin 1999.


     CCoommmmeennttaaiirree ddee ll''ééddiitteeuurr ::
        Le gros avantage de cette distribution, c'est RPM, le Red Hat
        Package Manager. Ce logiciel marque un net progrès; il permet
        d'installer et de dés-installer proprement des applications et
        des composants du système, y compris le noyau et la base du
        système elle-même. RPM est désormais utilisé par la plupart des
        autres distributions mis à part Debian.


  22..55..  TTrraannss--AAmmeerriitteecchh LLiinnuuxxwwaarree


     DDiissttrriibbuutteeuurr ::
        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


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Trans-Ameritech a publié 10 versions de Linux jusqu'au début
        1997. Trans-Ameritech a traditionellement défini de nouveaux
        standards combinant simplicité d'utilisation et facilité
        d'installation, même pour un utilisateur débutant, avec sa ligne
        de CD-ROM LinuxWare. C'est un système d'exploitation souple et
        facile à installer, destiné aussi bien à ceux qui veulent
        apprendre Unix qu'aux techniciens, étudiants et utilisateurs
        domestiques.


     ·  Les nouveaux utilisateurs apprécieront le programme de
        configuration présent sur le CD, basé sur Windows.

     ·  Pour minimiser les conflits matériels potentiels de nombreux
        noyaux sont fournis pour diverses configurations. Ils peuvent
        être utilisés aussi bien pour l'installation qu'en exploitation
        normale.

     ·  De nombreux documents sont fournis en ligne pour des références
        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 réseau TCP/IP, avec UUCP, SLIP, CSLIP, PPP

     ·  L'accès à 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 ingénieurs électriciens et les amateurs
        de HAM

     ·  Les librairies et fichiers en-tête 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 multimédia Andrew

     ·  L'envoi et la réception 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
        fréquemment utilisées sont décompressées et peuvent être
        utilisées directement depuis le CD-ROM.

        Un système de fichier Linux décompressé est disponible pour
        référence et économie de place disque. Vous pouvez exécuter des
        programmes directement depuis le CD-ROM. Il y a un gros
        répertoire info pour les documents en ligne ainsi que les pages
        du manuel.

        Les sources décompressées de FreeBSD et NetBSD sont fournies à
        titre de référence.

        Notre distribution est destinée aux utilisateurs de Windows et
        DOS qui veulent une migration en douceur, plutôt qu'aux experts
        UNIX.


     CCoommmmaannddee ::
        Les commandes par Email sont acceptée à 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 crédit (VISA, MC, AmEx,
        Discovery), veuillez indiquer le numéro 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'élèvent à $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 résidents de l'Etat de Californie doivent ajouter 7.75% de
        taxes.

        Un abonnement d'une année (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.


     DDiivveerrss ::
        Si vous avez d'autres questions, veuillez nous contacter par
        Email  : info@trans-am.com or order@trans-am.com.


     DDaattee ddee ddeerrnniièèrree mmooddiiffiiccaattiioonn ::
        Janvier 1997 (Supplement 5)


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ddee ll''eennttrrééee ::
        13 août 1998
  22..66..  SSllaacckkwwaarree


     DDiissttrriibbuutteeuurr ::
        Walnut Creek CDROM
        4041 Pike Lane, Suite D
        Concord, CA  94520

        Net : info@cdrom.com (information), order@cdrom.com (commandes),
        support@cdrom.com (support).


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        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, basée sur le
        noyau 2.0.34.

        Slackware Linux est une distribution complète du système
        d'exploitation Linux prévue pour des ordinateurs 386/486 avec un
        lecteur de disquette 3.5" et un lecteur de CD-ROM.


     AAccccèèss ppaarr IInntteerrnneett ::
        WWW :  <http://www.cdrom.com/titles/os/slack96.htm>
        FTP :  <ftp:ftp.cdrom.com/pub/linux/slackware>


     CCoommmmaannddee ::
        Le coût du set de CD-ROM de Walnut Creek est de $39.95.


     DDaattee ddee ddeerrnniièèrree mmooddiiffiiccaattiioonn ::
        juillet 1998 (3.5)


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ddee ll''eennttrrééee ::
        13 août 1998



  22..77..  SS..uu..SS..EE..


     DDiissttrriibbuutteeuurr ::
        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


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        Linux S.u.S.E. offre aux utilisateurs de tous niveaux, du
        néophyte à l'expert, un accès 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 démarrage
        modulaire, un livre de référence de 400 pages et un outil
        d'administration système propre à S.u.S.E, YaST, permettent de
        mettre sur pied un système Linux rapidement et de le maintenir
        au cours du temps.

        En outre S.u.S.E. offre une série de serveurs X supportant les
        cartes les plus récentes. Ces serveurs sont développés en
        coopération avec l'équipe de XFree86 (tm). Vous trouverez plus
        de détails à l'URL  <http://www.suse.de/XSuSE>.

        Nouveautés 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 aperçu des autres possibilités :


     ·  Le système Linux, plus de 875 packages logiciels parmi lesquels
        les sources complètes et un système de fichier opérationnel, sur
        4 CD-ROMs

     ·  Livre de référence de 400 pages

     ·  Packages au format RPM; les packages TGZ peuvent être installés

     ·  Concept de boot compatible System V, respect du "file system
        standard"

     ·  Utilitaire d'installation et d'administration, 'YaST' pour
        configurer le réseau, ISDN, e-mail, l'imprimante, le système X
        Window

     ·  Les serveurs X S.u.S.E. qui supportent les nouvelles cartes

     ·  Administration des systèmes de fichiers, utilisateurs et groupes

     ·  Configuration automatique de plusieurs "window managers"

     ·  Aide et documentation en ligne

     ·  Mode démo, depuis le CD-ROM ou une partition DOS


     CCoommmmaannddee ::
        Téléchargeable depuis  <ftp://ftp.suse.com/pub/SuSE-Linux>.
        Pour le CD-ROM avec support, par téléphone, WWW sécurisé, 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


     SSuuppppoorrtt ::
        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.


     DDaattee ddee ddeerrnniièèrree mmooddiiffiiccaattiioonn ::
        pas connue.


     DDeerrnniièèrree mmooddiiffiiccaattiioonn ddee ll''eennttrrééee ::
        13 août 1998 (5.3)


  33..  SSoouummiissssiioonnss àà ccee ddooccuummeenntt


  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).


  33..11..  TTyyppeess ddee ssoouummiissssiioonnss

  Nous sommes intéressés par des soumissions concernant  :


  ·  Des distributions complètes de Linux, disponibles par FTP anonyme,
     UUCP ou par correspondance. Par 'distribution complète' on entend
     un ensemble pouvant être utilisé pour construire un système Linux
     _e_x_-_n_i_h_i_l_o.

  ·  Des composants ou des logiciels à part entière disponibles
     uniquement par correspondance. Si vos paquetages sont disponibles
     par FTP anonyme, les gens peuvent les trouver. Cette catégorie
     inclut notamment les logiciels commerciaux portés 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 intérêt pour ces produits est marginal -
     ceci reste le Howto sur les distributions Linux, pas un catalogue
     de gadgets Linux déjantés. Ce que vous vendez devra être (a) très
     utile, (b) très original ou (c) très drôle pour apparaître ici.

  Si le nombre de soumissions pour des services et composants le
  justifie, je créerai un Howto séparé.


  33..22..  CCoommmmeenntt ssoouummeettttrree uunnee eennttrrééee

  Pour soumettre une entrée 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
  nécessaire, mais j'aimerais garder chaque entrée en deçà d'environ 50
  lignes.


     NNoomm ::
        _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_.


     DDiissttrriibbuutteeuurr ::
        _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_.


     DDeessccrriippttiioonn dduu ffoouurrnniisssseeuurr
        _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_._._.
     AAccccèèss ppaarr IInntteerrnneett ::
        _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_.


     CCoommmmaannddee ::
        _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_._._.


     SSuuppppoorrtt ::
        _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_.


     DDiivveerrss ::
        _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_.


     DDaattee ddee ddeerrnniièèrree mmooddiiffiiccaattiioonn ::
        _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_.


  33..33..  IInnssttrruuccttiioonnss ppoouurr llaa ssoouummiissssiioonn

  Veuillez soumettre des entrées aussi courte que possible. Si vous avez
  besoin d'y mettre un grand volume d'informations, donnez une référence
  à un site FTP ou une adresse où l'on pourra les trouver; ces entrées
  sont seulement faites pour donner des références 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 sûrement vos entrées en partie si j'y trouve des
  informations sans importance, ou si l'entrée 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 entrées pour
  d'autres matétiels, 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 désirez pas que votre entrée soit reprise dans un autre document,
  précisez-le s'il vous plaît.


  44..  AAssppeeccttss aaddmmiinniissttrraattiiffss


  44..11..  CCoonnddiittiioonnss dd''uuttiilliissaattiioonnss

  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 numéro de version et la date.

  ·  Ne supprimiez ou modifiez pas le lien vers la version actuelle sur
     le Web.


  ·  Marquiez clairement toute version condensée ou altérée comme telle.

  Ces restrictions visent à protéger les lecteurs potentiels de versions
  dépassées ou déformées. Si vous pensez avoir un motif justifiant une
  exception, contactez-moi.


  44..22..  RReemmeerrcciieemmeennttss

  Ce document à été crée à l'origine par Bill Riemers. Matt Welsh en a
  maintenu la deuxième version. Erik Troan l'a ensuite maintenu jusqu'à
  la version 3.0.

  En janvier 1995 Eric Raymond, ignorant l'existence de ce document,
  commença à développer 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 début avril 1995, Erik alla travailler pour Red Hat
  Software et (voulant éviter un conflit d'intérêt) passa le document à
  Eric. Eric rassembla bon nombre de nouvelles informations et ajouta
  plusieurs nouveaux champs aux entrées des distributions.

  Par conséquent, ce document a été une sorte de collaboration en série.
  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 française : 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
  périphériques Ethernet qui peuvent être utilisés avec Linux, et la
  façon de les mettre en oeuvre. Notez que ce _H_o_w_t_o se limite à l'aspect
  matériel 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 matières





















































  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 câbles que votre carte peut accepter

  3. Foire Aux Questions (FAQ) - Les questions fréquemment posées

     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 Problèmes avec les cartes NE1000 / NE2000 (et leurs clones)
     3.5 Problèmes avec les cartes SMC Ultra/EtherEZ et WD80*3
     3.6 Problèmes avec des cartes 3Com
     3.7 Les questions qui ne sont pas spécifiques à une carte.
        3.7.1 Linux et les cartes Ethernet ISA Plug and Play
        3.7.2 Carte Ethernet non détectée au démarrage.
        3.7.3 (TT
        3.7.4 Une machine PCI détecte la carte mais la procédure de test du pilote échoue.
        3.7.5 Des cartes ISA à mémoire partagée ne fonctionnent pas dans une machine PCI (
        3.7.6 On dirait que ma carte envoie des données, mais elle ne reçoit 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-mère 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 réception (RX Errors) et en transmission (TX Errors)
        3.7.20 Liens dans
        3.7.21 Linux et les ``trailers'' (amorces)
        3.7.22 Accès direct au périphérique Ethernet

  4. Trucs et astuces à propos des performances

     4.1 Concepts génériques
     4.2 La vitesse des cartes et du bus ISA
     4.3 Modifier la fenêtre de réception TCP
     4.4 Augmenter les performances de NFS

  5. Informations spécifiques par distributeur/constructeur/modèle

     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 parallèle (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 embarquée 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 associés.
        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 contrôleur d'interface réseau (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 périphériques Non-Ethernet

  6. Câbles, Coaxial, Paire Torsadée

     6.1 Ethernet fin (thinnet)
     6.2 Paire torsadée
     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 Entrées/Sorties programmées contre mémoire partagée contre DMA
        8.1.1 Entrées/Sorties (E/S) programmées (NE2000, 3c509, etc.)
        8.1.2 Mémoire partagée (WD80x3, SMC-Ultra, 3c503, etc.)
        8.1.3 Accès Direct à la Mémoire (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 Détection 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 réception (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 basées 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 réseau avec un portable

     9.1 Utiliser SLIP (Serial Line IP, IP sur liaison série)
     9.2 Support PCMCIA
     9.3 Carte Ethernet ISA dans la station d'accueil.
     9.4 Adaptateurs de poche et sur port parallèle.

  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 associés
     10.4 Désistement de responsabilité et Copyright
     10.5 Conclusion


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  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 même
  temps et d'autres problèmes et questions classiques.  Il contient des
  informations détaillées 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 décrit
  dans le _N_E_T_-_3_-_H_o_w_t_o. Notez aussi que les questions générales sur
  Ethernet, non liées spécifiquement à Linux, ne sont pas traitées 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 même manière que vous obtenez les FAQs des
  autres forums.

  La présente 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 première 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 française. Consultez le désistement de
  responsabilité (section ``Désistement 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 réussir a casser...'.


  La version française est de :

  Mathieu Arnold, arn_mat@club-internet.fr.



  11..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document peuvent être rapatriées 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
  récupéré depuis divers sites miroirs WWW/FTP de Linux.

  (NDT : En France, vous préférerez utiliser le site suivant pour le
  document originel :

  Miroir de Sunsite <ftp://ftp.lip6.fr/pub/linux/sunsite/docs/HOWTO/>

  ou, mieux, la version française :

  Archive des HOWTO français sur LIP6
  <ftp://ftp.lip6.fr/pub/linux/french/HOWTO/>

  Archive des         HOWTO français chez Freenix
  <http://www.freenix.org/unix/linux/french/HOWTO/>)

  Des mises à jour seront réalisées au fur et à mesure de l'arrivée 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 vérifier 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 références croisées qui ne sont pas
  incluses dans le format texte ASCII.



  11..22..  EEtthheerrnneett--HHoowwttoo,, mmooddee dd''eemmppllooii

  Comme ce guide devient de plus en plus gros, vous n'avez certainement
  pas l'intention de passer la fin de votre après-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 possèdent une table
  des matières 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 vérifier. La prochaine section (``Au         secours -
  Ca ne marche pas~!'') est destinée aux néophytes de Linux et vous
  indiquera la bonne direction.

  Typiquement, les mêmes problèmes et les mêmes questions sont posés
  _s_a_n_s _a_r_r_ê_t par des personnes différentes. Il y a des chances que votre
  problème ou votre question spécifique soit l'une de ces questions
  fréquemment posées, et qu'elle trouve sa réponse 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 déjà une carte Ethernet mais que vous n'êtes pas sûr(e)
  de pouvoir l'utiliser avec Linux, lisez donc la section qui contient
  les informations spécifiques à chaque constructeur, et à ses cartes.
  (Voir ``Informations Spécifiques...'')

  Si vous êtes intéressé(e) par l'un des aspects techniques des pilotes
  de périphériques de Linux, allez donc consulter la
  section ``Informations Techniques'' qui contient ces informations.



  11..33..  AAuu sseeccoouurrss !! -- CCaa nnee mmaarrcchhee ppaass !!

  Bon, ne paniquez pas. Cette section va vous indiquer le chemin à
  suivre pour que les choses fonctionnent, même si vous n'avez pas de
  connaissances préalables sur Linux ou le matériel Ethernet.

  La première chose à faire est de trouver quel est le modèle de votre
  carte, afin de pouvoir déterminer si Linux dispose d'un pilote pour
  cette carte-là. Des cartes différentes sont typiquement contrôlées de
  façon différente par l'ordinateur qui les accueille, et le pilote de
  périphérique de Linux (s'il en existe un) contient ces informations de
  contrôle 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 modèle de la carte, vous pouvez alors essayer la
  méthode décrite dans la section ``Identifier une         carte
  inconnue'', qui vous aidera sur les cartes mystérieuses.

  Maintenant que vous savez quel type de carte vous avez, lisez les
  détails concernant celle-ci dans la section destinée aux cartes
  (section ``Informations Spécifiques...''), qui liste par ordre
  alphabétique les constructeurs de carte, les numéros de chaque carte,
  et précise s'il existe un pilote pour Linux ou non. Si votre carte est
  indiquée comme `Non-supportée', vous pouvez pratiquement vous arrêter
  dès maintenant. Si vous ne pouvez pas trouver votre carte dans la
  liste, vérifiez 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 différentes qui ont
  été conçues pour être compatible avec le modèle d'origine NE2000 de
  Novell.

  Supposons que vous avez trouvé un pilote sous Linux pour votre carte,
  vous n'avez plus qu'à le récupérer et à l'utiliser. Ce _n_'_e_s_t _p_a_s parce
  que Linux possède un pilote pour votre carte que celui-ci est pour
  autant installé dans tous les noyaux. (Le noyau est le coeur du
  système d'exploitation qui est chargé en premier au démarrage et qui
  contient entre autres choses, les drivers de divers périphériques).
  Selon la distribution de Linux que vous utilisez, il peut n'y avoir
  que très peu de noyaux tout prêts, et tout un tas de pilotes sous la
  forme de modules séparés, ou il peut y avoir tout un tas de noyaux,
  qui couvrent un grand nombre de combinaisons de pilotes précompilés.

  La majorité des distributions actuelles de linux sont livrées avec
  beaucoup de petits modules qui sont les divers pilotes. Les modules
  requis sont généralements chargés lors du démarrage, ou à la demande
  pour pouvoir accéder à un péripherique particulier. Vous aurez besoin
  d'attacher ce module au noyau après qu'il ait démarré. Consultez les
  informations de votre distribution sur l'installation et l'utilisation
  des modules, ainsi que la section sur les modules du présent document
  (section ``Utilisation des pilotes Ethernet comme         modules'').

  Si vous n'avez pas trouvé de noyau précompilé avec votre pilote, ni de
  pilote sous la forme d'un module, il y a des chances pour que vous
  ayez une carte particulièrement 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 répondez 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
  opération.

  (NDT : et sa version française, 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 façon ou d'une
  autre à démarrer un noyau avec votre pilote intégré, ou à charger ce
  pilote comme un module. A peu près la moitié des problèmes que les
  gens rencontrent est liée au fait que le pilote n'a pas été chargé
  d'une manière ou de l'autre, donc vous devriez constater que tout
  fonctionne, maintenant.

  Si cela ne fonctionne toujours pas, il vous faut alors vérifier si le
  noyau a bel et bien détecté la carte. Pour ce faire, vous devez taper
  dmesg | more une fois loggé, après que le système a démarré et que
  tous les modules ont été chargés. Cela vous permettra de consulter les
  messages que le noyau a fait défiler sur l'écran durant le processus
  de démarrage. Si la carte a été détectée, vous devriez voir quelque
  part dans cette liste un message du pilote de votre carte commençant
  par eth0, et indiquant le nom du pilote et les paramètres matériels
  (réglage d'interruption (IRQ), de ports d'entrée-sorties (E/S), etc.)
  pour lesquels la carte est réglée. (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 détection des pilotes qui intervient
  après !)

  Si vous ne voyez pas de message d'identification de ce type, alors le
  pilote n'a pas détecté 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 détectée.
  Si vous avez une carte compatible NE2000, vous y trouverez aussi des
  astuces spécifiques pour faire détecter une NE2000.

  Si la carte a été détectée, mais que le message de détection 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 listés dans la FAQ, ainsi que leur solution.

  Si le message de détection paraît correct, vérifiez de nouveau les
  ressources indiquées par le pilote en les comparant avec celles pour
  lesquelles la carte est physiquement configurée (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 configurée
  (physiquement ou par logiciel) pour utiliser l'IRQ 15 et que le pilote
  indique IRQ 10 dans les messages de démarrage, quelque chose ne va
  pas. La FAQ évoque les cas les plus courants où un pilote ne détecte
  pas correctement les informations de configuration de diverses cartes.

  A ce stade, vous êtes arrivé(e) à faire détecter votre carte avec tous
  les paramètres corrects, et l'on peut espérer que tout fonctionne. Si
  ce n'est pas le cas, vous avez alors soit une erreur de configuration
  logicielle, soit une erreur de configuration matérielle. Une erreur de
  configuration logicielle serait de ne pas avoir configuré la bonne
  adresse de réseau pour l'une des commandes ifconfig ou route (ou les
  deux !); la manière de procéder est décrite en détail dans le
  _N_e_t_w_o_r_k _H_o_w_T_o et le `Guide de l'Administrateur Réseau' (`_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 matérielle se produit quand un type de
  conflit de ressources ou une mauvaise configuration (que le pilote n'a
  pas détecté au démarrage) empêche la carte de fonctionner
  correctement. Vous pouvez typiquement observer cela sous plusieurs
  formes différentes.  (1) Vous obtenez un message d'erreur lorsque
  ifconfig essaie d'ouvrir le périphérique 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
  incohérences étranges à chaque fois qu'il essaie d'envoyer ou de
  recevoir des données.  (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 à zéro pour la carte.  La plupart des erreurs de
  configuration matérielle typiques sont elles aussi abordées 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
  spécifique à votre carte dans la section ``Informations
  Spécifiques..'', _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 détailler toute information intéressante dans ce message,
  comme la marque de la carte, la version du noyau, les messages du
  pilote au démarrage, le résultat de cat /proc/net/dev, une description
  claire du problème, et bien entendu ce que vous avez déjà 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 détaillée et instructive du problème pourra
  permettre à un `gourou-Linux' de résoudre tout de suite votre
  problème.



  22..  QQuueellllee ccaarrttee ddooiiss--jjee aacchheetteerr ppoouurr LLiinnuuxx ??

  La réponse à cette question dépend fortement de ce que vous comptez
  faire avec votre connexion réseau, 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 même 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 liée à la réception et à la
  transmission des données sur le réseau 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 extrêmes, alors n'importe
  quelle carte PCI bon marché ou une carte ISA 16 bits possédant un
  pilote stable vous conviendra.


  22..11..  QQuueellss ssoonntt lleess ppiillootteess ssttaabblleess,, aalloorrss ??

  Parmi les cartes ISA 16 bits, les pilotes suivants sont très au point,
  et vous ne devriez pas avoir de problèmes 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 utilisés
  des pilotes Linux, ce qui en fait le choix le plus sûr.

  Notez que certaines cartes-mères pas chères peuvent avoir des
  problèmes avec le bus-mastering que les cartes ISA Lance utilisent, et
  que certains clones NE2000 bon marché ont des difficultés à être
  détectés au démarrage.

  Les pilotes PCI les plus couramment utilisés 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 très courants, mais l'achat d'une telle carte ne
  peut se justifier que si le critère du prix est plus important que
  celui des performances.


  22..22..  CCaarrtteess 88 bbiittss ccoonnttrree ccaarrtteess 1166 bbiittss

  Vous ne pourrez certainement plus acheter une carte Ethernet ISA
  8 bits de nos jours, mais vous en trouverez encore beaucoup dans les
  années à venir sur les marchés aux puces informatiques ou autres
  braderies, et ce à des prix vraiment très bas. Cela les rend idéales
  pour les systèmes ``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 à modérée.  La
  3c501 donnera des résultats faibles, et ces reliques antédiluviennes
  (12 ans !) des beaux jours du XT sont à éviter. (Envoyez les a Alan,
  il les collectionne...)

  Le canal de données 8 bits n'atténue pas trop les performances,
  puisque vous pouvez encore espérer 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 réseau
  est à destination de sites éloignés, le goulot d'étranglement se
  situera ailleurs sur le chemin, la seule différence de vitesse que
  vous noterez se produisant lorsqu'il y a de l'activité sur votre
  réseau local.


  22..33..  CCaarrtteess 3322 bbiittss ((VVLLBB//EEIISSAA//PPCCII))

  Notez qu'un réseau à 10 Mbps ne justifie pas l'utilisation d'une
  interface 32 bits.  Consultez ``E/S programmées         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. Même
  si le fait que la carte Ethernet se trouve sur un bus rapide ne
  signifie pas que les transferts sont plus rapides, cela entraînera
  souvent une charge processeur supplémentaire moins importante, ce qui
  est bon pour les systèmes multi-utilisateurs.

  Bien sûr, avec la démocratisation des réseaux 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 basées sur cette puce, et les prix de ces cartes
  ``sans-nom'' sont généralement 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 plutôt bien avec Linux. (voir ``EtherExpress'').

  Des fabricants de clones ont commencé à produire des clones PCI de
  NE2000, basés sur une puce RealTek ou une puce Winbond. Le pilote
  Linux NE2000 des noyaux 2.0.31 et supérieurs accepte ces cartes.
  Cependant vous ne bénéficierez que de la vitesse plus élevée 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 légerement plus efficace que le pilote ISA ne.c


  22..44..  CCaarrtteess eett ppiillootteess 110000 MM ddiissppoonniibblleess

  La liste des matériels 100 M reconnus par Linux à l'heure actuelle est
  la suivante : les cartes basées 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/>



  22..55..  110000VVGG ccoonnttrree 110000BBaasseeTT

  Le 100BaseT est beaucoup plus répandu que le 100VG et la plaquette
  publicitaire suivante est extraite d'un vieux message désespérement
  bourré d'informations posté par Donald dans comp.os.linux; elle résume
  bien la situation:

  ``Pour ceux qui ne seraient pas au courant, il y a deux normes
  Ethernet en compétition, le 100VG (aussi connu sous le nom de
  100baseVG ou encore 100VG-AnyLAN) et le 100baseT (qui, selon le type
  du câble, 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 manière à ce qu'ils puissent être compatibles
  avec IBM et accepter les trames Token Ring. Cela `semblait une bonne
  idée à l'époque', puisque cela aurait permis aux installations Token
  Ring de se mettre à jour sans devoir faire admettre aux décideurs
  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 réseau, parce que Token Ring
  est un monstre de complexité , et que IBM a quand même adopté 100baseT
  pour finir.

  2) Ne produire que des cartes ISA et EISA. (Un modèle PCI n'a été
  annoncé que récemment.) 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
  réelle du déclin 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 décrivant combien
  le jeu de puce Regatta était merveilleux.''

  (NDT : ``La norme 100 BAS VG - any LAN proposée 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 plutôt une
  vocation commerciale. Il faut changer les coupleurs dans les stations
  de travail. Toutefois, on conserve les principaux systèmes de
  câblage.''  (Pierre Rolin, _i_n ``Réseaux haut débit'', Hermès, 1995).
  Fin 1997 plus personne ne parle de 100VG.

  La norme 100baseT4 utilise un câblage catégorie 3 et 4, 100baseTx un
  câblage catégorie 5, 100baseFx de la fibre optique.)



  22..66..

  LLeess ttyyppeess ddee ccââbblleess qquuee vvoottrree ccaarrttee ppeeuutt aacccceepptteerr

  Si vous mettez en place un petit réseau ``personnel'', vous préférerez
  certainement utiliser le ``thinnet'' ou câble Ethernet fin. C'est le
  modèle avec les connecteurs BNC standards. Le câblage `thinnet', ou
  Ethernet fin (câble coaxial RG-58) avec les connecteur BNC (en métal,
  à enfoncer puis tourner pour verrouiller) est appelé techniquement
  10Base2.

  La plupart des cartes Ethernet possèdent aussi une version `Combo' qui
  ne coûte 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' possèdent les deux interfaces paire torsadée et
  Ethernet fin intégrées, ce qui vous permet de changer d'avis plus
  tard.(NDT : `Combo' signigie même souvent : interface RJ-45 (10baseT,
  paire torsadée) + interface BNC (10base2, thinnet) + interface AUI
  (pour _t_r_a_n_s_c_e_i_v_e_r ou câble de descente (drop-cable) gros Ethernet).)

  Les câbles à paires torsadées, avec les connecteurs RJ-45
  (rectangulaires un peu plus grande que les prises `téléphone') sont
  appelés techniquement 10BaseT. Vous pourrez aussi entendre parler de
  UTP (Unshielded Twisted Pair, paire torsadée non-écrantée ou non-
  blindée, NDT).

  Le vieil Ethernet `épais' (Thick Ethernet, sur câble 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 présente sur
  quelques cartes Ethernet (connecteur AUI) est utilisée 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 câblages devraient être réalisés en ``Catégorie 5, classe
  D''. Ce type de câblage supporte non seulement 10BaseT, mais aussi
  100BaseT et les nouveaux débits 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 !

  Référez vous a ``Cables, Coax...'' pour plus de détails sur les
  différents types de cables.


  33..

  FFooiirree AAuuxx QQuueessttiioonnss ((FFAAQQ)) -- LLeess qquueessttiioonnss ffrrééqquueemmmmeenntt ppoossééeess

  Voici quelques unes des questions les plus fréquemment posées à propos
  de l'utilisation de Linux avec une connexion Ethernet. Certaines des
  questions les plus spécifiques sont triées `par ordre de
  constructeur'.  Il y a de fortes chances pour que la question que vous
  voulez poser l'ai déjà été, et aie déjà une réponse. Donc, si jamais
  vous ne trouvez pas la réponse ici, vous le trouverez certainement sur
  une archive de newsgroups comme : Dejanews <http://www.deja.com>.


  33..11..

  LLeess ppiillootteess ``AAllpphhaa'' ---- CCoommmmeenntt lleess oobbtteenniirr eett ccoommmmeenntt ss''eenn sseerrvviirr

  J'ai entendu dire qu'il y avait une version mise-à-jour ou un pilote
  préliminaire/alpha disponible pour ma carte. Où puis-je l'obtenir ?

  Les plus récents des `nouveaux' pilotes peuvent être trouvés sur le
  site FTP de Donald : cesdis.gsfc.nasa.gov dans la partie /pub/linux/.
  Les choses y changent fréquemment, donc jetez-y un coup d'oeil de
  temps à autre. Vous pourrez préférer 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 remplaçant les
  tabulations par des espaces, etc. - si vous n'êtes pas sûr(e),
  utilisez ftp, ou au moins une URL FTP, pour le chargement.)

  Maintenant, s'il s'agit réellement d'un pilote alpha, voire pré-alpha,
  s'il vous plaît considérez-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 même, s'il
  plante votre machine, ne vous plaignez pas. Au lieu de cela, envoyez-
  nous un rapport détaillé sur le problème, ou même mieux, un patch !

  Notez que certains des pilotes expérimentaux ou alpha `utilisables'
  sont inclus dans l'arborescence standard du noyau. Lorsque vous
  exécutez make config, l'une des premières choses qui vous sera
  demandée est si vous souhaitez être interrogé(e) sur les pilotes en
  cours de développement (``Prompt for development and/or incomplete
  code/drivers''). Vous devrez répondre ``Y'' (pour `_Y_e_s', `Oui') à
  cette question si vous souhaitez être interrogé(e) sur l'inclusion
  d'un pilote alpha ou expérimental.


  33..22..  UUttiilliisseerr pplluuss dd''uunnee ccaarrttee EEtthheerrnneett ppaarr mmaacchhiinnee

  Que faut-il faire pour que Linux puisse gérer deux cartes Ethernet ?

  La réponse à cette question est différente selon que les pilotes ont
  été compilés 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 spécifique.  A la place, un petit noyau
  de base est utilisé et les pilotes sont tous compilés en modules, ces
  modules étant chargés à la demande dès que le système est allé assez
  loin dans son démarrage pour accéder 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 détectera normalement toutes les cartes de même type d'un seul
  coup. Cependant, pour les cartes ISA, la détection automatique n'est
  pas une opération qui marche à coup sûr, et vous aurez très
  certainement à fournir les adresses d'entrée/sortie de base de la
  carte pour que le module sache où regarder. Ces informations sont
  placées 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 utilisés 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'entrée/sortie séparées 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 gérer plus d'une carte par chargement du module. Dans ce cas, vous
  pouvez charger le module deux fois pour avoir les deux cartes
  détectées. 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é utilisée pour donner à chaque
  instance du module un nom unique, puisqu'il n'est pas possible d'avoir
  deux modules ayant le même nom. L'option irq= a également été
  utilisée, pour indiquer l'interruption materielle de la carte. (Cette
  méthode peut aussi être utilisée pour les modules qui gèrent les
  listes d'adresses d'entrée/sortie, bien qu'elle soit moins efficace,
  car on se retrouve avec le module chargé deux fois alors que cela
  n'est pas nécessaire.)

  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'entrée/sortie des cartes PCI sont automatiquement
  détectées.

  Les modules disponibles sont généralements situés dans le répertoire
  /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 paramètres dans votre /etc/conf.modules, il ne vous reste
  plus qu'à tester avec la commande :


          modprobe ethN
          dmesg | tail



  Où N est le numéro 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 détectée automatiquement par défaut.
  Cela contribue à éviter des blocages possibles au moment du démarrage,
  causés par la détection de cartes `sensibles'.

  (Note : Depuis les derniers noyaux 2.1, la détection des périphériques
  a été découpée en deux parties, celle qui est sûre, et celle qui ne
  l'est pas . Par conséquent, tout ce qui est sûr (ex : PCI et EISA)
  sera détecté de manière automatique. Les systèmes avec plus d'une
  carte dont une sur un port ISA nécessiteront toujours la procédure
  suivante.)

  Vous pouvez activer la détection automatique de la deuxième (et de la
  troisième, et de...) carte de deux façons différentes.

  La méthode la plus simple consiste à passer des arguments au noyau au
  moment du démarrage, ce qui est généralement fait par LILO. La
  détection de la deuxième carte peut être obtenue en utilisant un
  argument de démarrage aussi simple que ether=0,0,eth1. Dans ce cas,
  eth0 et eth1 seront affectés dans l'ordre dans lequel les cartes
  seront trouvées dans cet ordre au démarrage. 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 numéro d'IRQ +
  le port d'E/S + le nom qui sont montrés ci-dessus. Veuillez
  consulter ``Passage des arguments Ethernet...'' pour la syntaxe
  complète, les paramètres spécifiques à chaque carte, et des astuces
  pour LILO.

  Ces arguments de démarrage 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 méthode (non recommandée) est d'éditer le fichier Space.c
  et de remplacer la valeur 0xffe0 pour l'adresse d'entrée-sortie par un
  zéro. La valeur 0xffe0 indique au noyau qu'il ne doit pas essayer de
  détecter ce périphérique -- la remplacer par un zéro autorisera
  l'auto-détection du périphérique.

  Notez que si vous avez l'intention d'utiliser Linux sur une machine
  qui servira de passerelle entre deux réseaux, vous devrez recompiler
  un noyau avec l'option ``IP forwarding''. Mais généralement 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 réseau, 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>.



  33..33..  llee eetthheerr==  nn''aa rriieenn cchhaannggéé.. PPoouurrqquuooii ??

  Comme il a été dit précédemment, la commande ether= ne marche _q_u_e pour
  les pilotes qui ont été compilés 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 guère
  utilisée. (Certaines vieilles documentations ont peut-être encore à
  être mises à jour pour refléter 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.



  33..44..

  PPrroobbllèèmmeess aavveecc lleess ccaarrtteess NNEE11000000 // NNEE22000000 ((eett lleeuurrss cclloonneess))

  PPrroobbllèèmmee :: Une carte PCI clone NE2000 n'est pas détectée au démarrage
  avec un noyau 2.0.x.

  RRaaiissoonn :: Le pilote ne.c jusqu'à la version 2.0.30 ne connaît que le
  numéro d'identification PCI des cartes clones basées sur la puce 8029
  de RealTek. Comme depuis beaucoup d'autres ont eux aussi fait des
  cartes PCI clones NE2000, avec des numéro d'identification PCI
  différents, le pilote ne les détecte pas.

  SSoolluuttiioonn :: La solution la plus simple est de mettre à jour votre noyau
  pour une version 2.0.31 (ou plus récente). Cette dernière connaît les
  identificateurs de près de cinq puces NE2000 PCI différentes, et les
  détectera automatiquement au démarrage ou lors du chargement en
  module. Si vous passez à la version 2.0.34 (ou plus récente) du noyau,
  vous aurez un pilote spécifique aux cartes NE2000 PCI, qui est un peu
  plus léger et plus rapide que le pilote ISA/PCI.

  PPrroobbllèèmmee :: Ma carte PCI clone NE2000 est indiquée comme étant une
  NE1000 (une carte 8 bits !) au démarrage ou lorsque je charge le
  module ne.o sous 2.0.x, et par conséquent la carte ne fonctionne pas.

  RRaaiissoonn :: Certains clones PCI n'implémentent pas l'accès de largeur un
  octet (et par conséquent ne sont donc pas réellement compatibles
  NE2000 à 100%). Cela entraîne que la procédure de détection pense
  qu'il s'agit de cartes NE1000.

  SSoolluuttiioonn :: Vous devez passer à la version 2.0.31 (ou une version plus
  récente) comme dit ci-dessus. Le pilote vérifie maintenant si ce bug
  matériel est là.

  PPrroobbllèèmmee :: Ma carte NE2000 PCI a des performances affreuses, même en
  réduisant la taille de la fenêtre comme il est décrit dans la section
  sur les trucs pour les performances.

  RRaaiissoonn :: Les spécifications de la puce 8390 originelle, conçue et
  vendue il y a plus de dix ans, notaient qu'une opération de lecture
  (depuis la puce) était nécessaire avant chaque opération d'écriture
  pour avoir une sécurité maximale. Le pilote possède la fonctionnalité
  pour le faire mais cela a été désactivé par défaut depuis l'époque des
  versions 1.2 du noyau. Un utilisateur a indiqué que le fait de
  réactiver cette `contre-fonctionnalité' avait aidé à améliorer les
  performances sur une carte PCI clone de NE2000 bon marché.

  SSoolluuttiioonn :: 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 décrivant
  la différence de performance et le type de carte / de puce que vous
  avez, si cela vous a aidé. (la même chose peut être effectuée sur le
  fichier ne2k-pci.c également).

  PPrroobbllèèmmee :: 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.

  RRaaiissoonn :: Votre carte et/ou le lien vers le bus PCI ne sait pas gérer
  les optimisations d'E/S du pilote.

  SSoolluuttiioonn :: Tout d'abord, vérifiez les réglages de votre BIOS pour voir
  si vous avez un réglage de timing du bus PCI trop agressif pour des
  opérations 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.

  PPrroobbllèèmmee :: Ma carte ISA Plug and Play NE2000 (telle que la RealTek
  8019) n'est pas détectée.

  RRaaiissoonn :: A l'origine, les spécifications de NE2000 (et par conséquent
  le pilote linux NE2000) ne supportent pas le PnP.

  SSoolluuttiioonn :: Utilisez la disquette de configuration DOS qui est fournie
  avec la carte pour désactiver le PnP, et pour régler les adresses
  d'entrée/sortie et l'IRQ. Ajoutez une ligne au /etc/conf.modules telle
  options ne io=0xNNN ou 0xNNN est l'adresse d'entrée/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 affectée à une carte PnP. D'un autre côté, si vous
  devez laisser le PnP pour rester compatible avec un autre système
  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 déjà installé sur votre système. S'il
  ne l'est pas, allez jeter un coup d'oeil à l'URL :

  ISA PNP          Tools <http://www.roestock.demon.co.uk/isapnptools/>

  PPrroobbllèèmmee :: Le pilote NE*000 indique `not found (no reset ack)' (carte
  non trouvée, pas d'acquittement de la réinitialisation) pendant la
  procédure de détection au démarrage.

  RRaaiissoonn :: Cela est lié au changement précédent. Après la vérification
  initiale qu'une 8390 se trouve à l'adresse d'E/S testée, la
  réinitialisation est effectuée. Quand la carte a terminé sa
  réinitialisation, elle est supposée envoyer un acquittement indiquant
  que la réinitialisation s'est achevée. Votre carte ne l'a pas fait, et
  le pilote estime donc qu'aucune carte NE n'est présente.

  SSoolluuttiioonn :: Vous pouvez indiquer au pilote que vous possédez 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 héxadécimale 0xbad
  au moment du démarrage pour le paramètre 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 réinitialisation utilisera quelque chose comme :


       LILO: linux ether=0,0x340,0,0xbad,eth0


  Cela permettra à la procédure de détection de la carte de continuer,
  même si votre carte n'acquitte pas la réinitialisation. 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

  PPrroobbllèèmmee :: Ma carte NE*000 bloque la machine au premier accès réseau.

  RRaaiissoonn :: Ce problème a été rapporté pour des noyaux aussi vieux que le
  1.1.57 jusqu'aux noyaux actuels. Il apparaît être confiné à un petit
  nombre de cartes clones configurables par logiciel. Il apparaît que
  ces cartes s'attendent à être initialisées d'une manière spéciale.

  SSoolluuttiioonn :: De nombreuses personnes ont indiqué que le fait d'exécuter
  le programme DOS de configuration fourni avec la carte et/ou le pilote
  DOS fourni avec la carte avant de redémarrer à 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 initialisées d'une façon
  particulière, légèrement différente de ce que le pilote Linux actuel
  réalise.

  PPrroobbllèèmmee :: Ma carte Ethernet NE*000 à l'adresse 0x360 n'est pas
  détectée.

  RRaaiissoonn :: Votre carte NE2000 a une largeur d'espace d'adressage d'E/S
  de 0x20, ce qui lui fait atteindre la zone utilisée par le port
  parallèle à l'adresse 0x378. D'autres périphériques pourraient se
  trouver à cet endroit-là, comme le contrôleur du deuxième lecteur de
  disquette (s'il y en a un) à l'adresse 0x370 et le contrôleur IDE
  secondaire aux adresses 0x376--0x377. Si le(s) port(s) sont déjà
  enregistrés par un autre pilote, le noyau ne laissera pas s'exécuter
  la détection.

  SSoolluuttiioonn :: Vous pouvez soit déplacer votre carte vers une adresse
  d'E/S comme 0x280, 0x340, 0x320, ou compiler votre noyau sans l'option
  pour l'imprimante parallèle.

  PPrroobbllèèmmee :: Le réseau `disparaît' à chaque fois que j'imprime quelque
  chose (NE2000).

  RRaaiissoonn :: Même problème que précédemment, mais vous avez un vieux noyau
  qui ne vérifie pas les chevauchements de zones d'adressage d'E/S.
  Utilisez la même solution que ci-dessus, et profitez-en pour récupérer
  un nouveau noyau, tant qu'à faire.

  PPrroobbllèèmmee :: NE*000 ethercard probe at 0xNNN: 00 00 C5 ... not found.
  (invalid signature yy zz) (carte Ethernet NE*000 testée à l'adresse
  0xNNN: 00 00 C5 ... non trouvée, signature yy zz non valide)

  RRaaiissoonn :: Avant tout, avez-vous une carte NE1000 ou NE2000 à l'adresse
  0xNNN ? Si oui, est-ce que l'adresse matérielle indiquée ressemble à
  une adresse valide ? Si oui, alors vous avez un clone NE*000 bas de
  gamme. Tous les clones NE*000 sont supposés avoir la valeur 0x57 dans
  les octets 14 et 15 de leur SA (Station Address) PROM. La vôtre n'a
  pas ces valeurs -- elle a `yy zz' à la place.

  SSoolluuttiioonn :: Il existe deux moyens de contourner ce problème.

  Le plus simple est d'utiliser une valeur 0xbad pour le paramètre
  mem_end comme indiqué ci-dessus pour le problème du non-acquittement
  de la réinitialisation. Cela évitera la vérification de la signature,
  pour autant qu'un port d'E/S non nul soit fourni en même temps. De
  cette façon, aucune recompilation du noyau n'est nécessaire.

  La seconde méthode (pour les hackers) nécessite de changer le pilote
  lui-même, 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 utilisée pour
  détecter 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 supposés être.

  PPrroobbllèèmmee :: La machine se bloque pendant le démarrage après le
  message `8390...' ou le message `WD....'. Le fait d'enlever la carte
  NE2000 résoud le problème.

  SSoolluuttiioonn :: Changez votre adresse d'E/S de base pour une valeur comme
  0x340.  Autre solution, vous pouvez utiliser l'argument de démarrage
  ``reserve='' en conjonction avec l'argument ``ether='' pour protéger
  la carte des procédures de détection des autres pilotes de
  périphériques.

  RRaaiissoonn :: 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 détection dans son espace d'adressage. Le fait de changer la carte
  NE2000 vers une adresse moins populaire l'écartera du chemin des
  autres procédures de détection automatique, permettant à votre machine
  de démarrer.

  PPrroobbllèèmmee :: La machine se bloque pendant la détection du SCSI au
  démarrage.

  RRaaiissoonn :: C'est le même problème que précédemment; changez l'adresse
  d'E/S de la carte Ethernet, ou utilisez les arguments de démarrage
  reserve et ether.


  PPrroobbllèèmmee :: La machine se bloque pendant la détection de la carte son
  au démarrage.

  RRaaiissoonn :: Non, en fait c'est pendant la détection silencieuse du SCSI,
  et c'est le même problème que ci-dessus.

  PPrroobbllèèmmee :: Ma carte NE2000 n'est pas détectée au démarrage. Il n'y a
  aucun message pendant le démarrage.

  SSoolluuttiioonn :: Il n'existe pas de `solution magique' parce qu'il existe
  tout un tas de raisons pour qu'elle ne soit pas détectée. La liste
  suivante devrait vous aider à parcourir les problèmes possibles.

  1) Construisez un nouveau noyau ne contenant que les pilotes de
  périphérique dont vous avez besoin. Vérifiez que vous êtes réellement
  en train de démarrer le noyau tout frais. Oublier de lancer lilo, etc.
  peut amener à démarrer l'ancien. (Regardez de près la date et l'heure
  de compilation indiquée au démarrage.) Cela peut paraître 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 démarrage. Est-ce qu'ils
  mentionnent une tentative de détection d'une NE2000 comme `NE*000
  probe at 0xNNN: not found (bla bla)' ou est-ce que la détection se
  contente d'échouer sans rien dire ? Cela fait une grosse différence.
  Utilisez dmesg|more pour relire les messages de démarrage après vous
  être loggé, ou tapez Majuscule+PageUp (page précédente) pour faire
  défiler l'écran vers le haut après que le démarrage soit terminé et
  que le prompt de login soit apparu.

  3) Après le démarrage, faites un cat /proc/ioports et vérifiez 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 périphérique a enregistré
  ne serait-ce qu'un port à n'importe quel endroit dans cet intervalle,
  la procédure de détection ne pourra pas s'effectuer à cette adresse et
  continuera sans rien dire jusqu'à la prochaine adresse testée. Un cas
  classique est que le pilote lp (imprimante) réserve 0x378 ou que le
  second canal IDE réserve 0x376 ce qui empêche le pilote ne de tester
  la plage 0x360-0x380.

  4) Même chose que précédemment avec cat /proc/interrupts.  Assurez-
  vous qu'aucun autre périphérique n'a enregistré l'interruption que
  vous avez fixée pour la carte Ethernet. Dans ce cas, la détection
  s'effectuera, et le pilote Ethernet se plaindra vigoureusement au
  démarrage de ne pas être capable d'obtenir la ligne d'IRQ désirée.

  5) Si vous séchez encore sur l'échec silencieux du pilote, éditez-le
  et ajoutez quelques printk() à la procédure de détection. Par exemple,
  avec une NE2000 vous pouvez ajouter/enlever des lignes (marquées
  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 vérifie, et
  vous verrez alors si l'adresse de votre carte a été testée ou non.

  6) Vous pouvez aussi récupérer 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 détecter votre carte après que vous avez démarré Linux.
  Utilisez l'option `-p 0xNNN' pour lui dire où regarder pour la carte.
  (La valeur par défaut est 0x300 et il ne va pas regarder ailleurs, à
  la différence de la procédure de détection au démarrage.)

  Le résultat, 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 différentes.
  Notez que toutes les valeurs de la PROM sont doublées pour une carte
  16 bits, et que l'adresse Ethernet (00:00:c0:b0:05:65) apparaît dans
  la première ligne, et que la signature avec le double 0x57 apparaît à
  la fin de la PROM.

  Le résultat, s'il n'y a aucune carte installée 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
  retournée lorsque l'on lit un port d'E/S vacant. Si vous avez un autre
  matériel dans la zone qui est testée, vous pourrez voir des valeurs
  différentes de 0xff aussi.

  7) Essayez de démarrer Linux à chaud depuis une disquette de démarrage
  DOS (via loadlin) après avoir exécuté le pilote DOS fourni ou le
  programme de configuration de la carte. Il se peut qu'il exécute
  quelques tours de passe-passe supplémentaires (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
  matérielle, 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 numéro plus récent que 11.



  33..55..

  PPrroobbllèèmmeess aavveecc lleess ccaarrtteess SSMMCC UUllttrraa//EEtthheerrEEZZ eett WWDD8800**33

  PPrroobbllèèmmee :: Vous obtenez des messages semblables à :

          eth0: bogus packet size: 65531, status=0xff, nxpg=0xff



  RRaaiissoonn :: Il y a un problème de mémoire partagée.

  SSoolluuttiioonn :: Les machines PCI qui n'ont pas été configurées pour
  traduire les périphériques ISA en mémoire constituent la source la
  plus courante pour ce problème. De fait vous lisez la mémoire vive du
  PC (toutes les valeurs 0xff que donne le message) au lieu de la
  mémoire vive de la carte, qui elle contient les données du paquet
  reçu.

  D'autres problèmes courants qui eux sont faciles à régler sont des
  conflits de carte, le fait d'avoir activé le cache ou la mémoire morte
  plus vite que 8 MHz. Il existe aussi un nombre étonnant de pannes de
  la mémoire sur les cartes Ethernet, donc utilisez le programme de
  diagnostic si vous en avez un pour votre carte Ethernet.

  PPrroobbllèèmmee :: Une carte EtherEZ de SMC ne fonctionne pas en mode de
  mémoire non-partagée (PIO).

  RRaaiissoonn :: Les versions les plus anciennes du pilote Ultra ne pouvaient
  utiliser la carte que dans le mode de travail à mémoire partagée.

  SSoolluuttiioonn :: Le pilote de la version 2.0 (et supérieures) sait aussi
  utiliser le mode d'E/S programmées (PIO). Mettez votre noyau à jour
  vers une version 2.0 ou plus récente.

  PPrroobbllèèmmee :: Une vieille wd8003 et/ou une wd8013 configurable par
  cavaliers ont toujours la mauvaise IRQ.

  RRaaiissoonn :: Les vieilles cartes wd8003 et les clones wd8013 configurables
  par cavaliers ne possèdent pas l'EEPROM que le pilote sait lire pour y
  trouver le paramétrage de l'IRQ. Si le pilote ne sait pas lire l'IRQ,
  il essaie de déterminer automatiquement l'IRQ. Et si la procédure de
  détection automatique retourne zéro, le pilote se contente d'affecter
  l'IRQ 5 pour une carte 8 bits ou l'IRQ 10 pour une carte 16 bits.

  SSoolluuttiioonn :: Evitez le code de détection automatique de l'IRQ, et
  indiquez au noyau la valeur d'IRQ que vous avez configurée sur la
  carte avec les cavaliers en la lui passant comme argument dans votre
  fichier de configuration de modules (ou au démarrage si vous l'avez
  compilé dans le noyau).

  PPrroobbllèèmmee :: Une carte SMC Ultra est détectée comme étant une wd8013,
  mais l'IRQ et l'adresse de base de la mémoire partagée sont fausses.

  RRaaiissoonn :: La carte Ultra ressemble beaucoup à une wd8013, et si le
  pilote Ultra n'est pas présent dans le noyau, le pilote wd peut
  identifier l'Ultra comme étant une wd8013. Le test de détection 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 façon différente à celle d'une wd8013, d'où les valeurs
  erronées indiquées par le pilote.

  SSoolluuttiioonn :: Recompilez le noyau en n'intégrant que les pilotes dont
  vous avez besoin. Si vous avez un mélange de cartes wd et Ultra dans
  une machine, et que vous utilisez les modules, chargez le module ultra
  en premier.


  33..66..  PPrroobbllèèmmeess aavveecc ddeess ccaarrtteess 33CCoomm

  PPrroobbllèèmmee :: La 3c503 prend l'IRQ N, mais celle-ci est requise par un
  autre périphérique qui a besoin de l'IRQ N (par exemple un pilote de
  CD-ROM, un modem, etc.). Est-ce que cela peut être réparé sans devoir
  le compiler dans le noyau ?

  SSoolluuttiioonn :: 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é utilisée. Le pilote effectue ce choix lorsque la carte est
  configurée (ifconfig).

  Si vous utilisez un pilote en module, vous pouvez vous servir des
  paramètres du module afin de choisir diverses choses, y compris la
  valeur d'IRQ.

  Ce qui suit sélectionne l'IRQ 9, adresse de base 0x300, <une valeur
  ignorée>, et le port if_port numéro 1 (le transceiver externe).

       io=0x300 irq=9 xcvr=1


  Autrement, si le pilote est compilé dans le noyau, vous pouvez choisir
  les mêmes valeurs en passant des paramètres _v_i_a LILO.

       LILO: linux ether=9,0x300,0,1,eth0


  Ce qui suit sélectionne l'IRQ 3, détecte l'adresse de base, <une
  valeur ignorée>, et le port par défaut (if_port) numéro 0 (le
  transceiver interne).

       LILO: linux ether=3,0,0,0,eth0


  PPrroobbllèèmmee :: 3c503: configured interrupt X invalid, will use autoIRQ.
  (3c503: l'interruption X configurée est invalide, détection
  automatique de l'IRQ)

  RRaaiissoonn :: 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 connectées à 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 nécessaire de spécifier une valeur d'interruption pour la
  3c503. Elle passera en détection automatique lorsqu'elle sera
  configurée (par ifconfig), et elle prendra l'une des IRQ 5, 2/9,
  3 ou 4.

  SSoolluuttiioonn :: Utilisez l'une des IRQ valides données ci-dessus, ou
  autorisez la détection automatique en ne précisant aucune ligne d'IRQ.

  PPrroobbllèèmmee :: Le pilote 3c503 fourni n'utilise pas le port AUI (gros
  Ethernet).  Comment faire pour le choisir au lieu du port Ethernet fin
  par défaut ?

  SSoolluuttiioonn :: Le port AUI peut être sélectionné au démarrage pour les
  pilotes compilés dans le noyau, et lors de l'insertion du module pour
  les pilotes modulaires. La sélection est réalisée par le bit de poids
  le plus faible de la variable dev->rmem_start qui n'est actuellement
  pas utilisée, donc un paramètre de démarrage comme :

       LILO: linux ether=0,0,0,1,eth0


  devrait fonctionner pour les pilotes compilés dans le noyau.

  Pour spécifier 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.



  33..77..  LLeess qquueessttiioonnss qquuii nnee ssoonntt ppaass ssppéécciiffiiqquueess àà uunnee ccaarrttee..




  33..77..11..  LLiinnuuxx eett lleess ccaarrtteess EEtthheerrnneett IISSAA PPlluugg aanndd PPllaayy

  Pour de meilleurs résultats (et au moins, rien qui empire) il est
  recommandé que vous utilisiez le petit programme qui a été livré avec
  la carte pour désactiver le mécanisme PnP, et régler 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 testée 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 utilisée 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
  télécharger OpenDOS ou FreeDOS gratuitement.

  Si vous avez besoin d'avoir le PnP activé pour rester compatible avec
  un autre système d'exploitation, alors, vous aurez à utiliser le
  paquetage isapnptools avec Linux pour configurer la carte à chaque
  boot. Vous aurez quand même à vous assurer que l'adresse d'E/S est
  testée par le pilote au démarrage, ou fourni comme option io=.



  33..77..22..  CCaarrttee EEtthheerrnneett nnoonn ddéétteeccttééee aauu ddéémmaarrrraaggee..

  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 généralement que le chargement du module
  nécessaire n'a pas été demandé, ou qu'une adresse d'E/S a besoin
  d'être spécifiée comme option du module.

  Si vous utilisez un noyau basé sur les modules, comme ceux installés
  par la plupart des distributions Linux, essayez alors d'utiliser
  l'utilitaire de configuration de la distribution pour sélectionner le
  module destiné à votre carte. Pour les cartes ISA, c'est une bonne
  idée que de déterminer 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 détails.

  Si vous utilisez un noyau précompilé qui provient d'une distribution
  Linux, vérifiez 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 général une bonne chose que de construire votre propre noyau,
  ne contenant que les pilotes dont vous avez besoin, car cela diminue
  considérablement la taille du noyau (préservant d'autant votre
  précieuse mémoire vive pour les applications !) et cela réduit le
  nombre de procédure de détection de périphériques qui peuvent déranger
  le matériel un peu sensible. Construire un nouveau noyau n'est pas
  aussi compliqué que cela peut paraître. Vous devez juste répondre oui
  ou non à toute une série de questions sur les pilotes que vous voulez,
  et le système fait le reste.

  La seconde raison essentielle est qu'un autre périphérique utilise une
  partie de l'espace d'adressage d'entrée-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 positionnée en 0x300 et
  qu'elle prend 32 octets, alors le pilote demandera la plage d'adresses
  0x300-0x31f. Si un autre pilote de périphérique a enregistré ne
  serait-ce qu'un port d'entrée-sortie, où que ce soit dans cet
  intervalle, la procédure de détection n'aura pas lieu à cette adresse
  et le pilote continuera sans rien dire à l'adresse suivante à tester.
  Donc, après le démarrage, faites un cat /proc/ioports et vérifiez que
  tout l'espace d'adressage d'entrée-sortie que la carte demandera est
  bien disponible.

  Autre problème : votre carte est configurée pour une adresse d'entrée-
  sortie qui n'est pas testée par défaut. La liste des adresses testées
  pour chaque carte est disponible juste après les commentaires de début
  dans chaque fichier source. Même si la configuration d'E/S de votre
  carte n'est pas dans la liste des adresses testées, vous pouvez
  l'indiquer au démarrage (pour les pilotes compilés dans le noyeau en
  utilisant la commande ether= comme il est décrit dans ``Passage des
  arguments Ethernet...''. Les pilotes modulaires peuvent utiliser
  l'option io= dans le fichier /etc/conf.modules afin de spécifier une
  adresse qui n'est pas testée par défaut.



  33..77..33..  iiffccoonnffiigg  iinnddiiqquuee llaa mmaauuvvaaiissee aaddrreessssee dd''EE//SS ppoouurr llaa ccaarrttee..

  Non, ce n'est pas vrai. C'est vous qui l'interprétez de manière
  erronée. Ce n'est _p_a_s une erreur, et les nombres indiqués 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
  décalée par rapport au premier port d'E/S affecté. Il s'agit de la
  valeur stockée 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.


  33..77..44..  éécchhoouuee..  UUnnee mmaacchhiinnee PPCCII ddéétteeccttee llaa ccaarrttee mmaaiiss llaa pprrooccéédduurree ddee
  tteesstt dduu ppiilloottee

  Certains BIOS PCI peuvent ne pas activer toutes les cartes PCI lors de
  l'allumage de la machine, spécialement si l'option `PNP OS' du BIOS
  est activée. Cette contre-fonctionnalité est destinée à supporter la
  version actuelle de Windows qui utilise encore des pilotes en mode
  réel. 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 désactivée.



  33..77..55..  PPCCII (( 00xxffffffff )) DDeess ccaarrtteess IISSAA àà mméémmooiirree ppaarrttaaggééee nnee ffoonnccttiioonn­­
  nneenntt ppaass ddaannss uunnee mmaacchhiinnee

  Ce problème se révèle habituellement sous la forme d'une série de
  valeurs 0xffff en lecture. Aucune carte à mémoire partagée 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'accès à la mémoire partagée depuis le bus ISA pour la zone
  d'adresses que votre carte essaie d'utiliser. Si vous n'arrivez pas à
  déterminer quels paramètres sont concernés, interrogez votre revendeur
  ou votre gourou informatique local. Dans un BIOS AMI (American
  Megatrends Inc.), il existe en général une section ``Plug and Play''
  où se trouveront sans doute des paramètres ``ISA Shared Memory Size''
  (taille de la mémoire partagée ISA) et ``ISA Shared Memory Base''
  (adresse de base de la mémoire partagée ISA). Pour des cartes comme
  la wd8013 et la SMC Ultra, changez la taille de sa valeur par défaut
  (`Disabled', désactivé) à une valeur de 16 Ko, et changez l'adresse de
  base en prenant l'adresse de base de mémoire partagée qui correspond à
  votre carte.


  33..77..66..  rriieenn..  OOnn ddiirraaiitt qquuee mmaa ccaarrttee eennvvooiiee ddeess ddoonnnnééeess,, mmaaiiss eellllee nnee
  rreeççooiitt jjaammaaiiss

  Faites un cat /proc/interrupts. Le nombre total d'interruptions
  générées par la carte vous sera donné. S'il est à zéro et qu'il
  n'augmente pas lorsque vous essayez d'utiliser la carte, alors, il y a
  très certainement un conflit d'interruptions entre la carte et un
  autre périphérique installé (que le pilote de l'autre soit chargé ou
  non). La seule solution est de changer l'IRQ de l'un des deux
  périphériques pour une autre IRQ non utilisée.



  33..77..77..  AAssyynncchhrroonnoouuss TTrraannssffeerr MMooddee ((AATTMM))

  Werner Almesberger s'est préoccupé 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 dernières informations et les mises à jour à l'URL
  suivante :

       Linux et ATM <http://lrcwww.epfl.ch/linux-atm/>



  33..77..88..  SSuuppppoorrtt ddee ll''EEtthheerrnneett GGiiggaabbiitt

  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
  détails, 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 basées
  sur le chipset Tigon comme la 3Com 3c985. Le pilote devrait aussi
  fonctionner avec la NetGear GA620, mais cela n'a pas encore été
  vérifié.



  33..77..99..  FFDDDDII

  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. Néanmoins, ce sont les seules cartes qui
  fonctionnent sous Linux actuellement.



  33..77..1100..  FFuullll DDuupplleexx

  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 système 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
  détection des collisions dans l'adaptateur réseau. C'est pour cela que
  vous ne pouvez pas le faire avec un coax : le réseau ne fonctionnerait
  pas si c'était le cas.

  Par contre, 10Base-T (l'interface RJ-45) utilise des (paires de) fils
  séparées pour l'émission et la réception, donc il est possible de
  travailler dans les deux sens en même temps. Le (hub) switch s'occupe
  du problème 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 dépend de la carte et peut-être du pilote.
  Certaines cartes pratiquent l'auto-négociation, 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 façon, seule une utilisation sérieuse/lourde montrera une
  différence entre les deux modes.



  33..77..1111..  LLeess mmaacchhiinneess SSMMPP eett lleess ccaarrtteess EEtthheerrnneett

  Si vous avez dépensé 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'avènement des 2.2, cela est devenu nécessaire.
  La majorité des vieilles cartes (ex : ISA, PIO et avec accès partagé à
  la mémoire) n'ont pas été conçues en pensant aux machines
  multiprocesseurs. Par conséquent, il vous faudra acheter une carte de
  facture récente, et vous assurer que le pilote a été mis a jour pour
  gérer les opérations multiprocesseurs. (Le plus important, c'est le
  "de facture récente" - les PCI-NE2000 sont juste des trucs vieux de
  plus de 10 ans sur un bus récent.) Chercher spin_lock dans les sources
  d'un pilote donne une bonne indication sur le fait que le pilote a été
  prévu pour marcher sur les machines multiprocesseurs. Pour plus de
  détails 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 données dans le noyau, ou
  accéder aux périphériques), quelque soit le moment. Donc, du point de
  vue de la carte (et du pilote associé) il n'y avait aucune différence
  avec le fonctionnement en monoprocesseur (UP) et tout continuait à
  marcher comme si de rien n'était. (C'était la façon la plus simple de
  faire du multiprocesseur avec Linux à ce moment-là. De cette manière,
  vous savez qu'il n'est pas possible que deux processeurs essayent de
  changer la même chose au même moment !)

  L'inconvénient de n'autoriser qu'un seul processeur à être en mode
  noyau au même moment était que vous n'aviez de vraies performances MP
  que si les programmes faisaient surtout du calcul sans accéder à la
  machine. Si les programmes faisaient beaucoup d'opérations d'entrées
  sorties (E/S), comme par exemple lire ou écrire sur un disque ou à
  travers un réseau, alors, tous les processeurs sauf un étaient en
  attente d'une opération 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é à exécuter le noyau, les performances d'une machine MP se
  réduisaient rapidement à celles d'une machine UP.

  Comme cela est clairement loin de l'idéal (spécialement pour les
  serveurs de fichiers, les serveurs WWW, les routeurs, etc...) les
  versions 2.2 des noyaux ont largement amélioré tout ce qui touche aux
  verrouillages - et par conséquent, 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 empêchent les données critiques d'êtres manipulées par plus d'un
  processeur à la fois - ex : un processeur peut s'occuper du réseau
  alors qu'un autre peut écrire sur un disque au même moment.

  Ok, avec tout cela en tête, voici deux petits problèmes : Des verrous
  plus localisés signifient qu'il peut y avoir un processeur essayant
  d'envoyer les données via le pilote ethernet pendant qu'un autre
  processeur essaye d'accéder à la carte pour autre chose (par exemple
  pour récupérer les statistiques pour cat /proc/net/dev). Et hop - les
  statistiques ont été envoyées par la carte et vous avez récupéré les
  données à envoyer pour les statistiques. Eh oui, la carte a bien été
  embêtée de recevoir plusieurs demandes à la fois, et il y a de fortes
  chance que cela ait planté la machine du même coup.

  Par conséquent, le pilote qui marchait pour les machines UP n'est
  désormais plus vraiment utilisable - on doit y ajouter des verrous qui
  contrôlent l'accès à la carte pour que les 3 actions de recevoir,
  émettre et manipuler les données puissent être utilisées à divers
  degrés d'opération. Le truc qui peut faire peur est qu'un pilote qui
  n'a pas été mis a jour pour fonctionner de manière stable en MP
  marchera très probablement si le réseau n'est pas chargé, mais fera
  planter la machine ou fera de drôles de choses lorsque deux (ou
  plus !) processeurs essaieront de faire plus d'une de ces opérations
  au même moment.

  Les pilotes ethernet gérant le MP requièreront (au minimum) un
  verrouillage englobant tout le pilote pour qu'il fonctionne sur le
  principe de `chacun son tour'. Avec ce mécanisme mis en place, les
  choses seront mises en files d'attente et le matériel sera utilisé de
  la même manière qu'en mode UP, et par conséquent, devrait être stable.
  Le coté négatif 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 réduite) - 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 ajoutés sont du type irqsave et
  qu'ils sont tenus fermés pour un long moment.]

  Il existe deux voies d'amélioration possibles à partir de cette
  situation.  Vous pouvez essayer de minimiser le temps entre le moment
  où le verrou est fermé et quand il est relâché et/ou vous pouvez
  trouver une manière plus fine, avec plus de verrous (ex : un verrou
  global sur le pilote ne serait pas nécessaire si quelques verrous
  protégeant quelques registres/réglages critiques suffisent).

  Toutefois, pour les vieilles cartes débiles qui n'ont pas été conçues
  dans l'esprit du MP, aucune de ces améliorations n'est possible.  Le
  pire est que ces pauvres cartes requièrent que le processeur déplace
  les données de la carte vers la mémoire de l'ordinateur, donc, dans le
  pire des cas le verrou sera fermé pour toute la durée que chaque
  paquet de 1,5 Ko mettra à transiter à travers le bus ISA.

  Les cartes plus récentes déplacent leurs données de et vers la mémoire
  sans avoir recours au processeur. Ceci est une grande amélioration car
  le verrouillage ne dure que le court instant où le processeur dit à la
  carte où dans la mémoire prendre/mettre les données. Les cartes de
  facture récente ne sont d'ailleurs pas faites pour avoir un verrou
  global autour du pilote.


  33..77..1122..  CCaarrtteess EEtthheerrnneett ppoouurr LLiinnuuxx ssuurr ccaarrttee--mmèèrree PPCCII AAllpphhaa//AAXXPP

  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 `indépendants de l'architecture' de façon
  à pouvoir fonctionner sur les systèmes basés 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é créés pour
  être indépendants de l'architecture.

  Notez que les changements à faire pour que le pilote ne soit pas
  dépendant de l'architecture ne sont pas aussi compliqués que cela peut
  paraître. Vous n'avez besoin que de :

  - multiplier toutes les valeurs relatives à des jiffies par HZ/100
  pour prendre en compte la valeur différente de HZ utilisée par
  l'Alpha. (c'est-à-dire que timeout=2; devient timeout=2*HZ/100;)

  - remplacer tout déréférencement de pointeur en mémoire d'E/S (640k à
  1Mo) par les appels readb() writeb() readl() writel() appropriés,
  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 mémoire
  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 détails sur la manière de gérer les accès
  mémoire d'une façon indépendante de l'architecture dans le fichier
  linux/Documentation/IO-mapping.txt qui est présent dans les noyaux
  récents.


  33..77..1133..  LL''EEtthheerrnneett eett LLiinnuuxx ssuurr lleess SSUUNN//SSppaarrcc..

  Pour les dernières informations à propos des Sparc, essayez donc l'URL
  suivante :

  Linux Sparc <http://www.geog.ubc.ca/sparc>

  Notez que quelques adaptateurs ethernet pour Sparc récupèrent leurs
  adresses MAC depuis l'ordinateur hôte, et que par conséquent, vous
  pourriez vous retrouver avec plusieurs interfaces ayant toutes les
  mêmes adresses MAC. Si vous devez mettre plusieurs interfaces sur la
  même machine, alors, vous aurez à utiliser l'option hw de ifconfig
  pour assigner une unique adresse MAC.

  Les problèmes de portage des pilotes PCI vers la plate-forme Sparc
  sont les mêmes que pour la plate-forme AXP. En plus, il y aura
  certainement des problèmes d'ordre des octets, le Sparc étant grand
  boutiste alors que les AXP et ix86 sont petits boutistes.



  33..77..1144..  LL''EEtthheerrnneett,, LLiinnuuxx eett lleess aauuttrreess aarrcchhiitteeccttuurreess..

  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 vérifier sur la page principale du port pour savoir ce
  qui est supporté. (Des pointeurs seraient bienvenus - envoyez les !)



  33..77..1155..  RReelliieerr ddeeuuxx 1100 eett 110000 BBaasseeTT ssaannss hhuubb

  Est-ce que je peux relier deux systèmes basés sur du
  10/100BaseT (RJ45) sans utiliser de hub ?

  Vous pouvez relier facilement deux machines, mais pas plus que cela,
  sans boîtier supplémentaire. Consultez la section ``Paire torsadée''
  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 générer correctement le signal de collision sans refaire un hub.


  33..77..1166..  SSIIOOCCSSIIFFxxxxxx:: NNoo ssuucchh ddeevviiccee

  J'obtiens un nombre impressionnant de messages `SIOCSIFxxx: No such
  device' au démarrage, suivis par un `SIOCADDRT: Network is
  unreachable'. Qu'est-ce qui ne va pas ?

  Votre périphérique Ethernet n'a pas été détecté pendant le démarrage /
  lors de l'insertion du module, et lorsque ifconfig et route sont
  exécutés, ils n'ont aucun périphérique avec lequel travailler.
  Utilisez dmesg | more pour consulter les messages du démarrage et
  regardez s'il y a un (ou des) message(s) à propos de la détection de
  carte Ethernet.




  33..77..1177..  SSIIOOCCSSFFFFLLAAGGSS:: TTrryy aaggaaiinn

  J'obtiens `SIOCSFFLAGS: Try again' lorsque j'exécute ifconfig --
  Euh.. ?

  Un autre périphérique 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 nécessairement besoin de redémarrer pour résoudre ce
  problème, car certains périphériques 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 série, 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 réussissez à faire en
  sorte que l'autre périphérique `relâche' la ligne d'IRQ, alors vous
  serez capable de réessayer (_T_r_y _a_g_a_i_n en anglais) avec ifconfig.


  33..77..1188..  0000::0000::0000::0000::0000::0000'' UUttiilliissaattiioonn ddee ``iiffccoonnffiigg'' eett mmeessssaaggee ``LLiinnkk
  UUNNSSPPEECC wwiitthh HHWW--aaddddrr ooff

  Lorsque j'utilise ifconfig sans argument, il indique Link UNPSEC (au
  lieu de `Ethernet 10Mbs') et il dit aussi que mon adresse physique est
  à zéro.

  C'est parce que les gens utilisent une version du programme `ifconfig'
  plus récente que leur version de noyau. Cette nouvelle version de
  `ifconfig' est incapable de fournir ces informations quand elle est
  utilisée 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 problème. Le noyau connaît 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.


  33..77..1199..  ((TTXX EErrrroorrss)) NNoommbbrree ffaarraammiinneeuuxx dd''eerrrreeuurrss eenn rréécceeppttiioonn ((RRXX
  EErrrroorrss)) eett eenn ttrraannssmmiissssiioonn

  Quand j'exécute ifconfig sans argument, il indique que j'ai un nombre
  faramineux d'erreurs à la fois dans les paquets reçus 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 BBLLAANNCC
  errors 0 BBLLAANNCC dropped 0 BBLLAANNCC overrun 0. Même chose pour la colonne
  avec TX. Les grands nombres que vous voyez sont donc le nombre total
  de paquets que votre machine a reçus et transmis. Si vous trouvez
  encore que c'est source de confusion, essayez de taper cat
  /proc/net/dev à la place.


  33..77..2200..  LLiieennss ddaannss //ddeevv//  ppoouurr ccaarrtteess EEtthheerrnneett

  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 utilisés. Vous pouvez détruire tous les /dev/wd0,
  /dev/ne0 et ce qui y ressemble.




  33..77..2211..  LLiinnuuxx eett lleess ````ttrraaiilleerrss'''' ((aammoorrcceess))

  Dois-je désactiver les ``trailers'' quand je `ifconfig'ure ma carte
  Ethernet ?

  Vous ne pouvez pas désactiver les ``trailers'', et vous ne devriez pas
  en avoir envie. Les ``trailers'' sont une astuce de programmation pour
  éviter des copies de données dans les couches réseau. L'idée était
  d'utiliser un en-tête simpliste de taille fixe `H', de mettre les
  informations de l'entête de taille variable à la fin du paquet, et
  d'allouer tous les paquets `H' octets avant le début d'une page. Alors
  qu'il s'agissait d'une bonne idée, en pratique cela n'a pas très bien
  fonctionné.

  Si quelqu'un suggère l'utilisation de `-trailers', notez bien que
  c'est l'équivalent du sang de chèvres sacrifiées. Cela ne résoudra pas
  le problème, mais si le problème se résoud tout seul, quelqu'un pourra
  invoquer des connaissances approfondies en magie.


  33..77..2222..  AAccccèèss ddiirreecctt aauu ppéérriipphhéérriiqquuee EEtthheerrnneett

  Comment puis-je avoir accès directement au périphérique 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 périphérique dans le
  champ sa_family et le nom du périphérique 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 opérations.



  44..  TTrruuccss eett aassttuucceess àà pprrooppooss ddeess ppeerrffoorrmmaanncceess

  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
  réside dans le cache disque de la machine qui transmet.  (Faites le
  `get' au moins deux fois, car la première fois ce cache sera vide.)
  Vous avez besoin que le fichier soit dans le cache car il faut éviter
  que le temps d'accès au fichier influe sur votre mesure. C'est pour la
  même raison que vous envoyez les données qui arrivent vers /dev/null
  plutôt que vers le disque.





  44..11..  CCoonncceeppttss ggéénnéérriiqquueess

  Même 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 problème. Les
  difficultés apparaissent quand l'ordinateur n'enlève pas suffisamment
  rapidement de la carte les paquets reçus pour faire de la place pour
  d'autres paquets entrants. Si l'ordinateur ne supprime pas rapidement
  les paquets déjà reçus de la mémoire de la carte , celle-ci n'aura pas
  assez de place pour mettre les nouveaux paquets.

  Dans ce cas, soit la carte détruit le nouveau paquet, soit elle
  réécrit sur un paquet déjà reçu. Les deux solutions interrompent
  brutalement le flux du trafic, nécessitent des re-transmissions et
  peuvent sérieusement dégrader les performances d'un facteur qui va
  jusqu'à 5 !

  Les cartes qui possèdent plus de mémoire sont capables de conserver
  plus de paquets, et peuvent donc supporter de gros pics de paquets
  successifs sans détruire de paquets. Par conséquent cela signifie que
  la carte n'exige pas de l'ordinateur un temps de latence aussi faible
  pour enlever les paquets sans avoir à en détruire.

  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 réserveront 3 Ko de ce tampon (pour deux tampons de
  transmission), laissant 5 Ko d'espace de réception pour une carte
  8 bits. Cela ne laisse de la place que pour 3 paquets Ethernet de
  pleine taille (1500 octets).


  44..22..  LLaa vviitteessssee ddeess ccaarrtteess eett dduu bbuuss IISSAA

  Comme indiqué précédemment, si les paquets sont enlevés de la carte
  suffisamment rapidement, le problème de destruction ou de surcharge
  n'apparaît pas même si la taille mémoire du tampon de réception est
  petite. Le facteur qui détermine la rapidité avec laquelle les paquets
  sont enlevés de la carte pour être placés dans la mémoire de
  l'ordinateur est la vitesse du chemin que devront suivre les données
  entre les deux -- c'est-à-dire la vitesse du bus ISA. (Si le
  processeur est un 386sx-16 poussif, cela jouera aussi un rôle.)

  La vitesse d'horloge recommandée pour un bus ISA est de 8 MHz, mais de
  nombreuses cartes-mères et de nombreux périphériques peuvent être
  utilisés à des fréquences plus élevées. La vitesse d'horloge du bus
  ISA peut en général être modifiée dans la configuration CMOS, en
  choisissant le rapport entre la fréquence du processeur et celle de la
  carte-mère. Certaines cartes-mères n'auront pas cette option, et vous
  serez coincés avec la valeur par défaut.

  Par exemple, voici quelques vitesses de réception mesurées par le
  programme TTCP sur un 486 à 40 MHz, avec une carte 8 bits WD8003EP,
  pour des vitesses différentes du bus ISA.


          Vitesse du bus ISA (MHz)        TTCP - réception (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. Néanmoins ne vous
  attendez pas à ce que tous les systèmes puissent travailler à des
  vitesses de bus ISA rapides. La plupart des systèmes ne fonctionneront
  pas correctement à des vitesses au-dessus de 13 MHz. (De même,
  certains systèmes 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 supérieures, vous profiterez aussi
  en général d'une réduction de l'utilisation du processeur due à la
  durée plus courte des cycles mémoires et d'E/S. (Notez que les disques
  durs et les cartes vidéo situées sur le bus ISA afficheront aussi de
  meilleures performances avec une vitesse du bus ISA plus élevée.)

  Soyez sûr de sauvegarder toutes vos données avant de faire des
  expériences avec des vitesses du bus ISA au-dessus de 8 MHz, et de
  tester attentivement que tous les périphériques ISA fonctionnent
  correctement après toute augmentation de vitesse.


  44..33..  MMooddiiffiieerr llaa ffeennêêttrree ddee rréécceeppttiioonn TTCCPP

  Une fois encore, les cartes qui possèdent peu de mémoire et un trajet
  des données entre la carte et la mémoire de l'ordinateur plutôt lent
  provoquent des problèmes. La fenêtre de réception TCP est réglée par
  défaut à 32 Ko, ce qui signifie qu'un ordinateur rapide situé sur le
  même sous-réseau que vous pourra vous inonder de 32 Ko de données sans
  s'arrêter pour regarder si vous en avez reçu le moindre morceau.

  Les versions récentes de la commande route donnent la possibilité de
  régler la largeur de cette fenêtre à la volée. En général, cette
  fenêtre ne doit être réduite que pour le réseau local, puisque les
  ordinateurs qui sont à quelques routeurs ou passerelles de distance
  ont suffisamment de `tampons' intermédiaires pour ne pas poser de
  problème. Un exemple d'utilisation est :

  ______________________________________________________________________
          route add <comme_d_habitude> ... window <largeur_de_fenetre>
  ______________________________________________________________________


  où largeur_de_fenetre est la largeur de la fenêtre 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
  fenêtre d'environ 4 Ko. Une fenêtre trop large causera des surcharges
  et des pertes de paquets, et une diminution drastique du débit Ether­
  net. Vous pouvez vérifier 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.


  44..44..  AAuuggmmeenntteerr lleess ppeerrffoorrmmaanncceess ddee NNFFSS

  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 donnée à l'origine
  par Sun).

  La raison possible de tout cela pourrait être la différence 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 problème à
  recevoir ces paquets les uns derrière les autres. Le problème se
  produit parce que la machine n'enlève pas les paquets à temps de la
  carte, et que le tampon déborde. Le fait que les cartes 8 bits
  nécessitent un cycle du bus ISA supplémentaire 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 vidés plus rapidement. J'ai
  trouvé qu'une vieille carte WD8003E à 8 MHz (sans autre charge
  système) peut soutenir une réception de taille importante avec une
  taille NFS de 2 Ko, mais pas à 4 Ko, auquel cas les performances
  étaient dégradées d'un facteur trois.

  D'un autre coté, si l'option par défaut 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 même
  8 Ko).



  55..

  IInnffoorrmmaattiioonnss ssppéécciiffiiqquueess ppaarr ddiissttrriibbuutteeuurr//ccoonnssttrruucctteeuurr//mmooddèèllee

  Ce qui suit est une liste de nombreuses cartes, rangées par ordre
  alphabétique de distributeur, puis par identifiant de produit. A côté
  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
  matériel comportent des erreurs, ce qui peut engendrer de piètres
  performances, des échecs de connexion ou même des crashs. (2) Le
  pilote est récent ou la carte est très peu connue, et par conséquent
  celui-ci a été peu utilisé/testé et son auteur a eu très peu de
  retours quant à son fonctionnement. Il est évident que la
  situation (2) est préférable à 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
  répondre 'Y' à la question ``Prompt for development and/or incomplete
  code/drivers?'' (``Demander confirmation pour pour les pilotes en
  cours de développement 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'intérêt pour un matériel qui est rare ou peu commun, ou au fait que
  les distributeurs n'en fournissent pas la documentation nécessaire
  pour l'écriture du pilote.

  Notez que la différence entre `supporté' et `partiellement supporté'
  est plutôt subjective, et qu'elle est basée sur les retours
  d'informations fournis par les utilisateurs, observés dans les groupes
  de news et les listes de diffusion. (Après tout, il est impossible à
  une personne de tester tous les pilotes avec toutes les cartes pour
  chaque version du noyau !!!)  Soyez donc prévenus que telle carte
  indiquée comme `partiellement supportée' pourra fonctionner
  impeccablement pour vous (ce qui est bien), alors que telle autre
  indiquée comme `supportée' vous donnera des problèmes sans fin (ce qui
  n'est pas aussi bien).

  Après 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.



  55..11..  33CCoomm

  Si vous n'êtes pas sûr de ce qu'est votre carte, mais que vous pensez
  qu'il s'agit d'une 3Com, vous pourrez certainement le déterminer à
  partir du numéro d'assemblage. 3Com dispose d'un document `Identifying
  3Com Adapters By Assembly Number' (Identifier les adaptateurs 3Com par
  leur numéro d'assemblage, référence 24500002) qui devrait très
  certainement éclaircir les choses. Consultez ``Informations techniques
  de 3Com'' pour plus d'informations sur la façon d'obtenir de 3Com des
  documents techniques.

  Notez aussi que vous pouvez éventuellement consulter le site FTP de
  3Com qui recèle diverses gâteries : ftp.3Com.com.

  Pour ceux qui consultent ce document sur le WWW, vous pouvez aussi
  essayer leur site WWW (www.3com.com).


  55..11..11..  33cc550011

  Statut : Partiellement supporté, Nom du pilote : 3c501

  Cette carte 8 bits datant de l'âge de pierre, trop tapée du ciboulot
  pour être utilisée.  Evitez-la comme la peste. N'achetez pas cette
  carte, même pour faire une blague. Ses performances sont atroces, et
  elle a de nombreuses déficiences.

  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 réseau
  entre deux ordinateurs à base de 8088 où le traitement de chaque
  paquet et la réponse prenaient des dizaines de millisecondes, mais les
  réseaux 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
  détection automatique ne teste que 0x280 et 0x300, et le niveau de
  débogage est indiqué dans le troisième argument passé au démarrage.

  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 arrêt pendant que vous écoutez _c_h_a_c_u_n des paquets
  `multicast'. Lisez les commentaires au début du code source pour plus
  de détails.


  55..11..22..  EEtthheerrLLiinnkk IIII,, 33cc550033,, 33cc550033//1166

  Statut : Supporté, Nom du pilote : 3c503 (+8390)

  La 3c503 ne possède pas de mémoire reprogrammable pour stocker sa
  configuration (un ``EEPROM setup'') ; un programme de diagnostic et de
  configuration n'est donc pas nécessaire avant d'utiliser la carte sous
  Linux. L'adresse de mémoire partagée de la 3c503 est fixée en
  utilisant des cavaliers qui sont partagés avec l'adresse de la mémoire
  programmable de démarrage (``boot PROM''). Cela a tendance à semer la
  confusion chez les personnes habituées aux autres cartes ISA, sur
  lesquelles on laisse toujours le cavalier sur la position `désactivée'
  (_d_i_s_a_b_l_e en anglais) à moins d'avoir une PROM de démarrage.

  Ces cartes devraient être aussi rapide que les cartes WD80x3 qui
  utilisent le même bus, mais il apparaît qu'elles sont légèrement plus
  lentes. Ces cartes Ethernet à mémoire partagée ont aussi un mode à
  Entrées/Sorties programmées qui n'utilise pas les possibilités de la
  8390 (leurs ingénieurs ont trouvé trop de bogues !). Le pilote 3c503
  de Linux sait aussi travailler avec la 3c503 en mode d'E/S
  programmées, mais c'est plus lent et moins sûr que le mode à mémoire
  partagée. De plus, le mode d'E/S programmées n'est pas aussi bien
  testé lors des mises à jour des pilotes. Vous ne devriez pas utiliser
  le mode d'E/S programmées à moins d'en avoir besoin pour la
  compatibilité avec le DOS.

  La ligne d'IRQ de la 3c503 est fixée par logiciel, sans l'aide d'une
  EEPROM. A la différence des pilotes sous DOS, le pilote Linux est
  capable de choisir automatiquement l'IRQ : il utilise la première
  ligne d'interruption disponible parmi {5,2/9,3,4}, en choisissant à
  chaque fois que la carte est ifconfigurée. (Les anciennes versions du
  pilote sélectionnaient l'IRQ au moment du démarrage). L'appel ioctl()
  dans `ifconfig' retournera EAGAIN si aucune ligne d'IRQ n'est
  disponible à ce moment-là.

  Des problèmes classiques que les gens ont avec la 3c503 sont abordés
  dans ``Problèmes 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 spécifiques aux
  modules.

  Notez que certains vieux 386 sans disques ont des 3c503 sur la carte
  mère (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 détectées. Pour plus de détails, référez-vous au paquetage
  Etherboot, dont vous aurez besoin pour démarrer ces PC sans disques.


  55..11..33..  EEtthheerrLLiinnkk pplluuss,, 33cc550055

  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 répandues. 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
  désactiver.


  55..11..44..  EEtthheerrLLiinnkk--1166,, 33cc550077

  Statut : Partiellement supporté, Nom du pilote : 3c507

  Cette carte utilise l'une des puces Intel, et le développement 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.





  55..11..55..  EEtthheerrLLiinnkk IIIIII,, 33cc550099 // 33cc550099BB

  Statut : Supporté, Nom du pilote : 3c509

  Cette carte est plutôt bon marché et possède de bonnes performances
  pour une conception ISA qui ne soit pas `bus-master'. Le revers de la
  médaille est que la 3c509 originelle nécessitait des temps de latence
  vraiment très faibles en réponse aux interruptions. La 3c509B ne
  souffre pas du même problème, car elle possède un tampon mémoire plus
  important (voir ci-dessous). Ces cartes utilisent des transferts en
  mode d'Entrées/Sorties programmées (PIO), de la même façon qu'une
  carte ne2000, et par conséquent une carte à mémoire partagée comme la
  wd8013 sera plus efficace en comparaison.

  La 3c509 d'origine avait un petit tampon mémoire pour les paquets
  (4 Ko au total, 2 en réception et 2 en transmission), ce qui poussait
  le pilote à éliminer un paquet si les interruptions étaient masquées
  trop longtemps. Pour minimiser ce problème, 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 façon à ce que les transferts IDE se terminent plus tôt.

  Le modèle plus récent, la 3c509B, possède 8 Ko de mémoire, et le
  tampon peut être partagé en 4/4, 5/3 ou 6/2 en réception/transmission.
  Ce paramètre est changé à l'aide de l'utilitaire de configuration sous
  DOS, et est stocké dans la mémoire EEPROM. Cela devrait éliminer le
  problème précédent avec la 3c509 originelle.

  Les utilisateurs de 3c509B devraient utiliser soit l'utilitaire DOS
  fourni afin de désactiver le `_p_l_u_g _a_n_d _p_l_a_y', _e_t de déterminer 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 détection
  automatique du support physique, donc vous _d_e_v_e_z sélectionner 10Base-T
  ou 10Base-2 ou AUI.  Notez que pour arrêter 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 paramètres ``Server
  or Workstation'' (serveur ou station de travail) et ``Highest Modem
  Speed'' (plus haute vitesse de modem) qui sont présentés 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 paramètres ; il optimise toujours pour un taux de transfert
  important plutôt que pour un temps de latence faible (`Server'). Un
  temps de latence faible était un critère critique pour le vieux
  trafic, non-fenêtré, de IPX. Afin de réduire le temps de latence, le
  pilote sous DOS de la 3c509 inhibe les interruptions de certaines
  opérations, bloquant les interruptions du port série. D'où la
  nécessité du paramètre `modem speed' (vitesse du modem). Le pilote
  Linux évite la nécessité de désactiver les interruptions sur de
  longues périodes en ne travaillant que sur des paquets complets, par
  exemple en ne commençant pas à transmettre un paquet avant qu'il n'ait
  été complètement transféré sur la carte.''

  Notez que la procédure de détection de la carte ISA utilise une
  méthode différente de la plupart des autres cartes. A la base, vous
  demandez aux cartes de répondre en envoyant des données sur un port
  ID_PORT (port 0x100 jusqu'à 0x1ff par intervalle de 0x10).  Cette
  méthode de détection signifie qu'une carte donnée sera toujours
  détectée 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 gêner personne, à l'exception de ceux
  qui souhaitent assigner une adresse physique sur 6 octets à une
  interface donnée. Si vous avez plusieurs cartes 3c509, il vaut mieux
  ajouter des commandes ether=0,0,ethN sans préciser le port d'E/S
  (c'est-à-dire en utilisant E/S=zéro) et autoriser la procédure de
  détection à faire le tri pour déterminer quelle carte est la première.
  Utiliser une valeur d'E/S non nulle va faire que toutes les cartes ne
  seront pas détectées : donc, ne le faites pas.

  Si cela vous gêne 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 mémoire pour obliger la
  détection à réussir.


  55..11..66..  33cc551155

  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 dernières informations, vous auriez certainement intérêt à le
  chercher dans la page sur les ``Vortex'' :


       Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vor­
       tex.html>



  55..11..77..  33cc552233

  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 détails sont fournis sur la page MCA pour Linux à
  http://glycerine.cetmm.uni.edu/mca/


  55..11..88..  33cc552277

  Statut : Non supporté

  Eh oui, encore une autre carte MCA. Eh non, pas beaucoup d'intérêt
  pour celle-ci. Vous aurez plus de chance avec la 3c529 si vous êtes
  coincé(e) avec le MCA.


  55..11..99..  33cc552299

  Statut : Partiellement supporté, Nom du pilote : 3c509

  Cette carte utilise en fait le même jeu de puces que la 3c509. De
  fait, Donald a placé des points d'entrée dans le pilote de la 3c509
  pour vérifier l'existence de cartes MCA après la détection des cartes
  EISA, et avant celle des cartes ISA, longtemps avant que le MCA soit
  supporté par le noyau. Le code de détection MCA est inclus dans le
  pilote livré avec le noyau 2.2.

  On peut trouver plus de détails sur la page MCA pour Linux à l'adresse
  http://glycerine.cetmm.uni.edu/mca/.





  55..11..1100..  33cc556622

  Statut : Supporté, Nom du pilote : 3c589 (distribué séparément)

  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 même interruption. Il y a une série de
  nouveaux registres et un peu de support de partage d'interruptions
  matérielles. Vous aurez besoin d'utiliser un noyau 2.0 ou plus récent,
  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.


  55..11..1111..  33cc557755

  Statut : Inconnu

  Un pilote pour cette carte PCMCIA est en cours de développement et
  l'on peut espérer 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.



  55..11..1122..  33cc557799

  Statut : Supporté, Nom du pilote : 3c509

  La version EISA de la 509. La version EISA actuelle utilise la même
  puce de largeur 16 bits plutôt qu'une interface 32 bits, et les
  performances ne sont donc pas époustouflantes. Le code de détection
  EISA a été ajouté dans 3c509.c pour la version 0.99pl14. Assurez-vous
  que la carte est configurée pour le mode d'adressage EISA. Lisez la
  section précédente sur la 3c509 pour des informations sur le pilote.



  55..11..1133..  33cc558899 // 33cc558899BB

  Statut : Partiellement supporté, Nom du pilote : 3c589

  Beaucoup de monde utilise cette carte PCMCIA depuis déjà un bon bout
  de temps. Notez qu'elle n'est pas incluse (à l'heure actuelle) dans
  l'arborescence par défaut du noyau. Le "B" dans le nom signifie la
  même 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
  supportés, les activateurs de sockets, etc.



  55..11..1144..  33cc559900 // 33cc559955

  Statut : Supporté, Nom du pilote : 3c59x

  Ces cartes ``Vortex'' sont destinées 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 problèmes 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 modèles des premiers
  temps ayant 32 Ko de mémoire, et des plus récents 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é remplacées 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 mémoire 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



  55..11..1155..  33cc559922 // 33cc559977

  Statut : Supporté, Nom du pilote : 3c59x

  Ce sont les versions EISA des séries 3c59x. La 3c592/3c597 (aussi
  connue sous le nom de Demon) devrait fonctionner avec le pilote Vortex
  présenté au paragraphe précédent.


  55..11..1166..  33cc990000 // 33cc990055 // 33cc990055BB

  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 récemment é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



  55..11..1177..  33cc998855

  Statut : Supporté, Nom du pilote : acenic

  Ce pilote, par Jes Sorensen, est disponible dans les noyaux 2.2. Il
  supporte plusieurs autres modèles de cartes Gigabit en plus du modèle
  3Com.



  55..22..  AAccccttoonn



  55..22..11..  AAccccttoonn MMPPXX

  Statut : Supporté, Nom du pilote : ne (+8390)

  Ne vous laissez pas avoir par le nom. Cette carte est tout de même
  supposée être une compatible NE2000, et devrait par conséquent
  fonctionner avec le pilote du même nom.



  55..22..22..  AAccccttoonn EENN11220033,, EENN11220077,, EEtthheerrDDuuoo--PPCCII

  Statut : Supporté, Nom du pilote : de4x5, tulip

  Une autre implémentation de la puce PCI 21040 de DEC. La carte EN1207
  comporte le 21140, mais a aussi un connecteur 10Base-2, ce qui s'est
  révélé source de problèmes pour certaines personnes en terme de
  sélection 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.


  55..22..33..  AAddaappttaatteeuurr AAccccttoonn EENN22220099 ppoouurr ppoorrtt ppaarraallllèèllee ((EEtthheerrPPoocckkeett))

  Statut : Partiellement supporté, Nom du pilote : ?

  Un pilote pour ces adaptateurs sur port parallèle 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




  55..22..44..  AAccccttoonn EENN22221122 PPCCMMCCIIAA

  Statut : Partiellement supporté, Nom du pilote : ?

  David Hinds a commencé à travailler sur un pilote pour cette carte, et
  vous devriez de consulter la dernière version de son paquetage PCMCIA
  pour savoir où il en est.





  55..33..  AAlllliieedd TTeelleessyynn//TTeelleessiiss



  55..33..11..  AATT11550000

  Statut : Supporté, Nom du pilote : lance

  Il s'agit d'une série de cartes Ethernet peu chères qui utilisent la
  version 79C960 de la puce LANCE d'AMD. Ce sont des cartes utilisant le
  le contrôle du bus, et elles figurent donc parmi les cartes Ethernet
  ISA les plus rapides.

  La sélection du DMA et des informations sur la numérotation de la puce
  se trouvent dans ``AMD LANCE''.

  Plus d'informations techniques sur les cartes Ethernet basées sur
  l'AMD LANCE sont disponibles dans ``Notes sur         l'AMD...''.


  55..33..22..  AATT11770000

  Statut : Supporté, Nom du pilote : at1700

  Notez que pour accéder à ce pilote lors du make config vous devez
  encore répondre `Y' à la question ``Prompt for development and/or
  incomplete code/drivers?'' au tout début. 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
  problèmes 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 séries AT1700 sont basées sur
  la MB86965 de Fujitsu. Cette puce utilise une interface à E/S
  programmées, 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 câble STP
  (Shielded Twisted Pair, paire torsadée blindée) 150 ohms couramment
  installé pour le Token Ring, en plus du câble 100 ohms UTP (Unshielded
  Twisted Pair, paire torsadée non-blindée) de 10BaseT. Une version
  fibre optique de la carte (AT1700FT) existe également.

  La puce Fujitsu utilisée sur l'AT1700 a un défaut de conception : elle
  ne peut être remise complètement à zéro qu'en effectuant un cycle
  d'allumage de la machine. Le fait d'appuyer sur le bouton de
  redémarrage (`Reset') ne réinitialise pas l'interface du bus. Cela ne
  serait pas gênant, si la carte ne pouvait être détectée qu'après
  qu'elle ait été récemment réinitialisée. Le moyen de contourner le
  problème est d'éteindre puis de rallumer la machine si le noyau a un
  problème pour détecter l'AT1700.

  Certaines séries de production de l'AT1700 ont un autre problème :
  elles sont conçues pour utiliser de façon permanente le canal DMA 5.
  Cela n'est pas documenté, il n'existe aucun cavalier pour désactiver
  cette "fonctionnalité", et aucun pilote n'ose utiliser la possibilité
  de DMA à cause de problèmes de compatibilité. Aucun pilote de
  périphérique 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 désactiver le DMA est d'utiliser un couteau.

  Certaines séries de l'AT1700 ont un autre problème : Elles sont
  bloquées sur le canal DMA 5. Cela n'est pas documenté, et il n'y a pas
  de cavaliers pour désactiver cette "fonctionnalité", et aucun pilote
  n'ose utiliser le DMA a cause des problèmes de compatibilité. Aucun
  pilote ne sera écrit pour utiliser le DMA a cause car le fait
  d'installer une deuxième carte empêcherais les DEUX de marcher, et le
  seul moyen de désactiver le DMA, c'est avec un couteau.



  55..33..33..  AATT22445500

  Statut : Supporté, Nom du pilote : pcnet32

  La version PCI de l'AT1500, qui ne souffre pas des problèmes de la
  carte PCI 79c970 de Boca. La sélection du DMA et des informations sur
  la numérotation de la puce se trouvent dans ``AMD         LANCE''.

  Plus d'informations techniques sur les cartes Ethernet basées sur
  l'AMD LANCE sont disponibles dans ``Notes sur         l'AMD...''.



  55..33..44..  AATT11550000

  Statut : Partiellement supporté, Nom du pilote : rtl8139

  Cette carte utilise la puce Realtek 8139, référez vous à la section
  ``Realtek 8139''



  55..33..55..  AATT22554400FFXX

  Statut : Partiellement supporté, Nom du pilote : eepro100

  Cette carte utilise une puce i82557, et par conséquent,
  pourrait / devrait fonctionner avec le pilote de la carte eepro100. Si
  vous l'essayez, envoyez-nous quelques renseignements complémentaires
  pour que cette section s'étoffe un peu.


  55..44..  AAMMDD // AAddvvaanncceedd MMiiccrroo DDeevviicceess

  Carl Ching d'AMD a eu la gentillesse de fournir une description très
  détaillée de tous les produits Ethernet d'AMD cités, ce qui a permis
  de clarifier cette section.


  55..44..11..  AAMMDD LLAANNCCEE ((77999900,, 7799CC996600//996611//996611AA,, PPCCnneett--IISSAA))

  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 numéro ci-dessus.
  La 7990 est la puce `LANCE' d'origine, mais la plupart des documents
  (y compris celui-ci) se réfèrent à toutes ces puces similaires sous la
  dénomination de puces `LANCE' (...incorrectement, devrais-je ajouter).

  Les numéros ci-dessus se réfèrent 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é remplacée depuis bien longtemps par des versions
  plus récentes. La 79C960 (aussi connue sous le nom de PCnet-ISA)
  contient pour l'essentiel la base de la 79c90, avec tout le support
  matériel complémentaire 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 dernière puce des
  séries ISA est la 79c961A (PCnet-ISA II), qui ajoute des capacités 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 très vieilles
  cartes qui utilisent la 7990 d'origine avec une configuration à
  mémoire partagée. Ces cartes anciennes peuvent être repérées par
  l'absence de cavaliers pour le choix d'un canal DMA.

  Parmi les problèmes classiques, on rencontre le message `busmaster
  arbitration failure'. Celui-ci s'affiche quand le pilote LANCE ne peut
  pas obtenir un accès au bus après qu'un temps raisonnable se soit
  écoulé (50 micro-secondes). Cela indique habituellement que
  l'implémentation de la maîtrise de bus DMA de la carte-mère est
  incorrecte, ou qu'un autre périphérique monopolise le bus, ou qu'il y
  a un conflit de canal DMA. Si votre programme de configuration du BIOS
  possède la `GAT option' (GAT pour Guaranteed Access Time, temps
  d'accès garanti), essayez de modifier ce paramètre 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 démarrage ether= est ignorée sans qu'il en soit fait
  mention (cela sera corrigé), donc assurez-vous que votre carte est
  configurée pour l'une des adresses d'E/S ci-dessus, pour l'instant.

  Le pilote fonctionnera encore correctement, même si plus de 16 Mo de
  mémoire sont installés, car des tampons-relais en mémoire basse sont
  utilisés au besoin (c'est-à-dire que toute donnée située au-delà de la
  limite des 16 Mo est copiée 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 (inutilisés 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
  réussit.

  La carte HP-J2405A est une exception : avec cette carte, il est facile
  de lire les valeurs stockées en EEPROM pour l'IRQ et le DMA.

  Voir ``Notes on AMD...'' pour plus d'informations sur ces puces.



  55..44..22..  AAMMDD 7799CC996655 ((PPCCnneett--3322))

  Statut : Supporté, Nom du pilote : pcnet32

  Il s'agit de la PCnet-32 -- une version 32 bits, à contrôle de bus, de
  la puce LANCE originelle pour les systèmes VLB (Vesa Local Bus) et à
  bus local. Bien que ces puces puissent être utilisée avec le pilote
  lance.c standard, une version 32 bits (pcnet32.c) est aussi
  disponible, laquelle n'a pas à se préoccuper des limitations à 16 Mo
  liées au bus ISA.


  55..44..33..  AAMMDD 7799CC997700//997700AA ((PPCCnneett--PPCCII))

  Statut : Supporté, Nom du pilote : pcnet32

  Il s'agit de la PCnet-PCI -- similaire à la PCnet-32, mais conçue pour
  des systèmes basés 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 fonctionnalités par
  rapport à la conception d'origine de la 970.

  Notez que l'implémentation de Boca pour la 79C970 ne fonctionne pas
  sur les machines Pentium rapides. Il s'agit d'un problème matériel,
  puisqu'il affecte aussi les utilisateurs DOS. Consultez la section sur
  Boca pour plus de détails.


  55..44..44..  AAMMDD 7799CC997711 ((PPCCnneett--FFAASSTT))

  Statut : Supporté, Nom du pilote : pcnet32

  Il s'agit de la puce 100 Mbits d'AMD pour les systèmes 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é.


  55..44..55..  AAMMDD 7799CC997722 ((PPCCnneett--FFAASSTT++))

  Statut : Inconnu, Nom du pilote : pcnet32

  Devrait marcher exactement comme la '971, mais reste à confirmer quand
  même.


  55..44..66..  AAMMDD 7799CC997744 ((PPCCnneett--SSCCSSII))

  Statut : Supporté, Nom du pilote : pcnet32

  Il s'agit de la PCnet-SCSI -- qui à la base est traitée 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 supportée -- 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.


  55..55..  AAnnsseell CCoommmmuunniiccaattiioonnss



  55..55..11..  AACC33220000 EEIISSAA

  Statut : Partiellement supporté, Nom du pilote : ac3200

  Notez que pour accéder à ce pilote lors du make config vous devez
  encore répondre `Y' à la question ``Prompt for development and/or
  incomplete code/drivers?'' au tout début. 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 utilisée dans les
  cartes NE2000 et WD80x3. Veuillez consulter ``Pilotes
  `alpha''' dans le présent document pour des informations importantes
  concernant les pilotes `alpha'.

  Si vous l'utilisez, veuillez informer l'un d'entre nous de la façon
  dont les choses fonctionnent, car nous avons eu peu de retour
  d'informations, même 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 spécifiques aux modules.



  55..66..  AApprriiccoott



  55..66..11..  AApprriiccoott XXeenn--IIII OOnn BBooaarrdd EEtthheerrnneett

  Statut : Supporté, Nom du pilote : apricot

  Cette carte Ethernet sur carte-mère utilise une puce i82596 à contrôle
  du bus. Elle ne peut se trouver qu'à l'adresse d'E/S 0x300. En
  consultant le source du pilote, il apparaît que l'IRQ est
  matériellement fixée à 10.

  Les premières versions du pilote avaient une tendance à croire que
  tout ce qui vivait en 0x300 était un adaptateur réseau Apricot.
  Depuis, l'adresse matérielle est testée afin d'éviter ces détections
  erronées.


  55..77..  AArrccnneett

  Statut : Supporté, Nom du pilote : arcnet (arc-rimi, com90xx,
  com20020)

  Avec le coût vraiment très bas et les meilleures performances
  d'Ethernet, il est probable que la plupart des endroits disposant d'un
  réseau vont se débarrasser de leur matériel Arcnet pour rien, ce qui
  amènera un grand nombre de systèmes 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 intégrée 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 défaut depuis
  la version 1.1.80. Le pilote Arcnet utilise `arc0' comme nom au lieu
  de l'`eth0' habituel pour les périphériques 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 générales.

  Le pilote est également censé fonctionner avec les cartes ARCnet
  100 Mb/s !


  55..88..  AATT&&TT

  Notez que le StarLAN d'AT&T est une technologie orpheline, comme le
  LattisNet de SynOptics, et qu'elle ne peut pas être utilisée dans un
  environnement 10Base-T standard, sans un hub qui `parle' les deux
  protocoles.


  55..88..11..  AATT&&TT TT77223311 ((LLaannPPAACCEERR++))

  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.


  55..99..  BBooccaa RReesseeaarrcchh

  Oui, ils font autre chose que des cartes séries multi-ports. :-)


  55..99..11..  BBooccaa BBEENN ((IISSAA,, VVLLBB;; PPCCII))

  Statut : Supporté, Nom du pilote : pcnet32, lance

  Ces cartes sont basées sur les puces PCnet d'AMD. Les acheteurs
  exigeants doivent être prévenus que de nombreux utilisateurs ont eu
  des problèmes sans fin avec ces cartes VLB/PCI. Les propriétaires de
  systèmes Pentium rapides ont été tout particulièrement touchés. Notez
  qu'il ne s'agit pas d'un problème de pilote, puisqu'il touche aussi
  les utilisateurs de DOS/Windows/NT. Le numéro du support technique de
  Boca est le 1 (407) 241-8088,

  (NDT : Ce numéro 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 mêmes maux.

  Donald a réalisé un test comparatif entre les cartes PCI Boca et une
  implémentation similaire d'Allied Telsyn avec la puce PCnet/PCI, qui
  montrait que le problème se situe dans l'implémentation faite par Boca
  de la puce PCnet/PCI. On peut consulter les résultats de ce test sur
  le serveur WWW de Don :

       Linux @ CESDIS <http://cesdis.gsfc.nasa.gov/linux/>


  Boca offre une `réparation - garantie' aux propriétaires affectés par
  ce problème qui entraîne 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 système.

  Des informations plus générales sur les puces AMD se trouvent
  dans ``AMD LANCE''.

  Plus d'informations techniques sur les cartes Ethernet basées sur
  l'AMD LANCE sont disponibles dans ``Notes sur         l'AMD...''.


  55..1100..  CCaabblleettrroonn

  Donald écrit : ``Oui, encore une autre de ces sociétés qui ne donnera
  pas ses informations pour programmer. Ils ont attendu des mois avant
  de confirmer qu'en fait toutes leurs informations étaient
  propriétaires, gaspillant délibérément 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 années. Envoyez un e-mail à
  support@ctron.com si vous voulez vérifier ce point précis, ou demander
  des informations techniques. Toutefois, à l'heure actuelle, il y a
  très peu de demandes pour des pilotes mis à jour pour les cartes E20xx
  et E21xx.


  55..1100..11..  EE1100****,, EE1100****--xx,, EE2200****,, EE2200****--xx

  Statut : Partiellement supporté, Nom du pilote : ne (+8390)

  Il s'agit de presque-clones de NEx000 qui fonctionnent avec les
  pilotes NEx000 standard d'après les informations qui nous sont
  revenues, grâce à un test spécial-Cabletron dans la procédure de
  détection. S'il y a le moindre problème, il ne sera très certainement
  pas résolu, car les informations de programmation ne sont pas
  disponibles.



  55..1100..22..  EE22110000

  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 propriétaires. La E2100 bénéficie
  d'une conception lamentable. Dès qu'elle mappe sa mémoire partagée
  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 façon sécurisée un autre périphérique à mémoire
  partagée géré 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 problème en inhibant
  les interruptions pendant le transfert des paquets, mais dans ce cas-
  là on perdra pratiquement à coup sûr des tops d'horloge). De plus, si
  vous programmez incorrectement la carte, ou que vous arrêtez la
  machine juste au mauvais moment, même 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 sélection du support physique est automatique, mais vous pouvez
  outrepasser cette fonctionnalité en utilisant les bits de poids
  faibles du paramètre dev->mem_end. Consultez ``PARAM_2''. Les
  utilisateurs des modules peuvent spécifier 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 à mémoire partagée, à
  peu près similaire à une WD8013 avec des lésions cérébrales, tandis
  que la NE2100 (et la NE1500) utilise une conception basée sur la puce
  à contrôle 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 spécifiques aux
  modules.


  55..1100..33..  EE2222****

  Statut : Partiellement supporté, Nom du pilote : lance

  Si l'on en croit les informations trouvées 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
  générique lance.



  55..1111..  CCooggeenntt

  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
                           (Téléphone entre 8h et 17h, heure de la côte
                            Pacifique)
          Fax (360) 378-2882
          Compuserve GO COGENT
          Bulletin Board Service (360) 378-5405
          Internet: support@cogentdata.com




  55..1111..11..  EEMM110000--IISSAA//EEIISSAA

  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 à vérifier.


  55..1111..22..  CCooggeenntt eeMMAASSTTEERR++,, EEMM110000--PPCCII,, EEMM440000,, EEMM996600,, EEMM996644

  Statut : Supporté, Nom du pilote : de4x5, tulip

  Il s'agit encore une fois d'une implémentation de la 21040 de DEC,
  dont on peut espérer 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.


  55..1122..  CCoommppaaqq

  Compaq n'est pas vraiment dans le domaine de la conception et de la
  fabrication de cartes Ethernet, mais beaucoup de leurs systèmes
  comportent des contrôleurs Ethernet intégrés à la carte-mère.


  55..1122..11..  CCoommppaaqq DDeesskkpprroo // CCoommppaaqq XXLL ((EEmmbbeeddddeedd AAMMDD CChhiipp))

  Statut : Supporté, Nom du pilote : pcnet32


  Des machines comme celles de la série XL ont une puce PCI 79c97x d'AMD
  sur la carte-mère qui peut être utilisée 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
  détails :

  ``Le problème avec cette machine Compaq est que le point d'entrée du
  bus PCI est chargé en mémoire haute, à un endroit où le noyau Linux ne
  pourra pas (n'ira pas) le chercher. Résultat : la carte n'est jamais
  détectée ni utilisable (en passant : la souris ne fonctionnera pas non
  plus). La manière de contourner le problème (telle qu'elle est décrite
  en détail 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 déplacer le
  répertoire PCI à un endroit où il est normalement stocké (et où Linux
  peut le trouver).''

  Des informations plus générales sur les puces AMD se trouvent
  dans ``AMD LANCE''.



  55..1122..22..  CCoommppaaqq NNeetttteelllliiggeenntt//NNeettFFlleexx ((EEmmbbeeddddeedd TThhuunnddeerrLLAANN CChhiipp))

  Statut : Supporté, Nom du pilote : tlan

  Ces systèmes utilisent une puce Texas Instrument ThunderLAN, pour plus
  d'informations, référez vous à la section ``ThunderLAN''.



  55..1133..  DDaannppeexx



  55..1133..11..  DDaannppeexx EENN99440000

  Statut : Supporté, Nom du pilote : de4x5, tulip

  Encore une autre carte basée sur la puce 21040 de DEC, dont on sait
  qu'elle fonctionne correctement, et à un prix relativement modéré.

  Consultez ``DEC 21040'' pour plus d'information sur ces cartes, et
  l'état d'avancement actuel du pilote.



  55..1144..  DD--LLiinnkk



  55..1144..11..  DDEE--110000,, DDEE--220000,, DDEE--222200--TT,, DDEE--225500


  Statut : Supporté, Nom du pilote : ne (+8390)

  Certaines des premières cartes D-Link ne possédaient 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
  fréquemment indiquées comme possédant des erreurs de correspondance
  sur des fausses adresses de transfert avec les premières versions de
  Linux. Notez qu'il existe aussi des cartes chez Digital (DEC, Digital
  Equipment Corporation) nommées DE100 et DE200, mais la similitude
  s'arrête là.


  55..1144..22..  DDEE--552200

  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 sélection DMA et la numérotation des
  puces se trouvent dans ``AMD LANCE''.

  Des informations plus techniques sur les cartes Ethernet basées sur la
  puce LANCE d'AMD sont disponibles dans ``Notes         sur l'AMD...''.


  55..1144..33..  DDEE--552288

  Statut : Supporté, Nom du pilote : ne, ne2k-pci (+8390)

  On dirait que D-Link a aussi commencé à fabriquer des clones de
  NE2000.



  55..1144..44..  DDEE--553300

  Statut : Supporté, Nom du pilote : de4x5, tulip

  Il s'agit d'une implémentation générique de la puce PCI 21040 de DEC,
  dont on sait qu'elle fonctionne avec le pilote générique 21040
  `tulip'.

  Consultez ``DEC 21040'' pour plus d'information sur ces cartes, et
  l'état d'avancement actuel du pilote.


  55..1144..55..  DDEE--660000

  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
  intéressés par ceci. Le pilote est inclus dans l'arborescence du noyau
  par défaut. Bjorn Ekwall bj0rn@blox.se a écrit le pilote.  Attendez-
  vous à des taux de transfert de 180 Ko/s par le port parallèle. 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 périphérique que vous passez à ifconfig est
  _m_a_i_n_t_e_n_a_n_t eth0 et non pas celui précédemment utilisé, dl0.

  Si votre port parallèle _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 défini l'IRQ et l'adresse du port comme des constantes
  plutôt 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 implémentent le port parallèle interne à
  l'adresse 0x3bc, ce qui est l'endroit où les ports parallèles
  étaient/sont sur les cartes monochromes.



  55..1144..66..  DDEE--662200

  Statut : Supporté, Nom du pilote : de620

  Même chose que pour la DE-600, avec seulement deux formats de sortie.
  Bjorn a écrit un pilote pour ce modèle, pour les versions 1.1 et
  supérieures du noyau. Consultez les informations ci-dessus à propos de
  la DE-600.


  55..1144..77..  DDEE--665500

  Statut : Partiellement supporté, Nom du pilote : de650 ?

  Des gens utilisent cette carte PCMCIA depuis quelque temps déjà avec
  leur portable. Il s'agit d'une conception simple basée sur le 8390,
  qui ressemble beaucoup à une NE2000. La carte PCMCIA `LinkSys' et
  l'IC-Card Ethernet sont, de plus, supposées ê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>



  55..1155..  DDFFII



  55..1155..11..  DDFFIINNEETT--330000 eett DDFFIINNEETT--440000

  Statut : Supporté, Nom du pilote : ne (+8390)

  Ces cartes sont maintenant détectées (depuis la version 0.99pl15)
  grâce à 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.)



  55..1166..  DDiiggiittaall // DDEECC



  55..1166..11..  DDEEPPCCAA,, DDEE110000//11,, DDEE220000//11//22,, DDEE221100,, DDEE442222

  Statut : Supporté, Nom du pilote : depca

  De la documentation incluse dans le fichier source depca.c comprend
  des informations sur la façon d'utiliser plus d'une de ces cartes dans
  une machine. Notez que la DE422 est une carte EISA. Ces cartes sont
  toutes basées sur la puce LANCE d'AMD. Consultez ``AMD LANCE'' pour
  plus d'informations. Au maximum, deux des cartes ISA peuvent être
  utilisées, parce que leurs adresses d'E/S de base ne peuvent être
  fixées 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 différents ioctl() avec lesquels l'utilisateur peut
  s'amuser.


  55..1166..22..  DDiiggiittaall EEtthheerrWWoorrkkss 33 ((DDEE220033,, DDEE220044,, DDEE220055))

  Statut : Supporté, Nom du pilote : ewrk3

  Ces cartes utilisent une puce propriétaire de DEC, par opposition à la
  puce LANCE utilisée dans les cartes antérieures comme la DE200. Ces
  cartes peuvent fonctionner en mémoire partagée ou en E/S programmées,
  bien que vous ayez un gain de performance de 50 % en utilisant le mode
  PIO (E/S programmées). La taille de la mémoire partagée peut être
  réglée à 2 Ko, 32 Ko, ou 64 Ko, mais seules les valeurs 2 et 32 ont
  été testées avec ce pilote. David dit que les performances sont
  virtuellement les mêmes entre le mode 2 Ko et le mode 32 Ko. Plus
  d'informations (y compris l'utilisation du pilote comme module
  chargeable) figurent en tête 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() intéressants
  qui peuvent être utilisés pour lire ou effacer les statistiques sur
  les paquets, lire/écrire l'EEPROM, changer l'adresse matérielle, et
  d'autres choses du même 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 répertoire /pub/Linux/system/Network/management -- cherchez un
  fichier ewrk3tools-X.XX.tar.gz.

  (NDT : Le lecteur français aura bien entendu tout intérêt à utiliser
  un site miroir, plus rapide. Par exemple :

  ftp://ftp.lip6.fr/pub/linux/sunsite/system/Network/management)


  55..1166..33..  DDEE442255 EEIISSAA,, DDEE443344,, DDEE443355,, DDEE550000

  Statut : Supporté, Nom du pilote : de4x5, tulip

  Ces cartes sont basées sur la puce 21040 mentionnée 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 conçues par DEC de fonctionner avec ce
  pilote. Jetez un coup d'oeil à README.de4x5 pour les détails.

  Toutes les cartes Digital réaliseront la détection automatique du
  média (à l'exception, temporaire, de la DE500 à cause d'un problème de
  brevet).

  Ce pilote est aussi prêt à fonctionner avec les processeurs Alpha et
  accepte d'être chargé comme module. Les utilisateurs peuvent accéder
  aux fonctionnalités internes du pilotes par des appels ioctl() -- voir
  l'outil ewrk3 et les sources de4x5.c pour des informations sur la
  façon de procéder.


  55..1166..44..  DDEECC 2211004400,, 2211004411,, 22111144xx,, TTuulliipp

  Statut : Supporté, Nom du pilote : de4x5, tulip


  La 21040 de DEC est une solution Ethernet en une seule puce à contrôle
  proposée par Digital, similaire à la PCnet d'AMD. La 21040 est
  spécifiquement conçue 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 basées sur cette
  puce. Vous pouvez utiliser le pilote de la DE425 dont nous avons parlé
  plus haut, et le pilote générique `tulip' pour 21040.

  AAtttteennttiioonn :: Même si votre carte est basée 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 basée 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 façon différente, et, secundo, dans la DC21142/3 est
  maintenant un registre de contrôle SIA (façon DC21041). La seule
  petite lueur d'espoir est que nous puissions décoder 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 sûr(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 payée.

  La puce 21041 mise à jour, se trouve aussi à la place de la 21040 sur
  la plupart des cartes récentes EtherPower de SMC. La 21140 est
  destinée 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 conçues par DEC, lisez le fichier README.de4x5 pour les
  détails.

  Donald a utilisé des cartes EtherPower-10/100 de SMC pour développer
  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 problèmes avec ce pilote, vous devriez
  récupérer la dernière 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
  différents cartes/constructeurs qui utilisent la puce 21040.

  Notez également que le pilote tulip est encore considéré 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 même 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


  55..1177..  FFaarraalllloonn

  Farallon vend des adaptateurs et des transceivers EtherWave. Ce
  périphérique permet de mettre en série plusieurs périphériques
  10baseT.


  55..1177..11..  EEtthheerrwwaavvee ddee FFaarraalllloonn

  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 utilisés avec succès sous Linux avec la
  version actuelle du pilote 3c509. C'est bien trop cher pour une
  utilisation généralisée, mais c'est une bonne option pour des cas
  particuliers.   Les prix chez Hublet démarrent à 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 câble
  trop court, mais pas si vous avez deux réseaux qui tombent trop
  courts.


  55..1188..  FFuujjiittssuu

  Contrairement à de nombreux fabricants de puces, Fujitsu a aussi
  fabriqué et vendu des cartes réseau basées sur les leurs.


  55..1188..11..  FFuujjiittssuu FFMMVV--118811//118822//118833//118844

  Statut : Supporté, Nom du pilote : fmv18x

  Si on en croit le pilote, ces cartes sont faites dans la lignée de
  l'implémentation de la Fujitsu MB86965, ce qui les rend très
  similaires aux cartes Allied Telesis AT1700.


  55..1199..  HHeewwlleetttt PPaacckkaarrdd

  Les cartes 272** utilisent des E/S programmées, similaires aux cartes
  NE*000, mais le port de transferts de données peut être `éteint' quand
  vous n'y accédez pas, ce qui évite les problèmes avec les pilotes qui
  réalisent une détection automatique.

  Merci à Glenn Talbott d'avoir aidé à éclaircir la confusion qui
  régnait dans cette section en ce qui concerne les numéros de version
  des matériels HP.


  55..1199..11..  2277224455AA

  Statut : Supporté, Nom du pilote : hp (+8390)

  Carte 8 bits 10BaseT basée sur le 8390, non recommandée pour toutes
  les raisons des 8 bits. Elle a été repensée il y a quelques années
  pour augmenter l'intégration, ce qui a causé des changements dans les
  durées d'initialisation, qui affectent les programmes de test, mais
  pas les pilotes réseau. (La nouvelle carte n'est pas `prête' aussi
  vite que l'ancienne après être entrée 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 spécifiques aux
  modules.





  55..1199..22..  HHPP EEtthheerrTTwwiisstt,, PPCC LLaann++ ((2277224477,, 2277225522AA))

  Statut : Supporté, Nom du pilote : hp+ (+8390)

  La HP PC Lan+ est différente de la carte HP PC Lan standard. Ce pilote
  a été ajouté à la liste des pilotes du noyau standard pendant le cycle
  de développement des version 1.1.x. Il peut être utilisé soit en mode
  PIO (E/S programmées) comme une ne2000, ou en mode mémoire partagée
  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 mémoire vive embarquée pour le tampon de
  réception/transmission des paquets au lieu des 16 Ko habituels, et
  elles offrent toutes les deux une fonction de détection automatique du
  connecteur réseau.

  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 spécifiques aux
  modules.


  55..1199..33..  HHPP--JJ22440055AA

  Statut : Supporté, Nom du pilote : lance

  Ces cartes sont meilleur marché, et légèrement plus rapides que la
  27247/27252A, mais il leur manque certaines fonctionnalités, comme la
  connectivité AUI ou ThinLAN (10Base2), et un support pour PROM de
  démarrage (boot PROM). C'est une conception plutôt générique de la
  LANCE, mais une décision mineure de conception la rend incompatible
  avec un pilote générique `NE2100'. Un support spécial pour cette carte
  (y compris la lecture du canal DMA sur la carte) est inclus grâce aux
  informations fournies par Glenn Talbott de chez HP.

  Plus d'informations techniques sur les cartes basée sur la puce AMD se
  trouvent dans ``Notes sur AMD...''.


  55..1199..44..  CCaarrttee EEtthheerrnneett eemmbbaarrqquuééee ddee ll''HHPP--VVeeccttrraa

  Statut : Supporté, Nom du pilote : lance

  L'HP-Vectra possède une puce PCnet d'AMD sur sa carte-mère. La
  sélection du DMA et des informations sur la numérotation de la puce se
  trouvent dans ``AMD LANCE''.

  Plus d'informations techniques sur les cartes basées sur la puce AMD
  se trouvent dans ``Notes sur AMD...''.


  55..1199..55..  CCaarrtteess HHPP 1100//110000 VVGG AAnnyy LLaann ((2277224488BB,, JJ22557733,, JJ22557777,, JJ22558855,,
  JJ997700,, JJ997733))

  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.


  55..1199..66..  HHPP NNeettSSeerrvveerr 1100//110000TTXX PPCCII ((DD55001133AA))

  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 détails.


  55..2200..  IIBBMM // IInntteerrnnaattiioonnaall BBuussiinneessss MMaacchhiinneess



  55..2200..11..  IIBBMM TThhiinnkkppaadd 330000

  Statut : Supporté, Nom du pilote : znet

  Celui-ci est compatible avec le Z-note de Zénith, basé sur une puce
  Intel. Voir ``Z-note''.

  Ce site est supposé avoir une base de données exhaustive de choses
  utiles pour les versions récentes du Thinkpad. Je ne l'ai pas vérifié
  moi-même.


       Thinkpad-info <http://peipa.essex.ac.uk/html/linux-
       thinkpad.html>


  Pour ceux d'entre vous qui n'ont pas de navigateur WWW à portée de la
  main, essayez peipa.essex.ac.uk:/pub/tp750/.


  55..2200..22..  EEtthheerrnneett dd''IIBBMM IIBBMM CCrreeddiitt CCaarrdd AAddaappttoorr ffoorr EEtthheerrnneett -- AAddaappttaa­­
  tteeuurr ``CCrreeddiitt CCaarrdd'' ppoouurr

  Statut : Partiellement supporté, Nom du pilote : ? (distribué
  séparément)

  Des personnes utilisent aussi cette carte PCMCIA avec Linux. Comme
  déjà 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>



  55..2200..33..  IIBBMM TTookkeenn RRiinngg

  Statut : Partiellement supporté, Nom du pilote : ibmtr

  Le support de Token Ring nécessite 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 récemment, 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
  séries 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
  basées sur Tropic.
  55..2211..  CCaarrtteess EEtthheerrnneett IICCLL



  55..2211..11..  IICCLL EEtthheerrTTeeaamm 1166ii//3322

  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 utilisée dans les cartes AT1700.


  55..2222..  CCaarrtteess EEtthheerrnneett IInntteell

  Note : les noms de certaines cartes Intel sont ambigus au possible et
  prêtent à confusion . Si vous avez un doute, vérifiez le numéro 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 numéros listés ici.


  55..2222..11..  EEtthheerr EExxpprreessss

  Statut : Supporté, Nom du pilote : eexpress

  Cette carte utilise l'Intel i82586. Les premières versions de ce
  pilote (dans les noyaux 1.2) étaient classées 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 expérimental, et pose pas mal
  de probleme sur les machines rapides.

  Les commentaires au début du fichier source donnent la liste de
  certains des problèmes (et solutions) associés à 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.


  55..2222..22..  EEtthheerr EExxpprreessss PPRROO//1100

  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
  systèmes Ethernet intégrés de Compaq, basés sur la puce i82595.


  55..2222..33..  EEtthheerr EExxpprreessss PPRROO//1100 PPCCII ((EEIISSAA))

  Statut : Partiellement supporté, Nom du pilote : ? (distribué
  séparement)

  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
  contrôleur-réseau 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 nécessite par conséquent le pilote
  EEPro100 plutôt 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 différents mécanismes de
  détection (PCI ou EISA) qui sont utilisés dans chaque cas.


  55..2222..44..  EEtthheerr EExxpprreessss PPRROO 1100//110000BB

  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 numéros de puces que gère 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 bêtise de la part
  d'Intel ?


  55..2233..  KKiinnggssttoonn

  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 détails.

  Il paraît que la carte à base de KNE40 DEC 21041 tulip fonctionne très
  bien avec le pilote tulip générique



  55..2244..  LLiinnkkSSyyss

  LinkSys produit tout un tas de clones de NE2000, certains étant de
  simple cartes ISA, d'autres des cartes ISA `plug and play' et même des
  clones de NE2000 PCI basés sur l'un des jeux de puces NE2000-PCI
  supportés. Il existe tout simplement trop de modèles pour pouvoir tous
  les citer ici.

  LinkSys aime bien Linux, ils ont une page WWW de support spécifique,
  et Linux est imprimé sur les boîtes de certains de leurs produits.
  Consultez :


       http://www.linksys.com/support/solution/nos/linux.htm


  55..2244..11..  CCaarrtteess LLiinnkkSSyyss EEtthheerrffaasstt 1100//110000..

  Statut : Supporté, Nom du pilote : tulip

  Notez que ces cartes ont connu quelques `révisions' (c-à-d différents
  chipsets utilisés) mais toutes avaient le même nom. La première
  utilisait le chipset DEC. La seconde, le contrôleur réseau 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 différentes versions de ces cartes,
  référez vous au site de LinkSys mentionné ci-dessus.


  55..2244..22..  LLiinnkkSSyyss PPoocckkeett EEtthheerrnneett AAddaapptteerr PPlluuss ((PPEEAAEEPPPP))

  Statut : Supporté, Nom du pilote : de620

  On suppose qu'il s'agit d'un clone du DE-620, et il paraît que cela
  fonctionne bien avec ce pilote. Consultez ``DE-620'' pour plus
  d'information.


  55..2244..33..  AAddaappttaatteeuurr LLiinnkkSSyyss PPCCMMCCIIAA

  Statut : Supporté, Nom du pilote : de650 (?)

  On suppose qu'il s'agit d'un DE-650 "recarrossé" avec une étiquette
  différente.  Consultez ``DE-650'' pour plus d'information.


  55..2255..  MMiiccrrooddyynnee



  55..2255..11..  MMiiccrrooddyynnee EExxooss 220055TT

  Statut : Partiellement supporté, Nom du pilote : ?

  Une autre carte basée sur l'i82586. Dirk Niggemann dirk-n@dircon.co.uk
  a écrit un pilote qu'il classe dans la catégorie ``pré-alpha'' et dont
  il aimerait bien que les gens le testent. Ecrivez-lui pour plus de
  détails.


  55..2266..  MMyylleexx

  Mylex peut être joint aux numéros 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>




  55..2266..11..  MMyylleexx LLNNEE339900AA,, LLNNEE339900BB

  Statut : supporté, Nom du pilote : lne390 (+8390)

  Ces cartes EISA plutôt anciennes utilisent une implémentation à
  mémoire partagée similaire aux wd80x3. Un pilote pour ces cartes est
  disponible dans les noyaux 2.2. Assurez vous de bien spécifier une
  zone de mémoire inférieure a 1 Mo ou alors, supérieure à la taille
  totale de la RAM de votre ordinateur.


  55..2266..22..  MMyylleexx LLNNPP110011

  Statut : Supporté, Nom du pilote : de4x5, tulip

  Il s'agit d'une carte PCI basée sur la puce 21040 de DEC. On peut
  sélectionner les ports 10BaseT, 10Base2 ou 10Base5 (AUI). La carte
  LNP101 a été testée et elle fonctionne avec le pilote 21040 générique.

  Consultez la section sur la puce 21040 (``DEC         21040'') pour
  plus d'information.


  55..2266..33..  MMyylleexx LLNNPP110044

  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 indépendants. Elle devrait fonctionner avec les pilotes 21040
  récents qui savent partager les IRQ, mais personne à ce jour n'a
  indiqué l'avoir essayée (autant que je sache).


  55..2277..  EEtthheerrnneett cchheezz NNoovveellll :: NNEExxxxxxxx eett lleess cclloonneess aassssoocciiééss..

  Le préfixe `NE' vient de `Novell Ethernet'. Novell a suivi la
  conception la moins chère décrite dans les documentations de National
  Semiconductor, et a vendu les droits de fabrication à Eagle (s'en est
  débarrassé ?), juste pour pouvoir mettre sur le marché des cartes
  Ethernet à prix raisonnables. (La maintenant omniprésente carte
  NE2000).


  55..2277..11..  NNEE11000000,, NNEE22000000

  Statut : Supporté, Nom du pilote : ne (+8390)

  ``NE2000'' est maintenant un nom générique pour une conception
  minimaliste basée sur la puce 8390 de National Semiconductor. Ces
  cartes utilisent des E/S programmées plutôt que la mémoire partagée,
  ce qui amène une installation plus facile mais des performances
  légèrement moins bonnes et quelques problèmes. Certains des problèmes
  qui peuvent survenir avec les cartes NE2000 sont cités à ``Problèmes
  avec...''.

  Quelques clones de NE2000 utilisent la puce `AT/LANTic' 83905 de
  National Semiconductor, qui offre un mode à mémoire partagée similaire
  à celui de la wd8013 et une configuration logicielle via une EEPROM.
  Le mode à mémoire partagée engendrera moins de charge processeur (et
  sera donc plus efficace) que le mode à E/S programmées.

  En général ce n'est pas une bonne idée de placer un clone de NE2000 à
  l'adresse d'E/S 0x300 parce que pratiquement _t_o_u_s les pilotes de
  périphériques testent cette adresse au démarrage. Certains clones de
  NE2000 bas de gamme acceptent difficilement d'être titillés au mauvais
  endroit, et ils répondront en bloquant votre machine.  L'adresse 0x320
  est également une mauvaise idée 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 spécifiques aux
  modules.


  55..2277..22..  NNEE22000000--PPCCII ((RReeaallTTeekk//WWiinnbboonndd//CCoommppeexx))

  Statut : Supporté, Nom du pilote : ne, ne2k-pci (+8390)

  Oui, croyez-le ou non, des gens fabriquent des cartes PCI basées sur
  la vieille interface de la NE2000, conçue il y a plus de dix ans.
  Actuellement, presque toutes ces cartes sont basées 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 possèdent un une
  signature PCI différente.

  Le dernier noyau Linux 2.0 est capable de détecter 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 détectée). Il y a dorénavant deux pilotes
  que vous pouvez utiliser, le pilote ISA/PCI originel ne.c et le pilote
  PCI plus récent ne2k-pci.c.

  Pour utiliser le pilote original, vous devez répondre `Y' à l'option
  `Other ISA cards' (`Autres cartes ISA ?') lorsque vous exécutez make
  config car en fait vous utilisez le même pilote NE2000 que celui des
  cartes ISA. (Cela devrait accréditer l'idée que ces cartes ne sont en
  aucune façon aussi intelligentes que, disons, une carte à base de
  PCNet-PCI ou DEC 21040...).

  Le récent pilote PCI diffère de la version ISA/PCI par le fait que le
  support pour les cartes 8 bits NE1000 a été supprimé et que les
  données transitent de/vers la carte en de plus gros paquets, sans les
  pauses que les vieilles ISA NE2000 nécessitaient pour opérer de façon
  fiable. Il en résulte un pilote légèrement plus petit, et légèrement
  plus efficace, mais ne vous emballez pas trop vite, les différences ne
  seront pas éclatantes en utilisation normale. (Si vous voulez beaucoup
  d'efficacité avec peu de charge CPU, alors une NE2000 PCI est un très
  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 détectée 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 boîtes de leurs
  produits même si c'est totalement différent (ex : PCNet-PCI ou RealTek
  8139). En cas de doute, regardez la puce principale et comparez avec
  ce qui est écrit ici.



  55..2277..33..  NNEE--1100//110000

  Statut : Non supporté

  Il s'agit de cartes ISA 100Mb/s basées 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 créer un pilote.


  55..2277..44..  NNEE11550000,, NNEE22110000

  Statut : Supporté, Nom du pilote : lance

  Ces cartes utilisent la puce 7990 LANCE originelle d'AMD et sont
  supportées grâce au pilote Linux lance. Les clones de NE2100 plus
  récents reposent sur la puce mise à jour PCnet/ISA d'AMD.

  Des versions plus anciennes du pilote lance avaient des problèmes pour
  obtenir la ligne d'IRQ via l'affectation automatique d'IRQ des
  cartes 7990 originelles de Novell/Eagle. Heureusement cela est
  maintenant résolu. Si ce n'est pas le cas, spécifiez l'IRQ via LILO,
  et indiquez-nous si cela pose encore des problèmes.

  La sélection du DMA et des informations sur la numérotation de la puce
  se trouvent dans ``AMD LANCE''.

  Des informations plus techniques sur les cartes Ethernet basées sur
  l'AMD LANCE sont disponibles dans ``Notes sur         l'AMD...''.


  55..2277..55..  NNEE//22 MMCCAA

  Statut : Partiellement supporté, Nom du pilote : ne2

  Quelques cartes NE2000 MCA ont été fabriquées par diverses sociétés.
  Ce pilote, disponible dans les noyaux 2.2 détectera les cartes
  suivantes : Novell Ethernet Adapter NE/2, Compex ENET-16 MC/P, et
  l'Ethernet Adapter AE/2 de chez Arco.


  55..2277..66..  NNEE33220000

  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 façon, il n'y a
  ni documentation sur la carte, ni de vraie demande pour un pilote.


  55..2277..77..  NNEE33221100

  Statut : Supporté, Nom du pilote : ne3210 (+8390)

  Cette carte EISA est complètement différente de la NE3200, car elle
  utilise une puce National Semiconductor 8390. Le pilote se trouve dans
  les noyaux 2.2. Assurez vous d'avoir réglé la mémoire partagée en
  dessous de 1 Mo, ou au dessus de la plus grande adresse de mémoire
  physique qui est installée sur la machine.


  55..2277..88..  NNEE55550000

  Statut : Supporté, Nom du pilote : pcnet32

  Ce sont juste des cartes basées sur la puce PCnet-PCI ('970A) d'AMD.
  Plus d'informations sur les cartes à base de LANCE/PCnet se trouvent
  dans ``AMD LANCE''.


  55..2288..  PPrrootteeoonn



  55..2288..11..  PPrrootteeoonn PP11337700--EEAA

  Statut : Supporté, Nom du pilote : ne (+8390)

  Il s'agit apparemment d'un clone de NE2000, et il fonctionne
  correctement avec Linux.


  55..2288..22..  PPrrootteeoonn PP11667700--EEAA

  Statut : Supporté, Nom du pilote : de4x5, tulip

  Encore une autre carte PCI basée 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.


  55..2299..  PPuurree DDaattaa



  55..2299..11..  PPDDUUCC88002288,, PPDDII88002233

  Statut : Supporté, Nom du pilote : wd (+8390)

  Les séries PDUC8028 et PDI8023 de cartes PureData semblent fonctionner
  correctement, grâce au code de détection spécial qu'a fourni Mike
  Jagdis jaggy@purplet.demon.co.uk. Le support pour ces cartes est
  intégré dans le pilote Western Digital (WD).


  55..3300..  RRaaccaall--IInntteerrllaann

  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.


  55..3300..11..  EESS33221100

  Statut : Partiellement supporté, Nom du pilote : es3210

  Il s'agit d'une carte EISA à mémoire partagée basée sur le 8390. Un
  pilote expérimental pour les versions 2.2 du noyau est disponible.  On
  indique qu'il fonctionne correctement, mais la détection de l'IRQ EISA
  et de l'adresse de mémoire partagée paraît ne pas fonctionner avec (au
  moins) les premières révisions de ces cartes. (Ce problème n'est pas
  spécifique à Linux d'ailleurs). Dans ce cas, vous devez les fournir au
  pilote ; par exemple, pour une carte utilisant l'IRQ 5 et la mémoire
  partagée en 0xd0000. Avec un pilote modulaire, ajoutez options es3210
  irq=5 mem=0xd0000 à votre fichier /etc/conf.modules.  Si le pilote est
  intégré au noyau, donnez lui ether=5,0,0xd0000,eth0 au boot.
  L'adresse de base d'E/S est détectée automatiquement et une valeur de
  zéro doit donc être utilisée.


  55..3300..22..  NNII55001100

  Statut : Partiellement supporté, Nom du pilote : ni5110

  Le pilote pour ces vieilles cartes 8 bits MiCom-Interlan était
  disponible séparément, mais on le trouve maintenant en tant que pilote
  expérimental dans les noyaux 2.2.


  55..3300..33..  NNII55221100

  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 possèdent cette carte.  Consultez ``Les pilotes
  `Alpha''' pour des informations importantes sur l'utilisation des
  pilotes Ethernet en phase de test `alpha' avec Linux.


  55..3300..44..  NNII66551100 ((nnoott EEBB))

  Statut : Partiellement supporté, Nom du pilote : ni65

  Il existe également un pilote pour la NI6510 (basée 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 générique. Consultez ``Les pilotes
  `Alpha''' pour des informations importantes sur l'utilisation des
  pilotes Ethernet en phase de test `alpha' avec Linux.


  55..3300..55..  EEtthheerrBBllaasstteerr ((aakkaa NNII66551100EEBB))

  Statut : Supporté, Nom du pilote : lance

  Depuis le noyau 1.3.23, le pilote LANCE générique comprend un test
  supplémentaire pour la signature 0x52, 0x44 spécifique de la NI6510EB.
  D'autres ont indiqué que cette signature n'est pas la même pour toutes
  les cartes NI6510EB, ce qui peut amener le pilote lance à ne pas
  détecter votre carte. Si cela vous arrive, vous pouvez changer la
  procédure de détection (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 défaut.

  Les cartes devraient probablement être placées en mode `hautes
  performances' et non pas dans le mode compatible-NI6510 lorsque l'on
  utilise le pilote lance.


  55..3311..  RReeaallTTeekk



  55..3311..11..  RReeaallTTeekk RRTTLL88000022//88001122 ((AATT--LLaann--TTeecc)) PPoocckkeett aaddaappttoorr

  Statut : Supporté, Nom du pilote : atp

  Il s'agit d'un adaptateur de poche générique, peu cher, développé 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 premières versions de ce pilote, le nom de
  périphérique que vous passiez à ifconfig _n_'_é_t_a_i_t _p_a_s eth0 mais atp0.


  55..3311..22..  RReeaallTTeekk 88000099

  Statut : Supporté, Nom du pilote : ne (+8390)

  C'est un clone de NE2000 ISA, et il fonctionne très 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 même site.


  55..3311..33..  RReeaallTTeekk 88001199


  Statut : Support, Nom du pilote : ne (+8390)

  Celle-ci est la version "Plug and Pray" de la précédente. Utilisez
  l'utilitaire DOS pour désactiver 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 même site.


  55..3311..44..  RReeaallTTeekk 88002299

  Statut : Supporté, Nom du pilote : ne2k-pci

  Il s'agit d'une implémentation PCI sur une seule puce d'un clone de
  NE2000. Différents 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.


  55..3311..55..  RReeaallTTeekk 88112299//88113399

  Statut : Partiellement supporté, Nom du pilote : rtl8139

  Encore une autre solution Ethernet PCI sur une puce unique de RealTek.
  Un pilote pour les cartes basées 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



  55..3322..  SSaaggeerr



  55..3322..11..  SSaaggeerr NNPP994433

  Statut : Partiellement supporté, Nom du pilote : 3c501

  Il s'agit juste d'un clone de 3c501, avec un préfixe de S.A. PROM
  différent. Je pense qu'elle est aussi cliniquement morte que la vraie
  3c501, en passant.  Le pilote vérifie la présence 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.


  55..3333..  SScchhnneeiiddeerr && KKoocchh



  55..3333..11..  SSKK GG1166

  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 basée sur la première édition de la
  puce LANCE (la 7990). Une fois de plus, cette carte semble ne pas
  fonctionner avec le pilote LANCE générique.


  55..3344..  SSEEEEQQ



  55..3344..11..  SSEEEEQQ 88000055

  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 intérêt à envoyer un message à
  hamish@zot.apana.org.au.


  55..3355..  SSMMCC ((SSttaannddaarrdd MMiiccrroossyysstteemmss CCoorrpp..))

  La division Ethernet de Western Digital a été achetée 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 basées 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 téléphone : 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>.


  55..3355..11..  WWDD88000033,, SSMMCC EElliittee

  Statut : Supporté, Nom du pilote : wd (+8390)

  Ce sont les versions 8 bits de la carte. La 8003 8 bits est légèrement
  moins chère, mais ne vaut ces économies que pour une utilisation
  légère. 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 utilisée, et si cela échoue, le
  pilote utilise l'IRQ 5 sans rien dire. Vous pouvez obtenir les
  disquettes d'installation/de paramétrage de SMC sur leur site FTP.
  Notez que certains des plus récents programmes 'SuperDisk' de SMC ne
  réussiront pas à détecter les vraies vieilles cartes sans EEPROM. Le
  fichier SMCDSK46.EXE semble être un bon choix passe-partout.  Notez
  aussi que les réglages des cavaliers pour toutes leurs cartes se
  trouvent dans un fichier texte dans l'archive sus-mentionnée. La
  dernière (meilleure ?) version peut être obtenue depuis ftp.smc.com.

  Comme ces cartes sont fondamentalement les mêmes que leurs homologues
  16 bits (WD8013 / SMC Elite16), vous devriez consulter la section
  suivante pour en savoir plus.


  55..3355..22..  WWDD88001133,, SSMMCC EElliittee1166

  Statut : Supporté, Nom du pilote : wd (+8390)

  Au fil des ans, la conception a ajouté plus de registres et une
  EEPROM. (Les premières cartes wd8003 sont apparues il y a environ dix
  ans !) Les clones portent en général un nom en `8013', et se passent
  habituellement d'EEPROM au profit de cavaliers. Les cartes SMC dernier
  modèle auront la puce SMC 83c690 au lieu de la DP8390 de National
  Semiconductor que l'on trouvait sur les premières. Les cartes conçues
  pour utiliser la mémoire partagée sont un peu plus rapides que celles
  qui reposent sur les E/S programmées (PIO), spécialement 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 accès sûr au tampon de paquets sur un système multi-
  thread, et de ne plus avoir un registre de données PIO qui bloque
  votre machine pendant les procédures de détection après un redémarrage
  à chaud.

  Les cartes sans EEPROM qui ne peuvent pas lire l'IRQ sélectionnée
  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 mémoire embarquée
  standard, la taille de la mémoire peut être spécifiée au moment du
  démarrage (ou dans le fichier /etc/conf.modules si vous utilisez les
  modules). La taille mémoire standard est de 8 Ko pour une carte 8 bits
  et de 16 Ko pour une carte 16 bits. Par exemple, les antédiluviennes
  WD8003EBT peuvent être configurées par cavaliers pour utiliser 32 Ko.
  Pour avoir un accès complet à cette mémoire, 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 problèmes des 8013'' pour certains des problèmes
  les plus classiques et les questions qui reviennent le plus
  fréquemment.

  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 spécifiques aux
  modules.





  55..3355..33..  SSMMCC EElliittee UUllttrraa

  Statut : Supporté, Nom du pilote : smc-ultra (+8390)

  Cette carte Ethernet est basée sur la 83c790 de SMC, qui comporte
  quelques nouveautés par rapport à la 83c690. Bien qu'elle possède un
  mode similaire aux anciennes cartes Ethernet SMC, elle n'est pas
  entièrement compatible avec les vieux pilotes WD80*3. Néanmoins, dans
  ce mode le pilote partage la plupart de son code avec les autres
  pilotes 8390, tout en étant légèrement 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 procédure de
  détection est censée 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 séparé pour
  le mode `Altego' de l'Ultra, qui permet d'enchaîner les transmissions
  au coût d'une utilisation inefficace des tampons de réception, mais
  cela n'arrivera probablement jamais.

  Utilisateurs d'adaptateurs SCSI dotés du contrôle 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
  données avec des disques SCSI utilisés derrière 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 problème se produit avec Interactive, et des
  anciens pilotes Windows NT. Il s'agit d'un conflit matériel avec des
  révisions antérieures de la carte qui peut être contourné dans la
  conception du pilote. Le pilote actuel de l'Ultra vous protège contre
  ce problème en n'activant la mémoire partagée que lors des transferts
  de données avec la carte. Assurez-vous que votre version de noyau soit
  au moins la 1.1.84, ou que celle du pilote indiquée au démarrage est
  au moins smc-ultra.c:v1.12, sinon vous êtes vulnérable à ce problème.

  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 spécifiques aux
  modules.


  55..3355..44..  SSMMCC EElliittee UUllttrraa3322 EEIISSAA

  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 réalisé.


  55..3355..55..  SSMMCC EEtthheerrEEZZ ((88441166))

  Statut : Supporté, Nom du pilote : smc-ultra (+8390)

  Cette carte utilise la puce 83c795 de SMC et supporte la spécification
  Plug 'n Play. Elle comporte aussi un mode compatible _S_M_C _U_l_t_r_a qui lui
  permet d'être utilisée avec le pilote Ultra de Linux. Pour de
  meilleurs résultats, utilisez le programme provenant de chez SMC et
  permettant de désactiver le PnP et de la configurer pour le mode à
  mémoire partagée. Consultez les informations ci-dessus pour des notes
  sur le pilote Ultra.

  Pour les noyaux 1.2, la carte devait être configurée pour opérer en
  mémoire partagée. Néanmoins, les noyaux 2.0 peuvent utiliser la carte
  dans ce mode ou en E/S programmées. Celui-là sera légèrement plus
  rapide, et requerra moins de ressources processeur, par ailleurs.


  55..3355..66..  SSMMCC EEtthheerrPPoowweerr PPCCII ((88443322))

  Statut : Supporté, Nom du pilote : de4x5, tulip

  NB : L'EtherPower II est une carte totalement différente. Voir plus
  bas !

  Ces cartes sont une implémentation 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 développement du pilote générique
  21040 (aussi connu sous le nom de tulip.c). Merci de nouveau à Duke
  Kamstra, d'avoir fourni une carte sur laquelle réaliser le
  développement.

  Certaines des dernières révisions de cette carte utilisent la récente
  puce 21041 de DEC, ce qui peut causer des problèmes avec des versions
  anciennes du pilote tulip. Si vous avez des problèmes, assurez-vous
  d'utiliser la dernière version du pilote, qui peut ne pas encore se
  trouver dans l'arborescence actuelle du noyau.

  Consultez ``DEC 21040'' pour plus de détails sur l'utilisation d'une
  de ces cartes, et l'état d'avancement actuel du pilote.

  Apparemment, la toute dernière révision 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 sûr, vérifiez que vous pourrez rendre la carte si elle ne
  fonctionne pas avec le pilote Linux _a_v_a_n_t de payer.


  55..3355..77..  SSMMCC EEtthheerrPPoowweerr IIII PPCCII ((99443322))

  Statut : Partiellement supporté, Nom du pilote : epic100

  Ces cartes, basées sur la puce 83c170 de SMC, sont complètement
  différentes des cartes basées sur la Tulip. Un nouveau pilote est
  inclus dans les noyau 2.0 et 2.2 pour les supporter. Pour plus de
  détails, consultez :

  http://cesdis.gsfc.nasa.gov/linux/drivers/epic100.html


  55..3355..88..  SSMMCC 33000088

  Statut : Non supporté

  Ces cartes 8 bits sont basées sur la puce MB86950 de Fujitsu, qui est
  une ancienne version de la MB86965 utilisée 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 très
  répandues.


  55..3355..99..  SSMMCC 33001166

  Statut : Non supporté

  Il s'agit de cartes 16 bits à E/S mappées, à puce 8390, très
  similaires à une carte NE2000 générique. Si vous pouvez obtenir les
  spécifications chez SMC, alors réaliser un portage du pilote NE2000
  sera certainement relativement facile. Ces cartes ne sont pas très
  répandues.


  55..3355..1100..  SSMMCC--99000000 // SSMMCC 9911cc9922//44

  Statut : Supporté, Nom du pilote : smc9194

  La SMC9000 est une carte VLB basée sur la puce 91c92. La 91c92
  apparaît aussi sur un petit nombre de cartes d'autres marques, mais
  est plutôt 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'intégrer à une arborescence de noyau 1.2 avec
  un minimum de difficultés.


  55..3355..1111..  SSMMCC 9911cc110000


  Statut : Partiellement supporté, Nom du pilote : smc9194

  Le pilote SMC 91c92 est supposé fonctionner pour les cartes basées sur
  cette puce 100Base-T, mais à l'heure actuelle cela n'a pas été
  vérifié.


  55..3366..  TTeexxaass IInnssttrruummeennttss



  55..3366..11..  TThhuunnddeerrLLAANN

  Statut : Supporté, Nom du pilote : tlan

  Ce pilote supporte beaucoup de cartes ethernet intégrées aux
  ordinateurs Compaq, incluant les familles NetFlex et Netelligent. Il
  supporte aussi les produits Olicom 2183, 2185, 2325 et 2326.


  55..3377..  TThhoommaass CCoonnrraadd



  55..3377..11..  TThhoommaass CCoonnrraadd TTCC--55004488

  Encore une autre carte PCI basée sur la puce 21040 de DEC.

  Consultez la section sur la puce 21040 (``DEC         21040'') pour
  plus d'informations.


  55..3388..  VVIIAA

  Vous ne verrez probablement jamais une carte VIA, car VIA fabrique
  plusieurs puces réseau qui sont ensuite utilisées par d'autres dans la
  construction de leurs cartes ethernet. Ils ont un site WWW à :


       http://www.via.com.tw/






  55..3388..11..  VVIIAA 8866CC992266 AAmmaazzoonn

  Statut : Supporté, Nom du pilote : ne, ne2k-pci (+8390)

  Ce contrôleur 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. Référez vous à la
  section NE2000 PCI pour plus de détails.


  55..3388..22..  VVIIAA 8866CC110000AA RRhhiinnee IIII ((eett 33004433 RRhhiinnee II))

  Statut : Supporté, Nom du pilote : via-rhine

  Ce pilote relativement récent se trouve dans les noyaux 2.0 et 2.2.
  Cette puce est une amélioration de la NE2000 86C926 dans la mesure où
  elle gère les transferts par contrôle de bus, mais du fait de
  l'obligation d'aligner les tampons sur 32 bits, les gains sont
  limités. Pour plus de détails, et les mises à jour, référez vous à :

  http://cesdis.gsfc.nasa.gov/linux/drivers/via-rhine.html



  55..3399..  WWeesstteerrnn DDiiggiittaall

  Référez vous à la section ``SMC'' pour plus d'informations sur les
  cartes SMC. (SMC a racheté la section cartes réseau de Western Digital
  il y a bien longtemps).


  55..4400..  WWiinnbboonndd

  Winbond ne fabrique, ni ne vend de cartes au grand public -- au lieu
  de cela, ils font des puces pour cartes réseau tout en un, les vendent
  à d'autres entreprises, qui les collent sur une carte PCI, ajoutent
  leur nom et ensuite, les revendent.


  55..4400..11..  WWiinnbboonndd 8899cc884400

  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


  55..4400..22..  WWiinnbboonndd 8899cc994400

  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 idée vieille de plus de 10 ans collée sur un
  bus PCI. Les performances ne seront pas meilleures que pour
  l'équivalent ISA.


  55..4411..  XXiirrccoomm

  Depuis des temps immémoriaux, Xircom refusait de dévoiler les
  informations nécessaires à 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 prétendent supporter tous les systèmes d'exploitation
  réseau populaires...), ce qui les a amenés à 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 `obsolètes',
  comme les premiers modèles PE. Si vous êtes intéressés et que vous
  voulez vérifier par vous même, vous pouvez joindre Xircom au
  1-800-874-7875, 1-800-438-4526 ou au +1-818-878-7600.

  (NDT : les deux premiers numéros sont des numéros verts aux États-Unis
  et ne sont pas accessibles depuis l'étranger. Le dernier est un numéro
  international).


  55..4411..11..  XXiirrccoomm PPEE11,, PPEE22,, PPEE33--1100BB**

  Statut : Non supporté.

  Ce n'est pas pour vous réconforter, mais si vous avez l'un de ces
  adaptateurs sur port parallèle, vous pourrez peut-être l'utiliser sous
  l'émulateur DOS avec les pilotes DOS fournis par Xircom. Vous devrez
  autoriser l'accès de DOSEMU au port parallèle, et certainement jouer
  avec SIG (le générateur 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).


  55..4411..22..  CCaarrtteess XXiirrccoomm PPCCMMCCIIAA

  Statut : Partiellement Supporté, Nom du pilote : ????

  Les pilotes de certaines cartes Xircom PCMCIA sont disponibles dans le
  paquetage PCMCIA de David Hinds. Vérifiez là-bas pour de plus amples
  informations.


  55..4422..  ZZeenniitthh



  55..4422..11..  ZZ--NNoottee

  Statut : Supporté, Nom du pilote : znet

  L'adaptateur réseau intégré 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 exécutez make config.
  Notez aussi que l'IBM ThinkPad 300 est compatible avec le Z-Note.


  55..4433..  ZZnnyyxx



  55..4433..11..  ZZnnyyxx ZZXX334422 ((DDEECC 2211004400 bbaasseedd))

  Statut : Supporté, Nom du pilote : de4x5, tulip

  Vous avez le choix entre _d_e_u_x pilotes pour les cartes basées sur cette
  puce. D'une part le pilote DE425 écrit par David, d'autre part le
  pilote 21040 générique é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 détails.

  Consultez ``DEC 21040'' pour plus d'informations sur ces cartes, et la
  situation actuelle du pilote.



  55..4444..  IIddeennttiiffiieerr uunnee ccaarrttee iinnccoonnnnuuee

  OK, l'ami du voisin du cousin de votre oncle a un frère qui a trouvé
  une vieille carte Ethernet ISA dans le boîtier de l'AT qui servait de
  cage pour le hamster de son fils. D'une manière 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 début
  d'une idée de ce qu'elle est et il n'y a aucune documentation.

  Tout d'abord, cherchez n'importe quel numéro de modèle évident qui
  pourrait fournir un indice. Un numéro de modèle 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.


  55..4444..11..  CCoonnttrroolllleerr,, NNIICC)) IIddeennttiiffiieerr llee ccoonnttrrôôlleeuurr dd''iinntteerrffaaccee rréésseeaauu
  ((NNeettwwoorrkk IInntteerrffaaccee

  Cherchez la plus grosse puce sur la carte. Ce sera le contrôleur
  réseau (NIC) lui-même, et la plupart peuvent être identifiés par leur
  référence. 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
  fabriquées par National Semiconductor ! D'autres sociétés 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
  basées sur le 8390, arrivent en deuxième position les wd80x3 (de
  Western/Digital) et ses clones.  Des cartes avec un DP83905 peuvent
  être configurées pour être une NE2000 _o_u une wd8013. Les versions les
  plus récentes des wd80x3 de base et des SMC Elite possèdent un 83c690
  en lieu et place du DP8390 d'origine.  Les cartes SMC Ultra ont un
  83c790, et utilisent un pilote légèrement différent de celui des
  cartes wd80x3. Les cartes EtherEZ de SMC ont un 83c795, et utilisent
  le même pilote que la SMC Ultra. Toutes les cartes BNC basées sur un
  genre de 8390 ou l'un de ses clones auront généralement un 8392 (ou un
  83c692, ou un ???392) en boîtier DIP 16 broches tout près 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 numéroté AM7990, et les
  révisions plus récentes 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 possèdent leur propre pilote.

  Les cartes PCI plus récentes et qui comportent un NIC de DEC référencé
  21040, 21041, 21140, ou un numéro approchant, devraient être capables
  d'utiliser le pilote `tulip' ou le `de4x5' de Linux.

  D'autres cartes PCI qui comportent une grosse puce marquée RTL8029,
  89C940 ou 86C926 sont des clones de NE2000, et le pilote `ne' des
  versions 2.0 et supérieures du noyau Linux devrait automatiquement les
  détecter au démarrage.


  55..4444..22..  IIddeennttiiffiieerr ll''aaddrreessssee EEtthheerrnneett

  Chaque carte Ethernet possède sa propre adresse sur six octets qui lui
  est unique et propre. Les trois premiers octets de cette adresse
  Ethernet sont les mêmes 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 affectés
  par le constructeur de façon 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, imprimés sur un autocollant attaché à une PROM
  montée sur la carte, ce qui ne vous indique rien du tout.

  Vous pouvez déterminer quel constructeur possède 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.


  55..4444..33..  QQuueellqquueess aassttuucceess ppoouurr eessssaayyeerr dd''uuttiilliisseerr uunnee ccaarrttee iinnccoonnnnuuee

  Si vous n'êtes toujours pas sûr(e) de quelle carte il s'agit, mais que
  vous avez un peu réduit le champ des possibilités, alors vous pouvez
  construire un noyau en y incluant tout un tas de pilotes, et voir si
  l'un d'entre eux détecte automatiquement la carte lors du démarrage.

  Si le noyau ne détecte pas la carte, il se peut que la carte ne soit
  pas configurée à l'une des adresses que le pilote teste lorsqu'il en
  recherche une. Dans ce cas, vous pourriez essayer de récupérer
  scanport.tar.gz sur votre site FTP Linux préféré, et voir s'il peut
  trouver l'adresse pour laquelle votre carte est configurée. Ce
  programme parcourt l'espace d'adressage d'entrée/sortie de 0x100 à
  0x3ff en cherchant des périphériques qui ne sont pas déjà enregistrés
  dans /proc/ioports.  S'il en trouve un qui soit inconnu et qui démarre
  à une adresse donnée, vous pouvez alors explicitement diriger les
  procédures de détection Ethernet vers cette adresse en utilisant un
  argument de démarrage ether=.

  Si vous arrivez à faire en sorte que la carte soit détectée, 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 détectée. Les paramètres d'IRQ peuvent aussi
  habituellement être déterminés en suivants les traces au dos de la
  carte jusqu'à l'endroit où les cavaliers sont soudés. En comptant les
  `doigts d'or' sur la face arrière, depuis l'extrémité de la carte où
  se situe la plaque métallique 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 généralement pour
  fonction de sélectionner l'adresse mémoire d'une ROM de démarrage
  (boot ROM) optionnelle. D'autres situés près des connecteurs BNC,
  RJ-45 ou AUI servent généralement à sélectionner le support physique
  de sortie. Ceux-ci se situent typiquement près des `boîtes noires' qui
  contiennent les convertisseurs de tension, marquées YCL, Valor, ou
  Fil-Mag.

  Une collection intéressante de configurations de cavaliers pour
  diverses cartes se trouve à l'URL suivante :


       Paramétrage des cartes Ethernet
       <http://www.slug.org.au/NIC/>



  55..4455..  PPiillootteess ppoouurr ppéérriipphhéérriiqquueess NNoonn--EEtthheerrnneett

  Quelques autres pilotes existent dans les sources Linux qui se
  présentent _c_o_m_m_e un périphérique Ethernet vis-à-vis des programmes
  réseaux, bien qu'ils ne soient pas réellement Ethernet. Les voici
  brièvement présentés pour être complet.

  dummy.c - Le but de ce pilote est de fournir un périphérique pour
  désigner une route qui le traverse, mais sans transmettre réellement
  de paquets.

  eql.c - Load Equalizer (égaliseur de charge), qui regroupe plusieurs
  périphériques esclaves (généralement des modems) et répartit la charge
  en transmission entre eux tout en ne présentant qu'un seul
  périphérique aux programmes réseau.

  ibmtr.c - IBM Token Ring (anneau à jeton), qui n'est pas réellement de
  l'Ethernet. L'anneau à `jeter' nécessite du routage par la source et
  autres trucs dégoûtants.

  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
  réception.

  pi2.c - Interface Ottawa Amateur Radio Club PI et PI2.

  plip.c - Parallel Line Internet Protocol (PLIP, IP sur port
  parallèle), qui permet à deux ordinateurs de s'envoyer des paquets
  l'un à l'autre via leurs ports parallèles, 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 général des modems).

  (NDT : C'est le mode de connexion le plus couramment employé par les
  fournisseurs d'accès Internet. Consultez le _P_P_P_-_H_o_w_t_o.)

  slip.c - Serial Line Internet Protocol (SLIP, IP sur port série), qui
  permet à deux ordinateurs de s'envoyer des paquets l'un à l'autre via
  leurs ports série (généralement 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 réseau de façon
  transparente entre sous-réseaux.

  (NDT : Pratique pour gérer certains problèmes délicats de politique de
  routage, par exemple.)

  wavelan.c - Un transceiver radio semblable à de l'Ethernet, contrôlé
  par le coprocesseur 82586 d'Intel qui est utilisé sur d'autres cartes
  Ethernet comme l'Intel EtherExpress.

  66..  CCââbblleess,, CCooaaxxiiaall,, PPaaiirree TToorrssaaddééee

  Si vous démarrez un réseau à partir de rien, vous aurez a choisir
  entre l'Ethernet fin (du câble RG-58 co-axial avec des connecteurs
  BNC) ou le 10BaseT (des câbles à paire torsadée avec des connecteurs
  RJ-45 rectangulaires). Quant au `gros' Ethernet (thick Ethernet), du
  câble RG-5 avec des connecteurs N, tombé en désuétude, on ne le
  rencontre pratiquement plus.

  Référez vous à ``Type de cable...'' pour une introduction sur les
  câbles. 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
  câbles 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 à compléter.. <ftp://ftp.lip6.fr/faq/...> ou tout
  site équivalent proche de chez lui).


  66..11..  EEtthheerrnneett ffiinn ((tthhiinnnneett))

  Le cable Ethernet fin n'est pas cher. Si vous fabriquez vos câbles
  vous-même, le câble RG58A à âme monobrin est à $0.27/m et le câble
  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 câble en France !)
  Les connecteurs BNC à baïonnette sont à moins de deux dollars chacun.
  (NDT : A sertir, environ 10 francs pièces, à souder un peu plus cher
  mais vous n'avez pas besoin d'un outil spécial).

  Les autres pièces diverses sont tout aussi bon marché.

  Il est important que vous terminiez chaque extrémité du câble avec un
  `bouchon' de 50 ohms (NDT : bouchon ou terminateur..), donc prévoyez
  70 francs pour une paire. Il est aussi vital que votre câble ne
  comporte pas de `patte qui pend' -- les connecteurs en `T' doivent
  être raccordés directement aux cartes Ethernet, sans câble entre le
  `T' et la carte.


  Il y a quelques inconvénients à utiliser l'Ethernet fin. Le premier
  est qu'il est limité a 10 Mbps -- pour 100 Mbps, il faut de la paire
  torsadée. Le second point noir est que si vous avez un grand nombre de
  machines raccordées entre elles, il suffit qu'un imbécile coupe le
  réseau en débranchant un des câbles qui se trouvent sur les côtés de
  son `T', et tout le réseau se retrouve par terre parce qu'il voit une
  impédance infinie (circuit ouvert) au lieu de la terminaison à 50 ohms
  qui est nécessaire. Notez que vous pouvez enlever la pièce en forme de
  `T' de la carte Ethernet elle-même sans tuer tout le sous-réseau, pour
  autant que vous n'enleviez pas les câbles du `T' lui-même. Bien
  entendu cela perturbera la machine d'où vous venez d'enlever le `T'.
  8-) Et notez aussi que si vous créez un petit réseau 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 câbler les
  deux machines entre elles !

  NDT : Notez aussi que vous ne devez pas créer une boucle avec le câble
  non plus, en reliant toutes les machines entre elles et en reliant la
  dernière machine avec la première. La présence d'un bouchon de 50 ohms
  à _c_h_a_q_u_e extrémité du câble (et il ne doit y avoir que deux extrémités
  8-) ) est indispensable pour qu'Ethernet fonctionne correctement. (Fin
  de la note)


  Il existe aussi des systèmes de câblage 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 câble
  reposant côte-à-côte, recouvertes par une protection extérieure, ce
  qui donne au fil une section de forme ovale. A l'extrémité de cette
  boucle est inséré un connecteur BNC sur lequel se connecte votre
  carte. Vous avez donc l'équivalent d'un aller-retour de câble et d'un
  `T' BNC, mais avec ce type de câblage, il est impossible pour
  l'utilisateur d'enlever un câble d'un seul côté du `T' et donc de
  perturber le réseau.

  (NDT : C'est une bonne idée, mais la réalisation du câblage entre les
  prises de raccordement est délicate, et le moindre défaut amplifie
  rapidement les problèmes de l'Ethernet fin.  )




  66..22..  PPaaiirree ttoorrssaaddééee

  Les réseaux à paire torsadée nécessitent des hubs actifs, dont les
  prix démarrent aux environ de 300 francs, et le prix du câble brut
  peut être en fait supérieur à celui du Thinnet. Vous devriez ignorer
  ceux qui disent que vous pouvez utiliser votre câblage téléphonique
  existant, car il est rare de trouver une installation où c'est le cas.

  (NdT : Ca c'est du pessimisme avéré. J'ai déjà fait pire. :])


  D'un autre côté, les prix des hubs sont en chute libre, toutes les
  propositions Ethernet 100 Mbps utilisent la paire torsadée, et la
  plupart des installations professionnelles neuves utilisent la paire
  torsadée.

  (NDT : Euh, c'est peut-être aussi parce qu'avec un câblage banalisé on
  peut faire de la voix (entendez : du téléphone), de la donnée
  (entendez : du réseau), et de la vidéo, sur le même câble, ce qui
  coûte quand même moins cher que trois câblages différents !)

  De plus, Russ Nelson ajoute que `Les nouvelles installations devraient
  utiliser du câblage Catégorie 5. Toute autre chose est une perte de
  temps de votre installateur, car le 100Base-ce-que-vous-voulez
  nécessitera du Cat. 5.'

  (NDT : Pour être précis, c'est du Catégorie 5, Classe D qu'il faut
  exiger. Un pour le type de câble, un pour la plage de fréquence. :))

  Si vous n'avez que deux machines à raccorder, il est possible d'éviter
  l'utilisation d'un hub, en croisant les paires émissions et réception
  (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 numérotées de 1 à 8 de la gauche vers la
  droite. L'utilisation des broches est la suivante :









          Numéro de broche        Utilisation
          ----------              ----------
          1                       Sortie des Données (+)
          2                       Sortie des Données (-)
          3                       Entrée des Données (+)
          4                       Réservé pour le téléphone
          5                       Réservé pour le téléphone
          6                       Entrée des Données (-)
          7                       Réservé pour le téléphone
          8                       Réservé pour le téléphone



  Si vous souhaitez fabriquer un câble, ce qui suit devrait vous fournir
  tous les détails voulus. Les paires de signaux différentiels doivent
  se trouver sur la même paire torsadée afin d'obtenir l'impédance et
  les pertes minimales requises d'un câble UTP. Si vous consultez la
  table ci-dessus, vous constatez que 1+2 et 3+6 sont les ensembles de
  paires de signaux différentiels. Pas 1+3 et 2+6 !!!!!!  A 10 MHz, avec
  des distances courtes, vous échapperez *peut-être* aux conséquences de
  telles erreurs, si c'est vraiment sur une courte distance. Mais n'y
  pensez même pas à 100 MHz.

  Pour un cordon de brassage normal, avec les extrémités `A' et `B',
  vous avez besoin d'un raccordement `droit', broche par broche,
  l'entrée et la sortie utilisant chacune une paire de fils (pour des
  problèmes d'impédance). 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 même paire torsadée. De même, les fils qui joignent 3A-3B et 6A-6B
  doivent être sur une autre paire torsadée.

  Maintenant, si vous n'avez pas de hub, mais que vous voulez fabriquer
  un `câble null' (ou câble croisé, NDT), ce que vous souhaitez faire
  est que l'entrée de `A' devienne la sortie de `B', et que la sortie de
  `A' devienne l'entrée de `B', sans changer la polarité. Cela signifie
  donc raccorder 1A à 3B (sortie+ de A vers entrée+ de B) et 2A à 6B
  (sortie- de A vers entrée- de B). Ces deux fils doivent être sur une
  paire torsadée. Ils transportent ce que la carte/le connecteur `A'
  considère comme la sortie, et ce qui est vu comme l'entrée par la
  carte/le connecteur `B'. Puis raccordez 3A à 1B (entrée+ de A sur
  sortie+ de B) et 6A à 2B (entrée- de A sur sortie- de B). Ces deux-là
  aussi doivent être sur une paire torsadée. Ils transportent ce que la
  carte/le connecteur `A' considère comme son entrée, et ce que la
  carte/le connecteur `B' considère comme sa sortie.

  Donc, si vous considérez un cordon de brassage normal, enlevez l'une
  de ses extrémités, échangez les emplacements des paires de réception
  et d'émission dans le nouveau connecteur, sertissez-le, et vous avez
  un câble `null' (enfin, croisé, quoi ! NDT). Rien de bien compliqué.
  Vous voulez juste que le signal transmis par une carte soit envoyé sur
  le récepteur de la seconde, et vice versa.

  Notez qu'avant que 10BaseT soit ratifié en tant que norme, il existait
  d'autres formats de réseau qui utilisaient des connecteurs RJ-45, avec
  le même principe de câblage que ci-dessus. Des exemples sont le
  LattisNet de SynOptics et le StarLAN d'AT&T. Dans certains cas (comme
  les premières cartes 3C503) vous pouvez positionner des cavaliers pour
  que la carte puisse dialoguer avec des hubs de différents types, mais
  dans la plupart des cas les cartes conçues pour ces anciens types de
  réseaux ne fonctionneront pas avec un hub/un réseau 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).


  66..33..  TThhiicckk EEtthheerrnneett -- LLee ``ggrrooss'' EEtthheerrnneett

  Le `Thick ethernet' est pratiquement obsolète, et n'est généralement
  utilisé que pour rester compatible avec une implémentation existante.
  Vous pouvez outrepasser les règles 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 réseau ThickNet existant. Une
  solution correcte (mais plus chère) est d'utiliser un répéteur dans ce
  cas.

  77..  CCoonnffiigguurraattiioonn llooggiicciieellllee eett ddiiaaggnnoossttiiccss ddee ccaarrttee

  Dans la plupart des cas, si la configuration est faite par logiciel,
  et stockée dans une EEPROM, vous devrez démarrer DOS, et utiliser le
  programme DOS fourni par le constructeur pour configurer l'IRQ, les
  ports d'E/S, l'adresse mémoire et autres choses sur la carte. Du
  reste, on peut espérer 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 listées ici.
  Donald a écrit quelques petits programmes de diagnostic qui
  fonctionnent sous Linux. La plupart d'entre eux sont le résultat
  d'outils de débogage qu'il a créés 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. Même 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 détectée au démarrage.

  Dans tous les cas, vous devrez exécuter la plupart de ces programmes
  en tant que root (pour permettre l'accès aux ports d'E/S) et vous
  devrez certainement désactiver la carte réseau avant en tapant
  ifconfig eth0 down en premier.


  77..11..  PPrrooggrraammmmeess ddee ccoonnffiigguurraattiioonn ppoouurr ccaarrtteess EEtthheerrnneett



  77..11..11..  CCaarrtteess WWDD8800xx33

  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 déjà 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.




  77..11..22..  CCaarrtteess DDiiggiittaall // DDEECC

  La carte EtherWorks 3 de Digital peut être configurée d'une façon
  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 répertoire
  /pub/linux/system/Network/management un fichier qui s'appelle
  ewrk3tools-X.XX.tar.gz.

  (NDT : Le lecteur français aura tout intérêt à utiliser un site FTP
  plus proche, comme par exemple :
  ftp://ftp.lip6.fr/pub/linux/sunsite/system/Network/management)


  77..11..33..  CCaarrtteess NNEE22000000++ oouu AATT//LLAANNTTIICC

  Certaines implémentations de la puce DP83905 de National Semiconductor
  (comme l'AT/LANTIC et la NE2000+) peuvent être configurées par
  logiciel. (Notez que ces cartes peuvent aussi émuler une carte
  wd8013 !)  Vous pouvez récupérer 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 vérifient pas
  une adresse spécifique 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 récupérez 20XX12.EXE et INFOSET.EXE.

  Soyez attentif en configurant des cartes NE2000+, car vous pouvez leur
  fournir des valeurs de paramètrage erronées qui causeront des
  problèmes. Un exemple classique est d'activer accidentellement la ROM
  de démarrage dans l'EEPROM (même si aucune ROM n'est installée) et de
  fournir une valeur qui entre en conflit avec la carte VGA. Le résultat
  est un ordinateur qui se contente de vous envoyer des `bip' quand vous
  l'allumez et où rien n'apparaît à l'écran.

  Vous pouvez typiquement vous sortir de ce mauvais pas en faisant ce
  qui suit :

  Enlevez la carte de la machine, redémarrez et entrez dans la
  configuration CMOS. Changez le paramètre `Display Adapter' (carte
  vidéo) en `Not Installed' (pas de carte vidéo) et changez le disque de
  démarrage par défaut (`Default Boot Drive' ou `Boot Sequence', NDT) en
  `A:' (votre lecteur de disquette). Changez aussi le paramètre `Wait
  for F1 if any Error' (attendre un appui sur F1 en cas d'erreur) en
  `Disabled' (désactivé). De cette façon, l'ordinateur devrait démarrer
  sans intervention de l'utilisateur. Maintenant créez une disquette DOS
  de démarrage (`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 défaut cohérentes soit exécuté automatiquement quand vous démarrez
  sur cette disquette.  Eteignez la machine, réinstallez la carte
  ne2000+, insérez votre nouvelle disquette de démarrage, et rallumez la
  machine. Elle devrait certainement vous bipper de nouveau à la figure,
  mais vous devriez voir la lumière du lecteur de disquette s'allumer
  pendant qu'elle démarre à partir de la disquette. Attendez une minute
  ou deux que le lecteur de disquette s'arrête, indiquant ainsi que la
  machine a fini d'exécuter le programme default.exe, puis éteignez
  votre ordinateur. Lorsque vous le rallumez, vous pouvez espérer avoir
  un écran qui fonctionne de nouveau, ce qui vous permet de remettre les
  paramètres CMOS à leurs anciennes valeurs, et de changer de nouveau
  les paramètres 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 méthode ci-dessus avec un disque de démarrage Linux qui exécute
  automatiquement le programme atlantic de Donald (avec les bonnes
  options sur la ligne de commande) au lieu d'une disquette de démarrage
  DOS qui exécute automatiquement le programme default.exe.


  77..11..44..  CCaarrtteess 33CCoomm

  La famille des cartes Etherlink III de 3Com (c'est-à-dire les 3c5x9)
  peut être configurée 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 séries ``B'' de la famille
  Etherlink III).



  77..22..  PPrrooggrraammmmeess ddee ddiiaaggnnoossttiicc ppoouurr ccaarrtteess EEtthheerrnneett

  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 possède sur la
  carte en question.



  88..  IInnffoorrmmaattiioonnss TTeecchhnniiqquueess

  Pour ceux d'entre vous qui souhaitent comprendre comment marche la
  carte, ou jouer avec les pilotes actuels, ou même essayer de faire
  leur propre pilote pour une carte qui n'est actuellement pas
  supportée, ces informations peuvent se révéler utiles. Si vous
  n'entrez pas dans cette catégorie de personne, vous devriez peut-être
  sauter cette section.


  88..11..

  EEnnttrrééeess//SSoorrttiieess pprrooggrraammmmééeess ccoonnttrree mméémmooiirree ppaarrttaaggééee ccoonnttrree DDMMAA

  Si vous savez déjà envoyer et recevoir des paquets les uns derrière
  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 très près de
  l'envoi de paquets les uns derrière les autres (cela dépendra du temps
  de latence d'interruption courant), et la 3c509 ou l'AT1500 n'ont
  absolument aucun problème pour émettre des paquets les uns derrière
  les autres.

  Le bus ISA peut faire du 5,3 Mo/s (42 Mbit/s), ce qui semble plus que
  nécessaire 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.


  88..11..11..  EEnnttrrééeess//SSoorrttiieess ((EE//SS)) pprrooggrraammmmééeess ((NNEE22000000,, 33cc550099,, eettcc..))

  PPoouurr :: N'utilise aucune ressource système contrainte, juste quelques
  registres d'E/S, et n'a pas de limite à 16 M.

  CCoonnttrree :: Généralement le taux de transfert le plus faible, le
  processeur attend tout le temps, et un accès entrelacé (_i_n_t_e_r_l_e_a_v_e_d en
  anglais) aux paquets est habituellement difficile voire impossible.


  88..11..22..  MMéémmooiirree ppaarrttaaggééee ((WWDD8800xx33,, SSMMCC--UUllttrraa,, 33cc550033,, eettcc..))

  PPoouurr :: Simple, plus rapide que les E/S programmées, permet l'accès
  aléatoire aux paquets. Les pilotes Linux calculent la somme de
  contrôle (_c_h_e_c_k_s_u_m en anglais) des paquets IP entrants lorsqu'ils sont
  copiés depuis la carte, ce qui entraîne une réduction supplémentaire
  de la charge du processeur par rapport à une carte équivalente en E/S
  programmées.

  CCoonnttrree :: Utilise beaucoup d'espace mémoire (c'est important pour les
  utilisateur sous DOS, cela n'a pratiquement pas d'importance sous
  Linux), et charge encore le processeur.


  88..11..33..  LLiinnuuxx !!))  AAccccèèss DDiirreecctt àà llaa MMéémmooiirree ((DDMMAA)) EEssccllaavvee ((nnoorrmmaall))
  ((pp..eexx.. :: aauuccuunnee ppoouurr

  PPoouurr :: Libère le processeur pendant le transfert réel des données.

  CCoonnttrree :: La vérification 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 nécessite des tampons alignés en mémoire basse.


  88..11..44..  DDMMAA eenn BBuuss MMaasstteerr ((pp..eexx.. :: LLAANNCCEE,, DDEECC 2211004400))

  PPoouurr :: Libère le processeur pendant le transfert des données, peut
  lier des tampons entre eux, peut nécessiter peu voire pas de perte de
  temps processeur sur le bus ISA. La majorité des pilotes bus-mastering
  pour linux utilisent un schéma 'copybreak' où les gros paquets sont
  directements placés dans les tampons réseau du noyau par la carte, les
  petits paquets étant copiés par le CPU qui est plus rapide pour ce
  type de traitements.

  CCoonnttrree :: (seulement pour les cartes ISA) Nécessite des tampons en
  mémoire basse et un canal DMA pour les cartes. Tout Maître de Bus aura
  des problèmes avec les autres Maîtres de Bus qui sont des goinfres,
  comme certaines cartes SCSI primitives. Quelques jeux de puces pour
  cartes-mères mal pensés ont des problèmes avec les maîtres de bus. Et
  une raison pour n'avoir _a_u_c_u_n type de périphérique DMA est d'utiliser
  un processeur 486 conçu pour être inséré (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.)



  88..22..  ÉÉccrriittuurree dd''uunn ppiilloottee ddee ccaarrttee

  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
  nécessaires à 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 opération, et il a été
  d'un grand service par son aide au cours du développement 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 théorie).  Rappelez-
  vous néanmoins que certains matériels anciens qui ont été créés pour
  des machines XT ne fonctionneront pas bien dans un environnement
  multitâches comme Linux. Leur utilisation entraînera des problèmes
  importants si votre réseau est raisonnablement chargé.

  La plupart des cartes possèdent des pilotes pour des interfaces MS-DOS
  comme NDIS ou ODI, mais ceux-ci sont inutiles pour Linux. De
  nombreuses personnes ont suggéré de les intégrer directement ou de
  réaliser 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 considérablement meilleurs
  que leur équivalent MS-DOS. Par exemple, la série des pilotes `8390'
  utilise des zones tampon de transmissions en ping-pong, qui commencent
  seulement à apparaître 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 chargée pendant que la
  carte est en train de transmettre l'autre. Le deuxième paquet est
  alors transmis dès que le premier est parti, etc. De cette manière, la
  plupart des cartes sont capables d'envoyer des paquets à la dos à dos
  sur le câble).

  Bon. Vous avez donc décidé d'écrire un pilote pour la carte Ethernet
  Machin, puisque vous avez les informations nécessaires à 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 réseau 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 récents.
  Jetez aussi un coup d'oeil sur le `Kernel Hackers Guide' à l'URL
  suivante :


       KHG <http://www.redhat.com:8080/HyperNews/get/khg.html>



  88..33..  IInntteeffaaccee dduu ppiilloottee aavveecc llee nnooyyaauu

  Voici quelques notes sur les fonctions que vous devrez écrire si vous
  créez un nouveau pilote. Lisez-les en gardant sous la main le
  squelette de pilote décrit ci-dessus : cela simplifiera les choses.


  88..33..11..  DDéétteeccttiioonn ddee llaa ccaarrttee ((PPrroobbee))

  Appelée au démarrage pour vérifier l'existence de la carte. Meilleure
  si elle peut vérifier en douceur en lisant la mémoire etc. Peut aussi
  lire les ports d'E/S. Ecrire au démarrage sur les ports d'E/S pour
  détecter la carte n'est _p_a_s _b_i_e_n parce que cela risque de tuer un
  autre périphérique. Certaines parties de l'initialisation du
  périphérique 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 mémoire la
  carte peut être configurée, comment autoriser l'utilisation de mémoire
  partagée (si besoin), comment sélectionner et mettre en oeuvre la
  génération d'interruptions, etc.


  88..33..22..  GGeessttiioonnnnaaiirree dd''iinntteerrrruuppttiioonnss ((IInntteerrrruupptt hhaannddlleerr))

  Appelé par le noyau quand la carte déclenche une interruption. A la
  responsabilité de déterminer pourquoi la carte a déclenché
  l'interruption, et d'agir en conséquence. Les conditions habituelles
  d'interruption sont l'arrivée de données, la fin d'une transmission,
  l'indication de conditions d'erreur. Vous avez besoin de connaître les
  bits d'informations liés à une interruption afin de pouvoir agir en
  conséquence.



  88..33..33..  FFoonnccttiioonn ddee ttrraannssmmiissssiioonn ((TTrraannssmmiitt ffuunnccttiioonn))

  Est liée à dev->hard_start_xmit() et est appelée par le noyau quand ce
  dernier désire envoyer des données par l'intermédiaire du
  périphérique. Envoie les données sur la carte et déclenche la
  transmission. Vous avez besoin de savoir comment empaqueter les
  données et comment les faire parvenir sur la carte (copie en mémoire
  partagée, 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 données sur le câble, et (éventuellement) émettre une interruption
  quand ce sera fini. Quand le périphérique ne peut plus accepter de
  paquets supplémentaires, il doit armer le drapeau dev->tbusy. Quand de
  la place est devenue disponible, en général au cours d'une
  interruption de fin de transmission, dev->tbusy doit être désarmé et
  les niveaux supérieurs doivent être informés en utilisant
  mark_bh(INET_BH).




  88..33..44..  FFoonnccttiioonn ddee rréécceeppttiioonn ((RReecceeiivvee ffuunnccttiioonn))

  Appelée par le gestionnaire d'interruptions du noyau quand la carte
  indique que des données sont disponibles. Récupère les données de la
  carte, les empaquette dans un sk_buff et informe le noyau de la
  présence des données en effectuant un netif_rx(sk_buff). Vouz devez
  savoir comment mettre en oeuvre le déclenchement d'interruptions à la
  réception de données, comment vérifier les bits d'informations
  correspondant à la réception, et comment récupérer les données depuis
  la carte (là encore, par mémoire partagée, ports d'E/S, DMA, etc.)


  88..33..55..  FFoonnccttiioonn dd''oouuvveerrttuurree ((OOppeenn ffuunnccttiioonn))

  Est liée à dev->open. Est appelée par les couches réseau quand
  quelqu'un fait ifconfig eth0 up - cela doit mettre le périphérique en
  route et l'autoriser à recevoir et transmettre des données. Toute
  incantation spéciale liée à l'initialisation et qui n'aurait pas été
  réalisée dans la séquence de détection (autoriser la génération d'IRQ,
  etc.) trouvera sa place ici.



  88..33..66..  FFoonnccttiioonn ddee ffeerrmmeettuurree ((ffaaccuullttaattiivvee)) ((CClloossee ffuunnccttiioonn))

  Met la carte dans un état propre quand quelqu'un effectue ifconfig
  eth0 down. Doit libérer les IRQ et les canaux DMA si le matériel le
  permet, et éteindre tout ce qui pourrait économiser de l'énergie
  (comme le transmetteur).


  88..33..77..  AAuuttrreess ffoonnccttiioonnss

  Des éléments comme une fonction de réinitialisation, afin que, si les
  choses se dégradent, le pilote puisse essayer de réinitialiser la
  carte en dernier recours. Généralement fait quand une transmission
  dépasse 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.


  88..44..  IInnffoorrmmaattiioonnss tteecchhnniiqquueess ddee 33CCoomm

  Si vous êtes intéressé(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 documentés pour les auteurs de
  pilotes dans nos `Références Techniques' (Technical References, TRs).
  Ces manuels décrivent 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 département marketing de la Division Adaptateurs Réseaux (Network
  Adapter Division) est responsable de la diffusion des TRs. Pour que ce
  programme reste efficace, nous le centralisons dans une entité appelée
  `CardFacts'. C'est est un système téléphonique automatisé. Vous
  l'appelez avec un téléphone à fréquences vocales et il vous envoie des
  choses par télécopie. Pour obtenir un TR, appelez CardFacts au
  408-727-7021.

  (NDT : Cela ne fonctionne qu'aux Etats-Unis.)  Demandez le formulaire
  de commande du développeur (Developer's Order Form), le document
  numéro 9070. Ayez votre numéro de fax sous la main lorsque vous
  appelez. Complétez le formulaire de commande et envoyez-le par
  télécopie au 408-764-5004. Les manuels sont expédiés par le service
  J+2 de Federal Express.

  Il y a des gens ici qui pensent que nous sommes trop libéraux avec les
  manuels, et qui cherchent des preuves que le système est trop onéreux,
  ou prend trop de temps et d'effort. Jusqu'à présent, les clients de
  3Com ont été très bien sur ce point, et il n'y a pas de problème avec
  le niveau de demandes que nous avons obtenu. Nous avons besoin que
  votre coopération et votre retenue se maintiennent pour continuer
  ainsi.


  88..55..

  NNootteess ssuurr lleess ccaarrtteess bbaassééeess ssuurr llaa ppuuccee PPCCnneett // LLAANNCCEE dd''AAMMDD

  La puce LANCE (Local Area Network Controller for Ethernet, Contrôleur
  de Réseau Local pour Ethernet) d'AMD constituait l'offre initiale, et
  a depuis été remplacée par la puce `PCnet-ISA', aussi connue en tant
  que 79C960. Notez que le nom `LANCE' est resté, et certaines personnes
  se réfèrent à la nouvelle puce en utilisant l'ancien nom. Dave Roberts
  de la Division des Produits Réseaux (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 même à 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 numéroté dans la série 1500.
  C'est la seule différence.

  De nombreuses sociétés offrent des produits basés sur la PCnet-ISA, y
  compris HP, Racal-Datacom, Allied Telesis, Boca Research, Kingston
  Technology, etc. Les cartes sont à la base les mêmes, excepté que
  certains constructeurs ont ajouté des fonctionnalités `sans-cavaliers'
  (`jumperless') qui permettent à la carte d'être configurée 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 basées sur la puce PCnet-ISA peut se contenter
  d'obtenir la documentation technique auprès 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 `générique' 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 démarrage, et un connecteur
  (1, 2 ou 3, selon les options de média offertes). Notez que s'il
  s'agit d'une carte coax, elle comportera aussi quelques composants
  pour le transceiver, mais ils devraient être près du connecteur et
  éloignés de la PCnet-ISA.'

  Une note pour les bidouilleurs potentiels de cartes est que
  différentes implémentations de la LANCE effectuent le `redémarrage' de
  différentes façons. Certaines reprennent où elles s'étaient arrêtées
  dans l'anneau, et d'autres démarrent directement au début de l'anneau,
  comme si elles venaient d'être initialisées.





  88..66..  MMuullttiiccaasstt eett MMooddee ``PPrroommiissccuuoouuss''

  Une des autres choses sur lesquels Donald a travaillé est
  l'implémentation des points d'entrée pour le multicast et le mode
  `promiscuous'. Tous les pilotes ISA _p_u_b_l_i_é_s (c'est-à-dire ppaass les
  pilotes au stade `alpha') supportent aujourd'hui le mode promiscuous.

  Donald écrit : Je commencerai par parler du mode `promiscuous', qui
  est conceptuellement facile à implémenter. Pour la plupart des
  matériels, 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 matériels, vous devez arrêter la carte (en perdant
  potentiellement quelques paquets), la reconfigurer, puis la réactiver.
  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 réaliser de deux façons :


  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 modèles (pattern matching stack), avec
     lequel vous écrivez un programme qui extrait les adresses qui vous
     intéressent. Son avantage est qu'il est très général et
     programmable. Son inconvénient est qu'il n'existe pas de moyen
     général 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 enregistrés.
     Consultez ``Le Berkeley Packet Filter'' pour plus d'informations.

  2. Utiliser le filtre multicast que la plupart des puces Ethernet
     possèdent.

  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 prétendent 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 polynôme standard de contrôle Ethernet (somme de
     contrôle/checksum CRC). Dans ce principe, les adresses multicast
     sont hashées et recherchées dans une table de hashage. Si le bit
     correspondant est activé, ce paquet est accepté. Les paquets
     Ethernet sont conçus de telle façon que la partie matérielle pour
     réaliser ceci est triviale -- vous mémorisez juste (habituellement)
     six bits du circuit CRC (qui est nécessaire de toute façon pour la
     vérification d'erreur) après 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 nécessitent que la
     table soit calculée et chargée par l'hôte. Cela signifie que le
     noyau doit comprendre le code pour le CRC.
  4. Le 82586 utilise le hashage à six bits de façon interne, mais il
     calcule la table de hashage lui-même à partir d'une liste
     d'adresses multicast à accepter.

  Notez qu'aucune de ces puces ne réalise un filtrage parfait, et nous
  avons encore besoin d'un module de niveau intermédiaire pour réaliser
  le filtrage final. Notez aussi que dans chaque cas nous devons
  conserver une liste complète des adresses multicast acceptées pour
  recalculer la table de hashage quand elle change.


  88..77..

  LLee ffiillttrree ddee ppaaqquueettss ddee BBeerrkkeelleeyy ((BBeerrkkeelleeyy PPaacckkeett FFiilltteerr ---- BBPPFF))

  L'idée générale des développeurs est que la fonctionnalité du BPF ne
  doit pas être fournie par le noyau, mais doit se trouver dans une
  bibliothèque de compatibilité (dont on espère qu'elle servira peu).

  Pour ceux qui ne seraient pas au courant : BPF (le Berkeley Packet
  Filter) est un mécanisme destiné à spécifier aux couches réseau du
  noyau quels paquets vous intéressent. Il est implémenté sous la forme
  d'un interpréteur d'un langage à pile spécialisé construit dans un
  niveau bas du code réseau. Une application passe un programme écrit
  dans ce langage au noyau, et le noyau exécute le programme sur chaque
  paquet entrant. Si le noyau possède plusieurs applications BPF, chaque
  programme est exécuté sur chaque paquet.

  Le problème est qu'il est difficile de déduire quel type de paquet
  intéresse réellement l'application à partir du programme de filtrage,
  donc la solution est de toujours exécuter le filtre. Imaginez un
  programme qui enregistre un programme BPF pour extraire un flux de
  données de faible débit envoyé à une adresse multicast. La plupart des
  cartes Ethernet possèdent un filtre d'adresses multicast implémenté
  sous la forme d'une table de hashage à 64 entrées qui ignore la
  plupart des paquets multicast non souhaités, donc les capacités
  existent pour faire de cette opération une opération peu coûteuse en
  ressources. Mais avec le BPF, le noyau doit passer l'interface en mode
  promiscuous, recevoir ttoouuss les paquets, et les passer à travers ce
  filtre. D'ailleurs, c'est un travail qu'il est très difficile de
  comptabiliser dans le processus qui a demandé les paquets.


  99..  FFaaiirree dduu rréésseeaauu aavveecc uunn ppoorrttaabbllee

  Il existe plusieurs façons de mettre votre portable en réseau. Vous
  pouvez utiliser le code SLIP (et tourner aux vitesses d'une liaison
  série). Vous pouvez employer un portable avec un slot PCMCIA intégré,
  ou bien avec une station d'accueil et y mettre une carte Ethernet ISA.
  Vous pouvez encore utiliser un adaptateur Ethernet sur port parallèle.


  99..11..  UUttiilliisseerr SSLLIIPP ((SSeerriiaall LLiinnee IIPP,, IIPP ssuurr lliiaaiissoonn sséérriiee))

  C'est la solution la moins chère, mais de loin la plus difficile. En
  plus, vous n'obtiendrez pas des taux de transfert très élevés. 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.


  99..22..  SSuuppppoorrtt PPCCMMCCIIAA

  Essayez de déterminer exactement de quel matériel vous disposez
  (c'est-à-dire le fabricant de la carte, celui du contrôleur de puces
  PCMCIA) puis demandez sur la liste LAPTOPS. En tout état de cause, ne
  vous attendez pas à ce que les choses soient très 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
  répertoire /pub/linux/packages/laptops/ qui pourront se révéler
  utiles.

  (NDT : Bien entendu, le lecteur français 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 contrôleur PCMCIA. Notez que ces pilotes
  sont en général liés à une puce PCMCIA spécifique (c'est-à-dire la
  82365 d'Intel ou la TCIC/2).

  Pour les cartes compatibles NE2000, certaines personnes ont réussi
  juste en configurant la carte sous DOS, puis en démarrant Linux depuis
  l'invite de commande DOS via loadlin.

  Les choses évoluent pour les utilisateurs de Linux qui souhaitent un
  support PCMCIA, car des progrès substantiels ont été réalisés. 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
  numéro 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'accès 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
  développement.


  99..33..  CCaarrttee EEtthheerrnneett IISSAA ddaannss llaa ssttaattiioonn dd''aaccccuueeiill..

  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) coûtent typiqement environ 1500 francs et fournissent deux slots
  ISA standard, deux ports série et un port parallèle. La plupart
  d'entre elles sont alimentées par les batteries du portable, et
  quelques unes permettent d'en ajouter dans la station même, pour peu
  que vous utilisiez des cartes ISA courtes.  Ainsi, vous pouvez
  utiliser une carte réseau économique et profiter des performances
  d'Ethernet à pleine vitesse.


  99..44..  AAddaappttaatteeuurrss ddee ppoocchhee eett ssuurr ppoorrtt ppaarraallllèèllee..

  Les adaptateurs Ethernet `de poche' peuvent aussi répondre à 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 parallèle.

  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 câble 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.


  1100..  QQuueessttiioonnss ddiivveerrsseess..

  Tout ce qui se rapporte à Ethernet et qui ne rentrait pas ailleurs se
  retrouve ici. Ce n'est peut-être pas significatif, ni intéressant pour
  tout le monde, mais de totue façon, c'est là.


  1100..11..  PPaassssaaggee ddeess aarrgguummeennttss EEtthheerrnneett aauu nnooyyaauu

  Voici deux commandes génériques du noyau qui peuvent être passées au
  noyau au moment du démarrage (ether et reserve). Vous pouvez le faire
  avec LILO, loadlin, ou tout autre utilitaire de démarrage 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 démarrage :

  LILO: linux blabla=123,456,789

  Pour plus d'informations, ainsi qu'une liste complète, sur les
  arguments de démarrage, veuillez consulter le


       BootPrompt-HOWTO <http://metalab.unc.edu/mdw/HOWTO/Boot­
       Prompt-HOWTO.html>



  1100..11..11..  LL''aarrgguummeenntt eetthheerr

  La commande ether= est utilisée 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 générique, elle ressemble à quelque
  chose comme :


       ether=IRQ,ADR_DE_BASE,PARAM_1,PARAM_2,NOM


  Tous les arguments sont optionnels. Le premier argument non-numérique
  est considéré comme le NOM.

  IIRRQQ:: Evident. Une valeur d'IRQ de `0' (habituellement la valeur par
  défaut) signifie affectation automatique de l'IRQ. C'est un accident
  de l'Histoire que le paramètre d'IRQ soit en premier plutôt que
  l'adresse de base -- cela sera corrigé lorsque quelque chose d'autre
  changera.

  AADDRR__DDEE__BBAASSEE:: Evident aussi. Une valeur de `0' (habituellement la
  valeur par défaut) signifie de tester une liste d'adresses spécifiques
  à ce type de carte pour essayer de détecter une carte Ethernet.

  PPAARRAAMM__11:: Utilisé à l'origine comme une valeur qui passe outre
  l'adresse de départ de la zone mémoire pour une carte Ethernet à
  mémoire partagée, comme la WD80*3. Certains pilotes utilisent les
  quatre bits de poids faible de cette valeur pour fixer le niveau de
  message de débogage. 0 -- défaut, 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
  sélectionner le canal DMA. Sinon il utilise l'affectation automatique
  du DMA.

  PPAARRAAMM__22:: Le pilote 3c503 l'utilise pour choisir entre le transceiver
  interne et le transceiver externe. 0 -- défaut/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
  détecté automatiquement.

  NNOOMM:: Sélectionne le périphérique réseau auquel les valeurs se
  réfèrent. Le noyau standard utilise les noms `eth0', `eth1', `eth2' et
  `eth3' pour les cartes Ethernet attachées au bus, et `atp0' pour
  l'adaptateur `de poche' sur port parallèle. Le pilote ARCnet utilise
  le nom `arc0'. Le comportement par défaut est de tester une seule
  carte Ethernet pour `eth0'. Vous ne pouvez activer plusieurs cartes
  qu'en fixant de façon explicite leur adresse de base avec les
  paramètres de LILO. Le noyau 1.0 considérait les cartes Ethernet
  basées sur la puce LANCE comme un cas spécial. Les arguments de LILO
  étaient ignorés, et les cartes LANCE recevaient toujours des noms
  `eth<n>' en commençant à `eth0'. Les cartes supplémentaires, non-
  LANCE, devaient être affectées à `eth<n+1>', et le test habituel de
  `eth0' devait alors être désactivé avec quelque chose comme
  `ether=0,-1,eth0'. (Oui, c'est bogué.)


  1100..11..22..  LLaa ccoommmmaannddee rreesseerrvvee

  Cette autre commande LILO est utilisée exactement comme la commande
  `ether=' ci-dessus, c'est-à-dire que l'on ajoute son nom aux options
  spécifiées dans lilo.conf :


       reserve=IO-base,extent{,IO-base,extent...}


  Sur certaines machines, il peut être nécessaire d'empêcher les pilotes
  de périphérique de tester des périphériques (auto-détection) dans une
  zone spécifique. Cela peut être le cas à cause d'un matériel mal conçu
  qui _f_i_g_e le démarrage (comme certaines cartes Ethernet), qui est
  identifié par erreur, dont l'état a été changé par une procédure de
  détection précédente, ou plus encore d'un matériel que vous ne
  souhaitez pas voir initialisé par le noyau.

  L'argument de démarrage reserve répond à cette attente en spécifiant
  une région de port d'E/S qui ne doit pas être testée. Cette région est
  réservée dans la table d'enregistrement des ports du noyau comme si un
  périphérique avait déjà été trouvé dans cette région. Notez que ce
  mécanisme ne devrait pas être nécessaire sur toutes les machines.
  C'est seulement lorsqu'il y a un problème ou un cas spécial que son
  utilisation peut se révéler nécessaire.

  Les ports d'E/S dans la zone spécifiée sont protégés contre les
  procédures de détection de périphériques. Nous avons montré que cela
  est nécessaire lorsqu'un pilote se bloque sur une carte NE2000, ou
  identifie de façon erronée un autre périphérique comme étant le sien.
  Un pilote de périphérique correct ne devrait pas tester une zone
  réservée, à moins qu'un autre argument de démarrage ne spécifie
  explicitement qu'il doive le faire sur cette zone. Cela implique que
  reserve sera le plus souvent utilisé avec un autre argument de
  démarrage. Donc si vous spécifiez une zone de reserve pour protéger un
  périphérique donné, vous devez généralement spécifier explicitement
  une détection pour ce périphérique. La plupart des pilotes ignorent la
  table d'enregistrement des ports si on leur fournit une adresse
  explicite.

  Par exemple, la ligne de démarrage

       LILO: linux  reserve=0x300,32  ether=0,0x300,eth0


  oblige tous les périphériques à l'exception des pilotes Ethernet à ne
  pas tester la plage 0x300-0x31f.

  Comme d'habitude avec les spécificateurs de démarrage, il existe une
  limite de 11 paramètres, donc vous ne pouvez spécifier que 5 zones
  réservées par mot-clé reserve. Plusieurs spécificateurs reserve
  fonctionneront si vous avez une requête inhabituellement compliquée.


  1100..22..  UUttiilliissaattiioonn ddeess ppiillootteess EEtthheerrnneett ccoommmmee mmoodduulleess

  La majorité des distributions disponibles ont des noyaux avec très peu
  de pilotes intégrés. Les pilotes sont fournis comme modules
  chargeables dynamiquement. Ces pilotes modulaires sont normalement
  chargés par l'administrateur via la commande modprobe(8) dans certains
  cas, ils sont automatiquement chargés par le noyau via kerneld (pour
  les 2.0) ou kmod (pour les 2.1) qui eux-mêmes 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 derrière
  ces jolis petits programmes et ce que'ils changent.

  Les informations qui déterminent quels modules doivent être utilisés
  et les options qui leur sont associées sont en principe stockées dans
  le fichier /etc/conf.modules. Les deux options qui y ont le plus
  d'interêt (pour les cartes ethernet) sont alias et options.  La
  commande modprobe consulte ce fichier pour obtenir des informations
  sur les modules.

  Les modules utilisés sont normalement stockés dans un répertoire 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 première chose à mettre dans votre /etc/conf.modules est une ligne
  indiquant à modprobe où se trouve le pilote à utiliser avec eth0 (et
  eth1, ...), ceci grâce à un alias. Par exemple, si vous avez une carte
  ISA SMC EtherEZ qui utilise le module smc-ultra.o, vous aurez besoin
  de créer 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 utilisées avec tel module (ou alias de
  module). Continuons l'exemple ci-dessus : avec la ligne alias seule,
  le noyau vous préviendrait (cf. dmesg) que l'autodétection des cartes
  ISA n'est _p_a_s une bonne idée.  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 hexadécimale 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 paramètres pour éviter
  la détection automatique de la carte. A la différence des
  périphériques PCI et EISA, il n'existe pas de moyen vraiment sûr de
  réaliser une détection automatique de la majorité des périphériques
  ISA, et cela doit donc être évité quand on utilise les pilotes sous la
  forme de modules chargeables.

  Une liste de toutes les options acceptées par chaque module se trouve
  dans le fichier :

  /usr/src/linux/Documentation/networking/net-modules.txt

  Vous avez intérêt à le lire pour trouver les options à utiliser pour
  votre carte. Notez que quelques modules permettent les listes
  d'options séparées par des virgules, ils sont capables de gérer
  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 même module de contrôler
  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 utilisés ne peuvent être supprimés de la
  mémoire. Cela signifie que vous aurez à faire un ifconfig eth0 down
  (arrêter la carte ethernet) avant de pouvoir les supprimer.

  La commande lsmod vous dira quels sont les modules qui sont chargés,
  s'ils sont utilisés, et rmmod les supprimera.


  1100..33..  DDooccuummeennttss aassssoocciiééss

  La plupart des informations que vous trouvez dans ce document
  proviennent de messages sauvegardés des groupes de comp.os.linux.*, ce
  qui montre qu'il s'agit d'une vraie source d'informations. D'autres
  renseignements très utiles proviennent de tout un tas de petits
  fichiers de Donald lui-même.

  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
  supplémentaires directement dans les fichiers sources des pilotes. Ils
  comportent en général un paragraphe ou deux décrivant les points
  importants, avant que le code ne démarre...

  Pour ceux d'entre vous qui recherchent des informations qui ne sont
  pas spécifiques à 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 réponses. Vous pouvez
  aussi récupérer 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>



  1100..44..  DDééssiisstteemmeenntt ddee rreessppoonnssaabbiilliittéé eett CCooppyyrriigghhtt

  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 matériel hormis
  vous-même. Si votre carte Ethernet ou tout autre partie matérielle de
  votre ordinateur part en fumée (...bien que ce soit pratiquement
  impossible !) nous n'en prenons aucune responsabilité. LES AUTEURS NE
  SONT RESPONSABLES D'AUCUN DOMMAGE ENCOURU CONSÉCUTIF A DES ACTIONS
  EFFECTUÉES 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 complètes de ce manuel à
  condition que la notice de copyright et que cette notice de permission
  soient préservées dans toutes les copies.

  Il est permis de copier et de distribuer des versions modifiées de ce
  document sous les mêmes conditions que la copie complète, à condition
  que cette notice de copyright soit incluse exactement telle qu'elle
  l'est dans l'original, et que le travail dérivé résultant, dans son
  intégralité, 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 mêmes conditions que ci-
  dessus pour les versions modifiées.

  Si vous avez l'intention d'intégrer 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 dépassées de documents _L_i_n_u_x _H_O_W_T_O ont été
  publiées, causant aux développeurs le préjudice indû d'être
  empoisonnés par des questions dont les réponses figuraient déjà dans
  les versions à jour.



  En accord avec cette notice, la version originale (en anglais) telle
  qu'elle apparaît 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 français.  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 français, vous
  pouvez consulter <http://www.freenix.org/unix/linux/HOWTO/Liste-des-
  HOWTO.html> ou contacter Eric Dumas, dumas@linux.eu.org.


  Cette version française a été réalisée par Mathieu Arnold
  <arn_mat@club-internet.fr>, Stéphane 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 français, merci
  d'en informer le traducteur. Vos remarques seront prises en compte
  pour la prochaine version de la traduction.


  1100..55..  CCoonncclluussiioonn


  Si vous avez trouvé une faute de frappe énaurme, ou des informations
  dépassées 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'hésitez pas à la
  ré-envoyer, car elle a pu se perdre dans le flot habituel de SPAM et
  de prospectus que je reçois.

  Merci !

  Paul Gortmaker, p_gortmaker@yahoo.com







  Adaptation française Bernard Choppy, choppy@imaginet.fr
  7 décembre 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 systèmes pare-feux
  ainsi que pour donner quelques détails 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 matières




















































  1. Introduction

     1.1 Réactions
     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 sécurité
     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 Matériel nécessaire
     4.2 Logiciel nécessaire
        4.2.1 Pare-feu filtrant
        4.2.2 Serveur mandataire

  5. Préparer le système Linux

     5.1 Compiler le noyau
     5.2 Configurer deux cartes réseau
     5.3 Configurer les adresses réseau
     5.4 Tester votre réseau
     5.5 Sécuriser 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'accès
        11.2.2 Le fichier de routage
        11.2.3 DNS depuis l'arrière 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 Inconvénients des serveurs mandataire

  12. Configurations avancées

     12.1 Un grand réseau avec sécurité renforcée
        12.1.1 La configuration du réseau
        12.1.2 La configuration du bastion

  13. Simplifier l'administration

  14. Outrepasser un pare-feu mandataire



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  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 très populaires en tant que "nec plus
  ultra" de la sécurité sur Internet.  Comme de nombreuses choses dont
  la renommée grandit, une certaine incompréhension s'y est jointe.  Ce
  HOWTO présente les bases de la définition d'un pare-feu et la manière
  d'en configurer un.

  J'utilise un noyau 2.2.15 et RedHat 6.0 pour développer ce howto,
  ainsi les exemples ci-dessous sont fondés sur cette distribution.  Si
  vous trouvez des différences dans votre distribution, envoyez-moi un
  courriel et je mettrai à jour ce howto.

  NdT : Diverses traductions ont été proposées 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.


  11..11..  RRééaaccttiioonnss

  Toute réaction est la bienvenue.  SSIIGGNNAALLEEZZ TTOOUUTTEE IINNEEXXAACCTTIITTUUDDEE DDAANNSS CCEETT
  AARRTTIICCLLEE SS''IILL VVOOUUSS PPLLAAIITT !!  Je suis humain, et donc sujet aux erreurs.
  Si vous trouvez une correction, envoyez-la moi.  Je tenterai de
  répondre à tout courriel, mais je suis très 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_.


  11..22..  AAvveerrttiisssseemmeenntt

  JJEE NNEE SSUUIISS RREESSPPOONNSSAABBLLEE DD''AAUUCCUUNN DDOOMMMMAAGGEE RREESSUULLTTAANNTT DD''AACCTTIIOONNSS FFOONNDDEEEESS SSUURR
  LLEE PPRREESSEENNTT DDOOCCUUMMEENNTT..  Ce document est conçu comme une introduction au
  fonctionnement des pare-feux et des serveurs mandataires.  Je ne suis,
  ni ne prétends être un expert ès sécurité. ;-) Je suis simplement un
  individu qui a trop lu et qui apprécie les ordinateurs plus que ce
  n'est le cas pour beaucoup.  Considérez que j'écris ceci pour
  familiariser les gens avec ce sujet, et que je ne suis pas prêt à
  perdre ma jeunesse dans l'exactitude de ce qui s'y trouve.

  NdT : Pour sa part, le traducteur émet les mêmes réserves que celles
  de l'auteur.


  11..33..  DDrrooiitt dd''aauutteeuurr

  Sauf mention contraire, les documents Linux HOWTO sont la propriété de
  leurs auteurs respectifs.  Les documents Linux HOWTO peuvent être
  reproduits et distribués en totalité ou en partie, sur tout support
  physique ou électronique, tant que cette notice de droit d'auteur est
  présente sur chaque copie.  La redistribution commerciale est
  autorisée et encouragée ; néammoins, l'auteur souhaite être informé de
  toute distribution de ce genre.

  Toute traduction, travail dérivé, ou agrégat incorporant tout ou
  partie d'un ou plusieurs documents Linux HOWTO doit être couvert par
  ce même droit d'auteur.  Ce qui veut dire que vous ne pouvez produire
  un travail dérivé d'un HOWTO et imposer des restrictions
  supplémentaires concernant sa distribution.  Des exceptions à ces
  règles peuvent être délivrées sous certaines conditions ; contactez le
  coordinateur des Linux HOWTO.

  En bref, nous souhaitons promouvoir la dissémination de cette
  information à travers autant de canaux que possible.  Néammoins, nous
  souhaitons conserver un droit d'auteur sur les documents HOWTO, et
  être avisés 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 répondre 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


  11..44..  LLeess rraaiissoonnss qquuii mmee ppoouusssseenntt àà ééccrriirree cceeccii

  Il y a quelques années, 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 manière de faire en sorte
  que cela puisse arriver était d'utiliser le plus possible de logiciel
  libre et de matériel de récupération.  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 considérée quasiment comme secret-défense.
  J'ai découvert que la création d'un pare-feu de mon cru était à peu
  près impossible.

  Dans mon travail suivant, il m'a été demandé de mettre en place un
  pare-feu.  Linux venait d'intégrer 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.



  11..55..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn


  ·  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
  sécurité en général.


  ·  _S_e_c_u_r_e _L_i_n_u_x_.

  Il s'agit de mon propre site de sécurité sur lequel j'ai rassemblé des
  livres blancs, de la documentation et des programmes concourant à la
  sécurisation de systèmes Unix.

  [ D'autres URL viendront ici ]


  22..  CCoommpprreennddrree lleess ppaarree--ffeeuuxx

  Un pare-feu est une structure destinée à empêcher un feu de la
  traverser.  Dans un immeuble, il s'agit d'un mur qui divise
  complètement des parties de celui-ci.  Dans une voiture, un pare-feu
  est une pièce métallique qui sépare le moteur du compartiment
  passagers.

  Les pare-feux Internet sont conçus pour isoler votre réseau local
  privé des flammes de l'Internet, ou de protéger la pureté des membres
  de votre réseau local en leur interdisant l'accès aux tentations
  démoniaques de l'Internet. ;-)

  Le premier pare-feu informatique était une machine Unix sans routage
  avec deux connexions à deux réseaux différents.  Une carte réseau
  était connectée à Internet et l'autre au réseau privé.

  Pour atteindre Internet depuis le réseau privé, il fallait se loger
  sur le pare-feu (Unix).  Ensuite, on utilisait les ressources de ce
  système pour accéder à 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 accès aux deux réseaux.

  Cette sorte de hôte à double réseau (un système à deux connexions
  réseau) est bien si l'on peut faire confiance à TOUS les utilisateurs.
  On peut configurer simplement un système Linux et y créer un compte
  pour tout utilisateur souhaitant un accès à Internet.  Avec cette
  configuration, le seul ordinateur du réseau privé qui connaisse
  quelque chose du monde extérieur est le pare-feu proprement dit.
  Personne ne peut télécharger directement sur un poste de travail
  personnelle  il faut d'abord télécharger un fichier sur le pare-feu,
  puis transférer celui-ci du pare-feu au poste de travail.

  NOTE IMPORTANTE : 99% des intrusions commencent par l'obtention d'un
  accès utilisateur sur le système attaqué.  Pour cette raison, je ne
  recommande pas ce type de pare-feu.  De plus, il est aussi extrêmement
  limité.



  22..11..  PPoolliittiiqquueess ddee ssééccuurriittéé

  Il ne faut pas croire qu'un pare-feu soit la panacée.  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 utilisés dans deux buts :


  1. pour maintenir des gens (intrus, vandales...) dehors ;

  2. pour maintenir des gens (employés, 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 employés qu'à maintenir les intrus hors
  de ses réseaux.

  Au moins dans mon état (l'Oklahoma), les employeurs ont le droit de
  surveiller les appels téléphoniques et l'activité Internet à condition
  d'informer préalablement les employés de cette surveillance (NdT : la
  législation française est identique de ce point de vue).

  Big Brother n'est pas le gouvernement.  Big Brother est le Big
  Businness.

  Ne me méjugez 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.  Néanmoins, j'ai aussi observé que certains types de
  directions se trouvent aussi les principaux transgresseurs des règles
  qu'ils ont eux-mêmes édictées.  J'ai vu des vacataires réprimandés car
  ils avaient utilisé Internet pour chercher le trajet de bus pour venir
  au travail alos que le même directeur passait des heures au travail à
  chercher de bons restaurants et boîtes 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 sécurité peut être difficile.  Si vous êtes
  gestionnaire de pare-feux, surveillez vos arrières.


  22..22..  TTyyppeess ddee ppaarree--ffeeuuxx

  Il y a deux types de pare-feux :


  1. pare-feux IP ou filtrants - ils bloquent tout le trafic sauf celui
     sélectionné ;

  2. serveurs mandataires (parfois appelés bastions) - ils réalisent les
     connexions réseau pour vous.


  22..22..11..  PPaarree--ffeeuuxx ffiillttrraannttss

  Le filtrage de paquets est le type de pare-feu inclus dans le noyau
  Linux.


  Un pare-feu filtrant fonctionne au niveau du réseau.  Les données ne
  sont autorisées à quitter le système que si les règles du pare-feu le
  permettent.  Lorsque les paquets arrivent, ils sont filtrés en
  fonction de leurs type, origine, destination et port qui sont décrits
  dans chacun de ceux-ci.

  De nombreux routeurs comportent un certain nombre de services de type
  pare-feu.  Les pare-feux filtrants peuvent être pensés comme des types
  particuliers de routeurs.  Pour cette raison, il faut une profonde
  compréhension de la structure des paquets IP pour travailler avec l'un
  d'eux.

  Puisque très peu de données sont analysées et tracées, les pare-feux
  filtrants consomment peu de temps processeur et créent moins de
  latence sur un réseau.

  Les pare-feux filtrants ne fournissent pas de contrôle 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 problème lorsqu'on souhaite utiliser DHCP
  (assignation dynamique d'adresses IP).  En effet, les règles étant
  fondées sur les adresses IP, il faut ajuster celles-ci à chaque fois
  que de nouvelles adresses sont assignées.  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 règles dans leurs
  applications pour utiliser Internet.  Ce n'est pas vrai avec la
  plupart des serveurs mandataires.


  22..33..  SSeerrvveeuurrss mmaannddaattaaiirreess

  Le meilleur exemple du fonctionnement de ceux-ci est celui d'une
  personne se connectant à un système 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'extérieur, 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'extérieur) et vous renvoie les données reçues.  NdT : en
  français, on utilise souvent le terme "bastion" pour désigner un
  serveur mandataire situé entre le réseau local interne et l'extérieur.
  Dans le présent document, on utilisera plutôt le terme bastion pour
  désigner la machine qui porte le serveur mandataire.

  Puisque les serveurs mandataires gèrent 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
  téléchargé.  Ils peuvent même expurger les mots "inappropriés" des
  sites que vous visitez ou analyser la présence de virus.

  Les serveurs mandataires d'applications peuvent authentifier des
  utilisateurs.  Avant qu'une connexion soit réalisée vers l'extérieur,
  le serveur peut demander à l'utilisateur de se connecter
  préalablement.  Pour un utilisateur web, cela fonctionnera comme si
  chaque site requérait une connexion.


  22..33..11..  MMaannddaattaaiirree SSOOCCKKSS

  Un mandataire SOCKS ressemble beaucoup à un vieux central téléphonique
  à fiches.  Il interconnecte simplement une machine interne à une autre
  externe.

  De nombreux serveurs SOCKS fonctionnent uniquement avec les connexions
  de type TCP.  De même, 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.


  33..  AArrcchhiitteeccttuurree ddee ppaarree--ffeeuu

  Il existe de nombreuses manières de structurer un réseau pour protéger
  des systèmes à l'aide d'un pare-feu.

  Si l'on dispose de connexions dédiées à Internet par un routeur, on
  peut connecter directement celui-ci au système pare-feu.  Au
  contraire, on peut passer par un hub pour permettre un accès complet
  aux serveurs à l'extérieur du pare-feu.


  On peut configurer un certain nombre de règles de filtrage matérielles
  dans le routeur.  Néanmoins, ce routeur peut être la propriété d'un
  FAI (fournisseur d'accès Internet), auquel cas on ne dispose pas du
  contrôle 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 troisième carte réseau pour créer une DMZ
  (De-Militarized Zone, ou "zone démilitarisée") filtrée.  Cela donne un
  contrôle total sur les services Internet et maintient la séparation
  avec le réseau local normal.


                              __________
                _/\__/\_      |          |          ___________
               |        |     | Systeme  |  (LAN)  | Postes de |
              / Internet \----| pare-feu |--(HUB)--|  travail  |
              \_  _  _  _/    |__________|         |___________|
                \/ \/ \/           |
                                 (DMZ)
                                 (HUB)



  Si l'on ne fournit pas soi-même des services Internet mais que l'on
  souhaite surveiller où vont les utilisateurs, on voudra utiliser un
  serveur mandataire (bastion).  Cela peut être intrégré dans le pare-
  feu.


                               __________
                _/\__/\_      | Systeme  |          ___________
               |        |     | pare-feu/|  (LAN)  | Postes de |
              / Internet \----| bastion  |--(HUB)--|  travail  |
              \_  _  _  _/    |__________|         |___________|
                \/ \/ \/



  On peut aussi placer le serveur mandataire sur le réseau local.  Dans
  ce cas, les règles du pare-feu ne doivent autoriser que le bastion à
  se connecter à Internet pour les services que celui-ci fournit.  Ainsi
  les utilisateurs ne peuvent accéder à Internet que par le mandataire.











                              __________
               _/\__/\_      |          |          ___________
              |        |     | Systeme  |  (LAN)  | Postes de |
             / Internet \----| pare-feu |--(HUB)--|  travail  |
             \_  _  _  _/    |__________|    |    |___________|
               \/ \/ \/                      |     ____________
                                             |    |  Serveur   |
                                             +----| mandataire |
                                                  |____________|



  Si l'on souhaite réaliser un service comme ceux de Yahoo! ou peut-être
  SlashDot, on peut souhaiter réaliser 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 créer 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 réseau local.  Il faut conserver
  le contrôle de chaque connexion.  Il suffit d'un utilisateur avec un
  modem pour compromettre tout un réseau local.


  44..  CCoonnffiigguurreerr llee ppaarree--ffeeuu ffiillttrraanntt LLiinnuuxx

  44..11..  MMaattéérriieell nnéécceessssaaiirree

  Les pare-feux filtrants ne nécessitent pas de matériel 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 mémoire vive ;

  2. un disque dur de 200 Mo (500 Mo sont tout de même recommandés) ;

  3. des connexions réseau (cartes Ethernet, ports série, connexions
     sans fil ?) ;

  4. un moniteur et un clavier.

  Avec certains systèmes, on peut même éliminer le moniteur et le
  clavier en utilisant une console sur port série.


  Si l'on a besoin d'un serveur mandataire qui doive gérer un fort
  trafic, il faut prendre le système le plus puissant qui soit possible.
  En effet, pour chaque utilisateur qui se connectera par le bastion, il
  se créera un nouveau processus.  Si l'on a 50 utilisateurs simultanés
  ou plus, je pense qu'il faut :


  1. un Pentium II avec 64 Mo de mémoire vive ;

  2. un disque dur de 2 Go pour contenir toutes les traces ;

  3. deux connexions réseau  ;

  4. un moniteur et un clavier.

  Les connexions réseau peuvent être de n'importe quel type (cartes NIC,
  RNIS ou même des modems).


  44..22..  LLooggiicciieell nnéécceessssaaiirree

  44..22..11..  PPaarree--ffeeuu ffiillttrraanntt

  Pour créer un pare-feu filtrant, aucun logiciel spécifique n'est
  nécessaire.  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 récent, car ces noyaux sont obsolètes, 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 récent, il faut utiliser un
  ipchaining comme par exemple celui développé par
  http://www.rustcorp.com/linux/ipchains/.


  44..22..22..  SSeerrvveeuurr mmaannddaattaaiirree


  Si l'on veut configurer un serveur mandataire, il faut l'un des
  paquetages suivants :


  ·  Squid ;

  ·  la boîte à outils TIS Firewall (FWTK) ;

  ·  SOCKS.


  Squid est un beau paquetage et fonctionne avec la fonctionnalité de
  Linux de mandataire transparent.  Je vais décrire 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 boîte à outils TIS est toujours
  disponible sur : http://www.tis.com/research/software/.

  Trusted Information System fournit une collection de programmes conçue
  pour faciliter la gestion de pare-feux.  Avec cette boîte à outils, on
  configure un daemon pour chaque service (web, telnet, etc.) qui sera
  utilisé.

  55..  PPrrééppaarreerr llee ssyyssttèèmmee LLiinnuuxx

  55..11..  CCoommppiilleerr llee nnooyyaauu

  Commencez avec une installation minimale propre de votre distribution
  Linux.  Moins vous installez de logiciels, moins votre système aura de
  trous de sécurité, portes dérobées et/ou bogues susceptibles d'induire
  des problèmes de sécurité dans votre système.

  Prenez un noyau stable.  J'utilise le noyau Linux 2.2.9 ou plus pour
  mon système.  La documentation est donc fondée sur ces paramètres.

  Vous devez recompiler le noyau Linux avec les options appropriées.  Si
  vous n'avez jamais recompilé de noyau, je vous renvoie au Kernel
  HOWTO, à l'Ethernet HOWTO et au NET-3 HOWTO.

  Voici les paramètres réseau 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  --->




  Après avoir réalisé toute la configuration qu'il vous faut vous devez
  recompiler, réinstaller 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.


  55..22..  CCoonnffiigguurreerr ddeeuuxx ccaarrtteess rréésseeaauu

  Si vous avez deux cartes réseau dans votre ordinateur, vous devrez
  très certainement ajouter un paramètre "append" dans votre fichier
  /etc/lilo.conf pour décrire les IRQ et adresses des deux cartes.  Le
  mien se présente ainsi :


  append="ether=12,0x300,eth0 ether=15,0x340,eth1"




  55..33..  CCoonnffiigguurreerr lleess aaddrreesssseess rréésseeaauu

  Nous arrivons à la partie amusante de notre configuration.  Je ne vais
  pas entrer très profondément dans les détails de mise en place d'un
  réseau local.  Pour résoudre vos problèmes à ce niveau, vous pouvez
  vous reporter au Networking-HOWTO.

  Votre but est de fournir deux connexions réseau à votre système pare-
  feu filtrant : l'une est Internet (côté dangereux) et l'autre est le
  réseau local (côté sécurisé).

  Dans tous les cas, vous devez prendre quelques décisions :


  1. utiliserez-vous des adresses IP réelles ou non pour votre réseau
     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 accéder au réseau
  privé, il n'est pas nécessaire d'utiliser des adresses "réelles".  On
  peut toujours choisir des adresse arbitraires pour un réeau privé,
  mais ce n'est pas recommandé : au cas où des données seraient routées
  en-dehors de celui-ci, elles pourraient arriver sur un autre système.

  Un certain nombre de plages d'adresses Internet ont été laissées de
  côté pour les réseaux privés.  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
  "réelles" pour leur permettre de voyager sur Internet.

  L'utilisation de ces adresses IP non routables rend le réseau privé
  plus sûr, 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 "réelle" à la carte réseau du côté
  Internet.  Cette adresse peut vous être assignée de manière permanente
  (comme adresse IP statique) ou à chaque connexion par le processus
  PPP.

  Vous assignez vos numéros IP internes, comme 192.168.2.1 pour la carte
  Ethernet du réeau 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 réseau protégé (soit 192.168.2.2 à
  192.168.2.254).

  J'utilise Linux RedHat.  Pour configurer le réseau lors du démarrage,
  j'ai ajouté un fichier "ifcfg-eth1" dans le répertoire
  /etc/sysconfig/network-scripts.  On peut aussi trouver des fichiers
  ifcfg-ppp0 ou ifcfg-tr0 dans ce répertoire.  Ces fichiers "ifcfg-"
  sont utilisés par RedHat pour configurer et activer les périphériques
  réseau lors du démarrage.  Leur nom est fonction du type de connexion.

  Voici l'allure du fichier ifcfg-eth1 (deuxième 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 commutée, vous devrez consulter les
  fichiers ifcfg-ppp0 et chat-ppp0 qui contrôlent 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"




  55..44..  TTeesstteerr vvoottrree rréésseeaauu

  Commencer en utilisant les commandes ifconfig et route.  Si vous avez
  deux cartes réseau, 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 côté Internet du pare-feu et
  192.168.2.0 celle du côté privé (réseau local).

  Vous devez commencer par vous assurer que chaque ordinateur de votre
  réseau 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 réseau.

  Ensuite, essayez d'atteindre un système 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 problème 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 vérifier la configuration de votre passerelle par défaut.
  Si vous utilisez une connexion commutée, recontrôlez 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 extérieure du pare-feu
  (199.1.2.10 dans notre exemple) depuis une machine du réseau local.
  Cela ne doit pas fonctionner.  Dans le cas contraire, le masquage IP
  ou la transmission IP sont activés ou vous avez déjà une sorte de
  filtrage de paquet positionnée.  Désactivez-les et réessayez.  Vous
  devez savoir si le filtrage est en place.

  Pour les noyaux postérieurs 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 désactivant la transmission IP (IP
  forwarding, mais mettez plutôt votre noyau à jour).

  Essayez à nouveau d'atteindre l'adresse extérieure du pare-feu
  (199.1.2.10 dans notre exemple) depuis une machine du réseau local.
  Cela ne doit pas fonctionner.

  Maintenant, activez la transmission IP et/ou le masquage IP.  Vous
  devez être à même d'atteindre n'importe quel point d'Internet depuis
  n'importe quelle machine de votre réseau local.


      echo "0" > /proc/sys/net/ipv4/ip_forward



  Note importante : Si vous utilisez des adresses IP "réelles" sur votre
  réseau local (et non 192.168.xxx.yyy) et que vous ne puissisez
  atteindre Internet, mais que vous puissiez atteindre le côté extérieur
  de votre pare-feu, vérifiez que votre FAI route correctement les
  paquets depuis l'adresse de votre réseau privé.

  Un test de ce problème est de connaître quelqu'un d'autre sur Internet
  (un ami utilisant un fournisseur local, par exemple) et de lui
  demander d'effectuer un traceroute vers votre réseau.  Si la trace
  s'arrête 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. :-)


  55..55..  SSééccuurriisseerr llee ppaarree--ffeeuu

  Le pare-feu n'est d'aucune utilité s'il reste largement ouvert aux
  attaques.  Un "méchant" pourrait obtenir l'accès au pare-feu et le
  modifier pour ses desseins personnels.  Vous devez désactiver tous les
  services inutilisés.


  Regardez dans votre fichier /etc/inetd.conf.  Ce fichier contrôle
  inetd qu'on appelle aussi "super-serveur".  Il contrôle un tas de
  daemons serveurs et les exécute à la demande, à partir des paquets qui
  arrivent sur un port "bien connu" (well known port).

  Vous devez désactiver 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
  possédez un.

  Pour désactiver un service, placez simplement un "#" (dièze) devant.
  Ensuite, envoyez un signal SIG-HUP au processus inetd, selon la
  syntaxe suivante :


  kill -HUP <pid>



  où "pid" est le numéro du processus inetd.  Cela force inetd à relire
  son fichier de configuration (inetd.conf) et à se relancer sans
  arrêter votre système.

  Testez le résultat par telnet sur le port 15 (netstat) du pare-feu.
  Si vous obtenez une réponse de netstat, c'est que vous n'avez pas
  arrêté ces services correctement.


  telnet localhost 15



  Vous pouvez aussi créer 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 refusée.  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 périphériques
  indiqués dans /etc/securetty.  Les échecs seront tracés par la
  facilité syslog.  Avec ces deux contrôles actifs, la seule manière de
  se connecter sur le pare-feu est de se présenter comme root sur la
  console.


  66..  CCoonnffiigguurraattiioonn dduu ffiillttrraaggee IIPP ((IIPPFFWWAADDMM))

  Si vous utilisez un noyau 2.1.102 ou supérieur, passez directement à
  la section suivante sur IPCHAINS.

  Dans les anciens noyaux, la transmission IP est activée par défaut.
  Pour cette raison, votre réseau doit commencer par refuser l'accès à
  tout et vider toutes les règles de transmission (ipfw) en place depuis
  le dernier lancement.  Le fragment de script suivant doit se trouver
  dans votre script de lancement réseau (en général,
  /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 créer 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 réseau local à accéder aux serveurs web
  externes ainsi qu'aux serveurs DNS.

  Cet exemple n'est pas parfaitement sécurisé.  Puisque le port 80 n'est
  pas obligatoirement utilisé comme port web, un intrus rusé pourrait
  utiliser celui-ci pour créer un réseau 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 réseau local devront alors
  passer par le mandataire pour atteindre les serveurs web extérieurs.

  On peut aussi s'intéresser à 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 système 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 arrêter ici.  Testez-le et amusez-vous bien :-)


  77..  CCoonnffiigguurraattiioonn dduu ffiillttrraaggee IIPP ((IIPPcchhaaiinnss))

  Les ipchains Linux sont une réécriture du code pare-feu IPv4 de Linux
  (en grande partie inspiré de BSD) ainsi que de ipfwadm qui était lui-
  même une réécriture 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 gère pas les fragments, a des compteurs sur 32 bits
  (sur Intel en tout cas), ne permet aucune autre spécification de
  protocole que TCP, UDP ou ICMP, ne peut réaliser de vastes
  modifications de manière atomique, ne peut spécifier de règles
  inversées, a quelques défauts et peut se révéler dur à administrer (ce
  qui le rend vulnérable aux erreurs d'utilisation).  Ou du moins c'est
  ce qu'en dit l'auteur.

  Je ne vais pas entrer en détail sur la manière de contrôler 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 chaînes par noms.  Il existe au début trois
  chaînes prédéfinies input, output et forward, qu'il est impossible de
  supprimer.  On peut créer des chaînes personnelles.  Des règles
  peuvent ensuite être ajoutées et supprimées de ces ensembles de
  règles.

  Les opérations nécessaires pour travailler sur les chaînes sont les
  suivantes :


  1. création d'une nouvelle chaîne (-N) ;

  2. suppression d'une chaîne vide (-X) ;

  3. modification de la spécification pour une chaîne prédéfinie (-P)

  4. liste des règles d'une chaîne (-F) ;

  5. remise à zéro des compteurs de paquets et d'octets de toutes les
     règles d'une chaîne (-Z).

  Il existe différentes méthodes pour manipuler les règles à l'intérieur
  des chaînes :


  1. ajout d'une nouvelle règle dans une chaîne (-A) ;

  2. insertion d'une nouvelle règle à une position donnée d'une chaîne
     (-I) ;

  3. remplacement d'une règle à une position donnée d'une chaîne (-R) ;

  4. suppression d'une règle à une position donnée d'une chaîne (-D) ;

  5. suppression de la première règle correspondante dans une chaîne
     (-D).

  Il existe quelques opérations pour le masquage qui se trouvent dans
  ipchains dans l'attente d'un bon emplacement pour les placer :


  1. liste des connexions actuellement masquées (-M -L) ;

  2. positionnement du temps d'expiration du masquage (-M -S).

  Il y a quelques détails de chronologie qui interviennent dans la
  modification des règles 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



  ... réalisation 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 règles de pare-feu qui précèdent 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'extérieur
    /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'extérieur
    /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'arrêter là.  Ce n'est pas un pare-feu très puissant
  et je suis sûr qu'il y a d'autres services que vous souhaiteriez
  fournir.  À nouveau, lisez le IPCHAINS-HOWTO.


  88..  RReennddrree llee ttoouutt pplluuss ssiimmppllee

  Il existe des interfaces graphiques ou fondées sur le web développées
  pour fonctionner avec les règles de filtrage Linux.  Un certain nombre
  d'entreprises ont même créé des pare-feux commerciaux fondés sur Linux
  en le plaçant dans leur propre machine avec leur propre code de
  management (joli).

  gfcc (GTK+ Firewall Control Center) est une application GTK+ capable
  de contrôler les principes et règles de filtrage de Linux, fondée 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
  génération 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


  99..  IInnssttaalllleerr uunn mmaannddaattaaiirree SSqquuiidd ttrraannssppaarreenntt

  Le mandataire squid est disponible sur http://squid.nlanr.net/.

  Les développeurs de squid fournissent des paquetages aux formats
  RedHat et Debian.  Si vous le pouvez, il vaut mieux utiliser l'un
  d'entre eux.


  1100..  IInnssttaalllleerr llee sseerrvveeuurr mmaannddaattaaiirree TTIISS

  1100..11..  TTrroouuvveerr llee llooggiicciieell

  Le TIS fwtk est disponible à http://www.tis.com/research/software/.

  NNee ccoommmmeetttteezz ppaass ll''eerrrreeuurr qquuee jj''aaii ccoommmmiissee :: lorsque vous téléchargez
  les fichiers de TIS, LISEZ LES README.  Le TIS fwtk est verrouillé
  dans un répertoire caché sur leur serveur.

  TIS impose que vous lisiez leur accord à

  http://www.tis.com/research/software/fwtk_readme.html, puis que vous
  eennvvooyyiieezz uunn ccoouurrrriieell àà ffwwttkk--rreeqquueesstt@@ttiissllaabbss..ccoomm avec le seul mot
  aacccceepptteedd dans le corps du message pour connaître le nom de ce
  répertoire caché.  Aucun sujet n'est nécessaire pour ce message.  Leur
  système vous enverra en retour le nom du répertoire par courriel
  (valaple 12 heures) pour charger le source.

  A l'instant où j'écris, la version à jour du FWTK est 2.1.


  1100..22..  CCoommppiillaattiioonn dduu FFWWTTKK TTIISS

  La version 2.1 du FWTK se compile beaucoup plus facilement que les
  précédentes.

  EXPLIQUER ICI !!!

  Maintenant, lancez mmaakkee.


  1100..33..  IInnssttaallllaattiioonn dduu FFWWTTKK TTIISS

  Lancez mmaakkee iinnssttaallll.

  Le répertoire d'installation par défaut est /usr/local/etc.  Il est
  possible de changer cela (ce que je n'ai pas fait) vers un répertoire
  plus sûr.  J'ai choisi de changer l'accès à ce répertoire pour le mode
  "0700".

  Tout ce qu'il reste à faire maintenant est de configurer le pare-feu.


  1100..44..  CCoonnffiigguurraattiioonn dduu FFWWTTKK TTIISS

  Maintenant, le plaisir commence vraiment.  Nous devons enseigner au
  système à appeler ces nouveaux services et créer les tables pour les
  contrôler.

  Je ne suis pas en train de ré-écrire le manuel de TIS fwtk ici.  Je
  vais montrer les paramètres que j'ai fait fonctionner et expliquer les
  problèmes que j'ai rencontrés et comment je les ai contournés.

  Trois fichiers définissent ces contrôles :




  ·  /etc/services : indique au système 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'accès 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 système
  inaccessible.


  1100..44..11..  LLee ffiicchhiieerr nneettppeerrmm--ttaabbllee

  Ce fichier contrôle qui a accès aux services de TIS FWTK.  Vous devez
  penser au trafic qui passe par le pare-feu depuis les deux côtés.  Les
  gens de l'extérieur de votre réseau doivent s'identifier avant
  d'obtenir l'accès, mais ceux de l'intérieur doivent être autorisés
  simplement à passer au-travers.

  Afin que les gens puissent s'identifier, le pare-feu utilise un
  programme appelé aauutthhssrrvv pour maintenir une base des noms et mots de
  passe.  La section authentification de netperm-table contrôle
  l'emplacement et l'accès à la base.

  J'ai eu quelques difficultés à fermer l'accès à ce service.  Notez que
  la ligne permit-hosts que je montre utilise un "*" pour donner l'accès
  à tout le monde.  Le paramétrage 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 ..//aauutthhssrrvv dans le
  répertoire /var/local/etc pour créer l'enregistrement de l'utilisateur
  d'administration.

  La documentation de FWTK indique la manière 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 contrôles de la passerelle telnet (tn-gw) vont de soi et sont la
  première chose que vous deviez configurer.

  Dans mon exemple, j'autorise une machine du réseau 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 système (192.1.2.202) à accéder 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 utilisées.

  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 même manière 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 accès 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 réseau
  protégé à accéder librement à InterNet et tous les autres utilisateurs
  doivent s'authentifier.  J'ai ajouté la trace de chaque fichier envoyé
  et reçu dans mes contrôles (-log { retr stor }).

  Le timeout FTP contrôle 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 contrôlés par le
  http-gw.  Les deux premières lignes créent un répertoire pour stocker
  les documents ftp et web lorsqu'ils passent au-travers du pare-feu.
  Je rends root propriétaire de ces fichiers et je les place dans un
  répertoire accessible seulement par root.

  La connexion web doit être maintenue courte.  Elle contrôle 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 "gruyère".  Faites-y attention.
  Dans cet exemple, j'autorise quiconque depuis le réseau protégé à se
  connecter en-dehors du réseau 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 réseau protégé à se connecter seulement à un
  système et seulement sur son port de nouvelles.

  La seconde ligne permet au serveur de renvoyer ses données au réseau
  protégé.

  Puisque de nombreux clients s'attendent à rester connectés 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 réseau protégé
  doit se connecter d'abord, puis nous l'autorisons à utiliser le
  programme finger du pare-feu.  Tout autre reçoit 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.


  1100..44..22..  LLee ffiicchhiieerr //eettcc//sseerrvviicceess

  C'est là que tout commence.  Lorsqu'un client se connecte sur le pare-
  feu, il le fait sur un port connu (inférieur à 1024).  Par exemple,
  telnet se connecte sur le port 23.  Le daemon inetd détecte 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 créons 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 paramétrez votre netperm-table comme je
  l'ai fait, vous serez seulement capable de faire cela depuis un
  système situé à l'intérieur du réseau protégé.



          telnet-a   24/tcp
          ftp-gw     21/tcp          # ce nom est modifie
          auth       113/tcp  ident  # Verification utilisateur
          ssl-gw     443/tcp





  1111..  LLee sseerrvveeuurr mmaannddaattaaiirree SSOOCCKKSS

  1111..11..  IInnssttaallllaattiioonn dduu sseerrvveeuurr mmaannddaattaaiirree

  Le serveur mandataire SOCKS est disponible sur :
  http://www.socks.nec.com/.

  Décompressez et "dé-tarez" les fichiers dans un répertoire de votre
  système, et suivez les instructions pour le confectionner.  J'ai eu
  quelques problèmes pour le réaliser.  Vérifiez 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'exécuter sur demande.


  1111..22..  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr mmaannddaattaaiirree

  Le programme de connexion nécessite deux fichiers de configuration
  distincts : l'un pour indiquer les accès autorisés, l'autre pour
  rediriger les requêtes vers le serveur mandataire approprié.  Le
  fichier d'autorisations d'accès 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.


  1111..22..11..  LLee ffiicchhiieerr dd''aaccccèèss

  Avec socks4.2 bêta, le fichier d'accès s'appelle "sockd.conf".  Il
  doit contenir deux lignes : une ligne d'autorisations et une ligne
  d'interdictions.  Chaque ligne présente 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 réseau.
  Représentez-vous ce nombre sur 32 bits.  Si un bit est à 1, le bit
  correspondant de l'adresse qu'il contrôle 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 spécifier 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 très 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 représentent la norme, car
  c'est facile à écrire.

  On peut utiliser plusieurs lignes de chaque type.

  Des utilisateurs spécifiques peuvent aussi se voir accorder ou refuser
  l'accès.  Cela est réalisé par l'authentification d'identité.  Tous
  les systèmes ne supportent pas le système ident, y compris Trumpet
  Winsock, donc nous n'irons pas plus loin en ce qui concerne cela.  La
  documentation de socks est tout à fait adéquate sur ce sujet.


  1111..22..22..  LLee ffiicchhiieerr ddee rroouuttaaggee

  Le fichier de routage de socks est bêtement nommé "socks.conf".  Je
  dis "bêtement", car il est si proche du nom du fichier d'accès qu'il
  est aisé de les confondre.

  Le fichier de routage sert à indiquer aux clients de socks quand il
  est nécessaire de l'utiliser et quand ce n'est pas le cas.  Par
  exemple, dans notre réseau, 192.168.2.3 ne nécessite pas l'usage de
  socks pour communiquer avec le pare-feu 192.168.2.1.  Il a une
  connection directe Ethernet.  Il définit 127.0.0.1, le port de
  bouclage, automatiquement.  Evidemment, il n'est  pas nécessaire
  d'utiliser socks pour vous parler à vous-même.

  Il y a trois entrées :


  ·  deny ;

  ·  direct ;

  ·  sockd.

  L'entrée "deny" indique à socks quand rejeter une requête.  Cette
  entrée a les trois mêmes champs que ceux de sockd.conf :
  identificateur, adresse et modificateur.  Généralement, puisqu'il est
  aussi manipulé par sockd.file, le fichier d'accès, le champ
  modificateur est positionné à 0.0.0.0.  Si vous voulez vous interdire
  tout appel vers l'extérieur, vous pouvez le réaliser ici.

  L'entrée "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'accès direct pour toute machine de notre réseau
  protégé.

  L'entrée "sockd" indique à l'ordinateur l'emplacement du démon serveur
  de socks.

  La syntaxe est la suivante :


          sockd @=<liste de serveurs> <adresse IP> <modificateur>



  Notez l'entrée @=.  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 tolérance aux
  pannes.

  Les champs adresse IP et modificateur fonctionnent exactement comme
  dans les autres exemples.  Vous spécifiez ainsi où va quelle adresse.


  1111..22..33..  DDNNSS ddeeppuuiiss ll''aarrrriièèrree dd''uunn ppaarree--ffeeuu

  Configurer un service de noms de domaines depuis l'arrière d'un pare-
  feu est une tâche relativement simple.  En gros, il vous faut
  configurer le DNS sur la machine pare-feu.  Ensuite, indiquez à chaque
  machine derière le pare-feu d'utiliser celui-ci.


  1111..33..  TTrraavvaaiilllleerr aavveecc uunn sseerrvveeuurr mmaannddaattaaiirree



  1111..33..11..  UUnniixx

  Pour faire fonctionner vos applications avec un serveur mandataire,
  celles-ci doivent être "SOCK-ifiées".  Il vous faudra deux telnet
  différents : 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-ifiés.  Si vous utilisez la version SOCK-ifiée
  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 réseau protégé et les remplacer
  par leur version SOCK-ifiée.  "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-
  mêmes.  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 intéresse) dans le champ SOCKs sous
  Proxies.  Chaque application nécessite au moins un petit coup d'oeil,
  quelle que soit son attitude vis-à-vis d'un serveur mandataire.


  1111..33..22..  MMSS WWiinnddoowwss aavveecc TTrruummppeett WWiinnssoocckk

  Trumpet Winsock contient des fonctionnalités 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 débrouillera alors avec tous les paquets sortants.  NdT : Trumpet
  Winsock est une couche IP destinée à MS-Windows 3.  Depuis la version
  3.11 de Windows, Microsoft fournit une couche IP dont les
  fonctionnalités sont très différentes.


  1111..44..  FFaaiirree ffoonnccttiioonnnneerr llee sseerrvveeuurr mmaannddaattaaiirree aavveecc lleess ppaaqquueettss UUDDPP

  Le paquetage SOCKS fonctionne seulement avec les paquets TCP, pas avec
  les UDP.  Cela le rend quelque peu moins utile.  De nombreux
  programmes très utiles, comme talk et Archie, utilisent UDP.  Il
  existe un paquetage prévu 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.


  1111..55..  IInnccoonnvvéénniieennttss ddeess sseerrvveeuurrss mmaannddaattaaiirree

  Le serveur mandataire est, avant tout, un système de sécurité.  Son
  utilisation pour augmenter le nombre d'accès Internet avec un nombre
  limité d'adresses aura de nombreux inconvénients.  Un serveur
  mandataire autorisera un plus grand accès de l'intérieur du réseau
  protégé vers l'extérieur, mais laissera l'intérieur totalement
  inaccessible de l'extérieur.  Ce qui implique aucun serveur, aucune
  connexion talk ni Archie, ni courriel direct vers les ordinateurs de
  l'intérieur.  Ces inconvénients peuvent sembler légers, mais regardez-
  les sous l'angle suivant :

  ·  Vous avez laissé un document en cours sur votre ordinateur à
     l'intérieur du réseau protégé.  Vous êtes à la maison, et décidez
     que vous voulez retravailler celui-ci.  Vous ne le pouvez pas.
     Vous ne pouvez atteindre votre ordinateur, car il est derrière le
     pare-feu.  Vous essayez de vous loger d'abord sur le pare-feu, mais
     comme tout le monde a accès au serveur mandataire, personne ne vous
     a créé de compte dessus.


  ·  Votre fille va à l'université.  Vous souhaitez lui envoyer un
     courriel.  Vous avez différents choses de caractère privé à
     discuter, et préfèreriez recevoir directement votre courrier sur
     votre machine.  Vous avez pleine confiance dans votre
     administrateur réseau, mais, malgré tout, il s'agit de courrier
     privé.

  ·  L'impossibilité d'utiliser les paquets UDP représente un gros
     inconvénient avec les serveurs mandataire.  Je pense que les
     fonctionnalités UDP arriveront sous peu.

  FTP cause un autre problème avec les serveurs mandataire : Lorsque FTP
  récupère 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
  dégradation du rapport information/protocole, n'importe quel autre
  moyen d'obtenir cet accès sera plus rapide.

  En résumé, si vous avez les adresses IP nécessaires, et que la
  sécurité ne soit pas un impératif pour vous, n'utilisez ni un pare-feu
  ni un serveur mandataire.  Si vous n'avez pas suffisamment d'adresses
  IP, mais que, de même, la sécurité 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 accès supérieur à l'intérieur
  du réseau depuis InterNet.  Les serveurs mandataires sont utiles pour
  ce genre de réseaux qui comportent de nombreuses machines qui se
  connectent au vol à InterNet, avec une configuration et peu de travail
  ensuite.


  1122..  CCoonnffiigguurraattiioonnss aavvaannccééeess

  Je voudrais aborder une configuration particulière avant de refermer
  ce document.  Celle que j'ai soulignée précédemment suffira
  probablement pour de nombreux cas.  Néammoins, je pense que la
  situation suivante montrera une configuration plus avancée qui
  éclaircira certains points d'ombre.  S'il vous reste des questions
  après ce que je viens de décrire, ou simplement que l'adaptabilité des
  serveurs mandataires et des pare-feux vous intéresse, lisez encore.


  1122..11..  UUnn ggrraanndd rréésseeaauu aavveecc ssééccuurriittéé rreennffoorrccééee

  Disons, par exemple, que vous êtes le gourou de la secte de la 23ème
  Cabale de la Discorde de Milwaukee.  Vous souhaitez mettre votre site
  en réseau.  Vous avez cinquante ordinateurs et un sous-réseau de
  trente-deux adresses IP (sur cinq bits).  Vous avez différents niveaux
  d'accès parce que vous dites à vos disciples différentes choses en
  fonction de leur niveau.  C'est pourquoi vous devez protéger certaines
  parties du réseau du reste.

  (NdT : Le traducteur a conservé la 23ème Cabale de la Discorde de
  Milwaukee, issue du texte initial, contrairement à ce que contiennent
  les nouvelles versions (millisha : version militarisée) qui serait
  moins explicite du principe pour un public francophone).

  Les niveaux sont les suivants :

  1. Le niveau extérieur.  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 extérieur.
     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 réel.  Dans ce niveau sont
     stockées toutes les informations sur la manière dont la secte des
     Discordiens prendra le pouvoir sur le monde, à l'aide d'un plan
     déviationniste, mais humoristique, impliquant PetitMou, HAL, R2D2,
     Nounours et cinq cents cristaux, tous marqués "80585,9999999997"
     par erreur.


  1122..11..11..  LLaa ccoonnffiigguurraattiioonn dduu rréésseeaauu

  Les numéros IP sont arrangés ainsi :


  ·  l'adresse 192.168.2.255 est l'adresse de diffusion, et n'est pas
     disponible ;

  ·  23 des 32 adresses IP sont allouées à 23 machines qui seront
     accessibles depuis InterNet ;

  ·  Une adresse IP supplémentaire va à une machine Linux sur ce
     réseau ;

  ·  Une autre va à une autre machine Linux de ce réseau ;

  ·  2 numéros IP vont au routeur ;

  ·  4 sont laissées libres, mais recoivent les noms de domaine paul,
     ringo, george et john, juste pour compliquer un peu les choses ;

  ·  Les réseaux protégés ont tous deux des adresses 192.168.2.xxx.

  Puis, deux réseaux séparés sont construits, chacun dans une pièce
  différente.  Ils sont routés par Ethernet infrarouge pour les rendre
  complètement invisibles de la pièce extérieure.  Par chance,
  l'Ethernet infrarouge fonctionne tout à fait comme l'Ethernet normal,
  donc il nous suffit de les considérer comme normaux.

  Ces réseaux sont connectés chacun à sa machine Linux avec une adresse
  IP supplémentaire.

  Un serveur de fichiers relie les deux réseaux protégés.  C'est parce
  que les plans pour prendre le pouvoir sur le monde prennent en compte
  certains des sages les plus élevés.  Le serveur de fichiers a les
  adresses 192.168.2.17 pour le réseau des sages et 192.168.2.23 pour le
  réseau des adeptes.  Il doit avoir des adresses IP différentes, car il
  doit avoir deux cartes Ethernet différentes.  La transmission IP y est
  désactivée.

  La transmission IP est aussi désactivée sur les deux machines Linux.
  Le routeur ne transmettra pas les paquets destinés à 192.168.2.xxx
  sauf si on lui demande explicitement de le faire, donc InterNet ne
  pourra pas entrer.  La raison de la désactivation de la transmission
  IP ici est d'empêcher les paquets du réseau des sages d'atteindre le
  réseau des adeptes, et vice versa.

  Le serveur NFS peut aussi être configuré pour présenter différents
  fichiers aux différents réseaux.  Cela peut devenir pratique, et assez
  astucieux d'utiliser les liens symboliques pour partager les fichiers
  communs.  Cette configuration associée à une autre carte Ethernet peut
  ainsi permettre l'usage d'un seul serveur de fichiers pour les trois
  réseaux.


  1122..11..22..  LLaa ccoonnffiigguurraattiioonn dduu bbaassttiioonn

  Maintenant, puisque les trois niveaux doivent être capables de piloter
  le réseau pour leurs propres besoins déviationnistes, tous les trois
  ont besoin d'un accès InterNet.  Le réseau extérieur est connecté
  directement à celui-ci, donc nous n'avons pas à nous préoccuper d'un
  serveur mandataire ici.  Les réseaux des sages et des adeptes sont
  derrière des pare-feux, il est donc nécessaire de leur configurer des
  serveurs mandataires.

  Les deux réseaux seront configurés de manière similaire.  Tous deux
  ont les mêmes adresses IP assignées.  Je vais ajouter quelques
  paramètres, afin de rendre les choses encore plus intéressantes :


  1. Personne ne peut utiliser le serveur de fichiers pour l'accès
     Internet.  Cela exposerait le serveur de fichiers aux virus et
     autres choses désagréables, et il est très important, donc il est
     derrière les limites ;

  2. Nous ne voulons pas donner aux sages l'accès au web.  Il sont
     encore en entraînement, et cette puissance de recherche
     d'informations peut se révéler 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'accès pour toutes les machines tentant
  d'accéder au port 80, le port http.  Cela laisse l'accès à tous les
  autres services, et interdit juste l'accès Web.

  Ensuite, les deux fichiers auront :


          permit 192.168.2.0 255.255.255.0



  pour permettre à tous les ordinateurs du réseau 192.168.2.xxx
  d'utiliser ce serveur mandataire sauf pour ceux à qui cela a déjà été
  interdit (i.e. le serveur de fichiers et l'accès Web pour le réseau
  des sages).


  Le fichier sockd.conf du réseau 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 réseau est isolé comme
  il faut, avec le niveau d'interaction approprié.  Chacun peut être
  heureux.  Maintenant, prenez le pouvoir sur le monde !


  1133..  SSiimmpplliiffiieerr ll''aaddmmiinniissttrraattiioonn

  Un certain nombre de paquetages peuvent rendre l'administration de
  votre pare-feu plus simple :


  ·  Webmin http://www.webmin.com/.

  [ Lister les URL ICI ]


  1144..  OOuuttrreeppaasssseerr uunn ppaarree--ffeeuu mmaannddaattaaiirree

  Juste pour vous gâcher la journée et vous maintenir dans l'esprit de
  sécurité, je vais décrire combien il est facile d'outrepasser un pare-
  feu mandataire.

  Imaginons que vous ayez réalisé tout ce qui se trouve dans le présent
  document et que vous disposiez d'un réseau et d'un serveur très
  sécurisés.  Vous disposez d'une zone démilitarisée, personne ne peut
  entrer dans votre réseau et vous tracez chaque connexion réalisée vers
  le monde extérieur.  Vous obligez tous vos utilisateurs à passer par
  un mandataire et le seul service que vous autorisiez directement vers
  l'extérieur 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 réseau.  Un bon choix pourrait être une machine personnelle
  connectée à Internet par un modem-câble.

  Demandez trois adresses IP à votre FAI.  De nombreuses entreprises en
  fournissent jusqu'à trois.

  Sur cette machine, vous devez installer la partie client d'un réseau
  privé virtuel (VPN).  Cherchez sur http://sunsite.auc.dk/vpnd/.

  Maintenant, configurez le côté 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 inutilisée
  (obtenue de votre FAI) sur son port réseau local.

  Finalement, sur un poste du réseau privé, changez la passerelle par
  défaut afin qu'elle pointe sur le serveur du VPN et ajoutez la
  troisième adresse IP sur son port réseau local.

  Maintenant, depuis ce poste, vous pouvez aller n'importe où.  La seule
  chose que l'administrateur voie est une recherche DNS particulièrement
  longue.

  Maintenant, prenez le pouvoir sur le monde !



























































  Framebuffer HOWTO
  Alex Buell,  <mailto:alex.buell@tahallah.demon.co.uk>,
  traduit par François Romieu,  <romieu@ensta.fr>
  v1.2, 22 Juillet 1999

  Ce document décrit l'emploi des périphériques d'accès à la mémoire
  vidéo avec diverses configurations matérielles munies de Linux. La
  gestion de plusieurs écrans est également traitée.
  ______________________________________________________________________

  Table des matières























































  1. Contributions

  2. Qu'est-ce qu'un tampon de mémoire vidéo ?

  3. Quels avantages présente le tampon de mémoire vidéo ?

  4. Utilisation du tampon de mémoire vidéo sur architecture Intel

     4.1 Vesafb, quès 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 spécifications VESA 2.0 ?
     5.5 Vesafb est-il modularisable ?
     5.6 Comment puis-je modifier le curseur ?

  6. Le pilote de mémoire vidéo sur les Atari m68k

     6.1 Quels sont les modes disponibles sur les machines Atari m68k ?
     6.2 Sous-options supplémentaires 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 mémoire vidéo avec les Amiga

     7.1 Quels sont les modes disponibles sur les machines Amiga ?
     7.2 Sous options supplémentaires sur les machines Amiga m68k
     7.3 Cartes d'extension graphiques gérées sur Amiga

  8. Le pilote de mémoire vidéo sur les Macintosh m68k

  9. Le pilote de mémoire vidéo sur les PowerPC

  10. Le pilote de mémoire vidéo sur les Alpha

     10.1 Modes disponibles
     10.2 Cartes graphiques gérées par le pilote de mémoire vidéo

  11. Le pilote de mémoire vidéo sur les SPARC

     11.1 Cartes graphiques gérées par le pilote de mémoire vidéo
     11.2 Configuration du gestionnaire de mémoire vidéo

  12. Le pilote de mémoire vidéo sur les MIPS

  13. Le pilote de mémoire vidéo 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 mémoire vidéo avec plusieurs écrans

     14.1 Introduction
     14.2 Retour
     14.3 Contributions
     14.4 Avertissements
     14.5 Propriété du document
     14.6 Matériel supporté
     14.7 Logiciels commerciaux
     14.8 Logiciels nécessaires
     14.9 Mise en route
        14.9.1 Déplacement d'une console
        14.9.2 "fbset" et le paramètrage du second moniteur
        14.9.3 X et le gestionnaire de mémoire vidéo
        14.9.4 Exécution du serveur X sur le second moniteur
     14.10 Résumé
     14.11 Remarques et problèmes
        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 paramètres d'affichage du pilote de mémoire vidéo

  18. Davantage d'informations ?



  ______________________________________________________________________

  11..  CCoonnttrriibbuuttiioonnss

  Merci aux personnes dont les noms suivent pour avoir aidé à
  l'amélioration 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 sûr l'auteur du code :

  ·  Martin Schaller - auteur du concept originel de périphérique
     d'accès à la mémoire vidéo.

  ·  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 cités.
     :o)

  22..  QQuu''eesstt--ccee qquu''uunn ttaammppoonn ddee mméémmooiirree vviiddééoo ??

  Un tampon de mémoire vidéo définit une abstraction logicielle d'accès
  aux périphériques vidéo. Il correspond à la mémoire d'affichage de
  certains contrôleurs graphiques et propose une interface unifiée aux
  logiciels qui n'ont alors plus à se soucier des détails de bas niveau
  relatifs au matériel [Extrait du fichier framebuffer.txt écrit par
  Geert Uytterhoeven's. Se reporter aux sources du noyau].


  33..  QQuueellss aavvaannttaaggeess pprréésseennttee llee ttaammppoonn ddee mméémmooiirree vviiddééoo ??


  Le logo de linux au démarrage !  Plus sérieusement, on dispose d'une
  interface indépendante de l'architecture matérielle. Les gestionnaires
  de console des machines de type Intel sont restés radicalement
  différents de ceux des autre plate-formes jusqu'à une phase de
  développement avancée des noyaux 2.1.x. Avec l'introduction dans le
  noyau 2.1.109 de cette interface, les choses se sont améliorées : la
  gestion des consoles sur PC s'est uniformisée, 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'accès à la mémoire vidéo.
  Peut-être quelqu'un finira-t-il par intégrer le code des versions
  2.1.x dans ces noyaux. Le portage version 0.9.x pour les machines m68k
  fai exception car il intègre 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 améliorations des 1.2.x.

  ·  2.1.107 - apparition du gestionnaire de mémoire vidéo sur PC ainsi
     que des nouveaux pilotes pour les consoles. Le défilement en
     arrière n'est pas encore disponible.

  ·  2.1.113 - ajout du défilement en arrière au pilote vgacon.

  ·  2.1.116 - ajout du défilement en arrière au pilote vesafb.

  ·  2.2.x - matroxfb et atyfb (cartes graphiques Matrox et ATI
     respectivement).

  Le gestionnaire de mémoire vidéo offre des possibilités intéressantes
  si on précise quelques options au noyau lors du démarrage. Certaines
  sont spécifiques à un type de carte donné.

  ·  video=xxx:off - désactive l'auto-détection d'un pilote

  ·  video=map:octal-number - associe des consoles virtuelles ( VC ) à
     un gestionnaire de mémoire vidéo

  ·  video=map:01 VC0 est associée à FB0, VC1 à FB1, VC2 à FB0, VC3 à
     FB1...

  ·  video=map:0132 VC0 est associée à FB0, VC1 à FB1, VC2 à FB3, VC4 à
     FB2, VC5 à FB0...

  La détection des gestionnaires de mémoire vidéo a lieu dans un ordre
  fixé au niveau du noyau. Vous pouvez l'altérer grâce à l'option
  video=xxx qui permet de forcer la détection de certains périphériques
  avant les autres.
  44..  UUttiilliissaattiioonn dduu ttaammppoonn ddee mméémmooiirree vviiddééoo ssuurr aarrcchhiitteeccttuurree IInntteell

  44..11..  VVeessaaffbb,, qquuèèss aaccccoo ??

  Vesafb est un gestionnaire de mémoire vidéo sur compatible PC dédié
  aux cartes cartes graphiques conformes aux spécifications VESA 2.0.
  Son fonctionnement est lié de près aux gestionnaires de mémoire vidéo
  génériques 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 linéaire. Par
  ce terme, on entend que tous les octets de la mémoire vidéo sont
  accessibles à un instant donné. Historiquement, les anciennes cartes
  vidéo ne rendaient la mémoire graphique disponible qu'au travers d'une
  fenêtre de 64 ko qui correspondait à la taille de la plus grande zone
  de mémoire contigüe gérable directement par le microprocesseur (d'où
  les limitations des cartes CGA/EGA).  Quelqu'un écrira peut-être un
  gestionnaire de périphériques vesafb12 pour ce type de cartes, mais il
  consommera une mémoire par ailleurs précieuse pour le noyau et ça
  restera de toute façon un sale bricolage. :o(

  Il existe cependant un moyen détourné d'accéder aux fonctionnalités
  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
  mémoire (par exemple entre 15 et 16 Mo) qui en interdit l'utilisation
  sur les systèmes munis de plus de 32 Mo de mémoire.  Rien de
  rédhibitoire si on dispose d'un BIOS permettant de ne pas affecter de
  mémoire entre 15 et 16 Mo ("Memory Hole") mais il m'a semblé
  comprendre que Linux n'aime pas ça. Si l'expérience 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>.


  44..22..  CCoommmmeenntt ffaaiirree ffoonnccttiioonnnneerr llee ggeessttiioonnnnaaiirree vveessaaffbb ??

  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'accélérer les copies entre la mémoire système et la carte
  graphique. Vous pouvez naturellement le mettre en marche une fois la
  console opérationnelle.  _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 disparaîtra sous peu. Sélectionnez plutôt "VGA Text
  Console".

  Vérifiez 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 stockées en mémoire mais rien n'y oblige et
  l'emploi de setfont du paquetage kbd-0.99 reste possible pour charger
  les fontes adéquates (reportez vous à la section relative aux fontes).

  Assurez vous que rien n'est modularisé. [J'ai des doutes quant aux
  possibilités de modularisation de l'ensemble - corrections bienvenues]

  Vous devrez ensuite créer les périphériques associés au gestionnaire
  de mémoire vidéo dans le répertoire /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 huitième si vous le souhaitez :

  ______________________________________________________________________
  # mknod /dev/fb7 c 29 224
  ______________________________________________________________________


  Recompilez votre noyau, modifiez l'/etc/lilo.conf de façon à ajouter
  le paramètre 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

  Redémarrez le noyau et essayez comme test d'entrer 0301 au prompt VGA.
  Vous devriez vous retrouver en 640x480 sur 256 couleurs avec un
  délicieux 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'' hexadécimal. Si LILO fournit
  directement l'argument au noyau, ceci n'est pas nécessaire.

  Une fois que tout marche convenablement, vous pouvez explorer les
  différents modes (voir plus bas) et une fois choisi celui qui vous
  convient, il sera temps de le fixer via le paramètre ``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 défilement vers
  l'arrière.  Vous devez le préciser au noyau : video=vesa:ypan ou
  video=vesa:ywrap.  Les deux font la même chose mais de façon un peu
  différente. 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
  spécifications. L'option n'est disponible qu'à partir du noyau
  2.1.116. Les noyaux précédents ne permettent pas le défilement vers
  l'arrière.


  55..  DDee qquueellss mmooddeess VVEESSAA ppuuiiss--jjee mmee sseerrvviirr ??

  Cela dépend de votre carte graphique,  en particulier de la quantité
  de mémoire dont elle dispose. A vous de voir quels sont les modes qui
  fonctionnent le mieux.

  La table suivante fournit les numéros 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 même 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 supplémentaires sont à la discrétion du fabricant puisque la
  spécification VESA 2.0 s'arrête au mode 0x31f. Il vous faudra sûrement
  tâtonner pour les trouver.


  55..11..  UUttiilliissaattiioonn ddeess ccaarrtteess ggrraapphhiiqquueess MMaattrrooxx

  Si vous disposez d'une carte Matrox, vous emploierez le pilote
  matroxfb au lieu de vesafb. Matroxfb gère les Mystique Millenium I, II
  ainsi que les G100 et G200. Il permet aussi d'avoir plusieurs cartes
  dans la même 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 procéder à 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'', sélectionnez :

  ·  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 simultanément, 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  # Nécessaire pour une réinitialisation 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 créer les périphériques associés au gestionnaire
  de mémoire vidéo dans le répertoire /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 huitième si vous le souhaitez :

  ______________________________________________________________________
  # mknod /dev/fb7 c 29 224
  ______________________________________________________________________


  C'est tout ! Si l'un d'entre vous se sert simultanément de plusieurs
  cartes, qu'il me contacte aussi vite que possible afin que je docu­
  mente davantage.


  55..22..  UUttiilliissaattiioonn ddeess ccaarrtteess ggrraapphhiiqquueess PPeerrmmeeddiiaa..

  Les cartes de type Permedia ne sont pas supportées par le pilote
  vesafb.  Heureusement, il existe un gestionnaire de mémoire vidéo
  spécifique aux cartes Permedia. En supposant que vous employez
  menuconfig pour paramétrer le noyau avant une compilation, exécutez
  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'', sélectionnez :

  ·  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  # Nécessaire pour une réinitialisation 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 opérera dans une résolution de 1024 par 768 à 75Hz avec les
  fontes SUN 12 par 22 (si vous les avez incluses). Ypan autorise le
  défilement vers l'arrière.  Vous pouvez employer un autre mode.

  Vous devrez ensuite créer les périphériques associés au gestionnaire
  de mémoire vidéo dans le répertoire /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 huitième si vous le souhaitez :

  ______________________________________________________________________
  # mknod /dev/fb7 c 29 224
  ______________________________________________________________________



  Pour davantage de renseignements concernant les fonctionnalités 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 désactiver le pilote.

  ·  mode:resolution pour fixer la résolution. 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 défaut, 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 mémoire vidéo l'autorise.

  ·  oldmem ne servira qu'aux propriétaires d'une CybervisionPPC.
     Ajoutez cette option si votre carte est munie de SGRAM Fujitsu, ce
     qui est le cas des CyberVisionPPC antérieures au 30/12/1999.

  ·  virtual (transitoire) est à employer si le noyau fixe lui-même les
     adresses d'accès sur les bus PCI.


  55..33..  UUttiilliissaattiioonn ddeess ccaarrtteess ggrraapphhiiqquueess AATTII

  Remarque : les informations qui suivent ne viennent pas de moi vu que
  je ne dispose pas d'une carte ATI pour les vérifier. Si je me trompe,
  n'hésitez pas à me corriger, à m'insulter ou à m'envoyer votre carte !
  8-)

  Les cartes ATI sont plus ou moins bien gérées par le pilote vesafb
  selon leur qualité intrinsèque. Heureusement, il existe un
  gestionnaire de mémoire vidéo spécifique aux cartes ATI. En supposant
  que vous employez menuconfig pour paramétrer le noyau avant une
  compilation, exécutez 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'', sélectionnez :

  ·  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  # Nécessaire pour une réinitialisation 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
  opérera dans une résolution de 1024 par 768.

  Vous devrez ensuite créer les périphériques associés au gestionnaire
  de mémoire vidéo dans le répertoire /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 huitième 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 désactive l'extinction de l'écran

  ·  noaccel désactive les routines d'accélération

  ·  vram:ULONG précise au pilote atyfb la quantité de mémoire vidéo
     disponible

  ·  pll:ULONG ?

  ·  mclk:ULONG ?

  ·  vmode:ULONG ?

  ·  cmode:ULONG - fixe le nombre de bits par pixel : 0, 8, 15, 16, 24
     ou 32




  55..44..  QQuueelllleess ccaarrtteess ggrraapphhiiqquueess ssee ccoonnffoorrmmeenntt aauuxx ssppéécciiffiiccaattiioonnss VVEESSAA
  22..00 ??

  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 télévision

  ·  Hercules Stingray 128/3D sans sortie pour la télévision - une mise
     à jour du BIOS est nécessaire (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 mères incluant un jeu de composants graphiques :

  ·  Trident Cyber9397

  ·  SiS 5598

  Les cartes qui ne fonctionnent pas :

  ·  TBA


  55..55..  VVeessaaffbb eesstt--iill mmoodduullaarriissaabbllee ??


  A ma connaissance, Vesafb ne peut pas être modularisé. Les
  développeurs de vesafb s'y attèleront peut-être un jour. De toute
  façon, 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 sûrement mieux le laisser dans le noyau, des fois que le
  démarrage se passe mal.



  55..66..  CCoommmmeenntt ppuuiiss--jjee mmooddiiffiieerr llee ccuurrsseeuurr ??

  [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 même
  occasion, contourner quelques problèmes matériels de cartes Trident
  défectueuses (cf. #define TRIDENT_GLITCH dans le fichier
  drivers/char/vga.c). Si vous activez l'option de génération logicielle
  du curseur ("Software generated cursor"), des nouveautés se
  présentent : un curseur rouge, un qui intervertisse la couleur de
  premier plan et celle du fond, une mise en relief du caractère actif
  qui laisse le curseur matériel visible ou non. Je n'ai sûrement pas
  pensé à tout.

  On contrôle l'allure du curseur via la séquence d'échappement

  <ESC>[?1;2;3c


  décrire à présent. Les paramètres absents prennent la valeur 0.

  Le premier paramètre correspond à la taille du curseur (0=défaut,
  1=transparent, 2=souligné, ..., 8=caractère plein). Ajoutez 16 pour
  rendre actif le curseur logiciel, 32 si la couleur de fond doit être
  systématiquement changée, 64 pour que les couleurs de premier plan et
  de fond soient distinctes.  La graisse est ignorée pour les deux
  derniers attributs.

  Le second paramètre indique quels sont les bits d'attributs à changer
  (un simple ou exclusif). Sur un écran VGA standard, les quatre bits de
  poids fort précisent 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 troisième paramètre 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 sélection 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'


  66..  LLee ppiilloottee ddee mméémmooiirree vviiddééoo ssuurr lleess AAttaarrii mm6688kk

  Cette partie décrit les options offertes par le pilote de mémoire
  vidéo sur les machines Atari m68k.


  66..11..  QQuueellss ssoonntt lleess mmooddeess ddiissppoonniibblleess ssuurr lleess mmaacchhiinneess AAttaarrii mm6688kk ??


  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 employés sur les modèles TT
  tandis que vga2, vga4, vga15, vga256, falh3 et falh16 ne servent que
  sur le Falcon.  Lorsqu'une option video=xxx est donnée au noyau, en
  l'absence toute sous-option, le noyau teste les modes vidéo dans
  l'ordre suivant jusqu'à ce qu'il en trouve un adapté au matériel :

  ·  ttmid

  ·  tthigh

  ·  vga16

  ·  sthigh

  ·  stmid

     Vous pouvez préciser le mode à employer pour éviter l'auto-
     détection.  Par exemple, video=vga16 procure un écran en 640 par
     480 avec une profondeur de 4 bits.


  66..22..  SSoouuss--ooppttiioonnss ssuupppplléémmeennttaaiirreess ssuurr lleess mmaacchhiinneess AAttaarrii mm6688kk

  Options supplémentaires disponibles avec le paramètre 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 utilisée par défaut si la dimension verticale de l'écran
     est inférieure à 400 pixels sans quoi la fonte VGA8x16 est
     employée.

  ·  internal - très intéressant. Se reporter à la section suivante.

  ·  external - idem.

  ·  monitorcap - description des modes multisync disponibles.  PROSCRIT
     pour les moniteurs à fréquence fixe.


  66..33..  SSoouuss--ooppttiioonn ""iinntteerrnnaall"" ssuurr lleess mmaacchhiinneess AAttaarrii mm6688kk

  Syntaxe : internal:(xres);(yres)[;(xres_max);(yres_max);(offset)]

  L'option indique les fonctionnalités ajoutées par certains
  périphériques vidéo tels les modes d'OverScan. (xres) et (yres)
  fournissent les dimensions étendues de l'écran.  Si vos modes
  d'OverScan nécessitent une bordure noire, vous devrez expliciter les
  trois derniers arguments de la sous-option internal:.  (xres_max)
  correspond à la plus grande dimension de ligne acceptée par le
  matériel tandis que (yres_max) donne le nombre maximal de lignes et
  (offset) le décalage en octets entre la partie visible de la mémoire
  vidéo et son emplacement physique.

  Les matériel vidéo étendu requiert souvent une activation qui fait
  appel aux options "switches=*". [L'auteur apprécierait de recevoir des
  informations supplémentaires à ce sujet. La documentation m68k du
  noyau manque de clarté sur ce sujet et l'auteur ne possède pas
  d'Atari ! Des exemples seront également les bienvenus.]


  66..44..  SSoouuss--ooppttiioonn ""eexxtteerrnnaall"" ssuurr lleess mmaacchhiinneess AAttaarrii mm6688kk

  Syntaxe :
  external:(xres);(yres);(depth);(org);(scrmem)[;(scrlen)[;(vgabase)[;(colw)[;(coltype)[;(xres_virtual)]]]]]

  On rentre dans le compliqué. Le présent document essaye d'être aussi
  clair que possible mais l'auteur n'a rien contre une relecture afin
  d'être sûr qu'il n'a rien loos^H^Hupé.

  Cette sous-option indique que vous disposez de périphériques vidéo
  externes (vraisemblablement une carte vidéo) et indique comment Linux
  doit l'employer.  Normalement, le noyau se limite à ce qu'il peut
  apprendre des périphériques vidéo internes. Vous devez donc lui
  fournir tous les paramètres nécessaires afin qu'il soit en mesure de
  gérer des périphériques externes. Il y a deux limitations : vous
  basculerez dans le mode adéquat avant l'initialisation et une fois
  celle-ci effectuée, vous ne pourrez pas changer de mode.

  Les trois premiers paramètres sont évidents. Ils correspondent aux
  dimensions de la zone d'affichage : hauteur et largeur en pixel
  suivies de la profondeur.  Le paramètre de profondeur servant
  d'exposant au nombre 2 donne le nombre de couleurs. Par exemple, pour
  un affichage en 256 couleurs, vous préciserez un paramètre de 8. Le
  paramètre dépend de l'adaptateur graphique externe bien que vous soyez
  de toute façon limité par le matériel.

  Vous devez ensuite décrire au noyau l'organisation de la mémoire vidéo
  via le paramètre (org).

  ·  n - plans disposés normalement, les uns à la suite des autres.

  ·  i - plans entrelacés, c'est à dire 16 bits du premier plan, puis du
     suivant etc. Seuls les modes vidéo natifs d'Atari utilisent ça et
     aucune carte vidéo ne le gère.

  ·  p - pixels regroupés. Les bits constitutifs des différents plans
     d'un même pixel se suivent. Ce mode est le plus courant en 256
     couleurs.

  ·  t - couleurs vraies. Il s'agit du mode précédent en l'absence de
     toute table de correspondance des couleurs. Ces modes sont
     généralement sur 24 bits et procurent quelque 16,8 millions de
     couleurs.

  _A _c_o_t_é _d_e _ç_a, le paramètre (org) a une signification bien différente
  pour les modes monochromes.

  ·  n - couleurs usuelles, c'est à dire 0 pour le blanc et 1 pour le
     noir ;

  ·  i - couleurs inversées, c'est à dire 0 pour le noir et 1 pour le
     blanc.

  L'élément suivant ayant trait au périphérique vidéo fixe l'adresse de
  base de la mémoire vidéo. Il est donné par le paramètre (scrmem) sous
  forme hexadécimale (préfixé par 0x). Vous devriez trouver cette
  information dans la documentation fournie avec le périphérique.

  Le paramètre suivant, (scrlen), fournit au noyau la taille de la zone
  de mémoire vidéo. S'il est absent, il est calculé à partir des valeurs
  de (xres), (yres) et (depth). En bref, il ne sert à rien de préciser
  une valeur. Si vous donnez à sa suite le paramètre (vgabase), laissez
  le champ vide en rentrant deux point-virgules. Autrement, oubliez le.

  Le paramètre (vgabase) est optionnel. En son absence, le noyau ne
  pourra lire ni écrire le moindre des registres de couleur du
  périphérique et il vous faudra donc installer les couleurs appropriées
  avant le démarrage de Linux.  Si la carte est compatible VGA, vous
  pouvez donner au noyau l'adresse où se trouvent les registres vidéo de
  façon à ce qu'il modifie lui-même les tables des couleurs. Vous
  trouverez cette information dans la documentation fournie avec le
  périphérique. Afin d'être _c_l_a_i_r, (vgabase) est une adresse de _b_a_s_e,
  donc alignée sur un multiple de 4k. Pour l'accès en lecture ou en
  écriture aux registres, le noyau utilise une plage d'adresses
  comprises entre (vgabase) + 0x3c7 et  (vgabase) + 0x3c9. La valeur est
  donnée en hexadécimal et doit être préfixée par 0x (tout comme
  (scrmem)).

  (colw) ne sert que si (vgabase) est spécifié. 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 défaut est de 6 bits mais
  il est courant d'en spécifier 8.

  (coltype) s'emploie en conjonction avec (vgabase). Il précise aux
  noyau le type des registres de la carte graphique. Actuellement, deux
  modèles sont gérés : vga et mv300. Par défaut, vga est employé.

  (xres_virtual) n'est nécessaire qu'avec les cartes ProMST/ET4000 pour
  lesquelles la longueur physique des lignes diffère de leur taille
  visible.  Avec une ProMST, on donnera la valeur 2048 tandis que pour
  l'ET4000 cela dépendra de l'initialisation de la carte vidéo.


  77..  LLee ppiilloottee ddee mméémmooiirree vviiddééoo aavveecc lleess AAmmiiggaa


  Cette partie décrit les options offertes sur les Amiga, options
  voisines de celles de l'Atari m68k.


  77..11..  QQuueellss ssoonntt lleess mmooddeess ddiissppoonniibblleess ssuurr lleess mmaacchhiinneess AAmmiiggaa ??

  Ça dépend du composant employé dans votre Amiga. Il y en a
  essentiellement trois : OCS, ECS et AGA. Tous on recours au pilote de
  mémoire vidéo.

  ·  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


  77..22..  SSoouuss ooppttiioonnss ssuupppplléémmeennttaaiirreess ssuurr lleess mmaacchhiinneess AAmmiiggaa mm6688kk

  Elles sont voisines de celles de l'Atari m68k :

  ·  depth - précise le nombre de bits par pixel.

  ·  inverse - même chose que sur les Atari.

  ·  font - même chose que sur les Atari, mais la fonte PEARL8x8
     remplace la fonte VGA8x8 si la largeur de la zone d'affichage est
     inférieure à 400 pixels.

  ·  monitorcap - description des modes multisync disponibles. PROSCRIT
     pour les moniteurs à fréquence fixe.


  77..33..  CCaarrtteess dd''eexxtteennssiioonn ggrraapphhiiqquueess ggéérrééeess ssuurr AAmmiiggaa


  ·  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)


  88..  LLee ppiilloottee ddee mméémmooiirree vviiddééoo ssuurr lleess MMaacciinnttoosshh mm6688kk

  La version courante du gestionnaire de mémoire vidéo ne gère 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 gère les options de la forme :

  video=macfb:<font>:<inverse>


  Les fontes  VGA8x8, VGA8x16, 6x11, etc... sont disponibles. L'option
  inverse permet bien sûr d'inverser la vidéo.




  99..  LLee ppiilloottee ddee mméémmooiirree vviiddééoo ssuurr lleess PPoowweerrPPCC

  L'auteur aimerait recevoir des informations relatives au gestionnaire
  de mémoire vidéo sur ces machines.


  1100..  LLee ppiilloottee ddee mméémmooiirree vviiddééoo ssuurr lleess AAllpphhaa

  1100..11..  MMooddeess ddiissppoonniibblleess


  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.


  1100..22..  CCaarrtteess ggrraapphhiiqquueess ggéérrééeess ppaarr llee ppiilloottee ddee mméémmooiirree vviiddééoo

  La carte graphique suivante a été testée avec succès :

  ·  DEC TGA PCI (DEC21030) - 640x480 à 8 bits ou versions 24/32 bits


  1111..  LLee ppiilloottee ddee mméémmooiirree vviiddééoo ssuurr lleess SSPPAARRCC

  1111..11..  CCaarrtteess ggrraapphhiiqquueess ggéérrééeess ppaarr llee ppiilloottee ddee mméémmooiirree vviiddééoo


  ·  MG1/MG2 - version SBus ou intégrée (Sun3) - au maximum 1600x1280
     monochrome (BWtwo)

  ·  CGthree - semblable aux MG1/MG2 mais offrant la couleur -
     résolution 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 accélératrice 3D 24 bits - résolution
     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 accélératrice 8/24 bits pour Sparc64 sur bus PCI

  Une option de la PROM permet l'envoi des caractères d'affichage à
  l'écran ou sur une console série.  Jetez un oeil à la FAQ du Frame
  Buffer sur Sparc : <http://c3-a.snvl1.sfba.home.com/Framebuffer.html>.


  1111..22..  CCoonnffiigguurraattiioonn dduu ggeessttiioonnnnaaiirree ddee mméémmooiirree vviiddééoo


  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 spécifier au noyau le pilote à employer. Par défaut,
  fbcon est essayé en premier au démarrage. Si promcon n'a pas été
  sélectionné, dummycon est activé pendant l'initialisation. Une fois
  les bus initialisés, si fbcon est compilé, le noyau recherche les
  périphériques précédents et se sert de fbcon. En l'absence de
  gestionnaires de mémoire vidéo, le noyau a recours à promcon.

  Voici les options du noyau :

  video=sbus:options


  options inclut les éléments suivants, séparés par une virgule :

                  nomargins       marge nulle;
                  margins=12x24   marge de 12 par 24 (calculé par défaut en
                  fonction de la résolution);
                  off             inhibition de la détection des pilotes de
                  mémoire vidéo SBus/UPA;
                  font=SUN12x22   emploi d'une fonte particulière.



  Au démarrage, un paramétrage de la forme

   video=sbus:nomargins,font=SUN12x22


  en mode texte, rapide, avec une résolution 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 (désactivez l'option
  fontwidth != 8).  Le pilote de mémoire vidéo accéléré gère n'importe
  quelle fonte dont la largeur est comprise entre 1 et 16 pixels tandis
  que le pilote de base ne gère que les fontes larges de 4, 8, 12 ou 16
  pixels.  Un paquetage récent des consoletools est recommandé.


  1122..  LLee ppiilloottee ddee mméémmooiirree vviiddééoo ssuurr lleess MMIIPPSS


  Il n'est pas besoin de modifier quoi que ce soit avec ce type de
  machines.  Tout est géré automatiquement. En particulier, les Indys
  sont câblés de façon à offrir une console 160x64. Une réécriture du
  code de gestion de la console pour les Indys étant en cours, on
  gardera un oeil sur cette section.


  1133..  LLee ppiilloottee ddee mméémmooiirree vviiddééoo ssuurr lleess AARRMM



  1133..11..  NNeettwwiinnddeerrss

  Pour les Netwinders (qui reposent sur le processeur RISC ARM SA110 au
  charme si délicieusement british), il existe deux versions du
  gestionnaire de mémoire vidéo 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. Néanmoins,
  en 2.0.x, la résolution et la profondeur sont codées en dur (beuh...).
  Heureusement, la version 2.2.x est plus souple, du moins le sera une
  fois les pilotes davantage stabilisés. 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
  intègrent un composant VGA mais il ne s'est malheureusement jusqu'ici
  trouvé personne pour porter vgafb. [Je m'y attélerais si quelqu'un me
  fournissait un Netwinder avec lequel jouer]
  1133..22..  AArrcchhiimmeeddeess AAccoorrnn

  Les Acorns offrent un pilote de mémoire vidéo depuis les temps anciens
  des noyaux 1.9.x. Cependant, le gestionnaire Acornfb des noyaux 2.2.x
  est complètement nouveau puisque l'interface d'accès à la mémoire
  vidéo a été modifiée au cours du développement des noyaux 2.1.x (qui
  devinrent naturellement les 2.2.x). Comme précédemment, il n'est guère
  difficile d'activer le pilote et de configurer la profondeur et la
  résolution.


  1133..33..  AAuuttrreess aarrcchhiitteeccttuurreess àà bbaassee dd''AARRMM ((SSAA 77111100ss eett vvaarriiaanntteess))

  A ma surprise, même le Psion 5 et le Geofox disposent d'un pilote de
  mémoire vidéo ! On m'a dit que le manchot passait d'ailleurs plutôt
  bien. S'il vous plaît, donnez moi un Psion 5 !


  1144..  GGeessttiioonn ddee llaa mméémmooiirree vviiddééoo aavveecc pplluussiieeuurrss ééccrraannss

  Cette partie du document a été fournie gracieusement par Frederick A.
  Niles qui conserve tous ses droits sur les informations données.


  1144..11..  IInnttrroodduuccttiioonn

  Les quelques pages qui suivent sont censées permettre une première
  prise en main des configurations à deux écrans sous Linux. Bien que le
  processus se déroule 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'intérêt en est que l'on croise de temps à autre des
  personnes se débarrassant de vieux moniteurs de 19 ou 20 pouces à
  fréquence fixe car ils ne peuvent plus s'en servir. On peut ainsi
  démarrer avec un petit moniteur multisync et disposer de X sur un
  moniteur de grandes dimensions.

  Comme il s'agit d'un domaine en plein développement, l'information
  évolue rapidement. Le contenu de ce document pourrait très bien être
  dépassé, voire complètement faux, lorsque vous le lirez.

  ** ATTENTION ** Ce texte a été rédigé 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.


  1144..22..  RReettoouurr

  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'hésitez donc pas à me contacter à l'adresse
  suivante : Frederick.A.Niles@gsfc.nasa.gov.


  1144..33..  CCoonnttrriibbuuttiioonnss

  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)

  1144..44..  AAvveerrttiisssseemmeennttss

  L'auteur de ce document dégage toute responsabilité quant à son
  contenu.  Vous employez les notions, exemples et tout ce qui figure
  ici à vos risques et périls. S'agissant d'une nouvelle version de ce
  document, des informations erronées ou inadéquates peuvent très bien
  entraîner la dégradation de votre matériel. Faites y attention et,
  bien que ce soit hautement improbable, je me décharge de toute
  responsabilité à cet égard.


  1144..55..  PPrroopprriiééttéé dduu ddooccuummeenntt

  Copyright (c) 1999 Frederick Niles

  La distribution de ce document doit se conformer aux termes de la
  licence LDP tels que définis à l'adresse :
  <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.



  1144..66..  MMaattéérriieell ssuuppppoorrttéé

  La plupart des cartes vidéo supposent qu'elles assument seules cette
  fonction au sein du système. 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 précédente.


  1144..77..  LLooggiicciieellss ccoommmmeerrcciiaauuxx

  Ce Mini-HOWTO traite avant tout de logiciel libre. Certains serveurs X
  commerciaux sont néanmoins capables de gérer plusieurs moniteurs tels
  le serveur Metro-X de Metro Link (www.metrolink.com) et Accelerated-X
  de Xi Graphics (www.xig.com).


  1144..88..  LLooggiicciieellss nnéécceessssaaiirreess

  Les patches et programmes suivants sont nécessaires :

  ·  "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 mémoire vidéo.
     Disponible en standard avec la version 3.3.1 de la XFree86.



  1144..99..  MMiissee eenn rroouuttee

  Commencez par patcher votre version du noyau avec le patche "fbaddon".
  Ensuite, vous configurerez le noyau et activerez la gestion de la
  mémoire vidéo. Si vous disposez de cartes Matrox, incluez le pilote
  d'accélération unifié Matrox. Excluez le gestionnaire de mémoire vidéo
  VESA. Activez bien sûr la gestion de plusieurs adaptateurs, recompilez
  le noyau et réinitialisez le système.

  A présent, installez l'utilitaire "fbset" et lisez attentivement la
  documentation relative à son paramètrage. La mise en place d'un
  fichier "/etc/fb.modes" est vivement recommandée une fois que vous
  vous serez décidé sur une configuration. Le paquetage fbset comprend
  un script Perl de conversion du fichier XF86Config en paramètres 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 mémoire
  vidéo 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
  opérations de configuration en forment un sous-ensemble.


  1144..99..11..  DDééppllaacceemmeenntt dd''uunnee ccoonnssoollee

  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
  numéro 6 au second gestionnaire de mémoire vidéo. Ctrl-Alt-F6 vous
  basculera dans cette console qui s'affichera sur le second moniteur.


  1144..99..22..  ""ffbbsseett"" eett llee ppaarraammèèttrraaggee dduu sseeccoonndd mmoonniitteeuurr

  La mise en place des paramètres "fbset" doit se cantonner au moniteur
  avec lequel "fbset" est employé. Faites donc attention à bien employer
  l'option "-fb" avec le second moniteur. Plus précisément, si vous ne
  voulez rien faire d'autre qu'accorder la résolution verticale
  virtuelle avec la résolution verticale réelle : "fbset -fb /dev/fb1
  -vyres 600" (par exemple).  L'affichage en mode texte en est
  sérieusement ralenti mais sans cela X reste vraiment hideux.


  1144..99..33..  XX eett llee ggeessttiioonnnnaaiirree ddee mméémmooiirree vviiddééoo

  Le fichier framebuffer.txt explique bien mieux que je ne puis le faire
  mais voici les deux points essentiels :

  ·  vérifiez que le lien "X" pointe bien vers "XF86_FBDev",

  ·  ajoutez une section Monitor à votre fichier XF86Config pour le
     gestionnaire de mémoire vidéo.

     Par exemple :










     # Serveur X s'appuyant sur le gestionnaire de mémoire vidéo.

     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 mémoire vidéo Matrox.


  1144..99..44..  EExxééccuuttiioonn dduu sseerrvveeuurr XX ssuurr llee sseeccoonndd mmoonniitteeuurr

  Positionnez la variable d'environnement FRAMEBUFFER sur le second
  périphérique de mémoire vidéo : "export FRAMEBUFFER=/dev/fb1" ou :
  "setenv FRAMEBUFFER /dev/fb1" X doit être lancé avec des paramètres
  lui spécifiant à la fois la profondeur souhaitée au niveau des
  couleurs et un numéro correspondant à la console virtuelle employée.
  Par exemple : "startx -- :0 -bpp 16 vt06".  Le serveur X en 16 bits
  par pixel d'identifiant ":0" est attaché à la console virtuelle numéro
  6. Utilisez ":1" au lancement d'un autre serveur X en le liant à une
  console dépendant de l'autre gestionnaire de mémoire vidéo et vous
  disposerez de deux serveurs X fonctionnant simultanément.


  1144..1100..  RRééssuumméé

  Les étapes de mise en place d'un serveur X sur un second moniteur
  peuvent être ainsi résumées :

  ·  se procurer le patch du noyau, fbset et con2fb ;

  ·  appliquer le patch, configurer le noyau, recompiler et
     réinitialiser ;

  ·  ajouter une section XF86_FBDev au fichier XF86Config et fixer le
     lien de X.

     A chaque redémarrage :

  ·  créer une console : "con2fb /dev/fb1 /dev/tty6" ;


  ·  paramétrer : "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 tâches. Un script ne
     conviendrait pas puisqu'on a besoin de déterminer le numéro 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
  près mais ils aident, avec les sauts de ligne, à en faciliter la
  lecture. Je fournis le numéro du pilote de mémoire vidéo 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.


  1144..1111..  RReemmaarrqquueess eett pprroobbllèèmmeess


  ·  fbset et startx _D_O_I_V_E_N_T être invoqués depuis une même console qui
     sera contrôlée par le pilote de mémoire vidéo. L'automatisation au
     moyen de scripts en est diminuée d'autant.

  ·  la version 4.0 de XFree86 gérera 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 mémoire vidéo non-actif conserve la dernière image
     sans la mettre à jour.

  ·  L'écran qui n'est pas sélectionné ne conserve pas toujours son état
     durant ses périodes d'inactivité (mais en général il le fait).
     Geert Uytterhoeven, qui assure l'évolution du pilote de mémoire
     vidéo, et Linus Torvalds sont en désaccord sur les changements pour
     la gestion des adaptateurs multiples liés aux consoles (i.e.
     fbaddon) et ceux ci pourraient très bien ne jamais se retrouver
     dans l'arborescence officielle du noyau (cette information a une
     forte composante de type bruit de couloir).

  ·  Si vous exécutez X de n'importe où, votre machine peut se retrouver
     dans un état passablement dégradé qui mélange les évènements de la
     souris et ceux du clavier.

  ·  Le fichier framebuffer.txt dans l'arborescence du noyau mentionne
     la possibilité de modifier les paramètres Modeline du XF86Config
     alors que X fonctionne. Le gestionnaire de mémoire vidéo Matrox
     semble obliger le serveur X à tous les ignorer. On ne dispose donc
     que d'un paramètrage, celui qui est employé lors du basculement
     depuis le mode texte.

  ·  XF86_FBDev ne dispose pas d'accélération. Des patches pour les
     cartes Matrox existent : <http://www.in-
     berlin.de/User/kraxel/xfree86/>


  1144..1111..11..  FFoonnccttiioonnnneemmeenntt aavveecc xxddmm

  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 démarrer le serveur X
  depuis la console gérée par le pilote de mémoire vidéo interdit cette
  solution. Si quelqu'un a une idée, qu'il m'en fasse part afin que je
  puisse l'ajouter.


  1144..1111..22..  LL''uuttiilliittaaiirree xx22xx

  x2x vous permet de passer d'un serveur X à l'autre lorsque vous
  atteignez le bord d'un écran. Aux dernières 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'expériences réussies.


  1144..1111..33..  AAuuttrreess ccoommmmaannddeess uuttiilleess

  Il est bon de garder présente à 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" exécute un programme dans une console différente.

  ·  "tty" renvoie le nom de la console courante.


  1144..1111..44..  AAnnnneexxee AA.. SSccrriipptt ccvvttmmooddee..mm ppoouurr OOccttaavvee

  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");
  ______________________________________________________________________




  1144..1111..55..  AAnnnneexxee BB..  SSccrriipptt ""ccvvttffiillee"" eenn SShheellll BBoouurrnnee

  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
  ______________________________________________________________________


  1155..  GGeessttiioonn ddeess ffoonntteess

  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 télé-chargement et l'installation de kbd-0.99 réside en ce que vous
  pourrez charger les fontes internationales (dont l'Euro) dans votre
  console.  Je trouve très chic *en français dans le texte* d'avoir
  trois symboles sur mon clavier : le dollar, la livre et l'Euro.


  1166..  CCoommmmuuttaattiioonn ddee mmooddee

  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 complète sur son emploi.


  1166..11..  XX1111 eett vveessaaffbb ??

  Si votre version de XFree86 est antérieure à la 3.3.3.1, il est urgent
  de procéder à une mise à jour. Cette version comprend le pilote FBDev
  X pour les gestionnaires de mémoire vidéo. 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 télé-chargez les dernières
  sources du serveur X. [NdT : le recours à un miroir comme
  <ftp://ftp.lip6.fr/pub/X11> sera peut-être plus rapide]


  ·  Décompactez les sources.

  ·  Éditez le fichier xc/config/cf/xf86site.def, et décommentez le
     #define relatif à XF68FBDevServer.

  ·  Décommentez _t_o_u_t_e_s les références à FB_VISUAL_STATIC_DIRECTCOLOR.
     Elles ne servent plus à rien. Si vous partez des sources de XFree86
     3.3.3.1, sautez cette étape (la référence a été supprimée).

  ·  É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 références ayant trait à
  m68k : les architectures Intel sont supportées. 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é-compilées. Notez que ces sites n'ont rien d'officiel et que vous
  utiliserez leurs binaires à vos risques et périls.

  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 résolutions 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 exécuter XF86_FBDev avec l'option '-kb' afin de gérer
  correctement votre clavier. Sans XkbDisable, il vous faudra inclure
  les lignes suivantes dans votre .Xmodmap pour préciser les effets des
  touches. Le même résultat s'obtient en éditant son xkb si on le
  désire.  _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 sûrement nécessaires (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 problèmes liés à X11 devraient être
  résolus dans les prochaines versions en ce qui concerne les cartes
  vidéo supportées.


  1177..  vviiddééoo CCoonnvveerrssiioonn ddeess MMooddeelliinneess eenn ppaarraammèèttrreess dd''aaffffiicchhaaggee dduu
  ppiilloottee ddee mméémmooiirree

  Rien n'est plus simple si XFree86 (X11) est installé sur votre machine
  et que vous pouvez vous en servir normalement.

  Le pilote de mémoire vidéo requiert les champs suivants :

  ·  pixclock - horloge pixel en picosecondes

  ·  left_margin - durée entre la synchro et la zone affichée

  ·  right_margin - durée entre la zone affichée et la synchro

  ·  upper_margin - durée entre la synchro et la zone affichée


  ·  lower_margin - durée entre la zone affichée 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 nécessaires 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 paramètre pixclock. XFree86 l'exprime en MHz et le
  pilote de mémoire vidéo en picosecondes (pourquoi? mystère). On divise
  donc un million par DCF soit : 1,000,000 / 110.0 = 9090.9091


  Pour les durées 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 durées 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 passées au gestionnaire de mémoire vidéo.
  Dans le cas du pilote matroxfb :

  video=matrox:xres:<>,yres:<>,depth:<>,left:<>,right:<>,hslen:<>,upper:<>,lower:<>,vslen:<>



  J'ai donc inséré 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 nécessaire que
  si celui par défaut ne vous convient pas. Il se fixe de la même façon
  ainsi qu'il a été auparavant expliqué dans ce document.


  1188..  DDaavvaannttaaggee dd''iinnffoorrmmaattiioonnss ??

  Que ceux qui sont intéressés 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 français se trouve à
  l'adresse suivante :
  <http://www.freenix.org/unix/linux/HOWTO/mini/Vesafb.html>.









































  Le French-HOWTO : Linux & la langue française
  É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 matières

























































  1. Présentation

     1.1 Introduction
     1.2 Les français ne sont pas les seuls francophones !
     1.3 Attention

  2. Les problèmes

     2.1 Présentation
     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 caractères
     3.7 Unicode, iso-8859, latin
     3.8 UTC, GMT

  4. Réglage 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 défaut au démarrage
     4.5 Vieilles versions

  5. Réglage du clavier sous XFree

     5.1 Introduction
     5.2 Conseils
     5.3 Est-ce nécessaire ?
     5.4 «french» ou «fr» ?
     5.5 Table de correspondances
     5.6 Faire de ces modification les défaut au lancement de X
     5.7 Où trouver ces fichiers
     5.8 Autre méthodes

  6. Réglage 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 français
     6.5 Les variables
     6.6 Les caractères 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. Réglage 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



  ______________________________________________________________________

  11..  PPrréésseennttaattiioonn



  11..11..  IInnttrroodduuccttiioonn


  Ce document a été écrit pour aider à configurer un ordinateur doté du
  système d'exploitation Linux pour des utilisateurs francophones ; il y
  est expliqué par exemple comment configurer périphériques et
  applications afin de prendre en compte les particularités et les
  spécificités de notre langue...

  Toutefois, ce document ne traite pas de l'installation du système
  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
  apprêtez maintenant à mieux la configurer ; veuillez donc vous référer
  à d'autres HOWTOs pour l'installation.

  N'étant pas l'unique auteur de ce document, les personnes m'ayant
  données des conseils à rajouter sont explicitement citées.

  Les adresses électroniques de ces contribueurs ont été volontairement
  modifiées en remplaçant les «a enroulés» par des «à» afin d'éviter les
  publipostages très gênants.


  11..22..  LLeess ffrraannççaaiiss nnee ssoonntt ppaass lleess sseeuullss ffrraannccoopphhoonneess !!


  Pour chaque manipulation dépendant du pays concerné, quatres versions
  sont donc proposées : une canadienne française, une belge wallone, une
  française et une suisse romande.  Le Grand Duché du Luxembourg
  utilisant les conventions françaises, j'invite les lecteurs
  luxembourgeois à se reporter aux exemples français !

  Toutefois seuls les fichiers destinés aux français (table de clavier
  en mode console, X...) sont inclus, puisque la majorité des lecteurs
  seront certainement français et que seuls ces fichiers présentent des
  améliorations par rapport aux défauts.
  Envoyez-moi donc vos fichiers belges, canadiens, luxembourgeois ou
  suisses ; ils seront inclus avec plaisir s'ils se montrent plus utiles
  que ceux proposés par défaut !


  11..33..  AAtttteennttiioonn


  Nat Makarevitch nous recommande :

  ROOT : certaines manipulations recommandées par ce document ne peuvent
  être effectuées que sous un compte privilégié (root) ; la plus grande
  prudence est alors de rigueur car toute action inadéquate peut mettre
  en péril 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, grâce auquel l'utilisateur peut retrouver le nom complet
  (chemin de répertoires) 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 montés 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





  22..  LLeess pprroobbllèèmmeess



  22..11..  PPrréésseennttaattiioonn


  Le problème de tout utilisateur non-américain lors de l'installation
  de Linux est de lui faire comprendre que, justement, il n'est pas
  américain !

  Cela a des conséquences sur :


  ·  les caractères spéciaux que l'on utilise, accentués (É È À Ç) ou
     bien ligaturés ( Æ , voire «e dans l'o» qui vient à peine
     d'apparaître sous Linux en mode console ; j'espère bientôt
     présenter ici une solution simple pour en disposer sous X aussi !)

  ·  la correspondance entre la sérigraphie des cabochons (touches) sur
     lesquels vous appuyez et les codes que Linux renvoie, celui-ci
     supposant un clavier QWERTY américain par défaut

  ·  le format de page pris en charge par les programmes que vous
     utilisez pour imprimer, différent entre les États-Unis (14 x 8,5
     pouces pour du papier dit légal) 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 utilisée pour les messages d'erreur



  22..22..  SSoolluuttiioonnss


  Tout étant préconfiguré pour un anglophone nord-américain -bien que
  ceux-ci ne représentent pas la majorité de la population mondiale- ,
  il faut donc se faire reconnaître comme une «exception» par les
  différents 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 système très ouvert à des
  modifications de toute sorte et comme vous allez le découvrir au fil
  de ce document, il est assez simple d'obtenir un résultat très
  correct.


  22..33..  AAiiddee


  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'hésitez pas à contacter l'équipe de
  traduction des HOWTOs ; pour celà, adressez-vous à Éric Dumas (dumas à
  freenix.fr ou dumas à linux.eu.org) .


  33..  LLee vvooccaabbuullaaiirree :: ppeettiitt lleexxiiqquuee


  Tout d'abord, un mot sur le vocabulaire employé :


  33..11..  88 bbiittss


  Des caractères sont dits «8 bits» s'ils contiennent par exemple des
  accents ou des signes spéciaux (comme paragraphe), non inclus dans le
  standard ASCII 7 bits (sans accents ni caractères spéciaux) qui
  correspond aux 127 premiers caractères des 256.


  33..22..  TTaabbllee ddee ccllaavviieerr


  Une table de clavier est un fichier permettant de faire correspondre
  l'empreinte physique des cabochons (touches) du clavier au résultat
  obtenu sur l'écran de l'ordinateur.


  33..33..  ««HHoommee»»,, ««EEnndd»»,, ««PPaaggee UUpp»» eett ««PPaaggee DDoowwnn»»


  Les touches «Home», «End», «Page Up» et «Page Down» (dont les noms
  varient selon les claviers) sont les touches permettant respectivement
  d'aller en début/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 reçoit, se dit :
  «tient, c'est la touche End qu'on a pressé, donc le renvoie la chaîne
  associée, en l'occurence pour End «\e[4 » »

  Lorsque bash ou un autre programme reçoit cette chaîne... il ne la
  connaît pas !  Donc il faut lui dire dans le .inputrc que «\e[4 »
  signifie «aller à la fin de la ligne».


  33..44..  ««TToouucchheess mmoorrtteess»»


  Les touches mortes sont des touches qui ne produisent pas de
  caractères en elles-mêmes, mais qui modifient la façon dont la frappe
  suivante va être interprétée (par exemple, le tréma ou l'accent
  circonflexe sont en général 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 français, l'accent aigu (en AltGr de 1
     pour les français et en AltGr de ù pour les belges), l'accent grave
     (en AltGr de 7 pour les français & en AltGr de carré/cube pour les
     belges), le tréma et l'accent circonflexe (tous deux à côté du P)

  ·  pour les canadiens, les accent graves, circonflexes, les trémas et
     la cédille

  ·  pour les suisses, les accent aigus, graves, circonflexes, les
     trémas et la tilde


  33..55..  ««BBaacckkssppaaccee»» ,, ««DDeelleettee»»



  ·  BackSpace Touche placée en haut à droite du pavé principal, au
     dessus d' «Entrée», au cabochon marqué d'une flèche vers la gauche.

  ·  Delete Touche du pavé curseur au cabochon marqué «Suppr» ou «Del»,
     à gauche de «Fin».  Le pavé numérique 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 Caractère ASCII 0x08, ou control-h.

  ·  DEL Caractère ASCII 0x7F, ou control-?

  ·  ^D Caractère ASCII 0x04, ou control-d.

  Ceci dans le but d'effacer à gauche du curseur avec Backspace, à
  droite du curseur avec Delete.


  33..66..  PPoolliiccee ddee ccaarraaccttèèrreess


  Une police de caractères est une correspondance entre des codes
  informatiques ou nombres hexadécimaux et des caractères
  (alphanumériques...) 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
  hexadécimal «eb» correspond à «ë».

  La police de caractère est la somme des représentations graphiques des
  caractères d'un standard.


  33..77..  UUnniiccooddee,, iissoo--88885599,, llaattiinn


  L'unicode est l'un de ces standard, destiné à terme à remplacer les
  différentes évolutions de l'ASCII.

  L'ASCII codait ses caratères sur 7bits, rendant donc impossible
  d'incorporer des caractères accentués à la norme déja présente.

  Les normes iso-8859 latin et cp (pour les plus connues) vinrent
  pallier à cette déficience en encodant les caractères sur 8bits.  Mais
  plusieurs de ces normes étaient nécessaire du fait de l'impossibilité
  de faire tenir les caractères de toutes les langues du monde sur
  8bits.  La norme iso-8859-1 latin1, la plus utilisée, se destine par
  exemple au langues d'europe de l'ouest, du nord, d'amérique, la norme
  iso-8859-2 latin2 est prévue pour l'europe de l'est...

  L'unicode offre l'avantage de proposer les caractères nécessaires à
  toutes les langues du monde, mais reste encore peu utilisé ou
  implémenté.

  En effet, il est impossible de l'utiliser en pratique sous linux-
  console, la mémoire exigüe de la carte vidéo ne permettant pas de
  stocker tous les caractères 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 répendent sous X, grace
  a des outils comme freetype, xfstt (...).

  Actuellement, la nouvelle norme européenne iso-8859-15 latin9 souvent
  abbrégée en latin0 est censée permettre la transition vers l'unicode
  en apportant à l'ancien iso-8859-1 latin1 les caractères qu'il
  manquait actuellement.

  Cet HOWTO sera mis à jour sous peu pour vous permettre de transiter
  vers le latin0 en toute sérénité, pour utiliser l'EURO par exemple.



  33..88..  UUTTCC,, GGMMTT


  Nous n'utilise pas les mêmes normes horaires que les ango-américains !

  La France se trouve en zone MET (heure moyenne européenne) GMT+1 ; la
  zone «MET DST» correspond à l'heure d'été activée GMT+2.

  Voici donc une petite explication de la différence entre GMT et UTC
  par Edgar Bonet Orozco :

  GMT est l'heure solaire moyenne de Greenwich. L'heure est comptée à
  partir de midi et est donc décalée de 12 h  par rapport au temps
  universel. GMT est basée sur la rotation de la Terre, ce n'est donc
  pas un temps régulier. 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 méridien zéro). Il est basé sur des étalons
  atomiques, mais des secondes intercalaires sont ajoutées
  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 précisions
  sur la détermination 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 référence aux différentes heures
  légales.  L'acronyme «GMT» est employé 99% du temps pour désigner UTC,
  mais c'est une erreur (ou un abus de langage).

  Enfin, il existe l'heure astronomique, aussi comptée sur des étalons
  atomiques mais décalée 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.


  44..  RRééggllaaggee dduu ccllaavviieerr ssoouuss LLiinnuuxx



  44..11..  IInnttrroodduuccttiioonn


  Il existe deux programmes pour configurer votre clavier : un pour la
  console : loadkeys et un pour XFree : xkbd.

  Pour installer un clavier français sous Linux, tapez selon que vous
  soyez respectivement Français, Canadien Français, Belge Wallon ou
  Suisse Romand :



       loadkeys french.map
       loadkeys cf.map
       loadkeys be-latin1.map
       loadkeys sf-latin1.map





  44..22..  OOùù ttrroouuvveerr cceess ffiicchhiieerrss


  french.map est inclu dans ce HOWTO (au chapitre «Fichiers inclus») et
  tous les autres fichiers se trouvent d'ordinaire dans le répertoire
  /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
  télécharger 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/"





  44..33..  AAtttteennttiioonn aauu ssttttyy !!


  Avec french.map et french (pour X window : cf. chapitre «Régler 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
  caractère).

  Les tables ici fournies fonctionnent correctement et ne nécessitent
  donc pas de stty erase qui risquerait surtout de perturber leur bon
  fonctionnement !

  Supprimez-donc ces lignes de vos fichier d'initialisation de
  l'interpréteur de commandes ( «shell» ), comme .bashrc, .bash_profile
  ou .tcshrc .


  44..44..  FFaaiirree ddee cceess mmooddiiffiiccaattiioonnss lleess ddééffaauutt aauu ddéémmaarrrraaggee


  D'habitude, loadkeys est exécuté par des scripts au démarrage ; 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 lançant loadkeys ; il vous
  suffit alors de l'éditer pour que vos modifications soient désormais
  prise en en compte à chaque démarrage.

  Les distributions RedHat constituent une exception : la table de
  clavier par défaut étant définie dans /etc/sysconfig/keyboard.

  Remplacer donc dans le fichier propre à votre distribution la table de
  clavier en question par french.map.


  44..55..  VViieeiilllleess vveerrssiioonnss


  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
  dépend) est trop vieille : il faut vous procurer une version plus
  récente 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 désuétude puisque la grande majorité des programmes
  prennent désormais en charge ces fameuses touches mortes et les
  caractères accentués.

  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é prévus.


  55..  RRééggllaaggee dduu ccllaavviieerr ssoouuss XXFFrreeee



  55..11..  IInnttrroodduuccttiioonn


  «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 grâce à votre
  .xinitrc (à lire !).

  Pour convertir une table console correcte, on utilisait «mk_modmap»
  (livré avec l'archive 'kbd' et généralement installé en
  /usr/lib/kbd/keytables)


  Les utilisateurs désirant personnaliser leur table xmodmap employaient
  le programme «xkeycaps».

  XFree 2.1 et les version ultérieures reconnaissent la disposition des
  touches du clavier gérée par «loadkeys», cela rendant théoriquement
  xmodmap inutile.

  Mais la gestion de la touche «COMPOSE» assurée par XFree 3.1 laissait
  un peu à désirer, la table héritée de «loadkeys» ne servant guère.

  Il fallait donc continuer à employer xmodmap, l'utilitaire logiciel
  standard permettant d'obliger le serveur X à associer les événements
  souris/clavier à des caracères.

  Sous XFree version 3.2 et postérieures, «xkb» rendit xmodmap
  définitivement 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
  confirmées !!!

  Dans la distribution X11 du X Consortium (donc XFree86, qui en est
  directement issu), il n'existe plus de mécanisme général de gestion
  des touches mortes, ou des solutions approximatives obligeant à
  supprimer (aussi) xkb !

  Quelle histoire compliquée !

  De ce fait, elles ne fonctionnents que pour les clients X
  «internationalisés», c'est-à-dire qui gèrent eux-mêmes les problèmes
  liés aux méthodes d'entrée de données des différentes langues
  nationales.

  Ceci est très gênant lorsqu'on veut pouvoir saisir du texte comportant
  des lettres accentuées, alors que le client utilisé n'est pas
  internationalisé !

  Thomas Quinot (Thomas.Quinot à cuivre.fdn.fr) vous propose donc sa
  libX11 modifiée, qui gère les touches mortes de manière transparente
  pour tous les clients.

  Elle permet également de traiter les séquences composées inconnues
  comme des paires de caractères, par example :

  ~ + / = ~/

  Pour l'utiliser :

  ·  Récupérez libX11-XF3.3.1.tar.gz ;

  ·  Extrayez le fichier libX11.so.6.1 ;

  ·  Placez-le dans /usr/X11R6/lib/ ;

  ·  Exécutez ldconfig ;

  ·  Désactivez l'extension XKB en utilisant l'option XkbDisable dans la
     section Keyboard de votre XF86Config.


  55..22..  CCoonnsseeiillss


  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 répertoire
  /usr/X11R6/lib/X11/xkb/symbols/ , procurez-vous donc une version plus
  récente de X window !


  55..33..  EEsstt--ccee nnéécceessssaaiirree ??


  Sans xkb, XFree se rabattra par défaut sur votre configuration de
  clavier pour Linux (avec loadkeys).  Toutefois, la translation n'est
  pas parfaite et je vous recommanderais plutôt 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
  considère comme utilisateur d'un clavier anglo-américain !

  Il convient donc d'utiliser «fr» ou «french» avec xkb ; toutefois ce
  dernier permet d'utiliser de multiples améliorations pour disposer du
  plus de confort possible (gage de confort : je l'utilise actuellement
  :-) ).


  55..44..  ««ffrreenncchh»» oouu ««ffrr»» ??


  Je vous conseille de choisir french que je maintient à jour, plus
  récent que fr et plus adapté car maintenu par un francophone :-)

  De plus, il bénéficie de nombreuses améliorations pour pallier au
  déficiences de nombreux programmes.

  Par exemple, certains programmes en Motif comme Netscape (tm) ne
  savent pas encore gérer les touches mortes ... donc impossible de
  taper par exemple des ê ou des î sur les claviers belges et français,
  puisque la touche morte «accent circonflexe» est le seul moyen
  d'obtenir ces caractères !

  «french» répond à ce problème 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 tréma !


  55..55..  TTaabbllee ddee ccoorrrreessppoonnddaanncceess



  ·  AltGr (voyelle) : voyelle accent grave

  ·  AltGr + Shift (voyelle) : voyelle tréma

  ·  AltGr (touche au dessous de la voyelle) : voyelle majuscule accent
     grave

  ·  AltGr + Shift (touche au dessous de la voyelle) : voyelle majuscule
     tréma

  ·  AltGr + Shift (minuscule accentuée) : majuscule accentuée

  Par exemple :



  ·  AltGr (e) : ê

  ·  AltGr + Shift (ù) : Ù

  L'astuce marche aussi pour le c cédille :


  ·  AltGr + Shift (ç) : Ç

  Donc même dans les pires conditions (si aucune touche morte ne
  fonctionne), on peut quand même accéder à toutes les voyelles
  accentuées, majuscules et minuscules !

  Vous y trouverez en plus les guillemets français (« »), les symboles
  employés 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 grâce à 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.


  55..66..  FFaaiirree ddee cceess mmooddiiffiiccaattiioonn lleess ddééffaauutt aauu llaanncceemmeenntt ddee XX


  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 récentes de XFree,
                                               # AltGr et RightAlt sont synonymes.
       ScrollLock      Compose                 # Pour faire des caractères spéciaux.
                                               # 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 nécessaire pour xkb
       XkbModel        "pc102"         #
       XkbLayout       "french"        #
       XkbRules        "xfree86"       #
       # Remplacer «french» par «ca» ou «be» ou «fr_CH»
       EndSection




  Pour cette partie Xkb, certains préfèrent :



  XkbKeymap "xfree86(french)"
  XkbKeycodes  "xfree86"
  XkbSymbols   "en_US(pc101)+french"
  XkbGeometry  "pc(pc101)"





  55..77..  OOùù ttrroouuvveerr cceess ffiicchhiieerrss


  french est inclu dans ce HOWTO (au chapitre «Fichiers inclus») et tous
  les autres fichiers se trouvent d'ordinaire dans le répertoire
  /usr/X11R6/lib/X11/xkb/symbols/.

  Pour l'installer, vous pouvez donc le recopier ou plus simplement le
  télécharger 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.


  55..88..  AAuuttrree mméétthhooddeess


  Une autre méthode pour obtenir des caratères 8 bits :

  Dans /usr/X11R6/lib/X11/locale/iso8859-1/Compose se trouve une table
  de «correspondance» entre deux caractères et un résultat ; les deux
  caractères sont «mélangés» 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 paramétrage préconisé, réglé dans XF86Config, la fait correspondre
  à la touche «Arrêt Défil» 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 français, désormais
  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 décider d'attribuer Compose à une autre
  touche ; je vous recommande toutefois d'utiliser ScrollLock, bien
  moins utilisée que les autres touches.

  NB : La touche carré/cube), peu utilisée, est par défaut assignée aux
  guillemets français 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 défaut, il vous suffit avant
  d'utiliser les fichiers de configuration pour XFree et linux en mode
  console de repérer la ligne mise en commentaire au début du fichier et
  de supprimer ce commentaire !


  66..  RRééggllaaggee dduu ccllaavviieerr ppoouurr lleess aapppplliiccaattiioonnss eenn mmooddee tteexxttee



  66..11..  TToouutt dd''aabboorrdd


  Le huitième bit doit survivre à l'entrée du noyau, assurez-vous-en
  donc avec :

  stty cs8 -istrip -parenb

  Ensuite, il convient de s'assurer que l'application est apte à
  supporter les caractères 8 bits : par exemple, ispell n'est pas
  compilé pour des caractères 8 bits par défaut : il faut le recompiler
  sans l'option :

  -NO8BIT


  66..22..  AAppppeelleerr llaa ppoolliiccee


  Charger une police de caractères adaptées :

  setfont /usr/lib/kbd/consolefonts/xxx-NNN


  ·  xxx repésente 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
     caractères «étendus» (voyelles accentués, symboles de ponctuation
     comme paragraphe... )


  ·  NNN représente la taille individuelle de chaque caractère ; 08 est
     presque illisible mais 16 est un peu gros... À régler selon les
     goûts de chacun.


  66..33..  UUnnee ppoolliiccee,, ddeess ppoolliicceess......


  De nous jours, une nouvelle norme latin0 (iso-8859-15) vient
  d'apparaître, destinée à remplacer l'ensemble des polices européennes
  par une seule.

  Son but est voisin de l'unicode, mais elle à l'avantage d'être plus
  légère que celui-ci et d'être applicable tout de suite.

  Elle apporte notamment des caractères qui manquaient beaucoup pour les
  français et les finlandais :


  ·  «e dans l'o» en majuscule et minuscule pour les français, 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 européens

  Cette nouvelle norme, iso-8859-15 latin9 aussi connue sous le nom
  générique latin0, reste cependant encore très peu répendue par rapport
  à la norme actuelle iso-8859-1 latin1.

  Pour l'utiliser, vous devez télécharger 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 caractères latin9

  En attendant, Éric Dubreuil (ericdub à club-internet.fr) nous
  conseille la police lat1u-16.psf, permettant d'avoir tous les
  caractères accentuées sans pour autant enlaidir mc, un gestionnaire de
  fichier très populaire mais très sensible à la police utilisée !

  Une alternative est l'unicode, mais les programmes l'utilisant sont
  encore trop peu nombreux pour qu'elle soit valable.

  Citons quand même yuedit et le projet «9» (9term, 9wm...) qui
  utilisent l'unicode sous X, avec plus ou moins de succès.

  En revanche, sous linux-console, tout programme peut utiliser
  l'unicode.

  Mais, hélas!, aussi grande que soit la mémoire des cartes vidéos
  actuelles, elle ne peut charger l'intégralité des caractères d'une
  police unicode.

  Il existe donc des «jeux de caractères» limités 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





  66..44..  LLeess mmeessssaaggeess eenn ffrraannççaaiiss


  Linux en 'version française' existe... mais ne semble pas facile à
  obtenir.

  La librairie locale(7) utilisée par la librairie C se sert de
  variables d'environnement pour définir les préférences linguistiques
  et nationales


  ·  LC_COLLATE  équivalence de caractères pour les comparaisons.  (ex:
     æ peut être équivalent à ae)

  ·  LC_CTYPE    caractères affichables

  ·  LC_MONETARY monnaie utilisée

  ·  LC_MESSAGES langue des messages

  ·  LC_TIME     format de la date

  ·  LC_ALL      valeur par défaut des variables précedentes

  ·  LANG        surpasse les variables précédentes.

  Les valeurs utilisables pour le français sont:


  ·  fr français générique

  ·  fr_FR français de France

  ·  fr_BE français de Belgique

  ·  fr_CH français de Suisse

  ·  fr_LU français du Luxembourg

  ·  fr_CA français du Canada

  Par exemple, si la monnaie vous importe peu, vous pouvez indiquer



          export LANG=fr




  Les données correspondantes aux préférences se trouvent généralement
  dans /usr/share/locale. S'ils manquent, vous pouvez récuperer leur
  source sur ftp://dkuug.dk/i18n/WG15-collection

  Pour se faire SON linux en français il faut en pratique disposer des
  sources de la libc et d'un minimum de compétences (langage C).

  Voici donc, pour la bonne bouche, quelques renseignements collectés...

  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 défaut dans /usr/lib/locale, et ça
  contient de quoi préciser 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 détails. 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 gêre un fichier qui
  est dans /etc/locale/.  (NDG : De nos jours, ils se trouvent plutôt
  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 règles françaises, là il faut aller dans les sources de
  libc/locale et dans chacun des sous-répertoires jeter un oeil sur le
  fichier exemple, le modifier pour le français (c'est des tout petits
  fichiers), et faire 'make', avant de copier le résultat dans
  /usr/lib/local/fr/ et de faire un 'export LC_ALL=fr'.  »

  Autre astuce pour ménager les vieux logiciels :

  cd /usr/lib ln -s /usr/share/locale

  Nat Makarévitch rapelle à juste titre que site FTP du LIP6 offre de
  nombreux documents et fichiers utiles, en particulier :


  ·  Les pages de manuel en français (archive man-fr-*) adaptées par C.
     Blaess. Il suffit d'extraire le contenu de l'archive dans le
     répertoire /usr/man/fr.

  ·  Une intéressante documentation technique : locale.fr (P. D'Cruze,
     adaptée par É. Dumas)

  Pour en apprendre davantage lire la page de manuel de «locale»
  (bibliothèque de pages de manuel 5 ou 7).


  66..55..  LLeess vvaarriiaabblleess


  Ces variables doivent être exportées à 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
       # caractères 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 cités dont le nom commence par
  «.» doivent se trouver dans votre répertoire maison !


  66..66..  LLeess ccaarraaccttèèrreess 88 bbiittss ddaannss lleess pprrooggrraammmmeess uuttiilliissaanntt rreeaaddlliinnee
  tteellss bbaasshh oouu nnccffttpp......


  Readline est une librairie de saisie de caractères avec historique et
  completion ; elle est utilisée par de nombreux programmes (bash,
  ncftp, gnuplot...).

  Par défaut, le 8 ème bit sert à coder la touche Meta.

  Elle est utilisée pour coder certaines commandes mais la touche Escape
  (ou Echap) peut la remplacer.

  Si vous souhaitez voir et saisir des accents avec les applications
  compliées avec readline, comme bash pour les versions supérieures à
  1.13, ajoutez ceci dans votre fichier $INPUTRC (par défaut ~/.inputrc)
  :



       # Permettre de rentrer & recevoir des caractères accentués
       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 caractères vers l'avant avec Delete
  et vers l'arrière avec Backspace, ceci n'étant pas prévu sur les
  tables de clavier par défaut «mimant» le comportement d'un clavier de
  console VT100 .

  Les deux dernières options vous permettront d'utiliser Home et End
  pour aller au début 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 grâce à ce fichier ; pour obtenir le code
  d'une touche invoquer cat puis appuyer sur la touche : son code
  apparaît.

  Le code physique :



        ^[





  correspond à la séquence 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, grâce à la variable d'environnement INPUTRC, utiliser
  un fichier commun à tous les utilisateurs.

  Enfin, je vous recommande d'utiliser ce fichier .bashrc (à placer dans
  votre répertoire maison) :












































  # ~/.bashrc : executé par bash(1) pour les shells lancés après 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, présenter des
  différences pour afficher par exemple une citation en laçant le
  programme «fortune».


  66..77..  zzsshh

  Celui-ci se contente d'un stty pass8.


  66..88..  ttccsshh


  Pour tcsh, placer, dans le fichier /etc/csh.login (ou dans les
  fichiers .tcshrc des utilisateurs concernés) les variables indiquées
  plus haut en remplaçant 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





  66..99..  PPoouurr ttoouuss lleess sshheellllss


  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" plutôt 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 utilisées,
  sinon tcsh agit en iso_8859_1, quelle que soit les valeurs données à
  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





  66..1100..  LL''hheeuurree


  Rien n'est plus facile que de laisser à Linux le soin de passer de
  l'heure d'été à l'heure d'hiver et réciproquement...

  a) D'abord, quelle heure est-il :-) ?

  Après avoir regardé sur la pendule la plus proche de vous, tapez :

  clock

  puis

  date

  La première heure est celle du bios, la seconde celle calculée par
  Linux à partir de /etc/zoneconfig.

  Pour peu que vous ayez installé timezone, votre machine peut jongler
  aisément entre les différents fuseaux horaires... ce que les DOS ou
  Windows ne permettent pas !

  b) L'heure du choix !

  De là, deux possibilitées : soit vous décidez de laisser l'heure
  système à l'heure locale (peu pratique, excepté si vous hébergez aussi
  sur votre disque dur ces systèmes d'exploitation peu évolué, ne
  sachant même 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 réglage

  Pour procéder, regardez d'abord si l'heure système retournée 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 «réglage
  du fuseau».


  ·  Pour les français, 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 décisions futures de la cour européenne, l'heure d'été
  (daylight savings) risque d'être abandonné...  ce qui compliquera
  cette explication !


  ·  Pour les canadiens français :

  Vous êtes dans une zone horaire GMT-4 si vous habitez autour de
  Montréal .

  Pour les autres provinces, consulter un dictionnaire !

  Premièrement, 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).

  Dès lors, clock et date doivent vous retourner la même heure...



  ·  Pour les canadiens français : utilisez GMT+4


  ·  Pour les français, belges wallons et suisses romands :

  Si vous lisez ce document en été, le décalage 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
  régler le système : tapez :

  ln -sf /usr/lib/zoneinfo/Etc/GMT-2 /etc/zoneconfig

  clock

  date

  L'heure calculée correspond donc à l'heure de Greenwich, l'heure
  système à l'heure locale... soit l'inverse de ce que l'on veut.

  Un simple : clock -w

  Va alors mettre l'heure du système en heure de Greenwich, utilisant
  pour celà l'heure locale inversée volontairement avec l'heure système.

  d) Régler le fuseau horaire :

  Tapez alors : ln -sf /usr/lib/zoneinfo/Europe/Votre-ville
  /etc/zoneconfig

  Et voilà ! Le système 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, procédez de même en remplaçant les «-2»
  par «X», X représentant l'opposé de votre décalage horaire (par
  exemple -4 au Québec, 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

  Très simple et très utile : plus besoin de se souvenir du décalage
  horaire (plus ou moins X heures) puisque Linux se charge désormais de
  tout !


  66..1111..  vvii


  Normalement, aucune modification n'est nécessaire à part l'utilisation
  de loadkyes (détaillée 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 césure automatique de la ligne à N caractères :
  set tw=79

  " Indentation (pour les programmeurs) :
  " set cindent

  " Réglages 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 après
  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'intérieur 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 gzippés

  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





  66..1122..  EEmmaaccss


  Voici un fichier de configuration de base pour employer les accents.
  XEmacs les accepte lui par défaut 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++ même 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 Makarévitch suggère 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 prédéfinis
  qui ne sont pas forcement ceux qui sont en place sur le système.

  Si vous constatez des problèmes, vous devez redéfinir la liste ispell-
  dictionary-alist des dictionnaires.

  Cette liste contient :

  ·  le nom du dictionnaire

  ·  la liste des caractères composant un mot

  ·  la lise opposée des caractères ne composant pas un mot

  ·  les caractères de liaison à l'interieur des mots ("-", "'"...)

  ·  vrai ou faux si ces caractères peuvent être présents 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" ; français
         "[A-Za-zÀÂÇ-ËÎÏÔÙÛÜàâç-ëîïôùûü]" "[^A-Za-zÀÂÇ-ËÎÏÔÙÛÜàâç-ëîïôùûü]"
         "[---']" nil ("-n") "~nroff")
        ("francais-TeX" ; français
         "[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 norvégien
         "[A-Za-zåÅøØæÆéÉèÈ]" "[^A-Za-zåÅøØæÆéÉèÈ]"
         "[---'^`\"]" t nil "~nroff")
        ))

  Le dictionnaire "francais-TeX" est un lien symbolique sur "francais"
  qui permet d'ajouter une entrée 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))





  66..1133..  lleessss


  /etc/profile ou les fichiers de démarrage du shell (comme .bashrc et
  .bash_profile dans votre répertoire 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 répertoire maison
  : il permet d'employer les touches fléchées, Page_up, Page_down, Home
  et End.

  Ne pas négliger la page de manuel de less car il peut être intéressant
  de changer la valeur de sa variable d'environnement de configuration
  ("LESS").

  J'utilise : '-C -M -i -x2'


  66..1144..  llss


  Utilisez les options :



       -N --color=auto




  ou, plus simplement, définissez dans les fichiers de démarrage de
  votre shell les alias suivants permettant de voir les fichiers dont le
  nom comprend des caractères 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 complète de tous les fichiers
  présents dans le répertoire, avec leurs attributs, leurs tailles...

  Pablo Saratxaga conseille d'utiliser --color=auto car «--color=yes
  fera avoir des codes escape ansi même 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.»


  66..1155..  fflleexx


  Donnez l'option :



       -8




  si l'analyseur généré doit accepter les entrees 8-bits (bien sur qu'il
  doit le faire !).


  66..1166..  eellmm


  Rajoutez ces trois lignes dans votre .elm/elmrc :



         charset = iso-8859-1
         displaycharset = iso-8859-1
         textencoding = 8bit





  66..1177..  ccooll


  Assurez-vous :

  1) qu'il a été corrigé et fasse un



       setlocale(LC_CTYPE,"");




  2) de définir




  LC_CTYPE=ISO-8859-1




  dans l'environment.


  66..1188..  rrllooggiinn


  Utilisez l'option :



       -8





  66..1199..  jjooee


  Utiliser ftp://sunsite.unc.edu:/pub/Linux/apps/editors/joe-2.8.tar.gz
  ou plus récent qui devraient fonctionner après édition du fichier de
  configuration : placer l'option -asis dans /usr/lib/joerc en première
  colonne.


  66..2200..  TTeeXX eett LLaaTTeeXX


  Le plus simple consiste à employer GuTemberg, une distribution de
  LaTeX avec tous les défauts réglés pour des francophones par des
  francophones !

  Mais si vous préférez une version standard non modifiée, il suffit
  d'ajouter au début 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 séparément 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 configurés
  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





  66..2211..  MMaannuueell


  Tout d'abord, il faut vous procurer les pages de manuel Linux
  traduites en français sur ftp.lip6.fr/pub/linux

  Si vous utilisez une distribution RedHat ou Debian, celles-ci sont
  présentes sur le cédérom : il suffit de les sélectionner lors de
  l'installation.

  De là, deux possibilitées :


  ·  soit vous ne voulez que des manuels en français, 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 préférez par défaut des manuels en français 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 défaut et
  se rabattra sinon sur des pages en anglais.


  66..2222..  CCoorrrreecctteeuurr oorrtthhooggrraapphhiiqquuee iissppeellll


  Vous pouvez vous le procurer sur son site original HYDRO-QUÉBEC :
  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 français l'installation.


  66..2233..  LLeess ccllaavviieerrss 110055 ttoouucchheess


  Aussi appelés «claviers Microsoft (tm)», ils ont trois touches de plus
  que les claviers normaux.

  Comment s'en servir ?

  En mode console, éditer french.map et décommenter les lignes en
  parlant !

  De même pour french (pour Xwindow).


  66..2244..  PPGGPP



  Tout d'abord, un avertissement : ce paragraphe n'est destiné qu'aux
  francophones ne vivant pas en France, même malgré les modifications
  récentes de la loi !

  En effet, en France, en Iran, en Irak et dans quelques autres pays
  totalitaires, l'utilisation de logiciels de cryptographie est
  considérée comme usage d'armes de guerre, ce qui est punissable par la
  loi !

  Donc sautez ce paragraphe si votre législation locale ne permet pas
  d'utiliser des logiciels de cryptographie.

  Premièrement, il faut se procurer pgp-international (à cause de
  problèmes de patentes et de législation 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 répertoire maison, dans un sous répertoire
  .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 !


  66..2255..  IImmpprreessssiioonn eenn mmooddee aasscciiii


  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 même genre.

  Il existe d'autres utilisation au programme recode : «ibmpc:lat1» ou
  «lat1:ibmpc» (de ou vers MS-DOS) ou «applemac» pour Macintosh (tm).


  66..2266..  uunniiccooddee//llaattiinn//ccpp...... jjee nn''aaii ppaass ccoommpprriiss ccee ddeerrnniieerr ppaarraaggrraapphhee !!


  Voici donc plus d'explications grâce à Pablo Sartxaga (srtxg à
  chanae.alphanet.ch) dans un message explicant la différence
  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 "théta (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 possèdes les glyphes à la bonne place par rapport au codage
  de caractères 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 créer des images an ascii-art,
  un fichier par caractère (256 fichiers donc), il te suffit alors de jongler
  avec les fichiers pour les changer de place et régénerer la fonte).
  Note cependant que le codage cp437 n'inclus pas tous les caractères de
  iso-8859-1, notamment manquent quasi toutes les majuscules accentuées, et
  les lettres ãõ necessaires en portguais. Tu peux toujours modifier la fonte
  pour créer ces caractères 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 utilisée.

   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 dès lors que tu charges une fonte t uest supposée 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 défaut 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 défaut 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 auprès 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" plutôt que "def", ils font _presque_ la même
  chose, mais "cp437" est visuellement plus agreable car il remplace les
  caractères non présents dans la fonte par les lettres non accentuées 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 caractères 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 caractères
  à gauche à cause des caractères de largeur nulle :)

  Essaye aussi la fonte "t.fnt", elle est assez jolie, totue en rondeurs, je la
  trouve réposante, et quand je dois utiliser un PC avec les fontes style
  courier par défaut je trouve ça très agressif je me demande comment ils
  peuvent travailler avec :)




  Lire aussi les articles de news : "FAQ - les accents français 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 .


  66..2277..  nnccuurrsseess


  Rappellons que ncurses est un librairie C qui permet de manipuler
  facilement l'affichage en mode console texte : fenêtrage, lignes de
  saisie, édition de formulaires, couleurs, caractères «ALT» ascii semi-
  graphique ibm, comme sous dos...


  66..2277..11..  IInnttrroodduuccttiioonn


  Pour les programmes utilisant curses (comme lynx) David Sibley dit:

  «La version standard de curses utilise le huitième  bit  pour la vidéo
  inversee  (voir  le  flag  _STANDOUT  défini dans
  /usr/include/curses.h).  Cependant, ncurses semble  fonctionner en
  8-bits et affiche le iso-latin-8859-1 correctement.»


  66..2277..22..  LLeess aacccceennttss


  Alors Denis BRAUSSEN (PostOffice à mail.dotcom.fr) répond à cette
  question :

  «Pourquoi en utilisant ncurses 4.2 je n'arrive pas à saisir les
  accents français dans les formulaires ?»

  Remarque: les distrib LinuX sont livrées en général avec la version
  1.9.9e de ncurses, or il se trouve que la librairie form de cette
  version est BUGGÉE (problèmes de rafraichissement des fenêtres).

  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 livrée
  sur la plupart des distributions (RedHat 4.2, 5.0, 5.1, SlackWare 3.2,
  Debian 1.9) en tout cas.

  Symptôme : 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 installées !).

  Note: les 'locales' sont des fichiers qui vont modifier le
  comportement de certains programmes pour qu'ils s'adaptent aux
  «spécificités culturelles du pays ».


  ·  récupererer :

  ·  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 répertoire /usr/share/locale les fichiers fr_FR et
     en_DK (qui est inclus dans fr_FR)

  ·  créer le répertoire /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 créera l'entrée fr dans /usr/share/locale soit :



               /usr/share/locale/fr





  Ce répertoire 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
     française a été faite par Éric DUMAS (hélas ce doc ne traite
     principalement que de LC_MESSAGES. À quand la suite Éric ? ;-) )

  ·  compléter éventuellement l'intitialisation des variables du shell
     comme décrit dans la section sur bash ou tcsh

  ·  dans un programme, utilisez la fonction  setlocale() (man
     setlocale.3) pour fixer les paramêtres 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.


  66..2288..  DDiivveerrss


  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 thème de l'ISO-8859-1 et sur «comment
  manipuler les caractères 8-bits» est disponible sur
   ftp://grasp.insa-lyon.fr/pub/faq/fr/accents

  Pour perl, si tout d'un coup après 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 définition des locales a
  (encore) changé : il faut les régénérer à 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





  77..  RRééggllaaggee dduu ccllaavviieerr ppoouurr lleess aapppplliiccaattiioonnss XX

  77..11..  LLeess xxtteerrmmiinnaauuxx ((xxtteerrmm,, nnxxtteerrmm,, rrxxvvtt......))


  Les faire fonctionner avec toutes les touches standard du clavier 102
  touches relève 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
  bénéficer 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 résoudre tous les
  problèmes de rxvt et de xterm ...

  Pour les résoudre sans créer 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 même le pavé numérique, fonctionnant comme en mode
  console, i.e.  Shift-Page_up permettant de faire défiler une page,
  voire mieux : le pavé numérique reconnaissant enfin la différence
  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 parallèlement 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





  77..22..  LLeess aapppplliiccaattiioonnss MMoottiiff


  Là, je n'ai malheureusement aucun remède miracle !

  Utilisez les possibilités du fichier french au lieu des touches mortes
  (AltGr (voyelle) : voyelle accent circonflexe... ) !


  77..33..  LLee mmaannuueell


  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 »


  77..44..  NNuummLLoocckk


  Frédéric Petit nous dit que «j'ai découvert que si l'on met
  ServerNumLock dans la section keyboard de XF86Config, ça marche très
  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 numérique et la led
  correspondante est allumée ...»


  77..55..  XXDDMM


  Frédéric Petit nous conseille d'utiliser ce /etc/X11/xdm/Xresources
  afin de ne rencontrer aucun problème avec nos touches «spéciales»
  (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()





  88..  RReemmeerrcciieemmeennttss


  Ce document ne serait pas ce qu'il est sans l'aide de Nat Makarévitch
  (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 alphabétique ces contribueurs :

  Jean-Michel Antoine
  Michel Billaud
  Stephane Bortzmeyer
  Rémy 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 même 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 intégrer dans les prochaines versions !

  Signalez-moi aussi les erreurs : cet HOWTO est en perpétuel
  changement, avec des nouveautés incluses à chaque version ; des
  erreurs peuvent facilement s'y glisser !


  99..  FFiicchhiieerrss iinncclluuss ddaannss ccee HHOOWWTTOO


  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 français, sans le comparer à un
  // clavier américain par défaut : on y gagne plus de flexibilité, ce
  // modèle devient plus personalisable ...

  // Les touches é, è, ç, à & ù, présentes en mode minuscule (i.e. sans shift)
  // ne sont pas disponibles en mode majuscule car elles sont respectivement
  // remplacées par 2, 7, 9, 0 & % .
  // Pour obtenir les majuscules accentuées É, È, Ç, À & Ù, vous pouvez soit
  // utiliser AltGr + Shift (minuscule accentuée), soit utiliser les accent
  // dits "morts", i.e. fonctionnant comme l'accent circonflexe & le tréma .
  // Sont disponibles :  AltGr (1) : accent aigü, AltGr (7) : accent grave,
  // AltGr (^) : cédille ; pour s'en servir, procéder comme avec l'accent
  // circonflexe & le tréma : ex : AltGr (1) + e : é ; AltGr (1) + e : É ...
  // La tilde (~) n'étant pas employée sur des lettres en français, elle reste
  // en AltGr (2) une touche normale .
  // Une tilde "morte" (avec la cédille "morte") est toutefois disponibles sur la
  // touche accent circonflexe & tréma 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 & à tréma :
  // AltGr (voyelle) : voyelle-minuscule à accent circonflexe
  // AltGr + Shift (voyelle) : voyelle-minuscule à tréma
  // AltGr (en dessous de la voyelle) : voyelle-majuscule à accent circonflexe
  // AltGr + Shift (en dessous de la voyelle) : voyelle majuscule à tréma

  // Plusieurs lettres étrangères, utilisées comme signes mathématiques ou
  // physiques, abbréviations (...) ont été rajoutées en AltGr :
  // T->Phi;, r->(TM), y->yen, c->¢ et ©, f->señora, m->señor,
  // 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'accéder en mieux à toutes ces touches,
  // mailez moi !
  // Vôtre 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 possibilitées pour cette touche "au carré" (²) :
  // * un mode mathématique où elle renvoie "au carré" en mode normal, "au cube"
  // si elle est Shiftée 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 littéraire est donc proposé par défault, pour disposer des
  // guillemets français « & » ; 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 supplémentaires sur un clavier "Windows95"

  // ²/³ (carré/cube) par défaut puisqu'on a mis les guillemets français !
  //    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 définitions de alt & control (keycode) ne sont qu'optionelles ; n'ont
  # donc été redéfinis alt (nombre) et atl + shift (nombre) pour inverser le
  # comportement par défaut : touche = signe ; touche + shift = nombre, or ici
  # alt touche = Meta_nombre ; alt + shift touche = Meta_signe
  #
  # Shift (pavé numérique) pour taper de l'héxadécimal !
  # control alt suppr : rebooter
  # control altgr suppr : arrêter
  #
  # 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 littéraire + 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

  # Très 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 =

  # Fenêtre gauche = Alt puisque d'habitude c'est la position d'Alt !
  keycode 125 = Alt

  # Fenêtre droite = AltGr puisque d'habitude c'est la position d'AltGr !
  keycode 126 = AltGr

  # Menu = compose (mélanger 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 caractères
  # 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 système 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 tâche des gens qui veulent mettre en place un système à
  partir du code source. Comprendre cela vous sera très utile lorsque
  vous aurez besoin de résoudre des problèmes ou de configurer votre
  système (version française par Dominique van den Broeck, Mai 2000,
  dvandenbroeck@free.fr <mailto:dvandenbroeck@free.fr>).
  ______________________________________________________________________

  Table des matières


















































  1. Introduction

  2. Partie matérielle (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 bibliothèque 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 système de fichiers (filesystem)

     7.1 Configuration
     7.2 Exercices
     7.3 Plus d'informations

  8. Démons noyau

     8.1 Configuration
     8.2 Exercices
     8.3 Plus d'informations

  9. Le journal système (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 système Linux minimum à partir des sources.

     13.1 Ce qu'il vous faut
     13.2 Le système 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 Références 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)


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  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 système plutôt que simplement savoir comment
  l'utiliser, ce document devrait être un bon point de départ. Ce genre
  de "connaissance de fond" est aussi requis si vous voulez devenir un
  as de la résolution de problèmes sous Linux.


  Je pars du principe que vous avez une machine Linux en état de marche,
  et que vous maîtrisez les bases d'Unix et de l'architecture matérielle
  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
  français 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 débuter.  C'est un site
  concis, lisible, et qui couvre toutes les bases.


  Le sujet principal de ce document est la façon dont Linux démarre.
  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 à télécharger, car j'espère
  que certains lecteurs s'attaqueront au meilleur exercice
  d'apprentissage de Linux que je connaisse : construire un système à
  partir du code source.  Giambattista Vico, un philosophe italien
  (1668-1744) disait ``verum ipsum factum'' ce qui signifie "la
  compréhension découle de l'expérience" (NDT : Traduction libre). Merci
  à Alex (voir ``Remerciements'') pour cette citation.
  Si vous souhaitez vous "la rouler vous-même", je vous conseille
  d'aller voir Linux From Scratch HOWTO
  <http://www.linuxfromscratch.org> (LFS soit "Linux depuis zéro").  LFS
  fournit des instructions détaillées pour bâtir un système 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 systèmes. Ce que j'ai inclus
  dans ce document, ce sont des instructions pour construire un système
  "jouet", (voir ``Bâtir un système Linux minimal à partir des
  sources'') purement pour l'exercice.


  Les lots (NDT : "packages" en anglais et repris ci-après) sont
  présentés dans l'ordre où ils apparaissent dans le processus de
  démarrage du système.  Cela signifie que si vous installez les
  packages dans cet ordre vous pouvez redémarrer après chaque
  installation, et voir à chaque fois le système 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 références, puis de décider du
  point jusqu'auquel vous souhaitez comprendre votre système. Reprenez
  alors depuis le début, en faisant les exercices et en relisant en
  détail.




  22..  PPaarrttiiee mmaattéérriieellllee ((HHaarrddwwaarree))

  Lorsque vous allumez votre ordinateur, celui-ci se teste lui-même 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 système
  d'exploitation. Les secteurs d'amorce sont marqués par un ``nombre
  magique'' (valeur fixe caractéristique) 0xAA55 = 43603 à l'octet 0x1FE
  = 510. Ce sont les deux derniers octets du secteur.  C'est de cette
  façon que l'électronique peut déterminer 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
  amorçable ("bootable"), il le charge en mémoire et passe ainsi le
  contrôle au programme qui charge le système d'exploitation en mémoire.
  Sur un système Linux typique, ce programme sera la première étape du
  chargeur de LILO. Il existe malgré tout plusieurs manières différentes
  de faire démarrer ("booter") votre système.  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 détails.  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 matérielle du PC.




  22..11..  CCoonnffiigguurraattiioonn

  La machine stocke des informations sur son propre état dans son CMOS.
  Cela inclut la RAM et les types de disques installés dans le système.
  Le BIOS de la machine contient un programme, Setup, qui vous permet de
  modifier ces informations. Pour savoir comment y accéder, 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 système d'exploitation.


  22..22..  EExxeerrcciicceess

  Une bonne façon 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 coûtera
  pas très cher. Posez la question autour de vous, quelqu'un pourrait
  bien vous donner une partie des pièces 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
  téléchargez, 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 intéressant 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
  hexadécimal. Cette image fait 512 octets de long. Exactement la
  longueur d'un secteur. Trouvez-y le nombre magique 0xAA55. Faites la
  même 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 à paramétrer if
  (fichier source) et of (fichier destination) comme il faut !

  Essayez d'en extraire le code source du chargeur de LILO.


  22..33..  PPlluuss dd''iinnffoorrmmaattiioonnss..


  ·  Les notions fondamentales d'Unix et d'Internet
     <http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals-
     HOWTO.html>, par Eric S. Raymond, miroirs français 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 particulièrement 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'amorçage (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 manière de faire
     évoluer (upgrader) son PC.


  33..  LLiilloo

  Lorsque l'ordinateur charge le secteur d'amorce d'un système sous
  Linux normal, ce qu'il charge est en fait un partie de LILO, appelée
  "first stage boot loader" (chargeur de boot de premier niveau). Il
  s'agit d'un mini programme dont la seule tâche est de charger et
  d'exécuter le ``second stage boot loader'' (chargeur de boot de
  deuxième niveau).


  Le "second stage loader" vous donne une invite de commande (s'il a été
  installé de cette manière) et charge le système d'exploitation de
  votre choix.


  Lorsque votre système est monté et en état de marche, et que vous
  exécutez lilo, ce que vous exécutez en réalité 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 systèmes d'exploitation qu'il peut charger.


  Il y a de nombreuses manières de rendre votre système bootable. Celle
  que je viens de décrire est la manière la plus évidente et
  ``normale'', au moins pour une machine dont le système 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.


  33..11..  CCoonnffiigguurraattiioonn

  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 caractéristique de lilo.conf est
  qu'il existe une entrée pour chaque chose que Lilo doit booter. Pour
  une entrée Linux, cela inclut l'endroit où se trouve le kernel, et la
  partition à monter à la racine du système de fichier (``filesystem'').
  Pour les autres systèmes, la principale information est la partition
  sur laquelle booter.


  33..22..  EExxeerrcciicceess

  _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 système
  inutilisable. Assurez-vous que vous avez une disquette de réparation
  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 réparation que j'utilise et recommande.  La meilleure des
  précautions est d'utiliser une machine qui ne contienne pas de données
  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 prêt 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 système sur une disquette. C'est sûrement
  la deuxième 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 défi supplémentaire, 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 !


  33..33..  PPlluuss dd''iinnffoorrmmaattiioonnss



  ·  La page de man de Lilo

  ·  Le package Lilo (voir ``downloads'') contient le ``LILO User's
     Guide'' lilo-u-21.ps.gz (ou plus récent).  Il se peut que vous ayez
     quand même déjà 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 français en VO
     <http://www.linuxfr.org/LDP/HOWTO/Bootdisk-HOWTO> et VF
     <http://www.freenix.org/unix/linux/HOWTO/Bootdisk-HOWTO.html>.





  44..  LLee nnooyyaauu LLiinnuuxx


  Le noyau (kernel) fait vraiment beaucoup de choses. Je pense qu'une
  bonne manière de résumer tout cela est de dire qu'il fait faire au
  hardware ce que les programmes veulent, proprement et efficacement.


  Le processeur ne peut exécuter qu'une seule instruction à la fois,
  mais Linux semble faire tourner beaucoup de choses simultanément. Le
  noyau accomplit cela en sautant de tâche en tâche très rapidement. Il
  fait le meilleur usage possible du processeur en gardant trace des
  processus qui sont prêts à être exécutés et de ceux qui attendent
  quelque chose comme un enregistrement en provenance d'un disque, ou
  une saisie clavier quelquonque. Cette tâche du noyau est appelée
  "scheduling" (planification).


  Si un programme ne fait rien, alors il n'a pas besoin d'être en RAM.
  Même 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 utilisées. Les pages qui ne sont pas autant utilisées peuvent
  être déplacées dans la partition d'échange (swap). Lorsqu'une page est
  à nouveau sollicitée, une autre page inutilisée est retirée de
  l'espace adressable pour lui faire de la place.  Cela s'appelle la
  gestion de la mémoire virtuelle.
  Si vous avez un jour compilé votre propre noyau, vous avez remarqué
  qu'il y a un grand nombre d'options pour des périphériques
  spécifiques. Le noyau contient beaucoup de code spécifique pour
  converser avec l'électronique de tout type, et les présente d'une
  façon 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
  réseau.


  Une fois le noyau chargé, la première chose qu'il fait est de
  rechercher un programme appelé init et l'exécuter.


  44..11..  CCoonnffiigguurraattiioonn

  La majorité de la configuration du noyau est effectuée quand vous le
  construisez, en utilisant make menuconfig, ou make xconfig dans le
  répertoire /usr/src/linux/ (ou là ou se trouvent les sources de votre
  noyau Linux). Vous pouvez réinitialiser le mode vidéo par défaut, la
  racine du système de fichiers, le périphérique de swap et la taille du
  disque virtuel (RAM disk) en utilisant rdev. Ces paramètres ainsi que
  d'autres peuvent aussi être passés au noyau depuis Lilo. Vous pouvez
  indiquer à Lilo les paramètres à passer au noyau soit dans lilo.conf,
  soit à l'invite (prompt) de Lilo.  Par exemple, si vous souhaitiez
  utiliser hda3 comme racine du système de fichiers plutôt que hda2,
  vous pourriez taper :


          LILO: linux root=/dev/hda3




  Si vous mettez en place un système à partir de ses sources, vous
  pouvez vous simplifier la vie en créant un noyau "monolithique",
  c'est-à-dire sans module. Vous n'aurez donc pas à copier ceux-ci sur
  le système cible.


  NOTE : Le fichier System.map est utilisé par le logger (le journal
  système, qui enregistre les messages de service) du noyau pour
  déterminer les noms des modules générant des messages. Le programme
  top utilise également ces informations. Lorsque vous copiez le noyau
  vers un système cible, copiez aussi System.map.


  44..22..  EExxeerrcciicceess

  Réfléchissez à ceci : /dev/hda3 est un type de fichier spécial qui
  décrit une partition d'un disque dur. Mais il vit sur le système de
  fichiers comme tous les autres fichiers. Le noyau veut savoir quelle
  partition monter à la racine - donc il n'a pas encore de système 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 réduire la taille de
  votre noyau avant qu'il ne cesse de fonctionner. Vous pouvez apprendre
  beaucoup en écartant les parties qui ne sont pas nécessaires.
  Lisez ``The Linux Kernel'' (URL plus bas) et ce faisant, trouvez les
  parties du source auxquelles il se réfère. Le livre (au moment où
  j'écris ces lignes) se réfère au noyau version 2.0.33, qui devient
  franchement dépassé.  Il pourrait être plus facile de suivre si vous
  téléchargiez cette ancienne version et y lisiez le source. Il est très
  excitant de trouver des morceaux de code C appelés ``process'' et
  ``page''.


  Programmez ! Faites des essais ! Voyez si vous pouvez faire cracher au
  noyau des messages supplémentaires ou quelque chose du même genre.



  44..33..  PPlluuss dd''iinnffoorrmmaattiioonnss


  ·  /usr/src/linux/README et le contenu de
     /usr/src/linux/Documentation/ (Ces emplacements peuvent varier sur
     votre système)

  ·  Le Kernel-HOWTO
     <http://mirror.aarnet.edu.au/linux/LDP/HOWTO/Kernel-HOWTO.html>
     (miroirs français 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 français en VO
     <http://www.linuxfr.org/LDP/LDP>)

  ·  Téléchargement des sources voir ``téléchargements''



  55..  LLaa bbiibblliiootthhèèqquuee CC ddee GGNNUU

  L'étape suivante qui se produit au démarrage de votre ordinateur est
  le chargement d'init et son exécution. Cependant, init, comme la
  plupart des programmes, utilise des fonctions issues de bibliothèques.


  Vous avez peut-être déjà vu un exemple de programme C comme celui-ci :



          main() {
                  printf("Hello World!\n");
          }



  Le programme ne définit nullement printf, alors d'où vient-il ?  Il
  provient des bibliothèques C standard ("standard C libraries"), sur un
  système GNU/Linux, glibc. Si vous les compilez sous Visual C++, alors
  il provient d'une implémentation Microsoft de ces mêmes fonctions
  standard.  Il existe des milliers de ces fonctions standard, pour les
  mathématiques (math), la gestion des chaînes de caractères (string),
  l'heure et la date, l'allocation de mémoire 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 système Linux, vous verrez
  un grand nombre de fichiers appelés libquelquechose.so ou
  libquelquechose.a etc. Ce sont les bibliothèques de ces fonctions.
  Glibc est simplement l'implémentation GNU de ces fonctions.


  Les programmes peuvent utiliser ces fonctions de deux manières. si
  vous "linkez" (NDT : "éditez les liens", opération qui consiste à
  établir les relations avec les différents objets sollicités par le
  programme, puis à créer l'exécutable) _s_t_a_t_i_q_u_e_m_e_n_t, ces fonctions
  seront copiées à l'intérieur de l'exécutable généré. C'est à ça que
  servent les bibliothèques libquelquechose.a. Si vous linkez votre
  programme _d_y_n_a_m_i_q_u_e_m_e_n_t (effectué par défaut), lorsque le programme
  aura besoin du code d'une bibliothèque, il ira l'extraire directement
  du fichier libquelquechose.so


  La commande ldd vous apporte une aide précieuse lorsque vous cherchez
  à retrouver les bibliothèques utilisées par un programme particulier.
  Par exemple, voici les bibliothèques utilisées 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)




  55..11..  CCoonnffiigguurraattiioonn

  Certaines fonctions, dans leur bibliothèque, dépendent du lieu où vous
  vous trouvez. Par exemple, en français, on écrit les dates sous la
  forme dd/mm/yy, mais les américains les écrivent mm/dd/yy. Il existe
  un programme livré avec glibc appelé localdef qui vous donne la
  possibilité de définir cela.


  55..22..  EExxeerrcciicceess

  Utilisez ldd pour déterminer les bibliothèques qu'utilise votre
  application préférée.


  Utilisez ldd pour déterminer les bibliothèques utilisées par init.


  Créez une bibliothèque gadget, avec seulement une ou deux fonctions
  dedans.  On utilise le programme ar pour les créer. La page de manuel
  d'ar pourrait être un bon point de départ pour commencer à enquêter
  sur la manière dont cette opération est effectuée. Ecrivez, compilez,
  et linkez un programme utilisant cette bibliothèque.



  55..33..  PPlluuss dd''iinnffoorrmmaattiioonnss


  ·  Code source, voir la section ``téléchargements''





  66..  IInniitt

  Je ne parlerai que du style d'initialisation ``System V'' que les
  systèmes Linux utilisent le plus souvent. Il existe des alternatives.
  En fait, vous pouvez mettre n'importe quel programme dans /sbin/init,
  que le noyau exécutera lorsqu'il aura fini de se charger.


  Le travail d'init est de faire en sorte que tout se lance comme il
  faut. Il vérifie que les systèmes de fichier sont en bon état et les
  monte. Il démarre les démons (``daemons'') qui enregistrent les
  messages système, gèrent le réseau, distribuent les pages web,
  écoutent les signaux de la souris, etc. Init démarre 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'exécution ("run-levels"), mais je vais sauter tout ça, et ne parler
  que du démarrage du système.


  Init lit le fichier /etc/inittab, qui lui dit quoi faire.
  Typiquement, la première chose demandée est l'exécution d'un script
  d'initialisation. Le programme qui exécute (ou interprète) ce script
  est bash, le même programme qui vous donne la ligne de commande.  Sur
  les systèmes Debian, le script d'initialisation est /etc/init.d/rcS,
  sur Red Hat, /etc/rc.d/rc.sysinit.  C'est là que les systèmes de
  fichiers sont vérifiés puis montés, l'horloge mise à l'heure, le
  fichier ou la partition d'échange (swap) activés, les noms de machines
  définis, etc.



  Ensuite, un autre script est invoqué pour nous placer dans le niveau
  d'exécution par défaut. Cela implique simplement le démarrage d'un
  ensemble de sous-systèmes. Il existe un ensemble de sous-répertoires
  /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'exécution 3 sur un
  système Debian, le script exécute tous les scripts de /etc/rc3.d
  commençant par `S' (pour Start). Ces scripts sont en réalité des liens
  vers un autre répertoire appelé généralement init.d.


  Donc, le script de notre niveau d'exécution est appelé par init, et
  recherche dans un répertoire des scripts dont le nom débute 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 commençant par S00 ... S09. Mais S10syslog est en fait
  un lien vers /etc/init.d/syslog qui est un script chargé du démarrage
  et de l'arrêt du system logger (enregistreur de messages systèmes).
  Parce que le lien commence par un `S', le script du run-level sait
  qu'il doit exécuter le script syslog avec le paramètre "start". Il y a
  aussi des liens dont le nom débute par `K' (pour Kill), qui spécifient
  ce qu'il faut arrêter, et dans quel ordre, lorsque l'on entre dans le
  niveau d'exécution.



  Pour changer ce que le sous-système lance par défaut, vous devez
  configurer ces liens dans le répertoire rcN.d, ou N est le niveau
  d'exécution par défaut défini dans votre fichier inittab.


  La dernière chose importante qu'effectue init est de démarrer les
  gettys [NdRel :en pratique, souvent des mingettys)].  Ceux-ci sont
  ressuscités (``respawned''), ce qui signifie qu'ils sont
  automatiquement relancés 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 mémoire, 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.



  66..11..  CCoonnffiigguurraattiioonn

  /etc/inittab, qui est le fichier de configuration au sommet de la
  "hiérarchie" des fichiers de configuration.


  Les répertoires rcN.d, où N = 0, 1,..., 6 détermine les sous-systèmes
  à lancer.


  Quelque part dans les scripts invoqués par init, se trouve la commande
  mount -a.  Cela signifie : "Monte tous les systèmes de fichiers censés
  être montés".  Le fichier /etc/fstab définit ce qui est censé être
  monté. Si vous souhaitez changer ce qui est monté par défaut au
  démarrage, c'est le fichier que vous devez modifier. Il existe une
  page de manuel pour fstab.


  66..22..  EExxeerrcciicceess


  Trouvez le répertoire rcN.d du niveau d'exécution par défaut de votre
  système puis faites un ls -l pour voir les fichiers pointés par les
  liens.


  Changez le nombre de gettys tournant sur votre système.


  Retirez tous les sous-systèmes dont vous n'avez pas besoin de votre
  niveau d'exécution par défaut.


  Essayez de déterminer le minimum nécessaire pour démarrer.


  Fabriquez une disquette avec Lilo, un noyau et un programme statique
  affichant "Bonjour tout le monde !" nommé /sbin/init, puis regardez-la
  démarrer et dire bonjour.


  Regardez attentivement votre système démarrer, et notez les événements
  signalés. Ou imprimez une section de votre journal système
  /var/log/messages à partir du moment où votre système a démarré.
  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 compliqués. Ayez un bon guide de
  bash à portée de main (NDT : "man bash" devrait suffire, faute de
  mieux).


  66..33..  PPlluuss dd''iinnffoorrmmaattiioonnss..


  ·  Voir ``téléchargements'' pour télécharger 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 Système Linux contient une section
     <http://mirror.aarnet.edu.au/linux/LDP/LDP/> intéressante
     concernant init (miroir français en VO
     <http://www.linuxfr.org/LDP/LDP>).



  77..  LLee ssyyssttèèmmee ddee ffiicchhiieerrss ((ffiilleessyysstteemm))

  Dans cette section, j'emploierai l'expression ``système de fichiers''
  pour deux notions différentes.  Il y a les systèmes de fichiers
  installés sur des partitions de disque ou d'autres périphériques, et
  il y a le système de fichier (NdRel : la hiérarchie)  tel qu'il vous
  est présenté par un système Linux en état de marche. Sous Linux, vous
  "montez" le système de fichiers d'un disque sur le système de fichiers
  du système.


  Dans la section précédente, j'ai mentionné le fait que des scripts
  d'initialisation vérifiaient et montaient les systèmes de fichiers.
  Les commandes qui effectuent ces opérations sont respectivement fsck
  et mount.


  Un disque dur n'est qu'un grand espace dans lequel vous pouvez écrire
  des zéros et des uns. Un système de fichiers impose une structure à
  tout cela, et le présente sous la forme de fichiers, à l'intérieur de
  sous-répertoires, à l'intérieur de répertoires... Chaque fichier est
  répresenté par un inode, indiquant le fichier dont il s'agit, la date
  de sa création, et où trouver son contenu. Les répertoires sont aussi
  représentés par des inodes, mais ceux-ci indiquent où trouver les
  inodes des fichiers que les repértoires contiennent. Si le système
  veut lire /home/greg/bigboobs.jpeg, il commence par lire l'inode du
  répertoire racine / dans le ``superblock'', puis trouve l'inode du
  répertoire home dans le contenu de /, puis trouve l'inode du
  répertoire 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 données à la fin d'un fichier, il peut arriver
  que les données soient écrites avant que l'inode ne soit mis à jour
  (indiquant que le nouveau bloc appartient désormais au fichier), ou
  vice-versa. Si le courant est coupé à cet instant précis, le système
  de fichiers sera "cassé".  C'est ce genre de chose que fsck essaie de
  détecter et de réparer.


  La commande mount prend le système de fichiers d'un périphérique, et
  l'ajoute à la hiérarchie de fichiers de votre système. En général le
  noyau monte son système de fichiers racine en lecture seule (read-
  only).  La commande mount est ensuite utilisée pour le remonter en
  lecture-écriture (read-write) après que fsck ait vérifié que tout soit
  en ordre.


  Linux prend aussi en charge d'autres types de systèmes de fichiers :
  msdos, vfat, minix, etc. Les détails d'un système de fichiers
  spécifique sont masqués par le Système de Fichier Virtuel (Virtual
  File System ou VFS) qui est une couche d'abstraction. Je ne rentrerai
  pas dans ces détails. Il existe une discussion sur ce sujet dans ``Le
  Kernel Linux'' (voir la section ``Le Noyau Linux'' pour l'URL)


  77..11..  CCoonnffiigguurraattiioonn

  Il existe des paramètres à la commande mke2fs, chargée de la création
  d'un système de fichiers de type ext2. Ils contrôlent la taille des
  blocs, le nombre d'inodes, etc. Voir la man page de mke2fs pour plus
  de détails.


  Ce qui doit être monté sur votre système de fichiers est contrôlé par
  le fichier /etc/fstab, qui a lui aussi sa page de manuel.


  77..22..  EExxeerrcciicceess

  Fabriquez un tout petit système de fichiers, et visualisez-le avec un
  éditeur hexadécimal. 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 système de fichiers. Trouvez-en un, essayez-le, et envoyez moi
  l'url par email avec vos appréciations !


  Explorez le code du système de fichiers ext2 dans le noyau.


  77..33..  PPlluuss dd''iinnffoorrmmaattiioonnss


  ·  Le chapitre 9 du livre ``Le noyau linux'' du LDP donne une
     excellente description des systèmes de fichiers. Vous pouvez le
     trouver sur le site LDP : miroir français
     <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 ``téléchargements''.

  ·  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
     systèmes de fichiers d'Unix.  Ce document décrit où doit se trouver
     quoi, dans un système Unix, et pourquoi. Il indique aussi le
     minimum nécessaire à placer dans /bin, /sbin, etc. C'est une bonne
     référence si votre objectif est un système minimal mais complet.




  88..  DDéémmoonnss nnooyyaauu

  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'exécution sur le système.
  Remarquez que init est le processus numéro un. Les processus 2, 3,4 et
  5 sont kflushd, kupdate, kpiod et kswapd. Il y a quand même quelque
  chose d'étrange : dans les deux colonnes de la taille virtuelle de
  stockage (SIZE) et la taille réelle de stockage (Real Storage Size,
  RSS), ces processus renvoient zéro. Comment un processus peut-il ne
  pas utiliser de mémoire ?  En réalité, ces processus font partie du
  noyau. Le noyau, lui, n'apparaît pas du tout sur la liste des
  processus, et vous ne pouvez définir la mémoire utilisée qu'en
  soustrayant la mémoire disponible du total installé sur votre système.
  Les parenthèses autour du nom de commande pourraient signifier qu'il
  s'agit d'un processus noyau (?)


  kswapd déplace des parties d'un programme non utilisées à un instant
  donné de l'espace de stockage réel (c'est-à-dire la RAM) vers l'espace
  de swap (c'est-à-dire le disque dur). kflushd écrit les données des
  buffers vers le disque. Ceci permet aux choses d'aller plus vite. Ce
  que les programmes écrivent peut être conservé en mémoire, dans un
  buffer, puis écrit sur le disque par morceaux plus larges et de façon
  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
  démons ? Pourquoi les démons noyau ont-ils des numéros de processus
  explicites plutôt que d'être simplement des bouts de code anonymes ?
  Est-ce qu'init les lance effectivement, ou tournent-ils déjà lorsque
  init apparaît ?


  J'ai mis dans /sbin/init un script pour monter /proc et faire un ps
  aux. Le processus 1 était le script lui-même, et les processus 2, 3, 4
  et 5 étaient les démons noyau, juste au dessous du vrai init. Le noyau
  les a forcément mis là, car ce n'est sûrement pas mon script qui l'a
  fait.


  Les hypothèses suivantes viennent de David Leadbeater :


  Ces processus semblent s'occuper des accès disque, ils semblent être
  lancés par le noyau, mais après avoir lancé le processus init. Il
  semble qu'en étant lancés comme des processus noyau plutôt que comme
  des processus séparés, ils soient protégés et ne peuvent être tués
  (kill -9 ne les arrête pas), je ne sais pas vraiment pourquoi ils sont
  lancés en tant que threads séparés. Il semble y avoir un rapport avec
  les accès disque.


  _k_f_l_u_s_h_d _e_t _k_u_p_d_a_t_e Ces deux processus sont démarrés pour vider les
  buffers "sales" (c'est-à-dire modifiés) vers le disque. kflushd est
  lancé quand les buffers sont pleins et kupdate se lance périodiquement
  (5 secondes ?) pour synchroniser les disques avec les buffers en
  mémoire.


  _k_p_i_o_d _e_t _k_s_w_a_p_d Ils ont pour tâche l'exportation de pages (sections)
  de mémoire vers le fichier d'échange de façon à ce que la mémoire
  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é périodiquement (à 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 défaut de RedHat 6, kupdate a disparu mais
  udpate tourne en tant que démon dans l'espace utilisateur, et il
  semble qu'il ait besoin d'être lancé. Il y a également un autre démon,
  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 séparés.


  Je ne connais toujours pas la signification des parenthèses, mais
  elles semblent apparaître quand la RSS d'un processus est à zéro, ce
  qui signifie qu'il n'utilise pas de mémoire (?).


  (fin de citation, merci David)



  88..11..  CCoonnffiigguurraattiioonn

  Je n'ai pas connaissance d'une configuration de ces démons noyau.


  88..22..  EExxeerrcciicceess

  Trouvez à quoi servent ces processus, comment ils fonctionnent, et
  écrivez une nouvelle section `Démons Noyau'' pour ce document, et
  envoyez-la moi !





  88..33..  PPlluuss dd''iinnffoorrmmaattiioonnss

  ``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.



  99..  LLee jjoouurrnnaall ssyyssttèèmmee ((SSyysstteemm LLooggggeerr))

  Init démarre les démons syslogd et klogd. Ils écrivent les messages à
  consigner dans le journal. Les messages du noyau sont pris en main par
  klogd, alors que syslogd gère 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 système. Vous
  y trouverez souvent de précieux indices.



  99..11..  CCoonnffiigguurraattiioonn

  Le fichier /etc/syslog.conf indique au logger où mettre quels
  messages. Les messages sont identifiés 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 réservé pour faire
  de l'enregistrement de messages à distance, ou si même
  l'enregistrement local se fait à travers un port, ou même s'il se
  contente d'utiliser /etc/services pour convertir les noms de services
  indiqués dans /etc/syslog.conf en numéros de port.


  99..22..  EExxeerrcciicceess

  Jetez un oeil à votre journal système. 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).



  99..33..  PPlluuss dd''iinnffoorrmmaattiioonnss

  Le miroir
  <http://mirror.aarnet.edu.au/pub/linux/metalab/system/daemons/>
  australien de sysklogd.




  1100..  GGeettttyy eett LLooggiinn

  Getty est le programme qui vous permet de vous connecter à travers un
  périphérique série, 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 vérifie, puis vous donne le shell.

  Il existe plusieurs getty disponibles. Certaines distributions, comme
  Red Hat, en utilisent un très petit appelé mingetty et qui ne gère 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.


  1100..11..  CCoonnffiigguurraattiioonn

  Le message qui apparaît en haut de votre écran avec l'invite de login
  provient du fichier /etc/issue. Les getty sont en général démarrés
  depuis /etc/inittab. Login recherche les détails spécifiques à
  l'utilisateur dans /etc/passwd, et si vous avez le shadowing (une
  protection des mots de passe), dans /etc/shadow.


  1100..22..  EExxeerrcciicceess

  Créez un fichier /etc/passwd à la main. Les mots de passe peuvent être
  nuls, puis changés 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 plutôt que celle du programme.




  1111..  BBaasshh

  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 système 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'interpréteur d'un langage de programmation.


  Dans son rôle d'interface, il lit vos commandes, et les exécute lui-
  même si ces commandes sont ``internes'', comme cd, ou bien trouve et
  exécute 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 complètement automatique des
  noms de fichiers (avec la touche de tabulation).


  Nous avons déjà vu bash à l'action dans son rôle de langage de
  programmation. Les scripts qu'init lance pour démarrer le système sont
  généralement des scripts shell, et sont exécutés par bash.  Avoir un
  langage de programmation propre, parallèlement aux utilitaires
  systèmes disponibles depuis la ligne de commande forme une combinaison
  très puissante, si vous savez ce que vous faites. Par exemple
  ("séquence frime" !)  j'ai eu besoin l'autre jour d'appliquer une pile
  entière de correctifs (patches) à un répertoire 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 répertoire 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 exécute les commandes
  invoquées entre do et done. Il y avait en l'occurence 11 correctifs,
  mais il aurait pu aussi bien y en avoir 3000.


  1111..11..  CCoonnffiigguurraattiioonn

  Le fichier /etc/profile agit sur le comportement de bash au niveau du
  système entier. Ce que vous mettez dans ce fichier affectera toute
  personne qui utilise bash sur votre système. Cela sert par exemple à
  ajouter des répertoires dans la variable PATH, ou à définir celui de
  la variable MAIL.


  Le comportement par défaut du clavier laisse souvent à désirer. En
  fait, c'est readline qui contrôle cela. Readline est un package
  distinct qui prend en main les interfaces de ligne de commande, en
  fournissant l'historique des commandes, et le complètement automatique
  de noms de fichiers (NDT : Touche TAB sous Bash), tout comme les
  facilités évoluées d'édition de ligne. Il est compilé dans bash. Par
  défaut, Readline est configuré à l'aide du fichier .inputrc, dans
  votre répertoire personnel. La variable INPUTRC peut être utilisée
  pour outrepasser les règles de ce fichier pour le bash. Par exemple,
  dans Red Hat 6, INPUTRC reçoit la valeur /etc/inputrc dans le fichier
  /etc/profile. Cela signifie que les touches Retour Arrière
  (Backspace), Suppr (Delete), Début (Home) et Fin (End) fonctionnent
  correctement et pour tout le monde.


  Une fois que bash a lu le fichier de configuration général, commun au
  système entier, il recherche votre fichier de configuration personnel.
  Il teste l'existence des fichiers .bash_profile, .bash_login et
  .profile dans votre répertoire 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
  contrôler 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.



  1111..22..  EExxeerrcciicceess

  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 façons de faire les choses.


  Lisez des scripts shell, analysez les choses que vous ne comprenez
  pas.


  1111..33..  PPlluuss dd''iinnffoorrmmaattiioonnss


  ·  Téléchargement du code source, voir ``téléchargements''

  ·  Il existe un ``Manuel de Référence 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.



  1122..  LLeess ccoommmmaannddeess

  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 intégrées au
  shell.


  Les commandes viennent de packages, la plupart de la Free Software
  Foundation (projet GNU). Plutôt que de dresser ici la liste des
  packages, je préfère vous renvoyer vers le Linux From Scratch HOWTO
  <http://www.linuxfromscratch.org>.  Il contient une liste complète et
  à jour de tous les packages allant dans un système Linux, aussi bien
  que des indications pour les construire.



  1133..  CCoonnssttrruuiirree uunn ssyyssttèèmmee LLiinnuuxx mmiinniimmuumm àà ppaarrttiirr ddeess ssoouurrcceess..

  Nous nous sommes concentrés jusqu'ici sur ce que les packages font. Je
  vais vous donner ici tout les indices que je peux pour fabriquer un
  système Linux de base à partir des sources. Si vous voulez monter un
  vrai système 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 décris est un système de base,
  sans embûche, qui peut être monté facilement.



  1133..11..  CCee qquu''iill vvoouuss ffaauutt

  Nous installerons une distribution de Linux comme Red Hat sur une
  partition, et l'utiliserons pour construire un nouveau système Linux
  sur une autre partition. Je nommerai par la suite ``cible'' le système
  que nous construisons, et ``source'' le système que nous utilisons
  pour construire le système 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 système Linux déjà existant comme
  système source, mais je le déconseille. Si vous oubliez un des
  paramètres des commandes que nous allons saisir, vous pourriez
  accidentellement réinstaller des choses sur votre système source. Cela
  peut mener à des incompatibilités, 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 mégaoctets. Ce n'est pas vraiment
  un problème pour Linux, qui gère lui-même les disques une fois lancé.
  Mais pour que Linux soit chargé sur ces vieilles machines, le noyau
  doit résider quelque part en dessous de 512 mégaoctets. Si vous
  utilisez une de ces machines, vous devez créer une partition distincte
  en dessous de 512 Mo, à monter sur /boot pour toute partition au
  dessus de la limite des 512 Mo.

  La dernière fois que je l'ai fait, j'ai utilisé Red Hat 6.1 comme
  système source. J'ai installé le système 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 nécessaire. A la
  fin de mon travail, cela avait pris environ 350M d'espace disque (Cela
  semble un peu élevé, je me demande pourquoi).


  Le système cible achevé prenait 650M, mais comprenait tout le code
  source et les fichiers intermédiaires. Si l'espace est limité, je vous
  conseille de faire un make clean après la construction de chaque
  package. Cela dit, c'est une source d'ennuis et d'hésitation.


  Enfin, vous allez avoir besoin du code source du système 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 américains 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 listés sur home page
     <http://www.kernel.org> plutôt 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 bibliothèque elle-même, 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
     américaines sur l'exportation, vous pouvez la récupérer sur
     libcrypt <ftp://ftp.gwdg.de/pub/linux/glibc> les add-ons
     linuxthreads sont au même 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 résumer, il vous faut :

  ·  Une machine avec deux partitions distinctes d'environ 400M et 700M
     respectivement, bien que vous puissiez sûrement 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 concaténés en un seul, puis compressé ou non ensuite) du
     code source, listées ci-dessus.


  Je pars du principe que vous pouvez installer le système source vous-
  même, sans aide de ma part. A partir de maintenant, je considère que
  c'est fait.


  Les premiers pas de ce projet consistent à faire démarrer 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 même correctement,
  nous avons besoin d'installer les fichiers spéciaux dans le /dev du
  système cible.  Lilo en a besoin pour effectuer les accès bas niveau
  au disque, nécessaire pour écrire le secteur d'amorce. MAKEDEV est le
  script qui crée ces fichiers spéciaux (Vous pourriez bien sûr les
  recopier depuis le système source, mais ce serait tricher !). Mais
  d'abord, il nous faut un système de fichiers pour les mettre dedans.



  1133..22..  LLee ssyyssttèèmmee ddee ffiicchhiieerr ((FFiilleessyysstteemm))

  Notre nouveau système a besoin d'un système de fichiers pour vivre.
  Donc, il nous faut tout d'abord créer ce système de fichiers en
  utilisant mke2fs. Ensuite il faut le monter quelque part. Je vous
  suggère /mnt/target (comme `cible'). Dans ce qui va suivre, je
  considère que votre système se trouve à cet endroit. Vous pouvez
  gagner un peu de temps en ajoutant une entrée dans /etc/fstab de façon
  à ce que le montage de votre système destination soit automatique
  lorsque votre système source démarre.


  Lorsque nous démarrerons le système cible, ce qui se trouve dans
  /mnt/target se trouvera alors dans / (à la racine).

  Nous avons besoin d'une structure de sous-répertoires sur la cible.
  Jetez un oeil au Standard de la Hiérarchie des Fichiers (File
  Hierarchy Standard, voir section ``Système de Fichiers'').  pour
  trouver vous même ce qu'elle devrait être, ou faites simplement un cd
  vers l'endroit où la cible est montée et tapez aveuglément :



          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




  1133..33..  MMAAKKEEDDEEVV

  Nous mettrons le code source dans le répertoire /usr/src cible.  Aussi
  si votre système 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 décompresser ;-)


  En principe, lorsque vous installez un logiciel, vous l'installez sur
  le système en fonctionnement. En l'occurence, ce n'est pas notre
  intention, nous souhaitons l'installer comme si /mnt/target était le
  système de fichiers racine.  Les différents packages ont différentes
  manières 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 définie dans cette commande. Ensuite
  jetez un oeil à la page de manuel en faisant un man ./MAKEDEV.man pour
  voir comment il fonctionne. Vous découvrirez que la méthode utilisée
  pour ces fichiers spéciaux consiste à faire un cd /mnt/target/dev puis
  un ./MAKEDEV generic. Faites un ls pour découvrir tous les merveilleux
  fichiers spéciaux qu'il a créés pour vous !


  1133..44..  LLee nnooyyaauu ((kkeerrnneell))

  Ensuite, nous devons fabriquer un noyau. Je considère que vous l'avez
  déjà fait, aussi serai-je bref. Il est plus facile d'installer Lilo si
  le noyau censé être monté est déjà là. Retournez dans le répertoire
  /usr/src de la cible, et décompressez-y les sources du noyau linux.
  Entrez dans l'arborescence des sources (cd linux) et configurez le
  noyau, en utilisant votre méthode préférée, 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 système System.map vers le
  répertoire de boot de la cible /mnt/target/boot, et nous seront prêts
  à installer Lilo.


  1133..55..  LLiilloo

  Lilo est livré avec un très beau script nommé QuickInst.  Décompressez
  les sources de Lilo dans le répertoire des sources du système cible,
  lancez ce script par la commande ROOT=/mnt/target ./QuickInst. Il vous
  posera plusieurs questions concernant la manière 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 défaut, répondez
  /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 même.


  Comment doit-on s'y prendre pour expliquer à QuickInst où installer le
  secteur de boot ? Quand nous redémarrons, nous voulons avoir le choix
  de démarrer le système source ou le système cible, ou encore n'importe
  quel autre système présent sur la machine. Et nous souhaitons que
  l'instance de Lilo que nous mettons en place maintenant lance le noyau
  de notre nouveau système. Comment est-ce que l'on réalise ces deux
  choses ? Ecartons-nous un moment du sujet et étudions la façon dont
  Lilo démarre DOS sur un système Linux en dual-boot. Le fichier
  lilo.conf d'un tel système doit sûrement 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 configurée de cette façon, 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 même chose, mis à part que
  le secteur d'amorce d'hda2 va être un autre secteur d'amorce Lilo -
  celui-là même 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 bâti.  Vous verrez alors deux invites
  de commande Lilo au redémarrage.


  Pour raccourcir une longue histoire, lorsque QuickInst vous demande où
  placer le secteur de boot, indiquez-lui l'endroit où se trouve votre
  système de fichiers cible, par exemple /dev/hda2.


  Maintenant modifiez le fichier lilo.conf de votre système source, de
  façon à ce qu'il ait une ligne ressemblant à:



  other = /dev/hda2
          label = target



  Lancez Lilo, et nous devrions être capables de faire notre premier
  démarrage sur le système cible.


  1133..66..  GGlliibbcc

  L'étape suivante consiste à installer init, mais comme la plupart des
  programmes qui tournent sous Linux, init utilise des fonctions issues
  de la bibliothèque C GNU, glibc. Aussi l'installerons-nous en premier.


  Glibc est un package très gros et très compliqué. Il faut 90 heures
  pour le bâtir 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 mémoire est le principal critère dans notre cas. Si vous n'avez que
  8Mo de RAM (ou - j'en tremble - encore moins !), préparez vous à une
  très longue compilation.


  La documentation d'installation de glibc recommande une construction
  dans un répertoire distinct. Cela vous permet de recommencer
  facilement, en supprimant simplement ce répertoire. Cela vous permet
  aussi d'économiser 265Mo d'espace disque.


  Décompressez l'archive glibc-2.1.3.tar.gz (ou n'importe quelle autre
  version) dans /mnt/target/usr/src comme d'habitude. A présent, nous
  devons décompresser les ``add-on'' dans le répertoire de la glibc.
  Donc, faites un cd glibc-2.1.3, puis décompressez à cet endroit les
  archives glibc-crypt-2.1.3.tar.gz et glibc-linuxthreads-2.1.3.tar.gz.


  Maintenant, nous pouvons créer le répertoire de construction,
  configurer, bâtir et installer glibc. Voici les commandes que j'ai
  utilisées, mais relisez vous-même 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 connaître
  l'espace disque qu'il vous reste par un df. Vous pouvez en faire un
  autre après avoir bâti et installé glibc pour en déduire 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 façon de dire au package
  l'endroit où s'installer.


  1133..77..  SSyyssVViinniitt

  Bâtir et installer les binaires de SysVinit est assez direct.  Je me
  contenterai d'être paresseux et de vous donner les commandes, en
  considérant que vous avez décompressé son code source, et que vous
  êtes entré dans son répertoire.



   cd src
   make
   ROOT=/mnt/target make install




  Il existe aussi beaucoup de scripts associés à 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 organisés dans une hiérarchie sous debian/etc dans l'arborescence
  du code source de SysVinit. Vous pouvez recopier toute cette
  hiérarchie dans le répertoire etc du système 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 désormais en place pour permettre au noyau cible de lancer
  init au redémarrage. Le problème, cette fois, viendra des scripts qui
  ne pourront être exécutés car bash ne sera pas là pour les
  interpréter. init tentera également de lancer des getty, qui sont
  inexistants eux aussi. Rebootez maintenant, et assurez-vous que tout
  le reste fonctionne correctement.
  1133..88..  NNccuurrsseess

  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 manière de gérer les écrans texte, mais
  apporte également une compatibilité ascendante en prenant en charge
  les appels termcap. Dans l'objectif d'avoir un système moderne, simple
  et propre, je pense que le mieux est de désactiver l'ancienne méthode
  termcap. Vous pourriez par la suite rencontrer des problèmes avec des
  applications utilisant termcap, mais au moins vous connaîtrez les
  éléments qui l'utilisent. Si vous en avez besoin, vous pouvez
  recompiler ncurses avec prise en charge de termcap.


  Les commandes que j'ai utilisées sont :



          ./configure --prefix=/usr --with-install-prefix=/mnt/target --with-shared --disable-termcap
          make
          make install




  1133..99..  BBaasshh

  Il m'a fallu beaucoup de lecture, de réflexion, 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 utilisées sont :



   ./configure --prefix=/mnt/target/usr/local --exec-prefix=/mnt/target --with-curses




  Une fois que vous avez bâti et installé Bash, vous devez créer un lien
  symbolique comme ceci : cd /mnt/target/bin; ln -s bash sh.  Cela est
  dû au fait que les scripts débutent généralement 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 redémarrer à ce point si vous le souhaitez. Vous devriez
  remarquer que les scripts peuvent maintenant s'exécuter, bien que vous
  ne puissiez vous loguer, car il n'y pas encore de programmes getty ou
  login.


  1133..1100..  UUttiill--lliinnuuxx ((ggeettttyy eett llooggiinn))

  Le package util-linux contient agetty et login. Nous avons besoin des
  deux pour nous loguer et obtenir la ligne de commande de bash.  Après
  l'avoir installé, faites un lien symbolique depuis agetty vers getty
  de le répertoire /sbin du système cible.  getty est un des programmes
  censés se trouver sur tous les systèmes de type Unix, donc faire un
  lien est une meilleure idée que de modifier inittab pour qu'il lance
  agetty.


  Il me reste un problème 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 bibliothèque
  de ncurses 5 du système cible, plutôt que sur ncurses 4 du système
  source. Je regarderai cela de plus près.


  Vous aurez aussi besoin d'un fichier /etc/passwd sur le système cible.
  C'est l'endroit où le programme login ira vérifier votre
  accréditation. Comme il ne s'agit que d'un système gadget à ce niveau,
  vous pouvez vous permettre des choses scandaleuses, comme ne définir
  que l'utilisateur root, sans mot de passe ! Mettez le simplement dans
  le fichier /etc/passwd du système cible.




  root::0:0:root:/root:/bin/bash




  Les champs sont séparés par des deux-points, correspondent, de gauche
  à droite, à l'user id (nom de login), au mot de passe (crypté), au
  numéro d'utilisateur, au numéro de groupe, au nom de l'utlisateur, à
  son répertoire personnel, et à son shell par défaut.


  1133..1111..  SShh--uuttiillss

  Le dernier package dont nous ayons besoin est sh-utils GNU.  Le seul
  programme nécessaire à ce niveau est stty, qui est utilisé dans
  /etc/init.d/rc, lui-même utilisé pour changer de niveau d'exécution et
  entrer dans le niveau initial. En fait, je possède 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 système
  pour le rendre vraiment utilisable.


  Eh bien ça y est. Vous devriez maintenant avoir un système qui doit
  démarrer 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 même 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 intéressante que j'ai trouvée à faire avec.


  1133..1122..  VVeerrss ll''uuttiilliissaabbiilliittéé

  Il semblerait que nous ayons là un système plutôt inutilisable. Mais
  en réalité, nous ne sommes pas très loin de pouvoir commencer à
  travailler avec. L'une des premières choses à faire est de rendre le
  système 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 spécifié dans le fichier /etc/fstab. Mettez un lien symbolique
  du genre S05mountall vers lui dans le répertoire etc/rc2.d du système
  cible.


  Il se peut que ce script utilise des commandes que vous n'avez pas
  encore installées. 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 système sérieux. Ajoutez-les un à un, et
  assurez-vous que tout se lance en douceur avant d'en ajouter d'autres.


  Lisez le Standard de la Hiérarchie des Fichiers (voir section
  ``Système de Fichiers'').  Il contient une liste de commandes qui
  devraient être dans /bin et /sbin. Assurez-vous que toutes ces
  commandes sont installées sur votre système.  Mieux encore, trouvez la
  documentation Posix qui spécifie 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 système. Installez les outils de construction
  comme make et gcc le plus tôt possible. Une fois que cela est fait,
  vous pouvez utiliser votre système cible pour se construire lui-même,
  ce qui est bien moins compliqué.


  1133..1133..  AAssttuucceess ddiivveerrsseess

  Si vous avez une commande appelée thingy sur un système 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.


  1133..1144..  PPlluuss dd''iinnffoorrmmaattiioonnss


  ·  Il existe un mini-howto sur la manière de construire les logiciels
     à partir de leurs sources, le Software Building mini-HOWTO
     <http://www.linuxdoc.org/HOWTO/Software-Building-HOWTO.html>
     (miroir français en VO <http://linuxfr.org/LDP/HOWTO/Software-
     Building-HOWTO.html >).



  ·  Il existe aussi un HOWTO sur la manière de construire un système
     Linux depuis zéro. Il met l'accent sur la construction d'un système
     réellement utilisable, plutôt que pour le simple exercice.  The
     Linux From Scratch HOWTO <http://www.linuxfromscratch.org>
  1144..  CCoonncclluussiioonn

  L'un des meilleurs côtés de Linux, à mon humble avis, est que vous
  pouvez entrer dedans et voir réellement comment il fonctionne.
  J'espère que vous apprécierez cela autant que moi. Et j'espère que ces
  quelques notes vous y auront aidé.


  1155..  SSeeccttiioonn aaddmmiinniissttrraattiivvee

  1155..11..  CCooppyyrriigghhtt

  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 Générale (GPL :
  GNU General Public Licence <http://www.gnu.org/copyleft/gpl.html>).
  Merci de conserver les références à l'auteur si vous utilisez tout ou
  partie de ce document dans un autre.


  1155..22..  PPaaggee pprriinncciippaallee

  Les mises à jour de ce document évoluent sur From Powerup To Bash
  Prompt <http://learning.taslug.org.au/power2bash>.




  1155..33..  RReettoouurrss

  J'aimerais recevoir vos commentaires, critiques et suggestions.
  Veuillez s'il vous plaît me les envoyer à Greg O'Keefe
  <mailto:gcokeefe@postoffice.utas.edu.au>



  1155..44..  RRééfféérreenncceess eett rreemmeerrcciieemmeennttss..

  Les noms de produits cités sont marques déposées de leur propriétaires
  respectifs, et considérés par cette note comme reconnus comme tels.


  Il y a quelques personnes que je voudrais remercier, pour m'avoir aidé
  à réaliser tout ceci.



     TToouutt lleess aabboonnnnééss ddee llaa lliissttee ddee ddiissccuussssiioonn lleeaarrnniinngg@@TTaassLLUUGG
        Merci pour avoir lu tous mes mails et posé des questions
        intéressantes.  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.



     MMiicchhaaeell EEmmeerryy
        Pour m'avoir rappelé Unios.

     TTiimm LLiittttllee
        Pour de bonnes indications concernant /etc/passwd

     ssPPaaKKrr ddaannss ##lliinnuuxx ssuurr eeffnneett
        Qui a soupçonné l'utilisation de /etc/services par syslog, et
        m'a fait connaître la phrase ``rolling your own'' ("roulez-la
        vous-même") pour  décrire la construction d'un système à partir
        des sources.

     AAlleexx AAiittkkiinn
        Pour avoir porté Vico et son ``verum ipsum factum'' (La
        compréhension découle de l'expérience) à mon attention.

     DDeennnniiss SSccootttt
        Pour avoir corrigé mon arithmétique en hexadécimal.

     jjdddd
        Pour avoir mis en évidence quelques erreurs typographiques.

     DDaavviidd LLeeaaddbbeeaatteerr
        Pour avoir contribué aux ``pérégrinations'' dans les démons
        noyau.


  1155..55..  HHiissttoorriiqquuee ddeess cchhaannggeemmeennttss

  1155..55..11..  00..66 -->> 00..77


  ·  L'accent est plus porté sur l'explication, et moins sur la façon de
     monter un système, ces informations ayant été regroupées dans une
     section distincte, et le système une fois construit a été revu à la
     baisse, voir directement la documentation de Gerard Beekmans
     ``Linux From Scratch'' pour construire un système sérieux.

  ·  Ajout de quelques hypothèses de la part de David Leadbeater

  ·  Correction de deux URL, ajout d'un lien vers le téléchargement
     d'unios sur learning.taslug.org.au/resources

  ·  Test et correction d'url.

  ·  Grand nettoyage et réécriture générale.


  1155..55..22..  00..55 -->> 00..66


  ·  Ajout de l'historique des changements

  ·  Ajout de quelques ``todos'' (``A faire'').


  1155..66..  AA ffaaiirree ((TTOODDOO))


  ·  expliquer les modules noyau, depmod, modprobe, insmod et tout (il
     faut d'abord que je trouve moi-même).

  ·  mentionner le système de fichiers /proc. Exercices potentiels.

  ·  convertir en documentation sgml

  ·  ajouter plus d'exercices, peut-être une section entière d'exercices
     plus poussés, comme créer un système 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 ppaass 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.

  11..  DDrrooiittss ddee ddiiffffuussiioonn

  Ceci constitue le `Frequently Asked Questions'  (FAQ)  /  HOWTO  guide
  pour  l'interface  ftape  (ftape-HOWTO),  Copyright  (C) 1993,1994 Kai
  Harrekilde-Petersen.

  CCooppyyrriigghhtt ::

  Ce document peut etre librement  diffuse  eenn  eennttiieerr,  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.

  RReesseerrvveess ppoouurr ll''uuttiilliissaattiioonn ::

  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.

  22..  PPrreelliimmiinnaaiirreess

  22..11..  LLaa vveerrssiioonn llaa pplluuss rreecceennttee ddee ffttaappee -- eett oouu ll''oobbtteenniirr

  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.

  22..22..  DDeevveellooppppeemmeenntt dduu ppiilloottee ffttaappee

  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'.

  22..33..  LLeecctteeuurrss ssuuppppoorrtteess

  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).

  22..44..  LLeecctteeuurrss NNOONN--ggeerreess

  +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.

  22..55..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn ddee ll''iinntteerrffaaccee ffttaappee

  Un guide d'installation est fourni  dans  la  distribution  ftape  (le
  fichier Install-guide en anglais), lisez-le s'il vous plait.

  22..66..  OOuu oobbtteenniirr lleess ssoouurrcceess dduu nnooyyaauu ((kkeerrnneell)) ??

  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.< ... >.

  22..77..  PPeeuutt--oonn ffoorrmmaatteerr ddeess bbaannddeess ssoouuss LLiinnuuxx ??

  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.

  22..88..  QQuueellss pprrooggrraammmmeess ddee ffoorrmmaattaaggee ppeeuutt--oonn uuttiilliisseerr ssoouuss DDOOSS??

  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.

  33..  SSaauuvveeggaarrddee eett RReessttaauurraattiioonn

  33..11..  SSttoocckkeerr uunnee aarrcchhiivvee ssuurr uunnee bbaannddee

  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'

  33..22..  RReessttaauurreerr uunnee aarrcchhiivvee

  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.

  33..33..  TTeesstteerr uunnee aarrcchhiivvee

  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'

  33..44..  CCoommmmeenntt ssttoocckkeerr pplluuss dd''uunn ffiicchhiieerr ttaarr 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.

  33..55..  AAjjoouutteerr ddeess ffiicchhiieerrss aa uunnee aarrcchhiivvee

  "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.

  33..66..  MMoonntteerr//ddeemmoonntteerr ((MMoouunntt//uunnmmoouunnttiinngg)) ddeess bbaannddeess..

  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.

  44..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess

  44..11..  PPeeuutt--oonn eecchhaannggeerr ddeess bbaannddeess aavveecc uunn uuttiilliissaatteeuurr ddee DDOOSS??

  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.

  44..22..  CCoommmmeenntt ffaaiirree ``........'' aavveecc ttaarr?

  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.

  44..33..  LLeess ttrraannssffeerrttss ddee DDMMAA ffttaappee 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.

  44..44..  iinnssmmoodd 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.

  44..55..  LLee nnooyyaauu 11..11..00 nnee ccoommppiillee pplluuss aavveecc  ll''ooppttiioonn  ddee  ssuuppppoorrtt  ppoouurr
  ffttaappee..

  (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.)

  44..66..  ttaarr/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).

  55..  DDeebboogguueerr llee ppiilloottee ffttaappee

  55..11..  bboogguuee ??  LLee nnooyyaauu//ffttaappee ssee ppllaannttee lloorrssqquuee jjee ffaaiiss  ``......'' --  eesstt--
  ccee uunn

  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
  ddeevvrraaiitt 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).

  55..22..  qquuee ddooiitt--oonn ffaaiirree ??  ffttaappee nn''aarrrreettee ppaass ddee ddiirree ``......  nneeww  ttaappee''
  ((nnoouuvveellllee bbaannddee)),,

  [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.

  55..33..  -- CCoommmmeenntt ssoouummeettttrree uunn rraappppoorrtt ??  OOKK iill yy aa bbeell eett bbiieenn uunn bboogguuee
  ........ eeuuhhhh........ uunnee ccaarraacctteerriissttiiqquuee

  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.

  55..44..  CCoommmmeenntt cchhaannggeerr llee nniivveeaauu ddee ttrraaccaaggee ??

  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.

  55..55..   ddee  mmeessssaaggee  ssuuppeerrfflluuss ...... ppoouurrqquuooii ??  LLoorrss ddee ll''uuttiilliissaattiioonn ddee
  //ddeevv//nnffttaappee, 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.

  66..  AAiiddee aauu ddeevveellooppppeemmeenntt ddee ffttaappee..

  66..11..   ppuuiiss--jjee  aaiiddeerr  lleess  ddeevveellooppppeeuurrss..   JJ''AADDOORREE 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.

  66..22..  QQuuii ddooiiss--jjee ccoonnttaacctteerr??  JJee vvoouuddrraaiiss aaiiddeerr aa ddeevveellooppppeerr ``......''

  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.

     PPrrooggrraammmmee ddee ffoorrmmaattaaggee :: ((ppaass eennccoorree ccoommmmeennccee))
        Kai Harrekilde-Petersen, khp@login.dkuug.dk

        Cesare Mastroianni, cece@dist.dist.unige.it

     llee ppiilloottee ffttaappee pprroopprreemmeenntt ddiitt ::
        Bas Laarhoven, bas@vimec.nl

     EECCCC ccooddee :: ((nnee vvoouuss jjooiiggnneezz ppaass aa nnoouuss,, nnoouuss ssoommmmeess ddeejjaa aasssseezz nnoomm--
        bbrreeuuxx))
        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

     ffttaappee--HHOOWWTTOO ::
        Kai  Harrekilde-Petersen, khp@login.dkuug.dk version francaise :
        lprylli@lip.ens-lyon.fr

     ffoorrmmaatt llooggiiqquuee QQIICC--8800 ((lleeccttuurree//eeccrriittuurree aauu ffoorrmmaatt DDOOSS)) ::
        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.

  11..  PPrreelliimmiinnaaiirreess

  11..11..

  EELLFF eett aa..oouutt

  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.

  11..22..

  DDuu ccoottee dduu ccooppyyrriigghhtt

  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.

  11..33..  TTyyppooggrraapphhiiee

  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 :-)

  22..  OOuu rreeccuuppeerreerr ddee llaa ddooccuummeennttaattiioonn eett lleess pprrooggrraammmmeess ??

  22..11..  CCee ddooccuummeenntt

  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.

  22..22..

  AAuuttrreess ddooccuummeennttaattiioonn

  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.

  22..33..  GGCCCC

  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.

  22..44..

  LLeess ffiicchhiieerrss dd''eenn--tteettee eett llaa bbiibblliiootthheeqquuee CC

  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 :

     lliibbcc--55..22..1188..bbiinn..ttaarr..ggzz
        ---  bibliotheques dynamiques et statiques ELF plus les fichiers
        d'en-tete  pour   la   bibliotheque   C   et   la   bibliotheque
        mathematique.

     lliibbcc--55..22..1188..ttaarr..ggzz
        ---  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.

     lliibbcc--44..77..55..bbiinn..ttaarr..ggzz
        ---  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.

  22..55..

  OOuuttiillss aassssoocciieess ((aass,, lldd,, aarr,, ssttrriinnggss,, eettcc..))

  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.

  33..  IInnssttaallllaattiioonn eett ccoonnffiigguurraattiioonn ddee GGCCCC

  33..11..

  LLeess vveerrssiioonnss ddee GGCCCC

  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  LLiinnuuxx.
     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) !

  33..22..  AA qquueell eennddrrooiitt ss''iinnssttaallllee GGCCCC ??

  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.

  33..33..

  OOuu ssee ttrroouuvveenntt lleess ffiicchhiieerrss dd''eenn--tteettee ??

  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.

  33..44..  CCoonnssttrruuiirree uunn ccoommppiillaatteeuurr ccrrooiissee

  33..44..11..  LLiinnuuxx ccoommmmee ppllaattee--ffoorrmmee ddee ddeessttiinnaattiioonn

  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/>.

  33..44..22..  LLiinnuuxx ccoommmmee ppllaattee--ffoorrmmee oorriiggiinnee eett MMSSDDOOSS ccoommmmee ddeessttiinnaattiioonn

  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 !

  44..  PPoorrttaaggee eett ccoommppiillaattiioonn

  44..11..

  SSyymmbboolleess ddeeffiinniiss aauuttoommaattiiqquueemmeenntt

  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.

  44..22..  OOppttiioonnss ddee ccoommppiillaattiioonn

  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.

  44..22..11..

  OOppttiioonnss ddee ccoommppiillaattiioonn

  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.

  44..22..11..11..  SSppeecciiffiiccaattiioonn dduu pprroocceesssseeuurr

  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.

  44..22..22..

  IInntteerrnnaall ccoommppiilleerr eerrrroorr:: cccc11 ggoott ffaattaall ssiiggnnaall 1111

  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).
  NN''aannnnoonncceezz ppaass 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.

  44..33..  PPoorrttaabbiilliittee

  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.

  44..33..11..  <<ssggttttyy..hh>>) 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   ppaass   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>.

  44..33..22..

  SSiiggnnaauuxx _m_a_n_q_u_a_n_t_s ((SSIIGGBBUUSS, 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

  44..33..33..

  CCooddee KK && RR

  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.

  44..33..44..  lleess pprroottoottyyppeess dduu ccooddee

  LLeess ssyymmbboolleess dduu pprreepprroocceesssseeuurr pprroodduuiisseenntt uunn ccoonnfflliitt aavveecc

  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().

  44..33..55..

  sspprriinnttff(())

  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.

  44..33..66..

  ffccnnttll 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.

  44..33..77..  ccoommmmeenncceenntt ddaannss uunn eettaatt dd''aatttteennttee aaccttiivvee

  LLee ttiimmeeoouutt ddee sseelleecctt(()). 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 !
  44..33..88..

  AAppppeellss ssyysstteemmeess iinntteerrrroommppuuss

  44..33..88..11..  SSyymmppttoommeess ::

  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.

  44..33..88..22..  PPrroobblleemmeess ::

  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.

  44..33..99..  "" sseeggmmeennttaattiioonn ffaauulltt "" dd''uunnee mmaanniieerree aalleeaattooiirree))

  LLeess cchhaaiinneess eett lleeuurrss aacccceess eenn eeccrriittuurreess ((oouu lleess pprrooggrraammmmeess qquuii  pprroovvoo--
  qquueenntt ddeess

  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.

  44..33..1100..

  PPoouurrqquuooii ll''aappppeell aa eexxeeccll(()) 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).

  55..  DDeebboogguueerr eett ooppttiimmiisseerr

  55..11..

  EEttuuddee pprreevveennttiivvee dduu ccooddee ((lliinntt))

  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.

  55..22..

  DDeebboogguueerr

  55..22..11..

  CCoommmmeenntt rreennddrree ddeebbooggaabbllee uunn pprrooggrraammmmee ??

  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

  55..22..11..11..

  CCoommmmeenntt rreedduuiirree llaa ttaaiillllee ddeess eexxeeccuuttaabblleess ??

  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.

  55..22..22..

  PPrrooggrraammmmeess ddiissppoonniibblleess

  Beaucoup  de gens utilisent ggddbb, 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.  xxxxggddbb 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 UUPPSS 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  "
  ssttrraaccee  " , 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/>.

  55..22..33..  PPrrooggrraammmmeess eenn ttaacchhee ddee ffoonndd ((ddeemmoonn))

  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       }

  55..22..44..  FFiicchhiieerrss ccoorree

  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.

  55..33..  CCaarraacctteerriissttiiqquueess dduu pprrooggrraammmmee

  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.

  66..  EEddiittiioonn ddee lliieennss

  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.

  66..11..  BBiibblliiootthheeqquueess ppaarrttaaggeeeess ccoonnttrree bbiibblliiootthheeqquueess ssttaattiiqquueess

  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).

  66..22..

  AA llaa rreecchheerrcchhee ddeess ffoonnccttiioonnss...... oouu ddaannss qquueellllee bbiibblliiootthheeqquuee ssee  ttrroouuvvee
  llaa ffoonnccttiioonn ssiinn(()) ?')

  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.

  66..33..  TTrroouuvveerr lleess ffiicchhiieerrss

  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.

  66..44..  CCoommppiilleerr vvoottrree pprroopprree bbiibblliiootthheeqquuee

  66..44..11..  NNuummeerroo ddee llaa vveerrssiioonn

  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.

  66..44..22..

  EELLFF,, qquu''eesstt--ccee qquuee cc''eesstt ??

  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.

  66..44..22..11..  EELLFF,, llee rreettoouurr !!

  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.

  66..44..22..22..  LLeess bbiibblliiootthheeqquuee ppaarrttaaggeeeess EELLFF

  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 )

  66..44..22..33..

  LLeess nnuummeerrooss ddee vveerrssiioonn,, lleess nnoommss eett lleess lliieennss

  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 !

  66..44..33..  aa..oouutt..  LLee bboonn vviieeuuxx ffoorrmmaatt

  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 :-).

  66..44..33..11..

  ZZMMAAGGIICC ccoonnttrree QQMMAAGGIICC

  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.

  66..44..33..22..  GGeessttiioonn ddeess ffiicchhiieerrss

  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.   NNee  ffaaiitteess  ppaass  llaa  mmeemmee  ooppeerraattiioonn  aavveecc  lleess
  bbiibblliiootthheeqquueess EELLFF !!

  66..44..33..33..  "" lliibbcc--lliittee "" ??

  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.

  66..44..44..  EEddiittiioonn ddee lliieennss :: pprroobblleemmee ccoouurraannttss

  Envoyez-les moi !

      DDeess pprrooggrraammmmeess ssttaattiiqquueess lloorrssqquuee vvoouuss lleess vvoouulleezz
        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.

      LLee pprrooggrraammmmee ``mmkkiimmaaggee'' nn''aarrrriivvee ppaass aa ttrroouuvveerr lliibbggcccc

        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.

      LLee mmeessssaaggee ____NNEEEEDDSS__SSHHRRLLIIBB__lliibbcc__44 mmuullttiippllyy ddeeffiinneedd
        Sont une consequence du meme probleme.

      LLee mmeessssaaggee ````AAsssseerrttiioonn ffaaiilluurree'''' aappppaarraaiitt lloorrssqquuee vvoouuss
        rreeccoonnssttrruuiisseezz uunnee
        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.

      lldd:: oouuttppuutt ffiillee nneeeeddss sshhaarreedd lliibbrraarryy lliibbcc..ssoo..44
        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 !

  77..  CChhaarrggeemmeenntt ddyynnaammiiqquuee

  _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

  77..11..  CCoonncceeppttss

  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.

  77..22..  MMeessssaaggeess dd''eerrrreeuurr

  Envoyez  moi  vos  erreurs  !   Je  n'en fait pas grand chose sauf les
  inserer dans ce paragraphe...

      ccaann''tt llooaadd lliibbrraarryy:: //lliibb//lliibbxxxxxx..ssoo,, IInnccoommppaattiibbllee vveerrssiioonn
        (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'

     wwaarrnniinngg uussiinngg iinnccoommppaattiibbllee lliibbrraarryy vveerrssiioonn xxxxxx
        (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.

  77..33..

  CCoonnttrroolleerr ll''ooppeerraattiioonn ddee cchhaarrggeemmeenntt ddyynnaammiiqquuee

  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

  77..44..

  EEccrriirree ddeess pprrooggrraammmmeess eenn uuttiilliissaanntt llee cchhaarrggeemmeenntt ddyynnaammiiqquuee

  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");
         }

       }

  88..  CCoonnttaacctteerr lleess ddeevveellooppppeeuurrss

  88..11..

  AAnnnnoonncceerr ddeess bboogguueess

  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.

  88..22..  PPaarrttiicciippeerr aauu ddeevveellooppppeemmeenntt

  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 !

  99..  DDiivveerrss

  99..11..  CCee ddooccuummeenntt

  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.

  99..22..  TTrraadduuccttiioonn

  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 : CCooccoorriiccoo !! La version francaise est  la  premiere
  traduction de ce document.

  99..33..  CCoonnttaaccttss

  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.

  99..44..  CCooppyyrriigghhtt

  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

  1100..  IInnddeexx

  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 février 1998

  de la version française par  Géraud Canet, canet@labri.u-bordeaux.fr)
  Le HOWTO Glibc 2 couvre l'installation et l'utilisation de la bib­
  liothèque C GNU version 2 (libc 6) sur les systèmes Linux.
  ______________________________________________________________________

  Table des matières
























































  1. Introduction

     1.1 Note du traducteur
     1.2 À propos de glibc 2
     1.3 À propos de ce document
     1.4 Changements récents dans ce document

  2. Choix de la méthode d'installation

  3. Obtenir la bibliothèque

  4. Installation comme bibliothèque de test

     4.1 Compilation et installation
        4.1.1 Éléments 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-tête
     4.5 Test de l'installation

  5. Installation comme bibliothèque C principale

     5.1 Construction de la bibliothèque à partir des sources
        5.1.1 Éléments requis
        5.1.2 Extraction des sources
        5.1.3 Configuration
        5.1.4 Compilation
     5.2 Préparation à 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 bibliothèque 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 supplémentaires
        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


  ______________________________________________________________________


  11..  IInnttrroodduuccttiioonn



  11..11..  NNoottee dduu ttrraadduucctteeuurr


  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 dièse
  et   des pourcent,   dont    la    représentation    en     SGML   est
  respectivement &num; et &percnt; ;  le source LaTeX généré par les
  outils  de conversion SGML introduit le  signe antislash devant ces
  signes et reste dans la  version PostScript de ce document.  Les
  données d'exemple sont donc erronées, mais vous pouvez vous rapporter
  à la version HTML du document qui n'a pas ces erreurs. La version
  d'origine connait les mêmes problèmes.


  11..22..  ÀÀ pprrooppooss ddee gglliibbcc 22


  Glibc 2 est la toute dernière version de la bibliothèque C du GNU.
  Elle fonctionne pour l'instant sans modifications sur les systèmes GNU
  Hurd, et les systèmes 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 systèmes
  d'exploitation seront supportés.

  Sur Linux, glibc 2 est utilisée comme libc avec un numéro majeur de
  version égal à 6, le successeur de la libc 5 pour Linux. Elle est
  destinée par les développeurs de la libc Linux à remplacer en fin de
  compte la libc 5. À l'heure de la version 2.0.6, on considère que
  glibc est de qualité suffisante pour être utilisée en production. La
  version 2.1 (à venir dans un futur proche) sera prête pour une
  utilisation normale avec l'ajout de plus de portages et de
  possibilités.

  Il y a trois extensions disponibles en option sur la glibc 2 :


     CCrryypptt
        Le paquetage UFC-crypt pour le cryptage des données. Il est
        disponible séparément à cause de restrictions à l'exportation.

     LLiinnuuxxTThhrreeaaddss
        Une mise en oeuvre de l'interface Posix 1003.1c "pthread".

     LLooccaallee ddaattaa
        Contient les données nécessaires à la construction des fichiers
        de données locale pour utiliser les possibilités
        d'internationalisation de la glibc.

  Les extensions crypt et LinuxThreads sont fortement recommandées... Ne
  pas les utiliser risque de les rendre incompatibles avec les
  bibliothèques d'autres systèmes. (Si vous ne voulez pas les utiliser,
  vous devez ajouter l'option --disable-sanity-checks quand vous lancez
  configure.)


  11..33..  ÀÀ pprrooppooss ddee ccee ddooccuummeenntt


  Ce HOWTO couvre l'installation de la bibliothèque glibc 2 sur un
  système Linux existant. Il est fait pour les utilisateurs de systèmes
  à base de processeurs Intel qui utilisent pour l'instant la libc 5,
  mais les utilisateurs d'autres systèmes et de bibliothèques similaires
  (comme la glibc 1) devraient pouvoir utiliser ces informations en
  substituant les noms de fichiers et d'architecture adéquats aux
  endroits appropriés.

  La copie la plus récente 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>.


  11..44..  CChhaannggeemmeennttss rréécceennttss ddaannss ccee ddooccuummeenntt


  Différences entre la version 1.5 et 1.4 :


  ·  Indexage ajouté par Ed Bailey.

  ·  Changement de mon adresse électronique.

  Différences entre la version 1.4 et 1.3 :


  ·  Changé l'état courant d'expérimental à production.

  ·  Mis à jour la liste des portages en développement.

  ·  Mis à jour la dernière version en 2.0.6.


  22..  CChhooiixx ddee llaa mméétthhooddee dd''iinnssttaallllaattiioonn


  Il y a plusieurs manières d'installer glibc. Vous pouvez installer les
  bibliothèques   pour  les    tester,  en  continuant   d'utiliser  les
  bibliothèques existantes par défaut, tout en vous permettant d'essayer
  les nouvelles bibliothèques  par l'utilisation d'options différentes à
  la   compilation de votre programme.  L'installation  de cette manière
  facilite aussi la désinstallation  de glibc dans le  futur (cependant,
  tout programme  lié avec  la glibc  ne fonctionnera  plus une fois que
  vous aurez enlevé les bibliothèques). L'utilisation de glibc comme une
  bibliothèque de test demande  que  vous compiliez les  bibliothèques à
  partir des   sources.  Il  n'y  a pas  de  distribution   binaire pour
  l'installation de cette  manière. Cette installation  est décrite dans
  la       section    ``installation comme bibliothèque de test''.

  L'autre manière  de   l'installer,   décrite dans ce     document, est
  d'utiliser  glibc  comme bibliothèque  principale.  Tous les  nouveaux
  programmes que vous compilerez sur   votre système utiliseront  glibc,
  bien que  vous puissiez toujours lier des  programmes  à vos anciennes
  bibliothèques par des options de compilation différentes. Vous pouvez,
  soit installer les bibliothèques  à partir de binaires,  soit compiler
  la  bibliothèque vous-même.    Si vous  voulez  changer les    options
  d'optimisation   ou de configuration,  ou  utiliser  une extension qui
  n'est  pas distribuée  en  paquetage binaire,  vous devrez obtenir  la
  distribution  de sources    et  compiler  vous-même.  Cette  procédure
  d'installation est décrite dans  la section ``installation comme
  bibliothèque C principale''.

  Frodo Looijaard décrit encore une autre  manière d'installer glibc. Sa
  méthode implique l'installation de glibc comme bibliothèque 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   méthode, la procédure
  d'installation est plus   compliquée que  l'installation en tant   que
  bibliothèque de  test  décrite dans  ce   document, mais facilite   la
  compilation  et l'édition   de  liens avec glibc.    Cette méthode est
  décrite            dans       son            document
  Installer  glibc-2 sur Linux <http://huizen.dds.nl/~frodol/glibc/> (en
  anglais).

  Si vous utilisez en  ce moment un système 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> décrit la
  manière d'utiliser les paquetages Debian pour mettre votre système à
  jour.

  Si vous installez glibc 2 sur un  système important, vous voudrez sans
  doute utiliser l'installation de test. Même  s'il n'y a pas de bogues,
  certains programmes devront être modifiés avant compilation à cause de
  changements dans les prototypes de fonctions et les types de données.



  33..  OObbtteenniirr llaa bbiibblliiootthhèèqquuee


  La glibc 2 contient le paquetage glibc et trois paquetages
  supplémentaires 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 près 150 Mo d'espace disque pour la compilation
  complète et l'installation. L'installation binaire de base du
  paquetage de la bibliothèque 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 bibliothèque 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
  nommés 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.



  44..  IInnssttaallllaattiioonn ccoommmmee bbiibblliiootthhèèqquuee ddee tteesstt


  Cette section couvre l'installation de glibc 2 comme bibliothèque de
  test. Tout ce que vous compilerez sera lié à vos bibliothèques
  existantes sauf si vous donnez des paramètres supplémentaires pour les
  lier aux nouvelles bibliothèques. Il semble que les chemins d'accès
  soient compilés dans un certain nombre de fichiers, et vous devrez
  probablement installer la bibliothèque à partir des sources.


  44..11..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn



  44..11..11..  ÉÉlléémmeennttss rreeqquuiiss



  ·  À 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 bibliothèques complètes avec les extensions. Sur un
  i686 à 200 MHz chargé, il faut environ une demi-heure.


  44..11..22..  EExxttrraaccttiioonn ddeess ssoouurrcceess


  Vous devez extraire les sources des archives pour pouvoir les
  compiler. La meilleure façon de procéder 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 répertoires linuxthreads, crypt et localedate dans le
  répertoire glibc-2.0.6 où configure pourra trouver ces extensions.


  44..11..33..  CCoonnffiigguurraattiioonn


  Dans le répertoire glibc-2.0.6, créez un répertoire appelé compile, et
  déplacez-vous dedans.  Tout  le travail  doit   être effectué dans  ce
  répertoire,  ce qui simplifiera le  nettoyage  (les développeurs ne se
  sont pas très occupés de rendre 'make clean' parfait pour l'instant).



        mkdir compile
        cd compile





  Lancez ../configure. Pour utiliser les paquetages d'extension, vous
  devez les spécifier avec --enable-add-ons, comme --enable-add-
  ons=linuxthreads,crypt,localedata. Vous devez aussi choisir un
  répertoire 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






  44..11..44..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn


  Pour compiler et vérifier, lancez :



        make
        make check





  Si le 'make check' réussit, installez la bibliothèque :





   make install






  44..22..  MMiissee àà jjoouurr dduu cchhaarrggeeuurr ddee lliieennss ddyynnaammiiqquuee



  1. Créez 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 bibliothèque 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 bibliothèque C principale quand la version
  stable sortira.

  2. Éditez /etc/ld.so.conf. Vous devez ajouter le chemin vers le
     répertoire lib dans lequel se trouvent les nouvelles bibliothèques
     à la fin du fichier, qui sera <préfixe>/lib, comme
     /usr/i486-linuxglibc2/lib dans l'exemple ci-dessus. Après avoir
     modifié /etc/ld.so.conf, lancez



        ldconfig -v






  44..33..  CCoonnffiigguurraattiioonn ppoouurr ggcccc


  La dernière étape de l'installation est la mise à jour de
  /usr/lib/gcc-lib pour que gcc sache comment utiliser les nouvelles
  bibliothèques. 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 système, et 2.7.2.2 est la
  version. Vous devez copier /usr/lib/gcc-lib/<système> vers le nouveau
  répertoire système de test :



   cd /usr/lib/gcc-lib/
   cp -r i486-unknown-linux i486-linuxglibc2





  Allez dans le nouveau répertoire système de test et dans le répertoire
  version



        cd /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2





  et éditez le fichier specs se trouvant dans ce répertoire. 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 bibliothèque gmon pour les optimisations. Vous
  trouverez un fichier specs d'exemple dans la section ``Fichiers specs
  d'exemple''.


  44..44..  MMiissee àà jjoouurr ddeess lliieennss ddeess ffiicchhiieerrss dd''eenn--ttêêttee


  Vous devez créer des liens dans votre nouveau répertoire d'en-têtes
  vers d'autres répertoires d'en-têtes :



        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 bibliothèques comme ncurses qui
  nécessitent d'avoir leurs fichiers d'en-têtes dans ce répertoire. Vous
  devriez copier ou faire un lien vers ces fichiers depuis /usr/include.
  (Certaines bibliothèques auront besoin d'être recompilées avec glibc2
  pour pouvoir fonctionner avec glibc2. Dans ces cas, compilez
  simplement et installez les paquetages dans /usr/i486-linuxglibc2.)


  44..55..  TTeesstt ddee ll''iinnssttaallllaattiioonn


  Pour tester l'installation, créez le programme suivant dans un fichier
  appelé glibc.c :










   #include <stdio.h>

   main()
   {
       printf("hello world!\n");
   }





  et compilez-le avec les options "-b <répertoire d'installation>
  -nostdinc -I<répertoire d'installation>/include -I/usr/lib/gcc-
  lib/<nouveau système>/<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 vérifier 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 effectués et qu'il génère "hello
  world!" quand vous le lancez, l'installation a fonctionné.



  55..  IInnssttaallllaattiioonn ccoommmmee bbiibblliiootthhèèqquuee CC pprriinncciippaallee


  Cette section couvre l'installation de glibc2 comme bibliothèque C
  principale. Tous les nouveaux programmes que vous compilerez seront
  liés avec cette bibliothèque, sauf si vous utilisez des options de
  compilation spéciales pour le lier avec une autre version.

  Si  vous utilisez Redhat ou Debian  et avez chargé  les fichier rpm ou
  deb  adéquats, voyez    les  instructions  d'installation   Redhat  ou
  Debian. Vous pouvez alors sauter cette section.



  55..11..  CCoonnssttrruuccttiioonn ddee llaa bbiibblliiootthhèèqquuee àà ppaarrttiirr ddeess ssoouurrcceess


  Cette section explique comment compiler glibc 2 et ses extensions à
  partir des sources. Vous devez compiler la bibliothèque si vous voulez
  changer les options d'optimisation ou de configuration ou utiliser un
  paquetage pour lequel vous n'avez pas de binaire.




  55..11..11..  ÉÉlléémmeennttss rreeqquuiiss



  ·  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 bibliothèques avec les extensions. Sur un
  i686 à 200 MHz chargé, il faut environ une demi-heure.



  55..11..22..  EExxttrraaccttiioonn ddeess ssoouurrcceess


  Vous devez extraire les sources des archives pour compiler. La
  meilleure façon 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 répertoires linuxthreads, crypt et localedata dans le
  répertoire glibc-2.0.6 où configure pourra trouver ces extensions.


  55..11..33..  CCoonnffiigguurraattiioonn


  Dans   le répertoire glibc-2.0.6,  créez  un répertoire nommé compile,
  et  allez   dedans.  Tout  le  travail   sera fait   dans  ce
  répertoire, ce qui simplifiera le   nettoyage (les développeurs ne  se
  sont pas vraiment soucié du 'make clean' pour l'instant).



       mkdir compile
       cd compile




  Lancez ../configure. Pour utiliser les paquetages supplémentaires,
  vous devez les spécifier avec --enable-add-ons, comme --enable-add-
  ons=linuxthreads,crypt,localedata. Vous devrez aussi sûrement
  spécifier les chemins où elle sera installée. Pour coller aux
  distributions Linux normales, spécifiez --prefix=/usr. (Quand on
  spécifie le préfixe /usr sur un système Linux, configure sait ajuster
  les autres chemins pour placer libc.so et d'autres bibliothèques
  importantes dans /lib.) La ligne de commande complète de configure
  serait :



        ../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr





  55..11..44..  CCoommppiillaattiioonn


  Pour compiler et vérifier, lancez :



        make
        make check







  55..22..  PPrrééppaarraattiioonn àà ll''iinnssttaallllaattiioonn


  Vous devez maintenant déplacer certains fichiers pour vous préparer à
  l'arrivée de la nouvelle bibliothèque, que vous l'installiez à partir
  des sources ou de binaires. Tous les nouveaux programmes compilés
  seront liés à glibc, mais les vieux programmes qui ne sont pas liés en
  statique dépendront encore de libc 5, et vous ne pouvez donc pas
  écraser l'ancienne version.


  1. Créez un nouveau répertoire pour y mettre les anciens fichiers :


        mkdir -p /usr/i486-linuxlibc5/lib






  2. Les vieux fichiers d'en-tête doivent être évacués de /usr/include :


        mv /usr/include /usr/i486-linuxlibc5/include






  3. Créez un nouveau répertoire d'en-têtes et activez les liens vers
     d'autres en-têtes :


   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 ajustés au besoin selon votre distribution.
  Rien que la Slackware installe les en-têtes g++ dans
  /usr/local/g++-include, alors que Debian met les en-têtes dans
  /usr/include/g++, et fait un lien de /usr/lib/g++-include vers
  /usr/include/g++. Dans d'autres cas, vous voudrez sûrement déplacer le
  répertoire d'en-têtes g++ d'origine à son ancien emplacement
  /usr/include.

  4. Remettre des fichiers d'en-têtes et des liens supplémentaires.
     Certaines bibliothèques non standards comme ncurses installent des
     fichiers dans /usr/include ou installent un lien vers leur
     répertoire d'en-tête dans /usr/include. Ces fichiers et liens
     doivent être remis en place pour pouvoir utiliser les bibliothèques
     supplémentaires correctement.

  5. Ajoutez le nouveau répertoire de bibliothèque (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 installée.

  6. Déplacez ou copiez toutes les anciennes bibliothèques C dans le
     nouveau répertoire.



        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 copiées et non déplacées si /usr
  est une partition différente de /, parce qu'elles sont nécessaires aux
  programmes utilisés pour démarrer Linux et doivent être situées sur la
  partition racine.

  7. Déplacez les fichiers /usr/lib/*.o dans le nouveau répertoire.








   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 bibliothèque après avoir déplacé vos
     bibliothèques.



        ldconfig -v






  55..33..  IInnssttaallllaattiioonn àà ppaarrttiirr dduu ppaaqquueettaaggee bbiinnaaiirree


  Si vous installez glibc à partir de binaires précompilés, 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 différente, substituez les
  noms de fichiers adéquats.


  55..44..  IInnssttaallllaattiioonn àà ppaarrttiirr ddeess ssoouurrcceess


  Pour installer la bibliothèque à partir des sources, lancez :



        make install
        ldconfig -v






  55..55..  MMiissee àà jjoouurr ddeess ssppeeccss ggcccc


  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 déterminer 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 système, et 2.7.2.2 est la
  version. Vous devez copier /usr/lib/gcc-lib/<système> dans l'ancien
  répertoire système :



        cd /usr/lib/gcc-lib/
        cp -r i486-unknown-linux i486-linuxlibc5





  Allez dans le répertoire d'origine et dans le répertoire 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 bibliothèque gmon pour les optimisations. Un
  fichier specs d'exemple se trouve dans la section ``fichiers specs
  d'exemple''.



  55..66..  TTeesstt ddee ll''iinnssttaallllaattiioonn


  Pour tester l'installation, créez 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 vérifier 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 génère "hello world!" quand vous le lancez,
  l'installation est réussie.



  66..  CCoommppiillaattiioonn aavveecc llaa lliibbcc nnoonn pprriinncciippaallee


  Il y  a des fois où vous  voudrez utiliser une bibliothèque différente
  pour compiler vos programmes. Cette section explique comment faire, en
  utilisant les noms de  répertoires et d'installation utilisés dans les
  exemples des deux  sections précédentes. Souvenez-vous  de changer les
  noms pour coller à votre configuration.



  66..11..  AAvveerrttiisssseemmeenntt ccoonncceerrnnaanntt ll''uuttiilliissaattiioonn ddee lliibbccss nnoonn pprriinncciippaalleess


  Avant de compiler un programme utilisé dans le processus de démarrage,
  rappelez-vous que   si  le programme est  lié  dynamiquement,   et est
  utilisé avant  que  les partitions non-racines  soient montées, toutes
  les  bibliothèques liées doivent    être sur la partition racine.   En
  suivant  la procédure d'installation   de la  section précédente  pour
  installer glibc comme bibliothèque 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
  démarrage.    Cependant,  si  /usr   est  sur   une partition
  différente et que vous installez glibc comme bibliothèque 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 montée.


  66..22..  CCoommppiillaattiioonn ddeess pprrooggrraammmmeess aavveecc uunnee gglliibbcc ddee tteesstt


  Pour compiler un programme avec glibc en installation de test, vous
  devez mettre à zéro les chemins d'en-tête pour qu'ils pointent vers
  les en-têtes glibc. En spécifiant "-nostdinc", vous annulerez les
  chemins normaux, et "-I/usr/i486-linuxglibc2/include" pointera vers
  les entêtes de glibc. Vous devrez aussi spécifier les en-têtes gcc,
  que l'on trouve dans /usr/lib/gcc-lib/i486-linuxglibc2/2.7.2.2/include
  (en supposant que vous ayez installé la bibliothèque de test dans
  i486-linuxglibc2 avec gcc version 2.7.2.2).

  Pour lier un programme à une glibc de test, vous devez spécifier la
  configuration gcc. Vous le faites avec l'option "-b i486-linuxglibc2".

  Pour la plupart des programmes, vous pouvez spécifier 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, définissez 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
  générés par celui-ci devraient contenir les variables $CFLAGS et
  $LDFLAGS correctes. Tous les scripts configure ne tiendront pas compte
  des variables, et par conséquent vous devriez vérifier après avoir
  lancé configure et éditer les makefiles à la main si nécessaire.

  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 spécification 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.


  66..33..  CCoommppiillaattiioonn ddeess pprrooggrraammmmeess aavveecc lliibbcc 55 qquuaanndd gglliibbcc eesstt llaa bbiibb­­
  lliiootthhèèqquuee pprriinncciippaallee


  Pour compiler un programme avec vos anciennes bibliothèques quand vous
  avez installé glibc comme bibliothèque principale, vous devez mettre à
  zéro les chemins d'en-têtes vers les anciennes en-têtes. En spécifiant
  "-nostdinc", vous annulerez les chemins normaux et
  "-I/usr/i486-linuxlibc5/include" pointera vers les en-têtes libc 5.
  Vous devez aussi indiquer "-I/usr/lib/gcc-
  lib/i486-linuxlibc5/2.7.2.2/include" pour inclure les en-têtes
  spécifiques à gcc. Rappelez-vous d'ajuster ces chemins selon la
  manière dont vous avez nommé les nouveaux répertoires et selon votre
  version de gcc.

  Pour lier un programme à votre ancienne libc, vous devez spécifier 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, définissez 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
  générés par celui-ci devraient contenir les variables $CFLAGS et
  $LDFLAGS corrects. Tous les scripts configure ne verront pas les
  variables, et vous devriez donc vérifier après avoir lancé configure
  et éditer les makefiles si nécessaire.

  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.



  77..  CCoommppiillaattiioonn ddeess pprrooggrraammmmeess CC++++


  Libg++ utilise des parties de la bibliothèque mathématique, elle est
  donc liée à libm. Puisque votre bibliothèque libg++ existante aura été
  compilée avec votre ancienne bibliothèque, vous devrez recompiler
  libg++ avec glibc ou obtenir une copie binaire. Les dernières sources
  de libg++, en même temps qu'un binaire lié à glibc (pour x86) se
  trouvent à  <ftp://ftp.yggdrasil.com/private/hjl/>.



  77..11..  IInnssttaallllaattiioonn ddee lliibbgg++++ ppoouurr uunnee iinnssttaallllaattiioonn gglliibbcc ddee tteesstt


  Si vous avez installé glibc comme bibliothèque de test, vous devez
  installer les fichiers dans le répertoire dans lequel vous avez
  installé glibc (comme /usr/i486-linuxglibc2 pour l'exemple des
  sections précédentes). Si vous installez à partir du paquetage binaire
  (ce que je recommanderais, puisque je n'ai jamais eu de chance pour
  compiler libg++ de cette manière), vous devez extraire les fichiers
  dans un répertoire temporaire et déplacer tous les fichiers usr/lib/
  dans le répertoire <répertoire install>/lib/, les fichiers
  usr/include/ dans le répertoire <répertoire install>/include/
  (rappelez-vous d'effacer le lien include/g++ avant !), et les fichiers
  usr/bin/ dans le répertoire <répertoire install>/bin/.


  77..22..  IInnssttaallllaattiioonn ddee lliibbgg++++ ppoouurr uunnee iinnssttaallllaattiioonn gglliibbcc pprriinncciippaallee


  Si vous avez installé glibc comme bibliothèque principale, vous devez
  d'abord déplacer vos anciens fichiers libg++ dans l'ancien répertoire
  libc si vous voulez encore pouvoir compiler des programmes g++ avec
  votre ancienne libc. La meilleure façon de procéder est probablement
  d'installer une nouvelle copie de libg++ compilée avec libc 5 comme
  dans la section précédente, et ensuite d'installer la version glibc
  normalement.
  77..33..  CCoommppiillaattiioonn ddee pprrooggrraammmmeess CC++++ aavveecc llaa lliibbcc nnoonn pprriinncciippaallee


  Si vous essayez de compiler un programme C++ avec une libc non
  principale, vous devrez inclure le répertoire d'en-têtes 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 général
  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







  88..  IInnddiiqquueerr lleess bboogguueess


  Si vous pensez que la bibliothèque est vérolée, veuillez d'abord lire
  la FAQ. Il se peut que d'autres personnes aient eu ce problème et
  qu'il y ait une solution simple. Vous devriez aussi regarder la partie
  "Outils recommandés pour l'installation de la bibliothèque 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 manière  de le  faire  est  de regarder si  la
  bibliothèque C  GNU se   comporte de  la   même manière  qu'une  autre
  bibliothèque  C.  S'il en   est ainsi, vous  vous  êtes  trompé et les
  bibliothèques ont raison (mais pas forcément).  Dans le cas contraire,
  l'une des bibliothèques a probablement tort.

  Ensuite, dirigez-vous vers  <http://www-gnats.gnu.org:8080/cgi-
  bin/wwwgnats.pl>, et parcourez la base de données des bugs. Vérifiez
  bien que le problème n'a pas déjà é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 sûr d'avoir trouvé un bug, essayez de le
  réduire au plus petit test pratique qui reproduit le problème. Dans le
  cas d'une bibliothèque C, vous ne devrez probablement en être réduit
  qu'à un appel de fonction de la bibliothèque, 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 résultats que vous avez obtenus, ce que vous pensez être le
  problème (si vous avez pensé à quelque chose), le type de votre
  système, les versions de la bibliothèque C GNU, du compilateur GNU CC
  et des GNU binutils que vous utilisez. Ajoutez aussi les fichiers
  config.status et config.mak créés en lançant configure ; ils seront
  dans le répertoire qui était le répertoire courant quand vous avez
  lancé configure.

  Vous devez envoyer tous les rapports de bug pour la bibliothèque 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'intermédiaire de l'interface Web de GNATS à
  <http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl>.


  Les suggestions et les questions doivent être envoyées à 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 bibliothèque C GNU à <bug-gcc@prep.ai.mit.edu>. Cette liste
  s'occupe des rapports de bug de GNU CC. GNU CC et la bibliothèque C
  GNU sont des entités distinctes maintenues par des personnes
  différentes.



  99..  FFiicchhiieerrss ssppeeccss dd''eexxeemmppllee


  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 répertoire /usr/lib/gcc-lib/<nouveau
  répertoire>/<version gcc>. Si vous utilisez un système 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:
   . ;






  1100..  DDiivveerrss



  1100..11..  IInnffoorrmmaattiioonnss ssuupppplléémmeennttaaiirreess



  1100..11..11..  PPaaggeess WWeebb



  ·  Page d'accueil de la bibliothèque 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>


  1100..11..22..  GGrroouuppeess ddee nneewwss



  ·  comp.os.linux.development.system

  ·  comp.os.linux.development.apps

  ·  linux.dev.kernel

  ·  gnu.bugs.glibc


  1100..11..33..  LLiisstteess ddee ddiissttrriibbuuttiioonn



     LLiissttee ddee ddiissccuussssiioonn GGlliibbcc 22 LLiinnuuxx..
        Cette liste est destinée à la discussion entre les utilisateurs
        Linux qui ont installé glibc2, la nouvelle bibliothèque C. Les
        sujets peuvent comprendre des problèmes 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>".


  1100..22..  RReemmeerrcciieemmeennttss


  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>

  ·  français : Géraud Canet<canet@labri.u-bordeaux.fr>

  ·  japonais : Kazuyuki Okamoto <ikko-@pacific.rim.or.jp>


  1100..33..  RReettoouurr dd''iinnffoorrmmaattiioonnss


  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 résoudre les problèmes
  qu'on m'envoie par courrier électronique. J'apprécie tout retour,
  correction ou suggestion que vous pourriez me faire. Veuillez les
  envoyer à ejg3@cornell.edu <mailto:ejg3@cornell.edu>.


  1100..44..  CCooppyyrriigghhtt


  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 française par Nicolas Duboc (duboc@essi.fr)
  $Id: HOWTO-HOWTO.sgml, v1.4, 17 Mars 2000 markk Exp $

  Explique les outils, les procédures, et donne des conseils aux auteurs
  de HOWTO.
  ______________________________________________________________________

  Table des matières
























































  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 générales 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. Démarrer avec DocBook

     3.1 Pour les nouveaux auteurs
     3.2 Les listes de discussion
     3.3 Télécharger et installer les outils
        3.3.1 sgmltools
     3.4 Ecrire du SGML à la main

  4. Démarrer avec LinuxDoc

     4.1 Pour les nouveaux auteurs
     4.2 Les listes de discussion
     4.3 Télécharger et installer les outils
        4.3.1 sgmltools
     4.4 Ecrire du SGML à la main
        4.4.1 Début du document
        4.4.2 Les informations de l'entête
        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 références
        4.4.10 Les caractères spéciaux
     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 Accès CVS anonyme
        4.8.2 Fichiers CVS via le web
        4.8.3 Accès 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 désire aider le LDP. Comment puis-je le faire ?
     7.2 Je voudrais publier un ensemble de documents du LDP dans un livre. Comment est protégé le contenu du LDP ?
     7.3 J'ai trouvé une erreur dans un document du LDP. Puis-je le corriger ?


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  HHiissttoorriiqquuee

  Ce document a été commencé le 26 août 1999 par Mark F. Komarinski
  (markk@cgipc.com) après 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.


  11..22..  NNoouuvveelllleess vveerrssiioonnss

  La version la plus récente de ce document peut être trouvée sur ma
  page personnelle http://www.cgipc.com/~markk/ au format SGML. D'autres
  versions peuvent être trouvées dans différents formats sur le site du
  LDP http://www.linuxdoc.org/.


  11..33..  CCoommmmeennttaaiirreess

  Les commentaires à propos de ce HOWTO peuvent être envoyés à l'auteur
  (markk@cgipc.com).



  11..33..11..  HHiissttoorriiqquuee ddeess vveerrssiioonnss

  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 !


  11..44..  CCooppyyrriigghhttss

  (c) 1999-2000 Mark F. Komarinski

  Ce manuel peut être reproduit en totalité ou en partie, sans frais,
  sous réserve des restrictions suivantes :

  ·  Cette note de copyright et de permission doit être préservée dans
     toutes copies partielles ou totales.

  ·  Toutes traductions ou travaux dérivés doivent être approuvés par
     l'auteur en le prévenant avant leur distribution.

  ·  Si vous distribuez une partie de ce travail, les instructions pour
     obtenir la version complète devront également être fournies.

  ·  De courts extraits peuvent être reproduits, sans ces notes de
     permissions, dans  le cadre d'exposés et de citations si les
     références sont correctement citées.


  Des exceptions à ces règles peuvent être tolérées pour un but éducatif
  : contactez l'auteur et demandez lui. Ces restrictions sont là pour
  nous protéger en tant qu'auteurs, et non pour vous restreindre en tant
  que lecteurs ou enseignants. Tous les codes sources apparaissant dans
  ce document sont protégés par la Licence Publique Générale GNU,
  disponible par FTP anonyme depuis le site d'archive GNU.


  11..55..  CCoonnttrriibbuuttiioonnss eett rreemmeerrcciieemmeennttss

  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
  références à sgmltools et le LDP ailleurs dans ce document.


  Les sections sur l'accès réseau à 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.


  22..  IInnffoorrmmaattiioonnss ggéénnéérraalleess ssuurr llee LLDDPP eett SSGGMMLL

  22..11..  LLee LLDDPP

  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 série de livres sur l'administration système, le réseau ou la
  programmation, mais également un grand nombre de petits travaux sur
  des sujets plus individuels, écrits par ceux qui les ont utilisés. Si
  vous voulez savoir comment imprimer, vous trouverez le Printing HOWTO.
  Si vous voulez mettre en place un réseau, récupérez le Ethernet HOWTO;
  etc.


  Au départ, la plupart de ces documents étaient au format texte ou
  HTML. Avec le temps, il fallait trouver un meilleur moyen de gérer 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 avérer être SGML.


  22..22..  SSGGMMLL

  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'arrètent 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 définissez pas la couleur, la taille de la police, ou d'autres
  paramètres de formatage. A la place, vous définissez des éléments
  (paragraphes, sections, listes numérotées) et laissez l'interprète
  SGML et le programme final s'occuper du placement, des couleurs, des
  polices, et tout le reste. HTML fait la même chose, puisqu'il est en
  fait une subdivision de SGML.


  Il y a en fait deux parties qui constituent SGML. La première est la
  Structure, qui est appelée la DTD, ou encore Définition du Type du
  Document. La DTD définie les relations entre les différents éléments
  d'un texte. La DTD LinuxDoc, utilisée pour créer ce document, en est
  un exemple. La DTD fournit un style et une apparence à tous les
  documents créés qui l'utilisent. La seconde est le Contenu, qui est
  traité par l'interpréteur SGML et qui est éventuellement vu par
  l'utilisateur. Ce paragraphe est un contenu, comme pourrait l'être une
  image, une table, une liste numérotée ou autre chose. Le contenu est
  entouré de balises pour séparer les différents éléments.


  Dans quelques temps, le Projet de Documentation Linux passera de
  LinuxDoc à DocBook, déjà utilisée par d'autres auteurs, donnant ainsi
  au LDP un style plus consistent de documents SGML. Quand cela
  arrivera, nous vous tiendront informés par l'intermédiaire de ce HOWTO
  ou des listes de diffusion. La différence la plus importante réside
  dans le fait que DocBook utilise des balises pour les différents types
  de contenus (comme les commandes, les noms de fichiers, de
  répertoires, etc.)  alors que LinuxDoc utilise des balises basées sur
  l'apparence que devrait prendre le texte (vous pouvez utiliser un type
  "insistant" ou machine à écrire).


  22..22..11..  PPoouurrqquuooii SSGGMMLL aauu lliieeuu ddee HHTTMMLL oouu dd''aauuttrreess ffoorrmmaattss ??

  SGML fournit d'autres outils que ceux de mise en forme. Vous pouvez
  créer des index, des tables des matières ou des liens internes ou
  externes automatiquement. Le paquetage sgmltools vous permet aussi
  d'exporter (j'appèlerai ça générer à partir de maintenant) vos
  documents SGML vers LaTeX, info, du texte, HTML ou RTF. Vous pouvez
  alors créer d'autres types de fichiers  (DOC, PostScript, etc.) à
  partir de ces formats de base. Des programmes comme LyX (mon éditeur
  WYSIWYM préféré) vous permettent d'écrire au format TeX, d'exporter au
  format SGML et de générer ce que vous voulez depuis SGML.


  En fin de compte, SGML s'intéresse plus au fonctionnement des éléments
  plutôt qu'à leur apparence. Une différence 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.


  22..33..  LLeess oouuttiillss

  Dans cette section, je vais survoler les outils dont vous aurez besoin
  ou voudrez utiliser pour créer votre propre documentation LDP. Je vais
  les décrire ici, et mieux les explorer plus tard, en même temps que
  leur procédure d'installation. Si vous utilisez d'autres outils pour
  écrire des manuels du LDP, faites le moi savoir, j'ajouterai un
  descriptif ici.


  22..33..11..  ssggmmllttoooollss

  Requis


  Le paquetage sgmltools contient les outils SGML nécessaires pour
  générer les formats dont on a déjà parlé. Il inclut également la DTD
  LinuxDoc, indispensable aux documents LDP. Pour créer 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.

  22..33..22..  TTeeXX

  Optionnel


  TeX est le langage de balisage de texte favori pour beaucoup, dont les
  personnes du monde mathématique. 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
  utilisés pour les pages de manuels). En fait, TeX partage une grande
  partie de ses concepts avec SGML. Néanmoins, TeX génère ses fichiers
  au format DVI (indépendant du périphérique 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.


  22..33..33..  LLyyXX

  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
  règles de SGML quelque fois compliquées. En fait, LyX est utilisé pour
  écrire des documents TeX, et la plupart dans règles TeX sont présentes
  dans LyX. Par exemple, puisque les sections sont numérotées
  automatiquement, vous ne pouvez pas insérer d'espace facilement. Ce
  serait contraire à la philosophie de TeX. De même, 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 créer 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>.


  22..33..44..  EEmmaaccss ((PPSSGGMMLL))

  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


  22..33..55..  WWoorrddPPeerrffeecctt 22000000

  Optionnel


  La dernière 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.


  22..33..66..  DDooccBBooookk :: LL''uullttiimmee gguuiiddee

  Optionnel (mais recommandé)


  Ce livre est édité par O'Reilly depuis Octobre 1999 et c'est une bonne
  référence pour DocBook. Je n'ai pas trouvé qu'il soit très pratique,
  et la plupart des "gloires"est pour XML, mais les balises DocBook 3.1
  sont toutes listées dans un format concit. Vous pourrez le trouver
  chez votre vendeurs favori, ou le retrouver en intégralité sur le site
  http://www.docbook.org <http://www.docbook.org/>.


  33..  DDéémmaarrrreerr aavveecc DDooccBBooookk

  Cette section couvre les nouvelles méthodes pour écrire de la
  documentation pour le LDP, en utilisant la DTD DocBook 3.1. Nous
  verrons comment récupérer, installer et utiliser les outils, ainsi
  qu'une introduction aux balises DocBook. Etant donné qu'il y a près de
  300 balises DocBook, nous ne les verront pas toutes ici. Les lecteurs
  vraiment intéressés pourront se tourner vers http//www.docbook.org
  <http://www.docbook.org/> pour plus d'informations.


  33..11..  PPoouurr lleess nnoouuvveeaauuxx aauutteeuurrss

  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 même, 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 envoyés devront être au format SGML
  (basés 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 imprimées 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.


  33..22..  LLeess lliisstteess ddee ddiissccuussssiioonn

  Il y a quelques listes de discussion auxquelles vous pouvez vous
  abonner pour prendre part au fonctionnement du LDP. La première 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 désabonner, même adresse avec
  "unsubscribe" dans le champ sujet du message.


  33..33..  TTéélléécchhaarrggeerr eett iinnssttaalllleerr lleess oouuttiillss

  33..33..11..  ssggmmllttoooollss

  Contrairement aux versions précédentes, 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 (désolé). 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 dernière 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 téléchargé, vous avez juste à faire ./compile, make, et make
  install pour installer sgmltools.


  Pour les systèmes 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 recupéré
  sgmltools et non sgml-tools, car ce dernier est sgml-tools 1.0.9.


  Pour les systèmes Debian, apt-get récupèrera le bon paquetage pour
  vous :


  # apt-get install sgmltools




  Comme pour les systèmes RedHat, il faut récupérer sgmltools et non
  sgml-tools.


  33..44..  EEccrriirree dduu SSGGMMLL àà llaa mmaaiinn

  Puisque ceci est largement traité dans d'autres ouvrages, les
  personnes intéressées pourront se réferrer à
  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.


  44..  DDéémmaarrrreerr aavveecc LLiinnuuxxDDoocc

  Cette section décrit comme être au point pour écrire vos propres
  documents LDP. Récupérer et configurer les outils, prendre contact
  avec le LDP en général, et partager vos connaissances avec tous les
  utilisateurs de Linux.


  44..11..  PPoouurr lleess nnoouuvveeaauuxx aauutteeuurrss

  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 même, 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 envoyés devront être au format SGML
  (basés 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 imprimées des HOWTO.



  44..22..  LLeess lliisstteess ddee ddiissccuussssiioonn

  Il y a quelques listes de discussion auxquelles vous pouvez vous
  abonner pour prendre part au fonctionnement du LDP. La première 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 désabonner, même adresse avec
  "unsubscribe" dans le champ sujet du message.


  44..33..  TTéélléécchhaarrggeerr eett iinnssttaalllleerr lleess oouuttiillss

  44..33..11..  ssggmmllttoooollss

  Récupérez 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 problèmes 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 télécharger 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
  télécharger 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 déjà vu ci-dessus.


  Une fois les outils installés, vous avez plusieurs commandes à
  disposition.
  sgmlcheck file.sgml - Vérifie la syntaxe du document

  sgml2html file.sgml - Convertit un fichier SGML en HTML. Le fichier
  file.html contiendra la table des matières, les fichiers file-x.html
  contiendront les sections numérotées x.

  sgml2rtf file.sgml - Convertit un fichier SGML en deux fichiers Rich
  Text Format (RTF). Le fichier file.rtf contiendra la table des
  matières et file-0.rtf contiendra toutes les sections.


  sgml2txt file.sgml - Convertit un fichier SGML en texte ASCII. La
  table des matières 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.
  Intéressant si vous avez généré un fichier SGML et voulez le convertir
  pour l'utiliser avec LyX.


  44..44..  EEccrriirree dduu SSGGMMLL àà llaa mmaaiinn

  Tout comme le HTML, vous pourrez écrire du SGML à la main, une fois
  que vous connaîtrez 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 démarrer l'apprentissage. J'essairai de donner les
  indications sur les interprétations des balises dans les différents
  formats de conversion.


  44..44..11..  DDéébbuutt dduu ddooccuummeenntt

  Pour commencer un nouveau document, créez un nouveau fichier avec
  votre éditeur ASCII favori et commencez comme ça :



  <!doctype linuxdoc system>




  Cela précise le type de document (LinuxDoc dans notre cas) que
  l'interprète SGML utilisera pour la conversion vers les autres
  formats. Cette balise ne génère aucun texte en elle même.


  Ensuite vous devez entourez le reste de votre travail entre <article>
  et </article>. Cela indique le début du contenu (ou de l'article,
  eh?). Si vous connaissez HTML, ces balises sont équivalentes aux
  balises <html> et </html>





  44..44..22..  LLeess iinnffoorrmmaattiioonnss ddee ll''eennttêêttee

  La première partie du document devrait inclure des informations
  générales à propos du contenu. Elle est similaire aux premières pages
  d'un livre qui contiennent le titre de l'ouvrage, l'auteur, la date de
  publication, la table des matières, etc.


  Le titre est indiqué entre les balises <title> et </title>. De même on
  utilise <date> et </date> pour la date.


  Les deux sections qui restent sont les balises <abstract> et
  </abstract> qui donnent un résumé du document, et la balise <toc> qui
  indique l'emplacement de la table des matières. Celle ci est
  automatiquement générée par l'interprète SGML. Nous reviendrons sur
  les sections plus tard.


  Maintenant, à quoi tout cela ressemble-t-il ? En regardant le début 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 décembre 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 utilisée pour créer la page principale
  que vous voyez une fois convertie au format RTF ou HTML.


  44..44..33..  LLeess sseeccttiioonnss

  Pour générer la table des matières, 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.


  Démarrer la rédaction de vos documents par les sections est une bonne
  idée 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 même commencé ce document en utilisant cette méthode.


  Les sections fait partie des quelques balises qui n'ont pas besoin
  d'être fermées. Ainsi, il n'y a pas de balise </sect>. Vous n'avez pas
  besoin non plus de vous occuper de la numérotation des sections.
  L'interprète SGML s'en chargera lors de la génération vers d'autres
  formats.


  Les sections sont amorcées par la balise <sect>. Chaque nouvelle
  section commence par <sect>. La première est numérotée 1.


  Les sous-sections (comme 1.1) se créent par la balise <sect1>. Elles
  commencent aussi à 1.


  Les sous-sous-sections (1.1.1) se créent par la balise <sect2> et
  commencent aussi à 1.


  Quand l'interprète SGML arrive à la balise <toc>, il parcourt le reste
  du document et construit la table des matières à partir des balises
  des sections qu'il rencontre. Les sections sont numérotées et listées
  dans la table des matières et, bien sûr, utilisées dans le reste du
  document. Les sous-sous-sections (1.1.1) n'apparaissent pas dans la
  table des matières, mais sont mises en valeur dans le texte si c'est
  possible.


  44..44..44..  LLeess ppaarraaggrraapphheess

  L'écriture de paragraphes est la même 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.


  44..44..55..  TTeexxttee aavvaannccéé

  Vous aurez besoin de différencié 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 résout par les balises <em> et
  </em>. Quant au style machine à écrire, on utilise les balises <tt> et
  </tt>.


  44..44..66..  LLeess lliisstteess

  Il existe deux types de listes sous SGML. La première est la liste
  numérotée, où chaque item de la liste est numéroté (comme les
  sections), en commençant à 1.



  1. Voici la première entrée de la liste numérotée.

  2. Voici la seconde.

  3. Et la troisième.


  Le code pour cette liste est le suivant :



  <enum>
   <item>Voici la première entrée de la liste numérotée.
   <item>Voici la seconde.
   <item>Et la troisième.
  </enum>




  La balise <enum> indique que les entrées qui la suivent doivent être
  numérotées.


  L'autre type de liste est la liste à items simple, où chaque entrée à
  une étoile, un cercle, ou un point, ou tout autre symbole pour
  indiquer chaque item.



  ·  Voici la première entrée de la liste à items.

  ·  Voici la seconde.

  ·  Et la troisième.


  Le code de la liste ressemble à ça en SGML :



  <itemize>
   <item>Voici la première entrée de la liste à items.
   <item>Voici la seconde.
   <item>Et la troisième.
  </itemize>




  Comme vous le voyez, la balise <item> est la même pour les listes
  numérotées et les listes à items.


  Une troisième forme de liste est la liste de définition. Elle comporte
  un terme à définir, et la phrase de définition.



     LLDDPP
        Le Projet de Documentation Linux

     SSGGMMLL
        Standard Generalized Markup Language


  Le code qui permet de créer 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 même syntaxe que pour les listes à items
  et numérotées, mais la liste est aussi entourée par des balises
  (<descrip> et </descrip>) et chaque item qui est un mot à définir est
  entouré par <tag> et </tag>. Le reste de la ligne est alors considéré
  comme la définition de ce dernier.


  44..44..77..  TTeexxttee vveerrbbaattiimm

  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 apparaître tel quel. Les espaces, les
  retours à la ligne, et tout autre caractère spécial sont préservés
  jusqu`à la balise </verb>.



  Ceci est du texte verbatim.

  Et voici un autre texte verbatim.




  44..44..88..  LLeess UURRLL

  SGML fournit de quoi utiliser des URL (Universal Resource Locators ,
  NdT: sortes de pointeurs vers des ressources extérieures) 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-même. Voici un
  URL qui pointe vers la page du LDP : http://www.linuxdoc.org/. Et
  voici le code pour le créer :



  <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 réalité. Dans ce cas, les deux
  parties sont identiques, mais on pourrait créer 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 connaîtra pas l'URL à utiliser.

  44..44..99..  LLeess rrééfféérreenncceess

  Alors que les URL sont adaptés pour faire référence aux ressources
  externes à votre document, ce n'est pas le cas pour les références au
  sein du texte lui-même. Pour cela, les balises <label> et <ref> sont
  préférables. La balise <label> indique un endroit dans le document
  auquel vous voudrez faire référence ailleurs dans le texte, comme un
  signet. La création du <label> est simple. Insérez la ligne suivante à
  l'endroit voulu :



  <label> id="introduction">




  Vous avez alors créé un point dans le texte auquel vous pourrez vous
  référer en tant que "introduction". En effet, cette balise est
  utilisée dans le document SGML que vous lisez. Quand vous voulez
  pointer vers cet endroit (comme ``ici''), vous insérez le code SGML
  suivant :



  <ref id="introduction" name="ici">




  et SGML insérera le mot "ici" dans le texte qui sera un lien vers la
  section indiquée par le label "introduction".


  L'autre utilisation des références est l'indexation. Puisque les
  documents du LDP sont souvent publiés sur papier sous forme d'un grand
  nombre de documents, les références servent à générer un index qui
  apparaîtra à la fin du livre, basé sur les mots et les sujets.


  44..44..1100..  LLeess ccaarraaccttèèrreess ssppéécciiaauuxx

  Tout comme pour HTML, vous devrez interdire l'interprétation de
  certains caractères non alphanumériques pour éviter que SGML les voit
  comme du code. Voici une liste des codes utilisés. 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 caractère inférieur à (<)

  ·  Utilisez &gt; pour le caractère supérieur à (>)

  ·  Utilisez &etago; pour un inférieur à suivi d'une barre oblique (</)

  ·  Utilisez &dollar; pour le signe dollar ($)

  ·  Utilisez &num; pour un dièse (#)

  ·  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)


  44..55..  EEccrriirree dduu SSGGMMLL aavveecc dd''aauuttrreess oouuttiillss

  44..55..11..  LLyyXX

  Je vais encore chanter les louanges pour LyX. Je favorise cette
  application car je l'apprécie 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 plutôt 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'interpréteur SGML aura fait son travail.


  Pour créer un document LinuxDoc avec LyX, téléchargez et installez
  l'application. Assurez-vous d'avoir déjà installé TeX et sgmltools
  (voir ``Télécharger et installer les outils'' pour plus d'informations
  à ce propos). Ensuite, lancez LyX et sélectionnez "file->new from
  template...". Cliquez sur "Templates" et sélectionnez
  linuxdoctemplate.lyx et vous obtiendrez un document de base, avec tous
  les en-têtes d'information qu'un document du LDP se doit d'avoir.
  Modifiez les données selon vos besoins (c'est à dire compléter les
  champs Titre, Auteur, Date, Abstract, etc.) en commencez la rédaction
  de votre document. Le menu dans le coin en haut à gauche vous permet
  de sélectionner le type du texte (standard, liste énumérées 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 sélectionner du texte et cliquer dessus pour
  mettre en valeur du texte déjà écrit. D'autres spécificités de SGML
  peuvent être trouvées dans le menu Insertion. Vous pouvez insérer des
  URL, des références, des entrées d'index, et d'autres types de
  données. 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 vérifier ce
  fichier, qui est prêt à être converti vers d'autres formats.


  44..55..22..  EEmmaaccss

  Emacs dispose d'un mode spécial pour écrire en SGML appelé psgml. Ceux
  qui ont une expérience de ce mode sont invités à donner des
  informations à l'auteur par courrier électronique. psgml est un module
  majeure pour Emacs conçu 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 méthode dínsertion des
  balises sans les taper à la main, et est capable de valider la syntaxe
  de votre document lors de sa rédaction. 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/>.


  44..55..33..  LLeess aauuttrreess oouuttiillss SSGGMMLL

  S'il y a d'autres outils permettant d'utiliser la DTD LinuxDoc pour
  générer des documents du LDP, faites le moi savoir.



  44..66..  LLeess bbaasseess ddee CCVVSS

  Le LDP est en train de mettre un place un accès CVS pour les auteurs.
  Il y a, en effet, de bonnes raisons d'utiliser CVS :



  1. CVS gère une sauvegarde des documents. Si vous passer un document à
     un autre auteur, il peut récupérer le document depuis CVS et
     continuer à travailler dessus. Si vous avez besoin de revenir sur
     une ancienne version, vous pouvez aussi la récupérer.


  2. C'est formidable si plusieurs auteurs travaillent sur le même
     document. Vous pouvez demander à CVS de vous indiquez qu'elles
     modifications ont étées faites pendant que vous travailliez sur le
     document, et directement intégrer 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 analysées avant l'interpréteur SGML.

  4. Il peut servir, grâce à un programme, à mettre à jour le site web
     du LDP automatiquement, dès qu'un document a été terminé et reçu.
     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>


  44..77..  OObbtteenniirr uunn ccoommppttee CCVVSS

  D'abord, il vous faudra obtenir un compte dans le repository CVS du
  LDP (NdT: lieu de stockage et de dépôt des documents pour CVS).  C'est
  souvent le répertoire racine qui est utilisé par CVS, où chaque projet
  (HOWTO, Mini-HOWTO, ...) dispose d'un sous-répertoire.


  Vous devrez créer 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
  connaître 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 réponse 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 créer et vous recevrez un e-mail avec la
  réponse.


  Quand vous obtiendrez la réponse, connectez vous sur votre CVSROOT et
  vérifiez 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 réponse.)


  On vous demandera votre mot de passe, et vous aurez accès au
  repository CVS en mode lecture-écriture. Une fois que vous aurez
  utilisé login et obtenu accès au système, 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 à très grand débit. 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 .


  44..88..  AAuuttrreess iinnffoorrmmaattiioonnss ssuurr CCVVSS

  44..88..11..  AAccccèèss CCVVSS aannoonnyymmee

  L'accès 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 accèder aux
  modules linuxdoc comme décrit ci-dessus. Notez que les changement
  apparaissent sur le site cvs anonyme environ une demi-heure après le
  site principal.


  44..88..22..  FFiicchhiieerrss CCVVSS vviiaa llee wweebb

  Vous pouvez accèder au repository CVS par le web à l'adresse
  http://cvsweb.linuxdoc.org/index.cgi/linuxdoc
  <http://cvsweb.linuxdoc.org/index.cgi/linuxdoc>.


  44..88..33..  AAccccèèss ggrraapphhiiqquuee àà CCVVSS

  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.


  44..99..  CCVVSS eett llaa mmiissee àà jjoouurr ddeess ffiicchhiieerrss

  CVS reconnait une balise spéciale que vous pouvez utiliser pour
  insérer 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 modifiée à chaque changement du document,
  permettant une incrémentation 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
  paramètre -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 décidez
  d'utiliser un éditeur plutôt que de spécifier 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
  envoyées à ldp-submit.


  55..  DDiissttrriibbuueerr vvoottrree ddooccuummeennttaattiioonn

  55..11..  AAvvaanntt llaa ddiissttrriibbuuttiioonn

  Avant de distribuer votre prose à des millions de lecteurs potentiels,
  il y a quelques petites choses à faire.


  D'abord, vérifiez le bon français 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 vérification de
  l'orthographe. Si ce n'est pas le cas, il y a toujours ISPELL,
  disponible dans toutes les distributions. Utilisez aussi sgmlchek pour
  vérifier la cohérence de vos balises SGML.

  Deuxièmement, faites relire votre document par quelqu'un d'autre que
  vous pour obtenir des commentaires et d'éventuelles corrections. La
  documentation publiée 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.


  Troisièmement, créez un site web où vous pourrez distribuer vos
  réalisations. Ce n'est pas indispensable, mais très utile pour
  retrouver la source originale du document.


  55..22..  NNoottiioonnss ddee ccooppyyrriigghhtt eett ddee lliicceennccee

  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 dérivés). 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 intitulée "Copyright et licence" où quelque chose
  dans ce genre. Incluez également une clause de propriété (puisque vous
  en serez le propriétaire). Si vous êtes un nouveau responsable d'un
  HOWTO qui existait déjà, vous devez inclure les clauses de copyright
  de(s) l'ancien(s) auteur(s) et la période où ils ont maintenu le
  document, à moins qu'ils aient distribué leur document dans le Domaine
  Publique quand ils en ont arrèté la maintenance.


  55..33..  UUnnee ffooiiss qquuee vvoottrree ddooccuummeenntt aa ééttéé rreelluu eett qquuee vvoouuss aavveezz pprriiss eenn
  ccoommppttee lleess ccoommmmeennttaaiirreess ddeess rreelleecctteeuurrss,, vvoouuss ppoouuvveezz ssoouummeettttrree vvoottrree
  tteexxttee aauu LLDDPP.. EEnnvvooyyeezz uunn ee--mmaaiill ààllddpp--ssuubbmmiitt@@lliissttss..lliinnuuxxddoocc..oorrgg..
  IInnddiiqquueezz llee nnoomm dduu HHOOWWTTOO ddaannss llee ssuujjeett dduu mmaaiill,, eett ddééccrriivveezz lleess
  cchhaannggeemmeennttss qquuee vvoouuss aavveezz ffaaiitt ((rrééééccrriittuurree mmaajjeeuurree oouu ccoorrrreeccttiioonnss ddee
  ffaauutteess dd''oorrtthhooggrraapphhee ......)) ddaannss llee ccoorrppss dduu mmeessssaaggee,, eenn yy jjooiiggnnaanntt
  vvoottrree ddooccuummeenntt.. CCeellàà ppeerrmmeett aauuxx mmaaiinntteenneeuurrss ddee ffaaiirree lleeuurr ttrraavvaaiill pplluuss
  rraappiiddeemmeenntt,, eett ddee nnee ppaass aavvooiirr àà ttrroopp aatttteennddrree aavvaanntt qquuee vvoottrree HHOOWWTTOO
  nnee ssooiitt ddiissppoonniibbllee ssuurr llee ssiittee wweebb dduu LLDDPP..  SSii vvoouuss nn''aavveezz ppaass ddee
  rrééppoonnssee ddaannss lleess 77 jjoouurrss ssuuiivvaanntt,, rreennvvooyyeezz uunn mmaaiill ppoouurr ssaavvooiirr ssii
  vvoottrree HHOOWWTTOO àà bbiieenn ééttéé ttrraaiittéé..  SSoouummiissssiioonn aauu LLDDPP

  66..  CCoonnsseeiillss ddee ssttyyllee

  Ceci n'est pas un guide complet sur comment écrire une bonne
  documentation (pour l'instant), mais considérez le comme une liste
  rapide de conseils pour vous aider tout au long de la rédaction.



  ·  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 même
     section.


  Vous pourrez obtenir beaucoup d'autres conseils sur le style du LDP à
  l'adresse http://www.linuxdoc.org/HOWTO/LDP-Style-Guide.html.



  77..  FFAAQQ àà pprrooppooss dduu LLDDPP

  77..11..  JJee ddééssiirree aaiiddeerr llee LLDDPP.. CCoommmmeenntt ppuuiiss--jjee llee ffaaiirree ??

  La façon 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.


  77..22..  lliivvrree.. CCoommmmeenntt eesstt pprroottééggéé llee ccoonntteennuu dduu LLDDPP ??  JJee vvoouuddrraaiiss ppuubb­­
  lliieerr uunn eennsseemmbbllee ddee ddooccuummeennttss dduu LLDDPP ddaannss uunn

  Référez vous à la page http://www.linuxdoc.org/COPYRIGHT.html.


  77..33..  ccoorrrriiggeerr ??  JJ''aaii ttrroouuvvéé uunnee eerrrreeuurr ddaannss uunn ddooccuummeenntt dduu LLDDPP..
  PPuuiiss--jjee llee

  Contactez l'auteur du document, où le coordinateur et informez le du
  problème en lui donnant une éventuelle correction.














































Voir Liste-des-HOWTO

  HOWTO Compatibilité Linux <-> Matériel
  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 matériels compatibles
  avec Linux et vous aide à rechercher les pilotes nécessaires.
  Traduction : Jacques Chion <Jacques.Chion@wanadoo.fr>.  Merci à Chris­
  tian Gillot et Denis Arnaud pour leurs corrections pertinentes.
  ______________________________________________________________________

  Table des matières






















































  1. Introduction

     1.1 Message de bienvenue
     1.2 Copyrights
     1.3 Architectures systèmes

  2. Micro-ordinateurs/cartes mères/BIOS

     2.1 Systèmes spécifiques/cartes mères/BIOS
     2.2 Non-supportés

  3. Portables

     3.1 Portables spécifiques
     3.2 PCMCIA

  4. Processeurs/Coprocesseurs (CPU/FPU)

  5. Mémoire

  6. Cartes graphiques

     6.1 Cartes graphiques Diamond
     6.2 SVGALIB (graphiques pour console)
     6.3 XFree86 3.3.2
        6.3.1 Accélérées
        6.3.2 Non accélérées
        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. Contrôleurs (de disques dur)

     7.1 Pilotes alphas et betas

  8. Contrôleurs (de disques durs RAID)

  9. Contrôleurs (SCSI)

     9.1 Supportés
     9.2 Pilotes alphas et betas
     9.3 Non supportés

  10. Contrôleurs (d'E/S)

  11. Contrôleurs (multiports)

     11.1 Cartes non-intelligentes
        11.1.1 Supportées
     11.2 Les cartes intelligentes
        11.2.1 Supportées
        11.2.2 Pilotes alphas et betas

  12. Extensions réseaux

     12.1 Supportées
        12.1.1 Cartes réseaux (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 réseaux (Ethernet)
        12.2.2 RNIS (ISDN)
        12.2.3 ATM
        12.2.4 Relais de trame
        12.2.5 Sans fil
     12.3 Non supportées

  13. Cartes son

     13.1 Supportées
     13.2 Pilotes alphas et betas
     13.3 Non supportées

  14. Disques durs

     14.1 Non supportés

  15. Lecteurs de bandes

     15.1 Supportés
     15.2 Pilotes alphas et betas
     15.3 Non supportés

  16. Lecteurs de cdroms

     16.1 Supportés
     16.2 Autres
     16.3 Remarques

  17. Graveurs de CD

  18. Lecteurs extractibles

  19. Souris

     19.1 Supportées
     19.2 Pilotes alphas et betas
     19.3 Remarques

  20. Modems

  21. Imprimantes et tables traçante

     21.1 Ghostscript
        21.1.1 Imprimantes supportées par Ghostscript 5.1
        21.1.2 Pilotes alphas et Betas

  22. Scanners

     22.1 Supportés
     22.2 Pilotes alphas et betas
     22.3 Non supportés

  23. Autres matériels

     23.1 Radio-Amateur
     23.2 Moniteurs VESA avec Protocole d'économie d'énergie (DPMS)
     23.3 Écrans tactiles
     23.4 Terminaux sur port série
     23.5 Les manches à balai (joystick)
     23.6 Cartes d'acquisition vidéo / Capture d'images / Tuner TV
     23.7 Caméra digitale
        23.7.1 Supportés
        23.7.2 Non supportés
     23.8 Onduleurs
     23.9 Cartes multifonctions
     23.10 Acquisition de données
     23.11 Interfaces horloge chien de garde (Watchdog timers interfaces)
     23.12 Divers

  24. Sources d'informations

  25. Remerciements

  26. Annexe A. Cartes S3  supportées par XFree86 3.3.x.

  27. Annexe B. Cartes PCMCIA supportées

     27.1 Cartes réseaux (Ethernet)
     27.2 Adaptateurs Fast Ethernet (10/100baseT)
     27.3 Adaptateurs Token Ring
     27.4 Adaptateurs réseaux sans fils
     27.5 RNIS (ISDN)
     27.6 Modems et cartes séries
     27.7 Cartes mémoire
     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 parallèle
     27.14 Cartes diverses
     27.15 En cours ...
     27.16 Non supportés

  28. Annexe C. Dispositifs supportés sur le port parallèle

     28.1 Carte réseaux (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 Caméra digitale
     28.9 Cartes port parallèle PCMCIA

  29. Annexe D. Dispositifs Plug and Play

  30. Annexe E. Matériel incompatible avec Linux

  31. Glossaire



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  NNBB:: USB n'est pas encore supporté par Linux. (NdT : commence à
  apparaître avec les noyaux 2.3.x, mais non recommandé pour ceux qui
  ont des problèmes cardiaques ...)




  11..11..  MMeessssaaggee ddee bbiieennvveennuuee

  Bienvenue sur cet HOWTO. Ce document donne la liste de la plupart des
  matériels compatibles avec Linux (sauf les ordinateurs avec composants
  intégrés), ainsi en lisant ce document vous pourrez choisir les
  composants de votre ordinateur Linux personnel. Étant donné que la
  liste des composants supportés par Linux croît rapidement, ce document
  ne sera jamais complet. Donc, si des composants ne sont pas mentionnés
  dans ce document, la seule raison est que j'ignore s'ils sont
  supportés. Je n'ai simplement pas trouvé de support concernant ce
  composant et/ou personne ne m'a apporté d'informations le concernant.

  Les paragraphes intitulés « Les pilotes alphas et betas » donnent la
  liste des matériels avec des pilotes alphas ou betas dans différentes
  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 périphériques sont supportés avec des modules qui ne sont
  disponibles que sous forme binaire ; évitez-les autant que possible.
  Les modules binaires sont compilés pour UNE VERSION DU NOYAU DONNÉE.
  Le code source de ces modules n'est pas disponible. Cela peut vous
  empêcher de mettre à niveau ou de maintenir votre système.
  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 compilés ».
  Voir  <http://www.kt.opensrc.org/kt19990211_5.html#10> pour avoir des
  informations sur la disponibilité des codes source concernant les
  composants.  La dernière 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 référence français est
  <ftp://ftp.lip6.fr/pub/linux/french>)


  Si vous avez connaissance d'(in)compatibilités qui ne sont pas
  mentionnées ici, dites-le moi. Envoyez-moi un courrier.

  Toujours besoin d'aide après avoir lu ce document ? Consultez le site
  « Contruisez votre propre PC » à l'adresse
  <http://www.verinet.com/pc/>.

  Vous voulez un système préconfiguré avec Linux ? Jetez un oeil sur le
  site  <http://www.linuxresources.com/web/>.

  11..22..  CCooppyyrriigghhttss

  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 publiée par la Free Software Foundation ;
  soit la version 2 de la licence, ou (suivant vos désirs) toute version
  ultérieure.

  Ce document est diffusé en espérant qu'il sera utile, mais sans aucune
  garantie ; même sans la garantie implicite de pouvoir être
  commercialisé ou d'adéquation pour un usage spécifique. Voir la
  General Public License pour plus de détails. Vous pouvez obtenir une
  copie de cette dernière 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.


  11..33..  AArrcchhiitteeccttuurreess ssyyssttèèmmeess

  Ce document ne traite que des systèmes Intel, pour les autres vérifiez
  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 insérable)
     <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>


  22..  MMiiccrroo--oorrddiinnaatteeuurrss//ccaarrtteess mmèèrreess//BBIIOOSS

  Les bus ISA, VLB, EISA et PCI sont tous supportés.



  22..11..  SSyyssttèèmmeess ssppéécciiffiiqquueess//ccaarrtteess mmèèrreess//BBIIOOSS


  ·  Les systèmes IBM PS/2 MCA Sont supportés 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
     sytèmes MCA se trouvent sur le site
     <http://www.dgmicro.com/linuxmca>.  De plus des informations sur le
     sous-système MCA SCSI peuvent être trouvées sur le site
     <http://www.uni-mainz.de/~langm000/linux.html>.

  ·  La carte mère EFA E5TX-AT pose problème, mais celui-ci est
     résoluble avec la distribution RedHat Linux 5.0 et probablement
     avec d'autres versions. Il réamore spontanément lors de la
     détection du matériel. Pour le résoudre, 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 mère Edom MP080 nécessite un flash du BIOS pour pouvoir
     travailler avec Linux. Sans ce flashage Linux réamorcera durant
     l'examen du matériel. Pour le flash du BIOS, voir
     <http://www.edom.com/tech/tech.htm> et
     <http://www.edom.com/download>.

  ·  La carte-mère Zida 6MLX avec la puce PII Intel LX est indiquée
     comme étant opérationnelle avec Linux uniquement si on supprime le
     cache PII dans le BIOS. Une mise à jour du BIOS ne résout pas ce
     problème. Les symptômes sont un réamorçage aléatoire pendant ou
     juste après l'amorce du système.

     Beaucoup de cartes PCI provoquent un certain nombre de messages
     d'erreurs lors de la détection des dispositifs PCI au moment du
     démarrage. La procédure 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 :

  PROCÉDURE RELATIVE AUX NOUVEAUX DISPOSITIFS PCI
  Nous essayons de collecter des informations sur les nouveaux dispositifs PCI
  en utilisant la procédure standard d'identification PCI. Si des messages
  d'avertissement apparaissent lors de l'amorçage du système,
  merci de mentionner :
      -/proc/pci
      -une description exacte de votre matériel. Essayez de trouver quel
  dispositif n'est pas reconnu. Cela peut être un circuit de votre carte-mère,
  la passerelle PCI-CPU ou PCI-ISA.
      -si vous pouvez trouver les informations exactes dans la notice de votre
  matériel, essayez de trouver les références du circuit se trouvant sur la carte.
      -envoyez le tout à linux-pcisupport@cao-vlsi.ibp.fr, et j'ajouterai
  votre dispositif dans la liste dès que possible.

            AVANT d'envoyer un courrier, merci de vérifier les dernières
  distributions linux afin d'être sûr qu'il n'a pas été récemment ajouté.

            Merci
                Frederic Potter



  Normalement, votre carte-mère et vos dispositifs PCI inconnus
  devraient fonctionner correctement.



  22..22..  NNoonn--ssuuppppoorrttééss


  ·  Supermicro P5MMA avec BIOS versions 1.36, 1.37 et 1.4. Linux ne
     démarre pas avec ces cartes mères. Une nouvelle (beta) version du
     BIOS, compatible avec Linux est disponible sur le site
     <ftp.supermicro.com/mma9051.zip>.

  ·  Supermicro P5MMA98. Linux ne démarre pas sur cette carte-mère. Une
     nouvelle (beta) version du BIOS compatible avec Linux se trouve sur
     <ftp.supermicro.com/a98905.zip>.

  ·  La carte mère 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 manière aléatoire, des
     oops noyau ainsi que des blocages avec le noyau lors d'une
     utilisation intensive et d'un accès au lecteur de bandes. Le
     problème semble provenir du bus PCI, et plus précisément de la puce
     ACER.




  33..  PPoorrttaabblleess

  Pour avoir plus d'informations concernant Linux et les portables, le
  site suivant est un bon point de départ.

  ·  Page d'accueil Linux et portables
     <http://www.cs.utexas.edu/users/kharker/linux-laptop/>

  D'autres informations relatives aux portables peuvent être trouvées
  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 générales
     <ftp://tsx-11.mit.edu/pub/linux/packages/laptops/>


  33..11..  PPoorrttaabblleess ssppéécciiffiiqquueess


  ·  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 (série 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>


  33..22..  PPCCMMCCIIAA


  ·  PCMCIA
     <http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html>

  Les pilotes PCMCIA supportent les contrôleurs PCMCIA usuels, comme les
  circuits Databool TCIC/2, Intel i82365SL, Cirrus PD67xx et Vadem
  VG-468. Le contrôleur Motorola 6AHC05GA, utilisé dans certains
  portables Hyundai, n'est pas supporté.  Voir l'annexe B pour la liste
  des cartes PCMCIA supportées.



  44..  PPrroocceesssseeuurrss//CCoopprroocceesssseeuurrss ((CCPPUU//FFPPUU))

  Intel/AMD/Cyrix 386SX/DX/SL/DXL/SLC, 486SX/DX/SL/SX2/DX2/DX4 sont
  supportés.  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
  évitées car elles sont boguées. Désactiver le "cache interne" dans le
  BIOS peut être un échappatoire.  AMD K6-2 et K6-3 fonctionnent
  également. Quelques K6-2 300 Mhz de première génération ont des
  problèmes avec les puces système. Le Cyrix 6x86 fonctionne sans
  problème.

  Les processeurs IDT Winchip C6-PSME2006A sont également supportés (
  <http://www.winchip.com>).

  Linux possède une émulation FPU si vous n'avez pas de coprocesseur
  arithmétique.  Le support SMP (processeurs multiples) est inclus à
  partir du 1.3.31. Consultez les pages du projet Linux/SMP pour les
  détails et les mises à jour.

  ·  Projet Linux/SMP
     <http://www.linux.org.uk/SMP/title.html>

  Les effets multimédias inclus dans le Cyrix MediaGX ne sont pas
  supportés.

  Quelques AMD 486DX de première génération peuvent se bloquer dans
  certaines situations. Tous les processeurs récents devraient convenir,
  et pouvoir échanger les vieux CPU ne devrait pas poser de problèmes.

  La série des coprocesseurs ULSI possède un bogue dans les instructions
  FSAVE et FRSTOR provoquant des problèmes avec tous les systèmes
  opérant en mode protégé.  Cela peut aussi être le cas pour quelques
  vieux IIT et Cyrix.

  Il y a des problèmes concernant le « TLB flushing » des circuits UMC
  U5S. Ils sont résolus 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 contrôle de cache
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/linux.cxpatch>

  ·  réglages du registre du CPU Cyrix 5x86
     <ftp://metalab.unc.edu/pub/Linux/kernel/patches/cx5x86mod_1.0c.tgz>


  55..  MMéémmooiirree

  Toutes les mémoires telles que DRAM, EDO et SDRAM peuvent être
  utilisées avec Linux. Il y a une seule chose à laquelle vous devez
  faire attention : normalement le noyau ne supporte pas plus de 64 Mo
  de mémoire. Lorsque vous ajoutez plus de 64 Mo de mémoire, vous devez
  ajouter la ligne suivante à votre fichier de configuration LILO :


     append="mem=<nombre de Mo>M"


  Ainsi lorsque vous avez 96 Mo de mémoire, cela devient


    append="mem=96M"



  Ne tapez pas un nombre supérieur à celui que vous avez réellement.
  Cela peut produire des plantages imprévisibles.


  66..  CCaarrtteess ggrraapphhiiqquueess

  Linux peut travailler avec toutes les cartes graphiques en mode texte,
  les cartes VGA qui ne sont pas citées ci-dessous devant pouvoir être
  utilisées avec des pilotes VGA monochromes ou standards.

  Si vous voulez acheter une carte vidéo économique pour tourner sous X,
  gardez à l'esprit que les cartes accélérées (ATI Mach,ET4000/W32p, S3)
  sont _b_e_a_u_c_o_u_p plus rapides que les cartes partiellement ou non
  accélérées (Cirrus, WD).

  « 32 bpp » signifie, en réalité, 24 niveaux de bits alignés 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 compactés ne sont pas supportés dans XFree86, dès
  lors les cartes pouvant travailler en mode couleur 24 bits sur
  d'autres systèmes 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.


  66..11..  CCaarrtteess ggrraapphhiiqquueess DDiiaammoonndd

  La plupart des cartes Diamond récentes _s_o_n_t supportées par la version
  actuelle de XFree86.  Les vieilles cartes Diamond ne sont pas
  supportées par XFree86, mais il existe des moyens pour les faire
  marcher. Diamond coopère maintenant activement avec le projet XFree86.


  66..22..  SSVVGGAALLIIBB ((ggrraapphhiiqquueess ppoouurr ccoonnssoollee))


  ·  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


  66..33..  XXFFrreeee8866 33..33..22



  66..33..11..  AAccccéélléérrééeess


  ·  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 vidéo)

  ·  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 supportées

  ·  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


  66..33..22..  NNoonn aaccccéélléérrééeess


  ·  Alliance AP6422, AT24

  ·  séries 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


  66..33..33..  MMoonnoocchhrroommee


  ·  Hercules mono

  ·  Hyundai HGC-1280

  ·  Sigma LaserView PLUS

  ·  VGA mono


  66..33..44..  PPiillootteess aallpphhaass eett bbeettaass


  ·  EGA (ancien, depuis environ 1992)
     <ftp://ftp.funet.fi/pub/Linux/BETA/Xega/>


  66..44..  SSeerrvveeuurrss SS..uu..SS..EE..



  S.u.S.E. élabore un ensemble de serveurs X basés 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 vidéo 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.


  66..55..  SSeerrvveeuurrss XX ccoommmmeerrcciiaauuxx

  Des serveurs X commerciaux fournissent des supports pour les cartes
  non supportées par XFree86, et peuvent avoir de meilleures
  performances que des cartes supportées par XFree86.  En général, ils
  admettent beaucoup plus de cartes que XFree86, aussi je ne citerai que
  les cartes non supportées par XFree86. Contactez directement les
  vendeurs, ou lisez le « Commercial-HOWTO » pour plus d'informations.


  66..55..11..  XXii GGrraapphhiiccss,, IInncc


  Xi Graphics, Inc.  <http://ww.xig.com> (jadis connu sous le nom de X
  Inside, Inc) commercialise trois serveurs X (les cartes supportées
  sont listées 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



  66..55..22..  MMeettrroo--XX 44..33..00

  Metro Link <sales@metrolink.com>.

  Cartes supportées:

  ·  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)

  77..  CCoonnttrrôôlleeuurrss ((ddee ddiissqquueess dduurr))

  Linux fonctionne avec les contrôleurs standards IDE, MFM et RLL. Quand
  on utilise des contrôleurs MFM/RLL, il est important d'utiliser ext2fs
  avec l'option de vérification des blocs défectueux si l'on formate le
  disque.

  Les interfaces EIDE sont supportées. On peut aller jusqu'à deux
  interfaces IDE avec quatre disques durs et/ou lecteurs de cdroms.
  Linux détecte les interfaces EIDE suivantes:


  ·  CMD-640 (Support pour les interfaces boguées 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 boguées dans les noyaux 2.2)

  ·  Triton I (82371FB) (avec busmaster DMA)

  ·  Triton II (82371SB) (avec busmaster DMA)

  Les contrôleurs ESDI émulant l'interface ST-506 (MFM/RLL/IDE) sont
  aussi supportés. Le commentaire précédent concernant la vérification
  des blocs défectueux s'applique ici aussi.

  Les contrôleurs 8 bits XT marchent également.


  Le démarrage IDE/ATAPI est fourni avec le pré-patch-2.0.31-3.


  77..11..  PPiillootteess aallpphhaass eett bbeettaass


  ·  Interfaces UMC 8672 (au stade expérimental dans les noyaux 2.2)

  ·  Carte interface cache Promise DC4030VL (support expérimental dans
     les noyaux 2.2)


  88..  CCoonnttrrôôlleeuurrss ((ddee ddiissqquueess dduurrss RRAAIIDD))


  ·  Contrôleur cache IDE PCI Tekram D690CD (avec miroitement et cache
     RAID niveau 1)

  ·  Contrôleur de miroitement de disque IDE DupliDisk ARCO Inc.
     Support des disques ATA, IDE, E-IDE et UDMA. Les contrôleurs
     disponibles peuvent être insérés dans les connecteurs ISA et PCI,
     et de manière directe dans les contrôleurs IDE. De plus, des unités
     de montage 3,5 pouces et 5,25 pouces sont disponibles, ce qui
     permet de les monter dans les baies de disque adéquates.  Plus
     d'informations sur le site  <http://www.arcoide.com>. Soyez
     certains de posséder au moins la version 3.00 du logiciel intégré.

  ·  Contrôleurs RAID Mylex
     Plus d'informations sur le site
     <http://www.dandelion.com/Linux/DAC960.html>


  99..  CCoonnttrrôôlleeuurrss ((SSCCSSII))

  Il est important d'envisager l'utilisation d'un contrôleur SCSI avec
  soin.  Beaucoup de contrôleurs économiques ISA SCSI ont été conçus
  pour piloter des cdroms plutôt qu'autre chose. De tels contrôleurs 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.


  99..11..  SSuuppppoorrttééss


  ·  AMI Fast Disk (VVLLBB//EEIISSAA (compatible avec BusLogic)

  ·  Adaptec AVA-1502E (IISSAA//VVLLBB) (AIC-6360) (_A_H_A_1_5_2_0)

  ·  Adaptec AVA-1505/1515 (IISSAA) (compatible avec Adaptec 152x)

  ·  Adapatec AVA-1825 (VVLLBB) (compatible avec AHA-152x)
     Cette carte possède des sorties SCSI, EIDE et disquette qui
     fonctionnent très bien.

  ·  Adaptec AHA-1510/152x (IISSAA//VVLLBB) (AIC-6260/6360)

  ·  Adaptec AHA-154x (IISSAA) (tous modèles)

  ·  Adaptec AHA-174x (EEIISSAA) (en mode amélioré (enhanced mode))

  ·  Adaptec AHA-274x/274xT (EEIISSAA) (AIC-7771). La 274xT est supportée
     depuis la série des noyaux 2.1.x (_A_H_A_2_7_4_0

  ·  Adaptec AHA-284x (VVLLBB) (AIC-7770) (_A_H_A_2_7_4_0)


  ·  Adaptec AHA-2910B (PPCCII) (depuis les noyaux 2.1.x)

  ·  Adaptec AHA-2920 (PPCCII). Utilisez le pilote Future Domain. On doit
     donner des paramètres à LILO lors de l'utilisation de disques durs.

  ·  Adaptec AHA-2920C (PPCCII)

  ·  Adaptec AHA-2930/U/U2 (PPCCII)

  ·  Adaptec AHA-2940/U/W/AU/UW/U2W/U2/U2B/U2BOEM (PPCCII) (AIC-7861,
     AIC-7871, AIC-7844, AIC-7881, AIC-7884). Quelques-unes ne sont
     supportées que depuis les noyaux 2.1.x (_A_H_A_2_7_4_0)

  ·  Adaptec AHA-2944D/WD/UD/UWD (PPCCII). Quelques-unes ne sont supportées
     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 (PPCCII) (AIC-7872, AIC-7882) (depuis le
     1.3.6). Certaines ne sont supportées que depuis les noyaux 2.1.x

  ·  Adaptec AHA-3950U2B/U2D

  ·  Adaptec AHA-3985U/W/UW (PPCCII) (AIC-7873, AIC-7883). Certaines ne
     sont supportées que depuis les noyaux 2.1.x

  ·  Adaptec contrôleurs PPCCII pour AIC-7850, AIC-7855, AIC-7860

  ·  Adaptec cartes contrôleurs AIC-777x (EEIISSAA), AIC-785x, AIC-786x,
     AIC-787x (PPCCII), AIC-788x (PPCCII), AIC-789x, AIC-3860. AIC-786x et
     AIC-789x sont supportées depuis les noyaux 2.1.x

  ·  AdvanSys ABP510/5150 Bus-Master (IISSAA)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP5140 Bus-Master (IISSAA) PnP
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP5142 Bus-Master (IISSAA) PnP avec lecteur de disquettes
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP920 Bus-Master (PPCCII)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP930/U Bus-Master (PPCCII//UUllttrraa>>)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP960/U Bus-Master (PPCCII//UULLTTRRAA) MAC/PC
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP542 Bus-Master (IISSAA) avec contrôleur de disquette (un
     seul canal)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP742 Bus-Master (EEIISSAA) (un seul canal)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP842 Bus-Master (VVLL) (un seul canal)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP940/U Bus-Master (PPCCII//UUllttrraa) (un seul canal)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP970/U Bus-Master (PPCCII//UUllttrraa) MAC/PC (un seul canal)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP752 Dual Channel Bus-Master (EEIISSAA) (deux canaux)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP852 Dual Channel Bus-Master (VVLL) (deux canaux)
     <http://advansys.com/support/software/os/linux.htm>

  ·  AdvanSys ABP950 Dual Channel Bus-Master (PPCCII) (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 (IISSAA//EEIISSAA//PPCCII)
     Voyez  <http://www.uni-mainz.de/~neuffer/scsi/dpt/>
     Dans cette catégorie 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 (EEIISSAA) (compatible avec Adaptec 154x)

  ·  Future Domain TMC-16x0, TMC-3260 (PPCCII)

  ·  Future Domain TMC-8xx, TMC-950

  ·  Future Domain TMC-1800, TMC-18C50, TMC-18C30, TMC-36C70

  ·  ICP-Vortex (contrôleurs d'ensemble RAID PCI-SCSI (beaucoup de
     niveaux RAID sont supportés)
     Des rectificatifs pour Linux 1.2.13 et 2.0.29 sont disponibles sur
     <ftp://icp-vortex.com/download/linux/>. Les contrôleurs GDT6111RP,
     GDT6117RP, GDT6127RP, GDT6511RP, GDT6521RP, GDT6517RP, GDT6527RP,
     GDT6537RP et GDT6557RP sont supportés. Vous pouvez également
     utiliser les rectificatifs du pre-patch-2.0.31-4 au pre-
     patch-2.0.31-9.

  ·  ICP-Vortex contrôleurs EISA-SCSI (beaucoup de niveaux RAID sont
     supportés).
     Des rectificatifs pour Linux 1.2.13 et 2.0.29 sont disponibles sur
     le site <ftp://icp-vortex.com/download/linux/>.  Les contrôleurs
     GDT3000B, GDT3000A, GDT3010A, GDT3020A et GDT3050A sont supportés.
     Vous pouvez également utiliser les rectificatifs du pre-
     patch-2.0.31-4 au pre-patch-2.0.31-9.

  ·  Iomega PPA3: adaptateur bus hôte SCSI sur port parallèle 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) Séries W (PPCCII) (BT-948, BT-958,
     BT-958D)


  ·  Mylex (anciennement BusLogic) Séries C (IISSAA//EEIISSAA//VVLLBB//PPCCII) (BT-946C,
     BT-956C, BT-956CD, BT-445, BT-747C, BT-757C, BT-757CD, BT-545C,
     BT-540CF)

  ·  Mylex (anciennement Buslogic) Séries S (IISSAA//EEIISSAA//VVLLBB) (BT-445S,
     BT-747S, BT-747D, BT-757S, BT-757D, BT-545S, BT-542D, BT-742A,
     BT-542B)

  ·  Mylex (anciennement BusLogic) Séries A (IISSAA//EEIISSAA) (BT-742A,
     BT-542B)

  ·  DPT PM2001, PM2012A (EATA-PIO)

  ·  DPT Smartcache/SmartRAID Modèles Plus, III, IV (IISSAA//EEIISSAA//PPCCIIii)
     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 (EEIISSAA) (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

  ·  Contrôleurs d'ensemble de disques PCI-SCSI ICP-Vortex (beaucoup de
     niveaux RAID supportés)
     Les rectificatifs pour Linux 1.2.13 et 2.0.29 sont disponibles sur
     le site <ftp://icp-vortex.com/download/linux/>. Les contrôleurs
     GDT6111RP, GTD6121RP, GDT6117RP, GTD6127RP, GDT6511RP, GDT6521RP,
     GDT6517RP, GDT6527RP, GDT6537RP et GDT6557RP sont supportés. Vous
     pouvez également utiliser du pre-patch-2.0.31-4 jusqu'au pre-
     patch-2.0.31-9.

  ·  Contrôleurs EISA-SCSI ICP-Vortex (beaucoup de niveaux RAID
     supportés)
     Des rectificatifs pour Linux 1.2.13 et 2.0.29 sont disponibles sur
     <ftp://icp-vortex.com/download/linux/>. Les contrôleurs GDT3000B,
     GDT3000A, GDT3010A, GDT3020A et GDT3050A sont supportés. Vous
     pouvez également utiliser du pre-patch-2.0.31-4 jusqu'au 2.0.31-9.

  ·  Adaptateur bus hôte SCSI pour port parallèle Iomega PPA3 incorporé
     dans le lecteur ZIP

  ·  Media Vision Pro Audio Spectrum 16 SCSI (IISSAA)

  ·  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) (IISSAA//VVLLBB)


  ·  Qlogic FASXXX/FASXX (famille des circuits) (IISSAA//VVLLBB)

  ·  Qlogic IQ-PCI, IQ-PCI-10, IQ-PCI-D (PPCCII) (circuit ISP1020)

  ·  Quantum ISA-200S, ISA-250MG

  ·  Seagate ST-01/ST-02 (IISSAA)

  ·  SIIG Ultrawide SCSI Pro (circuit Initio). Les pilotes de
     périphérique et les rectificatifs à appliquer au noyau sont sur le
     site  <http://www.initio.com/suse.htm>

  ·  SoundBlaster 16 SCSI-2 (compatible Adaptec 152x) (IISSAA)

  ·  Tekram DC-390, DC-390W/U/F

  ·  Trantor T128/T128F/T228 (IISSAA)

  ·  UltraStor 14F (IISSAA), 24F (EEIISSAA), 34F (VVLLBB)

  ·  Western Digital WD7000 SCSI


  99..22..  PPiillootteess aallpphhaass eett bbeettaass


  ·  AM79C974 (PPCCII) (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>


  99..33..  NNoonn ssuuppppoorrttééss


  ·  Adaptec AHA 2940UW Pro

  ·  Adaptec AAA-13x Adaptateurs RAID

  ·  Adaptec AAA-113x cartes port RAID

  ·  Adaptec AIC-7810

  ·  NCR circuit 53C710 (IISSAA) (vieux circuit, dépassé, mais toujours
     utilisé dans quelques modèles Compaq)

  ·  Cartes DTC non compatibles avec Adaptec (327x, 328x)


  1100..  CCoonnttrrôôlleeuurrss ((dd''EE//SS))

  Toutes cartes mixtes standards série/parallèle/joystick/IDE.  Linux
  supporte les UART 8250, 16450, 16550 et 16550A. Les cartes qui
  supportent des IRQ non-standards (IRQ >9) peuvent être utilisées.


  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 Vayssière).
  Le paragraphe 5.0 décrit en détail les différences entre le NS16550 et
  le NS16550A. Brièvement, le NS16550 possède des bogues dans les
  circuits FIFO qui ont été corrigés dans le NS16550A (et ceux qui
  suivent). Heureusement, il y a eu très peu de NS16550 produits par
  National, et il y a longtemps ; ils sont donc très 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 plutôt que comme un 16550A.  - Zhahai Stewart
  <zstewart@hisys.com>


  1111..  CCoonnttrrôôlleeuurrss ((mmuullttiippoorrttss))

  1111..11..  CCaarrtteess nnoonn--iinntteelllliiggeenntteess

  1111..11..11..  SSuuppppoorrttééeess


  ·  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 série/ 2 parallèle, 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 généralement sous deux
  variétés : l'une emploie des adresses de port standards et utilise 4
  IRQs, et l'autre, compatible avec AST FourPort, utilise un bloc
  d'adresses sélectionnable et seulement une IRQ. (Les adresses et les
  IRQ sont sélectionnés à l'aide de setserial). Si vous en achetez une,
  vérifiez les normes auxquelles elle se conforme, en sachant qu'il n'y
  a pas de relation avec le prix.


  1111..22..  LLeess ccaarrtteess iinntteelllliiggeenntteess

  1111..22..11..  SSuuppppoorrttééeess


  ·  Computone Intelliport II (4/8/16 ports)
     <ftp://ftp.computone.com/pub/bbs/beta/ip2linux-1.0.2.tar.gz>

  ·  Cyclades Cyclom-Y (basée sur RISC, 8-32 ports) (IISSAA//PPCCII)
     <http://www.cyclades.com/>

  ·  Cyclades-Z (high-end, 16-64 ports) (PPCCII)
     <http://www.cyclades.com/>

  ·  DigiBoard PC/Xe (IISSAA), PC/Xi (EEIISSAA) et PC/Xeve
     <ftp://ftp.digibd.com/drivers/linux/>

  ·  Cartes séries 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 (IISSAA) / EasyConnection 8/32 (IISSAA//MMCCAA) /
     EasyConnection 8/64 (PPCCII)
     Pour les réglages des interrupteurs DIP et les fichiers de
     configuration consultez le site  <http://www.stallion.com>

  ·  Stallion EasyConnection 8/64 (IISSAA//EEIISSAA / ONboard (IISSAA//EEIISSAA//MMCCAA) /
     Brumby / Stallion (IISSAA)
     Le dernier pilote peut être trouvé sur
     <ftp://ftp.stallion.com/drivers/ata5/Linux/v544.tar.gz>


  1111..22..22..  PPiillootteess aallpphhaass eett bbeettaass


  ·  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




  1122..  EExxtteennssiioonnss rréésseeaauuxx

  Les cartes réseaux (Ethernet) sont très diverses quant à leurs
  performances. En général, les plus récentes sont les meilleures.
  Quelques très 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 très 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 détaillée des différentes cartes.


  1122..11..  SSuuppppoorrttééeess

  1122..11..11..  CCaarrtteess rréésseeaauuxx ((EEtthheerrnneett))

  Pour les cartes réseaux possédant 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 (IISSAA) / 3c579 (EEIISSAA)

  ·  3Com Etherlink III Vortex Ethercards (3c590, 3c592, 3c595, 3c597)
     (PCI), 3Com Etherlink XL Boomerang Ethercards (3c900, 3c905) (PPCCII)
     et Cyclone Ethercards (3c905B, 3c980) (pilotes 3c59x) et 3Com Fast
     Etherlink Ethercard (3c515) (IISSAA) (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 série 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 (EEIISSAA)

  ·  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 (PPCCII) / 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 (séries 27245 et 27xxx)

  ·  HP PCLAN PLUS (27247B and 27252A)

  ·  HP 10/100VG PCLAN (J2577, J2573, 27248B, J2585) (IISSAA//EEIISSAA//PPCCII)
     Plus d'informations sur le site
     <http://cesdis1.gsfc.nasa.gov:80/linux/drivers/100vg.html>

  ·  ICL EtherTeam 16i / 32 (EEIISSAA)

  ·  Intel EtherExpress

  ·  Intel EtherExpress Pro

  ·  KTI ET16/P-D2, ET16/P-DC ISA (marche sans cavaliers et avec les
     options de configuration matérielle)

  ·  Macromate MN-220P (PnP ou mode NE2000)

  ·  NCR WaveLan

  ·  NE2000/NE1000 (méfiez-vous des imitations)

  ·  Netgear FA-310TX (puce Tulip)

  ·  New Media Ethernet

  ·  PureData PDUC8028, PDI8023

  ·  SEEQ 8005

  ·  SMC Ultra / EtherEZ (IISSAA)

  ·  série 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 intégré Zenith Z-Note / IBM ThinkPad 300

  ·  Znyx 312 etherarray (pilote Tulip)

  1122..11..22..  RRNNIISS ((IISSDDNN))


  ·  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 (IISSAA) (HiSax)

  ·  Creatix PnP S0 (HiSax)

  ·  Dr. Neuhaus Niccy PnP/PCI (HiSax)

  ·  Dynalink IS64PH (HiSax)

  ·  Eicon.Diehl Diva 2.0 (IISSAA//PPCCII) (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 basées sur la HFC-2BS0 (HiSax)

  ·  IBM Active 2000 (IISSAA) (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
     réseaux (Ethernet) usuels n'ont pas besoin de pilotes spéciaux pour
     fonctionner.




  1122..11..33..  RReellaaiiss ddee ttrraammeess


  ·  Adaptateurs synchrones Emerging Technologies Inc (
     <http://www.etinc.com>)

  ·  ET/5025 (1 port, 8-bit IISSAA)

  ·  ET/5025-16 (2 ports, 16-bit IISSAA)

  ·  ET/5025-25 (2 ports, 16-bit IISSAA)

  ·  ET5025pq (4 ports, PPCCII)


  1122..11..44..  SSaannss ffiill


  ·  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>


  1122..11..55..  XX2255


  ·  Adaptateurs synchrones Emerging Technologies Inc (
     <http://www.etinc.com>)

  ·  ET/5025 (1 port, 8-bit IISSAA)

  ·  ET/5025-16 (2 ports, 16-bit IISSAA)

  ·  ET/5025-25 (2 ports, 16-bit IISSAA)

  ·  ET/5025pq (4 ports, PPCCII)


  1122..11..66..  AAddaappttaatteeuurrss ddee ppoocchhee eett ddee ppoorrttaabblleess


  ·  Pour plus d'informations sur Linux et l'utilisation du port
     parallèle, voyez la page d'accueil  <http://www.torque.net/linux-
     pp.html> ou <http://www.torque.net/parport/>. Voyez en Annexe C une
     liste complète des dispositifs supportés sur le port parallèle
     (sauf les imprimantes).


  1122..11..77..  SSaannss ccoonnnneecctteeuurrss ((sslloott))


  ·  SLIP/CSLIP/PPP (port série)

  ·  EQL (équilibrage de charge ligne série)

  ·  PLIP (port parallèle) - avec un « câble null-modem » ou un câble
     bidirectionnel


  1122..11..88..  AARRCCnneett


  ·  fonctionne avec toutes les cartes ARCnet

  1122..11..99..  TTookkeennRRiinngg

  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)

  1122..11..1100..  FFDDDDII


  ·  DEC DEFEA (EEIISSAA) / DEFPA (PPCCII) (noyau 2.0.24 et au-delà)


  1122..11..1111..  RRaaddiioo--aammaatteeuurr ((AAXX..2255))


  ·  Gracilis PackeTwin

  ·  Ottawa PI/PI2

  ·  La plupart des cartes HDLC à base de 8530


  1122..11..1122..  CCaarrtteess PPCCMMCCIIAA


  ·  Voir l'annexe B pour une liste complète ou bien les pages du site
     de David Hinds
     <http://hyper.standford.edu/HyperNews/get/pcmcia/home.html>


  1122..22..  PPiillootteess aallpphhaass eett bbeettaass




  1122..22..11..  CCaarrtteess rréésseeaauuxx ((EEtthheerrnneett))


  ·  Racal-Interlan NI5210 (circuit Ethernet i82586). Support amélioré à
     partir des noyaux 2.2.

  ·  Racal-Interlan NI6510 (circuit Lance am7990). Le démarrage avec le
     noyau 1.3.66 avec plus de 16 Mo de RAM est supporté.

  ·  Carte Racal-Interlan PCI (circuit réseau AMD PC 93c970) ??


  1122..22..22..  RRNNIISS ((IISSDDNN))


  ·  SpellCaster's Datacomute/BRI, Telecomute/BRI (IISSAA) (sc)


  1122..22..33..  AATTMM


  ·  adaptateur 155 Mbps Efficient Networks ENI155P-MF (PPCCII)
     <http://lrcwww.epfl.ch/linux-atm/>


  1122..22..44..  RReellaaiiss ddee ttrraammee


  ·  Carte relais de trames Sangoma S502 56K
     <ftp://ftp.sovereign.org/pub/wan/fr/>


  1122..22..55..  SSaannss ffiill


  ·  Proxim RangeLan2 7100 (ISA) / 630x (OEM mmiinnii--IISSAA)
     <http://www.komacke.com/distribution.html>


  1122..33..  NNoonn ssuuppppoorrttééeess


  ·  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)


  1133..  CCaarrtteess ssoonn

  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>.

  1133..11..  SSuuppppoorrttééeess


  ·  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 (PPCCII)

  ·  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 nécessaire pour ces puces est intégré 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 activées 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 basée sur AD1816 (PnP)

  ·  Carte son basée sur Generic CMI8330 (PnP)

  ·  Carte son ou carte mère basée 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 mère basée sur Generic Crystal CS4236 (non PnP)

  ·  Generic Crystal CS4236A (type-1 et type-2), CS4236B

  ·  Carte son ou carte mère basée sur Generic Crystal CS4237 (non PnP)

  ·  Generic Crystal CS4237B (type-1 et type-2)

  ·  Carte son ou carte mère basée sur Generic Crystal CS4238 (non PnP)

  ·  Carte son ou carte mère basée sur Generic ESS ES688, ES1688,
     ES1788, ES1868, ES1869, ES1887, ES1888

  ·  Carte son basée sur Generic Jazz16

  ·  Generic MAD16 (OPTi 82C928), MAD16 Pro, MAD16 Pro (duplex) (OPTi
     82C929)

  ·  Generic Mozart (circuit OAK OTI-601)

  ·  Carte son basée 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 basée sur Generic Soundscape

  ·  Generic Windows Sound System compatible

  ·  Carte son basée sur Generic Yamaha OPL3-SA1 (YMF701)

  ·  Carte son basée sur Generic Yamaha OPL3-SA2 (type-1, type-3,
     type-4)

  ·  Carte son basée sur Generic Yamaha OPL3-SA3

  ·  Carte son basée sur Generic Yamaha OPL3-SA2 (type-1, type-3,
     type-4)

  ·  Carte son basée 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 stéréo 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 (PPCCII)

  ·  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 RECOMMANDÉE)

  ·  Zenith Z-Player


  ·  Le support d'AWE32/64 a démarré dans la série des noyaux 2.1.x
     (voir le mini-HOWTO Soundblaster AWE de Marcus Brinkmann pour les
     détails 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)

  ·  Synthétiseurs 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 « hôte »
  soit supportée par OSS. Notez que seule la carte « hôte » doit être
  configurée à l'aide de soundconf. La carte fille deviendra
  automatiquement accessible via le port MIDI de la carte « hôte ».

  1133..22..  PPiillootteess aallpphhaass eett bbeettaass



  ·  Dispositif audio loopback 4Front Tech. Waveloop

  ·  Acer FX-3D (basée sur AD1816)

  ·  Carte AVM Apex Pro (basée 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 récents de ces séries). On peut télécharger ces pilotes
     dans le répertoire des logiciels sur le site
     <http://www.creativelabs.com>

  ·  Highscreen Sound-Boostar 32 Wave 3D (basée sur AD1816)

  ·  Highscreen Sound-Boostar 16 (basée sur AD1816)

  ·  HP Kayak (basée sur AD1816)

  ·  IBM MWave

  ·  Newcom SC-16 3D (basée sur AD1816)

  ·  Aztech AZT1008, AZT2320, AZT3000

  ·  haut-parleur du PC / DAC sur port parallèle
     <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 basées sur le circuit AD1816, il est
  nécessaire d'utiliser isapnptools pour la configuration.

  1133..33..  NNoonn ssuuppppoorrttééeess


  ·  A-Trend Harmony 3DS724 (PPCCII)

  ·  Actech PCI 388-A3D

  ·  Adaptec AME-1570

  ·  Aureal Vortex (PPCCII)

  ·  Cardinal DSP 16

  ·  Pilotes de bas niveau Contributed

  ·  Crystal CS4614 (PPCCII)


  ·  Cyrix MediaGX builtin audio

  ·  Diamond Monster Sound MX300

  ·  Diamond Sonic Impact

  ·  Dream 94PnP Home Studio

  ·  EON Bach SP901 (A3D)

  ·  ESS (PPCCII)

  ·  ESS Maestro-1 (PPCCII), Maestro-2 (PPCCII)

  ·  ESS Solo-1 (PPCCII)

  ·  Echo Personal Sound System

  ·  Carte son basée 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 (PPCCII)

  Le circuit ASP des SoundBlaster 16 n'est pas supporté.  Les
  particularités de l'AWE32 (MIDI, effets spéciaux) ne sont pas
  supportées.

  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 même 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 défaut qui induit
  des notes continues quand on les utilise avec une carte Waveblaster ou
  une autre interface MIDI.  Il n'existe pas de remède connu.


  1144..  DDiissqquueess dduurrss

  Tous les disques durs conviennent si leur contrôleur est supporté.

  Selon le SCSI-HOWTO, tous les dispositifs SCSI à accès direct avec une
  taille de bloc de 256, 512 ou 1024 octets conviennent. Des tailles de
  bloc différentes ne conviennent pas. (Notez que ceci peut souvent être
  résolu en changeant les tailles de bloc et/ou de secteur avec la
  commande MODE SELECT SCSI).

  Les lecteurs EIDE fonctionnent sans problème avec les nouveaux noyaux.
  La partition d'amorce doit résider dans les 1024 premiers cylindres,
  en raison des limitations du BIOS PC.

  Certains Conner CFP1060S ont des problèmes avec Linux et ext2fs.  Les
  symptômes sont des erreurs d'inode durant e2fsck avec endommagement du
  système de fichiers.  Conner a publié la solution de ce problème,
  contactez Conner au 1800-4CONNER (US) ou au +44-1294-315333 (Europe).
  Ayez à portée de main la version du microcode (mentionnée sur
  l'étiquette, 9WA1.6x) lorsque vous les contactez.

  On rapporte que beaucoup de disques IDE Maxtor et Western Digital ne
  coexistent pas très bien avec des disques d'autres fabricants sur la
  même nappe IDE.  Habituellement l'un des disques ne marche pas. La
  solution est de les mettre sur des nappes IDE différentes.

  Certains disques Micropolis posent des problèmes avec des cartes
  Adaptec et BusLogic, contactez les fabricants pour avoir des circuits
  mis à jour si vous suspectez des problèmes.


  ·  Pilote pour unité multiple (RAID-0, RAID-1)
     <ftp://sweet-smoke.ufr-info-p7.ibp.fr/public/Linux/>


  1144..11..  NNoonn ssuuppppoorrttééss

  Les disques durs suivants sont mentionnés comme non supportés 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 rapportées dans Mode Sense Page 3. Suivant Mode Sense Page
     3 tous les disques NEC D38x7 donnent leur taille de secteur égale à
     zéro. Les disques NEC sont les premiers types de disques que j'ai
     jamais rencontrés qui déclarent 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 problème. » On mentionne des problèmes avec les
     D3825 et D3827 (les deux version 0407). La version 0410 de ces deux
     disques durs devrait résoudre ce problème.


  1155..  LLeecctteeuurrss ddee bbaannddeess

  1155..11..  SSuuppppoorrttééss


  ·  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 (réglée à
     32k dans les sources distribuées) sont admis. Théoriquement tous
     les lecteurs fonctionnent (Envoyez un courrier si vous avez
     connaissance de lecteurs incompatibles).

  ·  Seagate Sidewinder 50 AIT (sur contrôleur RAID ICP 6527)

  ·  QIC-02

  ·  Iomaga Ditto interne (ftape 3.04c et plus récents)





  1155..22..  PPiillootteess aallpphhaass eett bbeettaass


  ·  Lecteurs QIC-117, QIC-40/80, QIC-3010/3020 (QIC-WIDE).  La plupart
     des lecteurs utilisant le contrôleur de disquette devraient
     marcher.  Plusieurs contrôleurs spécialisés (Colorado FC-10/FC-20,
     Mountain Mach-2, Iomega Tape Controller II) sont aussi supportés.
     <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 supportés sont:

  ·  Seagate TapeStor 800

  ·  Lecteur de bandes Conner CTMA 4000 IDE ATAPI Streaming


  1155..33..  NNoonn ssuuppppoorrttééss


  ·  Cartes contrôleurs Emerald et Tecmar QIC-02 - Chris Ulrich
     <insom@math0ucr.edu>

  ·  Lecteurs se connectant sur le port parallèle  (ex : Colorado
     Trakker)

  ·  Quelques contrôleurs 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


  1166..  LLeecctteeuurrss ddee ccddrroommss

  Pour plus d'informations sur les pilotes cdroms voyez le CDROM-HOWTO
  sur le site  <http://metalab.unc.edu/LDP/HOWTO>.


  1166..11..  SSuuppppoorrttééss


  Pilotes cdrom usuels

  ·  Lecteurs de cdroms SCSI
     (D'après 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
     supportés, parmi lesquels :

  ·  Mitsumi FX400

  ·  Nec-260

  ·  Sony 55E

  Pilotes cdroms propriétaires

  ·  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 parallèle 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)


  1166..22..  AAuuttrreess


  ·  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 parallèle
     <http://www.torque.net/linux-pp.html>



  1166..33..  RReemmaarrqquueess


  Tous les lecteurs de cdroms travaillent de manière équivalente pour
  lire des données. Par contre, il peut y avoir différents problèmes 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 problèmes avec
  les nouveaux contrôleurs 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 série 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 supportés.


  1177..  GGrraavveeuurrss ddee CCDD


  À l'heure actuelle, beaucoup de graveurs de cds sont supportés sous
  linux.  Pour en obtenir une liste à jour, vérifiez 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


  1188..  LLeecctteeuurrss eexxttrraaccttiibblleess

  Tous les lecteurs SCSI devraient marcher si leur contrôleur 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 régler un commutateur lors de la
     configuration du noyau pour que les deux systèmes fonctionnent en
     même temps.

  ·  Lecteurs Zip sur port parallèle
     <ftp://gear.torque.net/pub/>

  ·  Avatar Shark-250 port parallèle
     <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 systèmes de verrouillage si votre lecteur le supporte.
     On peut utiliser aussi mtools si les disques sont au format MSDOS.

  Les lecteurs CD-R requièrent un logiciel adapté pour fonctionner. Voir
  le Mini-HOWTO adéquat.


  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 nécessaire pour

  ·  Lecteur de disques magnéto-optique Fujitsu M2513.

     Les lecteurs internes Zip IDE/ATAPI, les disques optiques et les PD
     sont supportés à partir du pre-patch-2.0.31-3.

  ·  Disque optique LS-120

  ·  PD-CD


  1199..  SSoouurriiss

  1199..11..  SSuuppppoorrttééeess


  ·  Souris série Microsoft

  ·  Souris série Mouse Systems

  ·  Souris série Logitech Mouseman

  ·  Souris série Logitech

  ·  ATI XL Inport busmouse

  ·  C&T 82C710 (QuickPort) (Toshiba, TI Travelmate)

  ·  Microsoft busmouse

  ·  Logitech busmouse

  ·  Souris PS/2 (périphérique auxiliaire)


  1199..22..  PPiillootteess aallpphhaass eett bbeettaass


  ·  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



  1199..33..  RReemmaarrqquueess

  Les systèmes 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 détails).


  2200..  MMooddeemmss

  Tous les modems internes ou externes connectés au port série. Hélas,
  quelques fabricants ont élaborés des modems ne fonctionnant qu'avec
  Windows 95. Voir l'annexe E pour la liste des matériels 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 contrôle à 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 général, il semble avéré 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 problèmes
  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.

  ·  séries ZyXEL U-1496 - ZyXEL 1.4, programme de contrôle
     modem/fax/parole
     <http://www.pe1chl.demon.nl/ZyXEL/ZyXEL-1.6.tar.gz>

  ·  Série ZyXEL Elite 2864 - programme de contrôle fax/modem/voix
     <http://www.pe1chl.demon.nl/ZyXEL-1.6.tar.gz>

  ·  ZyXEL Omni TA 128 -programme de contrôle modem/fax/voix
     <http://www.pe1chl.demon.nl/ZyXEL-1.6.tar.gz>

  Les cartes multimodems sont également supportées 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)


  2211..  IImmpprriimmaanntteess eett ttaabblleess ttrraaççaannttee

  Toutes les imprimantes et toutes les tables traçante connectées au
  port parallèle ou au port série devraient fonctionner. Malheureusement
  certains fabricants fournissent des imprimantes ne fonctionnant
  qu'avec Windows 95.  Voir l'annexe E pour les matériels incompatibles
  avec Linux.

  ·  Séries HP LaserJet 4 - free-lj4, programme de contrôle des modes
     d'impression
     <ftp://metalab.unc.edu/pub/Linux/system/printing/free-
     lj4-1.1p1.tar.gz>

  ·  Interface port parallèle 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'.


  2211..11..  GGhhoossttssccrriipptt

  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/>


  2211..11..11..  IImmpprriimmaanntteess ssuuppppoorrttééeess ppaarr GGhhoossttssccrriipptt 55..11


  ·  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, séries 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 traçante à jet d'encre

  ·  Xerox XES printers (2700, 3700, 4045, etc.)


  2211..11..22..  PPiillootteess aallpphhaass eett BBeettaass


  ·  Epson Stylus Color 440


  2222..  SSccaannnneerrss

  Pour le support des scanners, il existe le paquetage SANE (Scanner
  Access Now Easy : L'accès au scanner est maintenant facile). Des
  informations peuvent être trouvées sur le site
  <http://www.mostang.com/sane/>. On peut le télécharger à 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.


  2222..11..  SSuuppppoorrttééss


  ·  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>

  ·  Séries 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 modèles 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 supportés, 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)

     NNOOTTEE :: 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.


  2222..22..  PPiillootteess aallpphhaass eett bbeettaass


  ·  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)


  2222..33..  NNoonn ssuuppppoorrttééss


  ·  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 parallèle)


  2233..  AAuuttrreess mmaattéérriieellss

  2233..11..  RRaaddiioo--AAmmaatteeuurr

  Les cartes suivantes sont supportées:

  ·  TNC KISS

  ·  Carte Ottawa PI

  ·  Carte Gracilis PacketTwin

  ·  Autres cartes basées sur Z8530 SCC

  ·  Modems Baycom sur ports parallèles et séries

  ·  Cartes Soundblaster

  ·  Cartes son basées sur le circuit Crystal


  2233..22..  MMoonniitteeuurrss VVEESSAA aavveecc PPrroottooccoollee dd''ééccoonnoommiiee dd''éénneerrggiiee ((DDPPMMSS))

  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.

  2233..33..  ÉÉccrraannss ttaaccttiilleess

  Le serveur X Metro-X supporte les contrôleurs d'écrans tactiles
  suivants :

  ·  Écran tactile série Carrol Touch
     <http://www.carrolltouch.com>

  ·  EloGraphics

  ·  Lucas Deeco

  ·  MicroTouch


  2233..44..  TTeerrmmiinnaauuxx ssuurr ppoorrtt sséérriiee

  Les vieux terminaux peuvent facilement être utilisés avec Linux en les
  connectant à l'un des ports série de votre système. Au minimum les
  terminaux suivants sont supportés:

  ·  VT52

  ·  VT100

  ·  VT220

  ·  VT320

  ·  VT420


  2233..55..  LLeess mmaanncchheess àà bbaallaaii ((jjooyyssttiicckk))

  Le support des manches à balai se trouve dans les dernières
  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 supportés sont :

  ·  Les manches à balai Amiga sur Amiga

  ·  Les compatibles CH Flightstick Pro avec deux chapeaux et deux
     boutons

  ·  Les interfaces manche à balai port parallèle 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 multisystèmes (Atari, Amiga, Commodore, Amstrad)

  ·  Manches à balai multisystèmes 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 parallèle 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 parallèle TurboGraFX (
     <http://www2.burg-halle.de/~schwenke/parport.html>)


  2233..66..  CCaarrtteess dd''aaccqquuiissiittiioonn vviiddééoo // CCaappttuurree dd''iimmaaggeess // TTuunneerr TTVV

  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 entrée
  normale Composite/S-VHS sont supportées. Support Télétexte et
  Intercast (uniquement PAL) avec décodage 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-conférence. La capture video possède un circuit
     Bt849.  Livré avec une caméra 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 ajoutées sont supportées.
     <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

  ·  Séries 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 (basée sur le ZR36120)
     <ftp://metalab.unc.edu/pub/Linux/kernel/misc-
     cards/zr36120-971127.tgz>

  ·  Miro PCTV (basée 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 vidéo 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. Hélas,
     Nomadic Technologies a retiré la page qui concernait le Sensus 700.

  ·  Smart Video Recoder III (basée sur la Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

  ·  Tuner télévision STB TV PCI (à base de Bt848)
     <http://www.thp.Uni-Koeln.DE/~rjkm/linux/bttv.html>

  ·  Tekram C210 (basée 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>


  2233..77..  CCaamméérraa ddiiggiittaallee

  Actuellement il existe cinq logiciels utilisables en association avec
  des caméras digitales.

  ·  Camediaplay ( <http://www.itojun.org/itojun.html>)
     Vous pouvez le télécharger sur le site
     <ftp://ftp.itojun.org/pub/digicam/C-400L/unix/>

  ·  Photopc ( <http://www.average.org/digicam/>)
     Vous pouvez le télécharger sur le site
     <ftp://ftp.average.org/pub/photopc/>

  ·  Qvplay ( <http://www.asahi-net.or.jp/~XG2K-HYS/index-e.html>)
     Vous pouvez le télécharger 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 caméra
     digitale de pouvoir accéder et de télécharger des images à partir
     q'une grande variété de caméras digitales usuelles (adresse :
     url="http://www.jcam.com">)
     On peut la télécharger sur le site
     <http://www.jcam.com/jcam/download.shtml>

  ·  gPhoto ( <http://www.gphoto.com>)
     On peut le télécharger 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>


  2233..77..11..  SSuuppppoorrttééss


  ·  Ensemble de caméras 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 (même matériel, 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
     supportée 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>


  2233..77..22..  NNoonn ssuuppppoorrttééss


  ·  Casio QV-120, QV-5000SX, QV-7000SX

  ·  Kodak DC40, DC50, DC120



  2233..88..  OOnndduulleeuurrss

  D'autres onduleurs sont supportés, 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 téléchargement et
     manuels. Des informations sur la Toile peuvent être trouvées sur le
     site  <http://www.fentonups.com/index2.htm>

  ·  Fenton Tele-UPS
     <ftp://megatec.com.tw/Rups2/UNIX/v3.0.1> pour téléchargement 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 téléchargement et
     manuels. Des informations sur le Web se trouvent sur
     <http://www.fentonups.com/index2.htm>

  ·  Onduleurs avec contrôle 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 démon pour arrêter et mettre en route des ordinateurs connectés
     à un onduleur. Il détecte le réseau et permet les modes serveur et
     client.
     <ftp://metalab.unc.edu/pub/Linux/system/ups/powerd-2.0.tar.gz>


  2233..99..  CCaarrtteess mmuullttiiffoonnccttiioonnss



  ·  Carte interface Pro Audio Spectrum 16 SCSI/Son



  2233..1100..  AAccqquuiissiittiioonn ddee ddoonnnnééeess

  Le site Linux Lab Project recueille des pilotes pour les systèmes
  d'acquisition de données et gère également des listes de courriers en
  rapport avec ce sujet.  Je n'ai aucune expérience dans ce domaine,
  aussi, allez voir le site pour plus de détails.


  ·  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>


  2233..1111..  IInntteerrffaacceess hhoorrllooggee cchhiieenn ddee ggaarrddee ((WWaattcchhddoogg ttiimmeerrss iinntteerrffaacceess))


  ·  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 récents. 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 périphériques tournant
     actuellement avec les noyaux 2.0.29, 2.0.33 et 2.0.36.


  2233..1122..  DDiivveerrss


  ·  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 Vidéotexte
     <ftp://metalab.unc.edu/pub/Linux/apps/video/videoteXt-0.6.tar.gz>


  2244..  SSoouurrcceess dd''iinnffoorrmmaattiioonnss


  ·  Archive FAQ matériel 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 systèmes
     <http://www.dfw.net/~sdw/>


  2255..  RReemmeerrcciieemmeennttss

  Merci à tous les auteurs et à ceux qui ont contribué aux autres HOWTO,
  beaucoup de choses leur ayant été empruntées 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 vérifications.  Enfin merci à Don
  Quinlan pour la conversion en SGML.


  2266..  AAnnnneexxee AA.. CCaarrtteess SS33  ssuuppppoorrttééeess ppaarr XXFFrreeee8866 33..33..xx..
















  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        |         |   |
  NNBB :: avec les composants ViRGE/VX,GX,GX2 vous devez utiliser XFree86
  3.3.1 ou une version plus récente. Utilisez le serveur XF86_SVGA.


  2277..  AAnnnneexxee BB.. CCaarrtteess PPCCMMCCIIAA ssuuppppoorrttééeess


  Ces cartes sont supportées 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 listées à la fin de chaque section. À l'heure
  actuelle, tous les pilotes de cartes CardBus doivent être considérés
  comme expérimentaux.  Attention, certaines cartes sont 16 bits et les
  numéros de version CardBus se ressemblent beaucoup. Si le numéro de
  version n'est pas mentionné explicitement comme supporté dans ce
  document, alors ne vous attendez pas à ce qu'elle fonctionne.


  2277..11..  CCaarrtteess rréésseeaauuxx ((EEtthheerrnneett))


  ·  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)


  2277..22..  AAddaappttaatteeuurrss FFaasstt EEtthheerrnneett ((1100//110000bbaasseeTT))

  Les pilotes epic_cb et tulip_cb sont expérimentaux et nécessitent un
  noyau 2.2.x ou plus récent.
  ·  3Com 3c574TX, 3CCFE574BT (3c574_cs)

  ·  3Com 3c575TX, 3CCFE575BT, 3CXFE575BT CardBus (3c575_cb, problèmes
     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 !!)


  2277..33..  AAddaappttaatteeuurrss TTookkeenn RRiinngg

  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)


  2277..44..  AAddaappttaatteeuurrss rréésseeaauuxx ssaannss ffiillss


  ·  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)


  2277..55..  RRNNIISS ((IISSDDNN))


  ·  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)



  2277..66..  MMooddeemmss eett ccaarrtteess sséérriieess

  Théoriquement toutes les cartes modems, les cartes ayant un seul port
  série, et les modems cellulaires numériques devraient fonctionner. De
  même, les modems RNIS qui émulent un UART standard sont supportés.


  ·  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)


  2277..77..  CCaarrtteess mméémmooiirree

  Toutes les cartes SRAM devraient fonctionner. Les cartes flash non
  supportées sont lisibles mais non inscriptibles.


  ·  Epson 2MB SRAM (memory_cs)

  ·  IBM 8MB Flash

  ·  Intel Séries 2, Séries 2+ et Séries 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)


  2277..88..  AAddaappttaatteeuurrss SSCCSSII

  Soyez attentifs. Beaucoup de vendeurs, et en particulier les vendeurs
  de cdroms, semblent changer de circuits de contrôle quand il leur
  plaît. En général, ils utilisent un code produit différent, mais pas
  toujours : les vieilles cartes New Media Bus Toaster (qui sont
  supportées) ne sont pas facilement distinguables des actuelles cartes
  Bus Toaster (non supportées).


  ·  Adaptec APA-1450A, APA-1460, APA-1460A/B/C/D SlimSCSI (aha152x_cs)

  ·  Adaptec SlimSCSI 1480 Cardbus (apa1480_cd, expérimental, nécessite
     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)


  2277..99..  AAddaappttaatteeuurrss AATTAA//IIDDEE ccddrroomm

  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)


  2277..1100..  CCaarrtteess mmuullttii--ffoonnccttiioonnss

  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, expérimental, nécessite 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, expérimental,
     nécessite le noyau 2.2.x ou plus)


  2277..1111..  LLeecctteeuurrss ddee ccaarrtteess AATTAA//IIDDEE

  Ces lecteurs de cartes sont supportés à partir du noyau 1.3.72. Les
  cartes Flash-ATA et les cartes rotating-media sont supportées. Les
  très vieux disques Western Digital 40MB ne sont pas supportés car ils
  ne sont pas conformes aux spécifications PCMCIA ATA.


  2277..1122..  CCaarrtteess iinntteerrffaaccee IIDDEE//AATTAA


  ·  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)

  2277..1133..  CCaarrtteess ppoorrtt ppaarraallllèèllee

  Voir l'annexe concernant les systèmes port parallèle supportés


  2277..1144..  CCaarrtteess ddiivveerrsseess


  ·  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 série/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)


  2277..1155..  EEnn ccoouurrss ......

  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)


  2277..1166..  NNoonn ssuuppppoorrttééss


  ·  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



  2288..  AAnnnneexxee CC.. DDiissppoossiittiiffss ssuuppppoorrttééss ssuurr llee ppoorrtt ppaarraallllèèllee


  De plus en plus, le port parallèle est utilisé pour y connecter
  d'autres appareils que les imprimantes. Pour supporter ce port
  parallèle, des pilotes de périphériques sont mis au point afin que ces
  appareils puissent fonctionner.  Cette annexe présente les appareils
  pour lesquels un support parallèle a été écrit.

  Soyons clair : les imprimantes ne font pas partie de cette annexe car
  elles ne sont pas supportées par des projets de support sur port
  parallèle.

  Allez également vérifier les pages suivantes pour avoir plus
  d'informations sur le support du port parallèle sous Linux
  <http://www.torque.net/parport>. Vous y trouverez :

  ·  Des dispositifs IDE pour port parallèle (paride,
     <http://www.torque.net/parport/paride.html>)

  ·  Un support pour dispositifs SCSI sur port parallèle (parscsi,
     <http://www.torque.net/parport/parscsi.html>)


  2288..11..  CCaarrttee rréésseeaauuxx ((EEtthheerrnneett))


  ·  Adaptateur Accton EtherPocket

  ·  Adaptateur ethernet AT-Lan-Tec/RealTek sur port parallèle

  ·  Adaptateur ethernet D-Link DE600/DE620 sur port parallèle


  2288..22..  DDiissqquueess dduurrss



  ·  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


  2288..33..  LLeecctteeuurrss ddee bbaannddeess



  ·  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


  2288..44..  LLeecctteeuurrss ddee ccddrroommss



  ·  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 modèles 163550 et ultérieurs sont
     supportés par le pilote paride. Pour les modèles 160550 et 162550,
     des pilotes séparés existent.

  ·  Disque MicroSolutions PD/CD

  ·  SyQuest SyJet


  2288..55..  DDiissqquueess eexxttrraaccttiibblleess



  ·  Avatar Shark 250

  ·  Imation Superdisk

  ·  Disques Iomega ZIP, ZIP Plus


  2288..66..  AAddaappttaatteeuurrss IIDDEE



  ·  Produits Arista ParaDrive

  ·  Disques DataStor Commuter

  ·  Produits Fidelity International Technologies TransDisk

  ·  Freecom IQ Cable Parallel

  ·  Adaptateur IDE port parallèle Shuttle Technology EPAT/EPEZ

  ·  Adaptateur IDE port parallèle Shuttle Technology EPIA


  2288..77..  AAddaappttaatteeuurrss SSCCSSII



  ·  Câble adaptateur Adaptec APA-348 mini-SCSI plus
     Pilote de périphérique sur le site
     <http://www.torque.net/parpart/parscsi.html>

  ·  Câble adaptateur Adaptec APA-358 mini-SCSI EPP
     Pilote de périphérique disponible sur le site
     <http://www.torque.net/parpart/parscsi.html>

  ·  Adaptateur SCSI port parallèle Shuttle Technology EPSA-2
     Pilote de périphérique disponible sur le site
     <http://www.torque.net/parpart/parscsi.html>

  ·  Adaptateur SCSI port parallèle Shuttle Technology EPST
     Pilote de périphérique disponible sur
     <http://www.torque.net/parpart/parscsi.html>




  2288..88..  CCaamméérraa ddiiggiittaallee



  ·  Connectix QuickCam


  2288..99..  CCaarrtteess ppoorrtt ppaarraallllèèllee PPCCMMCCIIAA

  Le pilote parport_cs nécessite le noyau 2.2.x ou +.


  ·  Quatech SPP-100

  ·  IOtech DBK35, WBK20A


  2299..  AAnnnneexxee DD.. DDiissppoossiittiiffss PPlluugg aanndd PPllaayy

  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 systèmes, qu'ils contiennent ou non un BIOS PnP.


  Les commandes ont été prises dans la spécification 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 connaître quel matériel (non supporté sous
  Linux) on pourrait faire marcher grâce à ces utilitaires. Ce matériel
  sera mentionné dans cette annexe.

  3300..  AAnnnneexxee EE.. MMaattéérriieell iinnccoommppaattiibbllee aavveecc LLiinnuuxx

  Certains fabricants de matériel ont créé des périphériques qui ne sont
  compatibles qu'avec MS-Dos et Windows 95/98. Ceux-ci semblent n'émuler
  que la partie normalement disponible des périphériques à l'aide de
  paquetages logiciels vendus en même temps. Leurs spécifications ne
  sont pas données et il est pratiquement impossible d'écrire des
  pilotes pour ces dispositifs. Ci-dessous une liste de périphériques
  connus comme étant incompatibles avec Linux.

  Autrement dit, il est judicieux d'éviter les matériels où il est
  spécifié des choses comme « nécessite 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
     spécifiées seulement pour Windows) sont supportées sous Linux.
     Voyez <http://www.httptech.com/ppa>. Faites attention: le support
     n'en est qu'au début de son développement.

  ·  Lexmark 1000


  ·  Lexmark 3200. Sous windows cette imprimante possède 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 (modèle MV34AI)

  ·  Modem interne Boca Research 33.6 (modèle MV34) (Joe Harjung a
     réussi en configurant le modem sous Win95 puis en redémarrant sous
     Linux avec le modem toujours en activité. Filippo utilise ce modem
     directement sous Linux sans problèmes et sans redémarrage à partir
     de Windows. J'ai vraiment besoin de plus d'informations sur ces
     modems Boca Research.)
     Le modem Boca Research 33.6 (modèle M336I) est mentionné comme
     fonctionnant sous Linux. La seule chose à faire est de désactiver
     le Plug and Play. Voici les spécifications 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 sélection du port COM

  ·  10 jumpers pour la sélection 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 contrôle vocal et la dictée. Le
     programme remplace une partie de la fonctionnalité du matériel et
     dès 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/série New Media Winsurfer

  ·  Rockwell SoftK56

  ·  Série des modems US Robotics Winmodem

  ·  Modem Zoltrix 33.6 Win HSP Voice/Speaker Phone

  ·  Zoltrix Phantom 56K, modèle FM-HSP56PCI, circuit PCTel (PPCCII

  3311..  GGlloossssaaiirree


     AAGGPP
        Accelerated Graphics Port (Port Graphique Accéléré). Un
        mécanisme d'interconnexion de bus conçu pour améliorer les
        performances des applications graphiques 3D. AGP est un bus
        dédié pour les échanges entre le sous-système graphique et le
        circuit logique.
        <http://www.euro.dell.com/intl/euro/r+d/r+dnews/vectors/vect_2-1/v2-1_agp.htm>

     AATTAAPPII
        AT Attachment Packet Interface (AT Interface de Liaison par
        Paquets). Un nouveau protocole de contrôle des dispositifs de
        mémoire de masse, similaire aux protocoles SCSI. Il est
        construit à partir de l'interface ATA (AT Attachment), le nom
        ANSI officiel pour l'interface IDE développée pour les disques
        durs. ATAPI est habituellement utilisé pour les disques durs,
        les cdroms, les bandes et d'autres dispositifs.

     AATTMM
        Asynchronous Transfer Mode (Mode de Transfert Asynchrone)

     CCDDDDAA
        Compact Disk Digital Audio. Capacité des graveurs de cdroms pour
        lire des pistes audio.

     DDMMAA
        Direct Memory Access (Accès à la Mémoire Direct)

     EEGGAA
        Enhanced Graphics Adapter (Adaptateur Graphique Amélioré)

     EEIIDDEE
        Enhanced IDE (IDE amélioré)

     EEIISSAA
        Extended Industry System Architecture (Architecture Système
        Industriel Étendu)

     FFDDDDII
        Fiber Distributed Data Interface (réseau local à haute vitesse)

     IIDDEE
        Integrated Drive Electronics (Électronique de Pilote Intégrée).
        Chaque pilote a son contrôleur intégré.


     IISSAA
        Industry System Architecture (Architecture de Système
        Industriel)

     IISSDDNN
        Integrated Services Digital Network (Réseau Numérique à
        Intégration de Services : RNIS)

     MMCCAA
        MicroChannel Architecture (Architecture MicroChannel)

     MMFFMM
        Modified Frequency Modulation (Modulation de Fréquence Modifiée)

     MMMMXX
        Multimedia extensions. Ajouté à la nouvelle génération de
        processeurs Intel Pentium. Donne une meilleure qualité audio et
        vidéo.

     PPCCII
        Peripheral Component Interconnect (Interconnexion de Composants
        Périphériques). Bus 32 bits conçu 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>.

     RRAAIIDD
        Redudant Arrays of Inexpensive Disks (Assemblage Redondant de
        Disques Économiques). L'idée de base de RAID est de combiner
        plusieurs petits disques durs économiques en un assemblage de
        façon à obtenir des performances supérieures à celles d'un
        disque de grande capacité et onéreux. Il existe cinq types
        d'architectures, de RAID-1 à RAID-5. Un assemblage de disques
        non-redondant est référencé comme RAID-0. Certains systèmes RAID
        peuvent combiner plusieurs formats.
        <http://www.uni-mainz.de/~neuffer/scsi/what_is_raid.html>

     PPPPAA
        Printing Performance Architecture (Architecture de Performance
        d'Impression). Protocole développé par Hewlett Packard pour la
        série des imprimantes DeskJet. Dans le principe, le protocole
        déplace le traitement des données de bas niveau vers
        l'ordinateur hôte plutôt que vers l'imprimante.  Ceci permet
        d'avoir une imprimante à bas coût, ayant peu de mémoire, peu de
        puissance de calcul et un pilote de périphérique souple
        d'utilisation. Cependant cela se paye au détriment de la
        compatibilité. La décision de HP fut de développer des pilotes
        uniquement pour Windows 95, pour cette imprimante.

     RRLLLL
        Run Length Limited (Longueur de Course Limitée)

     SSCCSSII
        Small Computer Systems Interface (Interface Systèmes Petits
        Ordinateurs). Une interface standard conçue pour tous les
        périphériques d'un ordinateur. Cela rend possible l'utilisation
        d'un seul adaptateur pour tous les périphériques.
        <http://www.uni-mainz.de/~neufer/scsi/what_is_scsi.html>

     SSVVGGAA
        Super Video Graphics Adapter

     UUAARRTT
        Universal Asynchronous Receiver Transmitter
        (transmetteur/récepteur asynchrone universel)


     UUSSBB
        Universal Serial Bus (Bus Série Universel). Pas encore supporté
        sous Linux (NdT: en cours dans les noyaux 2.3.xx)

     VVGGAA
        Video Graphics Adapter (Adaptateur Graphique Vidéo)

     VVLLBB
        VESA Local Bus. Utilisé dans quelques PC 486

     WWOORRMM
        Write Once Read Many (Écrit Une seule fois, Lit Plusieurs fois)






















































  Linux IPCHAINS-HOWTO
  Paul Russell, ipchains@rustcorp.com
  Version française par Arnaud Launay, asl@launay.org
  v1.0.7, 12 mars 1999

  Ce document décrit l'obtention, l'installation et la configuration du
  logiciel amélioré de chaînes pare-feu IP pour Linux, et donne quelques
  idées sur l'utilisation que vous pouvez en faire.
  ______________________________________________________________________

  Table des matières























































  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 règles 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 zèle de WatchGuard
     3.3 Configurations classiques de type pare-feu
        3.3.1 Réseaux privés : caches traditionnels
        3.3.2 Réseaux privés : caches transparents
        3.3.3 Réseaux privés : camouflage
        3.3.4 Réseaux publics
        3.3.5 Services internes limités
     3.4 Pour plus d'informations sur le camouflage

  4. Chaînes de protection IP

     4.1 Comment les paquets traversent les filtres
        4.1.1 Utiliser ipchains
        4.1.2 Opérations sur une règle simple
        4.1.3 Spécifications du filtrage
           4.1.3.1 Spécifier les adresses IP source et destination
           4.1.3.2 Spécifier l'inversion
           4.1.3.3 Spécifier le protocole
              4.1.3.3.1 Spécifier les ports UDP et TCP
              4.1.3.3.2 Spécifier les types et codes ICMP
           4.1.3.4 Spécifier une interface
           4.1.3.5 Spécifier uniquement des paquets TCP SYN
           4.1.3.6 Utiliser les fragments
        4.1.4 Effets de bord du filtrage
           4.1.4.1 Spécifier 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 Opérations sur une chaîne entière
           4.1.4.6 Créer une nouvelle chaîne
           4.1.4.7 Supprimer une chaîne
           4.1.4.8 Vider une chaîne
           4.1.4.9 Afficher une chaîne
           4.1.4.10 Remise à zéro des compteurs
           4.1.4.11 Choisir une police
        4.1.5 Opérations sur le camouflage
        4.1.6 Vérifier un paquet
        4.1.7 Voir ce qui arrive avec des règles multiples précisées 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 règles 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 règles pare-feu
     5.7 Comment mettre en place la protection contre l'IP spoof ?
     5.8 Projets avancés
        5.8.1 SPF : Stateful Packet Filtering
        5.8.2 Modification des données ftp par Michael Hasenstein
     5.9 Extensions futures

  6. Problèmes 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 sérieux

     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 chaîne de transmission
        7.4.2 Définir la chaîne icmp-acc
        7.4.3 Bon (interne) vers ZDM (serveurs)
        7.4.4 Mauvais (extérieur) vers ZDM (serveurs)
        7.4.5 Bon (intérieur) vers Mauvais (extérieur).
        7.4.6 ZDM vers Bon (intérieur)
        7.4.7 ZDM vers Mauvais (extérieur)
        7.4.8 Mauvais (extérieur) vers Bon (intérieur)
        7.4.9 Filtrage de paquets pour la machine Linux elle-même
           7.4.9.1 Interface Mauvais (extérieur)
           7.4.9.2 Interface ZDM
           7.4.9.3 Interface Bon (intérieur)
     7.5 Finalement

  8. Annexe : différences entre ipchains et ipfwadm

     8.1 Guide de référence rapide
     8.2 Exemples de commandes ipfwadm traduites

  9. Annexe : utiliser le script ipfwadm-wrapper

  10. Annexe : remerciements



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ceci est le Linux IPCHAINS-HOWTO ; voyez la section ``Où ?'' pour le
  site principal, qui détient la dernière 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
  intéressants à lire (une fois de plus, la FAQ de alt.fan.bigfoot peut
  l'être aussi).
  Si le filtrage des paquets vous semble dépassé, lisez la section
  ``Pourquoi ?'', la section ``Comment ?'', et lisez les titres de la
  section ``Chaînes de protection IP''.


  Si vous vous adaptez en partant d'ipfwadm, lisez la section
  ``Introduction'', la section ``Comment ?'', et les annexes des
  sections ``Différences entre ipchains et ipfwadm'' et ``Utiliser le
  script `ipfwadm-wrapper'''.


  11..11..  QQuu''eesstt ccee qquuee cc''eesstt ??

  Le Linux ipchains est une réécriture du code de firewalling de l'IPv4
  de Linux (qui avait été principalement emprunté à BSD) et une
  réécriture d'ipfwadm, lui même réécriture d'ipfw de BSD, je crois. Il
  est nécessaire pour administrer le filtrage des paquets IP dans les
  noyaux Linux à partir de la version 2.1.102.


  11..22..  PPoouurrqquuooii ??

  L'ancien code de firewalling de Linux ne pouvait gérer les fragments,
  utilisait des compteurs 32 bits (au moins sur Intel), ne permettait
  pas la spécification de protocoles autres que TCP, UDP ou ICMP, ne
  pouvait faire de grands changements atomiquement, ne permettait pas la
  spécification de règles inverses, avait quelques bizarreries, et
  pouvait être une catastrophe à gérer (le rendant propice aux erreurs
  des utilisateurs).


  11..33..  CCoommmmeenntt ??

  Actuellement le code se trouve dans le noyau principal à partir du
  2.1.102.  Pour la série des noyaux 2.0, vous devrez récupérer une
  correction pour le noyau sur une page web. Si votre noyau 2.0 est plus
  récent que la correction récupérée, 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 réellement besoin de l'une des fonctionnalités
  offertes par ipchains.


  11..44..  OOùù ??

  La page officielle est la Page des chaînes 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 développement 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'.


  22..  BBaasseess dduu ffiillttrraaggee ddee ppaaqquueettss

  22..11..  QQuu''eesstt ccee qquuee cc''eesstt ??

  Tout le trafic circulant dans un réseau est envoyé sous la forme de
  ppaaqquueettss. 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 début de chaque paquet précise où celui-ci va, d'où il vient, le
  type du paquet, et divers autres détails administratifs. Le début de
  chaque paquet est appelé l'eennttêêttee. Le reste du paquet, contenant les
  données à transmettre, est couramment appelé le ccoorrppss.


  Quelques protocoles, comme le TTCCPP, qui est utilisé pour le trafic web,
  mail et les connexions à distance, utilisent le concept de `connexion'
  -- avant que le moindre paquet de données ne soit envoyé, divers
  paquets de configuration (avec des entêtes spéciales) sont échangés en
  disant `je veux me connecter', `OK' et `Merci'. Ensuite les paquets
  normaux sont échangés.


  Un filtre de paquet est un logiciel qui regarde l'_e_n_t_ê_t_e des paquets
  lorsque ceux-ci passent, et décide du destin du paquet entier. Il peut
  décider de le rreeffuusseerr (le supprimer comme s'il n'avait jamais été
  reçu), de l'aacccceepptteerr (le laisser circuler) ou de le rreejjeetteerr (effet
  identique au refus, mais il est précisé à 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 général (regarder les entêtes et décider du destin du paquet)
  est toujours présent.


  22..22..  PPoouurrqquuooii ??

  Contrôle. Sécurité. Vigilance.



     CCoonnttrrôôllee ::
        Lorsque vous utilisez un ordinateur sous Linux pour connecter
        votre réseau interne à un autre réseau (disons, l'Internet) vous
        aurez l'opportunité de permettre certains types de trafics, et
        d'interdire les autres. Par exemple, l'entête d'un paquet
        contient l'adresse de destination du paquet, et vous pouvez
        ainsi éviter que des paquets aillent vers un certain endroit du
        réseau extérieur. Comme autre exemple, j'utilise Netscape pour
        accéder aux archives de Dilbert. Il y a des publicités 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 résoud le problème (il y a cependant de
        meilleurs moyens pour y parvenir).


     SSééccuurriittéé ::
        Lorsque votre machine Linux est le seul rempart entre le chaos
        de l'Internet et votre réseau 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 réseau, mais vous pouvez vous inquiéter du fort
        connu 'Ping of Death' pouvant provenir d'intrus extérieurs.
        Comme autre exemple, vous pouvez interdire aux personnes
        extérieures de se connecter en telnet sur votre machine Linux,
        même si tous vos comptes ont des mots de passe ; peut-être
        désirerez-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 utilisés
        pour créer des connexions.

     VViiggiillaannccee ::
        Parfois, une machine mal configurée du réseau local décidera
        d'envoyer des paquets au monde extérieur. Il est sympathique de
        pouvoir spécifier 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é.


  22..33..  CCoommmmeenntt ??

  22..33..11..  UUnn nnooyyaauu aavveecc llee ffiillttrraaggee ddee ppaaqquueettss

  Vous aurez besoin d'un noyau disposant du nouveau code de chaînes 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 créer un noyau contenant le code de chaînes de
  protection IP.  Tout d'abord, récupérez les sources du noyau que vous
  désirez. Si vous avez un noyau dont le numéro est supérieur ou égal à
  2.1.102, vous n'aurez pas besoin de le corriger (il se trouve déjà
  inclus dans le noyau). Autrement, appliquez le correctif que vous
  trouverez sur la page web listée plus haut, et utilisez la
  configuration détaillée 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 séries 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 invétéré, c'est
  ainsi que vous contrôlerez le filtrage des paquets.


  22..33..22..  iippcchhaaiinnss

  L'outil ipchains insère et efface des règles dans la section de
  filtrage de paquets du noyau. Ce qui signifie que quoi que vous
  configuriez, tout sera perdu lors d'un redémarrage ; voyez la section
  ``Rendre les règles permanentes'' pour savoir comment s'assurer que
  les règles seront restaurées 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 système utilisant
  ipfwadm (ce script est plus lent, ne vérifie pas les arguments, etc.).
  Dans ce cas, vous n'avez pas non plus besoin de ce howto.

  Voyez l'annexe ``Différences entre ipchains et ipfwadm'' et l'annexe
  ``Utiliser le script `ipfwadm-wrapper''' pour des détails
  supplémentaires concernant ipfwadm.


  22..33..33..  RReennddrree lleess rrèègglleess ppeerrmmaanneenntteess

  Votre configuration actuelle de pare-feu est sauvée dans le noyau, et
  sera ainsi perdue lors d'un redémarrage. Je vous recommande d'utiliser
  les scripts `ipchains-save' et `ipchains-restore' pour rendre vos
  règles permanentes. Pour ce faire, configurez vos règles, puis
  utilisez (en tant que super-utilisateur) :



       # ipchains-save > /etc/ipchains.rules
       #




  Créez 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 tôt dans la procédure de
  lancement. Dans mon cas (Debian 2.1), j'ai créé un lien symbolique
  appellé `S39packetfilter' dans le répertoire `/etc/rcS.d' (il sera
  ainsi lancé avant S40network).


  33..  JJee ssuuiiss ttrroouubblléé !! RRoouuttaaggee,, ccaammoouuffllaaggee,, rreeddiirreeccttiioonn ddee ppoorrttss,,
  iippaauuttooffww......

  Ce HOWTO a pour sujet le filtrage de paquets. Ce filtrage permet la
  prise de décision 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 problèmes est que le même outil ("ipchains") est utilisé pour
  contrôler à la fois le camouflage et le cache transparent, alors que
  ce sont des notions séparées du filtrage de paquets (l'implémentation
  actuelle de Linux les brouille tous les trois de façon inhabituelle,
  laissant l'impression qu'ils sont très proches).


  Le camouflage et le cachage sont recouverts par des HOWTOs séparés, et
  les possibilités de redirection automatique et de redirection de ports
  sont contrôlées par des outils séparés, mais puisque de nombreuses
  personnes continuent à me harceler à leur propos, je vais ajouter un
  ensemble de scénarios classiques en indiquant les moments où chacun
  doit être utilisé. Les mérites de la sécurité de chacun de ces
  scénarios ne seront néanmoins pas discutés ici.



  33..11..  LLee gguuiiddee dduu ccaammoouuffllaaggee eenn 33 lliiggnneess ppaarr RRuussttyy

  Ces lignes présument que votre interface eexxtteerrnnee est appellée "ppp0".
  Utilisez ifconfig pour le vérifier, et ajustez selon votre goût.



       # ipchains -P forward DENY
       # ipchains -A forward -i ppp0 -j MASQ
       # echo 1 > /proc/sys/net/ipv4/ip_forward





  33..22..  PPuubblliicciittéé ggrraattuuiittee :: llee zzèèllee ddee WWaattcchhGGuuaarrdd

  Vous pouvez acheter des pare-feu tout faits. Un excellent est le
  FireBox de WatchGuard. C'est excellent parce que je l'apprécie, parce
  qu'il est sécurisé, basé sur Linux, et parce qu'ils financent la
  maintenance d'ipchains ainsi que du nouveau code pare-feu (prévu 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>



  33..33..  CCoonnffiigguurraattiioonnss ccllaassssiiqquueess ddee ttyyppee ppaarree--ffeeuu

  Vous êtes petiteboite.com. Vous avez un réseau 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 réseau local, et votre machine personnelle s'appelle
  "mamachine".


  Cette section illustrera les différents arrangements classiques. Lisez
  attentivement, car ils sont tous subtilement différents.


  33..33..11..  RRéésseeaauuxx pprriivvééss :: ccaacchheess ttrraaddiittiioonnnneellss

  Dans ce scénario, les paquets venant d'un réseau privé ne traversent
  jamais l'Internet, et vice versa. Les adresses IP du réseau privé
  doivent être assignées en utilisant les adresses privées réservées par
  la RFC 1597 (càd 10.*.*.*, 172.16.*.* ou 192.168.*.*).


  La seule méthode pour que les choses soient connectés à l'Internet est
  en se connectant au pare-feu, qui est la seule machine sur les deux
  réseaux qui sont connectés 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'accès web, telnet, RealAudio, les News Usenet et autres
  services). Voyez le Firewall HOWTO.


  Tous les services auxquels vous voulez que l'Internet puisse avoir
  accès doivent être sur le pare-feu (mais voyez ``Services internes
  limités'' plus bas).


  Exemple : autoriser l'accès web d'un réseau privé vers l'Internet.

  1. On a assigné les adresses 192.168.1.* au réseau privé, avec
     mamachine étant 192.168.1.100, et l'interface Ethernet du pare-feu
     étant assignée à 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 réseau privé est configuré pour utiliser le pare-
     feu port 8080 comme cache.

  4. Le DNS n'a pas besoin d'être configuré sur le réseau privé.

  5. Le DNS doit être configuré sur le pare-feu.

  6. Le réseau privé n'a pas besoin de disposer de route par défaut
     (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 données vers la connexion de Netscape.

  4. Netscape affiche la page.

  C'est-à-dire que du point de vue de slashdot.org, la connexion est
  réalisée 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.


  33..33..22..  RRéésseeaauuxx pprriivvééss :: ccaacchheess ttrraannssppaarreennttss

  Dans ce scénario, les paquets venant du réseau privé ne traversent
  jamais l'Internet, et vice versa. Les adresses IP du réseau privé
  doivent être assignées en utilisant les adresses privées réservées par
  la RFC 1597 (càd 10.*.*.*, 172.16.*.* ou 192.168.*.*).


  La seule méthode pour que les choses soient connectées à l'Internet
  est en se connectant au pare-feu, qui est la seule machine sur les
  deux réseaux, qui sont connectés 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 (càd qu'il rend bâtard 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 limités'' plus bas).


  Exemple : autoriser l'accès web du réseau privé vers l'Internet.


  1. On a assigné les adresses 192.168.1.* au réseau privé, avec
     mamachine étant 192.168.1.100, et l'interface Ethernet du pare-feu
     étant assignée à 192.168.1.1.

  2. Un proxy web transparent (je présume qu'il existe des correctifs
     pour squid lui permettant d'opérer de cette façon, 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 réseau privé, est configuré pour se connecter
     directement.

  5. Le DNS doit être configuré sur le réseau privé (càd que vous devez
     faire tourner un serveur DNS de la même manière que le proxy sur le
     pare-feu).

  6. La route par défaut (passerelle) doit être configuré sur le réseau
     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 redirigés
     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
     départ allaient).

  3. Alors que le cache reçoit la page web par sa connexion avec le
     serveur web, il copie les données vers la connexion avec Netscape.

  4. Netscape affiche la page.

  C'est à dire que du point de vue de slashdot.org, la connexion est
  réalisée 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.


  33..33..33..  RRéésseeaauuxx pprriivvééss :: ccaammoouuffllaaggee

  Dans ce scénario, les paquets venant du réseau privé ne traversent
  jamais l'Internet sans traitement spécial, et vice versa. Les adresses
  IP du réseau privé doivent être assignées en utilisant les adresses
  privées réservées par la RFC 1597 (càd 10.*.*.*, 172.16.*.* ou
  192.168.*.*).


  Au lieu d'utiliser un cache, nous utilisons une spécificité spéciale
  du noyau nommée "camouflage" (masquerading). Le camouflage réécrit les
  paquets lorsqu'ils passent par le pare-feu, ce qui fait qu'ils
  semblent toujours venir du pare-feu lui-même. Il réécrit ensuite les
  réponses afin qu'elles semblent venir du destinataire originel.


  Le camouflage dispose de modules séparés afin de gérer les protocoles
  "étranges", comme FTP, RealAudio, Quake, etc. Pour les protocoles
  vraiment difficiles à gérer, la spécificité de "redirection
  automatique" (auto forwarding) peut en gérer 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 supérieurs).


  Tous les services auxquels vous voulez que l'Internet puisse avoir
  accès doivent être sur le pare-feu (mais voyez ``Services internes
  limités'' plus bas).


  Exemple : autoriser l'accès web du réseau privé sur l'Internet.

  1. On a assigné les adresses 192.168.1.* au réseau privé, avec
     mamachine étant 192.168.1.100, et l'interface Ethernet du pare-feu
     étant assignée à 192.168.1.1.

  2. Le pare-feu est configuré pour camoufler tous les paquets venant du
     réseau privé et allant sur le port 80 d'un hôte sur Internet.

  3. Netscape est configuré pour se connecter directement.

  4. Le DNS doit être configuré correctement sur le réseau privé.

  5. Le pare-feu doit être la route par défaut (passerelle) du réseau
     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 réécrits
     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 routés correctement.

  3. Lorsque les paquets venant de slashdot.org (port 80) sur
     firewall.petiteboite.com (port 65000) arrivent, ils sont réécrits
     pour aller sur mamachine, port 1050. La véritable magie du
     camouflage se trouve ici : il se souvient des paquets sortants
     réécrits afin de pouvoir réécrire les paquets entrants qui en sont
     la réponse.

  4. Netscape affiche la page.

  C'est à dire que du point de vue de slashdot.org, la connexion est
  réalisée 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.


  33..33..44..  RRéésseeaauuxx ppuubblliiccss

  Dans ce scénario, votre réseau personnel fait partie de l'Internet :
  les paquets peuvent passer sans avoir à changer de réseau. Les
  adresses IP du réseau interne doivent être assignées en utilisant un
  bloc d'adresses IP, de manière à ce que le reste du réseau sache
  comment vous envoyer des paquets.  Ceci implique une connexion
  permanente.


  Dans ce rôle, le filtrage de paquets est utilisé pour restreindre les
  paquets qui peuvent être redirigés entre votre réseau et le reste de
  l'Internet, càd pour restreindre le reste de l'Internet à accéder
  uniquement au serveur web qui se trouve en interne.


  Exemple : autoriser l'accès web du réseau privé vers l'Internet.

  1. Votre réseau 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 réseau.

  5. Le pare-feu doit être la route par défaut (passerelle) pour le
     réseau 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.


  33..33..55..  SSeerrvviicceess iinntteerrnneess lliimmiittééss

  Il y a quelques trucs que vous pouvez utiliser pour autoriser
  l'Internet à accéder à vos services internes, plutôt 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 hôte et un port interne fixé, et copiant
  les données 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 nécessite un noyau 2.0 corrigé pour ipportfw,
  ou un noyau 2.1 ou supérieur) est d'utiliser la redirection des ports
  du noyau. Il effectue le même travail que "redir" d'une manière
  différente : le noyau réécrit les paquets lorsqu'ils passent, en
  changeant leur adresse de destination et le port pour les faire
  pointer sur un port et un hôte 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 réalisée entre
  l'hôte Internet et votre serveur.


  33..44..  PPoouurr pplluuss dd''iinnffoorrmmaattiioonnss ssuurr llee ccaammoouuffllaaggee

  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'espère pouvoir bientôt le trouver hébergé 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>.


  44..  CChhaaîînneess ddee pprrootteeccttiioonn IIPP

  Cette section décrit tout ce que vous avez réellement besoin de savoir
  pour construire un filtre de paquets adapté à vos besoins.


  44..11..  CCoommmmeenntt lleess ppaaqquueettss ttrraavveerrsseenntt lleess ffiillttrreess

  Le noyau commence avec trois listes de règles : ces listes sont
  appellées cchhaaîînneess ddee pprrootteeccttiioonn ou juste cchhaaîînneess. Ces trois chaînes
  sont appellées iinnppuutt (entrée), oouuttppuutt (sortie) et ffoorrwwaarrdd
  (transmission). Lorsqu'un paquet arrive (disons, par une carte
  Ethernet), le noyau utilise la chaîne input pour décider de son
  destin.  S'il survit à ce passage, alors le noyau décide où envoyer le
  paquet par la suite (ceci est appelé rroouuttaaggee). S'il est destiné à une
  autre machine, il consulte alors la chaîne de transmission. Enfin,
  juste avant que le paquet ne ressorte, le noyau consulte la chaîne de
  sortie.


  Une chaîne est une vérification de rrèègglleess. Chaque règle dit `si
  l'entête de ce paquet ressemble à ceci, alors voilà quoi faire de ce
  paquet'. Si la règle ne vérifie pas le paquet, alors la règle suivante
  dans la chaîne est consultée. Enfin, s'il n'y a plus de règles à
  consulter, alors le noyau regarde la chaîne ppoolliiccee pour décider ce
  qu'il doit faire.  Dans un système orienté sécurité, cette police dit
  généralement 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 --> ~~~~~~~~ -->| Chaîne  |----> _______ -->
      o     a    |chaîne|    e    {Décision}   |transfert|     |Chaîne |ACCEPTER
      m     l    |entrée|    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 :


     SSoommmmee ((cchheecckkssuumm)) ::
        C'est un test vérifiant si le paquet n'a pas été corrompu d'une
        manière ou d'une autre. S'il l'a été, il est refusé.


     VVaalliiddiittéé ((ssaanniittyy)) ::
        Il y a en fait un de ces tests sanitaires avant chaque chaîne de
        protection, mais les chaînes d'entrée sont les plus importantes.
        Quelques paquets malformés peuvent rendre confus le code de
        vérification des règles, et ceux-ci sont refusés ici (un message
        est envoyé au syslog si ceci arrive).


     CChhaaîînnee dd''eennttrrééee ((iinnppuutt cchhaaiinn)) ::
        C'est la première chaîne de protection qui teste le paquet. Si
        le verdict de la chaîne n'est ni DENY ni REJECT, le paquet
        continue son chemin.


     DDeemmaassqquueerraaddee ::
        Si le paquet est une réponse à un paquet précédemment masqué, il
        est démasqué, et envoyé directement à la chaîne de sortie.  Si
        vous n'utilisez pas le masquage IP, vous pouvez mentalement
        supprimer ceci du diagramme.


     DDéécciissiioonn rroouuttaaggee ((RRoouuttiinngg ddeecciissiioonn)) ::
        Le champ de destination est examiné par le code de routage, pour
        décider si le paquet doit aller vers un processus local (voir
        processus local plus bas) ou transmis à une machine distante
        (voyez les chaînes de renvoi plus bas).


     PPrroocceessssuuss llooccaall ((LLooccaall pprroocceessss)) ::
        Un processus tournant sur la machine peut recevoir des paquets
        après l'étape de décision de routage, et peut envoyer des
        paquets (qui passent par l'étape de décision de routage, puis
        traversent la chaîne de sortie).


     IInntteerrffaaccee lloo ::
        Si les paquets venant d'un processus local sont destinés à un
        autre processus local, alors ils passeront par la chaîne de
        sortie en utilisant l'interface lo, puis reviendront par la
        chaîne d'entrée en utilisant la même interface. L'interface lo
        est généralement nommée interface loopback.


     llooccaall ::
        Si le paquet n'a pas été créé par un processus local, alors la
        chaîne de transmission est vérifiée, sinon le paquet se dirige
        vers la chaîne de sortie.


     ffoorrwwaarrdd cchhaaiinn ::
        Cette chaîne est traversée par tout paquet qui tente de passer
        par cette machine vers une autre.


     oouuttppuutt cchhaaiinn ::
        Cette chaîne est traversée par tous les paquets juste avant
        qu'ils ne soient envoyés à l'extérieur.


  44..11..11..  UUttiilliisseerr iippcchhaaiinnss

  Tout d'abord, vérifiez que vous avez la version d'ipchains à laquelle
  se réfère 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 très stables.


  ipchains dispose d'une page de manuel plutôt bien détaillée (man
  ipchains), et si vous avez besoin de plus de détails 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 référence.


  Il y a également une carte de référence rapide par Scott Bronson dans
  le paquetage source, aux formats PostScript (TM) a4 et US letter.


  Il y a plusieurs choses différentes que vous pouvez faire avec
  ipchains. Tout d'abord les opérations servant à gérer les chaînes
  entières. Vous commencez avec trois chaînes intégrées input, output et
  forward que vous ne pouvez effacer.


  1. Créer une nouvelle chaîne (-N) ;

  2. Supprimer une chaîne vide (-X) ;

  3. Changer la police d'une chaîne intégrée (-P) ;

  4. Lister les règles d'une chaîne (-L) ;

  5. Supprimer les règles d'une chaîne (-F) ;


  6. Mettre à zéro les compteurs de paquets et d'octets sur toutes les
     règles d'une chaîne (-Z).

  Il y a plusieurs moyens pour manipuler les règles à l'intérieur d'une
  chaîne :


  1. Ajouter une nouvelle règle à une chaîne (-A) ;

  2. Insérer une nouvelle règle à une position quelconque de la chaîne
     (-I) ;

  3. Remplacer une règle à une position quelconque de la chaîne (-R) ;

  4. Supprimer une règle à une position quelconque de la chaîne (-D) ;

  5. Supprimer la première règle vérifiée dans la chaîne (-D).

  Il y a quelques opérations pour le masquage, qui se trouvent dans
  ipchains dans l'attente d'un bon endroit pour les mettre :


  1. Lister les connexions masquées 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
  vérifier ce qui arriverait à un paquet donné s'il avait à traverser
  une chaîne donnée.


  44..11..22..  OOppéérraattiioonnss ssuurr uunnee rrèèggllee ssiimmppllee

  Ceci est le B.A.-Ba d'ipchains ; manipuler des règles. Plus
  généralement, 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 règle spéficie 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 même si vous
  n'avez de connexion réseau réelle. Vous pouvez utiliser le programme
  "ping" pour générer de tels paquets (il envoie simplement un paquet
  ICMP de type 8 (requête d'écho) à qui tous les hôtes coopératifs
  doivent obligeamment répondre avec un paquet ICMP de type 0 (réponse à
  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 réussit (le "-c 1" dit à ping
  de n'envoyer qu'un seul paquet).


  Puis nous ajoutons (-A) à la chaîne d'entrée ("input"), une règle
  spécifiant que tous les paquets provenant de 127.0.0.1 ("-s
  127.0.0.1") avec le protocole ICMP ("-p ICMP") doivent être refusés
  ("-j DENY").


  Ensuite nous testons notre règle, en utilisant le second ping. Il y
  aura une pause avant que le programme ne se termine, attendant une
  réponse qui ne viendra jamais.


  Nous pouvons supprimer la règle avec l'un des deux moyens. Tout
  d'abord, puisque nous savons que c'est la seule règle de la chaîne
  d'entrée, nous pouvons utiliser une suppression numérotée, comme
  dans :


               # ipchains -D input 1
               #




  Pour supprimer la règle numéro 1 de la chaîne d'entrée.


  La deuxième possibilité est de copier la commande -A, mais en
  remplaçant le -A par -D. C'est utile lorsque vous avez une chaîne
  complexe de règles et que vous ne voulez pas avoir à les compter afin
  de savoir que c'est la règle 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 mêmes options que la com­
  mande -A (ou -I ou -R). S'il y a des règles multiples identiques dans
  la même chaîne, seule la première sera supprimée.


  44..11..33..  SSppéécciiffiiccaattiioonnss dduu ffiillttrraaggee

  Nous avons vu l'utilisation de "-p" pour spécifier le protocole, et de
  "-s" pour spécifier l'adresse souce, mais il y a d'autres options que
  nous pouvons utiliser pour spécifier les caractéristiques des paquets.
  Ce qui suit en est une description exhaustive.


  44..11..33..11..  SSppéécciiffiieerr lleess aaddrreesssseess IIPP ssoouurrccee eett ddeessttiinnaattiioonn

  Les adresses IP source (-s) et destination (-d) peuvent être
  spécifiées de quatre façons différentes. La façon la plus classique
  est d'utiliser le nom complet, comme "localhost" ou "www.linuxhq.com".
  La deuxième méthode est de spécifier l'adresse IP, comme "127.0.0.1".


  Les deux autres méthodes permettent la spécification d'un groupe
  d'adresses IP, comme "199.95.207.0/24" ou
  "199.95.207.0/255.255.255.0".  Toutes deux spécifient 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 défauts
  (vérifient toutes les adresses IP). Pour ne spécifier 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 même que celui obtenu en ne spécifiant pas l'option
  "-s".


  44..11..33..22..  SSppéécciiffiieerr ll''iinnvveerrssiioonn

  De nombreuses options, incluant les options "-s" et "-d" peuvent avoir
  leurs propres arguments précédés par "!" (prononcé "non") pour ne
  vérifier que les adresses n'étant PAS équivalentes à celles données.
  Par exemple, "-s !  localhost" vérifiera tout paquet ne provenant PAS
  de localhost.


  44..11..33..33..  SSppéécciiffiieerr llee pprroottooccoollee

  Le protocole peut être spécifié en utilisant l'option "-p". Le
  protocole peut être soit un nombre (si vous connaissez les valeurs
  numériques des protocoles pour IP), soit le nom des cas spéciaux
  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 préfixé par un "!", pour l'inverser,
  comme dans "-p ! TCP".


  44..11..33..33..11..  SSppéécciiffiieerr lleess ppoorrttss UUDDPP eett TTCCPP

  Pour les cas spéciaux où un protocole TCP ou UDP est spécifié, il peut
  y avoir un argument supplémentaire indiquant le port TCP ou UDP, ou un
  intervalle (inclusif) de ports (mais voyez ``Utiliser les fragments''
  plus bas). Un intervalle est représenté en utilisant le caractère ":",
  par exemple "6000:6010", qui couvre 11 ports, du 6000 au 6010, de
  manière inclusive. Si la borne inférieure est omise, alors elle se met
  par défaut à 0. Si la borne supérieure est omise, elle est considérée
  par défaut comme étant 65535. Ainsi, pour spécifier les connexions TCP
  venant des ports inférieurs à 1024, la syntaxe pourrait être "-p TCP
  -s 0.0.0.0/0 :1023". Les numéros de ports peuvent être spécifiés par
  leur nom, par exemple "www".


  Notez que la spécification du port peut être précédée par un "!", qui
  l'inverse. Ainsi, pour spécifier tous les paquets TCP, SAUF un paquet
  WWW, vous pourriez spécifier

  -p TCP -d 0.0.0.0/0 ! www



  Il est important de réaliser que spécifier


  -p TCP -d ! 192.168.1.1 www



  est très différent de

  -p TCP -d 192.168.1.1 ! www



  La première ligne spécifie tout paquet TCP dirigé vers le port WWW de
  n'importe quelle machine sauf 192.168.1.1. La seconde spécifie toute
  connexion TCP vers tout port de 192.168.1.1 sauf le port WWW.


  Enfin, le cas suivant spécifie tout, sauf le port WWW et la machine
  192.168.1.1 :

  -p TCP -d ! 192.168.1.1 ! www




  44..11..33..33..22..  SSppéécciiffiieerr lleess ttyyppeess eett ccooddeess IICCMMPP

  ICMP permet aussi un argument optionnel, mais comme l'ICMP ne dispose
  pas de ports (ICMP a un ttyyppee et un ccooddee), ils ont une signification
  différente.


  Vous pouvez les spécifier par les noms ICMP (utilisez ipchains -h icmp
  pour lister les noms disponibles) après l'option "-s", ou en tant que
  type et code ICMP numérique, 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 résumé de quelques-uns des paquets ICMP les plus
  communs :





  Numéro  Nom                     Utilisé par

  0       echo-reply              ping
  3       destination-unreachable Tout trafic TCP/UDP
  5       redirect                Routage, si pas de démon de routage
  8       echo-request            ping
  11      time-exceeded           traceroute




  Notez que les noms ICMP ne peuvent être précédés de "!" pour le
  moment.


  NE PAS, SURTOUT NE PAS bloquer tous les paquets ICMP de type 3 ! (voir
  ``Paquets ICMP'' plus bas).


  44..11..33..44..  SSppéécciiffiieerr uunnee iinntteerrffaaccee

  L'option "-i" spécifie le nom d'une iinntteerrffaaccee à vérifier. Une
  interface est le périphérique 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" (càd en fonctionnement).


  L'interface pour les paquets entrants (ie. les paquets traversant la
  chaîne d'entrée) est considérée comme étant l'interface d'où les
  paquets proviennent. Logiquement, l'interface des paquets sortants
  (les paquets traversant la chaîne de sortie) est l'interface où ils
  vont. L'interface pour les paquets traversant la chaîne de
  retransmission est également l'interface par laquelle ils sortiront ;
  une décision plutôt arbitraire à mon sens.


  Il est parfaitement autorisé de spécifier une interface qui n'existe
  pas au moment de la spécification ; la règle ne vérifiera rien jusqu'à
  ce que l'interface soit mise en place. Ceci est extrêmement utile pour
  les connexions ppp intermittentes (habituellement les interfaces du
  type ppp0) et autres.


  En tant que cas spécial, un nom d'interface se finissant par un "+"
  vérifiera toutes les interfaces (qu'elles existent à ce moment ou non)
  qui commencent par cette chaîne. Par exemple, pour spécifier une règle
  qui vérifiera toutes les interfaces PPP, l'option -i ppp+ pourrait
  être utilisée.


  Le nom d'interface peut être précédé par un "!" pour vérifier un
  paquet qui ne vérifie PAS l'(les) interface(s) spécifiée(s).


  44..11..33..55..  SSppéécciiffiieerr uunniiqquueemmeenntt ddeess ppaaqquueettss TTCCPP SSYYNN

  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 naïve 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 utilisés pour la
  demande d'une connexion. Ces paquets sont nommés paquets SSYYNN (ok,
  techniquement ce sont des paquets avec le drapeau SYN mis, et les
  drapeaux FIN et ACK supprimés, 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 utilisée pour celà : elle est valide seulement pour
  les règles qui spécifient TCP comme leur protocole. Par exemple, pour
  spécifier 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 précéder
  par un "!", qui vérifie tout paquet autre que ceux d'initialisation de
  connexion.


  44..11..33..66..  UUttiilliisseerr lleess ffrraaggmmeennttss

  Parfois, un paquet est trop large pour rentrer dans le câble en une
  seule fois. Lorsque ceci arrive, le paquet est divisé en ffrraaggmmeennttss, et
  envoyé en plusieurs paquets. Le receveur réassemble les fragments pour
  reconstruire le paquet en entier.


  Le problème avec les fragments se situe dans certaines des
  spécifications listées 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 début du paquet, qui
  est contenu seulement dans le premier fragment.


  Si votre machine est la seule connexion vers un réseau extérieur, vous
  pouvez demander à votre noyau Linux de réassembler 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 problèmes.


  D'autre part, il est important de comprendre comment les fragments
  sont traités par les règles de filtrage. Toute règle de filtrage qui
  demande des informations dont nous ne disposons pas ne vérifiera _r_i_e_n.
  Ceci signifie que le premier fragment est traité comme tout autre
  paquet. Le deuxième fragment et les suivants ne le seront pas. Ainsi,
  une règle -p TCP -s 192.168.1.1 www (spécifiant un port source de
  "www" ne vérifiera jamais un fragment (autre que le premier fragment).
  La règle opposée -p TCP -s 192.168.1.1 ! www ne fonctionnera pas non
  plus.


  Cependant, vous pouvez spécifier une règle spéciale pour le deuxième
  fragment et les suivants, en utilisant l'option "-f". Évidemment, il
  est illégal de spécifier un port TCP ou UDP, un type ou un code ICMP,
  ou un drapeau TCP SYN dans une règle de fragment.


  Il est également autorisé de spécifier une règle qui ne s'applique _p_a_s
  au deuxième fragment et aux suivants, en plaçant un "!" avant le "-f".


  Habituellement, il est considéré comme sûr de laisser passer le
  deuxième fragment et les suivants, puisque le filtrage s'effectuera
  sur le premier fragment, et préviendra donc le réassemblage 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 réseau : les paquets malformés (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 traités comme des
  fragments. Seuls les fragments TCP débutant en position 8 sont
  supprimés explicitement par le code pare-feu (un message doit
  apparaître dans le syslog si celà arrive).


  Par exemple, la règle suivante supprimera tout fragment allant sur
  192.168.1.1 :




       # ipchains -A output -f -d 192.168.1.1 -j DENY
       #





  44..11..44..  EEffffeettss ddee bboorrdd dduu ffiillttrraaggee

  OK, maintenant nous connaissons tous les moyens pour vérifier un
  paquet en utilisant une règle. Si un paquet vérifie une règle, les
  choses suivantes arrivent :


  1. Le compteur d'octets de cette règle est augmenté de la taille de ce
     paquet (entête et autres) ;

  2. Le compteur de paquets de cette règle est incrémenté ;

  3. Si la règle le demande, le paquet est enregistré ;

  4. Si la règle le demande, le champ "Type Of Service" du paquet est
     modifié ;

  5. Si la règle le demande, le paquet est marqué (sauf dans la série
     des noyaux 2.0) ;

  6. La destination de la règle est examinée afin de décider ce que nous
     ferons ensuite du paquet.


  Pour la diversité, je détaillerai ceux-ci en ordre d'importance.


  44..11..44..11..  SSppéécciiffiieerr uunnee ddeessttiinnaattiioonn

  Une ddeessttiinnaattiioonn dit au noyau ce qu'il doit faire d'un paquet qui
  vérifie une règle. ipchains utilise "-j" (penser à "jump-to") pour la
  spécification de la destination. Le nom de la cible doit comporter
  moins de 8 caractères, et la casse intervient : "RETOUR" et "retour"
  sont totalement différents.


  Le cas le plus simple est lorsqu'il n'y a pas de destination
  spécifiée. Ce type de règle (souvent appellée règle de "comptage") est
  utile pour simplement compter un certain type de paquet. Que cette
  règle soit vérifiée ou non, le noyau examine simplement la règle
  suivante dans la chaîne. 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 associés à chaque règle).


  Il y a six destinations spéciales. Les trois premières, ACCEPT, REJECT
  et DENY sont relativement simples. ACCEPT autorise le passage du
  paquet. DENY supprime le paquet comme s'il n'avait jamais été reçu.
  REJECT supprime le paquet, mais (si ce n'est pas un paquet ICMP)
  génère une réponse 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
  intégré. Pour les détails sur ceci, voyez le Masquerading-HOWTO et
  l'annexe ``Différences entre ipchains et ipfwadm''. Cette destination
  est valide uniquement pour les paquets qui traversent la chaîne
  forward.


  L'autre destination majeure spéciale 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 spécifié uniquement pour les règles spécifiant
  TCP ou UDP en tant que protocole. Optionnellement, un port (nom ou
  numéro) peut être spécifié après "-j REDIRECT" qui redirigera la
  paquet vers ce port particulier, même si celui-ci était dirigé vers un
  autre port. Cette destination est valide uniquement pour les paquets
  traversant la chaîne input.


  La dernière destination spéciale est la RETURN qui est identique à une
  terminaison immédiate de la chaîne (voir ``Choisir une police'' plus
  bas).


  Toute autre destination indique une chaîne définie par l'utilisateur
  (décrite dans ``Opérations sur une chaîne entière'' plus bas). Le
  paquet traversera tout d'abord les règles de cette chaîne. Si cette
  chaîne ne décide pas du destin du paquet, lorsque la traversée de
  cette chaîne sera achevée, la traversée reprendra sur la règle
  suivante de la chaîne courante.


  Il est temps de faire encore un peu d'art ASCII. Considérons deux
  (étranges) chaînes : input (la chaîne intégrée) et Test (une chaîne
  définie par l'utilisateur).









                `input'                          `Test'
          -----------------------------    -----------------------------
          | Règle1: -p ICMP -j REJECT |    | Règle1: -s 192.168.1.1    |
          |---------------------------|    |---------------------------|
          | Règle2: -p TCP -j Test    |    | Règle2: -d 192.168.1.1    |
          |---------------------------|    -----------------------------
          | Règle3: -p UDP -j DENY    |
          -----------------------------




  Considérons un paquet TCP venant de 192.168.1.1, allant vers 1.2.3.4.
  Il pénètre dans la chaîne input, et est testé par la Règle1 - pas de
  correspondance. La Règle2 correspond, et sa destination est Test, donc
  la règle suivante à examiner est le début de Test. La Règle1 de Test
  correspond, mais ne spécifie pas de destination, donc la règle
  suivante est examinée (Règle2). Elle ne correspond pas, nous avons
  donc atteint la fin de la chaîne.  Nous retournons alors à la chaîne
  input, dont nous avons juste examiné la Règle2, et nous examinons
  alors la Règle3, qui ne correspond pas non plus.


  Le chemin suivi par le paquet est donc le suivant :

                                  v    __________________________
           `entrée'               |   /    `Test'                v
          ------------------------|--/    -----------------------|----
          | Règle1                | /|    | Règle1               |   |
          |-----------------------|/-|    |----------------------|---|
          | Règle2                /  |    | Règle2               |   |
          |--------------------------|    -----------------------v----
          | Règle3                /--+---------------------------/
          ------------------------|---
                                  v




  Voyez la section ``Comment organiser vos règles pare-feu'' pour les
  moyens d'utiliser efficacement les chaînes définies par l'utilisateur.


  44..11..44..22..  EEnnrreeggiissttrreemmeenntt ddeess ppaaqquueettss

  C'est un effet de bord que la vérification d'une règle peut avoir ;
  vous pouvez enregistrer les paquets vérifiés en utilisant l'option
  "-l". Vous n'aurez généralement pas besoin de ceci pour les paquets
  habituels, mais ce peut être une option très utile si vous désirez
  être tenu au courant des événements exceptionnels.


  Le noyau enregistre cette information de la manière 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 prévu pour être concis, et contient des
  informations techniques qui ne sont utiles qu'aux gourous réseau, mais
  qui peuvent néanmoins être intéressantes pour le commun des mortels.
  Il se décompose de la façon suivante :
  1. `input' est la chaîne qui contenait la règle correspondant au
     paquet, et qui a causé l'apparition du message.

  2. `DENY' est ce que la règle a dit au paquet de faire. Si ceci est un
     `-' alors la règle n'a pas du tout affecté le paquet (une règle de
     comptage).

  3. `eth0' est le nom de l'interface. Puisque ceci était la chaîne
     d'entrée, celà signifie que le paquet vient de `eth0'.

  4. `PROTO=17' signifie que le paquet était de protocole 17. Une liste
     des numéros de protocoles est donnée 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' (càd que
     c'est probablement une réponse DNS). Pour UDP et TCP, ce numéro 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 numéro 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 débutant 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 après. Le reste du nombre est le
     décalage de ce fragment, divisé par 8.

  13.
     `T=254' est la durée de vie du paquet. On soustrait 1 à cette
     valeur à chaque saut (hop), et on débute généralement à 15 ou 255.

  14.
     `(#5)' il peut y avoir un numéro entre parenthèses sur les noyaux
     les plus récents (peut-être après le 2.2.9). Il s'agit du numéro de
     la règle qui a causé l'enregistrement du paquet.


  Sur les systèmes Linux standards, la sortie du noyau est capturée par
  klogd (démon d'information du noyau) qui le repasse à syslogd (démon
  d'information du système). Le fichier `/etc/syslog.conf' contrôle le
  comportement de syslogd, en spécifiant 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
  vérifient `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 dupliqués dans `/var/log/kern.log'
  et `/var/log/messages'. Pour plus de détails, voyez `man syslog.conf'.


  44..11..44..33..  MMaanniippuulleerr llee ttyyppee ddee sseerrvviiccee

  Il y a quatre bits utilisés par eux-mêmes dans l'entête IP, appelés
  les bits de TTyyppee ooff SSeerrvviiccee (TOS). Ceux-ci ont pour effet de modifier
  la manière dont les paquets sont traités : 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 décrit comme suit :


       Tout spécialement, le "Minimum Delay" est important pour
       moi. Je le mets pour les paquets "interactifs" dans mon rou­
       teur principal (Linux). Je suis derrière une connexion modem
       33,6k. Linux rend les paquets prioritaires en 3 queues. De
       cette façon, j'obtiens des performances interactives accept­
       ables tout en faisant de gros transferts de fichiers en même
       temps. (Celà pourrait même être encore mieux s'il n'y avait
       pas de grosse queue dans le pilote série, mais le temps de
       latence est maintenu en dessous des 1,5 secondes pour
       l'instant).



  Note : bien entendu, vous n'avez aucun contrôle sur les paquets
  arrivants ; vous pouvez seulement contrôler la priorité des paquets
  qui quittent votre machine.  Pour négocier les priorités de chaque
  côté, un protocole comme RSVP (dont je ne connais rien) doit être
  utilisé.


  L'utilisation la plus commune est de placer les connexions telnet et
  contrôle du ftp en "Minimum Delay" et les données FTP en "Maximum
  Throughput". Ceci peut être fait de la manière 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 paramètres supplémentaires, tous les deux en
  hexadécimal. Ceci permet un contrôle complexe des bits du TOS : le
  premier masque est ANDé avec le TOS actuel du paquet, et ensuite le
  deuxième 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 (modérément édité
  pour la postérité) :

       Peut-être serait-il utile d'ajouter une référence au
       paramète txqueuelen de ifconfig dans la discussion sur les
       bits TOS. La longueur par défaut de la queue d'un
       périphérique est réglée 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 idée de le config­
       urer avec une valeur comprise entre 4 et 10 sur un modem ou
       un lien RNIS b simple : sur les périphériques rapide une
       queue plus longue est nécessaire. C'est un problème des 2.0
       et 2.1, mais dans le 2.1 c'est une option de ifconfig (dans
       les nettools récents), alors que dans le 2.0 il nécessite
       une modification des sources des pilotes du périphérique
       pour le changer.


  Ainsi, pour voir les bénéfices 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 dépend de la vitesse du
  modem et de la taille du tampon du modem ; voici à nouveau les idées
  d'Andi :


       La meilleure valeur pour une configuration donnée nécessite
       de l'expérimentation. Si les queues sont trop courtes sur le
       routeur, alors les paquets sauteront. Bien sûr, on peut tou­
       jours gagner même sans changer le TOS, c'est juste que le
       changement du TOS aide à gagner les bénéfices sur les pro­
       grammes non coopératifs (mais tous les programmes Linux
       standards sont coopératifs).



  44..11..44..44..  MMaarrqquuaaggee dd''uunn ppaaqquueett

  Ceci permet des interactions complexes et puissantes avec la nouvelle
  implémentation de Quality of Service d'Alexey Kuznetsov, ainsi que de
  la redirection basée sur le marquage dans la dernière série de noyaux
  2.1. Des détails supplémentaires vont arriver puisque nous l'avons
  dans la main. Cette option est toutefois ignorée dans la série des
  noyaux 2.0.


  44..11..44..55..  OOppéérraattiioonnss ssuurr uunnee cchhaaîînnee eennttiièèrree

  Une des options les plus utiles d'ipchains est la possibilité de
  regrouper des règles dans des chaînes. Vous pouvez appeller les
  chaînes de la manière qui vous plaît, tant que les noms ne sont pas
  ceux des chaînes intégrées (input, output et forward) ou des
  destinations ((MASQ, REDIRECT, ACCEPT, DENY, REJECT ou RETURN). Je
  suggère d'éviter complètement les noms en majuscules, car je pourrais
  les utiliser pour des extensions futures. Le nom de la chaîne ne doit
  pas dépasser 8 caractères.


  44..11..44..66..  CCrrééeerr uunnee nnoouuvveellllee cchhaaîînnee

  Créons une nouvelle chaîne. Étant un type imaginatif, je l'appellerai
  test.



       # ipchains -N test
       #





  C'est aussi simple. Maintenant vous pouvez y rajouter des règles,
  comme détaillé ci-dessus.


  44..11..44..77..  SSuupppprriimmeerr uunnee cchhaaîînnee

  La suppression d'une chaîne est tout aussi simple.



       # ipchains -X test
       #




  Pourquoi "-X" ? Eh bien, toutes les bonnes lettres étaient déjà
  prises.


  Il y a quelques restrictions à la suppression des chaînes : elles
  doivent être vides (voir ``Vider une chaîne'' plus bas) et elles ne
  doivent pas être la destination d'une quelconque règle. Vous ne pouvez
  pas supprimer les chaînes intégrées.


  44..11..44..88..  VViiddeerr uunnee cchhaaîînnee

  Il y a un moyen simple de vider toutes les règles d'une chaîne, en
  utilisant la commande "-F".



       # ipchains -F forward
       #





  Si vous ne spécifiez pas de chaîne, alors _t_o_u_t_e_s les chaînes seront
  vidées.




  44..11..44..99..  AAffffiicchheerr uunnee cchhaaîînnee

  Vous pouvez afficher toutes les règles d'une chaîne 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" listée pour test est le nombre de règles qui ont test
  comme destination. Ceci doit être égal à zéro (et la chaîne doit être
  vide) avant que cette chaîne ne puisse être supprimée.


  Si le nom de la chaîne est omis, toutes les chaînes sont listées, même
  les chaînes vides.


  Il y a trois options qui peuvent accompagner "-L". L'option "-n"
  (numérique) est très utile et empêche ipchains d'essayer de vérifier
  les adresses IP, ce qui (si vous utilisez DNS comme la plupart des
  gens) causera de longs délais si votre DNS n'est pas configuré
  proprement, ou si vous filtrez les requêtes DNS. Ceci affichera
  également les ports par leur numéro plutôt que par leur nom.


  L'option "-v" vous montrera tous les détails des règles, 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 affichés 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"
  (développe les nombres), ipchains affichera les nombres en entier,
  quelque soit leur taille.


  44..11..44..1100..  RReemmiissee àà zzéérroo ddeess ccoommpptteeuurrss

  Il est parfois utile de pouvoir remettre à zéro les compteurs. Ceci
  peut être fait par l'option "-Z" (compteurs à Zéro). 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 problème de cette approche est que parfois vous voudrez connaître
  les valeurs du compteur tout de suite après la remise à zéro. 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 à zéro les compteurs tout en
  les lisant. Malheureusement, si vous faîtes ceci, vous ne pouvez
  opérer sur une seule chaîne : vous devrez lister et remettre à zéro
  toutes les chaînes 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
       #





  44..11..44..1111..  CChhooiissiirr uunnee ppoolliiccee

  Nous avons disserté sur ce qui se passe lorsqu'un paquet atteint la
  fin de la chaîne intégrée, lorsque nous avons discuté sur la manière
  dont un paquet parcourait les chaînes dans ``Spécifier une
  destination'' plus haut. Dans ce cas, la ppoolliiccee de la chaîne détermine
  le destin du paquet. Seules les chaînes intégrées (input, output et
  forward) ont des polices, car si un paquet atteint la fin d'une chaîne
  définie par l'utilisateur, le paquet revient sur la chaîne précédente.


  La police peut être une des quatre premières destinations spéciales :
  ACCEPT, DENY, REJECT ou MASQ. MASQ est la seule destination valide
  pour la chaîne "forward".


  Il est également important de noter qu'une destination RETURN dans une
  règle de l'une des chaînes intégrées est utile pour expliciter la
  destination de la chaîne lorsqu'un paquet correspond à la règle.


  44..11..55..  OOppéérraattiioonnss ssuurr llee ccaammoouuffllaaggee

  Il y a plusieurs paramètres que vous pouvez modifier pour le
  camouflage IP.  Ils sont intégrés avec ipchains car il n'est pas
  évident d'écrire un outil séparé pour eux (bien que ceci devrait
  changer).


  La commande du camouflage IP est "-M", et peut être combinée avec "-L"
  pour lister les connexions actuellement camouflées, ou avec "-S" pour
  configurer les paramètres du camouflage.


  La commande "-L" peut être accompagnée par "-n" (montre des nombres à
  la place des noms de machines et de ports) ou "-v" (affiche les deltas
  dans les séquences de nombres pour la connexion camouflée, 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
  précédées 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 défaut sont listées dans
  "/usr/src/linux/include/net/ip_masq.h", actuellement 15 minutes, 2
  minutes et 5 minutes, respectivement.


  La valeur changée le plus souvent est la première, pour le FTP (voir
  ``Cauchemars du FTP'' plus bas).


  Notez que les problèmes avec la mise en place de temps de fin
  d'attente sont listés dans ``Je n'arrive pas à configurer mes temps
  d'attente !''.


  44..11..66..  VVéérriiffiieerr uunn ppaaqquueett

  Parfois, vous voulez savoir ce qui arrive lorsqu'un certain paquet
  entre dans votre machine, par exemple pour déboguer votre chaîne pare-
  feu.  ipchains dispose de la commande "-C" pour autoriser celà, en
  utilisant exactement les mêmes routines que celles que le noyau
  utilise pour vérifier les vrais paquets.


  Vous spécifiez sur quelle chaîne le paquet doit être testé en mettant
  son nom après l'argument "-C". Même si le noyau commence toujours par
  traverser les chaînes input, output ou forward, vous êtes autorisé à
  commencer en traversant n'importe quelle chaîne pour tester.


  Les détails du "paquet" sont spécifiés en utilisant la même syntaxe
  que celle utilisée pour spécifier les règles pare-feu. En particulier,
  un protocole ("-p"), une adresse source ("-s"), une adresse de
  destination ("-d") et une interface ("-i") sont nécessaires. Si le
  protocole est TCP ou UDP, alors une source unique et une destination
  unique doivent être spécifiées, et un type et un code ICMP doivent
  être spécifiés pour le protocole ICMP (à moins que l'option "-f" soit
  spécifiée pour indiquer une règle de fragment, auquel cas ces options
  sont illégales).


  Si le protocole est TCP (et que l'option "-f" n'est pas spécifiée),
  l'option "-y' doit être explicitée, 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 chaîne "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
       #





  44..11..77..  VVooiirr ccee qquuii aarrrriivvee aavveecc ddeess rrèègglleess mmuullttiipplleess pprréécciissééeess eenn uunnee
  sseeuullee ffooiiss

  Parfois, une simple ligne de commande peut affecter de multiples
  règles. Ceci se fait par deux méthodes. Premièrement, si vous
  spécifiez 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 règles à la chaîne input.


  L'autre méthode pour avoir ipchains réalisant 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 deuxième
  fois avec les arguments "-s" et "-d" inversés. 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
  préférez la convivialité, voyez ``Utiliser ipchains-save'' plus bas.


  L'option -b peut être utilisée avec les commandes insérer ("-I"),
  supprimer ("-D") (mais pas avec la variation qui prend un numéro de
  règle), ajouter ("-A") et vérifier ("-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 règles. Par
  exemple, nous devons ici vérifier 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
       #





  44..22..  EExxeemmpplleess uuttiilleess

  J'ai une connexion intermittente en PPP (-i ppp0). Je récupère 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 méthode ftp de Debian pour mettre ma machine à jour régulièrement
  (-p TCP -y -s ftp.debian.org.au ftp-data). Je visionne le web au
  travers du proxy de mon FAI (Fournisseur d'Accès Internet) lorsque je
  suis en ligne (-p TCP -d proxy.virtual.net.au 8080), mais je déteste
  les publicités 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'extérieur à prétendre avoir une adresse IP sur mon réseau interne
  (-s 192.168.1.0/24). Ceci est communément appelé IP spoofing, et il y
  a un meilleur moyen de se protéger 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 réseau 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 désire changer les priorités des divers paquets sortants
  (il n'y a pas vraiment d'intérêt à le faire pour les paquets
  entrants). Puisqu'il y a un certain nombre de ces règles, il y a
  intérêt à les mettre ensemble dans une seule chaîne, nommée ppp-out.





  # ipchains -N ppp-out
  # ipchains -A output -i ppp0 -j ppp-out
  #





  Délai 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
       #





  Coût faible pour les données 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 ; créons une chaîne nommée "ppp-in" :



       # ipchains -N ppp-in
       # ipchains -A input -i ppp0 -j ppp-in
       #





  Maintenant, aucun des paquets venant de ppp0 ne doit prétendre 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'entrée 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 réponses DNS venant uniquement de là), l'entrée
  du ftp, et le retour des données ftp (ftp-data) uniquement (ce qui
  doit être uniquement entre un port strictement supérieur à 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 défaut sur la chaîne input est DENY, ce qui
  fait que tout le reste disparaît :



       # ipchains -P input DENY
       #





  NOTE : Je ne configurerais pas mes chaînes dans cet ordre, car des
  paquets pourraient passer durant la configuration. Le moyen le plus
  sûr est généralement de configurer la police à DENY tout d'abord, et
  ensuite d'insérer les règles. Bien sûr, si vos règles ont besoin
  d'effectuer des demandes DNS pour résoudre des noms de machines, vous
  pourriez avoir des problèmes.


  44..22..11..  UUttiilliisseerr iippcchhaaiinnss--ssaavvee

  Configurer des chaînes pare-feu de la manière 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 chaînes 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 chaîne seule, ou toutes les chaînes (si
  aucun nom de chaîne n'a été spécifié). La seule option actuellement
  autorisée est le "-v" qui affiche les règles (vers stderr)
  lorsqu'elles sont sauvées. La police de la chaîne est aussi sauvée
  pour les chaînes input, output et forward.







  # ipchains-save > my_firewall
  Saving `input'.
  Saving `output'.
  Saving `forward'.
  Saving `ppp-in'.
  Saving `ppp-out'.
  #





  44..22..22..  UUttiilliisseerr iippcchhaaiinnss--rreessttoorree

  ipchains-restore remet les chaînes que vous avez sauvé avec ipchains-
  save. Il peut prendre deux options : "-v" qui décrit chaque règle
  lorsqu'elle est ajoutée, et "-f" qui force le nettoyage des chaînes
  définies par l'utilisateur si elles existent, comme décrit plus bas.


  Si une chaîne définie par l'utilisateur est trouvée à l'entrée,
  ipchains-restore vérifie que cette chaîne existe déjà. Si elle existe,
  alors vous serez interrogé pour savoir si la chaîne doit être nettoyée
  (suppression de toutes les règles) ou si la restauration de la chaîne
  doit être sautée. Si vous spécifiez "-f" sur la ligne de commande,
  vous ne serez pas interrogé ; la chaîne sera nettoyée.


  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'.
       #





  55..  DDiivveerrss

  Cette section contient toutes les informations et les questions
  fréquemment posées que je ne pouvais faire entrer dans la structure
  ci-dessus.


  55..11..  CCoommmmeenntt oorrggaanniisseerr vvooss rrèègglleess ppaarree--ffeeuu

  Cette question nécessite un peu de réflexion. Vous pouvez tenter de
  les organiser pour optimiser la vitesse (minimiser le nombre de
  vérifications de règles pour la plupart des paquets) ou pour augmenter
  la maniabilité.


  Si vous avez une connexion intermittente, disons une connexion PPP,
  vous pouvez configurer la première règle de la chaîne d'entrée pour
  être `-i ppp0 -j DENY' au lancement, puis avoir quelque chose comme
  ceci dans votre script ip-up :



       # Re-crée la chaîne "ppp-in"
       ipchains-restore -f < ppp-in.firewall

       # Remplace la règle DENY par un saut vers la chaîne 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






  55..22..  CCee qquu''iill nnee ffaauutt ppaass ffiillttrreerr

  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.


  55..22..11..  LLeess ppaaqquueettss IICCMMPP

  Les paquets ICMP sont utilisés (entre autres choses) pour indiquer des
  problèmes 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 réponse qui ne viendra jamais. C'est irritant, mais
  rarement fatal.


  Un problème plus inquiétant est le rôle des paquets ICMP dans la
  découverte MTU. Toutes les bonnes implémentations 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 reçoit 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 reçu, l'hôte local ne réduira 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 utilisés pour manipuler le
  routage (bien que les piles IP bien conçues disposent de gardes-fou),
  et sont donc souvent considérés comme quelques peu risqués.





  55..22..22..  CCoonnnneexxiioonnss TTCCPP aauu DDNNSS ((sseerrvveeuurr ddee nnoomm))

  Si vous tentez de bloquer toutes les connexions TCP sortantes,
  rappellez vous que le DNS n'utilise pas toujours UDP ; si la réponse
  du serveur dépasse les 512 octets, le client utilise une connexion TCP
  (allant toujours sur le port numéro 53) pour obtenir les données.


  Ceci peut être un piège car le DNS fonctionnera "en gros" si vous
  interdisez de tels transferts TCP ; vous pouvez expérimenter des
  délais longs et étranges, et d'autres problèmes liés au DNS si vous le
  faites.


  Si les demandes de votre DNS sont toujours dirigées vers les mêmes
  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.


  55..22..33..  CCaauucchheemmaarrss dduu FFTTPP

  L'autre problème classique du filtrage de paquets est celui posé par
  le FTP.  Le FTP a deux mmooddeess ; le mode traditionnel est appelé mmooddee
  aaccttiiff et le plus récent est appelé mmooddee ppaassssiiff. Les navigateurs web
  utilisent souvent le mode passif par défaut, mais les programmes de
  ftp en ligne de commmande utilisent en général par défaut le mode
  actif.


  En mode actif, lorsque l'hôte distant désire envoyer un fichier (ou
  même les résultats 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 données du client
  au serveur, même pour les données arrivantes. Autrement, il est
  recommendé de n'autoriser que les connexions TCP vers les ports
  supérieurs à 1024 et de les interdire entre 6000 et 6010 (6000 est
  utilisé par X-Windows).


  55..33..  FFiillttrreerr llee ppiinngg ddee llaa mmoorrtt ((PPiinngg ooff DDeeaatthh))

  Les machines Linux sont maintenant immunisées du fameux PPiinngg ooff DDeeaatthh,
  qui implique l'envoi de paquets ICMP illégalement grands qui font
  déborder les buffers de la pile TCP du récepteur et causent de gros
  dégâts.


  Si vous voulez protéger des machines qui peuvent être vulnérables, vos
  pouvez simplement bloquer les fragments ICMP. Les paquets ICMP normaux
  ne sont pas assez gros pour nécessiter la fragmentation, et vous ne
  casserez rien à part les gros pings. J'ai entendu parler (non
  confirmé) de rapports comme quoi quelques systèmes ont seulement
  besoin du dernier fragment d'un paquet ICMP déformé pour les
  corrompre, donc bloquer seulement le premier fragment n'est pas
  recommandé.



  Même 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.


  55..44..  FFiillttrreerr tteeaarrddrroopp eett bboonnkk

  Teardrop et Bonk sont deux attaques (principalement contre les
  machines sous Microsoft Windows NT) qui reposent sur des fragments
  superposés. Avoir votre routeur Linux défragmenter, ou interdisant
  tous les fragments vers vos machines vulnérables sont d'autres
  options.


  55..55..  FFiillttrreerr lleess bboommbbeess àà ffrraaggmmeennttss

  Quelques piles TCP moins fiables sont connues pour avoir des problèmes
  à gérer de larges ensembles de fragments de paquets lorsqu'elles ne
  reçoivent pas tous les fragments. Linux n'a pas ce problème. Vous
  pouvez filtrer les fragments (ce qui peut casser les utilisations
  légitimes) 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).


  55..66..  CChhaannggeerr lleess rrèègglleess ppaarree--ffeeuu

  Il y a quelques problèmes de temps qui sont impliqués dans la
  modification des règles 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 durée des changements.


  Si vos changements sont restreints à une chaîne simple, vous pouvez
  créer une nouvelle chaîne avec les nouvelles règles, et ensuite
  remplacer ("-R") la règle qui pointait sur la vieille chaîne par une
  qui pointe sur la nouvelle chaîne ; ensuite, vous pouvez supprimer la
  vieille chaîne. Le remplacement se fera à vitesse atomique.


  55..77..  CCoommmmeenntt mmeettttrree eenn ppllaaccee llaa pprrootteeccttiioonn ccoonnttrree ll''IIPP ssppooooff ??

  L'IP spoofing est une technique dans laquelle un hôte envoie des
  paquets qui prétendent venir d'un autre hôte. Puisque le filtrage des
  paquets prend ses décisions sur la base de cette adresse source, l'IP
  spoofing est utilisé pour abuser les filtres de paquets. Elle est
  également utilisée pour cacher l'identité d'un attaquant utilisant les
  techniques SYN, Teardrop, Ping of Death et autres dérivés (ne vous
  inquiétez si vous ne savez pas ce que c'est).


  Le meilleur moyen de se protéger de l'IP spoofing est la vérification
  de l'adresse source, et il est réalisé 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 vérification de l'adresse source à
  chaque lancement est la bonne solution pour vous. Pour se faire,
  insérez les lignes suivantes quelque part dans vos scripts
  d'initialisation, avant l'initialisation des interfaces réseau :



       # 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 insérer manuellement les
  règles pour protéger chaque interface. Ceci nécessite la connaissance
  de chaque interface.  La série des noyaux 2.1 et supérieurs rejette
  automatiquement les paquets qui prétendent venir des adresses 127.*
  (réservées 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 réseau de chaque interface. Disons que eth0 est
  rattachée à un réseau 192.168.1.0 avec le masque de sous-réseau
  255.255.255.0, eth1 est raccordée à un réseau 10.0.0.0 avec le masque
  de sous-réseau 255.0.0.0, et ppp0 connectée à l'Internet (où toutes
  les adresses sauf les adresses IP privées réservées sont autorisées),
  nous insérerions les règles 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 vérification
  de l'adresse source, parce que si votre réseau change, vous devrez
  changer vos règles pare-feu pour être à jour.


  Si vous utilisez un noyau de série 2.0, vous pouvez également vouloir
  protéger l'interface loopback, en utilisant une règle telle que :



       # ipchains -A input -i ! lo -s 127.0.0.0/255.0.0.0 -j DENY
       #





  55..88..  PPrroojjeettss aavvaannccééss

  Il y a une bibliothèque dans l'espace utilisateur que j'ai écrit et
  qui est inclue avec la distribution source, nommée "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 utilisée pour spécifier les paramètres de
  Qualité de Service pour les paquets, ou pour spécifier comment les
  paquets doivent être renvoyés. Je ne l'ai cependant jamais utilisée,
  mais si vous voulez écrire sur ce sujet, contactez moi.


  Des choses comme le ssttaatteeffuull iinnssppeeccttiioonn (je préfère le terme "pare-feu
  dynamique") peuvent être implémentées dans l'espace utilisateur en
  utilisant cette bibliothèque. D'autres idées géniales peuvent être le
  contrôle des paquets sur une base "par utilisateur" en faisant une
  demande sur un démon résidant dans l'espace utilisateur. Ceci devrait
  être relativement simple.


  55..88..11..  SSPPFF :: SSttaatteeffuull PPaacckkeett FFiilltteerriinngg

  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 sécurité 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 répondant à quelques
  questions :
















  > Je présume qu'il fait exactement ce que je veux~: installer une règle de
  > "retour" temporaire pour laisser entrer des paquets en réponse à une
  > requête extérieure.

  Yup, c'est exactement ce à quoi il sert. Plus il comprendra de protocoles,
  plus il obtiendra de règles de retour exactes. Pour l'instant il supporte
  (de mémoire, excusez les erreurs ou les omissions) le FTP (à la fois actif et
  passif, intérieur et extérieur), un peu de RealAudio, de traceroute, d'ICMP et
  d'un ICQ basique (transmission des serveurs ICQ, connexions TCP directes, mais
  hélas la seconde connexion directe TCP pour des trucs comme le transfert de
  fichiers, etc., ne sont pas encore présentes)

  > S'agit-il d'un remplaçant pour ipchains ou d'un ajout~?

  C'est un ajout. Pensez à ipchains comme étant le moteur pour autoriser et
  empêcher les paquets de traverser une machine Linux. SPF est le pilote, gérant
  et surveillant constamment le traffic et disant à ipchains comment changer ses
  polices pour refléter les changements dans les schémas du traffic.





  55..88..22..  MMooddiiffiiccaattiioonn ddeess ddoonnnnééeess ffttpp ppaarr MMiicchhaaeell HHaasseennsstteeiinn

  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>


  55..99..  EExxtteennssiioonnss ffuuttuurreess

  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 problèmes d'utilisation (réellement, 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).


  66..  PPrroobbllèèmmeess ccllaassssiiqquueess

  66..11..  iippcchhaaiinnss --LL eesstt ggeelléé !!

  Vous bloquez probablement les demandes DNS ; il finira probablement
  par stopper. Essayez d'utiliser l'option "-n" (numérique) d'ipchains,
  qui supprimera la recherche des noms.


  66..22..  LLee ccaammoouuffllaaggee//rreeddiirreeccttiioonn nnee ffoonnccttiioonnnnee ppaass !!

  Vérifiez si la redirection de paquets est activée (dans les noyaux
  récent, elle est désactivée par défaut ce qui signifie que les paquets
  ne tentent jamais de traverser la chaîne "forward"). Vous pouvez
  changer ce défaut (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 manière à ce que la redirection soit activée
  à chaque fois ; vous devrez toutefois configurer votre pare-feu avant
  le lancement de cette commande, autrement il peut y avoir passage de
  paquets.


  66..33..  --jj RREEDDIIRR nnee mmaarrcchhee ppaass !!

  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 chaîne d'entrée) n'affecte pas les connexions
  d'un processus local.



  66..44..  LLeess iinntteerrffaacceess jjookkeerr nnee ffoonnccttiioonnnneenntt ppaass !!

  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é corrigée dans les noyaux récents, 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.


  66..55..  TTOOSS nnee ffoonnccttiioonnnnee ppaass !!

  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
  problème a été corrigé dans le 2.1.112.


  66..66..  iippaauuttooffww eett iippppoorrttffww nnee ffoonnccttiioonnnneenntt ppaass !!

  Pour les 2.0.x, c'est vrai ; je n'ai pas le temps de créer et de
  maintenir un correctif de taille gigantesque pour ipchains et
  ipautofw/ipportfw.


  Pour les 2.1.x, récupérez ipmasqadm de Juan Ciarlante sur

  <url url="http://juanjox.linuxhq.com/"
          name="http://juanjox.linuxhq.com/">


  et utilisez-le exactement de la manière 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.


  66..77..  XXoossVViieeww nnee mmaarrcchhee ppaass !!

  Mettez à jour à la version 1.6.0 ou supérieure, qui ne nécessite pas
  de règle 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 !).


  66..88..  EErrrreeuurr ddee sseeggmmeennttaattiioonn aavveecc --jj RREEDDIIRREECCTT !!

  C'était une erreur dans ipchains version 1.3.3. Veuillez mettre à
  jour.



  66..99..  JJee nnee ppeeuuxx ppaass mmooddiiffiieerr lleess tteemmppss dd''aatttteennttee dduu ccaammoouuffllaaggee !!

  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 résolu. Ma page web
  contiendra un correctif lorsqu'il sera disponible.


  66..1100..  JJee vveeuuxx ffiirreewwaalllleerr IIPPXX !!

  Ainsi qu'un certain nombre d'autres personnes, il semble. Mon code
  couvre seulement IP, malheureusement. Du bon côté, tout est là pour
  pouvoir firewaller IPX ! Vous devrez juste écrire le code ; je vous
  aiderai joyeusement là où ce sera possible.


  77..  UUnn eexxeemmppllee sséérriieeuuxx

  Cet exemple est extrait du tutorial donné par Michael Neuling et moi-
  même en mars 1999 lors du LinuxWorld ; ce n'est pas le seul moyen de
  régler le problème donné, mais c'est probablement le plus simple.
  J'espère que vous le jugerez informatif.


  77..11..  LL''aarrrraannggeemmeenntt


  ·  Un réseau interne camouflé (sous divers systèmes d'exploitation),
     que nous appellerons "BON" ;

  ·  des serveurs exposés dans un réseau séparé (nommé "ZDM" pour Zone
     Démilitarisée) ;

  ·  une connexion PPP à l'Internet (nommé "MAUVAIS").













     Réseau externe (MAUVAIS)
             |
             |
         ppp0|
      ---------------
      | 192.84.219.1|             Réseau 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
             |
     Réseau Interne (BON)





  77..22..  BBuuttss

  Sur la machine filtrant les paquets :

     PPIINNGG ttoouutt rréésseeaauu
        Très utile si la machine est hors-service.

     TTRRAACCEERROOUUTTEE ttoouutt rréésseeaauu
        Une fois de plus, utile pour les diagnostics.

     AAccccèèss aauu DDNNSS
        Pour rendre ping et DNS plus utile.


  À l'intérieur de la Zone Démilitarisée :


  Serveur mail

  ·  SMTP vers l'extérieur

  ·  Accepte le SMTP de l'intérieur et de l'extérieur

  ·  Accepte le POP3 de l'intérieur

  Serveur de nom

  ·  Envoi de requêtes DNS vers l'extérieur

  ·  Accepte les requêtes DNS de l'intérieur, l'extérieur, et du filtre
     de paquets

  Serveur web

  ·  Accepte les requêtes HTTP de l'intérieur et de l'extérieur

  ·  Accès rsync de l'intérieur


  En interne :

     AAuuttoorriissee WWWWWW,, ffttpp,, ttrraacceerroouuttee eett sssshh vveerrss ll''eexxttéérriieeuurr
        Ce sont des services standards à autoriser : on autorise parfois
        les machines internes à tout faire, mais ici nous serons plus
        restrictifs.

     AAuuttoorriissee llee SSMMTTPP vveerrss llee sseerrvveeuurr mmaaiill
        Bien entendu, nous voulons qu'il leur soit possible d'envoyer du
        courrier vers l'extérieur.

     AAuuttoorriissee llee PPOOPP33 vveerrss llee sseerrvveeuurr mmaaiill
        C'est ainsi qu'ils lisent leur courrier.

     AAuuttoorriissee lleess rreeqquuêêtteess DDNNSS vveerrss llee sseerrvveeuurr ddee nnoomm
        Ils doivent pouvoir rechercher des noms externes pour le web, le
        ftp, traceroute ou ssh.

     AAuuttoorriissee rrssyynncc vveerrss llee sseerrvveeuurr wweebb
        C'est ainsi qu'ils synchronisent le serveur web externe avec
        l'interne.

     AAuuttoorriissee lleess rreeqquuêêtteess WWWWWW vveerrss llee sseerrvveeuurr wweebb
        Bien entendu, nous voulons qu'ils puissent se connecteur au
        serveur web externe.

     AAuuttoorriissee llee ppiinngg vveerrss llee ffiillttrree ddee ppaaqquueettss
        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 extérieur est coupé).


  77..33..  AAvvaanntt llee ffiillttrraaggee ddeess ppaaqquueettss


  ·  Protection anti-spoofing


     Puisque nous n'avons pas de routage asymétrique, 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 règles de filtrage en interdiction (DENY)
     totale :


     Nous autorisons tout de même 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 généralement réalisé par les scripts de lancement. Faîtes
     bien attention à ce que les règles ci-dessus soient insérées avant
     que les interfaces ne soient configurées, afin de prévenir le
     passage de paquets avant l'insertion des règles.


  ·  Insertion des modules de camouflage par protocole

     Nous devons insérer le module de camouflage du FTP, ainsi le ftp
     passif et actif fonctionnera `uniquement' du réseau interne.




       # insmod ip_masq_ftp
       #





  77..44..  FFiillttrraaggee ddee ppaaqquueettss ppoouurr lleess ppaaqquueettss ttrraavveerrssaannttss

  Avec le camouflage, il vaut mieux filtrer la chaîne de retransmission.


  Cassez la chaîne de retransmission en plusieurs chaînes utilisateurs
  dépendant des interfaces sources/destination ; ceci ramène le problème
  à des problèmes plus gérables.



       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 créons donc une chaîne.



       ipchains -N icmp-acc





  77..44..11..  CCoonnffiigguurreerr lleess ssaauuttss ddee llaa cchhaaîînnee ddee ttrraannssmmiissssiioonn

  Malheureusement, nous connaissons seulement (dans la chaîne de
  transmission) quelle est l'interface externe. Ainsi, pour se
  représenter de quelle interface vient le paquet, nous utilisons
  l'adresse source (l'anti-spoofing évite les problèmes liés aux
  adresses).



  Notez que nous enregistrons tout ce qui ne vérifie aucune de ces
  règles (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





  77..44..22..  DDééffiinniirr llaa cchhaaîînnee iiccmmpp--aacccc

  Les paquets correspondant à l'une des erreurs ICMP sont acceptés,
  sinon le contrôle les rendra à la chaîne 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





  77..44..33..  BBoonn ((iinntteerrnnee)) vveerrss ZZDDMM ((sseerrvveeuurrss))

  Restrictions internes :

  ·  Autorise WWW, ftp, traceroute, ssh vers l'extérieur

  ·  AAuuttoorriissee llee SSMMTTPP vveerrss llee sseerrvveeuurr mmaaiill

  ·  AAuuttoorriissee llee PPOOPP33 vveerrss llee sseerrvveeuurr mmaaiill

  ·  AAuuttoorriissee lleess rreeqquuêêtteess DDNNSS vveerrss llee sseerrvveeuurr ddee nnoomm

  ·  AAuuttoorriissee llee rrssyynncc vveerrss llee sseerrvveeuurr wweebb

  ·  AAuuttoorriissee llee WWWWWW vveerrss llee sseerrvveeuurr wweebb

  ·  Autorise le ping vers le filtre de paquets

  On pourrait utiliser le camouflage du réseau interne vers la ZDM, mais
  ici nous ne le ferons pas. Puisque personne du réseau interne ne
  devrait tenter de choses démoniaques, 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





  77..44..44..  MMaauuvvaaiiss ((eexxttéérriieeuurr)) vveerrss ZZDDMM ((sseerrvveeuurrss))


  ·  Restrictions de la ZDM :

  ·  Serveur mail :

  ·  SSMMTTPP vveerrss ll''eexxttéérriieeuurr

  ·  AAcccceeppttee llee SSMMTTPP vveennaanntt de l'intérieur et eexxttéérriieeuurr

  ·  Accepte le POP3 de l'intérieur

  ·  Serveur de noms :

  ·  EEnnvvooii ddee rreeqquuêêtteess DDNNSS vveerrss ll''eexxttéérriieeuurr

  ·  AAcccceeppttee llee DDNNSS vveennaanntt de l'intérieur, eexxttéérriieeuurr et du filtre de
     paquets

  ·  Serveur web :

  ·  AAcccceeppttee lleess rreeqquuêêtteess HHTTTTPP vveennaanntt ddee l'intérieur et de ll''eexxttéérriieeuurr

  ·  Accès rsync de l'intérieur


  ·  Les trucs à autoriser du réseau extérieur 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





  77..44..55..  BBoonn ((iinnttéérriieeuurr)) vveerrss MMaauuvvaaiiss ((eexxttéérriieeuurr))..


  ·  Restrictions internes :

  ·  AAuuttoorriissee llee WWWWWW,, ffttpp,, ttrraacceerroouuttee,, sssshh vveerrss ll''eexxttéérriieeuurr


  ·  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'intérieur vers
     les réseaux extérieurs, puis ajoutent des restrictions. Nous sommes
     fascistes.

  ·  Enregistre les violations.

  ·  Le ftp passif est géré 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





  77..44..66..  ZZDDMM vveerrss BBoonn ((iinnttéérriieeuurr))



  ·  Restrictions internes :

  ·  Autorise WWW, ftp, traceroute, ssh vers l'extérieur

  ·  AAuuttoorriissee SSMMTTPP vveerrss llee sseerrvveeuurr mmaaiill

  ·  AAuuttoorriissee PPOOPP33 vveerrss llee sseerrvveeuurr mmaaiill

  ·  AAuuttoorriissee DDNNSS vveerrss llee sseerrvveeuurr ddee nnoommss

  ·  AAuuttoorriissee rrssyynncc vveerrss llee sseerrvveeuurr wweebb

  ·  AAuuttoorriissee WWWWWW vveerrss llee sseerrvveeuurr wweebb

  ·  Autorise ping vers le filtre de paquets


  ·  Si nous camouflions le réseau intérieur 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





  77..44..77..  ZZDDMM vveerrss MMaauuvvaaiiss ((eexxttéérriieeuurr))



  ·  Restrictions de la ZDM :

  ·  Serveur mail

  ·  SSMMTTPP vveerrss ll''eexxttéérriieeuurr

  ·  AAcccceeppttee SSMMTTPP vveennaanntt ddee l'intérieur et de ll''eexxttéérriieeuurr

  ·  Accepte POP3 venant de l'intérieur


  ·  Serveur de noms

  ·  EEnnvvooii ddee rreeqquuêêtteess DDNNSS vveerrss ll''eexxttéérriieeuurr

  ·  AAcccceeppttee llee DDNNSS ddee l'intérieur, ll''eexxttéérriieeuurr et du filtre de paquets


  ·  Serveur web

  ·  AAcccceeppttee HHTTTTPP vveennaanntt ddee l'intérieur et de ll''eexxttéérriieeuurr

  ·  Accès rsync de l'intérieur


  ·


       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





  77..44..88..  MMaauuvvaaiiss ((eexxttéérriieeuurr)) vveerrss BBoonn ((iinnttéérriieeuurr))



  ·  Nous n'autorisons rien (de non camouflé) à passer du réseau
     extérieur vers le réseau intérieur.


       ipchains -A mauvais-bon -j REJECT


  77..44..99..  FFiillttrraaggee ddee ppaaqquueettss ppoouurr llaa mmaacchhiinnee LLiinnuuxx eellllee--mmêêmmee



  ·  Si nous désirons utiliser le filtrage de paquets sur les paquets
     arrivant sur la machine elle-même, nous devons filtrer la chaîne
     d'entrée.  Nous créons une chaîne pour chaque interface de
     destination :


       ipchains -N mauvais-if
       ipchains -N zdm-if
       ipchains -N bon-if





  ·  Créons 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





  77..44..99..11..  IInntteerrffaaccee MMaauuvvaaiiss ((eexxttéérriieeuurr))



  ·  Machine de filtrage des paquets :

  ·  PPIINNGG ttoouuss lleess rréésseeaauuxx

  ·  TTRRAACCEERROOUUTTEE ttoouuss lleess rréésseeaauuxx

  ·  Accès DNS


  ·  L'interface extérieure reçoit aussi des réponses aux paquets
     camouflés, les erreurs ICMP leur correspondant et les réponses
     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





  77..44..99..22..  IInntteerrffaaccee ZZDDMM



  ·  Restrictions du filtre de paquets :

  ·  PPIINNGG ttoouuss lleess rréésseeaauuxx

  ·  TTRRAACCEERROOUUTTEE ttoouuss lleess rréésseeaauuxx

  ·  AAccccèèss DDNNSS


  ·  L'interface ZDM reçoit les réponses 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





  77..44..99..33..  IInntteerrffaaccee BBoonn ((iinnttéérriieeuurr))



  ·  Restrictions du filtre de paquets

  ·  PPIINNGG ttoouuss lleess rréésseeaauuxx

  ·  TTRRAACCEERROOUUTTEE ttoouuss lleess rréésseeaauuxx

  ·  AAccccèèss DDNNSS


  ·  Restrictions intérieures :

  ·  Autorise WWW, ftp, traceroute, ssh vers l'extérieur

  ·  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

  ·  AAuuttoorriissee ppiinngg vveerrss llee ffiillttrree ddee ppaaqquueettss


  ·  L'interface intérieure reçoit les pings, les réponses 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




  77..55..  FFiinnaalleemmeenntt


  ·  Supprime les règles de bloquage :


       ipchains -D input 1
       ipchains -D forward 1
       ipchains -D output 1





  88..  AAnnnneexxee :: ddiifffféérreenncceess eennttrree iippcchhaaiinnss eett iippffwwaaddmm

  Quelques-uns de ces changements sont le résultat de changements du
  noyau, et quelques autres sont un résultat des différences entre
  ipchains et ipfwadm.



  1. De nombreux arguments ont été modifiés : les majuscules indiquent
     dorénavant une commande, et les minuscules indiquent une option.

  2. Les chaînes arbitraires sont supportées, ainsi même les chaînes
     intégrées ont des noms complets plutôt que des options (càd,
     "input" à la place de "-I").

  3. L'option "-k" a sauté : utilisez "! -y".

  4. L'option "-b" insère/ajoute/supprime actuellement deux règles,
     plutôt qu'une règle "bidirectionnelle" simple.

  5. L'option "-b" peut être passée à "-C" pour effectuer deux
     vérifications (une dans chaque direction).

  6. L'option "-x" de "-l" a été remplacée par "-v".

  7. Les ports sources et destinations multiples ne sont plus supportés.
     Heureusement, la possibilité d'employer un intervalle de port aura
     le même effet.

  8. Les interfaces peuvent seulement être spécifiées par leur nom (pas
     par leurs adresses). L'ancienne sémantique a été silencieusement
     changée dans la série des noyaux 2.1, de toute manière.

  9. Les fragments sont examinés, mais pas automatiquement autorisés.

  10.
     On s'est débarrassé des chaînes de comptage explicites.

  11.
     On peut écrire des règles qui porteront uniquement sur certains
     protocoles IP.

  12.
     L'ancien comportement de vérification de SYN et ACK (qui était
     auparavant ignoré pour les paquets non TCP) a changé ; l'option SYN
     n'est plus valide pour les règles non spécifiques 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 dorénavant supportée.

  15.
     Les codes ICMP sont maintenant supportés.

  16.
     Les interfaces joker sont maintenant supportées.

  17.
     Les manipulations de TOS sont maintenant vérifiées : l'ancien code
     du noyau les stoppait silencieusement pour vous en manipulant
     (illégalement) le bit TOS "Must Be Zero" ; ipchains retourne
     maintenant une erreur si vous essayez, de même que pour d'autres
     cas illégaux.


  88..11..  GGuuiiddee ddee rrééfféérreennccee rraappiiddee

  [ Dans l'ensemble, les arguments des commandes sont en MAJUSCULES, et
  les options des arguments sont en minuscules ]


  Une chose à noter, le camouflage est spécifié par "-j MASQ" ; ceci est
  complètement différent de "-j ACCEPT", et n'est pas traité comme un
  effet de bord, au contraire d'ipfwadm.








































  ===========================================================================
  | ipfwadm      | ipchains              | Notes
  ---------------------------------------------------------------------------
  | -A [both]    | -N acct               | Crée une chaîne "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 règle sans destination
  ---------------------------------------------------------------------------
  | -A out       | output                | Une règle sans destination
  ---------------------------------------------------------------------------
  | -F           | forward               | Utilise ça comme [chaîne].
  ---------------------------------------------------------------------------
  | -I           | input                 | Utilise ça comme [chaîne].
  ---------------------------------------------------------------------------
  | -O           | output                | Utilise ça comme [chaîne].
  ---------------------------------------------------------------------------
  | -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                    | Dorénavant crée deux règles.
  ---------------------------------------------------------------------------
  | -e           | -v                    |
  ---------------------------------------------------------------------------
  | -k           | ! -y                  | Ne fonctionne pas à moins que
  |              |                       | -p tcp ne soit également spécifié.
  ---------------------------------------------------------------------------
  | -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 spécifié.
  ---------------------------------------------------------------------------




  88..22..  EExxeemmpplleess ddee ccoommmmaannddeess iippffwwaaddmm ttrraadduuiitteess

  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 spécification des
  interfaces par leur adresse : utilisez le nom de l'interface. Sur
  cette machine, 10.1.2.1 correspond à eth0).


  99..  AAnnnneexxee :: uuttiilliisseerr llee ssccrriipptt iippffwwaaddmm--wwrraappppeerr

  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 utilisée, un avertissement est affiché. Si
  l'option "-W" est également utilisée, l'option "-V" est ignorée.
  Autrement, le script essaye de trouver le nom de l'interface associée
  à cette adresse, en utilisant ifconfig. Si ça ne marche pas (comme
  pour une interface désactivée), 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
  problème : 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 mélange d'ipchains avec le script ipfwadm-wrapper se fait à votre
  propre péril.
  1100..  AAnnnneexxee :: rreemmeerrcciieemmeennttss

  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 idée de cache des résultats, qu'Alan Cox a proposé plus
  tard et que j'ai finalement commencé à implémenter, ayant vu l'erreur
  de mon côté.


  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, spécialement Jos
  Vos.  Rester aux chevilles des géants 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 Française par Grégory Lajon glajon@mail.dotcom.fr
  v2.3, 06 Mai 1998

  Ce document tente de décrire comment obtenir, installer et configurer
  différents outils existant pour le système d'exploitation Linux util­
  isant le support du protocole IPX du noyau.
  ______________________________________________________________________

  Table des matières























































  1. Introduction

     1.1 Changements par rapport à la version précédente
     1.2 Introduction

  2. Responsabilité vis à vis de ce document

  3. Documentation sur le même sujet

     3.1 Nouvelles versions de ce document
     3.2 Votre avis
     3.3 Liste de diffusion

  4. Quelques termes utilisés dans ce document

  5. Une brève discussion sur la topologie des réseaux IPX

  6. Les fichiers relatifs à IPX dans le répertoire

  7. Les outils IPX de Greg Page

     7.1 Les outils IPX en détails

  8. Configurer votre machine Linux comme routeur IPX

     8.1 Dois-je utiliser un réseau interne ?

  9. Configurer votre machine Linux en client NCP

     9.1  Comment récupérer
     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 Possibilités offertes par
        10.1.2 Obtenir
        10.1.3 Compiler l'ensemble
     10.2 L'ensemble
        10.2.1 Possibilités offertes par
        10.2.2 Récupérer
        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 Prérequis
     12.2 Configuration

  13. Un aperçu 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 Première é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 Récupérer
     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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ceci est l'IPX-HOWTO. Il est conseillé de lire le NET-3-HOWTO de Linux
  en parallèle avec ce document.


  11..11..  CChhaannggeemmeennttss ppaarr rraappppoorrtt àà llaa vveerrssiioonn pprrééccééddeennttee

  Changement d'auteur:
  Un grand merci à Terry Dawson pour avoir transmis ce document et
  félicitations pour être devenu papa.
  Ajouts :
  beaucoup de questions déroutantes 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 brevetées.  Ajout du support des droits
  d'accès dans mars_nwe. Toujours en beta test.


  11..22..  IInnttrroodduuccttiioonn

  Comparé aux autres systèmes d'exploitation de la famille Un*x, le
  noyau de Linux possède une toute nouvelle implémentation de la partie
  réseau.  Cette nouvelle approche de développement des logiciels réseau
  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 gérés par d'autres logiciels comme nous le verrons plus
  loin dans ce document.

  La gestion du protocole IPX a été initialement développée par Alan Cox
  <alan@lxorguk.ukuu.org.uk>, puis a été amélioré par Greg Page
  <greg@caldera.com>.






  22..  RReessppoonnssaabbiilliittéé vviiss àà vviiss ddee ccee ddooccuummeenntt

  Je ne sais et ne peux connaître tout ce qu'il y a à savoir sur la
  partie logiciel réseau 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 côté 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 cités dans ce document ou moi-
  même n'offrons de protection contre ce que vous faites. Si vous
  utilisez ce logiciel, même de la façon décrite dans ce document, et
  que cela cause des problèmes sur votre réseau, alors vous seul en
  endosserez la responsabilité.  J'ai inclus cet avertissement parce que
  la mise en oeuvre et la configuration d'un réseau IPX n'est pas
  toujours aisée et que cela peut engendrer d'indésirables 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 leçon de la
  manière douloureuse me l'a demandé.

  NdT : Le traducteur, qui n'est pas un spécialiste des réseaux
  Netware(tm), émet les mêmes réserves que l'auteur.




  33..  DDooccuummeennttaattiioonn ssuurr llee mmêêmmee ssuujjeett

  Ce document présume que vous savez compiler un noyau Linux avec les
  options réseau appropriées et que vous savez vous servir des outils de
  configuration de base des réseaux 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 présent document y fait référence.

  Les autres documents HOWTO de Linux qui pourraient vous être utiles
  sont :

  L'Ethernet-HOWTO <Ethernet-HOWTO.html> qui décrit en détail la manière
  de configurer un port Ethernet pour Linux.

  Le PPP-HOWTO <PPP-HOWTO.html> puisque la gestion d'IPX est implémentée
  à partir de la version 2.2.0d de PPP pour Linux.



  33..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Si votre copie de ce document date de plus de deux mois, je vous
  recommande fortement d'obtenir une version plus récente. Les supports
  réseau pour Linux changent très rapidement avec de nouvelles fonctions
  et améliorations, en conséquence de quoi ce document change lui aussi
  fréquemment. La dernière 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 auprès 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 française initialement traduite par Jean-Christophe
  Arnu est disponible de la même manière :

  lip6 <ftp://ftp.lip6.fr/pub/Linux/french/docs/HOWTO/IPX-HOWTO.gz>


  33..22..  VVoottrree aavviiss

  Envoyez-moi tout commentaire, améliorations ou suggestions :
  <kevin@pricetrak.com>. Si j'obtiens des retours d'informations
  rapidement je pourrai améliorer ou corriger ce document dans les plus
  brefs délais. Si vous rencontrez un quelconque problème avec ce
  document, veuillez m'en faire part directement par courrier
  électronique car je peux rater des informations postées dans les
  forums de discussion.


  33..33..  LLiissttee ddee ddiiffffuussiioonn

  Il existe une liste dans laquelle on discute des différents logiciels
  IPX pour Linux décrits 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 régulièrement cette liste.

  Cette liste est archivée sur le site www.kin.vslib.cz
  <http://www.kin.vslib.cz/hypermail/linware/>



  44..  QQuueellqquueess tteerrmmeess uuttiilliissééss ddaannss ccee ddooccuummeenntt

  Vous rencontrerez souvent au cours de ce document les termes client et
  serveur. Ce sont des termes spécifiques dont la définition est bien
  connue mais j'ai un peu généralisé leur définition :

     cclliieenntt
        C'est la machine ou le programme qui initie une action ou une
        connexion dans le but de pouvoir utiliser des services ou des
        données.


     sseerrvveeuurr
        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 données.

  Ces définitions ne sont pas très complètes, 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 réellement de client et de serveur.

  Vous lirez aussi les termes suivants :

     BBiinnddeerryy
        La _b_i_n_d_e_r_y est une base de données spécialisée qui stocke sur un
        serveur de fichiers Novell des informations concernant la
        configuration du réseau. 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.
     TTyyppee ddee TTrraammee ((FFrraammee ttyyppee))
        décrit le protocole utilisé pour transporter les paquets de
        données IPX (et IP) à travers vos segments Ethernet.  On en
        rencontre couramment quatre :

        EEtthheerrnneett__IIII
           C'est une version raffinée 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 généralement utilisé dans les
           environnements Novell et c'est un bon choix.

        880022..33
           C'est un protocole IEEE définissant un mécanisme à détection
           de porteuse et accès multiple avec détection 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é conçu
           pour transporter des trames IEEE 802.2 sseeuulleemmeenntt, mais il
           existe des implémentations qui l'utilisent pour transporter
           des trames IPX directement et cela fonctionne quand même.
           Evitez-le à moins de vouloir vous connecter à un réseau déjà
           configuré pour l'utiliser.

        880022..22
           C'est un protocole IEEE qui définit un ensemble de procédures
           de contrôle de la couche liaison logique. Il fournit une
           façon 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 problèmes.

        SSNNAAPP
           SNAP est le protocole d'accès au sous-réseau (Sub Network
           Access Protocol). Ce protocole est implémenté au-dessus de
           802.3 et 802.2. Il étend les capacités multiprotocole de
           802.2 et présente une certaine compatibilité avec les trames
           Ethernet et Ethernet_II existantes.

     IIPPXX
        Internet Packet eXchange est un protocole utilisé par la société
        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.


     AAddrreessssee IIPPXX dd''uunn rréésseeaauu ((IIPPXX nneettwwoorrkk aaddddrreessss))
        Il s'agit d'un nombre qui identifie de manière unique un réseau
        IPX particulier. La notation courante de cette adresse est
        exprimée en hexadécimal. On peut donner comme exemple :
        0x23a91002


     RRéésseeaauu IIPPXX iinntteerrnnee ((IIPPXX IInntteerrnnaall nneettwwoorrkk))
        C'est un réseau IPX virtuel. Il est virtuel car il ne correspond
        à aucun réseau physique. Il est utilisé pour fournir un moyen
        unique d'identifier et d'adresser une machine IPX.  Cette
        adresse est codée de la même manière qu'une adresse IPX de
        réseau. En général, ce n'est utile que pour les machines IPX qui
        sont physiquement connectées à plusieurs réseaux IPX comme les
        serveurs de fichiers.
     RRIIPP
        Routing Information Protocol est un protocole utilisé pour
        informer automatiquement  les différents ordinateurs présents
        sur un réseau IPX des différentes routes qui lui sont
        applicables. Il est fonctionnellement identique au RIP utilisé
        au sein de la communauté TCP/IP.


     NNCCPP
        Netware Core Protocol est un protocole de système de fichiers
        réseau créé par la société Novell pour leur produit NetWare(tm).
        On peut comparer les fonctionnalités de NCP à NFS utilisé par la
        communauté TCP/IP.


     SSAAPP
        Service Advertisement Protocol est un protocole créé par la
        société Novell. Il est utilisé pour avertir des services fournis
        sur le réseau dans un environnement NetWare(tm).


     AAddrreessssee PPhhyyssiiqquuee ((hhaarrddwwaarree aaddddrreessss))
        C'est un nombre qui identifie de manière unique une machine sur
        un réseau physique au niveau de la couche media (couche MAC).
        L'adresse Ethernet en est un exemple.  Une adresse Ethernet est
        généralement codée par six valeurs hexadécimales séparées par
        deux points : ex. 00:60:8C:C3:3C:0F.


     rroouuttee
        La _r_o_u_t_e est le chemin emprunté par les paquets de données au
        travers d'un réseau pour atteindre leur destination.


  55..  UUnnee bbrrèèvvee ddiissccuussssiioonn ssuurr llaa ttooppoollooggiiee ddeess rréésseeaauuxx IIPPXX

  C'est une explication très simplifiée pour les personnes qui
  découvrent IPX.  Les grands réseaux mettront probablement à mal
  beaucoup des règles expliquées ici. Dans les réseaux IPX complexes,
  l'administrateur devrait toujours être consulté.

  Les réseaux IPX s'appuient sur un procédé de _r_é_s_e_a_u_x numérotés, à la
  différence de IP qui insiste plus sur les adresses d'_i_n_t_e_r_f_a_c_e. Un
  réseau est un ensemble d'équipements connectés à un même segment de
  réseau 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 différents sur le même segment de réseau local sont traités
  comme des réseaux séparés.

  Chaque réseau doit recevoir un numéro qui soit unique au travers de
  toute l'interconnexion de réseaux (internetwork). Ceci est
  habituellement réalisé par un serveur Netware(tm), mais peut
  facilement être réalisé par Linux. Les clients IPX recoivent ce numéro
  du serveur lors de leur démarrage, ils ont juste besoin de connaître
  le type de trame correct.

  Le routage entre les réseaux est habituellement réalisé en mettant
  deux cartes réseaux dans un serveur. Ce serveur fait tourner le
  protocole RIP qui maintient une table de routage pour l'interconnexion
  de réseaux. Périodiquement, cette table de routage est échangée 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 définir automatiquement les interfaces en utilisant des requêtes
  de "broadcast" pour rechercher un serveur. Si cela échoue ou que vous
  voulez fournir des services IPX, vous devrez définir les interfaces
  manuellement en utilisant ipx_interface ou mars_nwe.



  66..  LLeess ffiicchhiieerrss rreellaattiiffss àà IIPPXX ddaannss llee rrééppeerrttooiirree //pprroocc

  Il existe un certain nombre de fichiers relatifs au support d'IPX par
  Linux dans le répertoire /proc :


     //pprroocc//nneett//iippxx__iinntteerrffaaccee
        Ce fichier contient des informations au sujet des interfaces IPX
        configurées sur votre machine. Elles peuvent avoir été
        configurées manuellement par commande ou automatiquement
        détectées et configurées.


     //pprroocc//nneett//iippxx__rroouuttee
        Ce fichier contient une liste de routes existantes dans la table
        de routage IPX. Ces routes peuvent avoir été ajoutées à la main
        par l'intermédiaire de commandes ou automatiquement par le démon
        de routage IPX.


     //pprroocc//nneett//iippxx
        Ce fichier contient la liste des sockets IPX qui sont ouverts
        sur la machine au moment de l'édition du fichier.


  77..  LLeess oouuttiillss IIPPXX ddee GGrreegg PPaaggee

  Greg Page <greg@caldera.com> de la société Caldera Incorporated a
  écrit un ensemble d'outils de configuration pour IPX et a amélioré le
  support IPX du noyau Linux.

  Les améliorations du noyau permettent de configurer un système Linux
  comme pont ou routeur IPX parfaitement fonctionnel. Le support d'IPX
  amélioré a déjà été incorporé dans le corps du noyau de distribution.
  Vous en êtes donc certainement équipé.

  Ces outils de configuration  vous permettent de paramétrer vos
  périphériques réseau pour le support d'IPX et de mettre en place le
  routage pour ce protocole. D'autres fonctionnalités 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 connectés en France pourront utiliser un site
  miroir comme ftp.lip6.fr <ftp://ftp.lip6.fr/>


  77..11..  LLeess oouuttiillss IIPPXX eenn ddééttaaiillss


     iippxx__iinntteerrffaaccee
        Cette commande est utilisée pour ajouter, enlever ou contrôler
        manuellement des propriétés d'IPX sur un périphérique réseau
        donné. Ce dernier est souvent un périphérique Ethernet comme
        eth0.  Au moins une interface IPX doit être déclarée comme
        interface _p_r_i_m_a_i_r_e par le paramètre -p suivi du nom de
        l'interface. Par exemple, l'attribution des capacités IPX au
        périphérique eth0, en tant que première interface utilisant le
        type de trame IEEE 802.2 et l'adresse réseau 39ab0222 se fera
        ainsi :


                     # ipx_interface add -p eth0 802.2 0x39ab0222





     Si le type de trame diffère des serveurs NetWare(tm) sur ce réseau,
     ils vous ignoreront délibérement. Si le type de trame est correct,
     mais que le numéro de réseau diffère, ils vous ignoreront encore,
     mais afficheront des messages sur la console du serveur
     Netware(tm). Ce dernier cas vous promet d'avoir des problèmes 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
     démarrer manuellement l'interface eth0 en utilisant la commande :


                          # ifconfig eth0 up






     iippxx__ccoonnffiigguurree
        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 décider si de nouveaux périphériques réseau
           doivent être automatiquement configurés comme des
           périphériques IPX ou pas.

        --auto_primary
           vous accorde le droit de décider si les logiciels IPX doivent
           sélectionner une interface primaire ou non. Des problèmes ont
           été reportés sur l'utilisation de ceci avec des clients
           Windows 95 sur le réseau.

        Par exemple si l'on désire 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





     iippxx__iinntteerrnnaall__nneett
        Cette commande permet de mettre en place, de configurer ou
        retirer une adresse de réseau interne. Cette adresse de réseau
        interne est optionnelle, mais lorsqu'elle est configurée elle
        est toujours considérée comme interface primaire. Pour
        configurer une adresse réseau IPX ayant le numéro ab000000 sur
        le noeud IPX 1 vous devez utiliser:


          # ipx_internal_net add 0xab000000 1



     iippxx__rroouuttee
        Cette commande permet de modifier manuellement la table de
        routage IPX. On peut prendre comme exemple l'ajout d'une route
        vers le réseau IPX 39ab0222 via un routeur ayant le numéro de
        noeud 00608CC33C0F sur le réseau IPX 39ab0108 :


          # ipx_route add 0x39ab0222 0x39ab0108 0x00608CC33C0F





  88..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx ccoommmmee rroouutteeuurr IIPPXX

  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 réseau : d'un côté, les informations de
  routage sur le réseau qui sont propagées en utilisant le RIP Novell,
  de l'autre côté, les informations d'avertissement du système qui sont
  véhiculées par le SAP Novell. Tout routeur doit pouvoir traiter et
  comprendre ces deux types de protocoles pour être utilisé dans toutes
  les situations.

  Linux possède un support pour ces deux protocoles et peut donc être
  aisément configuré pour réaliser un routeur IPX complètement
  compatible Novell.

  Le support IPX du noyau de Linux gère réellement le routage des
  paquets entre les interfaces, mais il le fait selon les règles données
  dans une table de routage. Linux nécessite un programme implémentant
  les protocoles RIP et SAP de Novell afin que la table de routage soit
  correctement construite et maintenue périodiquement, pour qu'elle
  reflète bien les changements d'état du réseau.

  Volker Lendecke <lendecke@namu01.gwdg.de> a développé un démon 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 démon 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 opération très
  linéaire. Procédez comme suit :

  1. Construisez le noyau avec les supports d'IPX, d'Ethernet et le
     système de fichiers /proc

  2. Procurez-vous, compilez et installez le démon _i_p_x_d.

  3. Redémarrez la machine avec son nouveau noyau et assurez-vous que
     chacune des cartes Ethernet ont été correctement détectées et qu'il
     n'y a pas de conflits matériels.

  4. Mettez en place le protocole IPX sur chacune des interfaces en
     utilisant la commande ipx_interface décrite ci-dessus.

  5. Lancez le démon _i_p_x_d.

     En considérant le simple réseau 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 réseau 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 vérifier le fichier
  /proc/net/ipx_route (cat /proc/net/ipx_route). Vous devriez retrouver
  les routes IPX inhérentes à votre configuration du système et toutes
  les configurations apprises par le contact avec les autres routeurs
  sur le réseau le cas échéant.


  88..11..  DDooiiss--jjee uuttiilliisseerr uunn rréésseeaauu iinntteerrnnee ??

  Novell a une fonctionnalité appelée réseau interne, qui est utilisée
  pour simplifier le routage lorsqu'une machine est connectée à plus
  d'un périphérique réseau. C'est utile dans le cas d'un serveur de
  fichiers connecté à plusieurs réseaux, en ce sens qu'une seule route
  doit être utilisée pour atteindre le serveur, quel que soit le réseau
  à partir duquel on opère.


  Dans le cas d'une configuration où vous ne faîtes pas tourner un
  serveur de fichiers mais seulement un routeur IPX, il n'est pas simple
  de répondre.  Des témoignages rapportent que l'utilisation de IPX/PPP
  marche "mieux" si vous utilisez également un réseau interne.


  Dans tous les cas, c'est facile à faire, mais cela peut nécessiter de
  recompiler le noyau. Lorsque vous en êtes au make config du noyau,
  vous devez répondre Oui (y) à la question Full internal IPX network
  comme suit :


             ...
             ...
             Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] y
             ...
             ...




  Pour configurer le réseau interne, utilisez la commande
  _i_p_x___i_n_t_e_r_n_a_l___n_e_t déjà décrite dans la section outils IPX.  La
  principale précaution à prendre est de s'assurer que l'adresse IPX
  réseau que vous choisissez est unique sur votre réseau et qu'aucune
  autre machine ou réseau ne l'utilise.


  99..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx eenn cclliieenntt NNCCPP


  Si vous êtes un utilisateur d'un réseau hétérogène où les protocoles
  IP et IPX sont utilisés, il est probable que vous ayez à un moment ou
  à un autre, besoin d'accéder à partir de votre machine Linux, à des
  données stockées sur un serveur de fichier Novell de ce réseau. Novell
  a longtemps proposé un ensemble logiciel NFS pour leurs serveurs de
  fichiers qui permettaient cet accès. Cependant si le site auquel vous
  êtes connecté est petit, le nombre de personnes nécessitant cet type
  d'accès ne justifie peut-être pas l'achat de ces outils logiciels
  commerciaux.

  Volker Lendecke <lendecke@namu01.gwdg.de> a écrit un module du système
  de fichiers du noyau Linux supportant un sous-ensemble limité du
  protocole Novell NCP qui permet de monter une partition Novell dans
  votre système 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é réalisé à partir
  des informations tirées principalement du livre
  "Netzwerkprogrammierung in C" de Manfred Hill et Ralf Zessin (de plus
  amples informations sont données 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 supérieurs, 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 réellement 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
  préférable 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 très récent de _n_c_p_f_s et est
  toujours en version bêta. De plus son utilisation peut être interdite
  dans votre pays en raison de l'inclusion de technologie soumise à
  brevet.



  99..11..  CCoommmmeenntt rrééccuuppéérreerr nnccppffss

  L'ensemble _n_c_p_f_s a été développé afin d'être compilé avec les noyaux
  de Linux version 1.2.13 ou plus récents 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> décrit
  comment faire cela en détail.
  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.


  99..22..  CCoommppiilleerr nnccppffss  ppoouurr lleess nnooyyaauuxx 11..22..1133


     CCoommppiilleerr uunn nnooyyaauu LLiinnuuxx aavveecc lleess ssuuppppoorrttss dd''EEtthheerrnneett eett IIPPXX
        La première chose que vous ayez à faire est de vérifier que
        votre noyau a été compilé avec l'option IPX. Dans la version
        1.2.13 du noyau, vous vous assurerez que la réponse à 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 vérifier que vous avez inclus le gestionnaire
     approprié pour votre carte Ethernet. Si vous ne savez pas comment
     procéder, je vous conseille de lire l'Ethernet-HOWTO Ethernet-HOWTO
     <Ethernet-HOWTO.html>.


     Vous pourrez alors procéder à la compilation. Je vous rappelle que
     le lancement de _l_i_l_o pour installer le nouveau noyau est
     obligatoire une fois la compilation terminée.


     DDééccoommpprreesssseerr lleess pprrooggrraammmmeess _n_c_p_f_s

                # cd /usr/src
                # tar xvfz ncpfs-2.0.11.tgz
                # cd ncpfs



     VVéérriiffiieerr llee MMaakkeeffiillee
        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
        décommenter la ligne du Makefile qui fait référence à 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.


     CCoommppiilleerr lleess oouuttiillss _n_c_p_f_s
        Le logiciel doit se compiler proprement sans qu'une
        configuration ne soit nécessaire :

                # make





     CCooppiieerr lleess oouuttiillss IIPPXX àà uunn eennddrrooiitt uuttiillee ddee vvoottrree aarrbboorreesscceennccee
        Après cette compilation, vous trouverez tous les outils dont
        vous aurez besoin dans le répertoire ncpfs/bin.  Vous pouvez
        utiliser



                   # make install




     pour installer les outils dans le choix de répertoires de Volker.
     Si votre système est basé sur ELF, alors vous devrez taper ldconfig
     -v pour vous assurer que la bibliothèque partagée est accessible.


     CCooppiieerr llee mmoodduullee _n_p_f_s_._o àà uunn eennddrrooiitt aapppprroopprriiéé ssii nnéécceessssaaiirree..
        Après la compilation d'un noyau 1.2.x, vous trouverez aussi dans
        le répertoire 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 répertoire /lib/modules/1.2.13/fs et j'ai
        ajouté ncpfs dans le fichier /etc/modules de manière à ce qu'il
        soit automatiquement chargé lors du démarrage de Linux. Si vous
        utilisez d'autres distributions, vous devrez trouver où les
        modules sont généralement placés et copier le fichier ncpfs.o à
        cet endroit, ou sinon, copiez-le dans le répertoire /etc.
        Utilisez la commande suivante afin de charger le module en
        mémoire manuellement :

                # insmod ncpfs.o





  99..33..  CCoommppiilleerr nnccppffss  ppoouurr ddeess nnooyyaauuxx 11..33..7711++++//22..00..**

  Pour la dernière version de _n_c_p_f_s, vous devez utiliser un noyau 1.3.71
  ou supérieur, 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'à répondre 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 créer les outils IPX, mais il n'y aura pas de module à
  installer.

  99..44..  CCoonnffiigguurreerr eett uuttiilliisseerr nnccppffss


     CCoonnffiigguurreerr lleess llooggiicciieellss ddee rréésseeaauu IIPPXX
        Deux moyens sont possibles pour configurer ceux-ci. Vous pouvez
        tout faire manuellement ou vous pouvez laisser le logiciel
        déterminer lui-même ses paramètres 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" située plus
     loin dans ce document pour configurer manuellement les logiciels.
     Des problèmes ont été rapportés concernant cette utilisation au
     sein de réseaux contenant des clients Windows95.


     TTeesstteerr llaa ccoonnffiigguurraattiioonn
        Maintenant que votre réseau IPX est configuré, vous devriez être
        capable d'exécuter la commande _s_l_i_s_t qui vous renverra la liste
        de tous les serveurs de fichiers Novell de votre réseau :


                # slist


     Si la commande slist affiche un message du type : ncp_connect:
     Invalid argument, cela signifie que votre noyau ne supporte pas
     IPX. Vérifiez que vous avez démarré votre ordinateur avec le noyau
     approprié.  Au démarrage du système, 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
     méthode de configuration manuelle.


     MMoonntteerr uunn vvoolluummee oouu uunn sseerrvveeuurr NNoovveellll((ttmm))
        Si votre logiciel réseau IPX fonctionne correctement, vous
        devriez pouvoir monter un volume du serveur de fichiers dans
        votre système de fichiers Linux.  La commande _n_c_p_m_o_u_n_t est
        utilisée à ces fins et nécessite que vous spécifiez au moins les
        informations suivantes :

        1. le nom du serveur de fichiers ;

        2. (éventuellement) le répertoire 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 système de fichiers du serveur Novell soit monté dans
           votre système de fichiers.  Ce doit être un répertoire déjà
           existant.

        De la même manière, il existe une commande _n_c_p_u_m_o_u_n_t pour démon­
        ter un système de fichiers NCP monté. Le système de fichiers NCP
        sera démonté 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 systèmes 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 possède pas de mot de passe,
        dans le répertoire /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 nécessaire pour se loguer. Le même login avec le mot de
     passe secret ressemblera à :

          # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -P secret


     Si vous ne spécifiez ni l'option -n ni l'option -P, le système vous
     demandera un mot de passe.



     VVéérriiffiieerr llee mmoonnttaaggee
        Si le montage est réussi, vous pourrez accéder à tous les
        volumes auxquels l'utilisateur que vous avez spécifié a accès.
        Cet accès se fait de manière transparente comme si le volume se
        trouvait directement dans le répertoire spécifié lors du
        montage.  Vous devez être capable de naviguer au travers des
        répertoires 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 données au répertoire 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.



     CCoonnffiigguurreerr llee mmoonnttaaggee aauuttoommaattiiqquuee ddeess vvoolluummeess nnccpp
        Si vous avez besoin de monter de manière permanente vos
        partitions ncp, vous aurez à mettre les commandes de
        configuration ci-dessus dans vos fichiers _r_c de manière à ce que
        le montage soit opéré à chaque démarrage de Linux.  Si votre
        distribution ne fournit pas déjà 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 :



                    #
                    # Démarrer le systéme 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

                    # Accéder au volume réservé à 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 spécifiques à l'utilisateur qui seront appliquées sur
     des montages NCP réguliers. Vous pourrez ainsi les monter sans
     avoir à spécifier tous les paramètres à chaque fois.

     Le format de ce fichier est assez simple :


               # Le premier paramètre est le 'serveur préféré'
               # utilisé même si vous ne spécifiez 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
     répertoire /home/terry/docs.  Vous remarquerez que cette commande a
     été choisie car aucun serveur de fichiers n'a été spécifié dans la
     commande de montage. Si la commande suivante avait été utilisée :


                    $ ncpmount -S ACCT_FS01 /home/terry/docs




     vous seriez entré sur le serveur de fichiers ACCT_FS01 avec le
     compte GUEST.

     NNoottee :: Pour que ce mécanisme 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
     mécanisme, 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





     TTeesstteerr ll''uuttiilliittaaiirree nnsseenndd
        _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 manière suivante :


                  # nsend pierre coucou ici




     qui va envoyer le message "coucou ici" à un utilisateur "pierre"
     déjà logué sur votre serveur de fichiers "primaire" (le premier qui
     apparaît dans votre fichier .nwclient). Vous pouvez spécifier un
     autre serveur de fichiers avec la même syntaxe que la commande
     _n_c_p_u_m_o_u_n_t.



  1100..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx eenn sseerrvveeuurr NNCCPP

  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 systèmes 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.



  1100..11..  LL''eennsseemmbbllee mmaarrss__nnwwee

  Martin Stover <mstover@freeway.de> a développé _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".


  1100..11..11..  PPoossssiibbiilliittééss ooffffeerrtteess ppaarr mmaarrss__nnwwee

  _m_a_r_s___n_w_e fournit un sous-ensemble de la spécification 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.


  1100..11..22..  OObbtteenniirr mmaarrss__nnwwee

  Vous pouvez récupérer _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.


  1100..11..33..  CCoommppiilleerr ll''eennsseemmbbllee mmaarrss__nnwwee


     CCoommppiilleerr uunn nnooyyaauu LLiinnuuxx ssuuppppoorrttaanntt EEtthheerrnneett eett IIPPXX..
        Dans la version 1.2.13 du noyau, vous devrez juste vérifier que
        vous avez répondu 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 récents, un procédé similaire est utilisé lors
     de la construction du noyau. La question posée peut légèrement
     changer.


     Assurez-vous aussi d'un choix approprié pour votre carte Ethernet.
     Si vous ne savez pas comment procéder, vous devriez lire
     l'Ethernet-HOWTO, Ethernet-HOWTO <Ethernet-HOWTO.html>.


     Vous pouvez maintenant procéder à 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.


     DDééccoommpprreesssseerr llee ppaaqquueettaaggee _m_a_r_s___n_w_e..


                    # cd /usr/src
                    # tar xvfz mars_nwe-0.99.pl10.tgz





     CCoommppiilleerr _m_a_r_s___n_w_e..
        Cette opération est très simple.  La première étape consiste
        simplement à lancer make, cela va vous créer un fichier
        config.h. Ensuite, vous devez regarder et modifier le fichier
        config.h si nécessaire. Cela vous permet de configurer des
        choses comme le répertoire 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 exécutable
        PATHNAME_BINDERY      l'endroit où iront les fichiers de la 'bindery'
        PATHNAME_PIDFILES     le répertoire où les fichiers PID seront écrits
        MAX_CONNECTIONS       le nombre maxi de connexions simultanées autorisées
        MAX_NW_VOLS           le nombre maxi de volumes supportés 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 défaut devraient vous convenir mais vérifiez quand
     même.

     Une fois ceci terminé tapez :


                    # make
                    # make install


     Ces commandes compileront les différents serveurs et les
     installeront dans un répertoire approprié. Le script d'installation
     installe aussi le fichier de configuration /etc/nwserv.conf.


     CCoonnffiigguurraattiioonn dduu sseerrvveeuurr..
        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 délimitée par le caractère espace et
        débute par un nombre qui indique le contenu de la ligne. Tous
        les caractères précédés du caractère '#' sont considérés comme
        étant un commentaire et de ce fait sont ignorés. Martin fournit
        un fichier d'exemple de configuration dans son paquetage,
        cependant, je vous donne ce que je considère comme étant une
        version simplifiée de ce fichier, et ce, afin que vous puissiez
        mieux le comprendre.
















































          # VOLUMES (max. 5)
          # Seul le volume SYS est obligatoire. Le répertoire contenant le volume
          # SYS doit contenir les répertoires : LOGIN, PUBLIC, SYSTEM, MAIL.
          # l'option 'i' ignore la casse (majuscules/minuscules)
          # l'option 'k' convertit toutes les requêtes 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 système de fichiers monté unique
          # l'option 'P' permet aux commandes d'être utilisées 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 défaut 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 réseau interne est une fonctionnalité qui simplifie
          # le routage IPX pour les machines reliées à plusieurs réseaux IPX.
          # Syntaxe :
          #    3 <adresse interne du réseau> [<Numéro de noeud>]
          # ou
          #    3 auto
          # si vous utilisez 'auto' alors l'adresse IP de la machine sera
          # utilisée. NOTE : cela peut être dangereux, assurez-vous de prendre
          # un nombre unique sur votre réseau. Les adresses sont codées en
          # hexadécimal sur 4 octets (le préfixe 0x est obligatoire).
          3 0x49a01010 1

          # PERIPHERIQUES RESEAU
          # Cette option configure votre réseau IPX. Si votre réseau IPX est déjà
          # configuré, vous n'en aurez pas besoin.
          # Syntaxe
          #    4 <Numéro de reseau IPX> <Nom de périphérique> <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 chiffrés.
          #    7 permet les mdp non chiffrés mais pas les mdp nuls.
          #    8 permet les mdp non chiffrés ainsi que les mdp nuls.
          #    9 seulement les mdp non chiffrés (ne marche pas avec OS/2).

          7 1

          # DROITS MINIMUM EN FONCTION DES GID ET UID
          # Les permissions qui sont appliquées lors de connexions sans login
          # Ces permissions seront utilisées pour les fichiers
          # de votre serveur primaire.
          # Syntaxe :
          #    10 <gid>
          #    11 <uid>
          #    <gid> <uid> sont ceux donnés dans /etc/passwd et /etc/group

          10  200
          11  201

          # MOT DE PASSE DU SUPERVISEUR
          # Doit etre enlevé après le premier démarrage du serveur. Le serveur
          # cryptera cette information dans le fichier de bindery après son
          # lancement. Vous devriez éviter d'utiliser le compte 'root' et en choisir
          # un autre pour administrer le serveur mars.
          #
          # Cette entrée est lue et chiffrée dans le fichier de bindery du serveur,
          # elle n'a donc besoin d'être présente que la première fois que vous
          # démarrez 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 configurés de cette
          # façon devront utiliser le mot de passe fourni ici.
          # Je vous déconseille de l'utiliser à moins que la sécurité ne fasse pas
          # partie de vos préoccupations.
          # Syntaxe :
          #    15 <drapeau> <mot de passe commun>
          # avec <drapeau> :
          #    0  - ne configure aucun utilisateur automatiquement.
          #    1  - configure automatiquement les utilisateurs non encore configurés.
          #    99 - configure automatiquement tous les utilisateurs.

          15 0 duzzenmatta
          # VERIFICATION SIMPLE
          # mars_nwe s'assurera automatiquement que certains répertoires existent
          # si vous positionnez ce drapeau.
          # Syntaxe :
          #    16 <drapeau>
          # avec <drapeau> à 0 pour non, ne fait rien et 1 pour oui, vérifie.

          16 0

          # QUEUES D'IMPRESSION
          # Permet d'associer des imprimantes Netware à des imprimantes UNIX. Les
          # répertoires de files d'impression doivent être crées manuellement
          # avant de tenter toute impression.
          # Syntaxe :
          #    21 <Nom de queue> <répertoire 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 nécessaires, mais ils peuvent être utiles
          # pour la résolution de problèmes.
          # Syntaxe :
          #    <élément de débogage> <drapeau de debogage>
          #
          #    100 = IPX KERNEL
          #    101 = NWSERV
          #    102 = NCPSERV
          #    103 = NWCONN
          #    104 = démarrage NWCLIENT
          #    105 = NWBIND
          #    106 = NWROUTED
          #                 0 = supprime le débogage, 1 = active le débogage

          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 tâche 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 délai entre l'affichage d'extinction du serveur et
          # l'extinction réelle du serveur
          # Syntaxe :
          #    210 <temps>
          #        en secondes (par défaut 10)

          210  10

          # INTERVALLE ENTRE LES DIFFUSIONS DE ROUTAGE
          # la durée en secondes entre les diffusions (broadcast) de serveurs
          # Syntaxe :
          #    211 <temps>
          #        en secondes (par défaut : 60)

          211 60

          # INTERVALLE ENTRE LES LOGS DE ROUTAGE
          # configure le nombre de diffusions après 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 réecrire.
          # Syntaxe :
          #    302 <drapeau>
          #    avec <drapeau> à 0 pour l'ajout et à 1 pour création/écrasement

          302 1

          # MINUTAGE DU CHIEN DE GARDE (watchdog)
          # Configure les intervalles de temps entre les messages de garde pour
          # s'assurer que le réseau 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 réseau chute en dessous
          #           de 'n' ticks.

          310 7

          # FICHIER DE STATIONS
          # configure le nom du fichier qui détermine les machines pour lesquelles
          # ce serveur de fichiers sera le serveur primaire.
          # La syntaxe de ce fichier est décrite dans le répertoire 'examples'
          # du code source.
          # Syntaxe :
          #    400 <nom de fichier>

          400 /etc/nwserv.stations

          # OBTENTION DU SERVEUR DE FICHIERS LE PLUS PROCHE
          # Configure la manière dont sont gerées les requêtes SAP 'obtention
          # du serveur le plus proche' (Get Nearest Fileserver).
          # Syntaxe :
          #    401 <drapeau>
          # avec <drapeau> =
          #      0 : désactive cette requête
          #      1 : le fichier de stations liste les stations à exclure
          #      2 : le fichier de stations liste les station à inclure

          401 2





     DDéémmaarrrreerr llee sseerrvveeuurr
        Si vous avez configuré le serveur de telle sorte que d'autres
        programmes configurent le réseau et/ou fournissent les fonctions
        de routage, alors vous devez lancer ces programmes avant de
        démarrer le serveur.  Si vous avez configuré le serveur pour
        qu'il configure vos interfaces et fournisse des services de
        routage, alors pour démarrer le serveur, il n'y a qu'à taper :




                  # nwserv





     TTeesstteerr llee sseerrvveeuurr
        Pour tester le serveur vous devrez tout d'abord essayer de vous
        connecter et entrer par login grâce à un client Netware sur
        votre réseau. Vous pouvez alors faire un CAPTURE à partir de
        votre client et essayer d'imprimer. Si ces deux actions sont
        couronnées de succès, votre serveur fonctionne.


  1100..22..  LL''eennsseemmbbllee llwwaarreedd

  Ales Dryak <A.Dryak@sh.cvut.cz> a développé _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'abréviation de _L_i_n_W_a_r_e _D_a_e_m_o_n.


  1100..22..11..  PPoossssiibbiilliittééss ooffffeerrtteess ppaarr llwwaarreedd

  Le serveur _l_w_a_r_e_d est capable de fournir un sous-ensemble de services
  d'un serveur Novell NCP. Le système de messageries a été inclus mais
  il ne fournit pas de facilités 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 extérieurs 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.


  1100..22..22..  RRééccuuppéérreerr llwwaarreedd

  Le paquetage _l_w_a_r_e_d peut être construit pour n'importe quel noyau
  supérieur  à la version 1.2.0, je vous recommande d'utiliser la
  version 1.2.13 pour laquelle aucun patch sur le noyau n'est
  nécessaire. Certaines fonctionnalités ont changé avec la version 1.3.*
  du noyau, ce qui signifie que des patchs sont nécessaires pour ces
  versions afin de faire fonctionner ce serveur de manière correcte. Des
  patchs appropriés 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


  1100..22..33..  CCoommppiilleerr eett iinnssttaalllleerr llwwaarreedd


     DDééccoommpprreesssseerr ll''eennsseemmbbllee _l_w_a_r_e_d
        Ce qui devrait ressembler à :

        # cd /usr/src
        # tar xvpfz lwared-0.95.tar.gz




     CCoommppiilleerr llee nnooyyaauu aavveecc llee ssuuppppoorrtt EEtthheerrnneett eett IIPPXX
        Si vous utilisez un noyau alpha 1.3.* vous devriez essayer
        d'utiliser la version 1.3.17 ou une plus récente car les patchs
        fournis ont été faits pour celles-là. Les noyaux 1.3.* plus
        anciens que 1.3.17 nécessiteront d'être modifiés à 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 récent, vous devrez essayer la commande
        suivante :


                # make patch



     La chose suivante que vous devrez faire après avoir appliqué le
     patch, le cas échéant, sera de vérifier que votre noyau a bien été
     compilé avec le support IPX actif. Dans la version 1.2.13, vous
     n'aurez qu'à répondre 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 récents, la question peut varier un peu, mais
     le procédé reste fondamentalement le même.

     Vous devrez également vous assurer du choix approprié du pilote de
     votre carte Ethernet. Si vous ne savez pas comment procéder, je
     vous conseille vivement de vous reporter à Ethernet-HOWTO
     <Ethernet-HOWTO.html>.
     Vous pouvez maintenant procéder à 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é.


     CCoommppiilleerr eett iinnssttaalllleerr _l_w_a_r_e_d
        Pour compiler _l_w_a_r_e_d vous devez en premier lieu vérifier et
        éditer si nécessaire le fichier server/config.h. Ce fichier
        contient les éléments nécessaires pour piloter votre serveur et
        déterminer son comportement lorsqu'il fonctionnera. Le fichier
        par défaut est raisonnablement bien écrit mais vous pourrez tout
        de même vérifier si les répertoires de fichiers de log et le
        fichier de configuration conviennent à votre système.

                # make depend
                # make
                # make install



     Le 'make depend' se plaint de ne pas trouver le fichier float.h sur
     mon système mais cela semble fonctionner tout de même. J'ai aussi
     découvert 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 démons de
     routage dans le répertoire /usr/sbin, le programme _l_w_p_a_s_s_w_d dans le
     répertoire /usr/bin, les programmes utilitaires IPX seront copiés
     dans le répertoire /sbin et les pages de manuel dans la structure
     de répertoire /usr/man. Si un de ces endroits ne correspond pas à
     votre système, vous devrez éditer et modifier les fichiers Makefile
     correspondants.


  1100..22..44..  CCoonnffiigguurreerr eett uuttiilliisseerr llwwaarreedd

  Voici la partie la plus amusante !


     CCoonnffiigguurreerr llee rréésseeaauu IIPPXX
        La première chose à faire est de configurer vos cartes Ethernet
        pour qu'elles puissent supporter les réseaux IPX connectés à
        votre serveur. Vous devez connaître les adresses des réseaux IPX
        pour chacun des segments du réseau, quel périphérique 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 réseau interne votre serveur doit
        utiliser (ce qui est vraiment nécessaire 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 réseau 23a91300 et 23a91301 et ayant une
        adresse de réseau interne bdefaced ressemblera à :
                # ipx_internal_net add BDEFACED 1
                # ipx_interface add eth0 802.3 23a91300
                # ipx_interface add eth1 etherii 23a91301





     DDéémmaarrrreerr lleess ddéémmoonnss ddee rroouuttaaggee
        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 gérer la mise à jour des
        tables de routage. Dans le cas d'IPX, deux démons sont
        nécessaires et tous deux sont fournis avec _l_w_a_r_e_d : _i_p_x_r_i_p_d gère
        l'information de routage IPX et _i_p_x_s_a_p_d gère les informations
        SAP. Pour faire démarrer les démons vous n'aurez qu'à spécifier
        l'endroit où vous voulez qu'ils écrivent les messages de log :

                   # ipxripd /var/adm/ipxrip
                   # ipxsapd /var/adm/ipxsap





     CCoonnffiigguurreerr llee sseerrvveeuurr _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 gardées. 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­
        actère ':' puis de la version encryptée du mot de passe de
        login. Il faut cependant noter deux choses importantes : si les
        mots de passe ne sont pas chiffrés 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 présent dans /etc/lwpasswd doit aussi être
        présent 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 stockées les
           informations sur les répertoires à 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 répertoire Linux à
        exporter séparés par le caractère espace. Vous devez avoir, aauu
        mmooiinnss, une entrée dans ce fichier pour le volume SYS afin que le
        serveur puisse démarrer. Si vous voulez que vos utilisateurs DOS
        puissent accéder à votre serveur LinWare  comme serveur pri­
        maire, vous devrez installer une arborescence de volume SYS
        standard sous le répertoire que vous exportez comme volume SYS.
        Les fichiers devant être présents dans ces répertoires 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.



     DDéémmaarrrreerr llee sseerrvveeuurr _l_w_a_r_e_d


                 # lwared


     Plutôt simple n'est-ce pas ? Mais il reste une question.  Quel est
     le nom du serveur de fichiers ? Si vous avez démarré le serveur
     LinWare  de la façon exposée ci-dessus, son nom sera celui retourné
     par la commande _h_o_s_t_n_a_m_e de Linux (le nom d'hôte). Si vous voulez
     un autre nom, il suffit de le spécifier dans la ligne de lancement
     de lwared comme ci-dessous par exemple :


              # lwared -nlinux00


     Ici le nom du serveur LinWare sera linux00.


     TTeesstteerr llee sseerrvveeuurr _l_w_a_r_e_d
        La première chose à faire est de vérifier que votre serveur
        LinWare apparaît bien dans une _s_l_i_s_t d'un client DOS sur votre
        réseau. Le programme _s_l_i_s_t est stocké dans le volume SYS d'un
        serveur de fichier Novell donc il vous faudra réaliser cette
        opération à partir d'une machine déjà loguée sur un serveur. Si
        ça ne marche pas, vérifiez que _i_p_x_s_a_p_d et _l_w_a_r_e_d tournent en
        même 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
     basées sur celles données par le serveur _L_i_n_u_x en fonction de votre
     compte utilisateur.



  1111..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx eenn cclliieenntt dd''iimmpprreessssiioonn NNoovveellll


  Le paquetage _n_c_p_f_s inclut deux petits utilitaires qui vous permettent
  d'imprimer depuis votre machine Linux sur une imprimante reliée à 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 décrites précédemment.


  Ces deux commandes nécessitent que vous fournissiez le nom
  d'utilisateur et le mot de passe. Vous devriez normalement penser à
  écrire des scripts pour simplifier les tâches 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'hypothèse qu'un serveur de
  fichiers ACCT_FS01 a un compte guest sans mot de passe, qu'une queue
  d'impression appelée 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.


  1122..  CCoonnffiigguurreerr vvoottrree mmaacchhiinnee LLiinnuuxx eenn sseerrvveeuurr dd''iimmpprreessssiioonn NNoovveellll

  Un programme permettant à votre machine Linux d'agir comme serveur
  d'impression sur un réseau 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.



  1122..11..  PPrréérreeqquuiiss

  La configuration est relativement simple mais vous devez avoir une
  imprimante complètement configurée et fonctionnant sous Linux. Cette
  partie est couverte dans le Printing-HOWTO <Printing-HOWTO.html> en
  détail.


  1122..22..  CCoonnffiigguurraattiioonn

  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 dépendre de ce que vous voulez
  exactement qu'il fasse, mais dans sa façon 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 récupérer
  les travaux d'impression dans la queue LASERJET. Lorsqu'un nouveau
  travail d'impression est reçu, la commande d'impression par défaut de
  _l_p_r sera utilisée pour fournir ce travail d'impression au démon
  d'impression Linux.  La queue d'impression doit être déjà définie sur
  le serveur de fichiers et le nom d'utilisateur doit avoir les
  privilèges 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 spécifier la commande exacte à utiliser. Par exemple :



       # pserver -S ACCT_01 -U LASER -P secret -q LASERJET -c "lpr -Plaserjet"




  fera exactement la même chose que l'exemple précédent sauf qu'il
  enverra le travail d'impression à la configuration _p_r_i_n_t_c_a_p laserjet
  au lieu de celle par défaut.


  1133..  nnccppffss UUnn aappeerrççuu ddeess ccoommmmaannddeess uuttiilliissaatteeuurr eett dd''aaddmmiinniissttrraattiioonn ddee

  Les dernières versions du paquetage _n_c_p_f_s de Volker incluent toute une
  série de commandes d'utilisation et d'administration que vous pourriez
  avoir envie d'utiliser. Ces outils sont compilés et installés 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 détaillée est disponible dans les pages de _m_a_n fournies,
  mais voici un bref résumé des commandes.


  1133..11..  CCoommmmaannddeess uuttiilliissaatteeuurr


     nnccooppyy
        Network Copy (copie réseau) - permet de copier efficacement des
        fichiers en utilisant une fonction NetWare plutôt que de copier
        à travers le réseau.


     nnpprriinntt
        Network Print (impression réseau) - permet d'imprimer un fichier
        vers une queue d'impression Netware située sur un serveur
        Netware.

     nnsseenndd
        Network Send (envoi réseau) - permet d'envoyer des messages à
        d'autres utilisateurs connectés à un serveur NetWare.

     nnwwbboollss
        List Bindery Objects (liste les objets de la bindery) - permet
        de lister le contenu de la bindery d'un serveur NetWare.

     nnwwbboopprrooppss
        List properties of a Bindery Object (liste les propriétés d'un
        objet de la bindery) - permet de voir les propriétés d'un objet
        de la bindery

     nnwwbbppsseett
        Set Bindery Property (Configure des propriétés de bindery) -
        permet de configurer les propriétés d'un objet de la bindery
        NetWare.

     nnwwbbppvvaalluueess
        Print Netware Bindery Objects Property Contents (affiche le
        contenu propriété des Objets de la Bindery) - permet d'afficher
        le contenu d'une propriété d'une bindery Netware.

     nnwwffssiinnffoo
        Fileserver Information (information sur le serveur de fichiers)
        - affiche un résumé d'informations sur un serveur Netware.

     nnwwppaasssswwdd
        NetWare Password (mot de passe NetWare) - permet de changer le
        mot de passe d'un utilisateur NetWare.

     nnwwrriigghhttss
        NetWare Rights (permissions NetWare) - affiche les droits
        associés à un fichier ou répertoire particulier.

     nnwwuusseerrlliisstt
        User List (liste d'utilisateurs) - liste les utilisateurs
        actuellement logués sur un serveur de fichiers NetWare.

     ppqqlliisstt
        Print Queue List (Liste de queue d'impression) - affiche le
        contenu d'une queue d'impression NetWare.

     sslliisstt
        Server List (liste de serveurs) - affiche une liste de serveurs
        de fichiers NetWare connus.


  1133..22..  OOuuttiillss dd''aaddmmiinniissttrraattiioonn


     nnwwbbooccrreeaattee
        Create a Bindery Object (créer un objet de la bindery) - permet
        de créer un objet de la bindery.

     nnwwbboorrmm
        Remove Bindery Object (enlever un objet de la bindery) - permet
        d'effacer un objet de la bindery.

     nnwwbbppaadddd
        Add Bindery Property (ajouter une propriété à la bindery) -
        permet de positionner la valeur d'une propriété existante d'un
        objet d'une bindery Netware.

     nnwwbbppccrreeaattee
        Create Bindery Property (créer une propriété de bindery) -
        permet de créer une nouvelle propriété pour un objet déjà
        existant dans une bindery NetWare.

     nnwwbbpprrmm
        Remove Bindery Property (enlever une propriété de bindery) -
        permet d'enlever une propriété sur un objet d'une bindery
        NetWare.

     nnwwggrraanntt
        Grant Trustee Rights (attribuer les droits d'accès) - permet
        d'assigner les droits d'accès à un répertoire sur un serveur de
        fichiers NetWare.

     nnwwrreevvookkee
        Revoke Trustee Rights (retirer les droits d'accès) - permet de
        retirer les droits d'accès à un répertoire sur un serveur de
        fichiers NetWare.


  1144..  CCoonnffiigguurreerr PPPPPP ppoouurr llee ssuuppppoorrtt dd''IIPPXX

  Les nouvelles versions du démon PPP _p_p_p_d pour Linux permettent de
  transporter des paquets IPX à travers une liaison série PPP. Il faut
  au moins la version ppp-2.2.0d du démon. 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
  définition 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 façons de faire mais je ne décrirai que les deux sur
  lesquelles j'ai reçu des informations. Je n'ai encore jamais essayé,
  donc considérez cette section comme expérimentale et si vous arrivez à
  faire marcher quelque chose, faites-le moi savoir s'il vous plait.


  1144..11..  CCoonnffiigguurreerr uunn sseerrvveeuurr IIPPXX//PPPPPP

  La première 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 même configuration.




  1144..11..11..  PPrreemmiièèrree ééttaappee

  Une des premières choses à faire est de configurer votre machine Linux
  en routeur IPX de la façon décrite 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 démon _i_p_x_d tourne, il détecte automatiquement toute
  nouvelle interface IPX et propage les routes pour elle. Ainsi, vos
  machines connectées en dialup seront vues par les autres machines
  automatiquement lors de la connexion.


  1144..11..22..  CCoonncceeppttiioonn

  Lorsque l'on tourne en tant que serveur, c'est normalement de sa
  responsabilité d'assigner des adresses réseau à chacune des liaisons
  PPP lorsqu'elles sont établies. Ceci est un point important, chaque
  liaison PPP sera un réseau IPX et aura une adresse réseau IPX unique.
  Cela signifie que vous devez décider comment vous allez allouer les
  adresses et quelles adresses utiliser.  Une convention simple est
  d'allouer une adresse réseau IPX à chaque périphérique série qui
  supporte IPX/PPP. Vous pourriez allouer une adresse réseau IPX basée
  sur le login de l'utilisateur connecté, mais je ne vois pas de raison
  particulière de faire ainsi.

  Je vais supposer pour la suite que vous avez choisi la première
  convention et qu'il y a deux périphériques réseau (modems) que nous
  utiliserons.  Les adresses utilisées dans cet exemple sont :



       Periph. Adresse reseau IPX
       ------- -------------------
       ttyS0   0xABCDEF00
       ttyS1   0xABCDEF01





  1144..11..33..  CCoonnffiigguurreerr ppppppdd

  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 réseau IPX appropriée au
  lien lorsque la liaison est établie. Le numéro de noeud local sera
  positionné à 2 ou 3 et le noeud distant pourra l'écraser avec le
  numéro de noeud qu'il pense être le bon. Notez que toutes les adresses
  sont en hexadécimal et que 0x est obligatoire au début de l'adresse
  réseau mais pas nécessaire au début 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
  entrée aurait pu être ajoutée au fichier /etc/ppp/options. Cette
  information aurait également pu être passée sur la ligne de commande
  de _p_p_p_d.


  1144..11..44..  TTeesstteerr llaa ccoonnffiigguurraattiioonn dduu sseerrvveeuurr

  Pour tester la configuration, vous aurez besoin d'un client
  fonctionnant correctement. Quand l'utilisateur appelle, se logue et
  que _p_p_p_d démarre, celui-ci va attribuer l'adresse réseau, avertir le
  client du numéro de noeud du serveur et négocier le numéro de noeud du
  client.  Lorsque ceci est terminé et après que _i_p_x_d a détecté la
  nouvelle interface, le client doit pouvoir établir des connexions IPX
  avec des hôtes distants.


  1144..22..  CCoonnffiigguurreerr uunn cclliieenntt IIPPXX//PPPPPP

  Dans une configuration client, le fait de configurer ou non votre
  machine Linux en routeur IPX dépend de votre volonté d'agir en routeur
  IPX sur le réseau local de la machine. Si vous avez une machine isolée
  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 réseau local et
  souhaitez que toutes les machines du réseau puissent utiliser la route
  IPX/PPP alors vous devez configurer et faire tourner _i_p_x_d comme
  décrit.  Cette configuration est plus simple car vous n'avez qu'un
  seul périphérique série à configurer.


  1144..22..11..  CCoonnffiigguurreerr ppppppdd

  La configuration la plus simple est celle qui permet au serveur de
  fournir toute l'information sur la configuration du réseau IPX. Cette
  configuration serait compatible avec la configuration du serveur
  décrite 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 manière complètement passive et
  d'accepter tous les détails de configuration fournis par le serveur.
  Vous pouvez fournir ici des valeurs par défaut pour les serveurs qui
  ne fournissent pas ces détails en ajoutant des lignes ipx-network et
  ipx-node similaires à la configuration du serveur.




  1144..22..22..  TTeesstteerr llee cclliieenntt IIPPXX//PPPPPP

  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 démarré, vous devriez voir les détails de votre configuration
  IPX sur votre périphérique 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.



  1155..  TTuunnnneell IIPPXX ssuurr IIPP

  Beaucoup d'entre vous doivent être dans la situation où deux réseaux
  locaux IPX sont séparés 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
  réponse 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 encapsulés dans des paquets de données TCP/IP de
  manière à ce qu'ils soient transportés par une connexion TCP/IP. Ce
  programme attend l'arrivée de paquets IPX et lors de leur arrivée, il
  les enferme dans un paquet de données TCP/IP et le route vers
  l'adresse IP distante que vous aurez spécifiée. Pour que cela
  fonctionne, la machine qui reçoit le paquet de données encapsulé doit,
  elle aussi, faire tourner une version identique d'_i_p_x_t_u_n_n_e_l.


  1155..11..  RRééccuuppéérreerr iippxxttuunnnneell

  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.


  1155..22..  CCoommppiilleerr iippxxttuunnnneell

  _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








  1155..33..  CCoonnffiigguurreerr iippxxttuunnnneell

  La configuration d'_i_p_x_t_u_n_n_e_l est aisée. Admettons que la machine de
  vos amis soit gau.somewhere.com et que votre machine soit appelée
  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 spécifier le port UDP
  par défaut à utiliser pour la connexion TCP/IP par laquelle les
  données encapsulées seront envoyées ainsi que l'interface locale où
  ipxtunnel doit écouter et délivrer les paquets IPX.

  Un simple fichier de configuration ressemblera à :


              #
              # /etc/ipxtunnel.conf pour gim.sw.edu
              #
              # Le port UDP à utiliser                (par défaut 7666)
              port 7777
              #
              # Le nom de la machine distante où les paquets IPX doivent être envoyés
              remote gau.somewhere.com
              #
              # Les interfaces IPX locales à écouter (par défaut eth0)
              interface eth0
              interface eth1




  Évidemment l'autre machine aura un fichier de configuration similaire
  spécifiant votre machine comme hôte distant (remote).


  1155..44..  TTeesstteerr eett uuttiilliisseerr iippxxttuunnnneell


  _i_p_x_t_u_n_n_e_l se comporte ccoommmmee un pont IPX, ainsi les réseaux IPX à
  chaque extrémité de la liaison TCP/IP doivent probablement être les
  mêmes.  Andreas n'a jamais testé _i_p_x_t_u_n_n_e_l dans un environnement qui
  utilise réellement les serveurs de fichiers Novell, donc si vous
  l'essayez dans un tel environnement, donnez-en le résultat à 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 utilisée 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.


  1166..  SSuuppppoorrtt ccoommmmeerrcciiaall IIPPXX ppoouurr LLiinnuuxx


  1166..11..  CCaallddeerraa''ss NNeettwwoorrkk DDeesskkttoopp


  Caldera Inc. commercialise une distribution Linux possèdant de
  nombreuses fonctions et améliorations. Elle inclut un support
  totalement fonctionnel d'un client Novell Netware. La distribution de
  base est la respectée Red Hat Linux et Caldera y a ajouté son "Network
  Desktop". Le support Netware inclut un client Novell Netware possédant
  toutes les fonctionnalités requises, bâties sur une technologie
  licenciée par Novell Corporation. Ce client fournit un accès total à
  des serveurs de fichiers Novell 3.x et 4.5 et inclut des
  fonctionnalités comme le "Netware Directoy Service" (NDS) et
  l'encryptage RSA.

  Vous pourrez obtenir plus d'informations et de détails 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 manière professionnelle, vous devriez regarder le produit de
  Caldera de près.


  1177..  FFooiirree AAuuxx QQuueessttiioonnss


     OOùù ppuuiiss--jjee ttrroouuvveerr ddeess llooggiicciieellss IIPPXX ppoouurr LLiinnuuxx ffoouurrnniiss aavveecc uunn
        ssuuppppoorrtt
        commercial ?"  _C_a_l_d_e_r_a _C_o_r_p_. offre un client Netware 3.x et 4.x
        complètement supporté avec une licence complète. Pour de plus
        amples informations, consultez le site web de Caldera Inc
        <http://www.caldera.com/>.

     EEsstt--ccee qquuee lleess llooggiicciieellss IIPPXX ffoonnccttiioonnnneenntt aavveecc AArrccnneett//TTookkeenn
        RRiinngg//eettcc.. ??
        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 même manière que
        pour l'Ethernet, sauf que vous devrez remplacer appropriée
        lorsque nécessaire.

     CCoommmmeenntt eesstt--ccee qquuee jjee ccoonnffiigguurree pplluuss dd''uunnee iinntteerrffaaccee IIPPXX ??
        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".

     CCoommmmeenntt eesstt--ccee qquuee jjee cchhooiissiiss lleess aaddrreesssseess IIPPXX ??
        Les réseaux IPX sont similaires mais non identiques aux réseaux
        IP.  Une différence majeure est la façon dont les adresses sont
        utilisées. IPX n'utilise pas le concept de sous-réseau. Le lien
        entre les adresses réseau et les réseaux est différent. Les
        règles sont relativement simples.

     ·  Chaque adresse de réseau IPX doit être unique sur un réseau à
        grande échelle (WAN).  Ceci inclut les adresses de réseau
        internes. Beaucoup d'organisations utilisant IPX sur des réseaux
        à grande échelle ont une politique d'adressage que vous devriez
        suivre.

     ·  Chaque adresse d'hôte sur un réseau particulier doit être
        unique. Cela signifie que tous les hôtes sur chaque réseau IPX
        doivent avoir une adresse assignée unique.  Dans le cas d'un
        réseau 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 hôtes du réseau, quel que soit le bout de la (des)
        liaison(s) auquel ils sont connectés. Les adresses des hôtes
        n'ont pas besoin d'être uniques à travers un WAN car l'adresse
        du réseau est combinée à l'adresse de l'hôte pour identifier
        l'hôte de manière unique.

     QQuueellss ssoonntt lleess ttyyppeess ddee ttrraammee qquuee jjee ddeevvrraaiiss uuttiilliisseerr??
        Il y a plusieurs types de trames au-dessus desquelles vous
        pouvez faire fonctionner IPX. Les plus utilisées sont décrites
        dans la section 'termes utilisés dans ce document' (sous
        l'entrée 'type de trame').

        Si vous installez votre machine sur un réseau existant, alors
        vous devrez utiliser ce qui est déjà utilisé pour vous permettre
        de communiquer avec les autres machines du réseau. En revanche,
        si vous installez un réseau tout neuf, il y a toute une variété
        de protocoles pour transporter votre trafic IPX que vous pouvez
        utiliser. Si vous installez un réseau 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.

     MMeess mmaacchhiinneess WWiinnddoowwss9955 bbrroouuiilllleenntt llaa ddéétteeccttiioonn aauuttoommaattiiqquuee dduu ttyyppee
        ddee mmeess ttrraammeess..
        Apparement, ils y arrivent, ouais. Je pourrais faire des
        commentaires pas gentils, mais à la place, je vous suggérerais
        de configurer manuellement le type de trames plutôt que
        d'utiliser la configuration automatique. C'est probablement la
        meilleure façon en tout cas.

     PPoouurrqquuooii eesstt--ccee qquuee jj''oobbttiieennss llee mmeessssaaggee ''iinnvvaalliidd aarrgguummeenntt'' qquuaanndd
        jjee ccoonnffiigguurree
        IPX ?"  Vous n'avez probablement pas un noyau qui supporte IPX.
        Soit vous recompilez votre noyau pour qu'il le fasse, soit vous
        vérifiez que vous avez bien utilisé lilo pour installer et
        utiliser le nouveau noyau.

     PPoouurrqquuooii eesstt--ccee qquuee jj''oobbttiieennss llee mmeessssaaggee ''ppaacckkaaggee nnoott iinnssttaalllleedd''
        qquuaanndd jjee
        configure IPX ?"  Vous n'avez probablement pas un noyau qui
        supporte IPX. Soit vous recompilez votre noyau pour qu'il le
        fasse, soit vous vérifiez que vous avez bien utilisé lilo pour
        installer et utiliser le nouveau noyau.

     PPoouurrqquuooii eesstt--ccee qquuee _p_p_p_d mm''eennvvooiiee llee mmeessssaaggee ''IIPPXX ssuuppppoorrtt
        not in kernel' ?"  Vous avez probablement compilé IPX comme un
        module et vous ne vous êtes pas assuré qu'il était chargé avant
        de démarrer _p_p_p_d.

     CCoommmmeenntt eexxppoorrtteerr eenn NNFFSS uunn ssyyssttèèmmee ddee ffiicchhiieerrss NNCCPP mmoonnttéé ??
        Pour utiliser NFS pour exporter un système 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 faîtes ainsi, le démon
        NFS vous permet d'exporter ce système de fichiers de la manière
        habituelle.

     PPoouurrqquuooii eesstt--ccee qquuee sslliisstt nnee mmaarrcchhee ppaass qquuaanndd jj''aaii uunn rréésseeaauu
        iinntteerrnnee
        avec _m_a_r_s___n_w_e ?"  Vous devez avoir la requête 'get nearest
        server' activée. L'entrée 401 dans /etc/nwserv.conf doit être 0,
        à moins que vous ayez une raison pour ne pas répondre à ces
        requêtes. Si vous voulez simplement que _s_l_i_s_t fonctionne et ne
        pas répondre à chaque requête 'get nearest server', ajoutez
        votre réseau interne et numéro de noeud dans
        /etc/nwserv.stations et positionnez l'entrée 401 de
        /etc/nwserv.conf à 2.

     EEsstt--ccee qquuee llee ppaaqquueettaaggee nnccppffss ffoonnccttiioonnnnee aavveecc mmaarrss__nnwwee ??
        Les codes de Martin et Volkers commencent lentement à converger.
        Les versions récentes 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.


  1188..  CCooppyyrriigghhtt


  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 Générale GNU publiée
  par la Free Software Foundation (version 2 ou bien toute autre version
  ultérieure choisie par vous).

  Cette documentation est distribuée car potentiellement utile, mais
  SSAANNSS AAUUCCUUNNEE GGAARRAANNTTIIEE, ni explicite ni implicite, y compris les
  garanties de ccoommmmeerrcciiaalliissaattiioonn ou dd''aaddaappttaattiioonn ddaannss uunn bbuutt ssppéécciiffiiqquuee.
  Reportez-vous à la Licence Publique Générale GNU pour plus de détails.

  Vous pouvez obtenir une copie de la Licence Publique Générale GNU en
  écrivant à la Free Software Foundation <http://www.fsf.org>, Inc., 675
  Mass Ave, Cambridge, MA 02139, États-Unis.

  Les marques déposées sont propriétés de leurs propriétaires
  respectifs.




  1199..  RReemmeerrcciieemmeennttss

  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'améliorer 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 déposée de Novell Corporation
  <http://www.novell.com/>.

  "Caldera" est une marque déposée 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 Février 1999

  Une introduction à Linux et aux périphériques 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 après janvier 1996 sont
  équipés 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
  implémentés en tant que clients et serveurs. Les connections multiples
  via IrLAP¨sont aussi supportées, via plusieurs périphériques IrDA en
  même temps. Le projet Linux/IrDA à démarré à la fin de l'année 1997 et
  son statut est toujours expérimental, alors, n'espérez pas que tout
  marchera du premier coup. D'après ce que je sais, Linux/IrDA est la
  _seule_ implémentation libre disponible actuellement. Le contrôle à
  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 matières








































  1. Introduction

  2. Prérequis

  3. Noyau

     3.1 Configuration générale
     3.2 Paramètres spécifiques à 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 périphériques infrarouges
           3.2.2.1 IrTTY (utilise le pilote série)
           3.2.2.2 Support des dongles
           3.2.2.3 Support de FIR

  4. Utilitaires Linux/IrDA

  5. Configuration

     5.1 Configuration générale
     5.2 IrManager
     5.3 Pilotes de bas niveau
        5.3.1 SIR
        5.3.2 Connexion des dongles - Adaptateurs infrarouges sur port série.
        5.3.3 Connexion des dongles - Adaptateur infrarouge pour carte mère
        5.3.4 Infrarouge rapide (FIR = Fast InfraRed)

  6. Protocoles et connexions spécifiques

     6.1 Connexion imprimante - IrLPT
     6.2 Connexion LAN - IrLAN
     6.3 Connexion Palm III - IrOBEX
     6.4 Connexion avec un téléphone cellulaire.
     6.5 Connexion avec un appareil photo numérique
     6.6 Window$95 et Linux/IrDA
     6.7 Connexion de Linux à Linux
        6.7.1 Méthodes de connexions
        6.7.2 Compression
     6.8 Instances multiples

  7. Matériel supporté par Linux/IrDA

     7.1 Récupérer des informations à propos des ports infrarouges des portables
        7.1.1 SIR
        7.1.2 FIR
     7.2 Aperçu du matériel supporté

  8. Interface graphique

  9. Économie d'énergie

  10. Résolution des problèmes, liste de diffusions

     10.1 Informations générales
     10.2 Technique de résolution des problèmes

  11. Bugs connus

  12. FAQ

  13. Contrôle à distance via infrarouge

     13.1 Ressources
     13.2 Commande a distance IR - IrDA
  14. Infrarouge et protection des yeux.

  15. Crédits

  16. Historique des versions

  17. Copyright et dénégation



  ______________________________________________________________________


  11..  IInnttrroodduuccttiioonn


  _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 expérimental. 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'après ce que je
  sais, ce paquetage n'est plus maintenu.

  Les compagnies et les développeurs 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 démarra à la fin de l'année
  1997 avec le nom Linux/IrDA. A cause de problèmes dus au fait que le
  nom IrDA est une marque déposée par l'Infrared Data Association IrDA
  http://www.irda.org/, le nom a été changé en Linux/IR. A la fin de
  l'année 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 dernière 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
  française)

  J'ai essayé de vérifier toutes les informations, mais je n'ai pas tout
  le matériel infrarouge nécessaire, alors, si cela ne marche pas pour
  vous, ne m'accusez pas.

  Si vous avez des commentaires ou des questions, n'hésitez pas à me
  contacter. Je sais que ce document n'est ni fini ni parfait, mais
  j'espère qu'il vous sera utile.

  <Werner Heuser>


  22..  PPrréérreeqquuiiss



  ·  BIOS

     - Assurez vous que le port infrarouge est bien activé dans le BIOS,
     et vérifiez quelle interruption et quel port il utilise.


  ·  Puce contrôleur infrarouge


     - Assurez vous que votre port infrarouge soit bien détecté par
     Linux. Pour plus de détails, référez vous à la section "Aperçu du
     matériel supporté" ci dessous.


  ·  modutils


     - Assurez vous que vous avez bien modutils 2.1.x (insmod
     --version). J'utilise la version 2.1.121.


  ·  Librairies partagées


     - 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 sûr que vous ayez besoin de la librairie zlib si
     vous utilisez la compression de données.


  ·  Interfaces graphiques :


     Il y a actuellement deux interfaces graphiques pour Linux/IrDA qui
     sont en développement :


  ·  GNOBEX, une application GNOME développée par Dag Brattli
     http://www.cs.uit.no/~dagb/irda/irda.html avec le support du
     glisser/déposer 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 terminée pour autant, mais si vous voulez la
     tester, vous aurez besoin du module Perl-GTK+.

  ·  KDE, une application KDE développée 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 nécessitent des icônes. Toutes les
     icônes doivent :
     a) Avoir une taille fixe (je pense que 48x48 pixels semble être la
     taille commune).
     b) Grosse & petite (les petites sont pour être dockées).
     c) 16 couleurs.
     d) Libres de tous droits.
     e) SVP, ne copiez pas des icônes microsoft !
     Contactez les développeurs.


  ·  Sécurité


     - TTrrèèss iimmppoorrttaanntt, vous devez faire un sync sur vos disques !!!
     Vous aurez peut être à rebooter votre machine. N'avez vous pas lu
     le désistement de responsabilité ?




  ·  Divers


     - Autres programmes utiles : APSFILTER, EZ-Magic, MagicFilter ou
     quelque chose de similaire pour configurer les imprimantes.


  33..  NNooyyaauu

  S'il vous plaît, 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 périphériques)

  /usr/src/linux/include/net/irda (fichiers d'en-têtes)



  33..11..  CCoonnffiigguurraattiioonn ggéénnéérraallee

  - Assurez vous que vous utilisez bien les sources du noyau _n_o_y_a_u
  _2_._2_._x. Si vous n'êtes pas sûr de la version de votre noyau, essayez
  uname -r.

  - Récupérez 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 expérimental 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 même _s_e_r_i_a_l _s_u_p_p_o_r_t pour les fonctionnalités 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 nécessaire


  - 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 même 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 suggère 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 après un make clean.


  33..22..  PPaarraammèèttrreess ssppéécciiffiiqquueess àà IIrrDDAA

  Voici ce que j'ai suggéré pour
  ../linux-2.2.x/Documentation/Configure.help, des morceaux viennent de
  Dag Brattli et Andreas Butz :


  33..22..11..  IIrrDDAA ssuubbssyysstteemm ssuuppppoorrtt

  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, réseaux
  et ordinateurs portables. La vitesse de transmission varie de 2400bps
  à 4Mbps. Pour utiliser ces fonctionnalités, 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 (Référez vous à Documentation/modules.txt). Notez
  que le support Linux/IrDA est toujours expérimental.


  33..22..11..11..  PPrroottooccoollee IIrrDDAA


  ·  Protocole IrLAN

     CONFIG_IRLAN

     Compile le pilote IrDA réseau. Utilisez ``ifconfig eth0 <IP-
     NUMBER>'' pour le configurer. - Répondez juste Y.


  ·  Support des clients IrLAN

     CONFIG_IRLAN_CLIENT

     Si vous connectez des périphériques infrarouges via IrLAN, l'un
     doit être serveur et l'autre client. Vous pouvez utiliser les deux
     en même temps. Le premier à se connecter sera le client.  -
     Répondez juste Y.
     derniers patch incluent le support peer-to-peer à la place.


  ·  Support pour le serveur IrLAN

     CONFIG_IRLAN_SERVER

     Si vous connectez des périphériques infrarouges via IrLAN, l'un
     doit être serveur et l'autre client. Vous pouvez utiliser les deux
     en même temps. Le premier a se connecter sera le client.  -
     Répondez 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. - Répondez juste Y.


  ·  Protocole IrCOMM

     CONFIG_IRCOMM

     Via IrCOMM, il est possible de communiquer avec des téléphones
     cellulaires, etc. Pour utiliser ce service, vous aurez à créer un
     périphérique avec ``mknod /dev/irnine c 60 64'', il marche comme
     /dev/ttySx. - Répondez juste Y.
     : les nombres majeurs et mineurs ne sont toujours pas officiels.
     Pour les dernières améliorations, (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. - Répondez 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. - Répondez juste Y.



  33..22..11..22..  OOppttiioonnss dduu pprroottooccoollee IIrrDDAA

  CONFIG_IRDA_OPTIONS

  Vous avez la possibilité de définir 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 intéressant puisque la majorité des trames seront
     envoyées/reçues via la même connexion. L'activation de cette option
     vous fera gagner une recherche dans un tableau à chaque trame
     transmise. Si vous êtes indécis, 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 réponse, 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). Répondre Y ici
     demandera à IrLAP de recycler ces trames, évitant par là même plein
     de alloc_skb et de kfree_skb. Pour réaliser 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
     débogage à votre syslog. Vous pouvez changer le niveau de débogage
     dans /proc/sys/net/irda/debug.
     plus simple de dénicher les bogues).


  33..22..11..33..  IIrrDDAA ccoommpprreessssoorrss

  CONFIG_IRDA_COMPRESSION

  Vous pouvez utiliser les méthodes 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 périphériques IrDA, mais les communications ne seront alors pas
  compressées.



  ·  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 référez vous à Documentation/modules.txt. La compression
     deflate (GZIP) est exactement la même que celle utilisée par le
     protocole PPP. Activer cette option créera un module nommé
     irda_deflate.o.


  ·  BZIP2 compression

     CONFIG_IRDA_BZIP2

     Pas d'aide disponible.


  ·  BSD compression

     CONFIG_IRDA_BSD

     Pas d'aide disponible.



  33..22..22..  PPiillootteess ddee ppéérriipphhéérriiqquueess iinnffrraarroouuggeess

  Trois types de pilotes sont disponibles : série, dongle et FIR. Ils
  apparaîtrons dans /proc/net/dev (irda0) après initialisation.



  33..22..22..11..  IIrrTTTTYY ((uuttiilliissee llee ppiilloottee sséérriiee))

  La majorité des puces IrDA supportent StandardInfraRed (SIR), qui
  marche jusqu'à 115200 bps et émmule un port série (UART 16550A). Sur
  beaucoup de portables, ce port est détecté par le pilote série du
  noyau, référez vous a ``dmesg''. IrTTY connecte les services
  Linux/IrDA à ce port. - Vous devriez dire Y ici.


  ·  Support du dongle série

     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 référez vous à Documentation/modules.txt. IrTTY rends possible
     l'utilisation du pilote série de Linux pour tous les ports IrDA qui
     sont compatibles 16550. La majorité des puces le sont, par
     conséquent, 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 sûr, dites Y.


  33..22..22..22..  SSuuppppoorrtt ddeess ddoonngglleess

  CONFIG_DONGLE

  Pour l'instant 4 dongles (adaptateurs infrarouges pour port série)
  sont supportés. Le dongle est un périphérique infrarouge qui se
  connecte au port série, si vous n'avez pas de port infrarouge intégré
  à votre machine. Si vous utilisez un dongle sur un ordinateur
  portable, vous aurez certainement à désactiver 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 référez vous à Documentation/modules.txt. Ce dongle se
     branche sur un port série 9 broches, et ne peut être utilisé que
     par IrTTY. Pour activer le support pour le dongle ESI, vous aurez à
     insérer ``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 référez vous à Documentation/modules.txt. Ce dongle se
     branche sur un port série 9 broches, et ne peut être utilisé que
     par IrTTY. Pour activer le support pour les dongles ACTiSYS, vous
     aurez à insérer ``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
     référez vous à Documentation/modules.txt. Ce dongle se branche sur
     un port série 9 broches, et ne peut être utilisé que par IrTTY.
     Pour activer le support pour les dongles Tekram, vous aurez à
     insérer ``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 référez vous à Documentation/modules.txt. Ce dongle se
     branche sur un port série 9 broches, et ne peut être utilisé que
     par IrTTY. Pour activer le support pour les dongles Greenwich, vous
     aurez à insérer ``irattach -d girbil'' dans le script
     /etc/irda/drivers.



  33..22..22..33..  SSuuppppoorrtt ddee FFIIRR

  FastInfraredSupport (FIR) (support de l'infrarouge rapide) nécessite
  un contrôleur spécial, qui supporte jusqu'à 4Mbps. Dites juste "Y"


  ·  NSC PC87108

     CONFIG_NSC_FIR

     La puce FIR NationalSemiConductor NSC PC87108 (utilisée par exemple
     dans l'IBM Thinkpad 560X et le dongle ACTiSYS IR2000). La puce FIR
     NSC PC87338 FIR est probablement aussi supportée. 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) (utilisée 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
     référez vous à Documentation/modules.txt. Ce chipset est utilisé
     dans les portables Toshiba de la gamme Tecra.





  44..  UUttiilliittaaiirreess LLiinnuuxx//IIrrDDAA



  ·  Utilisez la dernière version des irda-utils disponible à
     http://www.cs.uit.no/~dagb/irda/irda-utils/.

  ·  Détarez 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 nécessaire si vous compilez le
     paquetage pour la première fois).

  ·  Faites un make all pour compiler tous les exécutables.

  ·  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
  adéquate avec votre configuration à la ligne SYS_INCLUDES du fichier
  Makefile.



  55..  CCoonnffiigguurraattiioonn



  55..11..  CCoonnffiigguurraattiioonn ggéénnéérraallee



  ·  Tout d'abord vous devriez mettre vos périphériques infrarouges à
     portée l'un de l'autre. Bien que le service Linux/IrDA détecte peut
     être automatiquement les nouveaux périphériques, j'ai bonne
     expérience de la configuration quand les périphériques sont à
     portée l'un de l'autre.

  ·  Gardez vos périphériques infrarouges ensembles, dans un espace d'un
     mètre maximum et dans un angle de 30 degrés. 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 sûr de ces paramètres. Il y a des informa­
  tions contradictoires sur les page de Dag Brattli et sur la liste. Ces
  paramètres étaient utilisés avec les anciens paquetages Linux/IrDA,
  ces paramètres ont certainement changés 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.


  55..22..  IIrrMMaannaaggeerr

  Dag Brattli a écrit : _I_r_M_a_n_a_g_e_r [...]. est un démon utilisateur qui
  s'inspire et qui est assez similaire à _c_a_r_d_m_g_r utilisé pour contrôler
  les cartes PCMCIA.

  _I_r_M_a_n_a_g_e_r recevra les événements qui proviennent de l'espace noyau de
  la pile du protocole.  Quand _I_r_M_a_n_a_g_e_r reçoit un événement, il peut
  exécuter des commandes shell ou des scripts, par conséquent, j'ai
  ajouté le répertoire /etc/irda pour contenir ces scripts. [...]

  Par exemple, si IrLMP découvre un périphérique qui peut fournir un
  service IrLAN, et qu'aucun client IrLAN ne s'est enregistré, alors,
  IrLMP enverra un événement à IrManager et lui fera faire un "modprobe"
  sur le module requis. [...]

  Lorsque les clients (applications utilisateurs) sont prêts à effectuer
  la configuration des paramètres de communication et de l'utilisateur,
  ils peuvent également contacter IrManager, de façon à ce qu'il exécute
  le bon script. Par exemple, IrLAN enverra un événement
  EVENT_IRLAN_START quand le canal de données sera prêt pour échanger
  des trames ethernet. Quand IrManager reçoit cet événement, il exécute
  /etc/irda/network start <devname> pour configurer l'interface réseau.
  Ce script network est d'ailleurs le même que celui utilisé par le code
  PCMCIA, et vu que j'utilise sa variante RedHat, il finira par exécuter
  /sbin/ifup <devname>.

  Par conséquent, en utilisant l'IrManager, j'ai "juste" à faire cela
  quand je démarre la pile :



       irattach /dev/ttyS2 &
       irmanager -d 1           # -d 1 signifie : démarre la reconnaissance automatique




  et quand mon portable découvre 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 prête, il demandera
  l'exécution de /etc/irda/network start eth0. Si la connexion est
  perdue, il lui demandera de supprimer l'interface en lançant
  /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 même.

  Si vous voulez utiliser le serveur IrLAN, vous aurez quand même à
  faire un modprobe irlan_server avant de lancer irmanager ssaannss -d 1.

  Et tout comme le cardmgr, vous aurez (et si vous le voulez) un bip
  quand la connexion est établie et prête et quand elle est déconnectée
  !!!

  J'espère 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'espère 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 démarrer tout
  ça quand il est exécuté. De cette façon, il serait juste de lancer
  IrManager depuis /etc/rc.d/init.d/irda et le reste sera plug & play.
  Il ne serait plus nécessaire de démarrer manuellement les programmes
  et de configurer les périphériques. Pour l'instant, lorsque irmanager
  reçoit les événements suivants, il fera :
  EVENT_IRLAN_START, démarre et configure le périphérique 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 façon qu'il a de le faire.


  55..33..  PPiillootteess ddee bbaass nniivveeaauu

  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.





  55..33..11..  SSIIRR



  ·  Essayez de trouver quel port série est utilisé par le périphérique
     infrarouge. Vous pouvez le faire en regardant ce que donne dmesg.
     Si le support série est sous forme de module vous pouvez faire un
     insmod serial. Cherchez une entrée telle :



       Serial driver version 4.25 with no serial options enabled
       ttyS00 at 0x03f8 (irq = 4) is a 16550A     #Permier port série /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 périphérique infrarouge n'est pas
  détecté 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 rôle que joue le PnP dans la détection du
  port IR. Si vous n'êtes pas sûr, essayez et donnez moi le résultat.

  ·  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 série, surtout si le port série est
     sur une ligne série séparée. Normalement, il n'est pas nécessaire
     de modifier ces valeurs ! Pour plus d'informations, référez vous à
     la FAQ ci dessous.

  ·  Si vous n'utilisez pas kerneld ou kmod insérez le module irda avec
     modprobe irda.

  ·  Faites un lsmod. Les modules irda et irtty devraient apparaître.

  ·  Un coup d'oeil dans /var/log/messages devrait vous afficher "Serial
     connection established" maintenant.


  ·  Tapez irmanager -d1, cela lancera les programmes nécessaires, tels
     irattach.

  ·  Donnez à irattach un peu de temps (ex: sept secondes), pour
     détecter les autres périphériques 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





  55..33..22..  CCoonnnneexxiioonn ddeess ddoonngglleess -- AAddaappttaatteeuurrss iinnffrraarroouuggeess ssuurr ppoorrtt
  sséérriiee..

  Les dongles supportés 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 séries
  utilisant deux dongles différents au même moment (le tty que vous liez
  doit savoir à quel dongle il a à faire). Donc, si vous avez deux
  dongles et deux ports séries, 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 réaction 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 supplémentaire (28400bps), vous devez spécifier le dongle
  différemment 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'implémentation actuelle du support des dongles n'a aucun état
  précis, il n'est donc pas possible d'utiliser les deux dongles ACTiSYS
  (220L et 220L+ en même temps (connecté à deux ports séries) 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 matériel non standard) j'ai du
  désactiver le support infrarouge depuis le BIOS pour le faire
  marcher !



  55..33..33..  CCoonnnneexxiioonn ddeess ddoonngglleess -- AAddaappttaatteeuurr iinnffrraarroouuggee ppoouurr ccaarrttee mmèèrree

  Le support pour le dongle ACTiSYS IR2000 a été implémenté dans un
  fichier appelé px87108 que vous pouvez soit compiler dans le noyau,
  soit en tant que module :



       irmanager -d 1
       modprobe pc87108




  ou insérez modprobe pc87108 dans le fichier /etc/irda/drivers (je
  pense).


  55..33..44..  IInnffrraarroouuggee rraappiiddee ((FFIIRR == FFaasstt IInnffrraaRReedd))

  Le standard IrDA(TM) reconnaît _t_r_o_i_s vitesses différentes :




  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 très rapide (Very Fast IrDA) (16Mbps), semble devenir
     le standard futur

     Jusqu'à 115,200 bps, beaucoup de contrôleurs infrarouges
     fonctionnent comme un port série. Jusqu'à 4Mbps, ils marchent dans
     le mode "FIR". Actuellement, seuls deux contrôleurs sont supportés
     : 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 détecter vos
     périphériques à ce moment là.



  66..  PPrroottooccoolleess eett ccoonnnneexxiioonnss ssppéécciiffiiqquueess


  66..11..  CCoonnnneexxiioonn iimmpprriimmaannttee -- IIrrLLPPTT

  IrLPT est en phase de développement 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.

  ·  Vérifiez 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 périphérique. C'est
     le premier chiffre sur la ligne avec irlpt0.

  ·  faites un su pour devenir root, et faites un mknod /dev/irlpt0 c 10
     <numéro 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 façon est de changer votre /etc/printcap pour utiliser
     plutôt /dev/irlpt0 ou même à la place de /dev/lp1. Référez vous au
     Printing-HOWTO pour plus de détails.

  ·  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)série ou (p)parallèle ?" Réponse "p"


     "Quelle est le nom du périphérique pour votre imprimante parallèle
     ?" Réponse "/dev/irlpt0"




  ·  Redémarrez le démon d'impression avec kill -HUP <PID de lpd>. Si
     vous utilisez un autre démon d'impression, utilisez la commande
     appropriée.

  ·  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,
     près du bac à papier).

  ·  Je n'ai jamais réussi à imprimer des documents de plus d'environ 10
     pages jusqu'à présent. Mais cela dépend peut être de la mémoire de
     mon système (16Mo). Mais il semble qu'il y ait un problème logiciel
     aussi, Thomas Davis a écrit : "Je ... limiterais IrLPT pour qu'il
     ne prenne pas trop de mémoire 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 prêt à recevoir des fichiers à
  imprimer. Maintenant, tout ce dont vous avez besoin est un script :



       #!/bin/sh
       #
       while (true)
       do
       cat /dev/irlptd | lpr
       done






  66..22..  CCoonnnneexxiioonn LLAANN -- IIrrLLAANN



  ·  Vous pouvez connecter votre ordinateur sous Linux en utilisant
     IrLAN avec un autre périphérique, 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 nécessite un contexte non
     disponible dans le noyau.".

  ·  Lancez ifconfig eth0 up <addresse_ip> netmask <masque_sous_réseau>
     pour le configurer avec une adresse IP et d'autres paramètres. Si
     le protocole est toujours en mémoire, 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 réseau en la pingant. Pour plus de détails,
     référez 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 même pièce. Si
     il y a des problèmes, regardez quels sont les différents 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 nécessaire, vu que irmanager devrait le faire !




  Sur la machine 2 (si vous n'avez pas un point d'accès)



       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 réseau si vous
  utilisez deux machines. Si vous avez un point d'accès, alors, le
  paramétrage par défaut devrait être bon.


  Remarquez que dans le dernier patch (2.2.0-irda1), irlan_client
  devrait appeler le périphérique irlan0 par défaut, 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 empêcher
  l'AP de vous submerger avec des trames de broadcast ! Cela peut être
  un problème si vous êtes connectés à un segment ethernet très large.
  Le seul problème sera que votre machine aura à démarrer toutes les
  communications, et donc, ne pourra pas marcher en tant que serveur
  (bon, vous devriez pouvoir trouver une machine fixe qui pourrait
  répondre aux requêtes ARP à votre place).



  66..33..  CCoonnnneexxiioonn PPaallmm IIIIII -- IIrrOOBBEEXX

  La partie IrOBEX semble être en constant développement. Par
  conséquent, les applications changent aussi. Par conséquent, 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
  périphériques, en faisant le bon mknod pour /dev/irobex etc, pas pour
  démarrer des applications.


  ·  Palm III -> Linux


     1) Terminal 1> irattach /dev/ttyS<x>


     2) Terminal 2> load_misc irobex


     3) Terminal 3> Démarrez irobex_app depuis le répertoire 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 installée pour pouvoir utiliser ce programme.
     Une interface graphique devrait être développée par quelqu'un. Le
     programme à utiliser devrait être irobex_receive.


     4) Récupérez quelque chose depuis votre Palm III.


     5) Si tout va bien, vous pouvez aller voir le fichier qui vient
     d'arriver dans le répertoire depuis lequel a été lancé irobex_app
     (ou /tmp pour irobex_receive). Le nom de ce fichier dépendra de
     l'objet que vous avez transféré.




  ·  Linux -> Palm III

     Cela devrait être possible, mais je n'ai pas d'informations pour
     l'instant.


  ·  PPP

     Rui Oliveira a écrit : "Grâce au dernier patch IrCOMM (050998) de
     Takahide Higuchi, j'ai réussi à synchroniser et à établir une
     connexion PPP entre mon Palm III et ma machine Linux. J'utilise
     IRLink (provenant de IsComplete) pour rediriger le port série vers
     un port IR. La communication avec pilot-xfer marche sans aucun
     problème. Bien que j'aie réussi à établir une connexion PPP, je
     n'arrive toujours pas à récupérer des emails et à naviguer sur le
     Web. Cela est probablement du à des timeouts de connexion. Je suis
     en train d'essayer de résoudre ce problème.". Référez 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 série 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 série) à 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 réussi à 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.".



  66..44..  CCoonnnneexxiioonn aavveecc uunn ttéélléépphhoonnee cceelllluullaaiirree..

  D'après ce que je sais, quelques téléphones utilisent le standard
  IrCOMM, ex: Ericsson SH888 et NOKIA 8110. Benny Amorsen a écrit :
  "J'ai utilisé minicom avec le SH888, et j'ai réussi à établir une
  connexion (CONNECT 9600...). Je n'ai pas réussi à lui faire faire quoi
  que ce soit d'autre après la connexion, et raccrocher en arrêtant 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 très
  bien avec Linux/IrDA, et devrait même marcher avec les noyaux 2.0.x.
  Je n'utilise que les noyaux 2.1.".

  Il se peut que d'autres téléphones 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 téléphones NOKIA ne contiennent pas de modem matériel,
  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 même 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 (nommés :
  NOKIA Cellular Data Suite).

  Joonas Lehtinen a écrit : "Cela est vrai pour les modèles 61xx. Les
  modèles 8810, 9000(i) et 9110 devraient marcher (ils ont un modem
  intégré). Mon N9000 marche avec IrCOMM et Linux de la façon suivante :

  Pour démarrer 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 câble série, alors que beaucoup penseraient que c'est
  une chose plutôt obscure comme cela l'est pour moi. Mais c'est la
  seule manière de le faire fonctionner avec Windows, bien que je n'ai
  jamais réussi à le faire marcher avec Windows.


  66..55..  CCoonnnneexxiioonn aavveecc uunn aappppaarreeiill pphhoottoo nnuumméérriiqquuee

  Markus Schill a écrit : "Heureusement qu'il y a d'autre personnes qui
  sont intéressées à 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 série 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é démarré. (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 utilisés avec l'appareil photo avec le câble : (1) chotplay et
  (2) stillgrab. Ils prennent tous les deux un tty comme ligne de
  commande, par conséquent, 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 démarré ? "

  Dag Brattli a écrit : "Je ne suis pas certain de savoir quel protocole
  l'appareil photo utilise, mais il est possible qu'il implémente les
  spécifications 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 implémenté par dessus IrCOMM (pas IrTTY !). IrTTY est
  quelque chose que nous utilisons juste pour communiquer avec le pilote
  série de Linux. "


  66..66..  WWiinnddooww$$9955 eett LLiinnuuxx//IIrrDDAA

  Introduction

  Pourquoi cette section ? Malheureusement, les utilisateurs de Linux ne
  sont pas toujours capable de savoir tout sur leur configuration
  matérielle. 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 nécessaire
  d'utiliser les spécifications du fabricant (pour cet Omnibook, cela se
  trouve sur votre CD de secours).
  Les fichiers les plus intéressants pour trouver des détails sur la
  configuration sont les ..\windows\inf\*.inf et les gestionnaires de
  périphériques.

  D'après 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 périphériques non M$ disponibles. Notez
  toutefois que certains utilisent des protocoles infrarouges
  propriétaires :


  ·  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 façons 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 réseau
  IrDA(TM) dans la liste des interfaces réseaux. Mais je n'ai pas encore
  réussi à 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 nécessaires viendraient avec le Palm III,
  mais il s'avère 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
  récupéré la description suivante (que j'ai légèrement modifiée) :
  "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, créez un fichier de périphérique mknod /dev/irnine c 60 64.
  Maintenant, les services Linux/IrDA peuvent être démarrés avec
  irattach /dev/ttyS? &. /dev/irnine peut être utilisé comme port série.
  Les modules ircomm et ircomm_tty seront chargés 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 : Premièrement, 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 apparaître votre prompt de
  login préféré depuis un émulateur de terminal depuis Win95 !

  ·  Si vous essayez pppd, pensez à utiliser l'option -crtscts pour
     désactiver le contrôle de flux. J'ai implémenté une petite
     émulation de contrôle de flux, mais cela n'a pas été testé.

  ·  Maintenant, mon patch montre quel fonctionnalités sont nécessaires
     à 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 spécialement connaître les messages donnés par SH888
     (ou tout autre type de périphériques sauf les PC sous windows 95).
     Donc, s'il vous plaît envoyez moi vos syslog générés durant les
     connexions IrCOMM ! Si vous avez une copie des spécifications
     IrCOMM écrites par IrDA(TM), référez vous aux pages 34 ou 38, et
     vous comprendrez ce que ces messages signifient."


  66..77..  CCoonnnneexxiioonn ddee LLiinnuuxx àà LLiinnuuxx


  66..77..11..  MMéétthhooddeess ddee ccoonnnneexxiioonnss

  Il devrait y avoir _t_r_o_i_s façons 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 empêcher de transférer 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 manière "simple" de transférer 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 cotés, 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 série, ce qui
     signifierait minicom, pppd, etc.


  66..77..22..  CCoommpprreessssiioonn

  Notez que cette fonctionnalité est toujours vraiment expérimentale !
  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 négocier
  avec son voisin et savoir si il est capable de compresser les données.
  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 périphériques doivent ignorer les champs inconnus
  dans les en-têtes de négociations, donc, nous sommes toujours
  compatibles avec le standard IrDA(TM) (j'ai juste emprunté une valeur
  non utilisée dans les en-têtes).

  Si vous voulez essayer d'utiliser la compression (Linux <-> Linux)
  vous aurez à insérer 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 décrit 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
  conséquent vous pouvez ajouter autant de compresseurs différents. Pour
  l'instant, seul GZIP est supporté, mais la compression BSD sera
  ajoutée plus tard."



  66..88..  IInnssttaanncceess mmuullttiipplleess

  Dag Brattli a écrit : "La couche IrLAP a été améliorée de telle sorte
  qu'elle autorise plusieurs instances (de cette façon, je peux utiliser
  mon port infrarouge pour IrLAN et communiquer avec mon Pilot via un
  dongle IrDA en même temps)... Comment faire pour avoir plusieurs
  connexions Linux/IrDA ? Et bien, facile, lancez tout simplement
  irattach autant de fois que vous avez de ports... procédez comme il
  suit : "



       irattach /dev/ttyS0 &    (mon dongle ESI)
       irattach /dev/ttyS2 &    (mon port IrDA intégré)

       insmod irlan_client
       insmod irobex






  77..  MMaattéérriieell ssuuppppoorrttéé ppaarr LLiinnuuxx//IIrrDDAA


  77..11..  RRééccuuppéérreerr ddeess iinnffoorrmmaattiioonnss àà pprrooppooss ddeess ppoorrttss iinnffrraarroouuggeess ddeess
  ppoorrttaabblleess

  Pour faire marcher le port IrDA de votre portable avec Linux/IrDA vous
  pouvez utiliser StandardInfraRed (SIR) ou FastInfraRed (FIR).


  77..11..11..  SSIIRR

  Jusqu'à 115.200 bps, le port infrarouge émule un port série tel l'UART
  16550A. Ceci sera détecté par le pilote série 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 série/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





  77..11..22..  FFIIRR

  Si vous voulez utiliser jusqu'à 4 Mbps, votre machine doit être
  équipée d'une puce FIR spécifique. Vous aurez besoin d'un pilote
  Linux/IrDA spécial pour cette puce. Par conséquent, il est nécessaire
  de savoir exactement quelle puce vous avez. Vous pouvez trouver ces
  informations de différentes manières :


  1. Lisez les spécifications de votre machine, mais bon, il est très
     rare que vous y trouviez suffisamment d'informations.

  2. Faites un cat /proc/pci, mais bon, les informations PCI sont
     souvent incomplètes. Vous trouverez les dernières informations à
     propos des périphériques PCI et des numéros 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
     détectée ou pas.

  4. Bien que je ne les utilise pas encore dans ce but, les outils
     isapnp devraient être utiles.

  5. Une autre manière de trouver, expliquée 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 aauuccuunn 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
     intéressantes 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 régler à part l'adresse de la puce.
     Référez 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 très 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 périphérique de Window$95/98/NT.

  9. Vous pouvez aussi vous référer à la section suivante.


  77..22..  AAppeerrççuu dduu mmaattéérriieell ssuuppppoorrttéé

  Il y a quelques pages qui parlent des périphériques infrarouges
  supportés par Linux sur le WWW :


  ·  Le Linux/IrDA Project - rapport de matériel à
     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 matériel à
     http://www.snafu.de/~wehe/index_li.html. Cette liste contient aussi
     des informations se rapportant aux périphériques qui supportent
     l'infrarouge et qui ne sont pas mentionnés ici (souris,
     imprimantes, télécommandes, transmetteurs, etc.).


     Pour que cette liste soit la plus complète possible, il est
     nécessaire de collecter le plus d'informations possible à propos
     des différents périphériques infrarouges. Vous m'aiderez beaucoup
     en m'envoyant un court email contenant le nom exact du périphérique
     et quel type de contrôleur infrarouge est utilisé.


     Tenez moi aussi au courant sur la façon dont Linux/IrDA a marché,
     sur quel tty, port, interruption ça a marché, et le périphérique
     infrarouge correspondant (imprimante, téléphone cellulaire) que
     vous utilisez.


     Vous pouvez aussi aider en donnant des détails technologiques à
     propos de certains périphériques infrarouges, ce qui est nécessaire
     pour développer un périphérique correspondant pour Linux.





  88..  IInntteerrffaaccee ggrraapphhiiqquuee

  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'espérez pas trop :-)


  99..  ÉÉccoonnoommiiee dd''éénneerrggiiee

  Dans les spécifications 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 nécessaire, vous pouvez aussi essayer de désactiver 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.



  1100..  RRééssoolluuttiioonn ddeess pprroobbllèèmmeess,, lliissttee ddee ddiiffffuussiioonnss


  1100..11..  IInnffoorrmmaattiioonnss ggéénnéérraalleess

  Si vous rencontrez des problèmes, 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 différents 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 problème est déjà 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, répondre aux questions, faire des rapports de bugs,
     envoyer des patchs, faire des suggestions et des commentaires. Pour
     éviter le spam, la liste est dorénavant modérée, par conséquent, il
     se peut qu'un certain temps se passe avant que votre message soit
     distribué aux autres membres de la liste.



  1100..22..  TTeecchhnniiqquuee ddee rrééssoolluuttiioonn ddeess pprroobbllèèmmeess

  Bien que je ne soit pas franchement un hacker, j'ai récupéré quelques
  erreurs possibles et quelques bugs de la suite Linux/IrDA.


  ·  Vous pouvez régler 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
     différents paramètres comme echo 0 > /proc/sys/net/irda/discovery.


     Les différents fichiers présents 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 débogger le code. Mais je ne sais pas le
     faire. Si vous voulez utiliser le code de débogage SKB, vous pouvez
     éditer irda.h et changer /include/linux/skbuff.h (référez vous à
     l'historique des révisions du code datant du 2/10/98).

  ·  Pour les problèmes 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 dorénavant changer le nombre de paquets de découverte
     utilisés (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
     problèmes à faire reconnaître votre périphérique. Mon Palm III
     semble préférer 16 discovery_slots et 8 (*10 ms) pour
     slot_timeout."  ... "Le minimum absolu pour une découverte du
     IR-610 semble être 9."

  ·  Si l'un d'entre vous récupère un Oops du noyau, alors envoyez le
     dans le programme ../linux/scripts/ksymoops/ksymoops, pour que nous
     puissions trouver d'où vient le problème. Copiez juste l'Oops
     depuis votre syslog et coller le dans un fichier, ensuite, lancez
     ksymoops <fichier>.

  ·  Dag Brattli a écrit : "J'ai découvert 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 problèmes si vous exécutez le
     serveur esound (esd) sur votre machine. Aucune de mes deux
     machines, un portable P166 et un PPro 200, ne peut exécuter
     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 série perd des données quand il en reçoit. Cela est
     du au fait que le pilote série utilise maintenant des interruptions
     lentes dans le noyau 2.2 (tout utilise des interruptions lentes
     dans le 2.2), par conséquent le gestionnaire d'interruptions
     s'affole un peu.  La bonne chose à propos des interruptions lentes
     est que les paquets sont délivrés de manière 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.




  1111..  BBuuggss ccoonnnnuuss

  Si vous trouvez un bug, s'il vous plaît, envoyez un rapport à la
  liste, incluant la sortie de dmesg, la version du noyau, et le
  matériel que vous utilisez. Merci !

  Quelques fois, IrCOMM n'arrive pas à se connecter (spécialement quand
  les deux périphériques se découvrent mutuellement. Vous pouvez
  désactiver la découverte avec echo 0 >/proc/sys/net/irda/discovery).

  Un caractère CR (retour à la ligne) ne peut pas être transféré entre
  deux machines Linux via IrCOMM avec cat file >/dev/irnine et cat
  /dev/irnine. Cela fait des drôles 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 détruire des données en réception. Ce bug est certainement
  dans la partie utilisateur de IrOBEX.



  1122..  FFAAQQ



  ·  Q1 - Question : Je ne sais pas du tout quels sont les ports
     utilisés et les irq. Que faire ?

  ·  Réponse :


     Premièrement : Réglages matériels


     - 1  Allez regarder les spécifications de votre matériel. Si ce
     n'est pas disponible, référez vous à la page de support de votre
     constructeur, ou contactez son support technique. Vous pourrez peut
     être trouver les informations dans les aperçus du matériel
     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 périphériques mentionnés est probablement celui que vous
     cherchez. D'habitude, c'est le deuxième, mais ce n'est pas toujours
     le cas.


     - 4  Note : Ce qui semble être un UART est physiquement un
     contrôleur IrDA, Pour mon HP Omnibook 800, c'est le contrôleur VLSI
     VL82C147 PCI - IrDA. Ces contrôleurs semblent pouvoir se connecter
     jusqu'à 115 200 bps comme les UART 16550A. Mais c'est souvent
     difficile de trouver la bonne configuration.


     Deuxièmement : Comment donner au noyau les paramètres nécessaires
     pour votre matériel ?


     - 4  cat /proc/ioports pour voir quels ports sont déjà utilisés.


     - 5  cat /proc/interrupts pour voir quelles interruptions sont déjà
     prises.


     - 6  Libérez les ports et interruptions pour le périphérique IR,
     par exemple : arrêtez 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 utilisée. Utilisez un setserial /dev/ttySx irq M
     port 0xNNNN pour le dire au noyau. Si il y a plusieurs
     possibilités, 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 réussi, envoyez les paramètres utiles à l'auteur,
     car il aimerait bien les inclure dans son aperçu du matériel.


     - 9  Bonne chance.


     Il sera peut être aussi nécessaire d'affiner les réglages du port
     série 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.

  ·  Réponse : 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 problème est dans le module irda, et pas dans le programme
     irattach. La seule chose à faire est de rebooter ! La prochaine
     fois mettez irattach en tâche de fond en utilisant irattach &.
     Stoppez le si nécessaire avec un killall irattach. Recommandation
     d'Andreas Butz : "D'après ce que je sais, <CTRL Z> devrait marcher
     aussi, mais je ne l'ai pas testé dans ce cas précis. Normalement,
     cela a exactement le même effet que de rajouter un & à la commande.

  ·  Q3 - Question : Je reçois un message dans le style "tcsetattr
     read/write error" dans /var/log/messages.

  ·  Réponse : 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.

  ·  Réponse : Placez les périphériques à une distance de moins de 0.5
     mètre (1.5 pied). Vérifiez qu'une seule application utilise le port
     infrarouge. Vérifiez que les deux interfaces utilisent le même
     protocole comme IrOBEX ou IrCOMM.

  ·  Q5 - Question : J'ai téléchargé la dernière version des pilotes, et
     ça a très 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é inséré et que
     syslog rapporte "irattach: Serial connection established.", que
     l'IR marche vraiment, et se mettra-t-il à répondre quand il aura
     une autre machine pour discuter ?

  ·  Réponse de Dag Brattli : Désolé, cela signifie juste que irattach a
     fait son boulot, qui est juste de démarrer irda-tty. Peut être que
     le message aurait du être différent, mais comme je l'ai dit, il
     signifie que la connexion série entre la puce irda et le pilote
     irda est établie.


     Note : le support des noyaux 2.0 s'arrête. Vous êtes vivement
     encouragés à passer aux versions 2.2 et à utiliser les derniers
     patchs IrDA disponibles à
     http://www.cs.uit.no/~dagb/irda/snapshots/.


  ·  Q6 - Question : Au démarrage modprobe -a vérifie
     /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).
  ·  Réponse de Werner Heuser : Truc pour les système 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 démarrage (/etc/init.d et un lien symbolique par
  exemple "S100ir_rmmod" dans /etc/rc3.d vers "ir_rmmod"). (Vérifiez le
  chemin vers "sh"). pour les systèmes style BSD, essayez l'approche
  correspondante.



  ·  Q7 - Question de Ho Chin Keong : Y a-t-il une autre manière de
     faire communiquer deux machines sans créer un réseau entre les
     deux ?

  ·  Réponse de Dag Brattli : Oui et non ! L'un des standards IrDA,
     IrCOMM permet d'émuler un câble série entre deux machines, donc,
     vous pouvez utiliser n'importe quel programme écrit pour les ports
     série (terminaux, PPP, slip, etc.). Cela n'est, par ailleurs, pas
     encore implémenté 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 délibérément le
     faisceau infrarouge pendant plus de 10 secondes, la connexion ne
     peut être rétablie. Je dois tuer irattach et redémarrer toute la
     procédure pour créer 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'implémentation, ou est-ce un bug ?
     Y a-t-il un moyen d'augmenter cette limite de 10 secondes à plus,
     voir même à l'infini ?

  ·  Réponse de Thomas Davis : Cela semble être un bug dans la partie
     principale du code de IrLAP/IrLMP. Il semble que la notification de
     remise à zéro/déconnexion 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
     déconnecte/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 système 3.0.2 ?

  ·  Réponse de Dag Brattli : Il n'est pas nécessaire de mettre à jour
     votre Pilot, mais cela ne peut pas faire de mal. C'est par contre
     nécessaire si vous voulez utiliser la librairie IrCOMM de
     IsComplete.

  ·  Q10 - Pierre-Guillaume Raverdy a demandé : De plus, un exemple
     simple de code source (spécialement du coté du Palm Pilot) serait
     très pratique.

  ·  Réponse de Dag Brattli : Récupérez le Pilot SDK de Palm.
     Décompressez le fichier examples.zip et regardez le programme
     beamer.
  ·  Q11 - Kai Poehlmann a écrit : J'ai un téléphone 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 téléphone en
     utilisant un câble série... :-/ Est-il maintenant possible
     d'utiliser ce téléphone avec Linux/IrDA et un câble série ?

  ·  Réponse de Matthias Lemke : Oui, c'est possible. J'ai essayé il y a
     6 semaines. Mais j'ai eu le même problème qu'avec juste l'IrDA. Je
     peux me connecter au téléphone, le remettre à zéro avec ATZ, mais
     après ATDT, plus rien ne se passe, que ce soit avec ou sans le
     câble. Mais je pense que vous devriez ressayer avec la dernière
     version de Linux/IrDA.

  ·  Q12 - Jonah Peskin a écrit : Est ce que quelqu'un a réussi à
     augmenter les capacités d'un émetteur IrDA ? J'utilise un portable
     Dell Inspiron 7000, et il semble que son rayon d'émission soit
     d'environ 1 mètre. Je sais que cela rentre dans les spécifications
     de l'IrDA, mais y a-t-il des portables ou des périphériques qui
     permettent de faire plus d'un mètre ? Pourquoi ne pas prendre un
     câble d'un mètre ?

  ·  Réponse de tzeruch@ceddec.com : Parce qu'une connexion manuelle (à
     part le réceptacle pour le Palm) est difficile et prend du temps et
     crée souvent des problèmes (accéder à l'arrière de mon ordinateur
     de bureau nécessite quelques contorsions).


     Le problème principal est qu'il est nécessaire de rendre le
     récepteur 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 mètre à 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 centimètres). Et si
     vous voulez le faire de l'autre côté, il ne doit pas être
     simplement 25 fois plus sensible, il doit pouvoir discerner le
     faible faisceau infrarouge des néons, é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




  1133..  CCoonnttrrôôllee àà ddiissttaannccee vviiaa iinnffrraarroouuggee


  1133..11..  RReessssoouurrcceess

  La prise de contrôle à distance par infrarouge n'est pas le but du
  projet Linux/IrDA mais est incluse dans ce HowTo pour couvrir de
  manière 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 récentes à http://
  www.snafu.de/~wehe/index_li.html.


  ·  LIRC LInux Remote Control

     LIRC est un paquetage qui supporte la réception et l'émission de
     signaux infrarouges des protocoles de contrôle à distance IR les
     plus courants. Il contient un pilote pour les périphériques
     connectés aux ports séries, un démon qui décode et encode les
     signaux IR en utilisant ce pilote, un démon de souris qui traduit
     les signaux IR en mouvements de souris et quelques programmes
     utilisateurs qui vous permettent de contrôler votre ordinateur avec
     une télécommande. Takahide Higuchi a écrit à propos de LIRC :
     "C'est génial, et j'ai l'impression que c'est un projet très
     complet, mais j'ai aussi l'impression que quasiment aucun des
     périphériques du marché n'est supporté (vous aurez besoin d'un fer
     à souder et de circuits spéciaux... un peu dur pour le néophyte).
     Je suppose que LIRC deviendra plus populaire si le support
     infrarouge est implémenté 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/.


  ·  Télécommande infrarouge série

     Voici un périphérique simple et bon marché qui peut être connecté à
     tout port série pour contrôler presque tous les appareils qui
     possèdent une télécommande IR. Il a été conçu et fabriqué sur une
     carte d'extension à sertir et est à présent 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 contrôler le COREL
     NetWinder par infrarouge, par exemple :


     Serveur pour l'administration Corel Palm. Il nécessite 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 vérifier la température, mémoire, charge de la machine.


     Client pour l'administration Corel Palm. Vous pouvez aussi lancer
     quelques commandes simples ET vérifier la température, mémoire,
     charge de la machine.


     Un pilote IR très simple. Il ne supporte pas IrDA (seulement des
     transferts non fiables). Il ne cherche que des signaux venant de
     télécommandes (et claviers, etc.). Il bloque et passe les données
     d'une façon très différente.


     Vous trouverez tout ceci à http://www.netwinder.org/~ryansh/





  1133..22..  CCoommmmaannddee aa ddiissttaannccee IIRR -- IIrrDDAA

  Deux des projets décrits 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 même 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 télécommandes IR et
  IrDA, j'ai fait une compilation de la liste Linux/IrDA (raccourcie et
  modifiée par wh) :

  Ryan Shillington a écrit : "Les télécommandes IR et ASK-IR sont très
  différentes de FIR, MIR ou SIR.

  Les télécommandes IR et ASK-IR ont des vitesses très basses et des
  fréquences très basses (mais de longues portées). Elles opèrent à
  environ 2400bps.

  SIR opère à des vitesses supérieures, et est voué à des transmissions
  longues portées où vous avez besoin que plus d'un ou deux caractères
  passent dans la liaison (pas comme les télécommandes).

  MIR est légèrement plus rapide (mais a moins de portée), mais sa
  vitesse peut monter jusqu'à 1.15Mbps et FIR (ou les périphériques
  doivent presque se toucher) a un débit de 4Mbps. La portée est
  inversement proportionelle à la vitesse de transmission.

  Je travaille sur des pilotes pour les télécommandes infrarouges, mais
  vous devriez déjà le savoir si votre matériel 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 télécommandes.
  Réglez bien votre débit au plus bas et les données commenceront à
  affluer. MAIS d'après mon expérience, ce ne sont pas les BONNES
  données. Ce n'est pas analysé de la bonne façon, et par conséquent,
  vous ne pouvez ni calculer la somme de contrôle ni la vérifier avec
  son complément.

  J'ai réussi à récupérer des données (en utilisant SIR) avec des
  télécommandes. On m'a dit que SIR lisait les données venant d'une
  télécommande différemment en fonction de la température (malgré tout,
  je n'en ai jamais fait l'expérience)."

  Lichen Wang <lwang1@ix.netcom.com> a écrit en réponse : "Le truc que
  l'on appelle ASKIR dans tant de portables n'est pas fait pour les
  télécommandes infrarouges. ASKIR est fait pour le Sharp Wizard, les
  PDA Zauaus et quelques portables Sharp. Sharp avait créé cela bien
  avant l'arrivée d'IrDA et le supporte toujours pour maintenir une
  compatibilité. Le Newton d'Apple avait aussi cette capacité là à un
  moment.

  Brièvement, ASKIR utilise un format de transmission asynchrone à 9.6
  Kbps (19.2 et 38.4 Kbps sont aussi possibles) avec 8 bits de données,
  1 bit d'arrêt et une parité impaire. Le bit de démarrage ainsi que
  tous les bits 0 sont transmis comme une onde carrée de 500 KHz (sous
  porteuse DASK). Le bit "arrêt" ainsi que tous les bits 1 sont
  représentés par l'absence de transmission.

  Comme vous pouvez le constater, c'est totalement incompatible avec les
  télécommandes IR.

  [..]

  Vrai. Non seulement il est possible d'utiliser le matériel 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 télécommandes utilisent une sous porteuse à 38KHz. 3
  fois 38 ça fait 114, très proche de 115.2. Il est donc possible de
  régler l'UART pour opérer à 115.2 Kbps, 7 bits de données, 1 bit
  d'arrêt 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 télécommande. Le _t_r_a_n_s_m_e_t_t_e_u_r SIR a un cycle
  d'utilisation beaucoup plus faible, et par conséquent, ne peut émettre
  une trop forte sous porteuse.

  La télécommande encode le signal de contrôle en ajoutant un patron
  spécifique à 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 nécessaire de savoir combien d'octets de 0x5B
  consécutifs il sera nécessaire 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 nécessaire de savoir combien d'octets 0x5B vous
  recevez consécutivement, et quelle est la durée entre les trous
  d'octets consécutifs.

  [..]

  Mon expérience avec les distances de transmissions IrDA de SIR, MIR et
  FIR sont légèrement différentes de ce que Ryan a dit.

  [..]

  SIR, MIR et FIR devraient toujours marcher de 0 à 100 cm, mais dans la
  pratique :

  (a) Certains périphériques ont des problèmes avec les _L_O_N_G_U_E_S
  distances.

  Lorsque cela est possible, placez les périphériques à moins de 50 cm
  l'un de l'autre. Les périphériques ayant peu de puissance, comme les
  pagers et les téléphones cellulaires, etc. auront peut être des
  distances encore plus petites bien qu'ils utilisent SIR à la place de
  MIR ou FIR.

  (b) Certains périphériques ont des problèmes avec les _C_O_U_R_T_E_S
  distances.

  Placez les deux périphériques à au moins quelques centimètres l'un de
  l'autre. Les mettre plus près peut causer des problèmes.

  Il est un peu intuitif de rapprocher les deux périphériques lorsque la
  connexion n'est pas bien stable. Mais cela va à l'encontre de toute
  intuition que trop près 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 récepteur IR ont du mal
  à gérer 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 utilisée dans les télécommandes IR. Par conséquent, il n'est pas
  possible d'utiliser la même fonction de contrôle avec FIR et les
  télécommandes. Toutefois, presque tous les contrôleurs FIR incluent
  des fonctions additionnelles pour supporter les télécommandes IR.
  National, SMC, et Winbond (pour ne citer que ceux là) ont tous de
  telles puces.

  Les transmetteurs IR pour FIR et les télécommandes sont très
  semblables. J'ai essayé avec un transmetteur FIR standard. Il est
  capable d'atteindre 10 mètres dans un but de télécommande. Par
  conséquent, il est aussi performant que les transmetteurs inclus dans
  les télécommandes.


  Les récepteurs IR pour FIR et les télécommandes sont par contre assez
  différents. Un récepteur FIR peut recevoir un signal de télécommande,
  mais ceci seulement à 1 mètre alors que les récepteurs intégrés dans
  les télécommandes atteignent 10 mètres.

  J'ai un adaptateur ISA avec une puce National qui supporte aussi bien
  FIR que les télécommandes. J'ai aussi des dongles IR qui incluent les
  deux types de récepteurs (ainsi qu'un transmetteur pour les deux
  modes). Je n'ai pour l'instant trouvé aucun logiciel supportant les
  fonctions de télécommandes. J'ai fait mes propres expériences sous DOS
  (je ne peux pas encore installer Linux). Quelqu'un est intéressé ? "

  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 volée. "

  Dag Brattli a écrit : "Il devrait être possible d'utiliser IrControl
  (auparavant IrBus) pour utiliser les télécommandes compatibles IrDA.
  Je ne connais aucune télécommande 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 récupérer le standard de la couche physique
  (qui inclue IrControl je pense).

  IrDA "Normal" (en utilisant IrLAP) n'est ppaass une bonne chose pour
  l'utilisation avec les télécommandes à cause de la trop grande
  différence de nature (et il ne supporte que le 9600 bps pour les
  travaux hors connexions). La raison de cette limite de portée est la
  protection des yeux qu'ils disent (mais je ne sais pas pourquoi CIR
  marche mieux en utilisant la même puissance). J'ai par ailleurs vu des
  portables connectés avec 4 à 5 mètres 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 intéresse Corel dans le but de contrôler 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.


  1144..  IInnffrraarroouuggee eett pprrootteeccttiioonn ddeess yyeeuuxx..

  Cette section reprend quelques idées et pensées qui ont été échangées
  sur la liste Linux/IrDA. Rien ici n'est fondé sur des connaissances
  médicales, par conséquent toute personne qui aurait des informations
  plus complètes et plus sures est encouragée à contribuer à ce HowTo.


  Les spécifications d'IrDA disent que la portée des périphériques IrDA
  a été limitée à 1 mètre dans le but de protéger 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 détectés par l'oeil, et donc, la pupille ne se
  ferme pas pour protéger la rétine des sources IR fortes. C'est la même
  situation avec les UV, qui causent un aveuglement nébuleux, mais
  contrairement aux UV, les IR contiennent beaucoup moins de puissance
  destructrice à cause de leurs longueurs d'ondes plus grandes.
  Les seuls restrictions légales et conseils médicaux que nous ayons pu
  trouver sur le web étaient les émissions infrarouges des lampes à
  bronzer ou dans les processus de soudage. Cela suggère que la lumière
  IR émise par les périphériques IrDA serait sans aucun danger, vu que
  même le pic de puissance des plus puissantes LED IR est d'environ
  300mW, ce qui n'est rien comparé aux lampes a chauffer à usage médical
  qui peuvent monter jusqu'à 500W. Pour celles ci, il est nécessaire de
  porter des lunettes protectrices, alors, il se peut que regarder en
  face 1 000 LED IR en une seule fois ait le même effet. Les effets de
  la lumière IR sont majoritairement la chaleur, pas une altération ou
  une destruction des structures cellulaires comme le font les UV.
  Toutefois, dans les spécifications 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 basée que sur des
  présomptions et des déductions faites sur les données trouvées dans
  les spécifications des LED IR et des lampes chauffantes. Si quelqu'un
  a des connaissances médicales à partager, faites le !!!


  1155..  CCrrééddiittss

  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 développeurs des SGML-Tools qui m'ont permis d'écrire ce HowTo.

  Désolé, je n'ai pas commencé à faire les crédits quand j'ai démarré ce
  HowTo, j'ai certainement oublié quelqu'un.


  1166..  HHiissttoorriiqquuee ddeess vveerrssiioonnss


  ·  v0.1 à v0.4a, 19 mars 1998 au 4 août 1998, brouillons, non inclus
     dans le LDP.

  ·  v1.0, 14 août 1998, ajout au LDP.

  ·  v1.1, 18 août 1998, ajout des informations à propos du patch IrCOMM
     de Takahide Higuchi, changements mineurs.

  ·  v1.2, 24 août 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, téléphones cellulaires, appareils photo numériques,
     connexion Linux à Linux, le superbe CVS, économie d'énergie,
     quelques changements dans la configuration système générale,
     changements dans l'aperçu du matériel, 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 contrôle à distance,
     changements dans la section dongles, changements mineurs.

  ·  v2.0, 9 janvier 1999, réécriture quasi complète et un réarrangement
     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 résolution des problèmes,
     changement dans l'ordre du chapitre des bugs connus, suppression de
     quelques coquilles.

  ·  v2.3, 4 février 1999, ajout de la section Infrarouge et protection
     des yeux écrite par Andreas Butz, correcteur d'orthographe...,
     remaniements dans la section paramètrage du noyau, ajout de
     quelques informations par Andreas Butz, changements mineurs.

  ·  v2.4, 9 février 1999, changement des informations sur comment
     appliquer un patch.



  1177..  CCooppyyrriigghhtt eett ddéénnééggaattiioonn

  Copyright © 1998, 1999 par Werner Heuser (et © 1999 par Mathieu Arnold
  pour la traduction française). 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'après 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
  aveuglément, spécialement 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 effectuées 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 décrit la façon d'utiliser Linux pour se connecter à un
  fournisseur d'accès Internet au moyen d'une connexion TCP/IP par
  modem.  Il explique la procédure d'appel téléphonique et d'établisse­
  ment du protocole IP, ainsi que la façon de gérer le courrier élec­
  tronique et les forums de discussion USENET.
  ______________________________________________________________________

  Table des matières


  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 procédure de connexion ?

  7. Pour finir

     7.1 Y a t'il d'autres choses que je devrais savoir ?

  8. Informations spécifiques aux F.A.I.

     8.1 Comment en savoir plus ?
     8.2 Remerciements


  ______________________________________________________________________


  11..  IInnttrroodduuccttiioonn

  Ce document est fait pour répondre aux questions des clients des
  F.A.I.  (Fournisseurs d'Accès Internet) concernant la façon de
  configurer et d'utiliser Linux.

  Afin d'aider ceux qui veulent connecter leurs machines Linux à un
  F.A.I. pour la première fois, ce document essaie de couvrir la plupart
  des situations possibles. Ceci provoque, inévitablement, plusieurs
  recoupements avec les autres HowTo Linux et livres du Linux
  Development Project (L.D.P.).  Pour mieux appréhender les détails, il
  est conseillé de se référer à ces documents.


  La plupart des documentations existantes s'adressent à des
  utilisateurs ayant une certaine expérience, et les utilisateurs
  débutants ont souvent des problèmes pour en extraire les informations
  intéressantes.

  Pour simplifier, les exemples de ce document supposeront ce qui suit :



  ·  Nom d'utilisateur : dirk

  ·  Mot de passe: SuperSecret

  ·  Fournisseur d'accès Internet : acme.xz

  ·  Serveur de mail : mail.acme.xz

  ·  Serveur de news : news.acme.xz

  ·  Serveur de noms : 193.212.1.0

  ·  Numéro de téléphone : 12345678

  La machine de dirk s'appelle roderick.

  Toutes les informations ci-dessus doivent naturellement être
  remplacées par celles concernant le F.A.I. que vous utilisez. La
  plupart du temps, un minimum de modifications doivent être apportées
  pour les utilisateurs ayant plusieurs F.A.I. Informez-moi des
  problèmes que vous rencontrez sur ce point.


  11..11..  CCooppyyrriigghhtt

  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


  11..22..  LLiimmiitteess ddee rreessppoonnssaabbiilliittéé

   Aucune responsabilité quant au contenu de ces documents ne peut être
  acceptée. Vous utilisez les concepts, exemples et autres contenus à
  vos propres risques.

  L'une des nombreuses configurations possibles sera décrite. Dans le
  monde Linux, il y a généralement plusieurs façons de faire les choses.
  Les paragraphes contenant des conseils sont repérés par AALLTT :: Notez
  aussi que les références FTP changent souvent légèrement
  lorsqu'apparaissent de nouvelles versions des programmes.

  Pour autant que je sache, seuls seront décrits les programmes qui
  peuvent être utilisés ou évalués dans un but personnel. La plupart de
  ces programmes seront disponibles avec leurs sources sous une licence
  GNU-like.


  11..33..  TTrraadduuccttiioonnss

  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
  Coréen, par Kidong Lee :

  http://www.postech.ac.kr/~cessi/howto/ISP-Hookup/ISP-Hookup-HOWTO.html

  Français, par Éric Jacoboni :

  http://www.minet.net/linux/HOWTO-fr/ISP-Hookup-HOWTO.html

  Polonais, par Piotr Pogorzelski : UURRLL TTBBAA

  Norégien :

  http://www.kvaleberg.com/no-linux.html


  11..44..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document seront régulièrement postées
  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
  différents sites FTP qui archivent le L.D.P. Parmi ceux-ci :

  ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO

  De plus, vous pourrez généralement trouver ce document sur la page du
  Linux Development Project WWW à :

  http://sunsite.unc.edu/LDP/

  La dernière 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


  11..55..  CCrriittiiqquueess

  Tous commentaires, erreurs constatées, informations supplémentaires et
  critiques de toutes sortes doivent être envoyées à :

  egil@kvaleberg.no

  http://www.kvaleberg.com/

  Tous commentaires concernant la traduction, les éventuelles fautes
  commises par le traducteur doivent être envoyées à :

  jaco@mail.dotcom.fr



  22..  CCoommmmeenntt ssee ccoonnnneecctteerr aauu rreessttee dduu mmoonnddee ??

  Je suppose que les composants logiciels réseau essentiels de votre
  distribution Linux ont été installés, et qu'il a été décidé quel sera
  le port série utilisé par

  En général, la configuration par défaut permet uniquement un accès
  direct à /dev/modem sous le compte root.


  Pour se connecter directement à un F.A.I, et pour expérimenter les
  séquences de connexion, on peut utiliser le programme minicom,
  relativement simple à utiliser.


  22..11..  LLaa ccoonnffiigguurraattiioonn ddee bbaassee

  La configuration de la machine pour son utilisation sur le réseau doit
  se faire sous le compte root.  Avant d'aller plus loin, il faut
  vérifier que le fichier ligne suivante :




       ALL: ALL





  Normalement, on veut s'autoriser soi-même, 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 privilégiés ayant
  une adresse fixe, il y aura quelques différences à 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 désire.  Pour
  cela, il faut mettre ce nom dans



       roderick




  L'étape suivante consiste à déclarer le serveur de noms dans



       search .
       nameserver 193.212.1.0



  Le serveur de noms soit être spécifié par une adresse IP numérique qui
  dépend du F.A.I. On peut avoir jusqu'à trois serveurs de noms
  différents, chacun sur une ligne différente, ils seront appelés dans
  l'ordre où ils sont listés.

  Si l'on veut pouvoir utiliser des noms comme unemachine pour résumer
  le nom complet unemachine.acme.xz, on doit remplacer la première ligne
  par :



       search acme.xz





  Un minimum de configuration sera aussi nécessaire dans /etc/hosts. La
  plupart des utilisateurs seront ainsi capable de gérer :



       127.0.0.1      localhost
       0.0.0.0        roderick




  Ceux possédant 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 nécessaires pour se connecter
  au F.A.I. doivent être spécifiés 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 procédure de connexion
  elle-même doivent être précisés avant que PPP soit démarré. 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 peaufinées pour les cas particuliers. Le
  numéro de téléphone dans la troisième ligne doit, bien sûr, être celui
  du fournisseur d'accès. Certains peuvent remplacer la chaîne
  d'initialisation ATZ du modem par une autre, plus adaptée au modem
  qu'ils utilisent. La dernière ligne spécifie que l'on attend un prompt
  se terminant par name:, et que la réponse doit être ppp. D'autres
  systèmes peuvent avoir d'autres procédures de connexion.

  Pour réellement lancer une connexion, le protocole PPP peut être
  initialisé en lançant 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 détruit en tapant ctrl-C.  concernant la connexion
  seront ajoutés aux fichiers diagnostics du système.  Pour les lire, il
  suffit de faire :



       tail /var/adm/messages






       dmesg





  Aussi longtemps que la connexion PPP fonctionne, on a accès à Internet
  et on peut utiliser des programmes comme ftp, ncftp, rlogin, telnet,
  finger etc.  Tous ces programmes font partie du paquetage réseau.

  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 sécurité. Le fichier /etc/inetd.conf énumère tous
  les services que notre machine offrira au monde extérieur. Avec le
  fichier /etc/hosts.deny que l'on a créé plus haut, aucun accès
  extérieur n'est permis. Pour ceux qui en ont besoin, les accès 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 dernière remarque mineure : une certaine confusion existe sur les
  noms des protocoles POP. Une définition dans le fichier près tout
  est :



       pop2      109/tcp   pop-2          # PostOffice V.2
       pop3      110/tcp   pop-3 pop      # PostOffice V.3




  AALLTT :: A la place de on peut utiliser le programme souple : mais pas en
  même temps que

  AALLTT :: Les privilégiés ayant une connexion TCP/IP permanente, par
  exemple par un réseau Ethernet, peuvent sans problème tout ignorer sur
  PPP et se concentrer sur la configuration de leur carte réseau.

  AALLTT :: Certains peuvent ne pas avoir la possibilité d'utiliser PPP,
  mais peuvent utiliser SLIP à la place. Ce dernier protocole est
  supporté de la même façon 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.


  33..  CCoommmmeenntt ssuurrffeerr  ??

  Si l'on considère 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.


  44..  CCoommmmeenntt eennvvooyyeerr eett rreecceevvooiirr dduuccoouurrrriieerr éélleeccttrroonniiqquuee ??

  D'abord, il faut s'assurer que installé.  Sendmail trie le courrier
  interne et à destination de l'extérieur 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 sûr, nécessaire d'avoir une adresse de domaine ooffffiicciieellllee
  pour le courrier extérieur. Cette information est donnée dans



       # who I masquerade as (null for no masquerading)
       DMacme.xz





  Ceci suppose que l'on ait le même nom d'utilisateur local que pour son
  F.A.I. S'il est différent, précisez le nom complet à la place :



       DMdick@acme.xz




  Sendmail est maintenant configuré pour envoyer ddiirreecctteemmeenntt au
  destinataire. Pour éviter de longues connexions répétitives dans les
  cas où la connexion du destinataire est lente et irrégulière, il est
  généralement pratique d'utiliser un F.A.I. comme moyen de stockage.
  Ceci doit être précisé par une spécification DS :


       # "Smart" relay host (may be null)
       DSmail.acme.xz




  Attention : sendmail est quelque peu sensible à la présence de
  caractères de tabulation dans utiliser l'éditeur caractères de
  tabulation sont laissés inchangés.

  La réception de courrier est souvent réalisée par le protocole POP3
  qui peut être démarré à 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é après que la connexion PPP ait été établie.
  Attention : ce script est uniquement pour tester, il faut donc
  s'assurer que la boîte à lettres locale n'est pas modifiée pendant
  l'exécution du script. L'option -k indique que le courrier doit être
  llaaiisssséé dans la boître à lettre du F.A.I. et que l'on récupère
  seulement une copie du courrier. Bien sûr, une fois que l'on sait que
  la configuration fonctionne, on enlève cette option.

  Attention : le mot de passe apparaîtra sur la ligne de commande. Notez
  aussi que popclient est obsolète et que vous devriez utiliser

  Une version plus sécurisée et améliorée de ce script peut être
  récupérée à l'adresse suivante :

  ftp://ftp.sol.no/user/egilk/pop-script.tar.gz

  Cette version du script nécessite l'installation de procmail, mais
  c'est un travail que l'on ne regrettera jamais de toutes façons. 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 critères. Il est aussi capable de
  gérer des tâches 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 différente de celle décrite dans
  la documentation de ce programme. Le fichier .forward nn''eesstt ppaass
  nécessaire, 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 trouvée dans des programmes comme pine ou

  AALLTT :: Fetchmail est maintenant une alternative très améliorée de
  popclient. La dernière version est disponible à :

  ftp://ftp.ccil.org/pub/esr/fetchmail/fetchmail-3.3.tar.gz

  AALLTT :: S'il n'est pas réellement nécessaire d'avoir le démon sendmail
  activé, on peut mettre en commentaires le démarrage de sendmail, comme
  cela est généralement fait dans /etc/rc.d/rc.M (ceci peut varier selon
  les distributions) afin de réduire l'utilisation des ressources et
  d'autres problèmes potentiels.

  AALLTT :: A la place de sendmail on peut utiliser le programme description
  de celui-ci (et de bien d'autres choses évoquées 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.

  AALLTT :: Il existe aussi un ensemble de macros m4 pour réaliser un
  convenir à une simple installation aussi bien que pour modifier une
  configuration existante.

  AALLTT :: Il y a encore d'autres possibilités plus simples mais moins
  souples pour gérer le courrier. Par exemple, le programme Pine peut
  fonctionner de manière autonome s'il est configuré correctement. On
  peut aussi utiliser certains explorateurs Web.

  AALLTT :: 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/

  AALLTT :: Une alternative à popclient est pop-perl5, disponible à :

  ftp://sunsite.unc.edu/pub/Linux/System/Mail/pop-perl5-1.1.tar.gz


  55..  LLeess NNeewwss

  55..11..  CCoommmmeenntt ccoonnffiigguurreerr uunn lleecctteeuurr ddee NNeewwss oonnlliinnee ??

  news oonnlliinnee.  Il y a beaucoup de programmes disponibles pour cela,
  deux possibilités simples étant

  Pour commencer à lire les news, la seule chose nécessaire pour la
  configuration est, dans la plupart des cas, de configurer NNTPSERVER
  (généralement 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 nécessitent _é_v_e_n_t_u_e_l_l_e_m_e_n_t :




       export NNTP_INEWS_DOMAIN=acme.xz






  55..22..  CCoommmmeenntt ccoonnffiigguurreerr uunn lleecctteeuurr ddee NNeewwss oofffflliinnee ??

  offline, réduire la note de téléphone et avoir une plus grande
  souplesse, on peut mettre en place un serveur local de News. Ceci
  nécessite un peu de configuration ainsi que de l'espace sur le disque.
  Après l'installation, les choses fonctionneront plus ou moins d'elles-
  mêmes. Un peu d'attention sera nécessaire de temps en temps.

  Deux solutions différentes seront décrites.


  55..33..  CCoommmmeenntt iinnssttaalllleerr CC NNeewwss??

  Cette solution est basée sur le serveur de News CC NNeewwss et sur le
  protocole NNTP.  C News était prévu, à l'origine, pour un autre type
  de configuration, mais est suffisamment souple pour gérer aussi notre
  situation. On peut aussi utiliser le serveur de News IINNNN plus récent
  mais aussi plus gourmand en ressources. Quel que soit le choix, il
  faut veiller a nnee ppaass 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
  placés dans le répertoire /usr/lib/news. Une façon 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-têtes.
     Dans notre cas :



       Dirk Gently's Holistic Detective Agency






  ·   contenir : acme.xz.

  ·   site dans le thread Path:.  Dans une configuration telle qu'elle
     est décrite 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 sûr 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 départ sur notre propre site.
     Dans cette configuration simplifiée, on suppose que tous les
     groupes viennent du même endroit.  ./all précise la distribution,
     et ddooiitt être inclus.  La lettre F indique que les articles de news
     sortants seront regroupés dans un fichier.



       ME:all/all::
       acme/acme.xz:all,!junk/all:FL:






  ·  Un sous-répertoire pour les News sortantes doit être créé. Ici :



       mkdir /var/spool/news/out.going/acme






  ·   les groupes modérés, bien que cette tâche puisse être
     habituellement laissée au F.A.I.

  C News nécessite un peu de maintenance journalière, mais ceci peut
  être spécifié une fois pour toute en utilisant la commande crontab -e
  configuration possible qui peut être ajustée 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 nécessaire
       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 périmés
  chaque nuit à 00:30 et les trois dernières commandes réalisent
  différentes tâches d'administration et de correction d'erreur.

  On doit aussi s'assurer que tout est correct lorsqu'on démarre 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 récupérées 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 très simple. Son installation est
  classique :


       make
       su
       make install
       exit

  Avec cette configuration, tout ce que l'on a à faire est de créer les
  groupes que l'on veut lire en utilisant la commande addgroup.

  Pour récupérer 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 nécessaires.

  newsx s'occupe aussi de poster les articles sortants.

  Pour contrôler la suppression des articles périmés, 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 déchets sont vite supprimés
       junk,control                       x    2       -

       # défaut:  14 jours, pas  d'archivage
       all                                x    14      -




  AALLTT :: Pour les petits serveurs de News, on n'a pas souvent besoin du
  contrôle newgroup. Le trafic est éénnoorrmmee comparé à son utilité
  possible. Le point essentiel est que les articles soient supprimés et
  que les groupes puissent être créés automatiquement. Pour être sûr que
  les messages de contrôle 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 crées
  (y), et l'utilisateur news en sera averti (v).  Tout le reste sera
  silencieusement (q) ignoré (n).  La dernière ligne suffit si l'on veut
  créer tous les groupes manuellement.

  AALLTT :: Une alternative à newsx est suck.





  55..44..  CCoommmmeenntt ccoonnffiigguurreerr LLeeaaffnnooddee??

  Une tout autre solution consiste à installer le paquetage intégré
  nécessaires à 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 répertoire 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 préfixe /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 contrôle 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 déclare le serveur NNTP.  Dans notre cas :


       server = news.acme.xz




  Leafnode se recherchera lui-même 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 réalisé 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 décrite 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 transférera une
  liste des groupes de news disponibles. Leafnode s'occupera alors des
  groupes que les utilisateurs désirent et s'adaptera la pprroocchhaaiinnee ffooiiss
  qu'il est activé.

  Notez que leafnode semble ne pas fonctionner dans les cas où une
  autorisation NNTP est nécessaire.

  AALLTT :: Une alternative à leafnode est nntpcache, disponible à :

  ftp://ftp.suburbia.net/pub/nntpcache/nntpcache.tgz

  AALLTT :: Une autre possibilité est d'utiliser le lecteur de news
  pullslrn-pull. Le lecteur de news doit avoir été compilé avec l'option
  spool.


  66..  CCoommmmeenntt aauuttoommaattiisseerr llaa pprrooccéédduurree ddee ccoonnnneexxiioonn ??

  La gestion automatisée des news et du courrier est simple à réaliser
  sous Linux.

  Tout d'abord, on doit créer un script /usr/lib/ppp/ppp-on qui démarre
  la connexion au F.A.I. Souvent, ce fichier contient simplement la
  ligne suivante :


       /usr/sbin/pppd




  Les précisions supplémentaires 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

  Après avoir testé le fonctionnement de ces deux scripts, on doit
  écrire ceux qui réalisent les différentes tâches. Le script pour
  récupérer le courrier a été décrit 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 &

       # récupérer 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

  # déconnexion...
  /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 très facile d'étendre tout ceci afin de n'établir une connexion
  que si du courrier ou des news sortants sont présents.  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 intégrer ensemble. On peut ajouter plusieurs autres tâches par la
  suite, comme le réglage 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).

  AALLTT :: Selon les préférences, il est aussi possible de renverser le
  processus. Chaque fois qu'une connexion PPP est établie, le script
  ajouter tout ce qui est nécessaire pour démarrer l'échange de courrier
  et des news. Voir man pppd pour plus de détails.

  AALLTT :: On peut aussi se connecter en PPP à chaque fois qu'un trafic
  réseau est détecté.  C'est, dans bien des cas, la solution la plus
  élégante mais elle est tributaire d'une bonne configuration pour
  éviter l'établissement de connexions fréquentes et coûteuses.  Plus
  d'information peut être trouvée à :

  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 même endroit, on trouvera aussi d'autres variations sur les
  connexions PPP.


  77..  PPoouurr ffiinniirr

  77..11..  YY aa tt''iill dd''aauuttrreess cchhoosseess qquuee jjee ddeevvrraaiiss ssaavvooiirr ??



  ·  Les différents messages d'erreurs du système seront normalement
     envoyés en courrier interne. Pour s'assurer qu'ils pourront être
     lus, on doit créer un fichier commande newaliases à chaque fois
     qu'on change ce fichier. Un exemple qui devrait couvrir la plupart
     des éventualités 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 trouvés sur
     encombré. Cependant, il y a de nombreux miroirs et chaque fois
     qu'une référence à 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
     répertoires standards est possible en utilisant le programme
     yarn2mf disponible à :

  ftp://ftp.sol.no/user/egilk/yarn2mf.zip


  88..  IInnffoorrmmaattiioonnss ssppéécciiffiiqquueess aauuxx FF..AA..II..

  Des informations plus spécifiques à certains F.A.I. sont disponibles à
  partir de plusieurs sources :


  DDéémmoonn IInntteerrnneett

  ftp://ftp.demon.co.uk/pub/unix/linux/Demon/slack3.0.help.tgz

  NNeettccoomm

  http://www.netcom.com/bin/webtech/NetCruiser/Operating_Systems/Linux/linux.cfg.html

  PPoowweerrTTeecchh,, TTeelleennoorr OOnnlliinnee,, TTeelliiaa

  http://www.kvaleberg.com/no-isp.html

  SSttaannffoorrdd

  http://www-leland.stanford.edu/ wkn/Linux/network/network.html

  MMCCII

  http://www.kvaleberg.com/linux-mci.html

  SSIISSCCOOMM

  http://www.siscom.net/support/linux_setup.htm

  AAOOLL ce n'est pas possible car AOL utilise un protocole propriétaire.

  Si vous pouvez donner une information spécifique à un F.A.I qui n'est
  pas listée ici, merci de le signaler.


  88..11..  CCoommmmeenntt eenn ssaavvooiirr pplluuss ??

  Le livre du Linux Documentation Project, intitulé Linux Network
  Administrator's Guide (NdT : traduit en français sous le titre
  Administration réseau 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 nécessaires, 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 structurée.

  Les HOWTOS suivants sont particulièrement pertinents :



  ·  IInnssttaallllaattiioonn--HHOOWWTTOO donne toutes les bases.

  ·  NNEETT--22--HHOOWWTTOO est une description très minutieuse de l'installation
     et de la configuration du code NET.  La plupart de ces opérations
     doit sûrement avoir déjà été faite si on utilise une distribution
     Linux standard (par ex. Slackware, Red Hat, Debian).  Mais
     plusieurs sections sur la configuration et les problèmes rencontrés
     valent vraiment la peine d'être lues.

  ·  MMaaiill--HHOOWWTTOO explique comment configurer les différents outils. Comme
     précédemment, la plupart de ces réglages auront déjà été faits lors
     de l'installation d'une distribution Linux standard.

  ·  NNeewwss--HHOOWWTTOO concerne la mise en place d'un spool de News classique.

  ·  TTiinnyy--NNeewwss couvre encore une autre possibilité pour récupérer les
     News.

  ·  PPPPPP--HHOOWWTTOO est une bonne description des problèmes que que l'on peut
     rencontrer lorsqu'on met en place une connexion PPP.

  ·  SSeerriiaall--HHOOWWTTOO contient tout ce que l'on doit savoir sur la
     configuration des ports série.

  ·  MMaaiill--QQuueeuuee explique comment configurer _s_e_n_d_m_a_i_l pour toujours
     mettre en attente le courrier distant tout en délivrant le courrier
     local en même temps.

     Red Hat a une liste de diffusion spécialisée pour PPP ; pour en
     faire partie, envoyez un message à

  redhat-ppp-list-request avec le champ sujet suivant :


       subscribe





  88..22..  RReemmeerrcciieemmeennttss

  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 Août 1998

  Ce document décrit comment obtenir et installer Linux. C'est le pre­
  mier document qu'un nouvel utilisateur de Linux devrait lire pour
  débuter.
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 But de ce document
     1.2 Autres sources d'informations
     1.3 Nouvelles versions de ce document
     1.4 Réactions et corrections

  2. Dernières modifications

  3. L'option la plus simple  achetez, ne construisez pas

  4. Avant de commencer

     4.1 Matériel nécessaire
     4.2 Espace disque nécessaire et coexistence
     4.3 Choisir une distribution Linux

  5. Présentation de l'installation

     5.1 Étapes fondamentales de l'installation
     5.2 Parties fondamentales d'un kit d'installation

  6. L'installation en détails

     6.1 Se préparer pour l'installation
     6.2 Créer les disquettes de « boot » et de « root »
     6.3 Repartitionner les disques DOS/Windows
     6.4 Créer des partitions pour Linux
        6.4.1 Partitions : les bases
        6.4.2 Taille des partitions
     6.5 Démarrer 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 Après l'installation des paquetages
        6.8.1 LILO, le LInux LOader
        6.8.2 Créer une disquette de démarrage (option)
        6.8.3 Configurations système diverses

  7. Démarrer votre nouveau système

  8. Après votre premier démarrage

     8.1 Début de l'administration système
     8.2 Configuration personnalisée de LILO

  9. Administrivia

     9.1 Conditions d'utilisations
     9.2 Remerciements


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  BBuutt ddee ccee ddooccuummeenntt

  Linux est une implantation librement diffusable d'Unix pour des
  ordinateurs personnels courants (à l'origine développé 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 réseaux 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'intéresse à 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.


  11..22..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  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 dernière 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
  générales 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 réponses !)  courantes sur Linux -- c'est un « devoir
  de lecture » pour les nouveaux utilisateurs.

  Vous pouvez obtenir de l'aide pour les problèmes courants dans les
  forums USENET comp.os.linux.help et comp.os.linux.announce. Pour ceux
  qui prefèrent le français, les groupes fr.comp.os.linux,
  fr.comp.os.linux.moderated et fr.comp.os.linux.annonces sont très
  actifs.

  Le « Linux Documentation Project » écrit un ensemble de manuels et de
  livres sur Linux, tous librement diffusables sur le réseau 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 décrivant 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 système, et beaucoup plus
  d'informations que vous ne pourrez en trouver ici. Vous pouvez le
  consulter, ou télécharger une copie, sur la page d'accueil du LDP.

  Cet ouvrage a été traduit en français, comme la majeure partie des
  documents du LDP. Le site de référence 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 plutôt que vers Linux, mais il contient des
  informations utiles sur la configuration des disques et des
  gestionnaires de boot pour les configurations multi-OS.

  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  De nouvelles versions du "Linux Installation HOWTO" sont postées
  périodiquement dans <tt>comp.os.linux.help</tt>,  et news.answers
  <news:answers>.  Elles sont aussi téléchargées sur les différents
  sites WWW et FTP Linux, dont la page d'accueil du LDP.

  Vous pouvez consulter la dernière version sur le web à l'adresse
  <http://sunsite.unc.edu/LDP/HOWTO/Installation-HOWTO.html>.

  (NDT : La version française de se document est postée dans
  <fr.comp.os.linux.annonces> tous les mois, ainsi que les autres
  adaptations françaises des HOWTOS...)


  11..44..  RRééaaccttiioonnss eett ccoorrrreeccttiioonnss

  Si vous avez des questions ou des commentaires concernant ce document,
  n'hésitez 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 problèmes de matériels
  rencontrés 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 problèmes de
  matériel et leurs diagnostics est en préparation.


  Tout ce qui concerne la traduction française : 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.
  .

  22..  DDeerrnniièèrreess mmooddiiffiiccaattiioonnss


  ·  Ajout de « Achetez, ne construisez pas ».


  33..  LL''ooppttiioonn llaa pplluuss ssiimmppllee  aacchheetteezz,, nnee ccoonnssttrruuiisseezz ppaass

  Linux est maintenant suffisamment mature pour qu'il y ait des
  intégrateurs de systèmes 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 intégrateurs offrent un service valable
  en garantissant que vous n'aurez pas un matériel qui sera mort deux
  jours après son déballage.

  Il existe plusieurs sociétés de ce type (et je les énumèrerai 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 très bonne qualité, avec un joli
  logo de Tux le pingouin sur leur face avant. Ils sont intimement liés
  à la communauté Linux (le Projet Debian <http://www.debian.org> est
  sur une machine de leur arrière salle, Linus possède une de leurs
  machines, et ils envoient même 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-même Linux.
  44..  AAvvaanntt ddee ccoommmmeenncceerr

  Avant de pouvoir installer Linux, vous devez être sûr 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 données de configuration avant de commencer.


  44..11..  MMaattéérriieell nnéécceessssaaiirree

  Quel type de système est nécessaire pour faire tourner Linux ?  Bonne
  question, la liste des matériels reconnus par le système change
  fréquemment. 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 complète des matériels 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 matérielle similaire à
  celle qui suit est nécessaire :

  N'importe quel processeur 80386, 80486, Pentium ou Pentium II
  convient. Les clones Non-Intel des 80386 et au dessus fonctionneront
  généralement. Vous n'avez pas besoin de coprocesseur arithmétique bien
  qu'il est agréable 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 développement les plus récents
  (2.1.x), mais peut ne pas être disponible tout de suite. Tout CPU, du
  386SX au P-6 convient. Un coprocesseur arithmétique n'est pas
  nécessaire mais il est préférable d'en avoir un.

  Au moins 4 Mo de mémoire sont nécessaires. En théorie, Linux pourrait
  se suffire de 2 Mo, mais la plupart des installations et des
  programmes nécessitent 4 Mo. Plus vous aurez de mémoire, 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 contrôleur disque
  au standard AT. Tous les disques et contrôleurs MFM, RLL et IDE
  devraient fonctionner.  De nombreux disques et contrôleurs 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 matériel SCSI. Si vous achetez un nouveau système pour faire
  tourner Linux, le faible surcoût du SCSI est dérisoire face à
  l'amélioration 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 obsolètes
  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
  tâches de maintenance)

  Vous avez aussi besoin d'une carte vidéo et d'un écran MDA, Hercules,
  CGA, EGA, VGA, ou Super VGA.  En général, 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 matériels vidéo 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'exécution de X et sur ses besoins.

  Un lecteur de CD-ROM est nécessaire. S'il est ATAPI, SCSI, ou vrai
  IDE, vous ne devriez pas avoir de problème pour le faire fonctionner
  (mais faites attention aux lecteurs bon marché annonçant une interface
  « IDE » qui n'en n'est pas une vraie). Si votre CD-ROM utilise une
  carte d'interface propriétaire, 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 empêcher l'installation. De plus, les
  CD-ROMs reliés au port parallèle 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 détails des matériels reconnus.

  Les cartes sans jumper, appelées « Plug'n'Play », peuvent poser
  problème. Leur support est en cours de développement, mais encore
  absent du noyau 2.0.25. Heureusement, ce n'est un problème 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.


  44..22..  EEssppaaccee ddiissqquuee nnéécceessssaaiirree eett ccooeexxiisstteennccee

  Vous avez besoin d'espace libre sur votre disque pour y mettre Linux.
  La taille de cet espace dépend 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 mémoire virtuelle sur
  votre machine), l'espace disponible pour les utilisateurs, etc.

  Il est possible de faire tourner un système 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 utilisée dépend 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 systèmes
  d'exploitation, comme MS-DOS, Microsoft Windows, ou OS/2. (En fait,
  vous pouvez même accéder aux fichiers MS-DOS, voire exécuter 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 détaillerons
  ce mécanisme de « dual-boot » plus loin.

  Vous n'avez PAS besoin d'être sous MS-DOS, OS/2, ou un autre système
  d'exploitation pour utiliser Linux.  Linux est un système
  d'exploitation complètement différent et autonome ; il n'a pas besoin
  d'autre OS pour son installation et son utilisation.

  Pour résumer, la configuration minimale pour Linux n'est pas beaucoup
  plus importante que celle nécessaire à la plupart des systèmes MS-DOS
  ou Windows 3.1 actuels (et c'est moins que le minimum pour Windows 95
  !). Si vous possédez 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 mémoire, ni un processeur ultra rapide. Matt Welsh, le
  créateur de ce HOWTO, utilisait Linux sur un 386 à 16 MHz (la machine
  la plus lente que l'on peut posséder), avec 4 Mo de RAM, et en était
  très content. Plus vous voudrez faire de choses, plus vous aurez
  besoin de mémoire et d'un processeur plus rapide. D'après mon
  expérience, un 486 avec 16 Mo de RAM, et tournant sous Linux, est plus
  performant que certains modèles de stations de travail d'un prix bien
  plus élevé.
  44..33..  CChhooiissiirr uunnee ddiissttrriibbuuttiioonn LLiinnuuxx

  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 procédure 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>, décrit les nombreuses distributions disponibles par FTP
  ou par correspondance.

  Lorsque ce HOWTO fut écrit pour la première fois, dans un passé
  lointain (1992 - 1993), la plupart des gens récupéraient Linux en
  utilisant des chemins tortueux. Cela impliquait de longs
  téléchargements à partir d'Internet ou d'un BBS sur leur machines DOS,
  suivis d'une procédure élaborée permettant de transférer ce qui avait
  été récupéré sur de multiples disquettes. Une de ces disquettes était
  alors bootée et utilisée 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 façon de procéder reste encore possible (vous pouvez
  télécharger une des nombreuses distributions à partir de
  <http://sunsite.unc.edu/pub/Linux/distributions/INDEX.html>), il
  existe des méthodes 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 généralement 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
  généralement plusieurs distributions et un contenu récent des sites
  les plus importants de Linux, comme sunsite ou tsx-11.

  Dans la suite de ce HOWTO, nous décrirons 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 préférable de consulter le
  manuel pour les instructions d'installation détaillées.


  55..  PPrréésseennttaattiioonn ddee ll''iinnssttaallllaattiioonn



  55..11..  ÉÉttaappeess ffoonnddaammeennttaalleess ddee ll''iinnssttaallllaattiioonn

  Le plan de l'installation de Linux est simple :


  1. Récupérez les informations sur la configuration de votre matériel.

  2. Créez les disquettes d'installation.

  3. Si vous voulez disposer d'un système « dual-boot » (Linux et DOS ou
     Windows à la fois) réarrangez (repartitionnez) votre disque pour
     faire de la place à Linux.

  4. Démarrez un mini-Linux d'installation à partir des disquettes afin
     d'accéder au CD-ROM.
  5. Préparez les systèmes 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. Démarrez Linux à partir du CD-ROM.

  8. (Optionnel) Installez d'autres paquetages à partir du CD-ROM.


  55..22..  PPaarrttiieess ffoonnddaammeennttaalleess dd''uunn kkiitt dd''iinnssttaallllaattiioonn

  Voici les parties fondamentales d'une distribution installable :


  1. Les fichiers README et FAQ. Ceux-ci se trouvent habituellement dans
     le répertoire racine de votre CD-ROM et peuvent être lus dès que le
     disque a été monté sous Linux. (En fonction de la façon dont le CD-
     ROM a été fait, ils peuvent même être visibles sous DOS/Windows.)
     Il est souhaitable de lire ces fichiers dès que vous pourrez y
     accéder afin d'être tenu au courant des changements et des mises à
     jour importantes.

  2. Plusieurs images de « bootdisk » (souvent dans un sous-répertoire).
     L'une de celles-ci est le fichier que vous copierez sur une
     disquette afin de créer la disquette de boot. Vous choisirez uunnee de
     ces images en fonction du type de matériel dont vous disposez sur
     votre système.

  Le problème est que certains pilotes de matériel entrent bizarrement
  en conflit les uns avec les autres et, au lieu d'essayer de déceler
  les problèmes de matériel sur votre système, il est plus facile
  d'utiliser une disquette image de boot qui ne lancera que les pilotes
  nécessaires. (Ceci aura, en plus, l'avantage de réduire votre noyau.)


  ·  Une image de « rootdisk » (ou peut-être deux). C'est un fichier que
     vous copierez sur une disquette pour créer la, ou les, disquette(s)
     d'installation. De nos jours, la (les) disquette(s) « root » est
     (sont) généralement indépendante(s) du matériel ; elle(s)
     suppose(nt) un écran couleur EGA ou mieux.

  ·  Une disquette image de dépannage. C'est une disquette contenant un
     noyau de base et des outils pour réparer les dégats au cas où
     quelque chose n'irait pas avec le noyau ou si le démarrage 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 prévoyez de créer vos
  disquettes « boot » et « root » à partir d'un système MS-DOS. Si vous
  avez accès à une station de travail UNIX disposant d'un lecteur de
  disquettes, vous pouvez vous en servir pour créer 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-même.  Le but de la disquette « boot » est de
     préparer votre machine au chargement des disquettes « root » ou
     d'installation, qui ne sont elles-mêmes que des moyens pour
     préparer votre disque dur et copier dessus des parties du CD-ROM.

  66..  LL''iinnssttaallllaattiioonn eenn ddééttaaiillss

  66..11..  SSee pprrééppaarreerr ppoouurr ll''iinnssttaallllaattiioonn

  Linux utilise les composants d'un PC plus efficacement que MS-DOS,
  Windows ou NT, et est donc moins tolérant vis à vis des matériels mal
  configurés. Il y a un minimum de choses à faire avant de commencer
  pour diminuer les risques d'être arrêté par ce genre de problèmes.

  D'abord, récupérez toutes les documentations que vous possédez sur
  votre matériel -- carte mère, carte vidéo, écran, modem, etc. -- et
  gardez-les à portée de main.

  Puis, rassemblez les informations détaillées sur votre configuration
  matérielle. Une façon de réaliser cela facilement, si vous disposez de
  MS-DOS 5.0 ou supérieur, est d'imprimer un rapport en utilisant
  l'utilitaire de diagnostic « msd.exe » de Microsoft (vous pouvez
  ignorer les parties concernant les programmes résidents, la carte
  mémoire, les chaînes d'environnement et la version du système). Entre
  autres choses, ceci vous garantit une information complète et correcte
  sur votre carte graphique et le type de votre souris, ce qui sera
  utile lors de la configuration de X.

  Enfin, vérifiez votre machine pour les problèmes de configuration avec
  du matériel reconnu qui pourrait causer un bloquage irrécupérable
  pendant l'installation de Linux.


  ·  Un système DOS/Windows peut utiliser un (des) disque(s) dur(s) et
     un CD-ROM IDE même si les jumpers maître/esclave ne sont pas
     correctement positionnés sur ces disques. Linux ne fonctionne pas
     ainsi.  En cas de doute, vérifiez vos jumpers maître/esclave !

  ·  Est-ce que l'un de vos périphériques ne possède ni jumper, ni
     mémoire de configuration non volatile ? Si c'est le cas, vous
     pouvez avoir besoin d'une initialisation au démarrage via un
     utilitaire MS-DOS pour démarrer, 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
     problème. Vous pourrez peut-être contourner le problème au moyen de
     paramètres donnés à l'invite du démarrage ; 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 détails.

  ·  Certains systèmes 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 entraîner 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
     détails.

  Si possible, récupérez le numéro de téléphone d'un utilisateur Linux
  expérimenté 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 nécessaire à l'installation. Il sera d'à peu près une
  heure sur un système vierge ou converti en tout Linux, ou jusqu'à
  trois heures pour un système « dual-boot » (ceux-ci ont un taux de
  mauvais démarrage et de plantage bien plus élevé).


  66..22..  CCrrééeerr lleess ddiissqquueetttteess ddee «« bboooott »» eett ddee «« rroooott »»

  Votre CD-ROM Linux peut contenir des aides à l'installation qui vous
  guideront de façon interactive pendant le processus de création des
  disquettes de « boot », de « root » et de récupération.  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 réaliser l'installation -- ses auteurs connaissent certainement
  mieux les spécificités de la distribution que moi, et vous éviterez de
  nombreuses étapes manuelles sujettes aux erreurs.

  Des informations plus détaillées sur la façon de réaliser 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 première étape sera de choisir une image de disquette de « boot
  » convenant à votre matériel.  Si vous devez le faire manuellement,
  vous consterez généralement 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 décrivant chaque image.

  Puis, vous devrez créer 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_é
  formatées MS-DOS.  (Elles doivent être du même type ; si le lecteur de
  disquettes sur lequel vous démarrez 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 paramètre, de la façon suivante :


       C:\> RAWRITE


  Répondez 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
  « formatées Linux »).

  Vous pouvez utiliser les commandes dd(1) sur un système UNIX pour
  faire la même chose.  (Pour cela, vous aurez besoin d'une station de
  travail UNIX disposant d'un lecteur de disquettes, bien sûr.) 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 paramètre la bonne taille de bloc de sortie (le
  paramètre « obs ») ou la commande échouera. Si vous rencontrez des
  problèmes, la page du manuel sur dd(1) peut s'avérer instructive.


  Assurez-vous d'utiliser des disquettes neuves et sans erreur. Les
  disquettes ne doivent pas avoir de blocs défectueux.

  Vous n'avez pas besoin de faire tourner Linux ou MS-DOS pour installer
  Linux. Cependant, cela facilite la création des disquettes de « boot »
  et de « root » à partir de votre CD-ROM. Si vous n'avez pas de système
  d'exploitation installé sur votre machine, vous pouvez utiliser le
  Linux ou le MS-DOS de quelqu'un d'autre juste pour créer les
  disquettes, et installer à partir de là.


  66..33..  RReeppaarrttiittiioonnnneerr lleess ddiissqquueess DDOOSS//WWiinnddoowwss

  Sur beaucoup de systèmes, le disque dur est déjà 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
  système « dual boot », il vous est vivement conseillé de lire un, ou
  plusieurs, des mini-HOWTOs suivants qui décrivent certaines
  configurations « dual boot ». (NdT : Les traductions françaises 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>

  Même s'ils ne sont pas directement applicables à votre système, ils
  vous aideront à comprendre tout ce qui est mis en jeu.

  RREEMMAARRQQUUEE :: Certains Linux peuvent s'installer DANS un répertoire de
  votre partition MS-DOS. (Ce qui n'est pas la même chose qu'installer
  Linux À PARTIR d'une partition MS-DOS). Vous utiliserez alors le
  système de fichiers « UMSDOS » qui vous permet de traiter un
  répertoire de votre partition MS-DOS comme un système de fichiers
  Linux. Vous n'aurez donc pas besoin de repartitionner votre disque
  dur.

  Je ne recommande cette méthode que dans le cas où votre disque a déjà
  quatre partitions (c'est le maximum pour DOS) et qu'un repartionnement
  serait problématique (il ralentirait Linux à cause du surcoût 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 décrit ici. Si vous avez l'intention
  d'utiliser UMSDOS, vous devrez vous débrouiller par vous-même -- ce
  type d'installation n'est pas décrit ici. A partir de maintenant, nous
  considérons 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, réservée pour
  un système d'exploitation particulier.  Si vous n'avez que MS-DOS
  installé, votre disque dur n'a probablement qu'une seule partition qui
  lui est entièrement consacrée.  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 détails, les partitions primaires correspondent
  aux quatre partitions principales de votre disque. Cependant, si vous
  désirez avoir plus de quatre partitions par disque, vous devez créer
  une partition étendue qui peut contenir plusieurs partitions logiques.
  On ne stocke pas les données directement sur une partition étendue --
  celle-ci ne sert qu'à contenir les partitions logiques. Les données ne
  sont stockées 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 créer une partition étendue. Les partitions
  logiques seront ensuite créées 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 préciser le nom
  du périphérique approprié lors de la création des partitions Linux.
  Ceci est décrit en détail plus loin.

  Revenons au repartitionnement du disque. Le problème avec le
  changement de taille des partitions est qu'il n'y a pas de moyen
  (facile) de le faire sans détruire les données stockées dans ces
  partitions. Par conséquent, vous devrez effectuer une sauvegarde
  complète de votre système avant de repartitionner. Pour changer la
  taille d'une partition, on détruit simplement la(les) partition(s), et
  on les recrée avec des tailles inférieures.

  RREEMMAARRQQUUEE:: FIPS est un programme MS-DOS permettant de repartitionner un
  disque sans détruire les données.  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 données qui s'y trouvent. Il est quand même recommandé d'effectuer
  une sauvegarde totale avant de tenter cette opération.

  Si vous n'utilisez pas FIPS, la méthode classique pour modifier les
  partitions est d'utiliser le programme FDISK. Par exemple, supposons
  que vous ayez un disque dur de 80 Mo entièrement dédié à 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, détruisez la partition MS-DOS
  de 80 Mo, et recréez une partition MS-DOS de 40 Mo à la place. Vous
  pouvez alors formater la nouvelle partition et réinstaller vos
  programmes MS-DOS à partir des sauvegardes. 40 Mo sur le disque sont
  inoccupés. Plus tard, vous créerez des partitions Linux sur cette
  portion inutilisée du disque.

  En résumé, pour modifier la taille de vos partitions MS-DOS avec
  FDISK, vous devez :

  1. Faire une sauvegarde complète de votre système.

  2. Créer une disquette système 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. Redémarrer votre ordinateur à partir de cette disquette.

  5. Lancer FDISK, en lui précisant éventuellement le disque à modifier
     (C: ou D:, par exemple).

  6. Utiliser les options du menu de FDISK afin de détruire les
     partitions dont vous voulez changer la taille.  CCeettttee ooppéérraattiioonn
     ddééttrruuiirraa ttoouutteess lleess ddoonnnnééeess ddee cceess ppaarrttiittiioonnss...

  7. Utiliser les options du menu de FDISK pour recréer ces partitions
     avec des tailles inférieures.

  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 créer 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 créez 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 détruire le disque
  logique avec le FDISK de MS-DOS, et (plus tard) créer une partition
  logique pour Linux à sa place.

  Le mécanisme utilisé par OS/2 et d'autres systèmes d'exploitation est
  similaire. Lisez la documentation de ces systèmes pour obtenir les
  détails.


  66..44..  CCrrééeerr ddeess ppaarrttiittiioonnss ppoouurr LLiinnuuxx

  Après avoir repartitionné votre disque, vous devez créer des
  partitions pour Linux. Avant d'expliquer comment faire, nous allons
  parler des partitions et des systèmes de fichiers sous Linux.


  66..44..11..  PPaarrttiittiioonnss :: lleess bbaasseess

  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 représenter un _s_y_s_t_è_m_e _d_e _f_i_c_h_i_e_r_s comme une
  partition formatée pour Linux.  Les systèmes de fichiers servent à
  stocker les fichiers. Chaque système doit avoir au moins un système de
  fichiers racine. Cependant, de nombreux utilisateurs préfèrent
  utiliser plusieurs systèmes de fichiers -- un pour chaque partie
  importante de l'arborescence des répertoires. Par exemple, vous pouvez
  créer un système de fichiers séparé pour y stocker tous les fichiers
  se trouvant sous le répertoire _/_u_s_r.  (Notez que sur les systèmes
  UNIX, ce sont les « / » qui délimitent les répertoires et non les '\'
  comme sous MS-DOS). En ce cas, vous aurez un système de fichiers
  racine et un système de fichiers _/_u_s_r.

  Chaque système de fichiers nécessite sa propre partition. Par
  conséquent, si vous utilisez les systèmes de fichiers racine et _/_u_s_r,
  vous devrez créer deux partitions Linux.

  De plus, beaucoup d'utilisateurs créent une _p_a_r_t_i_t_i_o_n _d_e _s_w_a_p,
  utilisée pour la mémoire virtuelle.  Si vous avez, disons, 4 Mo de
  mémoire installés sur votre machine, et une partition de swap de 10
  Mo, pour Linux vous aurez 14 Mo de mémoire virtuelle.

  Lorsqu'il utilise l'espace de swap, Linux déplace les pages mémoire
  inutilisées pour les mettre sur le disque, ce qui permet d'exécuter
  plus d'applications en même temps sur votre système. Cependant, ce
  déplacement est lent, et ne peut remplacer la mémoire physique réelle.
  Les applications qui nécessitent beaucoup de mémoire (comme X-Window)
  utilisent souvent un espace de swap lorsqu'il n'ont pas assez de
  mémoire physique.

  Presque tous les utilisateurs de Linux emploient une partition de
  swap. Si vous avez 4 Mo de mémoire voire moins, une partition de swap
  est nécessaire pour installer Linux. De toutes façons, 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 dépend de vos besoins en mémoire
  virtuelle. On conseille souvent d'avoir au moins 16 Mo de mémoire
  virtuelle : par conséquent, si vous avez 8 Mo de RAM physique, vous
  créerez une partition de swap de 8 Mo. Notez que les partitions de
  swap ne peuvent dépasser 128 Mo. Si vous avez besoin de plus de 128 Mo
  de swap, vous devrez donc créer plusieurs partitions de swap, et vous
  pouvez en avoir jusqu'à 16 en tout.

  Vous trouverez plus d'informations sur la théorie 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>).

  RReemmaarrqquuee :: Il est possible, bien qu'un peu délicat, de partager les
  partitions de swap entre Linux et Windows 95 sur un système « dual
  boot ». Pour les détails, 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>.

  RReemmaarrqquuee ##11 :: Si vous avez un disque EIDE avec une partition dépassant
  504 Mo, votre BIOS peut ne pas vous permettre de démarrer un système
  Linux qui y serait installé. Par conséquent, mettez votre partition
  racine sous ces 504 Mo. Il ne devrait pas y avoir de problèmes avec
  les disques SCSI qui ont généralement leur propre BIOS disque.  Pour
  les détails 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>.

  RReemmaarrqquuee ##22 :: Vous mélangez les disques IDE et SCSI ?  Alors
  attention. Votre BIOS ne vous permettra peut-être pas de démarrer
  directement à partir d'un disque SCSI.


  66..44..22..  TTaaiillllee ddeess ppaarrttiittiioonnss

  A côté de vos partitions racine et de swap, vous créerez une ou
  plusieurs partitions pour y mettre vos programmes et les répertoires
  d'accueil des utilisateurs.

  Bien, qu'en théorie, 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 nécessaire aux vérifications des
     systèmes de fichiers qui sont effectuées au démarrage ;

  ·  les fichiers ne peuvent grandir au delà des frontières de
     partitions. En conséquence, vous pouvez utiliser ces frontières de
     partition comme des protections contre les programmes (comme les
     news Usenet) qui voudraient consommer d'énormes quantités de
     disque, afin de les empêcher de surpeupler l'espace disque
     nécessaire à votre noyau et au reste de vos applications ;

  ·  si jamais vous avez un problème sur votre disque, formater et
     récupérer une seule partition est une opération moins pénible que
     d'avoir à tout refaire en partant de zéro.

  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 systèmes,
  et une partition _/_h_o_m_e occupant le reste de l'espace disque disponible
  pour les répertoires utilisateurs.


  Vous pouvez faire des choses plus élaborées. Par exemple, si vous
  savez que vous allez utiliser les forums Usenet, vous pouvez leur
  attribuer une partition qui leur sera dédiée afin de contrôler leur
  occupation disque maximale, ou créer une partition _/_v_a_r regroupant les
  fichiers du courrier, des news, et les fichiers temporaires. Mais, à
  l'heure des disques de très grandes capacités et très peu chers, ces
  complications semblent de moins en moins nécessaires pour les
  premières installations Linux. Pour votre premier essai, surtout,
  restez simple.


  66..55..  DDéémmaarrrreerr llaa ddiissqquueettttee dd''iinnssttaallllaattiioonn

  La première étape consiste à lancer la disquette de boot que vous avez
  créée. Normalement, tout devrait se passer sans problème ; le prompt
  de démarrage du noyau devrait se terminer automatiquement après 10
  secondes. Normalement, c'est ainsi que vous démarrerez à partir d'un
  disque IDE.

  En donnant certaines options à la suite du nom du noyau, vous pouvez
  préciser différents paramètres matériels, comme l'IRQ et l'adresse de
  votre contrôleur SCSI, ou la géométrie du disque, avant de lancer le
  noyau Linux. Ce sera peut-être nécessaire si Linux ne détecte pas
  votre contrôleur SCSI ou la géométrie de votre disque, par exemple.

  Notamment, de nombreux contrôleurs SCSI nécessitent de spécifier
  l'adresse du port et l'IRQ au moment du démarrage. De même, les
  machines PS/1, ThinkPad, et ValuePoint d'IBM ne mémorisent pas la
  géométrie des disques dans la CMOS, et vous devrez alors la spécifier
  au démarrage. (Plus tard, vous saurez configurer votre système afin
  qu'il fournisse lui-même ces paramètres.)

  Faites attention aux messages qui s'affichent lors du démarrage du
  système. Ils énumèreront et décriront le matériel que votre
  installation Linux a détecté. Notamment, si vous avez un contrôleur
  SCSI, vous devriez voir une liste des hôtes SCSI détectés. Si vous
  voyez le message



       SCSI: 0 hosts




  Cela veut dire que votre contrôleur SCSI n'a pas été reconnu, et que
  vous devez vous poser la question de savoir comment informer le noyau
  de son emplacement.

  Le système affichera aussi des informations sur les partitions et les
  périphériques détectés. Si l'une de ces informations n'est pas
  correcte, ou manque, vous devrez provoquer une détection du matériel.

  Si tout va bien et que votre matériel semble avoir été reconnu, vous
  pouvez passer à la section suivante, « Utiliser la disquette root ».

  Pour forcer la détection de votre matériel, vous devez entrer les
  paramètres corrects au prompt du démarrage en utilisant la syntaxe
  suivante :



       linux <paramètres...>



  Un bon nombre de paramètres sont disponibles ; nous donnons ci-dessous
  la liste des plus courants. Les disquettes de boot Linux récentes vous
  permettront, le plus souvent, de consulter un écran d'aide décrivant
  ceux-ci avant de démarrer.


  ·  _h_d_=_c_y_l_i_n_d_r_e_s_,_t_ê_t_e_s_,_s_e_c_t_e_u_r_s Précise la géométrie du disque dur.
     Nécessaire pour des machines comme le PS/1, ValuePoint, et ThinkPad
     d'IBM.  Par exemple, si votre disque dur a 683 cylindres, 16 têtes
     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 Précise l'adresse et l'IRQ pour les contrôleurs
     SCSI TMC-8xx de Future Domain. Par exemple :



       linux tmc8xx=0xca000,5





  Notez que le préfixe _0_x doit être utilisé pour les valeurs exprimées
  en hexadécimal.  Ceci est vrai pour toutes les options suivantes.

  ·  _s_t_0_x_=_m_e_m_a_d_d_r_,_i_r_q Précise l'adresse et l'IRQ pour les contrôleurs
     STO2 de Seagate.

  ·  _t_1_2_8_=_m_e_m_a_d_d_r_,_i_r_q Précise l'adresse et l'IRQ pour les contrôleurs
     T128B de Trantor.

  ·  _n_c_r_5_3_8_0_=_p_o_r_t_,_i_r_q_,_d_m_a Précise le port, l'IRQ, et le canal DMA pour
     les contôleurs NCR5380 génériques.

  ·  _a_h_a_1_5_2_x_=_p_o_r_t_,_i_r_q_,_s_c_s_i___i_d_,_1 Précise le port, l'IRQ et
     l'identificateur SCSI pour les contrôleurs AIC-6260. Ceci
     s'applique aux contrôleurs Adaptec 1510, 152x, et Soundblaster-
     SCSI.

  Si vous avez des questions sur ces options de démarrage, lisez le _S_C_S_I
  _H_O_W_T_O, disponible sur tous les sites archives FTP Linux (NdT : Une
  version française 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 détail.


  66..66..  UUttiilliisseerr llaa ddiissqquueettttee rroooott

  Après le démarrage de la disquette de boot, vous serez invité à
  insérer la ou les disquettes root. Ôtez la disquette de boot du
  lecteur, insérez la disquette root, puis tapez _E_n_t_r_é_e pour continuer.
  Éventuellement, une deuxième disquette root vous sera demandée.

  Ce qui se passe, en fait, c'est que la disquette boot fournit un mini-
  système d'exploitation qui (parce que le disque dur n'est pas préparé)
  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 préparer
  votre disque dur et installer Linux dessus à partir de votre CD-ROM.


  66..66..11..  CChhooiissiirr uunnee iinnssttaallllaattiioonn EEGGAA oouu XX

  Cette étape réalisée, les anciens Linux (dont la Slackware) lançaient
  un shell et vous demandaient d'entrer manuellement les commandes
  d'installation dans un ordre déterminé. Ceci est encore possible, mais
  les versions plus récentes démarrent en lançant un programme
  d'installation fenêtré qui vous guide de façon interactive à travers
  ces étapes en vous fournissant un maximum d'aide.

  Vous aurez sûrement la possibilité de configurer X, ainsi le programme
  d'installation pourra être graphique. Si vous choisissez cette façon
  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é réalisée,
  cette configuration sera sauvegardée. Vous pourrez affiner le
  fonctionnement de votre écran plus tard, par conséquent, lors de cette
  étape, vous pouvez commencer avec un mode SVGA 640x480 de base.

  X n'est pas nécessaire 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 façons, vous
  serez amenés à installer X, donc le faire dès le début est une chose
  plutôt sensée.

  Suivez simplement les indications du programme. Elles vous guideront à
  travers les étapes nécessaires à la préparation du disque, à la
  création des comptes utilisateurs et à l'installation des paquetages à
  partir du CD-ROM.

  Dans les sections suivantes, nous décrirons quelques parties épineuses
  de l'installation comme si vous les réalisiez à la main. Ceci devrait
  vous aider à comprendre ce que fait le programme d'installation, et
  pourquoi.


  66..66..22..  UUttiilliisseerr ffddiisskk  eett ccffddiisskk

  Votre première étape d'installation, une fois que la disquette root
  Linux a été lancée, sera de créer ou d'éditer les tables de partitions
  de vos disques. Même si vous avez déjà utilisé FDISK pour configurer
  vos partitions, vous devez revenir à la table des partitions et
  rajouter des informations spécifiques à Linux.

  Pour créer ou éditer des partitions Linux, nous utiliserons la version
  Linux du programme fdisk, ou sa version orientée écran cfdisk.

  En général, le programme d'installation recherchera une table des
  partitions déjà 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
  tolérantes vis à vis d'une table de partitions inexistante ou mal
  faite.

  Par conséquent, vous pouvez (surtout si vous faites une installation
  sur du matériel vierge) devoir commencer avec fdisk afin de vous
  placer dans une situation que cfdisk saura gérer.  Essayez de lancer
  cfdisk ; s'il y a des problèmes, lancez fdisk.  (Une bonne façon de
  procéder, si vous créez un système tout Linux et que cfdisk provoque
  des erreurs, est d'utiliser fdisk pour détruire toutes les partitions
  existantes et de relancer cfdisk pour éditer la table vide.)

  Quelques remarques sur fdisk et cfdisk : les deux programmes prennent
  en paramètre le nom du disque sur lequel vous souhaitez créer 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 créer des partitions Linux sur le premier disque dur
  SCSI de votre système, utilisez la commande (votre programme
  d'installation peut la générer à partir d'un choix du menu) :


       cfdisk /dev/sda


  Si vous utilisez fdisk ou cfdisk sans paramètre, _/_d_e_v_/_h_d_a est pris par
  défaut.

  Pour créer des partitions Linux sur le second disque de votre système,
  spécifiez 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 même
  disque. Par exemple, vous pouvez créer la partition du système 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 première 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 numérotées en partant de
  _/_d_e_v_/_h_d_a_5, _/_d_e_v_/_h_d_a_6 etc.

  RREEMMAARRQQUUEE :: Il est préférable de ne pas créer, ou détruire, des
  partitions d'autres systèmes d'exploitation que Linux avec les
  programmes fdisk ou cfdisk de Linux. Autrement dit, ne créez pas ou ne
  supprimez pas des partitions MS-DOS avec cette version de fdisk ;
  utilisez plutôt la version MS-DOS de FDISK. Si vous essayez de créer
  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
  conséquent 61693 blocs représentent à peu près 61 Mo. Nous ne créerons
  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 système de fichiers racine, une pour les logiciels
  systèmes et une pour la zone des répertoires 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 première
  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 créer 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 création 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 même 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 APRÈS la fin
  de la partition précédente..  Dans notre cas, _/_d_e_v_/_h_d_a_1 se termine sur
  le cylindre 203, nous démarrerons donc la nouvelle partition au
  cylindre 204.

  Comme on peut le constater, si l'on utilise la notation « +80M »,
  celle-ci spécifie une partition de 80 Mo. De même, la notation « +80K
  » spécifierait 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 systèmes de fichiers Linux
  à 64 Mo. Cependant, avec les nouveaux types de systèmes de fichiers,
  ce n'est plus le cas... Les partitions peuvent aller jusqu'à 4 To.

  Puis, nous créeons 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 ».

  Après avoir quitté fdisk, le système peut vous demander de relancer le
  système afin d'être sûr que les modifications soient prises en compte.
  En général, on n'a pas besoin de redémarrer après avoir utilisé fdisk
  -- les versions récentes de fdisk et cfdisk sont suffisamment évoluées
  pour mettre à jour les partitions sans redémarrer.


  66..66..33..  ÉÉttaappeess ssuuiivvaanntteess

  Après avoir édité les tables de partitions, le programme
  d'installation devrait les consulter et vous proposer d'activer la
  partition de swap. Répondez oui.


  (Attention, il se peut que, sur un système « dual boot », l'une des
  partitions non Linux apparaisse comme une partition de swap)

  Puis, le programme vous demandera d'associer des noms de systèmes 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 désirez utiliser.

  Il existe une seule règle pour cela. Il doit y avoir un système de
  fichiers racine, appelé _/, et on doit pouvoir démarrer 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 basée sur trois
  partitions comprenant une petite racine, une partition système 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 systèmes Unix (beaucoup plus petits) mélangaient les
  logiciels systèmes et les répertoires utilisateurs sur une seule
  partition non racine.  Le fonctionnement de certains logiciels dépend
  de son existence.

  Si vous avez plus d'une zone pour les répertoires 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 système, 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 réalité, le second disque (sdb1) n'est pas entièrement dédié à
  _/_h_o_m_e_2 ; les partitions de swap sur sda et sdb ne sont pas montrées
  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 créer 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 créez un lien symbolique nommé _/_v_a_r pointant dessus (le
  programme d'installation peut vous proposer de le faire).


  66..77..  IInnssttaalllleerr lleess ppaaqquueettaaggeess

  Lorsque vos partitions ont été préparées, le reste de l'installation
  est presque automatique. Votre programme d'installation (qu'il soit
  EGA ou X) vous guidera à travers une série de menus qui vous
  permettront de spécifier le CD-ROM à partir duquel vous installez, les
  partitions à utiliser, etc.

  Nous n'allons pas décrire ici la plupart des spécificités de cette
  étape de l'installation. C'est une des parties qui varie le plus entre
  les distributions Linux (généralement, les distributeurs y rivalisent
  entre eux pour valoriser leur produit), mais c'est aussi la plus
  simple. Les programmes d'installation sont plutôt bien auto-documentés
  et avec de bons écrans d'aide.



  66..88..  AApprrèèss ll''iinnssttaallllaattiioonn ddeess ppaaqquueettaaggeess

  Lorsque l'installation est finie, et que tout s'est bien passé, le
  programme d'installation vous proposera plusieurs options pour
  configurer votre système avant son premier démarrage à partir du
  disque dur.


  66..88..11..  LLIILLOO,, llee LLIInnuuxx LLOOaaddeerr

  LILO (qui signifie LInux LOader) est un programme vous permettant de
  lancer Linux (ainsi que d'autres systèmes 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, répondez « 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 démarrage ; au lieu de cela, à chaque démarrage, vous
  pouvez indiquer à LILO quel système lancer.


  66..88..22..  CCrrééeerr uunnee ddiissqquueettttee ddee ddéémmaarrrraaggee ((ooppttiioonn))

  Il est possible que l'on vous propose de créer une « disquette de
  démarrage standard », que vous pourrez utiliser pour lancer votre
  système Linux nouvellement installé. (Il s'agit d'une ancienne
  méthode, plutôt peu pratique, qui suppose que vous démarrez
  normalement sur DOS et que vous utilisez une disquette de démarrage
  pour lancer Linux.)

  Pour la créer, vous aurez besoin d'une disquette haute-densité,
  formatée MS-DOS et vierge. Insérez celle-ci lorsqu'on vous le demande
  et la disquette de démarrage sera générée. (Ce n'est pas la même chose
  qu'une disquette de démarrage d'installation, et vous ne pouvez
  remplacer l'une par l'autre !)


  66..88..33..  CCoonnffiigguurraattiioonnss ssyyssttèèmmee ddiivveerrsseess

  La procédure qui suit l'installation peut aussi vous conduire à
  travers différents menus vous permettant de configurer votre système.
  Ceci comprend la spécification 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 créer 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 affichées à
  l'écran.


  77..  DDéémmaarrrreerr vvoottrree nnoouuvveeaauu ssyyssttèèmmee

  Si tout se passe comme prévu, vous devriez pouvoir démarrer Linux à
  partir du disque dur en utilisant LILO.  Sinon, vous devriez pouvoir
  lancer votre disquette de démarrage Linux (pas la disquette de
  démarrage originale, mais celle créée après l'installation des
  paquetages). Après le démarrage, loggez vous sous le login _r_o_o_t. Bravo
  !  Vous avez votre système Linux personnel.

  Si vous démarrez en utilisant LILO, essayez de presser les touches
  _s_h_i_f_t ou _c_o_n_t_r_ô_l_e pendant le démarrage. Ceci vous présentera une
  invite de démarrage ; pressez la touche _t_a_b pour avoir la liste des
  options. De cette façon, vous pourrez lancer Linux, MS-DOS, ou
  n'importe quel système directement à partir de LILO.


  88..  AApprrèèss vvoottrree pprreemmiieerr ddéémmaarrrraaggee

  Vous devriez maintenant voir l'invite de login de Linux. Félicitations
  !


  88..11..  DDéébbuutt ddee ll''aaddmmiinniissttrraattiioonn ssyyssttèèmmee

  Selon les phases d'installation, vous pouvez maintenant étre amenés à
  créer 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'accès Internet, etc.

  Un bon livre sur l'administration des systèmes UNIX devrait vous y
  aider. Je suggère _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 français 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 français, comme la majeure partie des autres HOWTOS ,
  sur ftp.lip6.fr/pub/linux), pour obtenir des informations sur les
  autres tâches de configuration.


  88..22..  CCoonnffiigguurraattiioonn ppeerrssoonnnnaalliissééee ddee LLIILLOO

  LILO est un chargeur de boot pouvant être utilisé pour choisir soit
  Linux, soit MS-DOS ou un autre système d'exploitation au démarrage. 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 première étape du processus de démarrage pour
  tous les systèmes d'exploitation présents sur votre disque. Ceci
  fonctionne bien si MS-DOS est le seul autre système d'exploitation
  installé. Cependant, vous pouvez aussi utiliser OS/2, qui a son propre
  gestionnaire de démarrage. En ce cas, le gestionnaire de démarrage
  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 systèmes 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 système d'exploitation. Sinon, LILO s'arrêtera après 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 présentons 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 démarrage à installer ; vous n'avez probablement pas à la changer
  install = /boot/boot.b

  # Enchainement pour le démarrage 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 système de fichiers racine
    vga = ask            # Demande pour le mode VGA
    append = "aha152x=0x340,11,7,1"  # Ajoutez ceci aux options de démarrage,
                                     # pour détecter le contrôleur SCSI

  # Enchainement pour le démarrage 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




  Après 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 utilisée dans _/_e_t_c_/_l_i_l_o_._c_o_n_f
  pour spécifier les paramètres de démarrage comme nous l'avons fait
  lorsque nous avons démarré à partir de la disquette de boot.

  Vous pouvez maintenant relancer votre système à partir du disque dur.
  Par défaut, LILO lancera le premier système d'exploitation présent
  dans la liste du fichier de configuration : Linux dans notre cas. Afin
  de disposer d'un menu de démarrage vous permettant de choisir un autre
  système d'exploitation, maintenez les touches _s_h_i_f_t ou _c_t_r_l enfoncées
  pendant que le système démarre ; vous devriez voir le message suivant
  (ou équivalent) :

       Boot:


  Entrez alors le nom du système 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
  démarrage d'OS/2, par exemple. Afin de démarrer une partition Linux à
  partir du gestionnaire de démarrage d'OS/2, malheureusement, vous
  devez créer 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 démarrage
  d'OS/2, installez LILO sur votre système 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 . Après avoir lancé /sbin/lilo
  vous devriez pouvoir ajouter la partition Linux au gestionnaire de
  démarrage. Ce mécanisme devrait fonctionner pour les chargeurs de boot
  d'autres systèmes d'exploitation.


  99..  AAddmmiinniissttrriivviiaa


  99..11..  CCoonnddiittiioonnss dd''uuttiilliissaattiioonnss

  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 numéro de version et la date ;

  ·  ne pas omettre ou modifier le pointeur du document sur la version
     WWW actuelle ;

  ·  clairement indiquer les versions résumées ou modifiées comme
     telles.

  Ces restrictions sont destinées à protéger les lecteurs potentiels
  contre des versions obsolètes ou mutilées. Si vous pensez avoir une
  bonne raison qui pourrait justifier une exception, demandez-le moi.


  99..22..  RReemmeerrcciieemmeennttss

  Merci à Matt D. Welsh, qui est à l'origine de ce HOWTO. J'ai ôté
  beaucoup des contenus spécifiques à 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 améliorée 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.

  11..

  IInnttrroodduuccttiioonn

  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.

  11..11..

  PPrree--rreeqquuiiss

  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.

  11..22..

  CCee ddooccuummeenntt

  http://www.orbits.com/software/Java_CGI.html  est  l'adresse  ou  vous
  etes sur de trouver la derniere version de ce document.

  11..33..

  LLee ppaacckkaaggee lluuii--mmeemmee

  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.

  11..44..

  PPuubblliicciittee ggrraattuuiittee

  Ce document a ete mis au point avec la bienveillance de SStteellllaarr OOrrbbiittss
  TTeecchhnnoollooggyy  SSeerrvviicceess. Si vous voulez savoir ce que nous faisons, allez
  voir a http://www.orbits.com/.

  22..

  CCoonnffiigguurraattiioonn ddee vvoottrree sseerrvveeuurr ((aavveecc eexxpplliiccaattiioonnss))

  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)''.

  22..11..

  CCoonnttrraaiinntteess llooggiicciieelllleess eett mmaatteerriieelllleess

  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.

  22..22..

  JJaavvaa CCGGII

  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.)

  22..33..

  DDeeppllooiieemmeenntt ddeess ssoouurrcceess

  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).

  22..44..

  CChheemmiinnss llooccaauuxx

  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.

  22..55..

  TTeesstt ddee vvoottrree iinnssttaallllaattiioonn

  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.

  33..

  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr ((vveerrssiioonn ccoouurrttee))

  +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.

  44..

  EExxeeccuuttiioonn dd''uunn pprrooggrraammmmee JJaavvaa CCGGII

  44..11..

  DDiiffffiiccuulltteess dd''eexxeeccuuttiioonn ddee pprrooggrraammmmeess JJaavvaa aavveecc llee mmooddeellee CCGGII

  L'execution d'un programme Java depuis un serveur Web pose deux  types
  de problemes majeurs :

  44..11..11..

  LLeess pprrooggrraammmmeess JJaavvaa nnee ss''eexxeeccuutteenntt ppaass ccoommmmee ddeess bbiinnaaiirreess oorrddiinnaaiirreess

  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.

  44..11..22..

  JJaavvaa nn''aacccceeddee ppaass _a _p_r_i_o_r_i aauuxx vvaarriiaabblleess dd''eennvviirroonnnneemmeenntt

  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 CC .

  44..22..

  SSoolluuttiioonnss pprrooppoosseeeess

  Pour contourner ces obstacles, j'ai ecrit une script shell de CGI, qui
  fournit les informations necessaires a l'interpreteur Java.

  44..22..11..

  LLee ssccrriipptt jjaavvaa..ccggii

  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''.

  44..22..22..

  IInnvvooccaattiioonn ddee jjaavvaa..ccggii ddeeppuuiiss uunn ffoorrmmuullaaiirree HHTTMMLL

  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.

  55..

  UUttiilliissaattiioonn ddeess ccllaasssseess JJaavvaa CCGGII

  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.

  55..11..

  CCGGII

  55..11..11..

  SSyynnttaaxxee

  public class CGI

  55..11..22..

  DDeessccrriippttiioonn

  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 ssuubbmmiitt est selectionnee.
  Toutes  les  informations  sont  stockees  dans  un  objet  de  classe
  Properties.

  Cette classe se trouve dans le package "Orbits.net".

  55..11..33..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         CGI()         //  Constructeur.
         getNames()    //  Recupere la liste de noms.
         getValue()    //  Recupere la valeur a partir du nom.

  ______________________________________________________________________

  55..11..44..

  VVooiirr aauussssii

  CGI_Test.

  55..11..55..

  CCGGII(())

     FFiinnaalliittee
        Construit un objet contenant les donnees CGI disponibles.

     SSyynnttaaxxee
        public CGI()

     DDeessccrriippttiioonn
        Lorsqu'un  objet  CGI est construit, toutes les informations CGI
        disponibles sont recuperees et stockees dans le nouvel objet.

  55..11..66..

  ggeettNNaammeess(())

     FFiinnaalliittee
        Dresse la liste des noms definis par le formulaire.

     SSyynnttaaxxee
        public Enumeration getNames ()

     DDeessccrriippttiioonn
        Fournit la liste complete des noms  pour  lesquels  des  valeurs
        correspondantes ont ete definies.

     RReettoouurrnnee
        Une Enumeration de tous les noms definis.

  55..11..77..

  ggeettVVaalluuee(())

     FFiinnaalliittee
        Recupere la vvaalleeuurr associee au nnoomm specifie.

     SSyynnttaaxxee
        public String getValue ( String nom )

     DDeessccrriippttiioonn
        Cette  methode  fournit  la correspondance entre les noms et les
        valeurs envoyees depuis un formulaire HTML.

     PPaarraammeettrree

        nnoomm
           La cle par laquelle les valeurs sont choisies.

     RReettoouurrnnee
        Une String contenant la valeur.

  55..22..

  CCGGII__TTeesstt

  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.
  55..22..11..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         main()      //   main() du programme

  ______________________________________________________________________

  55..22..22..

  VVooiirr aauussssii

  CGI.

  55..22..33..

  mmaaiinn(())

     FFiinnaalliittee
        Fournit une methode main().

     SSyynnttaaxxee
        public static void main( String argv[] )

     DDeessccrriippttiioonn
        Il s'agit du point d'entree d'un programme CGI qui ne fait  rien
        a part retourner la liste des couples nom/valeur.

     PPaarraammeettrree
        "

        aarrggvv
           Arguments  passes  au  programme par le script java.cgi.  Non
           utilise pour l'instant.

  55..33..

  EEmmaaiill

  55..33..11..

  SSyynnttaaxxee

  public class Email extends Text

  55..33..22..

  DDeessccrriippttiioonn

  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".

  55..33..33..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         Email()      //  Constructeur
         send()       //  Envoie le message e-mail
         sendTo()     //  Ajoute une destination au message
         subject()    //  Initialise le champ Subject: du message

  ______________________________________________________________________

  55..33..44..

  VVooiirr aauussssii

  Email_Test, Text.

  55..33..55..

  EEmmaaiill(())

     FFiinnaalliittee
        Construit un objet qui contiendra un message electronique.

     SSyynnttaaxxee
        public Email()

     DDeessccrriippttiioonn
        Cree un message vide qui sera rempli par les methodes Email.

     VVooiirr aauussssii
        Text.

  55..33..66..

  sseenndd(())

     FFiinnaalliittee
        Envoie le message e-mail.

     SSyynnttaaxxee
        public void send ()

     DDeessccrriippttiioonn
        Formatage  et envoi du message. Si aucune adresse de destination
        n'a ete precisee, ne fait rien.

  55..33..77..

  sseennddTToo(())

     FFiinnaalliittee
        Ajoute une destination pour ce message.

     SSyynnttaaxxee
        public String sendTo ( String adresse )

     DDeessccrriippttiioonn
        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.

     PPaarraammeettrree

        aaddrreessssee
           Une destination a laquelle envoyer ce message.

  55..33..88..

  ssuubbjjeecctt(())

     FFiinnaalliittee
        Initialise le sujet du message.

     SSyynnttaaxxee
        public void subject ( String sujet )

     DDeessccrriippttiioonn
        Cette  methode remplit le champ Subject: du message. Si elle est
        appelee  plusieurs  fois,  le  sujet  utilise  sera  le  dernier
        demande.

     PPaarraammeettrree

        ssuujjeett
           Le texte du champ Subject: du message.

  55..44..

  EEmmaaiill__TTeesstt

  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.

  55..44..11..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         main()      //  main() du programme

  ______________________________________________________________________

  55..44..22..

  VVooiirr aauussssii

  Email.

  55..44..33..

  mmaaiinn(())

     FFiinnaalliittee
        Fournit une methode main().

     SSyynnttaaxxee
        public static void main( String argv[] )

     DDeessccrriippttiioonn
        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.

     PPaarraammeettrree

        aarrggvv
           Arguments passes au programme par  le  script  java.cgi.  Non
           utilise pour l'instant.

  55..55..

  HHTTMMLL

  55..55..11..

  SSyynnttaaxxee

  public class HTML extends Text

  55..55..22..

  DDeessccrriippttiioonn

  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".

  55..55..33..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         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.

  ______________________________________________________________________

  55..55..44..

  VVooiirr aauussssii

  HTML_Test, Text.

  55..55..55..

  HHTTMMLL(())

     FFiinnaalliittee
        Construit un objet qui contiendra un message HTML.

     SSyynnttaaxxee
        public HTML()

     DDeessccrriippttiioonn
        Cree un message vide qui sera rempli par les methodes HTML.

     VVooiirr aauussssii
        Text.

  55..55..66..

  aauutthhoorr(())

     FFiinnaalliittee
        Initialise le nom de l'auteur du document.

     SSyynnttaaxxee
        public void author ( String auteur )

     DDeessccrriippttiioonn
        Donne au document un nom d'auteur ayant pour valeur author.

     PPaarraammeettrree

        aauutteeuurr
           Texte a utiliser en tant que nom d'auteur du message.

     VVooiirr aauussssii
        title().

  55..55..77..

  ddeeffiinniittiioonnLLiisstt(())

     FFiinnaalliittee
        Cree une liste de definitions.

     SSyynnttaaxxee
        public void definitionList ()

     DDeessccrriippttiioonn
        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_.

     VVooiirr aauussssii
        definitionListTerm(), endList(), listItem().

  55..55..88..

  ddeeffiinniittiioonnLLiissttTTeerrmm(())

     FFiinnaalliittee
        Ajoute un terme a la liste de definitions.

     SSyynnttaaxxee
        public void definitionListTerm ()

     DDeessccrriippttiioonn
        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.

     VVooiirr aauussssii
        definitionList(), listItem().

  55..55..99..

  eennddLLiisstt(())

     FFiinnaalliittee
        Termine une liste.

     SSyynnttaaxxee
        public void endList ()

     DDeessccrriippttiioonn
        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_.

     VVooiirr aauussssii
        definitionList().

  55..55..1100..

  lliissttIItteemm(())

     FFiinnaalliittee
        Ajoute une entree a une liste.

     SSyynnttaaxxee
        public void listItem ()

        public void listItem ( String article )

        public boolean listItem ( String terme, String article )

     DDeessccrriippttiioonn
        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.

     PPaarraammeettrreess

        aarrttiiccllee
           Le texte de cette entree de liste de definitions.

        tteerrmmee
           Le texte de la partie terme  de  cette  entree  de  liste  de
           definitions.

     VVooiirr aauussssii
        definitionList(), definitionListTerm(), endList().

  55..55..1111..

  sseenndd(())

     FFiinnaalliittee
        Envoie le message HTML.

     SSyynnttaaxxee
        public void send ()

     DDeessccrriippttiioonn
        Envoie le message HTML.

  55..55..1122..

  ttiittllee(())

     FFiinnaalliittee
        Donne une valeur au titre du document.

     SSyynnttaaxxee
        public void title ( String titre )

     DDeessccrriippttiioonn
        Initialise le texte du titre du document.

     PPaarraammeettrree

        ttiittrree
           Le texte du titre de ce message.

     VVooiirr aauussssii
        author().

  55..66..

  HHTTMMLL__TTeesstt

  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.

  55..66..11..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         main()      //  main() du programme.

  ______________________________________________________________________

  55..66..22..

  VVooiirr aauussssii

  HTML.

  55..66..33..

  mmaaiinn(())

     FFiinnaalliittee
        Fournit une methode main().

     SSyynnttaaxxee
        public static void main( String argv[] )

     DDeessccrriippttiioonn
        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.

     PPaarraammeettrree

        aarrggvv
           Arguments  passes  au  programme  par  le script java.cgi Non
           utilise pour l'instant.

  55..77..

  TTeexxtt

  55..77..11..

  SSyynnttaaxxee

  public abstract class Text

  55..77..22..

  DDeessccrriippttiioonn

  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".

  55..77..33..

  LLiissttee ddeess mmeemmbbrreess

  ______________________________________________________________________
         Text()            //  Constructeur.
         add()             //  Ajoute du texte a cet objet.
         addLineBreak()    //  Ajoute une rupture de ligne.
         addParagraph()    //  Ajoute une rupture de paragraphe.

  ______________________________________________________________________

  55..77..44..

  VVooiirr aauussssii

  Email, HTML.

  55..77..55..

  aadddd(())

     FFiinnaalliittee
        Ajoute du texte a cet article

     SSyynnttaaxxee
        public void add ( char ajout )

        public void add ( String ajout )

        public void add ( StringBuffer ajout )

     DDeessccrriippttiioonn
        Ajoute le texte ajout a la suite du contenu de cet article.

     PPaarraammeettrree

        aajjoouutt
           Texte a ajouter.

     VVooiirr aauussssii
        addLineBreak(), addParagraph().

  55..77..66..

  aaddddLLiinneeBBrreeaakk(())

     FFiinnaalliittee
        Force une rupture de ligne a cet endroit dans le texte.

     SSyynnttaaxxee
        public void addLineBreak ()

     DDeessccrriippttiioonn
        Insere une rupture de ligne dans le texte, a l'endroit du  point
        courant.

     VVooiirr aauussssii
        add(), addParagraph().

  55..77..77..

  aaddddPPaarraaggrraapphh(())

     FFiinnaalliittee
        Debute un nouveau paragraphe.

     SSyynnttaaxxee
        public void add ()

     DDeessccrriippttiioonn
        Debute un  nouveau paragraphe a ce point du flot textuel.

     VVooiirr aauussssii
        add(), addLineBreak().

  66..

  AAmmeelliioorraattiioonnss pprreevvuueess

  +o  Ajouter a la classe Email :

     EEmmaaiill(( iinntt ccaappaacciittee ))
        Quand on connait a l'avance l'espace a alloue au message.

     sseennddTToo(( SSttrriinngg  aaddrreessssee ))
        Ajoute  une  liste  de  destinations  principales (champ To:) au
        message e-mail.

     sseennddCCcc(( SSttrriinngg aaddrreessssee ))
        Ajoute une destination au champ Cc: (Carbon-Copy) du message  e-
        mail.

     sseennddCCcc(( SSttrriinngg  aaddddrreessss ))
        Ajoute  une  liste de destinations au champ Cc: (Carbon-Copy) du
        message e-mail.

     sseennddBBcccc(( SSttrriinngg aaddrreessssee ))
        Ajoute une destination au  champ  Bcc:  (Blind  Carbon-Copy)  du
        message e-mail.

     sseennddBBcccc(( SSttrriinngg  aaddrreessssee ))
        Ajoute  une  liste  de destinations au champ Bcc: (Blind Carbon-
        Copy) du message e-mail.

  +o  Ajouter a la classe HTML :

     HHTTMMLL(( iinntt ccaappaacciittee ))
        Quand on connait a l'avance l'espace a alloue au message.

     ppuubblliicc vvooiidd uunnoorrddeerreeddLLiisstt(())
        Demarre une liste non ordonnee.

     ppuubblliicc vvooiidd oorrddeerreeddLLiisstt(())
        Demarre une liste ordonnee.

     ppuubblliicc vvooiidd ddiirreeccttoorryyLLiisstt(())
        Demarre une liste de repertoires.

     ppuubblliicc vvooiidd mmeennuuLLiisstt(())
        Demarre une liste de menu.

     vvooiidd aanncchhoorr(( SSttrriinngg aanncchhoorrNNaammee ))
        Specifie une ancre.

     vvooiidd lliinnkk(( SSttrriinngg uurrll,, SSttrriinngg tteexxtt ))
        Specifie un lien.

     vvooiidd aapppplleett(( SSttrriinngg uurrll,, SSttrriinngg aallttTTeexxtt ))
        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.

  77..

  MMooddiiffiiccaattiioonnss

  77..11..

  MMooddiiffiiccaattiioonnss eennttrree lleess vveerrssiioonnss 00..33 eett 00..44

  +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.

  77..22..

  MMooddiiffiiccaattiioonnss eennttrree lleess vveerrssiioonnss 00..22 eett 00..33

  +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.

  77..33..

  MMooddiiffiiccaattiioonnss eennttrree lleess vveerrssiioonnss 00..11 eett 00..22

  +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 française 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 détaillé sur la
  configuration du noyau, sa compilation et ses mises à jour pour les
  plates-formes x86.
  ______________________________________________________________________

  Table des matières






















































  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 réponses

     2.1 Mais quel est le rôle du noyau ?
     2.2 Pourquoi voudrais-je mettre à jour mon noyau ?
     2.3 Quel genre de matériel 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 Récupérer 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 systèmes 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 Garçon, la suite ! (Le Makefile)

  4. Compiler le noyau

     4.1 Nettoyer et chercher les dépendances
     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 débarasser des fichiers .orig ?
     5.4 Autres patches

  6. Paquetages supplémentaires

     6.1 kbd
     6.2 util-linux
     6.3 hdparm
     6.4 gpm

  7. Quelques pièges

     7.1 make clean
     7.2 Noyaux énormes ou lents
     7.3 Le port parallèle 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 système 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 insanités à propos de requêtes obsolètes !
     7.10 Le Firewall ne fonctionne pas dans la version 1.2.0
     7.11 Ce n'est pas une image noyau compressée !
     7.12 Problèmes avec la console après mise à jour à la version 1.3.x
     7.13 Le noyau ne semble pas pouvoir compiler après 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 gérer les modules
     9.2 Modules distribués 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


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Faut-il que vous lisiez ce document ? Oui, si vous avez les symptômes
  suivants :


  ·  "Arg ! Cette archive TrucBidule-46.5.6 nécessite la version du
     noyau 2.8.193 et je n'ai que la version 1.0.9 ! "

  ·  Il y a un pilote de périphérique dont vous avez besoin dans l'un
     des nouveaux noyaux.

  ·  Vous n'avez aucune idée de la manière dont il faut s'y prendre pour
     recompiler le noyau.

  ·  "Est-ce que ce truc dans le fichier _R_E_A_D_M_E décrit toute la marche à
     suivre ?"

  ·  Vous avez essayé, ça ne marche pas !

  ·  Vous devez donner un conseil à une personne qui a certains
     problèmes.


  11..11..  LLiisseezz cceeccii eenn pprreemmiieerr ((eennffiinn bboonn,, cc''eesstt uunn ccoonnsseeiill)) !!


  Certains exemples présentés dans ce document présupposent que vous
  possédez les programmes GNU tar, find et xargs.  Ils sont assez
  standards, et ne devraient pas vous poser trop de problèmes.  On
  suppose également que vous connaissez la structure de votre disque
  (partitions). Si vous ne le savez pas, il est impératif que vous
  gardiez une copie sur papier du résultat de l'exécution 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,
  réinstalliez votre système, ou quelque chose de similaire.

  La dernière version stable du noyau au moment où j'écris ces mots est
  la 2.2.9, ce qui signifie que les références et les exemples donnés
  correspondent à cette version. Même si j'ai essayé de faire en sorte
  que ce document soit aussi indépendant que possible des versions, le
  noyau est en perpétuel développement, donc si vous récupérez une
  nouvelle version, il risque d'y avoir quelques différences. Cela ne
  devrait pas poser trop de problèmes mais risque de semer un peu la
  confusion.

  Il existe deux versions des sources du noyau : une version dite
  "stable" et une version de développement. Les version stables ont des
  numéros de version pairs : 1.2.x, 2.0.x sont des versions stables...
  tout comme la 2.2.x. Ces noyaux sont considérés comme étant les plus
  stables et sans erreurs. Les noyaux de développement (1.3.x, 2.1.x,
  etc) sont des noyaux de test, pour les développeurs, les testeurs...
  mais ces noyaux peuvent être très bogués. Vous êtes prévenus.


  11..22..  UUnn mmoott ssuurr llee ssttyyllee


  Un texte qui ressemble à celui-ci est soit un message qui apparaît 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 possédez une version texte de ce document, il n'y a pas de
  différence).



  22..  QQuueellqquueess qquueessttiioonnss...... aavveecc lleeuurrss rrééppoonnsseess



  22..11..  MMaaiiss qquueell eesstt llee rrôôllee dduu nnooyyaauu ??


  Le noyau Unix joue le rôle d'intermédiaire entre vos programmes et
  votre matériel.  Premièrement, il gère la mémoire pour tous les
  programmes en cours d'exécution (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 matériel (appels système).

  Bien sûr c'est un petit peu plus compliqué que ça, mais ces fonctions
  de bases sont les plus importantes à connaître.


  22..22..  PPoouurrqquuooii vvoouuddrraaiiss--jjee mmeettttrree àà jjoouurr mmoonn nnooyyaauu ??


  Les nouveaux noyaux offrent plus de facilité pour communiquer avec
  plus de matériels (c'est-à-dire qu'ils gèrent plus de
  périphériques...), 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
  précédentes.  Beaucoup de gens mettent à jour leurs noyaux car ils
  veulent avoir les nouveaux pilotes de périphériques et les corrections
  d'erreurs.



  22..33..  QQuueell ggeennrree ddee mmaattéérriieell ssuuppppoorrtteenntt lleess nnoouuvveeaauuxx nnooyyaauuxx ??


  Jetez un coup d'oeil sur le Hardware-HOWTO. Vous pouvez aussi regarder
  le fichier "config.in" dans les sources de LLiinnuuxx, ou juste essayer
  "make config", ce qui vous permet de voir tous les matériels supportés
  par le noyau standard, mais pas tout ce que LLiinnuuxx supporte. En effet,
  beaucoup de périphériques assez utiles (tels les périphériques PCMCIA,
  et quelques lecteurs de cartouches) sont des modules chargeables
  maintenus et distribués séparément.


  22..44..  QQuueellllee vveerrssiioonn ddee ggcccc oouu ddee lliibbcc uuttiilliisseerr ??


  Linus recommande une version de gcc dans le fichier README fourni avec
  le code source.  Si vous ne possédez pas cette version, la
  documentation dans la version recommandée de gcc devrait vous indiquer
  si vous avez besoin de mettre à jour votre libc.  Ce n'est pas une
  opération compliquée, mais il est important de suivre les
  instructions.


  22..55..  QQuuee ssoonntt lleess mmoodduulleess cchhaarrggeeaabblleess ((llooaaddaabbllee mmoodduulleess)) ??


  Ce sont des parties du noyau (pilotes de périphériques généralement)
  qui ne sont pas compilées dans celui-ci. On peut les compiler
  séparément, les insérer et les retirer du noyau à n'importe quel
  moment. En raison de cette souplesse, c'est devenu la méthode préférée
  pour coder certaines fonctionnalités du noyau.  Bon nombre de pilotes
  de périphériques tels que PCMCIA et les gestionnaires de cartouches
  QIC-80/40 sont des modules chargeables.


  22..66..  DDee ccoommbbiieenn dd''eessppaaccee ddiissqquuee aaii--jjee bbeessooiinn ??


  Cela dépend de la configuration de votre système. Tout d'abord, le
  code source compressé de LLiinnuuxx fait presque 16 Mo pour la version
  2.2.9.  Vous voulez généralement le garder dans un coin après l'avoir
  décompressé. Décompressé et compilé avec une configuration moyenne, il
  occupe 67 Mo de plus.


  22..77..  CCoommbbiieenn ddee tteemmppss ççaa pprreenndd ??


  Sur les machines récentes 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 près quatre minutes. Avec
  de vieux Pentium, 486 ou 386 soyez prêts à patienter, éventuellement
  des heures, jours...

  Si cela vous pose problème et que vous avez accès à une machine
  rapide, vous pouvez compiler sur celle-ci (fournissez les bons
  paramètres, assurez-vous que vos utilitaires sont à jour, etc.) et
  transférer l'image du noyau sur la machine lente.



  33..  CCoommmmeenntt ccoonnffiigguurreerr llee nnooyyaauu ??




  33..11..  RRééccuuppéérreerr lleess ssoouurrcceess


  Vous pouvez récupérer les sources via ftp depuis ftp.kernel.org dans
  le répertoire /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 développement et peuvent être
  instables. Le fichier est typiquement linux-x.y.z.tar.gz, où x.y.z est
  le numéro de version. Une version avec suffixe en .bz2 (compressé avec
  bzip2) est aussi généralement 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.


  33..22..  IInnssttaalllleerr lleess ssoouurrcceess


  Faites un su (super utilisateur) ou bien loggez-vous en tant que
  "root", et allez dans le répertoire /usr/src.  Si vous avez déjà
  installé les sources du noyau, il y aura déjà un répertoire appelé
  "linux", contenant l'ensemble des sources du noyau.  Si vous avez de
  la place disque et que vous voulez jouer la carte sécurité, il est
  préférable de conserver ce répertoire intact.  Un système assez
  pratique consiste à renommer votre répertoire en fonction du numéro de
  la version. La commande "uname -r" vous indiquera le numéro de la
  version du noyau actuellement en fonction.

  Par exemple, si "uname -r" donne "1.0.9," vous pourrez déplacer votre
  répertoire (avec mv) "linux" en "linux-1.0.9".  Si vous êtes du genre
  téméraire, détruisez le répertoire. Dans tous les cas, soyez sûr qu'il
  n'y ait aucun répertoire "linux" dans /usr/src avant de décompresser
  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 problème).  Vous
  verrez la liste des fichiers se dérouler sous vos yeux.  Lorsque c'est
  terminé, il y aura un nouveau répertoire "linux".  Allez dans lliinnuuxx et
  jetez un coup d'oeil au fichier README.  Il y a une section
  "INSTALLING the kernel".  Suivez les instructions lorsque nécessaire -
  prenez garde à ce que les liens soient en place et que les fichiers .o
  soient détruits, 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 -




  33..33..  CCoonnffiigguurreerr llee nnooyyaauu


  Note : il s'agit d'une répétition, 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 vérifiez que vous
  possédez bien /bin/bash, /bin/sh, ou $BASH.


  Il existe un certain nombre de possibilités 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
  préalable 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 préfèrent 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
  apparaîtront hiérarchisées.

  Vous êtes alors prêt à répondre aux questions, la plupart du temps par
  "y" ou par "n". Les pilotes de périphériques acceptent aussi
  généralement "m", pour "module". Le pilote sera compilé non pas
  directement dans le noyau mais en tant que module chargeable. Une
  interprétation plus amusante est que le "m" est pour "maybe"
  (peut-être). Certaines options non critiques ou évidentes ne seront
  pas décrites ici. Consultez le paragraphe "Autres options de
  configuration" pour une courte descriptions de quelques options non
  détaillées ici. Avec make menuconfig vous pouvez utiliser la barre
  d'espace.

  À partir des versions 2.0.x, une option "?" est présente : elle permet
  d'obtenir une aide pour l'option désirée qui correspond sûrement aux
  informations les plus à jour. Voici une liste décrivant brièvement les
  options les plus importantes avec leur place dans la hiérarchie (NdT :
  et la traduction de l'intitulé).


  33..33..11..  KKeerrnneell mmaatthh eemmuullaattiioonn ((PPrreecceessssoorr ttyyppee aanndd ffeeaattuurreess))


  _(_É_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 possédez pas de
  coprocesseur arithmétique (autrement dit, vous ne disposez que d'un
  386 ou d'un 486SX), répondez "y".  Si vous en avez un et que vous
  répondez "y", ce n'est pas grave : le coprocesseur sera utilisé et
  l'émulation ignorée. Pour toute machine pas trop vieille, la réponse
  sera non.


  33..33..22..  EEnnhhaanncceedd ((MMFFMM//RRLLLL)) ddiisskk aanndd IIDDEE ddiisskk//ccddrroomm ssuuppppoorrtt ((BBlloocckk
  DDeevviicceess))


  _(_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 près toujours
  répondre oui à cette question. Cela signifie que le  noyau pourra
  gérer les disques standards des PC comme IDE, que bon nombre de gens
  possèdent. Ceci n'inclut pas les disques SCSI : ils sont
  sélectionnables plus tard dans la configuration.

  Une question porte sur les gestionnaires de périphériques "old disk-
  only" et "new IDE". Vous devez choisir l'un des deux.  La principale
  différence est que le vieux gestionnaire de périphérique ne supporte
  qu'au plus deux disques sur une seule interface. Le nouveau
  gestionnaire gère une deuxième interface IDE et les disques CD-ROM
  IDE/ATAPI , et il est plus gros de 4 ko que l'ancien. Il est supposé
  "amélioré" ce qui signifie qu'à part avoir un nombre différent de
  bogues il peut améliorer les performances de votre disque, notamment
  si vous possédez du matériel récent (comme de l'EIDE).


  33..33..33..  NNeettwwoorrkkiinngg ssuuppppoorrtt ((GGeenneerraall SSeettuupp))



  _(_G_e_s_t_i_o_n _d_u _R_é_s_e_a_u_) En principe, vous ne devriez répondre "y" que si
  votre machine se trouve sur un réseau tel qu'Internet ou si vous
  voulez utiliser SLIP, PPP, term, etc. pour communiquer avec un accès
  Internet externe.  Toutefois, bon nombre de paquetages (tels que le
  système X Window) ont besoin de ce support réseau même si votre
  machine n'y est pas reliée ; dans ce cas, répondez "y".  Plus tard, on
  vous demandera si vous voulez avoir le support TCP/IP. De même,
  répondez "y", à moins que vous ne soyez sûr de ce que vous faites.


  33..33..44..  SSyysstteemm VV IIPPCC ((GGeenneerraall SSeettuupp))



  L'une des meilleures définition des IPC (communication inter-
  processus) se trouve dans le glossaire du livre de Perl. Ces
  mécanismes sont utilisés par certains développeurs Perl et quelques
  autres paquetages (comme par exemple DOOM), donc ce n'est pas vraiment
  une bonne idée de répondre "n" à cette question à moins que vous ne
  sachiez exactement ce que vous faites.


  33..33..55..  PPrroocceessssoorr ffaammiillyy ((PPrroocceessssoorr ttyyppee aanndd ffeeaattuurreess))


  _(_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 sélectionnait certaines optimisations pour un type de
  processeur, le noyau fonctionnant normalement avec les autres
  processeurs. Le noyau généré avait toutefois une taille légèrement
  supérieure. Dans les nouveaux noyaux, cette différence 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.


  33..33..66..  SSCCSSII ssuuppppoorrtt


   _(_G_e_s_t_i_o_n _S_C_S_I_) Si vous avez au moins un périphérique SCSI, répondez
  "y".  On vous demandera alors de plus amples renseignements sur la
  gestion des CD-ROM, des disques, et quel type de contrôleur SCSI vous
  possédez. Consultez le SCSI-HOWTO pour plus de détails.


  33..33..77..  NNeettwwoorrkk ddeevviiccee ssuuppppoorrtt


  _(_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 réseau, ou si
  vous voulez utiliser SLIP, PPP, ou un adaptateur sur port parallèle,
  répondez "y".  Le script de configuration vous demandera alors quel
  type de carte vous possédez et quels protocoles vous voulez inclure.


  33..33..88..  FFiilleessyysstteemmss


  _(_S_y_s_t_è_m_e_s _d_e _f_i_c_h_i_e_r_s_) On vous demandera quels types de systèmes de
  fichiers vous souhaitez gérer :

  Standard (minix) - Les distributions récentes ne créent pas de
  systèmes de fichiers de type minix, et bon nombre de personnes ne s'en
  servent pas, mais cela peut être malgré tout une bonne idée de le
  configurer. Quelques programmes de "sauvetage de disques" l'utilisent,
  et encore aujourd'hui, un bon nombre de disquettes risquent d'avoir ce
  système de fichiers, car il est assez pratique pour les disquettes.

  Second extended - C'est le système de fichiers standard de Linux. Vous
  en aurez très certainement besoin, donc "y".  (NdT : et puis c'est un
  Français 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, répondez "y".

  Des systèmes de fichiers originaires d'autres systèmes d'exploitation
  sont également disponibles.

  /proc - Un des systèmes de fichiers les plus puissants (idée
  effrontément chipée aux Laboratoires Bell, je pense). Ça n'a rien à
  voir avec vos partitions disques, mais c'est une interface sous forme
  de système 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 systèmes) pour les entrées/sorties.
  Vous devriez répondre "y" à ceci : de nombreux programmes Linux
  standards en ont besoin.

  NFS - Si vous êtes en réseau et que vous voulez utiliser des volumes
  présents sur d'autres machines, répondez "y".

  ISO9660 - Format rencontré sur la plupart des CD-ROM. Si vous possédez
  un CD-ROM et que vous comptez vous en servir sous Linux, répondez "y".


  33..33..88..11..  MMaaiiss jjee nnee ssaaiiss ppaass ddee qquueellss ssyyssttèèmmeess ddee ffiicchhiieerrss jj''aaii
  bbeessooiinn !!


  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 à côté de "type" est le type du
  système de fichiers. Dans cet exemple, mes partitions / et /usr sont
  du type ext2fs, j'utilise /proc, et il y a une disquette montée avec
  le système de fichiers MS-DOS (beuurrrk !).

  Essayez "cat /proc/filesystems" si vous avez /proc. Cela vous donnera
  la liste des systèmes de fichiers que votre noyau gère.

  Le support de systèmes de fichiers rarement utilisés et qui ne sont
  pas absolument nécessaires peut augmenter la taille du noyau. Voir la
  section sur les modules chargeables pour résoudre ce problème, ainsi
  que la section sur les pièges.


  33..33..99..  CChhaarraacctteerr ddeevviicceess


  _(_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 gérer
  votre imprimante parallèle, souris bus, souris PS/2 (beaucoup de
  portables utilisent une souris constructeur de type PS/2), quelques
  lecteurs de bande et d'autres périphériques de type "caractère".
  Répondez en conséquence.

  Note : "gpm" est un programme qui vous permet d'utiliser la souris à
  l'extérieur de X Window pour effectuer des opérations de copier-coller
  entre les consoles virtuelles. C'est assez utile si vous avez une
  souris série, car cela coexiste bien avec X Window, mais vous devrez
  faire quelques trucs pour que cela fonctionne avec les autres.


  33..33..1100..  SSoouunndd


  _(_S_o_n_) Si vous tenez à entendre biff aboyer, répondez "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 entière du pilote, vous pouvez répondre `n' et donc
  économiser de la mémoire en insérant uniquement les caractéristiques
  dont vous avez besoin.

  Si vous vous intéressez de près 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/>.


  33..33..1111..  AAuuttrreess ooppttiioonnss ddee ccoonnffiigguurraattiioonn


  Toutes les options de configuration ne sont pas détaillées 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 complète de ces options (plus une manière de les insérer
  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.


  33..33..1122..  KKeerrnneell hhaacckkiinngg


  Extrait du README de Linus :

  La configuration "kernel hacking" provoque généralement un noyau plus
  gros ou plus lent (ou les deux), et peut même rendre le noyau moins
  stable en configurant quelques routines pour essayer de chercher les
  défauts du code, pour trouver les problèmes du noyau (kmalloc()).
  Donc, vous devrez répondre "n" à cette question si vous créez un noyau
  pour un système sûr.


  33..44..  GGaarrççoonn,, llaa ssuuiittee !! ((LLee MMaakkeeffiillee))


  Quand la configuration est terminée, un message vous indique que le
  noyau est configuré, et qu'il faut "regarder le Makefile général pour
  des configurations supplémentaires", 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 prêt.
  Si vous ne comprenez rien à ce fichier, passez à la suite.


  44..  CCoommppiilleerr llee nnooyyaauu



  44..11..  NNeettttooyyeerr eett cchheerrcchheerr lleess ddééppeennddaanncceess


  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 dépendances, comme les fichiers d'en-têtes (include)
  sont en place, et ne prend pas trop de temps à moins que vous n'ayez
  une machine très lente. Pour les anciennes versions, lorsque c'est
  terminé faites un "make clean".  Cela détruit 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.


  44..22..  LLaa ccoommppiillaattiioonn


  Après avoir cherché les dépendances 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 créer le fichier "bzImage" dans le répertoire
  arch/i386/boot qui correspond au nouveau noyau compressé.  "make
  bzdisk" fait la même chose, mais copie le noyau sur une disquette que
  vous aurez insérée 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 méthode pratique si vous avez
  détruit accidentellement votre noyau (ou quelque chose de ce genre).
  Vous pouvez également vous en servir pour installer de nouveaux
  systèmes, en copiant directement le contenu d'un disque sur un autre
  ("tout ça ? ouah !").

  Tous les noyaux assez récents sont compressés, comme l'indique le "bz"
  au début des noms. Un noyau compressé est automatiquement décompacté
  lors de l'exécution.

  Pour les noyaux plus anciens, bzImage n'existait pas et on utilisait
  zImage. Cette possibilité est toujours disponible mais vue la taille
  des noyaux récents il est à peu près obligatoire d'utiliser bzImage
  car l'ancienne méthode ne peut gérer que des noyaux de taille limitée.


  44..33..  LLeess aauuttrreess ooppttiioonnss dduu""mmaakkee""


  "make mrproper" est un "make clean" plus puissant. Cela est parfois
  nécessaire, 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 première 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 défaut.

  Regardez la section sur les modules à propos du "make modules".




  44..44..  IInnssttaalllleerr llee nnooyyaauu


  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 prête à rebooter, mais
  SEULEMENT si lilo est configuré de la manière suivante : le noyau
  s'appelle /vmlinuz, lilo se trouve dans /sbin, et votre fichier de
  configuration pour LILO (/etc/lilo.conf) correspond à ces données.

  Sinon, vous devrez utiliser LILO directement.  C'est un produit assez
  facile à installer, mais dont le fichier de configuration peut être
  déroutant. Regardez le fichier de configuration (/etc/lilo/config pour
  les versions les plus anciennes, /etc/lilo.conf pour les récentes), 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 système d'exploitation vous allez booter (nom
  logique), et "root" est la partition racine de ce système
  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 systèmes récents, 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 désirez en savoir plus sur la configuration de LILO, ou si
  vous voulez avoir LILO, récupérez la dernière version sur votre site
  FTP favori et suivez les instructions.

  Pour booter sur l'un de vos anciens noyaux situés sur votre disque dur
  (une autre méthode 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 dixième 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 problème se produit).



  55..  MMeettttrree àà jjoouurr llee nnooyyaauu



  55..11..  AApppplliiqquueerr uunn ppaattcchh


  Les nouvelles versions du noyau sont distribuées sous la forme de
  patches.  Par exemple, si vous possédez 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 compressée).

  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 !).  Généralement, 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 "héhé, mon ordinateur est en train de faire quelque
  chose...!").  Pour vérifier 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 rejetés. Vous pouvez utiliser "find" pour les trouver :

          find .  -name '*.rej' -print


  vous en donnera la liste avec le chemin pour y accéder.

  Si tout a marché, faites un "make clean", "config," et "dep" comme
  décrit dans les sections 3 et 4.

  La commande patch possède 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 répertoire que
  /usr/src/linux, un patch -p1 dans ce répertoire fera les choses
  proprement. Les autres options sont bien documentées dans les pages de
  manuel.


  55..22..  SSii qquueellqquuee cchhoossee nnee ffoonnccttiioonnnnee ppaass


  (Note : cette section traite plutôt des noyaux assez anciens)

  Le problème le plus fréquent qui se présentait é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 résoudre ce
  problème, jetez un coup d'oeil au fichier config.in.rej et regardez
  son contenu.  Le changement sera indiqué par "+" et "-" au début d'une
  ligne. Regardez ces lignes et retenez si elles sont marquées "y" ou
  "n". Maintenant, éditez config.in, et changez les "y" en "n" et les
  "n" en "y" lorsque cela est nécessaire. 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 détruire.

  Si vous avez d'autres problèmes, vous avez peut-être installé un patch
  défectueux.  Si la commande patch indique "previously applied patch
  detected: Assume -R?", vous êtes probablement en train d'appliquer un
  patch déjà appliqué.  Si vous répondez "y", cela risque de détruire
  votre source et il vous faudra récupérer un source complet (vous
  auriez peut-être dû commencer par là).

  Pour revenir en arrière (dépatcher), faites un "patch -R" sur le patch
  original.
  La meilleure chose à faire lorsqu'un patch détruit tout est de
  repartir d'un noyau initial tout neuf ! (par exemple, à partir du
  fichier linux-x.y.z.tar.gz).


  55..33..  CCoommmmeenntt ssee ddéébbaarraasssseerr ddeess ffiicchhiieerrss ..oorriigg ??



  Après avoir appliqué quelques patches, les fichiers .orig vont
  commencer à s'empiler. Par exemple, j'en étais à la version 1.1.51 et
  la dernière fois que j'avais fait le ménage, c'était avec la version
  1.1.48 (je crois...). Détruire les fichiers .orig a permis de
  récupérer plus d'un demi Méga 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 manières (meilleures ?) pour se débarrasser des
  fichiers .orig en utilisant le programme GNU xargs :

          find .  -name '*.orig' | xargs rm


  ou la méthode sûre mais un peu plus verbeuse :

          find . -name '*.orig' -print0 | xargs --null rm --




  55..44..  AAuuttrreess ppaattcchheess


  Il y a d'autres patches (je les appellerai "non-standards") que ceux
  distribués 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 généralement un travail
  assez pénible pour les novices, aussi revenir aux anciennes sources
  avant d'appliquer les patches de LLiinnuuxx semble être une bonne solution.
  Après, 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 fréquemment pour
  les nouveaux noyaux). Les pilotes de périphériques étant de plus
  développés sous la forme de modules chargeables, le nombre de patches
  "non standards" décroît.



  66..  PPaaqquueettaaggeess ssuupppplléémmeennttaaiirreess


  Votre noyau Linux a bon nombre de caractéristiques qui ne sont pas
  expliquées dans le noyau lui-même ; elles sont typiquement utilisées
  par des paquetages externes.  Une liste des plus utiles est donnée
  ici.


  66..11..  kkbbdd


  La console de Linux possède de nombreuses caractéristiques. Elle peut
  changer les polices de caractères, remapper le clavier, permuter les
  modes vidéos (dans les noyaux les plus récents), etc. Le package kbd
  possède 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 français). Il est disponible sur les mêmes sites qui
  proposent les sources du noyau.


  66..22..  uuttiill--lliinnuuxx


  Rik Faith (faith@cs.unc.edu) a rassemblé une grande quantité d'outils
  Linux dans le paquetage util-linux. Ils est désormais 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.


  66..33..  hhddppaarrmm


  Comme beaucoup de paquetages, c'était au départ un patch pour le noyau
  et un ensemble de programmes. Le patch a été intégré dans le noyau
  standard et les programmes pour optimiser et jouer avec vos disques
  sont distribués séparément.


  66..44..  ggppmm



  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 opérations avec un grand nombre de types
  de souris.



  77..  QQuueellqquueess ppiièèggeess



  77..11..  mmaakkee cclleeaann


  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
  symptômes peuvent être un plantage de votre système, des problèmes
  d'entrées-sorties étranges, une chute des performances, des reboot
  aléatoires... Vérifiez que vous avez également fait un make dep.


  77..22..  NNooyyaauuxx éénnoorrmmeess oouu lleennttss


  Si votre noyau consomme beaucoup de mémoire, ou s'il est réellement
  gros, ou bien s'il faut une éternité pour le compiler même lorsque
  vous utilisez votre nouveau 986DX6/440, c'est que vous avez configuré
  un tas de choses (pilotes de périphériques, systèmes 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 mémoire.  Le
  symptôme 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 mémoire que le noyau utilise en prenant
  la mémoire totale de votre machine et en soustrayant la valeur de la
  mémoire totale ("total mem") dans  /proc/meminfo ou bien avec la
  commande "free".


  77..33..  ppaass LLee ppoorrtt ppaarraallllèèllee nnee ffoonnccttiioonnnnee ppaass//mmoonn iimmpprriimmaannttee nnee ffoonncc­­
  ttiioonnnnee


  Les options de configuration pour les PC sont : premièrement, dans la
  catégorie "General Setup" sélectionnez "Parallel port support" et "PC-
  style hardware". Puis dans "Character devices", sélectionnez "Parallel
  printer support".

  Il y a ensuite le problème des noms de périphérique des imprimantes
  qui ont changé dans Linux 2.2. Si vous aviez une imprimante lp1 avec
  votre noyau précédent, elle s'appelle probablement lp0 maintenant.
  Utilisez "dmesg" ou cherchez dans les logs dans /var/log pour le
  vérifier.


  77..44..  LLee nnooyyaauu nnee ccoommppiillee ppaass


  Si cela ne compile pas, alors un patch a probablement échoué, ou bien
  vous possédez des sources corrompus. Votre version de gcc peut
  également ne pas être correcte, ou bien endommagée (par exemple les
  fichiers d'include peuvent être faux). Soyez sûr que les liens que
  Linus décrit dans le fichier README sont corrects. En général, si un
  noyau standard ne compile pas, c'est qu'un truc ne tourne pas rond
  dans le système, et il est plus que probable que certains outils
  doivent être reinstallés.

  Dans des cas relativement rares, gcc peut échouer en raison de
  problèmes de matériel. Le message d'erreur ressemble à un truc assez
  mystérieux "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
  mémoire défectueux et le compilateur fonctionnait de manière plutôt
  aléatoire. Essayez dans un premier temps de reinstaller gcc si vous
  avez des problèmes. Si votre noyau compile très bien avec les caches
  externes vidés ou une mémoire réduite, alors vous pourrez commencer à
  soupçonner votre matériel.

  Certaines personnes ont tendance à ne pas aimer que je mette en doute
  leur matériel. Je n'invente rien. Il existe une FAQ dédiée à ce sujet
  :  <http://www.bitwizard.nl/sig11/> (NdT : traduite en français à
  <http://www.linux-france.org/article/sig11-fr/sig11-fr.html>).


  77..55..  LLaa nnoouuvveellllee vveerrssiioonn dduu nnooyyaauu nnee bboooottee pplluuss !!


  Soit LILO ne fonctionne pas, soit il n'est pas configuré correctement.
  Une fois, un problème 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).


  77..66..  ttoouutt VVoouuss aavveezz oouubblliiéé ddee llaanncceerr LLIILLOO,, oouu llee ssyyssttèèmmee nnee bboooottee
  pplluuss dduu


  Argh ! La meilleure chose à faire est de booter à partir d'une
  disquette et de préparer une nouvelle disquette de boot ("make zdisk"
  fait cela très 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 connaître la
  partition des sources du noyau (/usr/src/linux), et où elle est
  montée.

  Dans cet exemple,la racine / est /dev/hda1, la partition qui supporte
  /usr/src/linux est /dev/hda3, normalement montée sur /usr. Toutes les
  deux ont un système de fichiers de type ext2fs. L'image du noyau se
  trouve dans /usr/src/linux/arch/i386/boot/ et elle s'appelle bzImage.

  L'idée 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 présentée après cet
  exemple (cela dépend de la façon dont vous avez planté votre système).

  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 répertoire existe, ignorez le message.
  Maintenant, allez dans le répertoire 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


  Insérez une disquette formatée dans le lecteur "A:" (vérifiez 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 démontez la partition /usr :

  cd /
  umount /mnt



  Maintenant, vous devriez être capable de rebooter votre système
  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 manière très pratique.
  S'il se trouve que vous avez un noyau opérationnel 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 oubliée.

  Utiliser LILO avec de gros disques (avec un nombre de cyclindres
  supérieur à 1024) peut poser des problèmes. Consultez le mini-Howto
  LILO ou la documentation.


  77..77..  IIll mmee ddiitt""wwaarrnniinngg:: bbddfflluusshh nnoott rruunnnniinngg""


  Cela peut être un problème assez grave. Avec les noyaux ayant une
  version supérieure à 1.0 (aux alentours du 20 avril 1994), le
  programme "update" qui vide périodiquement les tampons disque a été
  remplacé par "bdflush". Récupérez les sources de "bdflush" (vous
  pouvez les récupérer 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.


  77..88..  JJee nn''aarrrriivvee ppaass àà ffaaiirree mmaarrcchheerr mmoonn CCDD--RROOMM IIDDEE//AATTAAPPII


  Aussi étrange que cela puisse paraître, beaucoup de gens n'arrivent
  pas à faire fonctionner leurs disques ATAPI, tout simplement parce
  qu'il y a un bon nombre de problèmes potentiels.

  Si votre CD-ROM est le seul disque d'une interface IDE particulière il
  doit être configuré en "maître (master)" ou "seul (single)". C'est
  l'erreur la plus fréquemment rencontrée.

  Creative Labs (par exemple) a mis des interfaces IDE sur ses cartes
  sons.  Toutefois, cela pose un problème pour les gens qui ont déjà
  deux interfaces IDE sur leur carte mère (IRQ15 généralement). Une
  pratique commune est de faire de l'interface soundblaster un troisième
  port IDE (IRQ11 je pense).

  Cela pose un problème avec Linux car les versions 1.2.x ne supportent
  pas une troisième interface IDE (cela est géré avec les versions 1.3.x
  mais ce sont des versions de développement, et la troisième interface
  n'est pas détectée automatiquement). Pour résoudre ce problème, vous
  avez plusieurs possibilités.

  Si avez déjà un deuxième port IDE, il y a des chances pour que vous ne
  l'utilisiez pas ou qu'il n'ait pas deux périphériques connectés.
  Désactivez 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.


  77..99..  LLee nnooyyaauu mmee ddiitt ddeess iinnssaanniittééss àà pprrooppooss ddee rreeqquuêêtteess oobbssoollèètteess !!


  Récupérez des versions récentes 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é.



  77..1100..  LLee FFiirreewwaallll nnee ffoonnccttiioonnnnee ppaass ddaannss llaa vveerrssiioonn 11..22..00


  Passez à la version 1.2.1.


  77..1111..  CCee nn''eesstt ppaass uunnee iimmaaggee nnooyyaauu ccoommpprreessssééee !!


  N'utilisez pas le fichier vmlinux créé dans /usr/src/linux comme image
  de boot mais [..]/arch/i386/boot/bzImage.


  77..1122..  PPrroobbllèèmmeess aavveecc llaa ccoonnssoollee aapprrèèss mmiissee àà jjoouurr àà llaa vveerrssiioonn 11..33..xx


  Changez le mot dumb en linux dans l'entrée console du fichier
  /etc/termcap. Il faudra peut-être aussi ajouter une entrée terminfo.


  77..1133..  LLee nnooyyaauu nnee sseemmbbllee ppaass ppoouuvvooiirr ccoommppiilleerr aapprrèèss uunnee mmiissee àà jjoouurr


  Le source du noyau contient un certain nombre de fichiers d'en-têtes
  (les fichiers se terminant par .h) qui se trouvent dans le répertoire
  /usr/include.  Ils sont référencés 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
  répertoire include/linux de la racine des sources du noyau
  (/usr/src/linux/include/linux dans un système standard).  Si ce lien
  n'existe pas, ou bien pointe au mauvais endroit, bon nombre de pro­
  grammes ne compileront pas. Si vous décidez que les sources du noyau
  prennent trop de place sur votre disque et que vous les détruisez,
  cela sera un problème. Un autre problème qui peut arriver, c'est avec
  les permissions d'accès aux fichiers. Si votre root a un umask qui
  n'autorise pas les autres utilisateurs à voir ses fichiers par défaut,
  et que vous désarchiviez 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 résoudre le
  problème mais il est probablement plus facile de réinstaller les
  fichiers include.  Vous pouvez procéder de la même manière que lors de
  l'installation des sources au début, 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 recréer le lien /usr/src/linux s'il
  n'existe pas.


  77..1144..  AAuuggmmeenntteerr lleess lliimmiitteess


  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
  imposées 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

  88..  NNoottee ccoonncceerrnnaanntt llaa mmiissee àà jjoouurr ppoouurr lleess nnooyyaauuxx 22..00..xx,, 22..22..xx


  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 connaître lorsque vous effectuez la mise à jour de votre
  système. Il est fort probable que vous deviez mettre à jour plusieurs
  paquetages tels que gcc, libc et SysVInit ainsi que quelques fichiers
  systèmes. Mais ne paniquez pas !



  99..  MMoodduulleess


  Les modules chargeables du noyau peuvent faire économiser de la
  mémoire et faciliter la configuration. L'utilisation des modules s'est
  accrue jusqu'à inclure les systèmes de fichiers, les pilotes de cartes
  ethernet, de lecteurs de cartouches, d'imprimantes, etc.


  99..11..  IInnssttaalllleerr lleess uuttiilliittaaiirreess ppoouurr ggéérreerr lleess mmoodduulleess


  Ces utilitaires sont disponibles sur n'importe quel site où vous avez
  récupéré les sources du noyau : modutils-x.y.z.tar.gz; choisissez la
  dernière version x.y.z qui est égale ou inférieure à votre version du
  noyau.  Installez-le avec `tar zxvf modutils-x.y.z.tar.gz', cd dans le
  répertoire créé (modutils-x.y.z), regardez le fichier README, et
  suivez les instructions d'installation (qui sont en général très
  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-
  répertoire pour les détails.

  insmod insère un module dans le noyau en cours d'exécution.  Les
  modules ont généralement une extension .o.  Le pilote exemple est
  appelé drv_hello.o, donc, pour l'insérer, 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 mémoire (4ko),
  et aucun autre module du noyau ne dépend 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 documentés (pages de
  manuel).


  99..22..  MMoodduulleess ddiissttrriibbuuééss aavveecc llee nnooyyaauu


  Avec la version 2.0.30, presque tout est disponible sous forme de
  modules chargeables. Pour les utiliser, soyez sûr que vous ne les
  insérez pas dans la configuration du noyau. Pour cela, ne répondez 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 spécifiés dans le noyau et installer les
  liens dans /usr/src/linux/modules.  Vous pouvez alors les utiliser
  depuis ce répertoire ou faire `make modules_install' qui les
  installera dans /lib/modules/x.y.z, ou x.y.z est le numéro de version
  du noyau.

  Cela peut être particulièrement utile pour les systèmes de fichiers.
  Vous n'utilisez peut-être pas fréquemment les systèmes 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 façon de procéder économise
  près de 50 ko de RAM dans l'utilisation du noyau.  Remarque sur le
  système de fichiers minix : il est très fortement conseillé de
  _t_o_u_j_o_u_r_s le configurer directement dans le noyau pour l'utilisation en
  disques de secours.



  1100..  TTrruuccss eett aassttuucceess



  1100..11..  RReeddiirriiggeerr llaa ssoorrttiiee ssttaannddaarrdd ddeess ccoommmmaannddeess mmaakkee oouu ppaattcchh


  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).




  1100..22..  IInnssttaallllaattiioonnss ddiivveerrsseess dduu nnooyyaauu


  En plus des disquettes, d'autres méthodes existent pour tester un
  nouveau noyau sans détruire les précédents. À la différence d'autres
  systèmes 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 problèmes).
  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 à détruire l'ancien
  /vmlinuz (après avoir lancé lilo, bien sûr).  La manière 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 désirez conserver plusieurs sources du noyau (cela peut
  prendre _b_e_a_u_c_o_u_p de place ; faites attention), la manière 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 créer ce type de lien symbolique, soyez certain que le
  dernier argument de ln n'est pas un répertoire existant.  Le résultat
  ne serait pas celui que vous espériez.


  1100..33..  MMiisseess àà jjoouurr ddeess nnooyyaauuxx


  Russell Nelson (nelson@crynwr.com) fait des résumés des changements
  dans les nouvelles versions du noyau. Ils sont courts et vous devriez
  les regarder avant de réaliser la mise à jour. Ils sont disponibles
  par ftp anonyme à ftp.emlist.com dans pub/kchanges ou via WEB
  <http://www.crynwr.com/kchanges>.



  1111..  DD''aauuttrreess HHOOWWTTOO qquuii ppeeuuvveenntt êêttrree uuttiilleess



  ·  Sound-HOWTO : cartes sons et utilitaires

  ·  SCSI-HOWTO : tout sur les contrôleurs et périphériques SCSI

  ·  NET-2-HOWTO : réseaux

  ·  PPP-HOWTO : réseau 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 matériel supporté

  ·  Module mini-HOWTO : plus de détails sur les modules du noyau

  ·  Kerneld mini-HOWTO : dédié à kerneld

  ·  BogoMips mini-HOWTO : pour information



  1122..  DDiivveerrss



  1122..11..  AAuutteeuurr


  L'auteur du Kernel-HOWTO Linux est Brian Ward (bri@cs.uchicago.edu).
  S'il vous plaît, envoyez-moi des commentaires, corrections, rajouts.
  Les corrections sont en particulier très 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 répondre. Si le mail est une question, essayez d'être
  le plus clair et détaillé possible. Si vous m'écrivez à propos de
  matériel qui ne fonctionne pas (ou quelques chose du genre), j'ai
  besoin de savoir quelle est votre configuration matérielle. 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
  réponse ! 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 réponde pas.

  Si vous m'écrivez et que vous n'obtenez aucune réponse dans un temps
  raisonable (trois semaines ou plus), il y a des chances que j'ai
  accidentellement détruit votre message (désolé). Rééssayez.

  J'ai beaucoup de mail sur des problèmes et questions de matériel. Ce
  n'est pas un problème mais merci de noter que que je ne suis pas
  familier avec tout le matériel 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.


  1122..22..  RReessttee àà ffaaiirree


  Le paragraphe "Trucs et astuces" est un peu court. J'espère l'étoffer
  avec les suggestions venant d'autres personnes.  De même pour "Autres
  paquetages". Des informations supplémentaires pour le
  débogage/sauvetage lors de crash seraient les bienvenues.


  1122..33..  CCoonnttrriibbuuttiioonnss


  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 compléments
     dans un bon nombre de paragraphes.

  ·  nat@nataa.frmug.eu.org (Nat Makarévitch) : 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 française

  ·  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 suédoise

  ·  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
     "compétition 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
  problèmes ont également été d'une aide précieuse.


  1122..44..  CCooppyyrriigghhtt,, ttrraadduuccttiioonn,, lliicceennccee eett aauuttrreess


  Copyright © Brian Ward, 1994-1999.

  Version française 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 française peut être trouvée sur ftp.lip6.fr  dans le
  répertoire /pub/linux/french/HOWTO.

  La distribution commerciale est autorisée et encouragée ; toutefois il
  est fortement recommandé de contacter l'auteur avant la
  redistribution, dans l'intérêt de la mise à jour des données (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 imprimée 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.

  11..  PPrrooggrraammmmeess uuttiilleess

  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).)

  22..  LLee ccllaavviieerr -- ggeenneerraalliitteess

  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.

  33..  LLaa ccoonnssoollee -- ggeenneerraalliitteess

  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.

  44..  RReeiinniittiiaalliisseerr llee tteerrmmiinnaall

  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.)

  44..11..  KKeeyybbooaarrdd hhaarrddwwaarree rreesseett

  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.'

  55..  DDeelleettee eett BBaacckkssppaaccee

  55..11..  CCoommmmeenntt cchhooiissiirr llee ccaarraacctteerree aa uuttiilliisseerr ppoouurr eeffffaacceerr llee  ddeerrnniieerr
  ccaarraacctteerree ttaappee

       % 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.

  55..11..11..  ``GGeettttyy ccoommpprreennaaiitt bbiieenn DDEELL eett BBSS,, mmaaiiss pplluuss mmaaiinntteennaanntt ??''

  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.

  55..11..22..   ``LLooggiinn  nnee  ffaaiitt  ppaass llaa mmeemmee cchhoossee aauu pprreemmiieerr eett aauu ddeeuuxxiieemmee
  eessssaaii??''

  Au  premier  essai,  on  parle  a  getty,  au  deuxieme  a login, deux
  programmes distincts qui peuvent se comporter differemment.

  55..22..  CCoommmmeenntt ddiirree aa LLiinnuuxx qquueell ccooddee ggeenneerreerr aa ll''aappppuuii ssuurr uunnee ttoouucchhee

  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
       %

  55..22..11..  ``PPoouurrqquuooii llaa ttoouucchhee BBaacckkSSppaaccee  nnee  ggeenneerree  ppaass  BBaacckkSSppaaccee  ppaarr
  ddeeffaauutt ??''

  (i) Parce que les terminaux VT100 ont une touche Delete au  dessus  de
  la touche Entree.

  (ii) Parce que Linus en a decide ainsi.

  55..33..  CCoommmmeenntt ddiirree aa XX dd''eecchhaannggeerr DDeelleettee eett BBaacckkssppaaccee

       % 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).

  55..44..   CCoommmmeenntt  ddiirree  aa  eemmaaccss ccee qquu''iill ddooiitt ffaaiirree ddeess ccooddeess DDeelleettee eett
  BBaacckkssppaaccee

  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.

  55..55..  CCoommmmeenntt ddiirree aa eemmaaccss ddee ppeerrmmuutteerr DDeelleettee eett BBaacckkssppaaccee

  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)

  55..66..  CCoommmmeenntt ddiirree aa kkeerrmmiitt dd''eecchhaannggeerr DDeelleettee eett BBaacckkssppaaccee

  Mettez dans votre .kermrc les lignes:

         set key \127 \8
         set key \8 \127

  55..77..  CCoommmmeenntt rreegglleerr xxtteerrmm sseelloonn vvooss mmooddeess ddee tteerrmmiinnaall pprreeffeerreess

  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.

  55..88..  CCoommmmeenntt ddiirree aa xxmmoossaaiicc qquuee llaa ttoouucchhee BBaacckkssppaaccee ggeenneerree uunnee DDEELL

  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.

  55..99..  EEtt lleess ffiicchhiieerr tteerrmmccaapp eett tteerrmmiinnffoo??

  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.

  66..  LLeess ttaabblleess ddee ccaarraacctteerreess ddee llaa ccoonnssoollee

  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).

  77..  CChhaannggeerr ddee ccoonnssoollee

  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.

  77..11..  CChhaannggeerr llee nnoommbbrree ddee CCoonnssoolleess VViirrttuueelllleess

  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.

  88..  CCttrrll--AAlltt--DDeell eett aauuttrreess ccoommbbiinnaaiissoonnss ssppeecciiaalleess

  88..11..  CCttrrll--AAlltt--DDeell ((BBoooott))

  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.

  88..22..  AAuuttrreess ccoommbbiinnaaiissoonnss

  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)

  88..33..  CCoommbbiinnaaiissoonnss ssoouuss XX

  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.

  88..44..  CCoommbbiinnaaiissoonnss ssoouuss DDoosseemmuu

  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)

  88..55..  CCoommppoossiittiioonn ddee ssyymmbboolleess

  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.

  99..  DDiivveerrsseess pprroopprriieetteess ddee llaa ccoonnssoollee

  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.

  1100..  CCoommmmeenntt ssoorrttiirr dduu mmooddee RRAAWW

  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.

  1111..  LLaa vvaarriiaabbllee TTEERRMM

  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.

  1111..11..  TTeerrmmiinnffoo

  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.

  1122..  CCoommmmeenntt ffaaiirree ppoouurr qquuee dd''aauuttrreess pprrooggrraammmmeess aacccceepptteenntt  lleess  ccaarraacc--
  tteerreess nnoonn--AASSCCIIII

  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>.

  1133..  QQuuee ffaaiitt eexxaacctteemmeenntt XXFFrreeee8866--22..11 aa ll''iinniittiiaalliissaattiioonn ddee ssaa  kkeeyymmaapp??

  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).

  1144..  TToouucchheess eett ccllaavviieerrss ppaarrttiiccuulliieerrss

  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.

  1155..  EExxeemmpplleess dd''uuttiilliissaattiioonn ddee llooaaddkkeeyyss aanndd xxmmooddmmaapp

  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.

  1155..11..  ``JJee nnee ppeeuuxx ttaappeerr qquu''aavveecc uunn sseeuull ddooiiggtt''

  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.

  1166..  CChhaannggeerr llee mmooddee vviiddeeoo

  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).

  1166..11..  IInnssttrruuccttiioonnss ppoouurr ll''uuttiilliissaattiioonn ddee rreessiizzeeccoonnss

  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.

  1177..  CChhaannggeerr llaa vviitteessssee ddee rreeppeettiittiioonn dduu ccllaavviieerr

  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.

  1188..  EEccoonnoommiisseeuurr dd''eeccrraann

  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.

  1199..  QQuueellqquueess pprroopprriieetteess dduu VVTT110000 -- mmooddee aapppplliiccaattiioonn

  : 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'

  2200..  IInnccoommppaattiibbiilliittee mmaatteerriieellllee

  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 décrit brièvement comment utiliser le système _K_i_c_k_S_t_a_r_t de
  RedHat pour rapidement installer un grand nombre de systèmes Linux
  identiques. Pour les utilisateurs expérimentés, on décrit comment mod­
  ifier la procédure d'installation de KickStart pour l'adapter à ses
  propres besoins et donne quelques indications pour créer des paque­
  tages RPM.
  ______________________________________________________________________

  Table des matières


  1. Copyright

  2. Page sur la Toile

  3. Introduction

  4. Prérequis

  5. Préparation d'une disquette d'amorçage

  6. Configuration de BOOTP/DHCP et NFS

  7. Le fichier de configuration de KickStart

     7.1 Information système
     7.2 Paquetages à installer
     7.3 Commandes shell après l'installation

  8. L'installation

  9. Montage des disquettes d'amorçage et supplémentaire

  10. Modifier l'installateur RedHat

  11. Créer vos propres RPM

  12. FAQ/Liste de voeux

  13. Crédits

  14. Annexe



  ______________________________________________________________________

  11..  CCooppyyrriigghhtt

  Copyright (c) 1998 Martin Hamilton, tous droits de reproduction
  réservés. Ce document est un « document libre ». Vous pouvez le
  modifier ou le redistribuer si vous respectez les termes de la version
  2 ou ultérieure de la GNU General Public License
  <http://www.gnu.org/copyleft/gpl.html>



  22..  PPaaggee ssuurr llaa TTooiillee

  Si vous avez obtenu ce document dans le répertoire HOWTO d'un site
  Linux ou sur un CD-ROM, vous pouvez vérifier la page KickStart HOWTO
  <http://wwwcache.ja.net/dev/kickstart/>

  pour voir s'il n'y a pas une nouvelle version de disponible.



  33..  IInnttrroodduuccttiioonn

  La version 5 de Linux RedHat est livrée 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 sélection de la langue;

  ·  la configuration réseau et la sélection des sources de la
     distribution;

  ·  la sélection du clavier;

  ·  l'installation de l'utilitaire de démarrage (ex: lilo);

  ·  le partitionnement du disque et la création du système de fichiers;

  ·  la sélection de la souris;

  ·  la configuration du serveur X-Window;

  ·  la sélection de la zone géographique;

  ·  la sélection du mot de passe de l'utilisateur _r_o_o_t;

  ·  la sélection des paquetages à installer.


  Les utilisateurs perspicaces d'une distribution RedHat auront
  probablement réalisé 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 plaçant 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
  spécifier une liste de commandes shell que vous souhaitez voir
  exécutées. 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 légales,
  être distribués par RedHat, par exemple: les systèmes de cryptage ssh
  et PGP) et procéder aux derniers réglages nécessaires pour rendre
  votre nouveau système d'exploitation parfaitement opérationnel.



  44..  PPrréérreeqquuiiss

  Il y a deux manières d'utiliser KickStart. La première est de copier
  le fichier de configuration de KickStart sur une disquette d'amorçage
  RedHat. La seconde est d'utiliser une disquette d'amorçage classique
  et de récupérer ce fichier de configuration via le réseau.

  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'amorçage RedHat - de préférence celle du
     répertoire _u_p_d_a_t_e_s, pour profiter des dernières mises à jour et
     corrections des gestionnaires de périphérique;

  4. des entrées 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 récupérer le fichier de configuration via le réseau,
  vous aurez également besoin:


  1. d'un serveur BOOTP/DHCP pour le réseau sur lequel seront installées
     vos machines. Certains serveurs alloueront automatiquement les
     nouvelles adresses dans une plage donnée (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 même machine que le serveur BOOTP avec une
     copie de la distribution RedHat montée dessus et le fichier de
     configuration de KickStart dans un répertoire _/_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-même. De même, il doit être possible de procéder à l'installation
  depuis un CD-ROM plutôt que depuis un serveur NFS. Si vous essayez
  l'une de ces deux possibilités, faites moi savoir comment vous avez
  procéder 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.



  55..  PPrrééppaarraattiioonn dd''uunnee ddiissqquueettttee dd''aammoorrççaaggee

  Tout ce que vous avez à faire est de copier le fichier de
  configuration de KickStart sur la disquette d'amoçage RedHat sous le
  nom _k_s_._c_f_g:



         mcopy ks.cfg a:







  La disquette est particulièrement remplie, et vous pourriez avoir
  besoin de détruire certains fichiers pour faire de la place. J'ai
  réussi à 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'amorçage. Le
  fichier _s_y_s_l_i_n_u_x_._c_f_g suivant permet de passer immédiatement en mode
  KickStart lorsque la machine démarre:



         default ks
         prompt 0
         label ks
           kernel vmlinuz
           append ks=floppy initrd=initrd.img






  66..  CCoonnffiigguurraattiioonn ddee BBOOOOTTPP//DDHHCCPP eett NNFFSS

  Si vous vous demandez ce que peuvent bien être ces BOOTP et DHCP, une
  description détaillée est disponible sur le site DHCP
  <http://www.dhcp.org/>. NFS est documenté en détail dans le NFS HOWTO.

  Dans la configuration NFS + BOOTP/DHCP que nous considérons, 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 théorie, il doit être possible de modifier cet emplacement en
  renvoyant le paramètre bf (_b_o_o_t _f_i_l_e) dans la réponse du serveur
  BOOTP/DHCP. Il doit même être possible d'avoir ces fichiers montés par
  NFS à partir d'une autre machine.

  Pour exporter par NFS certains répertoires à partir d'une machine
  Linux existante, créez 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 réseau 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
  répertoires 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
  répertoires exportés, par exemple en indiquant un hôte ou un sous-
  réseau particulier plutôt qu'un domaine entier.

  La plupart des serveurs NFS requièrent que vous indiquiez à mountd et
  nfsd (sur certaines versions d'Unix, ils sont précédés du préfixe
  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 démarre, les
  répertoires pourront ne pas être exportés automatiquement. Essayez de
  redémarrer la machine ou lancer les programmes suivants sous _r_o_o_t:



       # portmap
       # rpc.nfsd
       # rpc.mountd





  Comme mentionné précédemment, sur certains système le préfixe rpc.
  n'est pas utilisé. Dans les distributions Unix les plus récentes, ces
  programmes se trouvent dans le répertoire _/_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 entrée 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 commençant à _1_9_8_._1_6_8_._2_5_4_._1_2_8 et continuant
  pour les 48 adresses (la valeur héxadécimale _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-réseau  (sm) à _2_5_5_._2_5_5_._2_5_5_._0;

  ·  la passerelle par défaut (gw) à _1_9_8_._1_6_8_._2_5_4_._1;

  ·  la durée de vie  (dl) (combien de temps l'adresse sera valide) à
     « pour toujours ».


  Il semble qu'un grand nombre de versions de ce serveur ne gèrent pas
  l'adressage dynamique. Pour celles-ci, vous devrez énumérer les
  adresses physiques (typiquement MAC Ethernet) de chacune des machines
  à installer dans _/_e_t_c_/_b_o_o_p_t_a_b. Ces entrées 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 paramètre ha correspond à l'adresse physique de la
  machine à installer.


  77..  LLee ffiicchhiieerr ddee ccoonnffiigguurraattiioonn ddee KKiicckkSSttaarrtt

  Le fichier de configuration se compose de trois sections principales:


  1. informations sur le système, partionnement des disques et
     configuration réseau;


  2. paquetages RedHat à installer;

  3. commandes shells à exécuter après l'installation.

  Il existe d'autres possibilités que nous n'aborderons pas ici mais qui
  ppoouurrrraaiieenntt 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
  répertoire _i_3_8_6 d'une distribution RedHat sur votre CD-ROM ou sur un
  site miroir de RedHat.



  77..11..  IInnffoorrmmaattiioonn ssyyssttèèmmee

  Les commandes que j'ai utilisées sont:



     llaanngg
        Configuration de la langue, pour l'anglais:


          lang en




     nneettwwoorrkk
        Configuration du réseau, pour utiliser BOOTP/DHCP:


          network --bootp




     nnffss
        serveur NFS et répertoire à 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 répertoire _/_m_n_t_/_c_d_r_o_m.

     kkeeyybbooaarrdd
        Sélection du type de clavier, pour un clavier anglais:


          keyboard uk




     zzeerroommbbrr
        Efface le secteur d'amorçage du disque (MBR) - enlève tous les
        programmes de lancement pouvant s'y trouver.

     cclleeaarrppaarrtt
        Efface les partitions existantes, pour supprimer toutes les
        partitions disque avant l'installation:
          clearpart -all




     ppaarrtt
        Partionne le disque, pour créer un système de fichier de 500Mo:


          part / --size 500




     iinnssttaallll
        Effectue une nouvelle installation de RedHat.

     mmoouussee
        Définit la souris utilisée, pour une souris PS/2 ou compatible:


          mouse ps/2




     ttiimmeezzoonnee
        Définit le fuseau horaire, pour l'heure anglaise:


          timezone --utc Europe/London




     rroooottppww
        Définit le mot de passe initial de _r_o_o_t, basé sur un mot de
        passe déjà crypté:


          rootpw --iscrypted XaacoeGPmf/A.




     lliilloo
        Installe le programme LILO, pour l'installer dans le secteur
        d'amorçage du disque (MBR):


          lilo --location mbr




     %%ppaacckkaaggeess
        Paquetages à installer - voir ci-après.

     %%ppoosstt
        Commandes shells à lancer après l'installation - voir ci-après.

  Notez que le répertoire dans lequel KickStart va chercher la
  distribution RedHat doit contenir un sous-répertoire _R_e_d_H_a_t qui
  contient la distribution RedHat pour la plate-forme considérée. 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 créer vos propres mots de passe cryptés, il vous
  suffit d'utiliser Perl:



       % perl -e 'print crypt("schmurrdegurr", "Xa") . "\n";'p





  Autres options que je n'ai pas testées:


     ccddrroomm
        Installe à partir d'un CD-ROM plutô que du réseau.

     ddeevviiccee
        Déclare explicitement les détails d'un périphérique, par
        exemple:


          device ethernet 3c509 --opts "io=0x330, irq=7"




     D'autres valeurs de device sont possibles dont scsi pour les
     contrôleurs SCSI et cdrom pour les gestionnaires de CD-ROM pro­
     priétaires.

     uuppggrraaddee
        Met à jour une installation existante au lieu d'en installer une
        nouvelle.

     xxccoonnffiigg
        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 dernière option car je ne prévois
  pas d'utiliser X sur les machines installées avec KickStart. Si vous
  le faites, tenez moi au courant.

  Voici à quoi ressemble maintenant la première 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







  77..22..  PPaaqquueettaaggeess àà iinnssttaalllleerr

  La partie du fichier de configuration de KickStart consacrée aux
  paquetages débute par une ligne avec la directive %packages.  Elle est
  suivie par l'un des deux types de spécifications de paquetage: des
  paquetages peuvent être installés individuellement en donnant le nom
  de leur RPM (sans la version ni la plate-forme), des groupes de
  paquetages peuvent être installés 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 définis par défaut dans un fichier nommé _b_a_s_e_/_c_o_m_p_s dans le
  répertoire racine de la distribution RedHat. Voici ceux que l'on
  pouvait y trouver au moment où j'écris ces lignes:


  ·  Base;

  ·  Gestionnaire d'imprimante;

  ·  Système X-Window;

  ·  Outils Mail/WWW/News;

  ·  Connexion DOS/Windows;

  ·  Gestionnaires de fichiers;

  ·  Manipulation graphique;

  ·  Jeux sous X-Window;

  ·  Jeux en mode console;

  ·  Gestionnaires multimédia sous X-Window;

  ·  Console Multimedia;

  ·  Serveur d'impression;

  ·  Station en réseau;

  ·  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 réseau;

  ·  TeX;

  ·  Emacs;

  ·  Emacs avec X-Window;

  ·  Développement en C;

  ·  Bibliothèques de développement;

  ·  Développement en C++ ;

  ·  Development sous X-Window;

  ·  Documentation supplémentaire.


  Vous noterez qu'ils correspondent aux différentes configurations qui
  vous sont proposées lors de l'installation manuelle. Notez également
  que certains paquetages sont présents dans plusieurs groupes, sans que
  cela pose de problème lors de l'installation. L'entrée 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 précédé d'un _1 fasse partie
  de l'installation par défaut. Il semble donc possible de pousser un
  peu plus loin la personnalisation du processus d'installation en
  créant ses propres groupes ou en redéfinissant les groupes existant.
  Gardez moi au courant si vous essayez de le faire.


  77..33..  CCoommmmaannddeess sshheellll aapprrèèss ll''iinnssttaallllaattiioonn

  C'est probablement la fonctionnalité la plus intéressante 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 définir un
  ensemble de commandes de niveau shell qui seront exécutées une fois
  l'installation terminée (partitionnement du disque, installation des
  paquetages, etc.)


  Cette section débute par la directive %post dans le fichier de
  configuration de KickStart.  Vous pouvez ensuite utiliser tous les
  utilitaires qui viennent d'être installés 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





  Définir les entrée 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 même installer d'autres RPM que vous avez créés:



       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






  88..  LL''iinnssttaallllaattiioonn

  Démarrer la machine à installer à partir de la disquette d'amorçage
  RedHat comme d'habitude, mais au lieu de presser ENTRÉE à 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'amorçage comme mentionné plus
  haut, vous n'avez même pas besoin de vous préoccuper de ce qui suit
  :-)


  Comme nous ne faisons qu'automatiser les différentes étapes du
  processus d'installation RedHat, une boîte de dialogue peut apparaître
  au cas où KickStart n'arrive pas à déterminer ce qu'il doit faire. Le
  cas le plus probable est qu'il ne détecte pas automatiquement votre
  carte réseau, il vous demandera alors de lui fournir son IRQ et son
  adresse mémoire d'entrée/sortie.


  99..  MMoonnttaaggee ddeess ddiissqquueetttteess dd''aammoorrççaaggee eett ssuupppplléémmeennttaaiirree

  La disquette d'amorçage RedHat boot.img est au format MS-DOS et
  utilise le programme SYSLINUX pour se lancer. La disquette
  supplémentaire supp.img est au format Linux ext2. Si votre noyau
  intègre la gestion des périphériques _l_o_o_p_b_a_c_k, vous pouvez monter ces
  deux fichiers dans votre système 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'amorçage et supplémentaire 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 gérer l'option -o loop. Dans ce
  cas, vous devrez utiliser losetup pour configurer le périphérique
  _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 supplémentaire.
  Cependant, les personnes ayant une distribution Linux récente ne
  devraient pas avoir à se soucier de cela.


  Bien sûr, si vous ne voulez pas prendre de risque , vous pouvez
  utiliser les véritables disquettes plutôt que leurs images. Si votre
  temps est précieux, vous préférerez probablement utiliser les
  périphériques _l_o_o_p_b_a_c_k car vous pourrez alors utiliser des images des
  disquettes plutôt que de supporter les temps d'attente liés à la
  lecture de véritables disquettes.






  1100..  MMooddiiffiieerr ll''iinnssttaallllaatteeuurr RReeddHHaatt

  Si vous voulez modifier la procédure d'installation elle-même, son
  code source se trouve sur le CD-ROM RedHat ou sur le site miroir
  RedHat le plus proche dans le répertoire _m_i_s_c_/_s_r_c_/_i_n_s_t_a_l_l à partir du
  répertoire racine _i_3_8_6.


  Si vous examinez la disquette d'amorçage 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 sytème de fichiers au format
  ext2 enregistré comme un fichier - mais avec un truc en plus. Il est
  compressé! Vous pouvez le décompresser 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 système de fichiers
  est sa collection de modules chargeables par le noyau qui sont sur la
  disquette d'amorçage. Si vous souhaitez intégrer 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 compressée! 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 façon
  d'accéder de manière transparente aux systèmes de fichiers compressés
  (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 recréer l'archive. La façon de procéder est
     laissée 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 décompressée;

  4. démontez _/_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'amorçage: _/_m_n_t_/_b_o_o_t_/_i_n_i_t_r_d_._i_m_g
     dans notre exemple;

  7. démonter la disquette d'amorçage: _/_m_n_t_/_b_o_o_t.


  Vous pouvez maintenant créer de nouvelles disquettes d'amorçage avec:



       # cat boot.img >/dev/fd0







  1111..  CCrrééeerr vvooss pprroopprreess RRPPMM

  Le format des paquetages RPM est déjà abondamment documenté, notamment
  dans le livre _M_a_x_i_m_u_m _R_P_M d'Ed Bailey que vous pouvez télécharger
  depuis le site RPM <http://www.rpm.org/> ou trouver dans toutes les
  bonnes librairies! Cette section présente quelques trucs pour les gens
  pressés.


  Les paquetages RPM sont construits à partir d'un fichier de
  spécification. Il consiste (de la même manière 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 répertoires que vous avez spécifiés comme étant
  associés au paquetage. Il est important de noter que RPM n'a aucune
  idée des fichiers et répertoires liés à un paquetage donné - vous
  devez le lui dire.


  Voici un exemple de spécification pour une version personnalisée 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 première 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 créer automatiquement un sous-répertoire dans le répertoire
  _B_U_I_L_D dans lequel il va déballer le code source et lui appliquer les
  corrections (de nombreuses options concernant les corrections sont
  disponibles, voir le livre pour plus de détails). RPM va maintenant
  automatiquement construire le paquetage en lançant configure suivi de
  make, l'installer avec make install et prendre une ``photo'' des
  fichiers situés dans _/_u_s_r_/_s_q_u_i_d. C'est cette dernière qui va
  constituer le binaire RPM du logiciel Squid.


  Notez que l'on peut insérer des commandes shell au cours des phases de
  décompression, construction et d'installation, par exemple des appels
  en perl pour modifier des paramètres de compilation.


  Le fichier RPM final sera placé dans le répertoire _R_P_M_S dans le sous-
  répertoire 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 paramètres du fichier
  de spécification: Name, Version et Release suivi de la plate-forme,
  _i_3_8_6 dans ce cas. Gardez cela en mémoire lorsque vous créerez des RPM
  afin d'éviter de leur donner des noms exagérément longs.
  Il est également intéressant 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 première tentative de créer 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 créons simplement un RPM composé du fichier
  _/_b_o_o_t_/_v_m_l_i_n_u_z et du contenu du répertoire _/_l_i_b_/_m_o_d_u_l_e_s_/_2_._0_._3_5, et
  exécutons _/_s_b_i_n_/_l_i_l_o après que le paquetage a été installé sur une
  nouvelle machine.  Si vous connaissez une meilleure façon d'écrire le
  fichier de spécification, faites le moi savoir.



  1122..  FFAAQQ//LLiissttee ddee vvooeeuuxx

  QQ:: Peut-on appliquer automatiquement toutes les corrections de RPM? Et
  comment?


  RR11::Copiez les RPMs que vous voulez installer dans le répertoire 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 détail des
  nouveaux RPMs. Voir ci-dessous un script d'Eric Doutreleau qui fait
  cela pour vous. Si vous le faites vous-même, souvenez-vous de lancer
  _g_e_n_h_d_l_i_s_t après!


  RR22::Essayer ce script Perl: patchup
  <http://wwwcache.ja.net/dev/patchup/>. Il compare les RPMs que votre
  système a installé avec ceux présents dans un répertoire donné et
  fournit une liste de  ceux qu'il pense vous devriez mettre à jour. Il
  peut même les installer pour vous si vous lui faites confiance.


  RR33::rpm2hml est une version bien plus puissante (12Mo de C contre une
  page de Perl!) de R2.


  QQ:: Un unique fichier de configuration sur le serveur d'installation
  pour tous les clients, peut-être une solution de repli après avoir
  essayé _I_P_A_D_D_R_-_k_i_c_k_s_t_a_r_t?

  RR:: ?


  QQ::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.

  RR:: ?


  QQ:: Exclusion explicite de paquetages - par exemple touts sauf
  _s_e_n_d_m_a_i_l.

  RR:: ?


  QQ::Choisir quels services sont lancés automatiquement au démarrage par
  les scripts dans _/_e_t_c_/_r_c_._d_/.


  RR:: L'utilitaire _c_h_k_c_o_n_f_i_g vous permet de configurer les services qui
  doivent être lancés au démarrage. Vous pouvez l'utiliser parmi les
  scripts lancés après 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.

  QQ:: Quand les commandes shell de la section %post s'exécutent, 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?.

  RR:: Pas de problème! Il suffit de faire quelque chose comme:



         exec >/dev/tty5





  QQ:: Le code de création de système de fichiers vérifie-t-il existence
  de blocs défectueux?


  RR:: Si vous passez sur la console sur laquelle les sorties de la
  création du système de fichiers sont affichées, vous ne verrez aucune
  mention indiquant que le test `read-only' a été effectué.


  1133..  CCrrééddiittss

  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.


  1144..  AAnnnneexxee

  Voici le script d'Eric pour ajouter les RPM actualisés dans les
  répertoires 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 méthodes employées pour la
  galerie sur la biodiversité au Royal Ontario Museum à Toronto.
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 Droits de propriété, 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 Création 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 Démarrage normal de la console

  5. Considérations diverses

     5.1 Économiseurs d'écran
        5.1.1 /.xscreensaver
     5.2 Fichiers de son
     5.3 Billes de pointage
     5.4 Création 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


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Les bornes d'affichage d'informations rendent service dans les
  bibliothèques, les expositions, les musées, les établissements
  d'enseignement, les bureaux d'accueil municipaux, les points
  d'informations, les conférences, les galeries marchandes, les
  aéroports, bref, tout endroit où l'on désire un accès facile à
  l'information. Les bornes sont généralement munies d'écrans tactiles
  ou de dispositifs de pointage de type boule pour que les gens puissent
  accéder à un contenu attractif et tenu à jour.

  Les bornes peuvent être créées de différentes façons, depuis des
  solutions onéreuses à base de logiciel propriétaire jusqu'aux systèmes
  open source reposant sur le format HTML. Une approche de type butineur
  est particulièrement intéressante en raison de son caractère
  multimédia intrinsèque. Le format HTML marie le texte, le graphisme,
  le son et tous les médias en flux dans un format portable.

  Linux fournit une plate-forme souple pour le déploiement de bornes.
  L'installation de Linux est économique et offre de nombreuses
  possibilités, qu'il s'agisse de stations sans disque ou de serveurs
  www couplés à des bases de données. L'adaptabilité du système
  d'exploitation sous-jacent permet de gérer à distance, que ce soit par
  le téléphone ou par un autre lien réseau, une borne Linux correctement
  configurée.

  Ce HOWTO présente une méthode d'installation de Linux en tant que
  borne interactive autonome qui utilise Netscape Navigator 4.X et Fvwm2
  sur un système Red Hat 6.x. Il est issu de l'expérience de création
  d'un système 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 référence
  inclut une boule de pointage plutôt qu'un écran tactile plus onéreux.
  Il existe bien d'autres façons de créer une borne Linux mais celle-ci
  s'est avérée fiable pour nous et peut servir de point de départ à vos
  propres projets.


  11..11..  DDrrooiittss ddee pprroopprriiééttéé,, lliicceennccee eett ccoonnddiittiioonnss dd''uussaaggee

  Copyright (c) 1999 par Gene Wilburn.

  La distribution de ce document doit se conformer aux termes de la
  licence LDP tels que définis à l'adresse :
  sunsite.unc.edu/LDP/COPYRIGHT.html.



  11..22..  RReemmeerrcciieemmeennttss

  Notre borne Linux s'inspire fortement des travaux effectués 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 réalisé une
  borne très pratique et ont publié le détail de leur installation sur
  le site. Ce HOWTO constitue d'une certaine façon 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é créée par Hopscotch Interactive (www.hopscotch.ca).
  L'application originelle sous forme de fichiers de base de données à
  plat a été convertie en un système utilisant MySQL par Gord Howells
  (gordonh@rom.on.ca), concepteur et développeur de la base de donnée
  ROM.  Une version hors-borne de ce modèle réduit de site est
  consultable à l'adresse  <http://www.rom.on.ca/ontario/>.


  22..  SSuurrvvooll ddee ll''iinnssttaallllaattiioonn

  L'installation de Linux en tant que borne est semblable à celle d'une
  station de travail graphique à quelques détails près. S'il s'agit d'un
  poste autonome, il doit démarrer directement en mode borne. De plus,
  l'environnement de navigation doit être modifié pour désactiver 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-
  même. Les utilisateurs se déplacent 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 problématique.

  Une borne Linux peut être directement connectée à un site-mère via un
  réseau local ou une liaison PPP et récupérer les pages à la demande.
  Elle peut également contenir l'intégralité du site web et exécuter
  elle-même Apache et les scripts CGI associés.


  33..  MMiissee eenn ppllaaccee dd''uunn eennvviirroonnnneemmeenntt ddee ttyyppee bboorrnnee



  33..11..  FFVVWWMM22

  FVWM2 (FVWM, version 2 -- www.fvwm.org) fournit un gestionnaire de
  fenêtres pour X souple, fiable et léger qui s'avère très pratique à
  configurer pour un environnement de borne. On modifiera certaines
  options par défaut 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
  préférences globales ne gênera en rien.

  On profite également des propriétés 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'accès.

  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 décrites ci-dessous dans ce
  fichier.


  33..11..11..  //eettcc//XX1111//ffvvwwmm22//ssyysstteemm..ffvvwwmm22rrcc

  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 contrôles usuels des fenêtres sont désactivés.

  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 réside 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'exécuteur de tâches de Fvwm2, en
  accord avec le souhait d'un environnement aussi simple que possible.


  33..22..  NNeettssccaappee NNaavviiggaattoorr

  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
  contrôle 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 invoquée avec un argument
  -geometry qui nous permet de toujours l'afficher en plein écran. Cela
  fait partie de notre stratégie pour une borne reposant sur Netscape.

  À vous de décider de la résolution de la borne. Pour des moniteurs de
  19 à 20 pouces, 640x480 nous paraît trop gros, 1024x768 trop petit et
  800x600 correct pour le public (vous en jugerez peut-être
  différemment). Une fois la résolution fixée, vous êtes prêt à
  configurer Navigator. Par la suite, nous travaillerons en 800 par 600.
  À vous de procéder aux ajustements nécessaires si votre résolution
  diffère.

  _N_o_t_e_: Navigator sera exécuté par root pendant le démarrage.  Il faut
  donc procéder à toutes les opérations depuis le compte root dans le
  répertoire /root/.netscape.

  Exécutez Netscape et cliquez sur le menu Edit, Preferences.  Dans la
  rubrique Appearance, activez ``Show Toolbar as Text Only''.  Dans
  Appearance, Fonts, réglez la taille des polices fixed- et variable-
  width à au moins 14pt sans quoi la zone d'affichage sera trop petite
  pour une lecture agréable.

  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 accès au sommet de l'arborescence. Vous pouvez
  compléter afin de démarrer plus profondément.

  Sauvegardez ces choix puis cliquez sur View dans la barre de menu de
  Navigator. Désactivez Personal Toolbar et Location Bar.

  L'interface ressemble nettement plus à celle d'une borne, non ?  Vos
  choix seront sauvegardés à la sortie de Navigator.


  33..33..  RReeccoouuvvrreemmeenntt ddee NNaavviiggaattoorr

  Examinez de près votre écran Navigator et vous remarquerez quatre
  zones qui doivent être recouvertes et protégées des sélection à la
  souris ou à la boule :


  1. la barre de menu en haut ;

  2. le sélectionneur sur le côté gauche de la barre de navigation ;

  3. tout ce qui figure à droite de Home dans la barre de navigation ;

  4. le contrôle de sécurité dans le coin inférieur gauche de Navigator.

  Voici un schéma des zones à masquer :

       +---------------------------------------+
       |            # 1 Toolbar                |
       +--+------------+-----------------------+
       |#2|            |  #3 Navbar            |
       +--+            +-----------------------+
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       |                                       |
       +--------+                              |
       |#4 Key  |                              |
       +---------------------------------------+




  Pour les zones supérieures (#1-3), on aura recours à trois images.
  Pour le contrôle de sécurité (#4), on emploiera xdaliclock.


  33..33..11..  CCrrééaattiioonn ddeess mmaassqquueess

  L'approche la plus facile pour les zones #1-3 consiste à récupérer une
  copie d'écran de Navigator en 800 par 600 et à découper les parties
  adéquates. 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 système 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 nécessitera plusieurs essais. Afin de vous aider, les fichiers
  xpm que nous avons créés et nos fichiers de configuration sont
  disponibles sur le site suivant :
  <http://www.rom.on.ca/kiosk/HOWTO/>.  Télécharger nos fichiers et vous
  en servir comme point de départ sera sûrement le plus simple.


  33..44..  //rroooott//kkiioosskk..xxiinniittrrcc

  De même que vous créeriez 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 différentes fonctionnalités :


  ·  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 sécurité de Navigator
     (adapté à une résolution 800 par 600) ;

  ·  démarrage de Netscape et boucle de vérification de sa présence pour
     l'exécuter à nouveau s'il disparaît ;

  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
  ______________________________________________________________________




  33..55..  //rroooott//xxkkiioosskk

  Vous pouvez à présent tester la configuration de votre borne. Puisque
  vous allez le faire à répétition, ainsi que depuis un script
  d'initialisation, créez 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.


  44..  IInniittiiaalliissaattiioonn ddee llaa bboorrnnee

  Dans des conditions normales (en tant que borne donc), Linux devrait
  démarrer directement en mode borne. En cas de coupure de courant, de
  redémarrage accidentel ou planifié, vous devez donc configurer le
  système pour qu'il en soit ainsi.

  Nous avons choisi le niveau de fonctionnement 4, d'habitude inutilisé,
  pour notre borne. Voici les modifications apportées au fichier
  /etc/inittab :


  44..11..  MMooddiiffiiccaattiioonn dduu ffiicchhiieerr //eettcc//iinniittttaabb


  ______________________________________________________________________
  # 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:
  ______________________________________________________________________




  44..22..  SSccrriipptt //eettcc//rrcc..dd//rrcc..44//SS9999xxkkiioosskk

  Afin de démarrer la borne après tout le reste -- dans notre cas Apache
  et MySQL --, créez 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
  démarrera directement en mode borne. Telnet et ftp sont désactivés. On
  installe ssh pour la maintenance de la borne à distance avec ssh et
  scp.


  44..33..  DDéémmaarrrraaggee nnoorrmmaall ddee llaa ccoonnssoollee

  On souhaite parfois, notamment lors des tests, disposer d'une console
  où travailler comme en niveau d'init 3. Pour ce faire, appuyez sur
  CCttrrll--BBaacckkssppaaccee afin de redémarrer le système. Lorsque l'invite LILO:
  apparaît, tapez :



       LILO: linux init 3




  et enregistrez-vous comme d'habitude.


  55..  CCoonnssiiddéérraattiioonnss ddiivveerrsseess



  55..11..  ÉÉccoonnoommiisseeuurrss dd''ééccrraann

  Selon le déploiement prévu de la borne, on ne désire pas
  nécessairement que l'économiseur affiche toutes ses images disponibles
  par défaut. Pour la galerie sur la biodiversité, nous ne voulions que
  les images fractales animées qui évoquaient les sciences de la vie.

  Après un test de plusieurs économiseurs, nous avons décidé d'utiliser
  deux thèmes aléatoirement : _c_o_r_a_l et _f_o_r_e_s_t.

  On restreint xscreensaver avec un fichier .xscreensaver dans le
  système de fichier racine (/) qui contient les directives suivantes :
  55..11..11..  //..xxssccrreeeennssaavveerr


  ______________________________________________________________________
  programs: \
          coral -root \n\
          forest -root \n
  ______________________________________________________________________





  55..22..  FFiicchhiieerrss ddee ssoonn

  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 données 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
  multimédias par rapport à ce dont on dispose avec Windows ou sur un
  Mac.

  Pour activer le son, nous avons déployé 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 testés 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 présence d'une page supplémentaire manque d'élégance, nous
  avons décidé que la stabilité de Linux valait largement quelques clics
  pour retourner à la page précédente.

  Autre problème : 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 légèrement 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.

  Après recompilation, j'ai ajouté le plugin à Netscape.

  Un dernier mot concernant les fichiers-sons : nous avons reçu à
  l'origine un mélange de fichiers .au et .wav. L'expérience a plaidé en
  faveur des .au en terme de stabilité et nous avons converti tous les
  fichiers à ce format.


  55..33..  BBiilllleess ddee ppooiinnttaaggee

  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 collègue 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 désactiver l'action de l'équivalent du bouton
  droit de la souris qui déclenche l'apparition de fenêtres de dialogue
  avec Netscape Navigator.

  En construisant notre propre dispositif, nous avons été capables
  d'effectuer exactement les connexions voulues : un contrôle avec deux
  boutons équivalents au clic gauche. Les boutons se trouvent des deux
  côtés du dispositif et sont adaptés aussi bien aux gauchers qu'aux
  droitiers. Les personnes chargées de la conception des bornes ont
  inclus nos éléments tels quels.

  Pour notre borne, nous avons choisi les composants suivants (qui sont
  capables de résister aux termites) :


  ·  une boule de 2 fois 1/4 de pouce Atari (rouge) ;

  ·  un kit d'interfaçage IBM (compatible avec le protocole souris série
     Microsoft) ;

  ·  des boutons poussoirs lumineux (rouges).

  Nous avons acheté un boîtier Hammond Manufacturing en plastique (cat
  no. 1591ABK) chez un revendeur d'électronique local pour héberger
  l'ensemble.

  En prévision de bornes supplémentaires et de défaillances, nous avons
  commandé quatre ensembles supplémentaires.


  55..44..  CCrrééaattiioonn eett mmiissee aauu ppooiinntt ddeess ppaaggeess HHTTMMLL ppoouurr lleess bboorrnneess

  Dans le meilleur des mondes possibles (?), vous partiriez de zéro pour
  réaliser les pages HTML de votre borne. En gardant à l'esprit que la
  consultation d'une borne interactive diffère de celle de pages sur le
  web depuis une station individuelle, les indications suivantes vous
  donneront quelques points de repère :


  ·  les passages textuels doivent rester courts et employer de grandes
     polices ;

  ·  évitez les écrans qui nécessitent un ascenseur ;

  ·  mettez des images colorées 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 durée, inclus si
     possible dans la page ;

  ·  le style doit être concis et énergique, vous disserterez ailleurs.

  Malheureusement, vous hériterez parfois de pages conçues dans une
  optique davantage web que borne. Dans ce cas, une reprise complète des
  pages risque de consommer trop de temps. Lors du développement de
  pages web, suivez les instructions suivantes :


  ·  ôtez tous les HREF externes, notamment les MAILTO ;

  ·  supprimez l'inutile, les logos, etc. des pages ;

  ·  vérifiez la taille des polices et augmentez-la au besoin ;

  ·  éliminez les gifs animés sans rapport direct avec la page en cours
     de consultation ;

  ·  éliminez purement et simplement les gifs animés ;

  ·  simplifiez l'organisation de chaque page ;

  ·  jetez un oeil du côté des SSI pour faciliter l'orientation ou
     fournir un cadre uniforme aux pages.



  66..  PPrroojjeettss

  Nos tentatives précédentes à base d'ordinateurs sous Windows(R)
  n'avaient pas été satisfaisantes. Les unités se révélaient instables
  et se bloquaient fréquemment. 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 possibilités.


  66..11..  BBoorrnneess ddiissttaanntteess

  Parmi les objectifs futurs, figure le déploiement de bornes à travers
  Toronto. Les gens pourraient consulter des informations sur le site
  et, nous l'espérons, être suffisamment intéressés pour aller
  finalement consulter le site ROM lui-même. Nous envisageons des lieux
  tels les conventions, les expositions, les galeries commerciales, ou
  tout événement particulier. Nous songeons aussi à des sites plus
  éloignés comme les bibliothèques publiques.

  Pour ce projet, nous pensons avoir recours à des systèmes Linux munis
  de modems qui contacteraient le site-mère pour mettre à jour
  quotidiennement les fichiers et qui pourraient être appelés pour des
  opérations de maintenance.


  66..22..  ÉÉccrraannss ttaaccttiilleess

  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 très
  discrètes.


  66..33..  CCllaavviieerrss

  Nous serons sûrement amenés à déployer des bornes munies de claviers.
  Un nouveau défi en matière 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.


  66..44..  CCoollllaabboorraattiioonn

  Toute collaboration avec d'autres développeurs de bornes pour étendre
  le Kiosk-HOWTO sera la bienvenue. Comme on dit avec Perl : ``Il existe
  plusieurs façons de faire.''

























































	Ce répertoire contient les versions françaises 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 auprès 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 février 2000

  Tout sur la géométrie des disques durs et la limite des 1024 cylin­
  dres.

  11..  EEnnoonnccéé dduu pprroobbllèèmmee

  Supposons que vous ayez un disque dur de plus de 1024 cylindres.
  Supposons également que vous ayez un système d'exploitation qui
  utilise l'ancienne interface INT13, d'Entrée/Sortie sur disques.  Dans
  ce cas, vous avez un problème, parce que cette interface utilise un
  champ de 10 bits pour coder les cylindres sur lesquels sont effectuées
  les Entrées/Sorties, de telle manière que les cylindres 1024 et au-
  delà sont inaccessibles.

  Heureusement, Linux ne se sert pas du BIOS, donc il n'y a pas de
  problème.

  Sauf peut-être pour deux choses :

  (1) Quand vous démarrez votre système, Linux ne fonctionne pas encore
  et ne peut donc pas vous préserver des problèmes liés au BIOS.  Cela a
  certaines conséquences pour LILO et d'autres programmes d'amorçage du
  même acabit.

  (2) Il est nécessaire que tous les systèmes d'exploitation qui se
  partagent un même 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'interpréter la table des partitions de la même manière. Cela a
  quelques conséquences pour le noyau de Linux et pour fdisk.

  Vous trouverez ci-dessous une description assez poussée de tous les
  détails importants. Prenez en compte le fait que j'utilise comme
  référence un noyau dans sa version 2.0.8. D'autres versions pourront
  donc présenter quelques différences.



  22..  RRééssuumméé

  Vous avez un nouveau disque de grande capacité. Que faire ? Bon, du
  côté logiciel il faut utiliser fdisk (ou mieux, cfdisk), pour créer
  les partitions, ensuite mke2fs pour créer un système de fichiers, et
  enfin mount pour faire le lien entre ce nouveau système de fichiers et
  l'arborescence déjà 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 nécessaire de lire ce
  HOWTO à partir du moment où, de nos jours, il n'y a _p_a_s de problème
  avec les disques de grande capacité. La grande majorité des problèmes
  constatés est due au fait que les gens pensent qu'il peut y avoir un
  problème, et installent un gestionnaire de disques durs, ou passent en
  mode expert dans fdisk, ou encore spécifient explicitement une
  géométrie de disque à LILO ou sur la ligne de commande du noyau.

  Cependant, les domaines dans lesquels interviennent typiquement les
  problèmes sont :

  ·  un matériel ancestral ;

  ·  plusieurs systèmes d'exploitation sur le même disque dur ;

  ·  le démarrage.

  _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 très tôt
  supportés. 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 récent (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 ``Problèmes de l'IDE avec des
  disques durs de 34 Go et plus'' ci-dessous.

  Si LILO reste suspendu au démarrage, il faut essayer de spécifier
  ``linear'' dans le fichier de configuration /etc/lilo.conf.  (Et si
  vous aviez vraiment linear, essayez sans.)

  Il y a des problèmes de géométrie qui peuvent être résolus en passant
  explicitement une géométrie 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 vérifiez 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 ``unités''
  binaires et décimales, et sachez que l'espace libre rapporté par df
  pour un disque vide est inférieur de quelques centièmes à la taille de
  la partition, ce à cause d'un en-tête de gestion.

  Maintenant, si vous pensez qu'il y a tout de même des problèmes, ou
  simplement si vous êtes curieux, lisez la suite.


  33..  UUnniittééss eett ttaaiilllleess

  Un kilo-octet (Ko) est égal à 1000 octets (NdT : un octet se dit byte
  en anglais, et est abrégé avec un `B' en majuscule. A ne pas confondre
  avec un bit, qui se dit bit et qui est abrégé avec un `b' en
  minuscule !).  Un Méga-octet (Mo) est égal à 1000 Ko.  Un Giga-octet
  (Go) est égal à 1000 Mo.  Un Téra-octet (To) est égal à 1000 Go.  Cela
  est la norme dans le Système 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 unités 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 représente 1073741824
  octets (1,07 Go) et 1 Tio vaut 1099511627776 octets (1,1 To).

  D'une manière assez normale, les constructeurs de disques durs suivent
  la norme SI et utilisent des unités décimales. Cependant, les messages
  de démarrage de Linux et quelques programmes de type fdisk utilisent
  les symboles MB et GB (Mo et Go en français) pour les unités binaires,
  ou binaires-décimales mélangées. 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 unités décimales (ou simplement en
  octets).
  En ce qui concerne la terminologie et les abréviations des unités
  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
  dénommer _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 nôtre, la seule chose importante est de mettre
  l'accent sur le fait qu'un méga octet contient précisément 1000000
  octets, et qu'il est nécessaire d'employer d'autres termes ou d'autres
  abrévations si vous voulez désigner autre chose.


  33..11..  TTaaiillllee dd''uunn sseecctteeuurr

  Dans le cadre de ce texte, un secteur a une taille de 512 octets.
  Cela est pratiquement toujours vrai, mais certains disques Magnéto-
  Optiques par exemple, utilisent une taille de secteur égale à 2048
  octets, et toutes les capacités données ci-dessous doivent être
  multipliées par quatre. (Si vous utilisez fdisk sur de tels disques,
  assurez-vous d'avoir une version 2.9i ou supérieure, et passez-lui
  l'option `-b 2048'.)


  33..22..  TTaaiillllee dd''uunn ddiissqquuee

  Un disque avec C cylindres, H têtes (NdT : tête se dit head en
  anglais, d'où l'abréviation ;-)) et S secteurs par piste possède 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 déduite des valeurs C/H/S
  rapportées par ce dernier.


  44..  AAccccèèss àà uunn ddiissqquuee dduurr

  Si on veut lire ou écrire quelque chose à partir de, ou sur un disque
  dur, il faut spécifier une position sur ce disque, en donnant par
  exemple un numéro de secteur ou de bloc.  Si le disque dur est de type
  SCSI, alors ce numéro 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 même
  chose. Mais si le disque dur est vieux, RLL, MFM ou IDE avant
  l'apparition du LBA, alors l'électronique qui lui est attachée attend
  un triplet (cylindre, tête, secteur) pour désigner l'endroit voulu.

  La correspondance entre la numérotation linéaire et cette notation
  tridimensionnelle est la suivante : pour un disque dur avec C
  cylindres, H têtes et S secteurs/pistes, la position (c,h,s) en 3D, ou
  la notation CHS, est la même que la position c*H*S + h*S + (s-1) en
  notation linéaire ou bien LBA.  (Le -1 est dû au fait que
  traditionnellement les secteurs sont numérotés à partir de 1 et non 0,
  dans cette notation 3D.)

  En conséquence, pour permettre des accès à un très vieux disque non-
  SCSI, nous devons connaître sa _g_é_o_m_é_t_r_i_e, c'est-à-dire les valeurs de
  C, H et S.





  44..11..  AAccccèèss ddiissqquueess dduu BBIIOOSS eett llaa lliimmiittee ddeess 11002244 ccyylliinnddrreess

  Linux ne se sert pas du BIOS, mais d'autres systèmes d'exploitation le
  font. Le BIOS, qui existait avant le temps du LBA, offre avec INT13
  des routines d'Entrée/Sortie disque qui prennent (c,h,s) comme
  arguments.  (Plus précisément : AH sélectionne la fonction à exécuter,
  CH correspond aux 8 bits de poids faible du numéro de cylindre, CL a
  dans ses bits 7-6 les deux bits de poids fort de ce même numéro et
  dans ses bits 5-0 le numéro du secteur, DH est le numéro de la tête,
  et DL est le numéro 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
  numéro du cylindre, 8 bits pour le numéro de tête, et 6 bits pour le
  numéro de secteur sur la piste (numéroté de 1 à 63). Il s'ensuit que
  le numéro 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 géométrie pour gérer les disques durs, même quand cela
  n'a plus été nécessaire pour effectuer des Entrées/Sorties, mais
  uniquement pour converser avec le BIOS. Cela signifie bien sûr que
  Linux a besoin du support de la géométrie du disque dur quand il est
  nécessaire de communiquer avec le BIOS ou avec d'autres systèmes
  d'exploitation, même sur des disques durs modernes.

  Cet état de choses a duré pendant à peu près quatre ans. Ont alors
  commencé à apparaître sur le marché des disques durs qui ne pouvaient
  plus être adressés 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é créée : les dénommées Fonctions
  INT13 Etendues, où DS:SI pointe sur un paquet représentant l'adressage
  du disque sur 16 octets, qui contient un nombre absolu de blocs
  commençant par 8 octets.

  Tout doucement, le monde Microsoft semble aller vers une utilisation
  de ces Fonctions INT13 Etendues. Probablement, dans quelques années,
  plus aucun système moderne placé dans un ordinateur moderne n'aura
  besoin du concept de `géométrie de disque dur'.


  44..22..  HHiissttooiirree dduu BBIIOOSS eett ddeess lliimmiitteess ddee ll''IIDDEE


     SSppéécciiffiiccaattiioonn AATTAA ((ppoouurr lleess ddiissqquueess dduurrss IIDDEE)) -- llaa lliimmiittee ddeess 113377
        GGoo
        Au plus 65536 cylindres (numérotés de 0 à 65535), 16 têtes
        (numérotées de 0 à 15), 255 secteurs par piste (numérotés 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 problème (en 1999), mais ça le
        deviendra dans quelques années.


     BBIIOOSS IInntt 1133 -- llaa lliimmiittee ddeess 88,,55 GGoo
        Au plus 1024 cylindres (numérotés de 0 à 1023), 256 têtes
        (numérotées de 0 à 255), 63 secteurs par piste (numérotés de 1 à
        63) pour une capacité totale maximale de 8455716864 octets (8,5
        Go). De nos jours, cela est une sérieuse limitation. Cela
        signifie que DOS ne peut utiliser les actuels disques de grande
        capacité.


     LLaa lliimmiittee ddeess 552288 MMoo
        Si les mêmes valeurs c,h,s sont utilisées pour les appels aux
        fonctions Int13 du BIOS et pour les opérations d'Entrées/Sorties
        du disque dur, alors les deux limitations s'ajoutent, et l'on ne
        peut utiliser au plus que 1024 cylindres, 16 têtes, 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 problèmes
        aux alentours de 1993, et les gens ont eu recours à toutes
        sortes de bidouillages, aussi bien au niveau matériel (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 géométrie
        quand il s'adressait au lecteur, et une autre géométrie, fausse
        celle-là, quand il parlait à DOS, et faire des conversions de
        l'une à l'autre.


     LLaa lliimmiittee ddeess 22,,11 GGoo ((aavvrriill 11999966))
        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 accéder 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 démarrage. Cela a pour effet de rendre les disques avec une
        géométrie 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 géométrie 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>.


     LLaa lliimmiittee ddeess 33,,22 GGoo
        Il y avait un bug dans la gestion des BIOS Phoenix 4.03 et 4.04
        qui bloquait le système lors de la configuration du CMOS pour
        des disques durs ayant une capacité supérieure à 3277 Mo. Jetez
        un oeil à la page plus de 3 Go
        <http://www.firmware.com/support/bios/over3gb.htm>.


     LLaa lliimmiittee ddeess 44,,22 GGoo ((fféévvrriieerr 11999977))
        Une conversion simple du BIOS (ECHS = CHS Etendu, parfois appelé
        `Large disk support' ou simplement `Large') fonctionne en
        doublant le nombre de têtes et en divisant par deux le nombre de
        cylindres montrés au DOS, de manière répétée, jusqu'à ce que le
        nombre de cylindres soit au plus égal à 1024.  Maintenant, DOS
        et Windows 95 ne peuvent pas supporter 256 têtes de lecture, et
        donc, dans le cas fréquent où le disque dit avoir 16 têtes, cela
        signifie que cette moulinette ne fonctionne que jusqu'à une
        taille de 8192*16*63*512=4227858432 octets (avec une fausse
        géométrie de 1024 cylindres, 128 têtes 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>.


     LLaa lliimmiittee ddeess 77,,99 GGoo
        Des BIOS un peu plus malins que les autres évitent le problème
        précédent en ajustant d'abord le nombre de têtes à 15 (`revised
        ECHS'), de façon qu'une fausse géométrie comportant 240 têtes
        soit obtenue, valable jusqu'à une taille de
        1024*240*63*512=7927234560 octets.


     LLaa lliimmiittee ddeess 88,,44 GGoo

        En définitive, si le BIOS fait tout ce qu'il peut pour réussir
        la conversion, et utilise 255 têtes et 63 secteurs par piste
        (`assisted LBA' ou simplement `LBA') il peut atteindre
        1024*255*63*512=8422686720 octets, soit légèrement moins que la
        précédente limite de 8,5 Go, cela parce que les géométries avec
        256 têtes doivent être évitées. (Cette conversion utilisera pour
        le nombre de têtes la première 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 divisée par
        (H*63*512).)


     LLaa lliimmiittee ddeess 3333,,88 GGoo ((AAooûûtt 11999999))

        Le prochain obstacle se présente avec une taille de 33,8 Go.  Le
        problème est qu'avec les 16 têtes et les 63 secteurs/piste par
        défaut, ça donne un nombre de cylindres supérieur à 65535, qui
        ne rentre pas dans un short.  La plupart des BIOS existants ne
        peuvent pas gérer 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 problèmes posés 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 détails, IDE Hard Drive Capacity Barriers
  <http://www.maxtor.com/technology/whitepapers/63001.html>.

  Les disques durs de plus de 8,4 Go sont supposés donner leur géométrie
  comme étant 16383/16/63. Cela signifie en fait que la `géométrie' est
  obsolète, et qu'elle ne peut plus servir à calculer la taille totale
  d'un disque dur.



  55..  DDéémmaarrrraaggee

  Quand le système est mis en route, le BIOS lit le secteur 0 (connu
  sous le nom de MBR : le "Master Boot Record", la donnée principale
  d'amorçage) du premier disque dur (ou de la disquette, ou du cd-rom),
  et saute au code trouvé à cet endroit -- en général un chargeur
  d'amorce. Les petits chargeurs trouvés à cet endroit n'ont, par
  principe, pas leur propre gestionnaire de disques durs, et utilisent
  plutôt les services du BIOS. Cela signifie qu'un noyau Linux ne peut
  être chargé que s'il est entièrement situé dans les 1024 premiers
  cylindres du disque.

  Ce problème est résolu de manière très simple : assurez-vous que le
  noyau (et peut-être d'autres fichiers utilisés pendant la phase de
  démarrage, comme les fichiers `map' de LILO) soit situé sur une
  partition qui est comprise toute entière dans les 1024 premiers
  cylindres d'un disque dur auquel le BIOS peut accéder -- il est
  probable qu'il s'agisse du premier ou du second disque.

  Ainsi, créez une petite partition, disons d'une taille de 10 Mo, de
  telle manière qu'il y ait de la place pour une poignée de noyaux, en
  vous assurant qu'elle soit contenue entièrement dans les 1024 premiers
  cylindres du premier ou du second disque dur. Montez-le en tant que
  répertoire /boot ; ainsi, LILO pourra y mettre ses propres fichiers.


  55..11..  LLIILLOO eett ll''ooppttiioonn ``lliinneeaarr''

  Un autre point est que le programme d'amorçage et le BIOS doivent être
  d'accord sur la géométrie du disque dur. LILO demande la géométrie au
  noyau, mais de plus en plus d'auteurs de gestionnaires de disques durs
  suivent la mauvaise habitude qui consiste à déduire une géométrie à
  partir de la table de partitions, plutôt que de dire à LILO ce que le
  BIOS va utiliser. Donc, la géométrie fournie par le noyau est souvent
  inutile.  Dans de tels cas on peut faciliter la tâche à LILO en lui
  passant l'option linear.  Il en résulte que LILO n'a pas besoin
  d'informations sur la géométrie au moment d'installer le programme
  d'amorçage (il stocke des adresses linéaires dans des cartes :
  fichiers `map') mais fait la conversion des adresses linéaires au
  moment du démarrage.  Pourquoi cela n'est-il pas le comportement par
  défaut ? En fait, il y a un inconvénient : avec l'option `linear',
  LILO ne connaît plus les numéros de cylindres, et par conséquent ne
  peut plus vous avertir quand une partie du noyau a été enregistrée au-
  delà de la limite du cylindre 1024, et vous pouvez vous retrouver avec
  un système qui ne démarre plus.


  55..22..  UUnn bbuugg ddee LLIILLOO

  Avec les versions de LILO antérieures à la 2.1 il y a un autre
  désavantage : la conversion des adresses effectuée au démarrage
  comporte un bug.  Quand c*H est supérieur ou égal à 65536, le calcul
  provoque un dépassement de capacité.  Pour H supérieur à 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ù réside l'image du noyau, H=nombre de têtes du disque).


  55..33..  11002244 ccyylliinnddrreess ccee nn''eesstt ppaass 11002244 ccyylliinnddrreess

  Tim Williams a écrit : "J'avais ma partition Linux en dessous des 1024
  premiers cylindres, et ça ne démarrait quand même pas. Au début quand
  je l'ai déplacée en dessous de 1 Go, les choses fonctionnaient."
  Comment cela est-il possible ? En fait, c'était un disque dur SCSI
  avec un contrôleur 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 trouvée à 1 Gio, alors que Linux utilisait la seconde méthode et
  LILO estimait que la limite était à 8,4 Go.


  66..  GGééoommééttrriiee dduu ddiissqquuee dduurr,, ppaarrttiittiioonnss eett ``oovveerrllaapp''

  Si vous avez plusieurs systèmes d'exploitation sur vos disques durs,
  alors chacun utilise une ou plusieurs partitions. Un désaccord sur la
  localisation de ces partitions peut avoir des conséquences
  catastrophiques.


  Le MBR contient une _t_a_b_l_e _d_e_s _p_a_r_t_i_t_i_o_n_s qui décrit où se situent les
  partitions (primaires). Il y a 4 entrées à la table, pour 4 partitions
  primaires, et chacune ressemble à :








  struct partition {
          char active;    /* 0x80 : on peut démarrer 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;      /* numéro de secteur sur 32 bits (en commençant à 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
  donnée à la fois par les champs begin et end codés sur 24 bits, et par
  les champs start et length codés 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 années.  (Donc, les
  partitions peuvent être très grandes, mais il y a une sérieuse
  restriction avec le système de fichiers ext2 quand il est utilisé sur
  des machines avec des entiers codés sur 32 bits : la taille maximale
  d'un fichier est limitée à 2 Gio.)

  DOS utilise les champs begin et end, et se sert des appels INT13 du
  BIOS pour accéder aux disques durs ; il ne peut gérer de ce fait que
  des disques dont la taille ne dépasse pas 8,4 Go, même avec un BIOS
  qui fait des conversions. (La taille des partitions ne peut pas
  excéder 2,1 Go à cause des restrictions du système de fichiers FAT16.)
  La même chose est valable pour Windows 3.11, WfWG et Windows NT 3.*.

  Windows 95 intègre la gestion des interfaces INT13 Etendues, et
  utilise des types de partition spéciaux (c, e, f à la place de b, 6,
  5) pour indiquer que l'on doit accéder à la partition de cette
  manière.  Quand ces types de partition sont utilisés, les champs begin
  et end contiennent des informations factices (1023/255/63).  Windows
  95 OSR2 introduit le système 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
  `problématique' : 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
  numéros de cylindre plus grands que 1024 : il y aura toujours
  `chevauchement' dès 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 typées c, e
  ou f, alors tout apparaît 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.






  77..  CCoonnvveerrssiioonn eett GGeessttiioonnnnaaiirreess ddee DDiissqquueess DDuurrss

  La géométrie des disques durs (avec têtes, cylindres et pistes) est
  une notion qui date de l'âge de MFM et RLL. En ces temps là cela
  correspondait à une réalité physique. Aujourd'hui, avec l'IDE ou le
  SCSI, plus personne n'est intéressé par les `véritables' valeurs de la
  géométrie 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
  extérieur 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 utilisée pour renseigner le disque dur sur
  le nombre de têtes et de secteurs par piste qu'il est sensé avoir à ce
  moment précis.  Il est assez normal de voir un gros disque dur récent
  qui n'a que 2 têtes, 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 linéaire de secteurs numérotés 0, 1, ..., et de laisser le
  micro-code trouver où, sur le disque dur, est situé tel ou tel
  secteur. Cette numérotation linéaire est appelée LBA.

  Donc, à présent, la vision conceptuelle est la suivante : DOS, ou quel
  que soit le programme d'amorçage, 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 géométrie factice dont l'utilisateur se sert. Si le
  disque dur accepte le LBA, alors cette valeur est utilisée pour les
  Entrées/Sorties sur le disque. Autrement, elle est à nouveau convertie
  en (c',h',s') en utilisant la géométrie dont le disque se sert cette
  fois-là, et qui est utilisée pour les Entrées/Sorties.

  Remarquez qu'il y a une légère confusion dans l'utilisation de
  l'expression `LBA' : en tant que terme décrivant les possibilités d'un
  disque dur, cela signifie `Linear Block Adressing' -- Adressage de
  blocs de manière linéaire -- (par opposition à un adressage CHS). En
  tant que terme de configuration du BIOS, il décrit la méthode de
  conversion parfois appelée `Assisted LBA' -- voir plus haut : ```La
  limite des 8,4 Go'''.

  Un comportement à peu près identique apparaît quand le micro-code ne
  parle pas le LBA, mais que le BIOS connaît la conversion. (Dans la
  configuration il est souvent mentionné `Large'.) Donc, le BIOS va
  présenter une géométrie (C,H,S) au système d'exploitation, et va
  utiliser (C',H',S') quand il parlera au contrôleur 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 accès à 8,4 Go maximum (7,8 Gio).

  (La troisième option de configuration est `Normal', pour laquelle
  aucune conversion n'est effectuée.)

  Si un BIOS ne connaît 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 réalisé en faisant résider 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 système d'exploitation. C'est pourquoi on peut avoir des
  problèmes en démarrant depuis une disquette quand un gestionnaire de
  disque dur a été installé.

  Le résultat est plus ou moins le même avec un BIOS qui fait des
  conversions - mais particulièrement, c'est quand on utilise plusieurs
  systèmes d'exploitation sur le même disque dur que ces gestionnaires
  peuvent poser beaucoup de problèmes.

  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 détails supplémentaires sont donnés dans ce qui suit.



  88..  CCoonnvveerrssiioonnss dduu nnooyyaauu ppoouurr lleess ddiissqquueess dduurrss IIDDEE

  Si le noyau de Linux détecte la présence d'un gestionnaire de disque
  sur un disque dur IDE, il va essayer de recartographier le disque de
  la même manière que l'aurait fait le gestionnaire de disque, comme ça
  Linux voit le même partitionnement pour, par exemple, DOS avec OnTrack
  ou EZ-Drive.  Cependant, AUCUNE recartographie n'est effectuée quand
  une géométrie a été passée 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 très bien briser
  la compatibilité avec un gestionnaire de disque.

  Si vous êtes touché par ce problème et que vous connaîssez 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 têtes (H*C reste constant) jusqu'à
  ce que C <= 1024 ou que H = 255.

  Ci-dessous les détails -- les titres des sous-sections sont les
  messages qui apparaissent dans les différents messages de démarrage.
  Ici et partout ailleurs dans ce texte, les types des partitions sont
  donnés en hexadécimal.



  88..11..  EEZZDD

  EZ-Drive est détecté par le fait que le type de la première partition
  primaire est 55. La géométrie est recartographiée comme décrit ci-
  dessus, et la table des partitions du secteur 0 est supprimée -- à 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 redirigées vers le secteur 1. Ce comportement peut être
  modifié en recompilant le noyau avec  #define FAKE_FDISK_FOR_EZDRIVE
  0  dans ide.c.


  88..22..  DDMM66 :: DDDDOO

  OnTrack DiskManager (sur le premier disque dur) est détecté grâce au
  type 54 de la première partition primaire. La géométrie est
  recartographiée comme décrit ci-dessus et la totalité du disque est
  décalée de 63 secteurs (comme ça, l'ancien secteur 63 devient le
  numéro 0). Ensuite un nouveau MBR (avec une table des partitions) est
  lu depuis le nouveau secteur 0. Bien sûr ce décalage a pour but de
  libérer de la place pour le DD0 -- c'est pourquoi il n'y a pas de
  décalage sur les autres disques durs.


  88..33..  DDMM66 :: AAUUXX

  OnTrack DiskManager (sur les autres disques durs) est détecté grâce au
  type 51 ou 53 de la première partition primaire. La géométrie est
  recartographiée comme décrit ci-dessus.


  88..44..  DDMM66 :: MMBBRR

  Une version plus ancienne de OnTrack DiskManager n'est pas détectée
  grâce au type de partition, mais par signature. (Un test est effectué
  pour savoir si la valeur de décalage trouvée dans les octets 2 et 3 du
  MBR n'est pas supérieure à 430, et si le short trouvé à cette valeur
  de décalage est égal à 0x55AA et qu'il est suivi par un octet impair.)
  Une fois encore, la géométrie est recartographiée comme décrit ci-
  dessus.


  88..55..  PPTTBBLL

  Finalement, il y a un test qui tente de déduire une conversion à
  partir des valeurs start et end de la partition primaire : si
  n'importe quelle partition a comme secteurs de début et de fin
  respectivement 1 et 63, et comme dernier numéro de tête 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 têtes, il est supposé qu'une
  conversion du BIOS est active, et la geométrie est recartographiée
  pour utiliser respectivement 32, 64, 128 ou 255 têtes.  Cependant, le
  disque n'est pas recartographié quand la vision actuelle de la
  géométrie a déjà 63 secteurs par piste et au moins autant de têtes
  (cela signifie sans doute qu'il a déjà été recartographié).


  99..  CCoonnssééqquueenncceess

  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 géométrie, où `bonne' pour fdisk est définie comme
  la géométrie utilisée par les autres systèmes d'exploitation sur le
  même disque dur, et pour LILO comme la géométrie qui va permettre des
  échanges valides avec le BIOS au moment du démarrage. (En général les
  deux vont de pair.)

  Comment fdisk connaît-il la géométrie ?  Il demande au noyau en
  utilisant l'ioctl HDIO_GETGEO.  Mais l'utilisateur peut passer outre
  cela en précisant la géométrie de manière interactive, ou sur la ligne
  de commande.

  Comment LILO connaît-il la géométrie ?  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 géométrie à
  utiliser au moment du démarrage (en utilisant la fonction 8 de INT13
  pour connaître la géométrie du disque dur).

  Comment le noyau sait-il répondre ?  Eh bien, en tout premier lieu,
  l'utilisateur doit avoir spécifié de manière explicite, soit à la main
  soit par l'intermédiaire du chargeur d'amorce, la géométrie 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
  matériel lui-même.

  Il est possible (depuis Linux 2.1.79) de changer l'idée qu'a le noyau
  de la géométrie en utilisant le système 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
  #





  99..11..  CCaallccuull ddeess ppaarraammèèttrreess ddee LLIILLOO

  Parfois il est utile de forcer une certaine géométrie 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 spécifier _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 ? Précisément
  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 paramètre de démarrage
  hdc=4441,255,63.  Comment connaît-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 manières 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 apparaît comme correcte, mais en général les deux peuvent être
  arrondies à des valeurs inférieures.  C'est une bonne façon 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 précis de secteurs est donné dans les messages de
  démarrage 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 inférieure, et
  `binaires').


  1100..  DDééttaaiillss


  1100..11..  DDééttaaiillss ddee ll''IIDDEE -- lleess sseepptt ggééoommééttrriieess

  Le gestionnaire IDE a cinq sources d'information concernant la
  géométrie. La première (G_user) est celle donnée par l'utilisateur sur
  la ligne de commande.  La deuxième (G_bios) est la `BIOS Fixed Disk
  Parameter Table' -- table des paramètres de disque fixe du BIOS --
  (pour le premier et second disque dur seulement) qui est lue au
  démarrage du système, avant le passage au mode 32 bits. Les troisième
  (G_phys) et quatrième (G_log) sont données par le contrôleur IDE en
  réponse à la commande IDENTIFY -- ce sont les géométries `physique' et
  `logique du moment'.

  D'un autre côté, le gestionnaire a besoin de deux valeurs pour la
  géométrie : d'abord G_fdisk, donnée par un ioctl HDIO_GETGEO, et
  ensuite G_used, qui est effectivement utilisée pour les
  Entrées/Sorties. G_fdisk et G_used sont toutes deux initialisées avec
  la valeur de G_user si elle est fournie, avec G_bios quand le CMOS dit
  que cette valeur est présente, et avec G_phys autrement. Si G_log
  semble vraisemblable, alors G_used est positionnée à 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 têtes est compris dans l'intervalle 1-16.

  En d'autres termes : la ligne de commande prend le pas sur le BIOS et
  va déterminer ce que va voir fdisk, mais si elle donne une géométrie
  convertie (avec plus de 16 têtes), alors pour les Entrées/Sorties
  qu'effectuera le noyau elle sera elle-même remplacée par les valeurs
  que fournira la commande IDENTIFY.

  Remarquez que G_bios est assez peu fiable : pour des systèmes qui
  démarrent depuis un périphérique SCSI, les premier et second disques
  durs peuvent très bien être SCSI ; et la géométrie que le BIOS aura
  donné pour sda sera utilisée par le noyau pour hda.  Du reste, les
  disques durs qui ne sont pas déclarés dans la configuration du BIOS ne
  sont pas vus par ce dernier. Cela signifie que, par exemple, dans un
  système uniquement IDE où hdb n'est pas déclaré dans la configuration,
  les géométries rapportées par le BIOS pour les premier et second
  disques vont être appliquées à hda et hdc.


  1100..22..  DDééttaaiillss ppoouurr llee SSCCSSII

  La situation pour le SCSI est légèrement différente, puisque les
  commandes SCSI utilisent déjà les numéros de blocks logiques, donc une
  `géométrie' est complètement hors de propos pour les véritables
  Entrées/Sorties.  Cependant, le format de la table des partitions est
  toujours le même, donc fdisk ne fait pas la différence entre des
  disques IDE et SCSI.  Comme on peut le voir à partir de la description
  détaillée ci-dessus, chaque gestionnaire de disques s'invente une
  géométrie différente. 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 têtes, 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 problème quand
  vous déplacerez le disque dur d'un contrôleur à 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 système uniquement Linux d'utiliser
  plus de 8 Gio. C'est un bug.


  Quelle est la vraie géométrie ?  La réponse la plus facile est qu'elle
  n'existe pas.  Et si elle existait, vous ne voudriez pas la connaître,
  et à coup sûr 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 contrôleur SCSI et le disque dur.  Laissez-moi le redire :
  seules les personnes stupides donnent à fdisk, à LILO ou au noyau la
  véritable géométrie d'un disque SCSI.

  Mais si vous êtes curieux et que vous insistez, vous devez demander au
  disque dur lui-même. Il y a l'importante commande READ CAPACITY qui
  donnera la capacité complète 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 têtes (c'est une donnée qui ne peut pas être
  changée), et dans la Format Page (page 03) donne le nombre d'octets
  par secteur, et de secteurs par piste. Ce dernier nombre est
  typiquement dépendant du rang, et le nombre de secteurs par piste
  varie -- les pistes extérieures ont plus de secteurs que les pistes
  intérieures. Le programme Linux scsiinfo donnera cette information. Il
  y a de nombreux détails et complications, et il est clair que personne
  (probablement même pas le système d'exploitation) ne désire utiliser
  cette information. Du reste, tant que nous ne nous intéressons qu'à
  fdisk et à LILO, on a typiquement des réponses du style
  C/H/S=4476/27/171 -- valeurs qui ne peuvent pas être utilisées par
  fdisk parce que la table des partitions ne réserve 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 contrôleur SCSI, soit en faisant une supposition
  éclairée.  Certains gestionnaires de disque semblent croire que nous
  voulons connaître la `réalité', mais bien sûr 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 têtes
  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 rôle.
  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 révèlent pas la vraie
  taille, et limiteront les utilisateurs de la plupart des versions de
  fdisk à n'avoir accès qu'à environ 8 Gio de leur disque - une sérieuse
  limitation de nos jours.

  Dans le texte ci-dessous, M représente la capacité totale du disque
  dur, et C, H, S, le nombres de cylindres, de têtes et de secteurs par
  piste.  Il suffit de donner H, S si l'on voit C comme étant défini par
  M / (H*S).

  Par défaut, H=64 et S=32.


     aahhaa11774400,, ddttcc,, gg__NNCCRR55338800,, tt112288,, wwdd77000000 ::
        H=64, S=32.


     aahhaa115522xx,, ppaass1166,, ppppaa,, qqllooggiiccffaass,, qqllooggiicciisspp ::
        H=64, S=32 à moins que C ne soit supérieur à 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 dérouter 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.


     aaddvvaannssyyss ::
        H=64 et S=32 à moins que C ne soit supérieur à 1024 ou que,
        encore mieux, l'option du BIOS `> 1 GB' ait été activée, auquel
        cas H=255 et S=63.


     aahhaa11554422 ::
        Demande au contrôleur lequel des deux schémas 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 démarrage qui dit
        "aha1542.c: Using extended bios translation" ("aha1542.c:
        Utilisation du mode de conversion étendu du bios")


     aaiicc77xxxxxx ::
        H=64 et S=32 à moins que C ne soit supérieur à 1024 ou que,
        mieux encore, le paramètre de démarrage "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 même cas se présente, le mode de conversion
        étendu est utilisé seulement si l'utilisateur le demande au
        travers du paramètre de démarrage (de ce fait, quand une SEEPROM
        est trouvée, le paramètre de démarrage est ignoré).  Cela
        signifie qu'une configuration qui fonctionne en 2.0.36 peut ne
        pas démarrer avec un noyau 2.2.6 (LILO nécessite alors le mot-
        clé `linear', ou le noyau a besoin du paramètre
        `aic7xxx=extended' au démarrage).


     bbuussllooggiicc ::
        H=64 et S=32 à moins que C ne soit supérieur à 1024, ou que,
        encore mieux, le mode de conversion étendu ait été autorisé au
        niveau du contrôleur, auquel cas si M < 2^22 alors H=128, S=32 ;
        sinon H=255, S=63. Cependant, après avoir fait ce choix pour
        (C,H,S), la table des partitions est lue, et si pour l'une des
        trois possibilités (H,S) = (64,32), (128,32), (255,63) la valeur
        endH=H-1 est vue quelque part, alors cette paire est utilisée,
        et le message "Adopting Geometry from Partition Table"
        ("Adoption de la géométrie lue dans la table des partitions")
        est affiché au démarrage.


     ffddoommaaiinn ::
        Il trouve l'information sur la géométrie dans la Table des
        Paramètres des Disques du BIOS (BIOS Drive Parameter Table), ou
        lit la table des partitions et utilise H=endH+1, S=endS pour la
        première 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.


     iinn22000000 ::
        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.


     sseeaaggaattee ::
        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.


     uullttrraassttoorr eett uu1144__3344ff ::
        Un de ces trois couples de référence est utilisé ((H,S) =
        (16,63), (64,32), (64,63)) en fonction du mode de cartographie
        du contrôleur.


  Si le gestionnaire ne précise pas la géométrie, 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
  décompte des secteurs commence à 1.)  Plus précisément, 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 frontière 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 supérieur), S =
  M/(1024*H) (arrondi au chiffre supérieur), C = M/(H*S) (arrondi au
  chiffre inférieur).  Cela a pour effet de générer un triplet (C,H,S)
  avec C égal à 1024 au plus, et S égal à 62 au plus.


  1111..  LLiimmiittee ddee LLiinnuuxx ppoouurr ll''IIDDEE àà 88 GGiioo

  Le gestionnaire IDE de Linux obtient la géométrie et la capacité d'un
  disque (et beaucoup d'autres choses) en utilisant une requette ATA
  IDENTIFY. Récemment encore le gestionnaire ne croyait pas en la valeur
  retournée pour lba_capacity si elle était plus de 10% supérieure à la
  capacité calculée 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) indépendamment de leur taille réelle, mais donnent cette
  taille réelle dans lba_capacity.

  Les noyaux récents de Linux (2.0.34, 2.1.90) savent cela et agissent
  en conséquence. Si vous avez un noyau Linux plus ancien et que vous ne
  voulez pas passer à une version plus récente, 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 sûre, voyez le noyau 2.1.90.


  1111..11..  CCoommpplliiccaattiioonnss dduu BBIIOOSS

  Comme nous venons de le dire, les gros disques durs donnent la
  géométrie C=16383, H=16, S=63 indépendamment de leur vraie taille,
  alors que cette dernière 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 têtes, par exemple
  1024/255/63 ou 1027/255/63. Donc, le noyau ne doit pas seulement
  reconnaître la géométrie particulière 16383/16/63, mais également
  toutes ses versions mutilées 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 général, ce problème est résolu en
  mettant le disque en mode Normal dans la configuration du BIOS (ou,
  encore mieux, à None, ne le déclarant pas du tout au BIOS). Si cela
  est impossible parce que vous devez démarrer à 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 paramètres de démarrage
  du noyau.

  Si un BIOS rapporte 16320/16/63, c'est en général pour pouvoir aboutir
  à 1024/255/63 après conversion.

  Il y a ici, un autre problème.  Si le disque dur a été partitionné en
  utilisant une conversion de géométrie, alors le noyau peut, au moment
  du démarrage, voir cette géométrie qui est utilisée 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 paramètres de
  démarrage du noyau seront utiles.


  1111..22..  DDeess ccaavvaalliieerrss ppoouurr sséélleeccttiioonnnneerr llee nnoommbbrree ddee ttêêtteess

  Beaucoup de disques durs ont des cavaliers qui vous permettent de
  choisir entre des géométries à 15 ou à 16 têtes. Le réglage par défaut
  vous donnera une géométrie à 16 têtes. Parfois, les deux géométries
  adressent le même nombre de secteurs, parfois la version à 15 têtes
  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 (modèle IBM-DTTA-351010) avait ses cavaliers positionnés
  pour présenter 16 têtes par défaut mais ce vieux PC (avec un AMI BIOS)
  ne démarrait pas et j'ai eu à modifier les cavaliers pour le faire
  passer en 15 têtes. hdparm -i donne RawCHS=16383/15/63 et
  LBAsects=19807200. J'utilise 20960/15/63 pour avoir la capacité
  totale.'  La géométrie 16383/15/63 n'est pas encore reconnue par le
  noyau, donc il est nécessaire de donner explicitement ces paramètres
  au démarrage.  La géométrie 16383/15/63 n'est pas encore reconnue par
  le noyau, donc des paramètres de démarrage explicites sont ici
  nécessaires.  Pour le positionnement des cavaliers voyez
  http://www.storage.ibm.com/techsup/hddtech/hddtech.htm
  <http://www.storage.ibm.com/techsup/hddtech/hddtech.htm>.


  1111..33..  DDeess ccaavvaalliieerrss ppoouurr lliimmiitteerr llaa ccaappaacciittéé ttoottaallee

  De nombreux disques durs ont des cavaliers qui vous permettent de
  faire apparaître leur taille inférieure à leur valeur réelle.  C'est
  une bêtise que de le faire, et probablement aucun utilisateur de Linux
  ne voudra utiliser cette fonctionnalité, mais certains BIOS plantent
  avec de gros disques. En général la solution consiste à conserver le
  disque entièrement en dehors du contrôle du BIOS. Cela n'est faisable
  que si ce disque dur n'est pas votre disque de démarrage.


  La premiere limite sérieuse fut celle des 4096 cylindres (soit, avec
  16 têtes et 63 secteurs par piste, 2,11 Go).  Par exemple un disque
  dur Fujitsu MPB3032ATU de 3,24 Go a une géométrie par défaut de
  6704/15/63, mais ses cavaliers peuvent être positionnés pour qu'elle
  apparaisse comme étant 4092/16/63. Le disque rapportera une capacité
  LBA de 4124736 secteurs, et de ce fait le système d'exploitation ne
  pourra pas deviner qu'il est en réalité plus grand.  Dans un tel cas
  (avec un BIOS qui plante s'il sait que le disque dur est en réalité si
  grand, et donc avec lequel les cavaliers sont nécessaires) on aura
  besoin de paramètres de démarrage pour donner à Linux la taille du
  disque.

  C'est pas de chance. La plupart des disques durs ont des cavaliers qui
  peuvent être positionnés pour qu'ils apparaissent comme étant des 2 Go
  et pour qu'ils rapportent une géométrie tronquée comme 4092/16/63 ou
  4096/16/63, mais qui leur permettent toujours de rapporter une
  capacité LBA complète. De tels disques durs fonctionneront bien, et
  utiliseront l'intégralité de leur capacité sous Linux, que les
  cavaliers aient été positionnés ou pas.


  Une limite plus récente est celle des ``33,8 Go''.  Les noyaux Linux
  plus anciens que le 2.3.21 nécessitent 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 apparaître 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
  manière que le disque dur apparaît avec une taille de 33,8 Go, et donc
  rapporte une géométrie 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 système, mais il modifie également les
  entrées/sorties : Pert Soucek explique que pour ce disque en
  particulier, les paramètres de démarrage ne sont pas utiles -- avec le
  cavalier positionné, tout accès aux secteurs 66055248 et supérieurs se
  solde par une erreur d'entrée/sortie.  Donc, sur une carte-mère avec
  un BIOS Award 4.51PG on ne peut pas à la fois utiliser ce disque comme
  disque de démarrage 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>.



  1122..  LLiimmiittee ddee LLiinnuuxx àà 6655553355 ccyylliinnddrreess

  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 apparaître comme ne faisant que
  16 Gio. Une fois que le problème a été détecté, il est facile de
  l'éviter.


  1122..11..  PPrroobbllèèmmeess ddee ll''IIDDEE aavveecc ddeess ddiissqquueess dduurrss ddee 3344 GGoo eett pplluuss

  Des unités d'une taille supérieure à 33,8 Go ne fonctionneront pas
  avec les noyaux antérieurs au 2.3.21. Les détails 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 paramètres hdc=4160,255,63 au démarrage
  n'aide en rien -- ils sont tout simplement ignorés.  Que se
  passe-t-il ? La routine idedisk_setup() retrouve la géométrie
  rapportée par le disque dur (qui est 16383/16/63) et écrase ce que
  l'utilisateur avait demandé sur la ligne de commande, de telle manière
  que les données de l'utilisateur ne sont utilisées que pour la
  géométrie 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 détruit 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 débarasser des
  tags html).  Les noyaux 2.2.14 supportent ces disques durs.  Dans la
  série 2.3.* des noyaux, le support pour ces disques existe depuis le
  2.3.21.  Il est également possible de résoudre ce problème avec une
  méthode matérielle en ``positionnant des cavaliers'' pour limiter la
  taille à 33,8 Go.  Dans la plupart des cas, une ``mise à jour du
  BIOS'' sera nécessaire pour pouvoir démarrer depuis ce disque dur.


  1133..  PPaarrttiittiioonnss éétteenndduueess eett ppaarrttiittiioonnss llooggiiqquueess

  ``Ci-dessus'', nous avons vu la structure du MBR (secteur 0) : code du
  programme d'amorçage suivi par 4 entrées de la table des partitions de
  16 octets chacune, suivies par une signature AA55. Les entrées de la
  table des partitions de type 5 ou F ou 85 (en hexadécimal) ont une
  signification particulière : elles décrivent les partitions _é_t_e_n_d_u_e_s :
  espaces qui seront ultérieurement fractionnés en partitions _l_o_g_i_q_u_e_s.
  (Donc, une partition étendue n'est qu'une boîte, et ne peut pas être
  utilisée par elle-même ; 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 entrées : une est une partition
  logique, une est une partition étendue et deux sont inutilisées. De
  cette manière, on obtient une chaîne de secteurs de table des
  partitions, dispersés sur le disque dur, où le premier décrit trois
  partitions primaires et la partition étendue, et chaque secteur de
  table des partitions qui suit décrit une partition logique et la
  position du prochain secteur de table des partitions.

  Il est important de comprendre cela : quand les gens font des bêtises
  en partitionnant leur disque, ils veulent savoir : `est-ce que mes
  données sont toujours là ?' Et la réponse est généralement : `oui'.
  Mais si des partitions logiques ont été créées, alors les secteurs de
  table des partitions les décrivant sont écrits au début des ces
  partitions logiques, et les données qui étaient initialement à ces
  emplacements sont perdues.

  Le programme sfdisk montre la chaîne complète. 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-mêmes ou sur une partition placée
  avant dans la chaîne. Il est possible d'avoir deux partitions étendues
  dans un de ces secteurs de table des partitions, de sorte que la
  chaîne de la table de partitions se divise. (Cela peut arriver par
  exemple avec un fdisk qui ne reconnaît pas les partitions typées 5, F
  ou 85 comme étendues, et qui crée une 5 à la suite d'une F.) Des
  programmes de type fdisk non standards peuvent provoquer de telles
  situations, et quelques manipulations sont nécessaires pour les
  réparer.  Le noyau de Linux acceptera une division au niveau le plus
  extérieur. Ainsi, vous pouvez avoir deux chaînes 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 général il faut sfdisk
  pour créer une telle configuration.


  1144..  RRééssoolluuttiioonn ddeess pprroobbllèèmmeess

  Beaucoup de personnes pensent qu'elles ont des problèmes, alors qu'en
  réalité rien ne cloche. Elles peuvent également penser que leurs
  problèmes sont dus à la géométrie du disque, alors que cela n'a rien à
  voir. Tout ce que nous avons vu ci-dessus peut vous avoir paru
  compliqué, mais maîtriser le domaine de la géométrie des disques durs
  est très 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
  dépasse pas le stade LI au démarrage. Regardez bien les messages de
  démarrage du noyau, et souvenez-vous que plus vous tripoterez les
  géométries (en spécifiant le nombre de têtes 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 défaut sont les
  bonnes.

  Et souvenez-vous : la géométrie des disques durs n'est utilisée nulle
  part dans Linux, donc les problèmes que vous pouvez avoir en vous
  servant de Linux ne sont pas dus à ça. En fait, la géométrie des
  disques durs n'est utilisée que par LILO et par fdisk. Donc, si LILO
  ne parvient pas à charger le noyau, ce peut être un problème de
  géométrie. Si d'autres systèmes d'exploitation ne comprennent pas la
  table des partitions, ce peut être un problème de géométrie. Rien
  d'autre. En particulier, si mount ne semble pas vouloir fonctionner,
  ne vous posez jamais de question sur la géométrie -- le problème est
  ailleurs.


  1144..11..  PPrroobbllèèmmee :: LLaa ggééoommééttrriiee ddee mmoonn ddiissqquuee dduurr IIDDEE eesstt ffaauussssee qquuaanndd
  jjee ddéémmaarrrree ddeeppuuiiss dduu SSCCSSII..

  Il est assez possible qu'un disque dur obtienne une mauvaise
  géométrie. Le noyau de Linux questionne le BIOS au sujet de hd0 et hd1
  (les disques du BIOS numérotés 80H et 81H) et suppose que ces données
  sont pour hda et hdb.  Mais, sur un système qui démarre depuis du
  SCSI, les deux premiers disques peuvent très bien être des disques
  durs SCSI, et de ce fait il peut arriver que le cinquième disque, qui
  est hda, c'est-à-dire le premier disque IDE, se voie assigner une
  géométrie appartenant à sda. Cela est facilement résolu en donnant, au
  démarrage ou dans le fichier /etc/lilo.conf, les paramètres pour hda
  `hda=C,H,S' avec les valeurs appropriées pour C, H et S.



  1144..22..  FFaauuxx pprroobbllèèmmee :: ddeess ddiissqquueess iiddeennttiiqquueess oonntt ddeess ggééoommééttrriieess
  ddiifffféérreenntteess ??

  `Je possède deux disques durs IBM identiques de 10 Go. Cependant,
  fdisk donne des tailles différentes 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
  réellement 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 différence de taille ? C'est parce que le noyau obtient
  ses données du BIOS pour les deux premiers disques IDE, et le BIOS a
  recartographié hdb pour qu'il ait 255 têtes (et 16*19650/255=1232
  cylindres). L'arondi inférieur coûte ici au moins 8 Mo.

  Si vous voulez recartographier hdd de la même manière, donnez au noyau
  l'option de démarrage `hdd=1232,255,63'.


  1144..33..  FFaauuxx pprroobbllèèmmee :: ffddiisskk  vvooiitt bbeeaauuccoouupp pplluuss dd''eessppaaccee qquuee ddff ??

  fdisk vous donnera le nombre de blocs qu'il y a sur le disque dur. Si
  vous avez créé un système de fichiers sur le disque, disons avec
  mke2fs, alors ce système de fichiers a besoin d'un peu de place pour
  sa comptabilité -- typiquement quelque chose comme 4% de la taille du
  système 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, créez sur cette dernière un
  système 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 différence entre
  le total de 3574475 blocs et les 3369664 disponibles pour l'utilisa­
  teur est égale aux 13 blocs utilisés plus les 204798 blocs réservés à
  root. Cette dernière valeur peut être changée à 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 même style, avec énormément de
  petits fichiers. Par défaut 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 présent, seulement 137501 blocs (3,3%) sont utilisés pour les
  inodes, comme cela, nous disposons de 384 Mo de plus qu'avant.
  (Apparemment, chaque inode occupe 128 octets.) D'un autre côté, ce
  système 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.

  11..

  PPrreeaammbbuullee

  11..11..

  CCooppyyrriigghhtt

  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.

  11..22..

  RReemmeerrcciieemmeennttss

  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.

  11..33..

  RReemmaarrqquueess

  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.

  11..44..

  VVeerrssiioonnss

  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.

  22..

  IInnttrroodduuccttiioonn

  22..11..

  LLee llaannggaaggee SSGGMMLL

  Le  langage SSGGMMLL (_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 DDTTDD  (_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.

  22..22..

  LLaa ddeeffiinniittiioonn dduu ttyyppee LLiinnuuxxDDoocc

  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.

  22..33..

  LLeess SSGGMMLL--TToooollss

  Les  SSGGMMLL--TToooollss  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/

  33..

  VVoottrree pprreemmiieerr ddooccuummeenntt

  33..11..

  DDeeppuuiiss uunn ddooccuummeenntt aauu ffoorrmmaatt tteexxttee

  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.

  NNoottee  ::  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>  (ggrraass), 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 SSGGMMLL--TToooollss, qui decrit plus  en
     detail le type de document LLiinnuuxxDDoocc.

  44..

  CCoonnffiigguurreerr EEmmaaccss

  44..11..

  LLeess ccaarraacctteerreess aacccceennttuueess

  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.

  44..11..11..

  LL''aaffffiicchhaaggee ddeess ccaarraacctteerreess 88 bbiittss

  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.

  44..11..22..

  LLaa ssaaiissiiee ddeess ccaarraacctteerreess aacccceennttuueess

  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 :

  44..11..22..11..

  LLaa bbiibblliiootthheeqquuee iissoo--aacccc

  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 ee 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.

  44..11..22..22..

  LLaa ttoouucchhee _<_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 ee.

  Mais  Emacs  prevoit  la touche _<_M_e_t_a_> pour d'autres utilisations.  Il
  faut donc taper la sequence CCttrrll--qq (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 CCttrrll--qq suivi du code  en  octal  du  caractere  que  vous
  desirez entrer.

  44..11..33..

  AAffffiicchheerr lleess ccaarraacctteerreess SSGGMMLL eenn 88 bbiittss

  En  SGML,  les  caracteres  accentues  peuvent  etre tapes grace a des
  macros. Par exemple, le caractere ee s'ecrit &&eeaaccuuttee;;. 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")))

  44..22..

  LLee mmooddee SSGGMMLL

  Lorsque vous ouvrez un fichier avec une extension ..ssggmmll,  Emacs  lance
  normalement  le  mmooddee  ssggmmll.  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.

  44..33..

  LLee mmooddee PPSSGGMMLL

  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.

  44..44..

  DDiivveerrss

  44..44..11..

  LLee mmooddee aauuttoo--ffiillll

  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 aauuttoo--ffiillll 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)))

  55..

  IIssppeellll

  Si  vous  desirez verifier l'orthographe de votre document directement
  depuis Emacs, vous pouvez utiliser la distribution IIssppeellll et son  mode
  associe sous Emacs.

  55..11..

  CCoonnffiigguurraattiioonn iinniittiiaallee

  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.")

  55..22..

  LLee cchhooiixx ddee vvooss ddiiccttiioonnnnaaiirreess ppaarr ddeeffaauutt

  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")
         ))

  55..33..

  CChhooiixx ddeess ddiiccttiioonnnnaaiirreess ppoouurr uunn cceerrttaaiinn ffiicchhiieerr

  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.

  55..44..

  VVeerriiffiieerr vvoottrree ddooccuummeenntt

  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  ssppcc accepte ce mot, uniquement pour cette fois,

  +o  ii accepte ce mot et l'insere dans votre dictionnaire personnel,

  +o  aa accepte ce mot pour cette session,

  +o  AA   accepte   ce  mot  pour  ce  fichier,  en  l'inserant  dans  le
     dictionnaire local au fichier,

  +o  rr permet de corriger le mot mal orthographie,

  +o  RR  permet  de  corriger  toutes  les   occurrences   du   mot   mal
     orthographie,

  +o  xx  arrete  la  verification,  et  replace  le curseur a sa position
     initiale,

  +o  XX 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.

  55..55..

  DDiiccttiioonnnnaaiirree ppeerrssoonnnneell ccoonnttrree ddiiccttiioonnnnaaiirree llooccaall aauu ffiicchhiieerr

  La touche ii permet d'inserer un mot dans  le  dictionnaire  personnel,
  alors  que  la  touche  AA 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_._' !).

  55..66..

  LLaa vveerriiffiiccaattiioonn ``aa llaa vvoolleeee''

  Ispell  peut  aussi verifier l'orthographe au fur et a mesure que vous
  tapez votre document. Il faut utiliser pour cela le mode iissppeellll--mmiinnoorr--
  mmooddee.  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)

  55..77..

  SSaauutt ddee rreeggiioonnss

  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 <<tttt>> ou <<//tttt>>.

  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 <<eemm//......//,

  +o  <code> et </code>,

  +o  <verb> et </verb>,

  +o  <tt> et </tt>.

  66..

  PPoouurr aalllleerr pplluuss llooiinn

  66..11..

  IInnsseerrttiioonn aauuttoommaattiiqquuee dd''uunnee eenntteettee

  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 aauuttooiinnsseerrtt 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 eelliisspp.

  66..11..11..

  ppaarr ll''iinnsseerrttiioonn dd''uunn ffiicchhiieerr

  Il faut tout d'abord preciser a Emacs  d'executer  la  commande  auto-
  insert   a   l'ouverture  d'un  fichier,  puis  lire  la  bibliotheque
  aauuttooiinnsseerrtt 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.

  66..11..22..

  ppaarr ll''eexxeeccuuttiioonn dd''uunnee rroouuttiinnee

  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.

  GG..

  UUnnee ffoonnccttiioonn iinnsseerrtt--ssggmmll--hheeaaddeerr

  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 française
  Éric Dumas, dumas@Linux.EU.Org, dumas@Traduc.Org
  Version 4.3, 4 Juillet 2000

  11..  CCooppyyrriigghhtt


  Le document "Liste-des-HOWTO" est copyright © 1996-2000 Éric Dumas.
  Les HOWTO Linux peuvent être reproduits et distribués, en totalité ou
  en partie, sur tous média physique ou électronique dans la mesure où
  ce copyright est préservé dans chacun des exemplaires produits.  La
  distribution commerciale en est autorisée et encouragée.  L'auteur
  _a_p_p_r_é_c_i_e_r_a_i_t toutefois qu'on lui notifie individuellement ce genre de
  distribution.

  Le présent copyright couvre les traductions, compilations et autres
  travaux dérivés des HOWTOs Linux.  C'est-à-dire qu'il est défendu
  d'imposer des restrictions de diffusion allant au delà du présent
  copyright à des ouvrages inspirés de ou incorporant des passages de
  HOWTOs Linux.  Sous certaines conditions, des exceptions à ces regles
  seront tolérées.  Pour plus d'informations, contacter l'auteur de ce
  document, qui est également le coordinateur des traductions
  françaises, à l'adresse  <mailto:dumas@Linux.EU.Org>.

  Pour toute question plus générale, 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. Néammoins, nous entendons garder la propriété
  intellectuelle (copyright) des HOWTOs, et _a_p_p_r_é_c_i_e_r_i_o_n_s être informés
  de leur redistribution.


  22..  BBuutt ddee ccee ddooccuummeenntt


  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 numéro de la version actuelle. Si le document a été
  traduit, vous y trouverez le nom du traducteur, la dernière version
  traduite et l'état de la traduction.

  Vous trouverez également le titre de la version française : dans
  certains cas, le titre est légèrement différent, 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 désiré.

  Le champ "commentaire" peut avoir les éléments suivants :

  ·  vide : le HowTo n'est pas à l'heure actuelle traduit ou en cours de
     traduction. Si vous souhaitez en faire une version française,
     envoyez-moi un courrier électronique, et n'oubliez pas de vous
     abonner à la liste des traducteurs :

     ___________________________________________________________________
     % mail Majordomo@Traduc.Org
     subscribe traduc
     ___________________________________________________________________



  IIll eesstt ttrrèèss iimmppoorrttaanntt qquuee vvoouuss aappppaarrtteenniieezz àà cceettttee lliissttee !!

  Ensuite, pour envoyer un message dans la liste, il suffit de poster un
  courrier électronique à l'adresse traduc@Traduc.Org.

  ·  EENN CCOOUURRSS : le document est en cours de traduction ;

  ·  AA JJOOUURR : la version française est parfaitement à jour ;

  ·  NNEE PPAASS TTRRAADDUUIIRREE : ce document présente relativement peu d'intérêt à
     être traduit, mais si vous avez du temps à perdre, n'hésitez pas !

  Ce document sera actualisé le plus souvent possible, généralement
  après que j'envoie certaines nouvelles traductions, et lorsque je suis
  en mesure de le faire.


  33..  OOuuttiillss ppoouurr rrééaalliisseerr llaa ttrraadduuccttiioonn



  33..11..  PPrrooggrraammmmeess


  Les HowTos sont écrits en SGML, un langage de description
  particulièrement simple à utiliser. Vous avez besoin pour "compiler"
  un HowTo du paquetage sgml. La version que j'utilise pour générer vos
  documents est la version SGML 1.0.9.

  TToouutt ddooccuummeenntt qquuii nnee ccoommppiillee ppaass aavveecc cceettttee vveerrssiioonn sseerraa rreeffuusséé..

  Vous pourrez trouver cet outil sur le site
  <http://www.sgmltools.org>. Les options utilisées pour la génération
  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 nécessaire d'installer le
  paquetage français (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 nécessaire que la version française soit
  au format SGML.

  Toute la documentation concernant cet outil peut être trouvée 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 trouvés sur le site
  <http://www.linuxdoc.org/>.


  33..22..  DDiiccttiioonnnnaaiirreess


  Du côté 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>.


  44..  CCooppyyrriigghhtt TTyyppee


  Chaque HOWTO en version anglaise est diffusé avec un copyright de ce
  type. Avant de faire un copier coller, vérifiez que le texte qui suit
  correspond !

  Pensez à utiliser la version sgml de ce document... cela vous évitera
  d'avoir à recoder certains caractères, ainsi qu'à mettre le nom réel
  de l'auteur du document.


  44..11..  CCooppyyrriigghhtt


  Ce HOWTO est © Marcel Dugenou, 1994-1999.

  Sauf indication contraire, les droits d'auteur des HOWTO Linux sont
  détenus par leurs auteurs respectifs. Les HOWTO Linux peuvent être
  reproduits et distribués, en totalité ou en partie, sur tout média
  physique ou électronique dans la mesure où ce copyright est préservé
  dans chaque copie. La distribution commerciale en est autorisée et
  encouragée. L'auteur apprécierait toutefois qu'on lui notifie
  individuellement ce genre de distribution.

  Le présent copyright doit couvrir toute traduction, compilation et
  autre travail dérivé des HOWTO Linux. C'est-à-dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au delà du présent
  copyright à des ouvrages inspirés, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions à ces règles
  seront tolérées : contactez le coordinateur des HOWTO à l'adresse
  donnée ci-dessous.

  Pour résumer, nous souhaitons une diffusion aussi large que possible
  de ces informations. Néanmoins, nous entendons garder la propriété
  intellectuelle (copyright) des HOWTO, et apprécierions d'être informés
  de leur redistribution.

  Pour toute question plus générale, merci de contacter le coordinateur
  des HOWTO, Tim Bynum, à l'adresse électronique
  tjbynum@wallybox.cei.net.


  44..22..  DDéénnééggaattiioonn


  Vous utilisez les informations contenues dans ce document à vos
  propres risques. Nous déclinons toute responsabilité quant à son
  contenu.  L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entièrement à vos propres risques.

  Tous les droits sont détenus par leurs propriétaires 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 particulière ne constitue
  pas un endossement.

  Il est fortement conseillé d'effectuer une sauvegarde de votre système
  avant une installation importante ainsi qu'à intervalles réguliers.


  55..  RReelleeccttuurree



  Il est préférable qu'un document traduit soit relu par d'autres
  personnes. S'il vous plait, ne postez pas le document dans la liste de
  discussion.

  Sébastien Blondeel ainsi qu'Olivier Tharan se sont occupés 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
  désormais de coordoner les relectures avant de me les envoyer. Pour
  faire effectuer la relecture de vos documents, la marche à suivre est
  particulièrement 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 délai de 15 jours semble raisonnable, délai au delà duquel le
     document sera considéré comme bon à diffuser.

  La méthode 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/> décrivant tout ceci.

  Les documents en relecture et les notes des relecteurs seront
  conservéspour faire une sauvegarde.

  Pour l'envoi des fichiers, il est préférable 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'').


  66..  EEnnvvooii ddeess HHoowwTToo ttrraadduuiittss


  Une fois la traduction terminée et relue, merci de faire parvenir le
  document uunniiqquueemmeenntt aauu ffoorrmmaatt ssggmmll (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
  début du courrier.

  Tout envoi de HowTo recevra un message de confirmation dans les trois
  semaines maximum.

  Une fois le document reçu 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.


  77..  LLDDPP


  Les documents Howto font partir du LDP (Linux Documentation Project).
  N'hésitez pas à consulter le site WEB du LDP <http://www.linuxdoc.org>
  pour de plus amples renseignements.

  Le groupe français n'est pas le seul. Voici la liste des traductions
  effectuées :

  ·  Allemand (de)

  ·  Chinois (zh)

  ·  Croate (hr)

  ·  Espagnol (es)

  ·  Français (fr)

  ·  Grec (el)

  ·  Indonésien (id)

  ·  Italien (it)

  ·  Japonais (ja)

  ·  Koréen (Ko)

  ·  Polonais (pl)

  ·  Slovène (sl)

  ·  Suédois (sv)

  ·  Turc (tr)

  Vous pouvez accéder aux différentes traduction en consultant le site
  <http://www.linuxdoc.org/vlist.html>.


  88..  AAnnnnoonncceess


  Lors des diffusions de traductions, des annonces seront effectuées :

  ·  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 façon 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.
  99..  CCoonnttrriibbuutteeuurrss àà ccee ddooccuummeenntt



  ·  Sébastien Blondeel Sebastien.Blondeel@ens.fr ;

  ·  Rémy Card, Remy.Card@linux.org ;

  ·  Xavier Cazin, xavier@ora.com ;

  ·  Arnaud Launay, asl@launay.org ;

  ·  Olivier Tharan, olive@minet.net.


  1100..  AAuuttrreess pprroojjeettss ddee ttrraadduuccttiioonn



  ·  Linux Gazette :  <http://lg.kernelfr.org/> ;

  ·  Pages de manuel :  <http://www.linux-
     kheops.com/doc/manfr/index.htm> ;


  1111..  HHoowwTToo




  1111..11..  33DDffxx--HHOOWWTTOO



  ·  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 accélératrices
     3Dfx

  ·  Version : v1.16, 6 February 1998

  ·  Traducteur : François Romieu, romieu@ensta.fr

  ·  Version traduite : v1.16, 6 Février 1998

  ·  Commentaire : A JOUR


  1111..22..  44mmbb--LLaappttooppss--HHOOWWTTOO



  ·  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 :


  1111..33..  AAcccceessss--HHOOWWTTOO



  ·  Auteur(s) : Michael De La Rue,  access-howto@ed.ac.uk

  ·  Titre-Fr : "L'accès à 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



  1111..44..  AAddvv--RRoouuttiinngg--HHOOWWTTOO



  ·  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


  1111..55..  AAII--AAlliiffee--HHOOWWTTOO



  ·  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


  1111..66..  AAllpphhaa--HHOOWWTTOO



  ·  Auteur(s) : David Mosberger, davidm@azstarnet.com

  ·  Titre-Fr : "Brève introduction aux systèmes et processeurs Alpha"

  ·  URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Alpha-
     HOWTO.html>

  ·  Description : présentation des systèmes 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



  1111..77..  AAsssseemmbbllyy--HHOOWWTTOO



  ·  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 : François-René Rideau (fare@tunes.org)

  ·  Version traduite : v0.4l, 16 Novembre 1997

  ·  Commentaire : EN COURS



  1111..88..  AAssttrroonnoommyy--HHOOWWTTOO



  ·  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



  1111..99..  AAXX2255--HHOOWWTTOO



  ·  Auteur(s) : Terry Dawson, VK2KTJ, terry@perf.no.itg.telecom.com.au

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description : comment configurer le réseau 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


  1111..1100..  BBaasshh--PPrroogg--IInnttrroo--HHOOWWTTOO



  ·  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


  1111..1111..  BBaasshh--PPrroommpptt--HHOOWWTTOO



  ·  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


  1111..1122..  BBeellggiiaann--HHOOWWTTOO



  ·  Auteur(s) : Dag Wieërs, 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 Février 2000

  ·  Commentaire : A JOUR


  1111..1133..  BBeenncchhmmaarrkkiinngg--HHOOWWTTOO



  ·  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 systèmes Linux

  ·  Version :  v0.12, 15 August 1997

  ·  Traducteur : Steve Freeland, sfreel@cs.mcgill.CA

  ·  Version traduite : v0.12, 15 Août 1997

  ·  Commentaire : A JOUR



  1111..1144..  BBeeoowwuullff--HHOOWWTTOO



  ·  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



  1111..1155..  BBoooottddiisskk--HHOOWWTTOO



  ·  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 créer des disquettes d'amorçage et racine

  ·  Version : v4.0, April 2000

  ·  Traducteur :  Frank Pavageau, pavageau@imaginet.fr

  ·  Version traduite : 3.5, Juillet 1999

  ·  Commentaire : EN COURS


  1111..1166..  BBoooottPPrroommpptt--HHOOWWTTOO



  ·  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'amorçage de Linux et présente les différents programmes
     d'amorçages utilisables.

  ·  Version : v1.2, May 15, 1999

  ·  Traducteur : Laurent Renaud, laurent.renaud@worldnet.fr

  ·  Version traduite : v1.14, 1er Février 1998

  ·  Commentaire : EN COURS



  1111..1177..  BBuussmmoouussee--HHOOWWTTOO



  ·  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 séries

  ·  Version : v2.0, 14 Feb 2000

  ·  Traducteur : Philippe Gaucher, gaucher@easynet.fr

  ·  Version traduite : v2.0, 14 février 2000

  ·  Commentaire : A JOUR



  1111..1188..  CC++++PPrrooggrraammmmiinngg--HHOOWWTTOO



  ·  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



  1111..1199..  CC--CC++++BBeeaauuttiiffiieerr--HHOOWWTTOO



  ·  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



  1111..2200..  CCaabbllee--MMooddeemm--HHOOWWTTOO




  ·  Auteur(s) : Vladimir Vuksan, vuksan@veus.hr

  ·  Titre-Fr : Le Modem Câble

  ·  URL-Fr :

  ·  Version : v4.15 April 24, 2000

  ·  Traducteur : (A REPRENDRE) Thierry Le Quéau, celeborn@club-
     internet.fr

  ·  Version traduite : v4.1, 20 Mai 1999

  ·  Commentaire :


  1111..2211..  CCDD--WWrriittiinngg--HHOOWWTTOO



  ·  Auteur(s) : Winfried Trümper, 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



  1111..2222..  CCDDRROOMM--HHOOWWTTOO



  ·  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






  1111..2233..  CChhiinneessee--HHOOWWTTOO



  ·  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
     caractères chinois

  ·  Version : v1.04, 2 June 1998

  ·  Traducteur :

  ·  Version traduite : v0.1, 2 Avril 1997

  ·  Commentaire : NE PAS TRADUIRE



  1111..2244..  CChhrroooott--BBIINNDD--HHOOWWTTOO



  ·  Auteur(s) : Scott Wunsch, scott@wunsch.org

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.1, 24 June 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1111..2255..  CCoommmmeerrcciiaall--HHOOWWTTOO



  ·  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



  1111..2266..  CCoonnffiigg--HHOOWWTTOO



  ·  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 paramétrer en fonction de
     vos besoins votre système 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


  1111..2277..  CCoonnssuullttaannttss--HHOOWWTTOO



  ·  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


  1111..2288..  CCVVSS--RRCCSS--HHOOWWTTOO



  ·  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


  1111..2299..  CCyyrriilllliicc--HHOOWWTTOO



  ·  Auteur(s) : Alexander L. Belikoff, abel@bfr.co.il

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description : comment configurer Linux pour utiliser le jeu de
     caractères cyrilique

  ·  Version : v4.0, 23 January 1998

  ·  Traducteur : Jean-Christophe Fargette, jcfarget@club-internet.fr

  ·  Version traduite :

  ·  Commentaire : EN COURS


  1111..3300..  DDaanniisshh--HHOOWWTTOO



  ·  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



  1111..3311..  DDiiaalldd--HHOOWWTTOO



  ·  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


  1111..3322..  DDiisskklleessss--HHOOWWTTOO


  ·  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


  1111..3333..  DDiisskklleessss--rroooott--NNFFSS--HHOOWWTTOO



  ·  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



  1111..3344..  DDiissttrriibbuuttiioonn--HHOOWWTTOO



  ·  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 :


  1111..3355..  DDNNSS--HHOOWWTTOO



  ·  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 février 1999

  ·  Commentaire : A JOUR



  1111..3366..  DDOOSS--WWiinn--ttoo--LLiinnuuxx--HHOOWWTTOO



  ·  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 Février 1999

  ·  Commentaire : A JOUR


  1111..3377..  DDOOSSEEMMUU--HHOOWWTTOO



  ·  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



  1111..3388..  DDVVDD--PPllaayyiinngg--HHOOWWTTOO



  ·  Auteur(s) : Nathan Rowlan, nkr@helo.org

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version :  v0.1.8 5 June 2000

  ·  Traducteur : Joël Sagnes, joels69@club-internet.fr

  ·  Version traduite :

  ·  Commentaire : EN COURS



  1111..3399..  EEccoollooggyy--HHOOWWTTOO



  ·  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


  1111..4400..  EEmmaaccss--BBeeggiinnnneerr--HHOOWWTTOO



  ·  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


  1111..4411..  EEmmaaccssppeeaakk--HHOOWWTTOO



  ·  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


  1111..4422..  EEnntteerrpprriissee--JJaavvaa--ffoorr--LLiinnuuxx--HHOOWWTTOO



  ·  Auteur(s) : Gary Meyer gary@meyer.net

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v 0.1, January 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..4433..  EEssppeerraannttoo--HHOOWWTTOO



  ·  Auteur(s) : Wolfram Diestel, wolfram@steloj.de

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.30, August 1999

  ·  Traducteur :

  ·  Version traduite :


  ·  Commentaire : NE PAS TRADUIRE


  1111..4444..  EEtthheerrnneett--HHOOWWTTOO



  ·  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 compatibilités 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


  1111..4455..  FFiilleessyysstteemmss--HHOOWWTTOO



  ·  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



  1111..4466..  FFiinnnniisshh--HHOOWWTTOO



  ·  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



  1111..4477..  FFiirreewwaallll--HHOOWWTTOO



  ·  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


  1111..4488..  FFoonntt--HHOOWWTTOO



  ·  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



  1111..4499..  FFrraammeebbuuffffeerr--HHOOWWTTOO



  ·  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 décrit l'emploi des périphériques d'accès
     à la mémoire vidéo avec diverses configurations matérielles munies
     de Linux.

  ·  Version : v1.1, 22 July 1999


  ·  Traducteur : François Romieu, romieu@ensta.fr

  ·  Version traduite : v1.2, 22 Juillet 1999

  ·  Commentaire : A JOUR


  1111..5500..  FFrraannccoopphhoonneess--HHOOWWTTOO



  ·  Auteur(s) : Guylhem Aznar, guylhem@oeil.qc.ca

  ·  Titre-Fr : Le French-HOWTO : Linux et la langue française

  ·  URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/French-
     HOWTO.html>

  ·  Description : comment configurer Linux pour utiliser les caractères
     francophones

  ·  Version : v3.2 ; Décembre 1999

  ·  Traducteur : Guylhem Aznar, guylhem@oeil.qc.ca

  ·  Version traduite : v3.2 ; Décembre 1999

  ·  Commentaire : A JOUR


  1111..5511..  FFrroomm--PPoowweerrUUpp--TToo--BBaasshh--PPrroommpptt--HHOOWWTTOO



  ·  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


  1111..5522..  FFttaappee--HHOOWWTTOO



  ·  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


  1111..5533..  GGCCCC--HHOOWWTTOO



  ·  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 bibliothèques de
     développement

  ·  Version : May 1999

  ·  Traducteur : A REPRENDRE Eric.Dumas@Linux.EU.Org

  ·  Version traduite : v1.17, 28 février 1996

  ·  Commentaire :


  1111..5544..  GGeerrmmaann--HHOOWWTTOO



  ·  Auteur(s) : Winfried Trümper, winni@xpilot.org

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.6, 19 March 1997

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire : NE PAS TRADUIRE



  1111..5555..  GGlliibbcc22--HHOOWWTTOO



  ·  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 bibliothèque
     Glibc2
  ·  Version : v1.6, 22 June 1998

  ·  Traducteur : Robert JACOLIN, rjacolin@yahoo.fr

  ·  Version traduite : v1.5, 8 février 1998

  ·  Commentaire : EN COURS




  1111..5566..  HHaarrddwwaarree--HHOOWWTTOO



  ·  Titre-Fr : HOWTO Compatibilité Linux - Matériel

  ·  URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Hardware-
     HOWTO.html>

  ·  Description : donne une liste de périphériques et matériel 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



  1111..5577..  HHeebbrreeww--HHOOWWTTOO



  ·  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


  1111..5588..  HHeelllleenniicc--HHOOWWTTOO



  ·  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



  1111..5599..  HHOOWWTTOO--HHOOWWTTOO



  ·  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 procédures, 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



  1111..6600..  HHOOWWTTOO--IINNDDEEXX



  ·  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



  1111..6611..  HHPP--HHOOWWTTOO



  ·  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



  1111..6622..  IInnggrreessIIII--HHOOWWTTOO



  ·  Auteur(s) : Pal Domokos, pal.domokos@usa.ne

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : V1.1, 20 June, 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1111..6633..  IInnssttaallllaattiioonn--HHOOWWTTOO



  ·  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 Août 1998

  ·  Commentaire : EN COURS


  1111..6644..  IInnttrraanneett--SSeerrvveerr--HHOOWWTTOO



  ·  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


  1111..6655..  IIPP--MMaassqquueerraaddee--HHOOWWTTOO



  ·  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 Février 1999

  ·  Commentaire : EN COURS


  1111..6666..  IIPPCCHHAAIINNSS--HHOOWWTTOO



  ·  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 règles 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


  1111..6677..  IIPPXX--HHOOWWTTOO



  ·  Auteur(s) :Terry Dawson, terry@perf.no.itg.telecom.com.au

  ·  Titre-Fr : Linux IPX-HOWTO Version Française


  ·  URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/IPX-HOWTO.html>

  ·  Description : comment installer et configurer un réseau IPX

  ·  Version : v2.3, 06 May 1998

  ·  Traducteur : Gregory Lajon, glajon@mail.dotcom.fr

  ·  Version traduite :  v2.3, 06 Mai 1998

  ·  Commentaire : A JOUR



  1111..6688..  IIRR--HHOOWWTTOO



  ·  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 périphériques infrarouges

  ·  Version : v2.8, 20 September 1999

  ·  Traducteur : Mathieu Arnold, arn_mat@club-internet.fr

  ·  Version traduite : v2.4, 9 Février 1999

  ·  Commentaire : EN COURS


  1111..6699..  IISSPP--HHooookkuupp--HHOOWWTTOO



  ·  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 Février 1997

  ·  Commentaire : A JOUR



  1111..7700..  IISSPP--SSeettuupp--RReeddHHaatt--HHOOWWTTOO



  ·  Auteur(s) : Anton Chuvakin, anton@chuvakin.org

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.0.1 4 April 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1111..7711..  IIttaalliiaann--HHOOWWTTOO



  ·  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



  1111..7722..  JJaavvaa--CCGGII--HHOOWWTTOO



  ·  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


  1111..7733..  JJaavvaaSSttaattiioonn--HHOOWWTTOO



  ·  Auteur(s) : Robert S. Dubinski

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : 2000-Jun-16

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..7744..  JJaazz--DDrriivvee--HHOOWWTTOO



  ·  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



  1111..7755..  KKeerrnneell--HHOOWWTTOO



  ·  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



  1111..7766..  KKeeyybbooaarrdd--aanndd--CCoonnssoollee--HHOOWWTTOO



  ·  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
     caractères 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



  1111..7777..  KKiicckkSSttaarrtt--HHOOWWTTOO



  ·  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



  1111..7788..  KKiioosskk--HHOOWWTTOO



  ·  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



  1111..7799..  KKooddaakk--DDiiggiittaallccaamm--HHOOWWTTOO



  ·  Auteur(s) : David M. Burley, khemicals@stampede.org

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v0.0.7, 20 February 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1111..8800..  LLaappttoopp--HHOOWWTTOO



  ·  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


  1111..8811..  LLaarrggee--DDiisskk--HHOOWWTTOO


  ·  Auteur(s) : Andries Brouwer, aeb@cwi.nl

  ·  Titre-Fr : Disques de grande capacités

  ·  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 février 2000

  ·  Commentaire : A JOUR


  1111..8822..  LLDDAAPP--HHOOWWTTOO



  ·  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



  1111..8833..  LLiinnuuxx--FFrroomm--SSccrraattcchh--HHOOWWTTOO



  ·  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



  1111..8844..  LLiinnuuxxDDoocc++EEmmaaccss++IIssppeellll--HHOOWWTTOO



  ·  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



  1111..8855..  LLooooppbbaacckk--EEnnccrryypptteedd--FFiilleessyysstteemm--HHOOWWTTOO



  ·  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


  1111..8866..  LLVVMM--HHOOWWTTOO



  ·  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


  1111..8877..  MMaaiill--AAddmmiinniissttrraattoorr--HHOOWWTTOO



  ·  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


  1111..8888..  MMaaiill--UUsseerr--HHOOWWTTOO



  ·  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


  1111..8899..  MMaajjoorrddoommoo--MMaajjoorrCCooooll--HHOOWWTTOO



  ·  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


  1111..9900..  MMGGRR--HHOOWWTTOO



  ·  Auteur(s) : Vincent Broman

  ·  Titre-Fr : Le système 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



  1111..9911..  MMIILLOO--HHOOWWTTOO



  ·  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
     démarrage de Linux sous Alpha.

  ·  Version :  v0.84, 6th December 1996

  ·  Traducteur : Miodrag Vallat, miodrag@ifrance.com

  ·  Version traduite : v0.84, 6 Décembre 1996

  ·  Commentaire : A JOUR



  1111..9922..  MMIIPPSS--HHOOWWTTOO



  ·  Auteur(s) : Ralf Bächle, ralf@gnu.org

  ·  Titre-Fr : MIPS HOWTO

  ·  URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/MIPS-HOWTO.html>

  ·  Description : Ce MANUEL décrit le portage MIPS du système
     d'exploitation Linux, des problèmes courants et de leur solutions
     ainsi que de certaines  possibilités (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



  1111..9933..  MMooddeemm--HHOOWWTTOO



  ·  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



  1111..9944..  MMPP33--HHOOWWTTOO




  ·  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 décrit le matériel, les logiciels et les
     procédures à  suivre pour créer 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



  1111..9955..  MMuullttii--DDiisskk--HHOOWWTTOO



  ·  Auteur(s) :  Stein Gjoen, sgjoen@nyx.net

  ·  Titre-Fr : Les systèmes 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



  1111..9966..  MMuullttiiccaasstt--HHOOWWTTOO



  ·  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




  1111..9977..  MMuullttiiOOSS--HHOOWWTTOO



  ·  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




  1111..9988..  MMuutttt--GGnnuuPPGG--PPGGPP--HHOOWWTTOO



  ·  Auteur(s) : Andrés 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



  1111..9999..  NNCC--HHOOWWTTOO



  ·  Auteur(s) : Kris Buytaert, Kris.Buytaert@advalvas.be

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version :  v0.99p18, 26 December 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..110000..  NNCCDD--HHOOWWTTOO



  ·  Auteur(s) : Kris Buytaert, Kris.Buytaert@advalvas.be

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v0.99p15, Sept 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1111..110011..  NNEETT33--44HHOOWWTTOO



  ·  Auteur(s) : poet@linuxports.com

  ·  Titre-Fr : Linux NET4-HOWTO, Réseau sous Linux.

  ·  URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/NET-HOWTO.html>

  ·  Description : comment configurer un réseau TCP/IP sous Linux

  ·  Version : v1.6.5, March 22, 2000

  ·  Traducteur : Jacques.Chion@wanadoo.fr

  ·  Version traduite : v1.6.2, Décembre 1999

  ·  Commentaire : EN COURS



  1111..110022..  NNeettwwoorrkkiinngg--OOvveerrvviieeww--HHOOWWTTOO


  ·  Auteur(s) : Daniel Lopez Ridruejo, ridruejo@rawbyte.com

  ·  Titre-Fr : Possibilités réseau 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



  1111..110033..  NNFFSS--HHOOWWTTOO


  ·  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


  1111..110044..  NNIISS--HHOOWWTTOO



  ·  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
     systèmes Linux

  ·  Version :  v1.0, 9 March 1999

  ·  Traducteur : Frédéric Veynachter, frederic.veynachter@hol.fr

  ·  Version traduite : Version 0.12, 12 Juin 1998

  ·  Commentaire : EN COURS


  1111..110055..  OOnnlliinnee--TTrroouubblleesshhoooottiinngg--HHOOWWTTOO



  ·  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
     réservoir d'informations utiles dans la résolution des problèmes
     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

  1111..110066..  OOppttiiccaall--DDiisskk--HHOOWWTTOO



  ·  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 décrit l'installation et la configuration
     des lecteurs de disques optiques sous Linux.

  ·  Version : v1.6, 11 December 1998

  ·  Traducteur : Romieu François, romieu@ensta.fr

  ·  Version traduite : v1.6, 11 Décembre 1998

  ·  Commentaire : A JOUR


  1111..110077..  OOrraaccllee--77--HHOOWWTTOO



  ·  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 Données Oracle sur un système Linux

  ·  Version :  v1.2, 04 August 1998

  ·  Traducteur : Stephane LEE CHIP HING, slee@ile-maurice.com

  ·  Version traduite : v1.2, 04 août 1998

  ·  Commentaire : A JOUR



  1111..110088..  OOrraaccllee88--HHOOWWTTOO



  ·  Auteur(s) : Stephen Darlington,stephen@zx81.org.uk

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version :  1.14 2000/06/19

  ·  Traducteur :

  ·  Version traduite :


  ·  Commentaire :



  1111..110099..  PPaallmmOOSS--HHOOWWTTOO



  ·  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 système 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


  1111..111100..  PPaarraalllleell--PPrroocceessssiinngg--HHOOWWTTOO



  ·  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


  1111..111111..  PPCCII--HHOOWWTTOO



  ·  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


  1111..111122..  PPCCMMCCIIAA--HHOOWWTTOO



  ·  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



  1111..111133..  PPLLIIPP--IInnssttaallll--HHOOWWTTOO



  ·  Auteur(s) : Gilles Lamiral, lamiral@mail.dotcom.fr

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.22, 16 June 2000

  ·  Traducteur : Joëlle Cornavin, jcornavi@club-internet.fr

  ·  Version traduite :

  ·  Commentaire : EN COURS



  1111..111144..  pphhhhttttppdd--HHOOWWTTOO



  ·  Auteur(s) : Zach Brown

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : ???

  ·  Traducteur :

  ·  Version traduite :


  ·  Commentaire :



  1111..111155..  PPHHPP--HHOOWWTTOO



  ·  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



  1111..111166..  PPLLIIPP--IInnssttaallll--HHOOWWTTOO



  ·  Auteur(s) : Gilles Lamiral, lamiral@mail.dotcom.fr

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.15, 26 November 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1111..111177..  PPlluugg--aanndd--PPllaayy--HHOOWWTTOO



  ·  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 compréhension des
     périphériques 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



  1111..111188..  PPoolliisshh--HHOOWWTTOO



  ·  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



  1111..111199..  PPoorrttuugguueessee--HHOOWWTTOO



  ·  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



  1111..112200..  PPoossttggrreeSSQQLL--HHOOWWTTOO



  ·  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 données


  ·  Version : v26.0, 24 June 2000

  ·  Traducteur : Albert-Paul Bouillot, apb@club-internet.fr

  ·  Version traduite :  v13.0,23 Octobre 1999

  ·  Commentaire : EN COURS


  1111..112211..  PPPPPP--HHOOWWTTOO



  ·  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


  1111..112222..  PPrriinnttiinngg--HHOOWWTTOO



  ·  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


  1111..112233..  PPrriinnttiinngg--UUssaaggee--HHOOWWTTOO



  ·  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 système d'impression pour
     différents type de fichiers

  ·  Version : v1.2.2, 6 February 1998

  ·  Traducteur : Pierre Tane, tanep@bigfoot.com

  ·  Version traduite : v1.2.2, 6 février 1998

  ·  Commentaire : A JOUR


  1111..112244..  PPrroocceessss--MMoonniittoorr--HHOOWWTTOO



  ·  Auteur(s) : Al Dev, alavoor@yahoo.com

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v5.0, 21 April 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..112255..  PPrrooggrraamm--LLiibbrraarryy--HHOOWWTTOO



  ·  Auteur(s) : David A. Wheeler

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : version 0.60, 27 April 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..112266..  PPssiioonn--HHOOWWTTOO



  ·  Auteur(s) : Hans Kugler, der.hans@LuftHans.com

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v0.0.6, Nov 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1111..112277..  QQmmaaiill--VVMMaaiillMMggrr--CCoouurriieerr--iimmaapp--HHOOWWTTOO



  ·  Auteur(s) : Dan Kuykendall, dan@kuykendall.org

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.4, 23 April 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..112288..  QQuuaakkee--HHOOWWTTOO



  ·  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 Août 1998

  ·  Commentaire : A JOUR


  1111..112299..  RReeaaddiinngg--LLiisstt--HHOOWWTTOO



  ·  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 intéressants 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


  1111..113300..  RReeddHHaatt--CCDD--HHOOWWTTOO



  ·  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


  1111..113311..  RRoooott--RRAAIIDD--HHOOWWTTOO



  ·  Auteur(s) : Michael A. Robinton, michael@bzs.org

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.12, May 2, 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..113322..  RRPPMM--HHOOWWTTOO



  ·  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


  1111..113333..  SSCCSSII--PPrrooggrraammmmiinngg--HHOOWWTTOO



  ·  Auteur(s) : Heiko Eißfeldt, 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
     générique Linux

  ·  Version : v1.5, 7 May 1996

  ·  Traducteur : Thierry Danis, danis@sagem.fr

  ·  Version traduite : v1.5, 7 Juin 1996

  ·  Commentaire : A JOUR


  1111..113344..  SSeeccuurree--PPrrooggrraammss--HHOOWWTTOO



  ·  Auteur(s) : David A. Wheeler, dwheeler@dwheeler.com

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : Version 2.20, 22 July 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..113355..  SSeeccuurriinngg--DDoommaaiinn--HHOOWWTTOO



  ·  Auteur(s) : Christopher Neufeld, neufeld@physics.utoronto.ca

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :


  ·  Version : version 0.5. 1999/12/23

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..113366..  SSeeccuurriittyy--HHOOWWTTOO



  ·  Auteur(s) : Kevin Fenzi, kevin@scrye.com

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.1.1, 17 March 2000

  ·  Traducteur : Sébastien TRICAUD, nos21@club-internet.fr

  ·  Version traduite :

  ·  Commentaire : EN COURS


  1111..113377..  SSeerrbbiiaann--HHOOWWTTOO



  ·  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


  1111..113388..  SSeerriiaall--HHOOWWTTOO



  ·  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


  1111..113399..  SSeerriiaall--PPrrooggrraammmmiinngg--HHOOWWTTOO



  ·  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 développer avec les ports séries

  ·  Version : v1.0, 22 January 1998

  ·  Traducteur : Romuald KOCHER, romuald.kocher@dial.oleane.com

  ·  Version traduite : v1.0, 22 janvier 1998

  ·  Commentaire : A JOUR


  1111..114400..  SShhaaddooww--PPaasssswwoorrdd--HHOOWWTTOO



  ·  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



  1111..114411..  SSlloovveenniiaann--HHOOWWTTOO



  ·  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



  1111..114422..  SSMMBB--HHOOWWTTOO



  ·  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 Août 1996

  ·  Commentaire : EN COURS


  1111..114433..  SSMMPP--HHOOWWTTOO



  ·  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 problèmes liés 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


  1111..114444..  SSooffttwwaarree--BBuuiillddiinngg--HHOOWWTTOO


  ·  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


  1111..114455..  SSooffttwwaarree--RRAAIIDD--00..44xx--HHOOWWTTOO


  ·  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


  1111..114466..  SSooffttwwaarree--RRAAIIDD--HHOOWWTTOO


  ·  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


  1111..114477..  SSooffttwwaarree--RReelleeaassee--PPrraaccttiiccee--HHOOWWTTOO



  ·  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


  1111..114488..  SSoouunndd--HHOOWWTTOO



  ·  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 : matériel 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


  1111..114499..  SSoouunndd--PPllaayyiinngg--HHOOWWTTOO



  ·  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 différents 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 Août 1998

  ·  Commentaire : A JOUR


  1111..115500..  SSppaanniisshh--HHOOWWTTOO



  ·  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



  1111..115511..  SSRRMM--HHOOWWTTOO



  ·  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


  1111..115522..  TTccllTTkk--HHOOWWTTOO



  ·  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 décrit 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


  1111..115533..  TTeeTTeeXX--HHOOWWTTOO



  ·  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


  1111..115544..  TTeexxtt--TTeerrmmiinnaall--HHOOWWTTOO



  ·  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


  1111..115555..  TThhaaii--HHOOWWTTOO



  ·  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


  1111..115566..  TThhiinncclliieenntt--HHOOWWTTOO



  ·  Auteur(s) : Stephen Noble stephen7@bigfoot.com

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : 30th November 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..115577..  TTiippss--HHOOWWTTOO



  ·  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


  1111..115588..  TTuurrkkiisshh--HHOOWWTTOO



  ·  Auteur(s) : Görkem Çetin, gorkem@gelecek.com.tr

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.0, 21 September 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire : NE PAS TRADUIRE


  1111..115599..  UUMMSSDDOOSS--HHOOWWTTOO



  ·  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 système 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


  1111..116600..  UUnniiccooddee--HHOOWWTTOO



  ·  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 système 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


  1111..116611..  UUnniixx--IInntteerrnneett--FFuunnddaammeennttaallss--HHOOWWTTOO



  ·  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 Décembre 1998

  ·  Commentaire : EN COURS


  1111..116622..  UUPPSS--HHOOWWTTOO


  ·  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



  1111..116633..  UUsseerr--GGrroouupp--HHOOWWTTOO


  ·  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
     développement 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


  1111..116644..  UUUUCCPP--HHOOWWTTOO


  ·  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



  1111..116655..  VVAARR--HHOOWWTTOO


  ·  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 sociétés 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


  1111..116666..  VViimm--HHOOWWTTOO


  ·  Auteur(s) : Al Dev (Alavoor Vasudevan), alavoor@yahoo.com

  ·  Titre-Fr : HOWTO de l'éditeur Vim (Vi amélioré, avec coloration
     syntaxique)

  ·  URL-Fr :  <http://www.freenix.org/unix/linux/HOWTO/Vim-HOWTO.html>

  ·  Description : Ce document est un guide pour configurer très
     rapidement l'éditeur Vim sur les systèmes 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


  1111..116677..  VViirrttuuaall--SSeerrvviicceess--HHOOWWTTOO


  ·  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


  1111..116688..  VVMMaaiillMMggrr--HHOOWWTTOO


  ·  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 :


  1111..116699..  VVMMEE--HHOOWWTTOO


  ·  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


  1111..117700..  VVMMSS--ttoo--LLiinnuuxx


  ·  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


  1111..117711..  VVPPNN--HHOOWWTTOO


  ·  Auteur(s) : Matthew D. Wilson, matthew@shinythings.com

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version :  v 1.0, Dec 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..117722..  VVPPNN--MMaassqquueerraaddee--HHOOWWTTOO


  ·  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


  1111..117733..  WWaaccoomm--TTaabblleett--HHOOWWTTOO


  ·  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


  1111..117744..  WWeeaarraabbllee--HHOOWWTTOO


  ·  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 :


  1111..117755..  WWWWWW--HHOOWWTTOO


  ·  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


  1111..117766..  WWWWWW--mmSSQQLL--HHOOWWTTOO


  ·  Auteur(s) : Oliver Corff, corff@zedat.fu-berlin.de

  ·  Titre-Fr : Serveur Web de Base de Données 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
     donnée 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


  1111..117777..  XXFFrreeee8866--HHOOWWTTOO


  ·  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 récupérer, 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


  1111..117788..  XXFFrreeee8866--TToouucchh--SSccrreeeenn--HHOOWWTTOO


  ·  Auteur(s) :  Christoph Baumann, cgb@debian.org

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : Dec 10, 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1111..117799..  XXFFrreeee8866--VViiddeeoo--TTiimmiinnggss--HHOOWWTTOO


  ·  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


  1111..118800..  XXWWiinnddooww--UUsseerr--HHOOWWTTOO


  ·  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


  1111..118811..  XXiinneerraammaa--HHOOWWTTOO


  ·  Auteur(s) : Dennis Baker drbaker@softhome.net

  ·  Titre-Fr :

  ·  URL-Fr :

  ·  Description :

  ·  Version : v1.0, May 2, 2000

  ·  Traducteur :


  ·  Version traduite :

  ·  Commentaire :


  1122..  HHoowwTToo nnoonn mmaaiinntteennuuss




  1122..11..  MMoodduullee--HHOOWWTTOO



  ·  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



  1122..22..  NNeewwss--HHOOWWTTOO



  ·  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



  1122..33..  SSCCSSII--HHOOWWTTOO



  ·  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 compatilités des gestionnaires
     de périphériques SCSI avec Linux

  ·  Version : v2.30, 30 August 1996

  ·  Traducteur : Thierry Danis, danis@sagem.fr

  ·  Version traduite : Version 2.30, 30 Août 1996

  ·  Commentaire : A JOUR


  1122..44..  TTeerrmm--HHOOWWTTOO



  ·  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 :


  1133..  MMiinnii--HHoowwTToo




  1133..11..  33--BBuuttttoonn--MMoouussee


  ·  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


  1133..22..  AADDSSLL


  ·  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


  1133..33..  AADDSSMM--BBaacckkuupp


  ·  Auteur(s) :Thomas König, Thomas.Koenig@ciw.uni-karlsruhe.de

  ·  Titre-Fr :

  ·  Version : 1997/01/15

  ·  Traducteur : François Romieu, romieu@ensta.fr

  ·  Version traduite : v, 15 Janvier 1997

  ·  Commentaire : A JOUR


  1133..44..  AAddvvooccaaccyy



  ·  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



  1133..55..  AAllssaa--ssoouunndd



  ·  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



  1133..66..  AAppaacchhee++SSSSLL++PPHHPP++ffpp




  ·  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


  1133..77..  AAppaacchhee--mmooddss



  ·  Auteur(s) : Ray Van Dolson, rayvd@firetail.org

  ·  Titre-Fr :

  ·  Version : v0.91, 5 April 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..88..  AAuuttoommoouunntt



  ·  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


  1133..99..  BBaacckkuupp--WWiitthh--MMSSDDOOSS



  ·  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




  1133..1100..  BBaatttteerryy--PPoowweerreedd



  ·  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 décembre 1997

  ·  Commentaire : A JOUR


  1133..1111..  BBooccaa



  ·  Auteur(s) : David H Dennis david@amazing.cinenet.net

  ·  Titre-Fr :

  ·  Version : 1 August 1997

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..1122..  BBooggooMMiippss



  ·  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 février 1999

  ·  Commentaire : EN COURS


  1133..1133..  BBoooott++RRoooott++RRaaiidd++LLIILLOO



  ·  Auteur(s) : Michael Robinton, Michael@BizSystems.com

  ·  Titre-Fr :

  ·  Version : v1.03, May 4, 2000

  ·  Traducteur :

  ·  Version traduite :


  ·  Commentaire :


  1133..1144..  BBrriiddggee++FFiirreewwaallll++DDSSLL



  ·  Auteur(s) : Derek Ney  derek@hipgraphics.com

  ·  Titre-Fr :

  ·  Version : Mar 24, 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..1155..  BBrriiddggee++FFiirreewwaallll



  ·  Auteur(s) : Peter Breuer ptb@it.uc3m.es

  ·  Titre-Fr :

  ·  Version : Dec. 19 1997

  ·  Traducteur : Bernard Choppy, choppy@imaginet.fr

  ·  Version traduite : 19 Décembre 1997

  ·  Commentaire : A JOUR


  1133..1166..  BBrriiddggee



  ·  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



  1133..1177..  BBTTTTVV



  ·  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, Février 2000

  ·  Commentaire : A JOUR


  1133..1188..  BBzziipp22



  ·  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 août 1999

  ·  Commentaire :  A JOUR


  1133..1199..  ccaallll--bbaacckk



  ·  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


  1133..2200..  CCiippee++MMaassqq



  ·  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





  1133..2211..  CClloocckk



  ·  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


  1133..2222..  CCooffffeeee



  ·  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


  1133..2233..  CCoommmmeerrcciiaall--PPoorrtt--AAddvvooccaaccyy



  ·  Auteur(s) : Doug Loss dloss@seul.org

  ·  Titre-Fr :

  ·  Version : v0.1, 29 December 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..2244..  CCyyrruuss--IIMMAAPP



  ·  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


  1133..2255..  DDHHCCPP



  ·  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


  1133..2266..  DDiivveerrtt--SSoocckkeettss



  ·  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


  1133..2277..  DDoommaaiinn



  ·  Auteur(s) : Christopher Neufeld, neufeld@physics.utoronto.ca

  ·  Titre-Fr :

  ·  Version :  0.10. 2000-02-29.

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..2288..  DDPPTT--HHaarrddwwaarree--RRAAIIDD


  ·  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 Décembre 97

  ·  Commentaire : EN COURS


  1133..2299..  EExxtt22ffss--UUnnddeelleettiioonn



  ·  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 Février 1999

  ·  Commentaire : A JOUR


  1133..3300..  FFaaxx--SSeerrvveerr



  ·  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


  1133..3311..  FFDDUU



  ·  Auteur(s) : Doug Holland, meldroc@frii.com

  ·  Titre-Fr :

  ·  Version : v1.0, 23 November 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..3322..  FFiirreewwaallll--PPiieerrcciinngg



  ·  Auteur(s) : François René Rideau, fare@tunes.org

  ·  Titre-Fr :

  ·  Version : v0.3b, 27 November 1998

  ·  Traducteur : François René Rideau, fare@tunes.org

  ·  Version traduite :

  ·  Commentaire : EN COURS


  1133..3333..  FFTTPP



  ·  Auteur(s) : Doug Holland, meldroc@frii.com

  ·  Titre-Fr :

  ·  Version : v1.0, 23 November 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..3344..  GGIISS--GGRRAASSSS



  ·  Auteur(s) : David A. Hastings, dah@ngdc.noaa.gov

  ·  Titre-Fr :

  ·  Version : Version 1.0: 13 November 1997

  ·  Traducteur : Guillaume Allègre, Guillaume.Allegre@imag.fr

  ·  Version traduite :

  ·  Commentaire : EN COURS


  1133..3355..  GGTTEEKK--BBBBSS--555500



  ·  Auteur(s) : Wajihuddin Ahmed, wahmed@sdnpk.undp.org

  ·  Titre-Fr :

  ·  Version : v1.1, 20 August 1997

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..3366..  HHaannddsspprriinngg--VViissoorr



  ·  Auteur(s) :  Ryan VanderBijl

  ·  Titre-Fr :

  ·  Version : v0.3, April 7, 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..3377..  HHaarrdd--DDiisskk--UUppggrraaddee



  ·  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 :


  1133..3388..  HHoommee--NNeettwwoorrkk



  ·  Auteur(s) :  Paul Ramsey

  ·  Titre-Fr :

  ·  Version : June 22, 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..3399..  IInnssttaallll--FFrroomm--ZZIIPP


  ·  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


  1133..4400..  IInnttkkeeyybb



  ·  Auteur(s) : Juraj Sipos, xvudpapc@savba.sk

  ·  Titre-Fr :

  ·  Version : 4/22/2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..4411..  IIOO--PPoorrtt--PPrrooggrraammmmiinngg


  ·  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


  1133..4422..  IIPP--AAlliiaass



  ·  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


  1133..4433..  IIPP--SSuubbnneettwwoorrkkiinngg



  ·  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


  1133..4444..  IIPPMMaassqquueerraaddiinngg++NNaappsstteerr




  ·  Auteur(s) : John E. Danner

  ·  Titre-Fr :

  ·  Version : v1.6, 11 April 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..4455..  IISSPP--CCoonnnneeccttiivviittyy



  ·  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


  1133..4466..  KKeerrnneelldd


  ·  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


  1133..4477..  LLBBXX


  ·  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, Décembre 1997

  ·  Commentaire : A JOUR


  1133..4488..  LLeeaasseedd--LLiinnee



  ·  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


  1133..4499..  LLIILLOO


  ·  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



  1133..5500..  LLiinnuuxx++DDOOSS++WWiinn9955++OOSS22


  ·  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


  1133..5511..  LLiinnuuxx++FFrreeeeBBSSDD


  ·  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





  1133..5522..  LLiinnuuxx++NNTT--LLooaaddeerr


  ·  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


  1133..5533..  LLiinnuuxx++SSoollaarriiss


  ·  Auteur(s) :  Max Berger, max.berger@xslt.de

  ·  Titre-Fr :

  ·  Version : v0.8

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..5544..  LLiinnuuxx++WWiinn9955


  ·  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


  1133..5555..  LLiinnuuxx--MMooddeemm--SShhaarriinngg


  ·  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




  1133..5566..  LLooaaddlliinn++WWiinn9955


  ·  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


  1133..5577..  LLooooppbbaacckk--RRoooott--FFSS


  ·  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 :


  1133..5588..  MMaacc--TTeerrmmiinnaall


  ·  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


  1133..5599..  MMaaiill--QQuueeuuee


  ·  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 :



  1133..6600..  MMaaiill22NNeewwss


  ·  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



  1133..6611..  MMaann--PPaaggee


  ·  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


  1133..6622..  MMoodduulleess


  ·  Auteur(s) : rhw@bigfoot.com

  ·  Titre-Fr :

  ·  Version : ???

  ·  Traducteur : Frederic Gacquer, Frederic.Gacquer@univ-orleans.fr

  ·  Version traduite :

  ·  Commentaire : A JOUR


  1133..6633..  MMuullttiibboooott--wwiitthh--LLIILLOO


  ·  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



  1133..6644..  NNCCDD--XX--TTeerrmmiinnaall


  ·  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


  1133..6655..  NNeettrroomm--NNooddee


  ·  Auteur(s) : Karl Larsen,  k5di@yahoo.com

  ·  Titre-Fr :

  ·  Version : v1.10, 19 October 1998

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..6666..  NNeettssccaappee++PPrrooxxyy


  ·  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


  1133..6677..  NNeettssttaattiioonn


  ·  Auteur(s) : Kris Buytaert, Kris.Buytaert@advalvas.be

  ·  Titre-Fr :

  ·  Version : v0.98p14, 22 February 1998

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :




  1133..6688..  NNeewwss--LLeeaaffssiittee


  ·  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


  1133..6699..  NNFFSS--RRoooott--CClliieenntt


  ·  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 Février 1999

  ·  Commentaire : A JOUR


  1133..7700..  NNFFSS--RRoooott


  ·  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 Août 1997

  ·  Commentaire : A JOUR



  1133..7711..  OOfffflliinnee--MMaaiilliinngg


  ·  Auteur : Gunther Voet, gunther.voet@ibm.net

  ·  Titre-Fr : Méthode 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


  1133..7722..  PPaarrttiittiioonn--RReessccuuee


  ·  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


  1133..7733..  PPaarrttiittiioonn


  ·  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


  1133..7744..  PPaatthh


  ·  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


  1133..7755..  PPLLIIPP


  ·  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



  1133..7766..  PPrree--IInnssttaallllaattiioonn--CChheecckklliisstt


  ·  Auteur(s) : S. Parthasarathy, algolog@hd1.vsnl.net.in

  ·  Titre-Fr :

  ·  Version : Ver. 2.6 of 1999-12-19

  ·  Traducteur : Stéphane Marchau, smarchau@sortilege.fr.eu.org

  ·  Version traduite : Ver. 1.5 - 17 Dec. 1997

  ·  Commentaire : EN COURS


  1133..7777..  PPrroocceessss--AAccccoouunnttiinngg


  ·  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 Août 1997

  ·  Commentaire : A JOUR


  1133..7788..  PPrrooggrraammmmiinngg--LLaanngguuaaggeess


  ·  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


  1133..7799..  PPrrooxxyy--AARRPP--SSuubbnneett


  ·  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 : Août 1997

  ·  Commentaire : A JOUR




  1133..8800..  PPuubblliicc--WWeebb--BBrroowwsseerr


  ·  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


  1133..8811..  QQmmaaiill++MMHH


  ·  Auteur(s) : Christopher Richardson, rdn@tara.n.eunet.de

  ·  Titre-Fr :

  ·  Version : v1.4, 5 March 1998

  ·  Traducteur : Diégo D'OLIVEIRA GRANJA, mortadel@imaginet.fr

  ·  Version traduite : v1.4, 5 Mars 1998

  ·  Commentaire : A JOUR


  1133..8822..  QQuuoottaa


  ·  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 Août 1997

  ·  Commentaire : A JOUR


  1133..8833..  RRCCSS


  ·  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




  1133..8844..  RReemmoottee--BBoooott


  ·  Auteur(s) : Marc Vuilleumier Stückelberg et Sandro Viale

  ·  Titre-Fr :

  ·  Version :  v3.19, February 1999

  ·  Traducteur : Christophe Microtel, christophe@wanadoo.fr

  ·  Version traduite :

  ·  Commentaire : EN COURS


  1133..8855..  RReemmoottee--XX--AAppppss


  ·  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


  1133..8866..  RRPPMM++SSllaacckkwwaarree


  ·  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 Août 1997

  ·  Commentaire : EN COURS


  1133..8877..  SSaavviinngg--SSppaaccee



  ·  Auteur(s) : Guido Gonzato,  guido@ibogeo.df.unibo.it

  ·  Titre-Fr :

  ·  Version :  v1.0.1, 7 April 1999

  ·  Traducteur : Sébastien DELILLE, sdelille@auxicad.fr

  ·  Version traduite :

  ·  Commentaire : EN COURS



  1133..8888..  SSeeccuurree--PPOOPP++SSSSHH



  ·  Auteur(s) : Manish Singh, yosh@gimp.org

  ·  Titre-Fr :

  ·  Version :  v1.0, 30 September 1998

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..8899..  SSeennddmmaaiill++UUUUCCPP



  ·  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


  1133..9900..  SSeennddmmaaiill--AAddddrreessss--RReewwrriittee



  ·  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


  1133..9911..  SSLLIIPP--PPPPPP--EEmmuullaattoorr


  ·  Auteur(s) : Irish, irish@eskimo.com

  ·  Titre-Fr :

  ·  Version : v3.0, 8/7/97

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :

  1133..9922..  SSmmaallll--MMeemmoorryy



  ·  Auteur(s) : TODD BURGESS,  TBURGESS@UOGUELPH.CA

  ·  Titre-Fr :

  ·  Version : V0.1

  ·  Traducteur : Sebastien Blondeel, Sebastien.Blondeel@lifl.f

  ·  Version traduite : v0.1, dernière mise à jour le 21 mars 1998.

  ·  Commentaire : A JOUR


  1133..9933..  SSoouunnddbbllaasstteerr--AAWWEE


  ·  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


  1133..9944..  SSttaarrOOffffiiccee


  ·  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


  1133..9955..  SSwwaapp--SSppaaccee


  ·  Auteur(s) : Rahul U. Joshi, jurahul@hotmail.com

  ·  Titre-Fr :

  ·  Version : v1.41, 9 December 1999

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..9966..  TTeerrmm--FFiirreewwaallll


  ·  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 :



  1133..9977..  TTkkRRaatt



  ·  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 Février 1998

  ·  Commentaire : EN COURS


  1133..9988..  TTookkeenn--RRiinngg


  ·  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



  1133..9999..  TTrraannssppaarreennttPPrrooxxyy


  ·  Auteur(s) : Daniel Kiracofe

  ·  Titre-Fr :

  ·  Version : v1.0, 01 April 2000


  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1133..110000..  TTTT--DDeebbiiaann


  ·  Auteur(s) : Bear Giles, bgiles@coyotesong.com

  ·  Titre-Fr :

  ·  Version : v0.3, 10 January 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :



  1133..110011..  UUllttrraa--DDMMAA


  ·  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 Août 1998

  ·  Commentaire : EN COURS


  1133..110022..  UUppddaattee


  ·  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


  1133..110033..  UUppggrraaddee


  ·  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


  1133..110044..  VVAAIIOO++LLiinnuuxx


  ·  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



  1133..110055..  VViissuuaall--BBeellll


  ·  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


  1133..110066..  VVPPNN


  ·  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


  1133..110077..  WWaaccoomm--UUSSBB--mmiinnii--HHOOWWTTOO


  ·  Auteur(s) : Arnaud Claden

  ·  Titre-Fr :


  ·  Version :  01 June 2000

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..110088..  WWoorrddPPeerrffeecctt


  ·  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 août 1997

  ·  Commentaire : A JOUR


  1133..110099..  XX--BBiigg--CCuurrssoorr


  ·  Auteur(s) : Joerg Schneider, schneid@ira.uka.de

  ·  Titre-Fr :

  ·  Version : V2, August 11 1997

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1133..111100..  XXFFrreeee8866--XXIInnssiiddee


  ·  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


  1133..111111..  XXtteerrmm--TTiittllee


  ·  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


  1133..111122..  ZZIIPP--DDrriivvee


  ·  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



  1133..111133..  ZZIIPP--IInnssttaallll


  ·  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


  1144..  MMiinnii--HHoowwTToo nnoonn mmaaiinntteennuuss



  1144..11..  CCoolloouurr--llss



  ·  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


  1144..22..  CCoommeeaauu--CC++++




  ·  Auteur(s) : tjbynum@metalab.unc.edu

  ·  Titre-Fr :

  ·  Version : 6 January 1998

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..33..  DDiiaall--OOnn--DDeemmaanndd



  ·  Auteur(s) : tjbynum@metalab.unc.edu

  ·  Titre-Fr :

  ·  Version : 6 January 1998

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..44..  DDiipp++SSLLiiRRPP++CCSSLLIIPP


  ·  Auteur(s) :Zenon Fortuna, zenon@netcom.com

  ·  Titre-Fr :

  ·  Version : 1.0

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..55..  DDyynnaammiicc--IIPP--HHaacckkss



  ·  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





  1144..66..  GGrraavviiss--UUllttrraaSSoouunndd


  ·  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


  1144..77..  GGUUII--DDeevveellooppmmeenntt



  ·  Auteur(s) :Philip Markwalder, pgmarkwa@stud.ee.ethz.ch

  ·  Titre-Fr :

  ·  Version :

  ·  Traducteur : Loic Vigneras, Loic@europe.tgs.com

  ·  Version traduite :

  ·  Commentaire : EN COURS


  1144..88..  HHTTMMLL--VVaalliiddaattiioonn


  ·  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


  1144..99..  JJaazz--DDrriivvee



  ·  Auteur(s) : bwillmot@cnct.com

  ·  Titre-Fr :

  ·  Version :  6 January 1998

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..1100..  JJEE



  ·  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


  1144..1111..  LLiinnuuxx++DDOOSS++WWiinn9955


  ·  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


  1144..1122..  LLiinnuuxx++OOSS22++DDOOSS


  ·  Auteur(s) : Hamish Moffatt, moffatt@yallara.cs.rmit.edu.au.

  ·  Titre-Fr :

  ·  Version :  version 0.2. May 20, 1996

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..1133..  LLiinnuuxx++WWiinnNNTT


  ·  Auteur(s) : Bill Wohler, wohler@uluru.worldtalk.com

  ·  Titre-Fr :

  ·  Version : v1.1, 19 February 1997

  ·  Traducteur : Diégo D'OLIVEIRA GRANJA, mortadel@free.fr

  ·  Version traduite :

  ·  Commentaire : EN COURS


  1144..1144..  MMIIDDII++SSBB


  ·  Auteur(s) : tjbynum@metalab.unc.edu

  ·  Titre-Fr :

  ·  Version : 6 January 1998

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..1155..  OOnnlliinnee--SSuuppppoorrtt


  ·  Auteur(s) :

  ·  Titre-Fr :

  ·  Version :

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..1166..  PPaaggeerr


  ·  Auteur(s) : Chris Snell chris@unm.dorm.net

  ·  Titre-Fr :

  ·  Version : 29 August 1997

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..1177..  PPPPPP--oovveerr--IISSDDNN


  ·  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




  1144..1188..  PPPPPP--oovveerr--mmiinniiccoomm


  ·  Auteur(s) : Winfried Trümper 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 Décembre 1996

  ·  Commentaire : A JOUR


  1144..1199..  PPrriinntt22WWiinn


  ·  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


  1144..2200..  PPrrooxxyy--AARRPP


  ·  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



  1144..2211..  SSLLIIPP++pprrooxxyyAARRPP


  ·  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 :


  1144..2222..  SSoouunnddbbllaasstteerr--1166


  ·  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


  1144..2233..  SSwwaapp--SSppaaccee


  ·  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


  1144..2244..  TTiinnyy--NNeewwss


  ·  Auteur(s) : Kent Lewis (Kenneth M. Lewis, Jr.)

  ·  Titre-Fr :

  ·  Version : May 25, 1995

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :


  1144..2255..  VViirrttuuaall--WWeebb


  ·  Auteur(s) :Dan Pancamo, pancamo@infocom.net

  ·  Titre-Fr :

  ·  Version : v1.0, 24 November 1995  Copyright 1995

  ·  Traducteur :

  ·  Version traduite :

  ·  Commentaire :

  1144..2266..  WWiinn9955++WWiinn++LLiinnuuxx


  ·  Auteur(s) : Robert Goodwin, Robert.Goodwin@mcc.ac.uk

  ·  Titre-Fr :

  ·  Version : August 1996

  ·  Traducteur : Olivier Tharan, olive@minet.net

  ·  Version traduite : Août 96

  ·  Commentaire : A JOUR



  1144..2277..  XXtteerrmmiinnaall


  ·  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

  11..  CCeett HHOOWWTTOO

              Copyright Vincent Broman 1995
           Vous pouvez effectuer et distribuer
           des copies selon les conditions de la GNU General Public License.

  11..11..  AArrcchhiivvaaggee

  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.

  11..22..  AAuutthheennttiiffiiccaattiioonn

  Les  copies  de  la  distribution  MGR  dues  a  Broman  doivent  etre
  accompagnees des fichiers de signature PGP,  signees  "Vincent  Broman
  <broman@nosc.mil>".

  11..33..  CCrreeddiittss ppoouurr cceett HHOOWWTTOO

  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 MMGGRR -- voir Remerciements plus
  loin.

  22..  QQuu''eesstt--ccee qquuee MMGGRR ??

  22..11..  FFoonnccttiioonn

  MMGGRR(ManaGeR) est un systeme de fenetres  graphiques.  MMGGRR  fournit  un
  gestionnaire integre de fenetres et un emulateur de terminal graphique
  sur des systemes bitmaps couleurs et monochromes.  MMGGRR 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.

  MMGGRR  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.
  MMGGRR  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 : MMGGRR imite des actions sur le clavier en  reponse
  a des selections du menu utilisateur ou d'autres evenements.

  22..22..  CCoonnddiittiioonnss rreeqquuiisseess

  MMGGRR tourne couramment sur Linux, FreeBSD, stations Sun 3/4 avec SunOS,
  et  Coherent.  Certaines  versions  anciennes  de  MMGGRR  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.

  MMGGRR 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 MMGGRR est a X ce que Unix est a Multics.

  22..33..  QQuueelllleess ssoonntt lleess ddiiffffeerreenncceess eennttrree MMGGRR,, XX1111 eett 88..55 ??

  MMGGRR 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.

  33..  IInnssttaalllleerr MMGGRR

  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 MMGGRR 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  MMGGRR,  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 MMGGRR 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 MMGGRR 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 MMGGRR.  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 :

     --DDWWHHOO
        fichier utmp poubelle pour que "who" puisse travailler

     --DDVVII
        code pour faire bouger le curseur sous vi avec la souris

     --DDDDEEBBUUGG
        permet la mise au point en selectionnant l'option -d

     --DDFFAASSTTMMOOUUSSEE
        XOR le temps d'acces de la souris

     --DDBBUUCCKKEEYY
        permet les commandes serveur par le clavier sans souris

     --DDPPRRIIOORRIITTYY
        pour planifier la priorite des fenetres au lieu  de  fonctionner
        par  requetes  circulaires  ; la fenetre active obtient une plus
        grande priorite.

     --DDCCUUTT
        pour faire du couper/coller entre fenetres

     --DDMMGGRR__AALLIIGGNN
        force   l'alignement   des   fenetres    pour    un    scrolling
        rapide(monochrome)

     --DDKKIILLLL
        supprime les fenetres en cas d'erreurs i/o sur un tty

     --DDSSHHRRIINNKK
        pour utiliser seulement une partie de l'ecran ($MGRSIZE dans les
        variables d'environnement)

     --DDNNOOSSTTAACCKK
        interdit l'empilement d'evenements

     --DDBBEELLLL
        actionne le bip

     --DDKKBBDD
        lit les donnees mgr a partir du clavier sun, au lieu  de  stdin.
        Cela  autorise  la  redirection  des  messages  console vers une
        fenetre.

     --DDFFRRAACCCCHHAARR
        mouvement de caractere fractionnel pour fontes proportionnelles

     --DDXXMMEENNUU
        menu etendu (experimental)

     --DDMMOOVVIIEE
        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).

     --DDEEMMUUMMIIDDMMSSBBUUTT
        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 MMGGRR, 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 MMGGRR 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 ?

  44..  UUttiilliisseerr MMGGRR

  Le  seul  fichier  _i_n_d_i_s_p_e_n_s_a_b_l_e  sous MMGGRR 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 MMGGRR, si vous :

     nnee ppoouuvveezz ttrroouuvveerr ll''eeccrraann
        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.

     nnee ttrroouuvveezz ppaass llaa ssoouurriiss
        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.

     nnee ppoouuvveezz oobbtteenniirr uunn ppttyy
        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.

     nn''aavveezz rriieenn dd''aauuttrree qquuee llaa ffoonnttee ppaarr ddeeffaauutt
        assurez-vous  que  MMGGRR  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.

     eetteess ccoommpplleetteemmeenntt bbllooqquuee ((mmeemmee llee ppooiinntteeuurr ssoouurriiss nnee bboouuggee ppaass))
        logez vous sur votre machine a partir  d'un  autre  terminal  et
        tuez le processus mgr. Un ctrl-Q  fera quitter MMGGRR si le clavier
        fonctionne encore.

  44..11..  AApppplliiccaattiioonnss nnoonn lliieeeess aa MMGGRR

  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.

  44..22..  AApppplliiccaattiioonnss ((cclliieennttss)) MMGGRR ddiissttrriibbuueeeess aavveecc llee sseerrvveeuurr

     bbddffttoommggrr
        convertit des fontes BDF en fontes MGR

     bbrroowwssee
        un browser d'icones

     bbuurryy
        enterre la fenetre

     cc__mmeennuu
        pour regarder les erreurs de compilation sous C a l'aide de vi

     cclloocckk
        horloge digitale

     cclloocckk22
        horloge analogique

     cclloossee
        ferme la fenetre et l'iconifie

     ccoolloorr
        pour les couleurs d'arriere et d'avant-plan  du  texte  dans  la
        fenetre

     ccuurrssoorr
        change l'aspect du curseur texte

     ccuutt
        couper/coller du texte de la fenetre vers une memoire tampon

     ccyyccllee
        affiche une sequence d'icones
     ddmmggrr
        previsualisateur ditroff a l'etat brut

     ffaaddee
        fait passer d'une scene a une autre dans un film

     ffoonntt
        passe a une autre fonte dans la fenetre

     ggrrooppbbmm
        un pilote groff PBM utilisant les fontes Hershey

     hhppmmggrr
        emulateur de terminal hp 2621

     iiccoo
        anime un isocaedre ou un autre polyedre

     iiccoonnmmaaiill
        annonce l'arrivee de courrier

     iiccoonnmmssggss
        annonce l'arrivee d'un message

     iiffyy
        iconifie et desiconifie les fenetres

     llooaaddffoonntt
        charge une fonte a partir du systeme de fichiers

     mmaazzee
        jeu de labyrinthe

     mmcclloocckk
        horloge comique

     mmeennuu
        cree ou choisit un menu pop-up

     mmggrr
        Gestionnaire de fenetres et serveur Bellcore

     mmggrrbbdd
        jeu boulder-dash

     mmggrrbbiiffff
        surveille la boite aux lettres et annonce le courrier

     mmggrrllooaadd
        graphique indiquant la charge du systeme

     mmggrrlloocckk
        verrouille la console

     mmggrrllooggiinn
        controleur graphique de login

     mmggrrmmaagg
        loupe sur une partie de l'ecran, avec option de sauvegarde

     mmggrrmmaaiill
        annonce l'arrivee de courrier

     mmggrrmmooddee
        ajuste ou annule les modes de fenetre

     mmggrrmmssggss
        annonce l'arrivee de messages

     mmggrrpplloott
        filtre graphique Unix "plot"

     mmggrrsscclloocckk
        sablier

     mmggrrsshhoowwffoonntt
        parcourt les fontes mgr

     mmggrrsskkeettcchh
        programme de schemas et dessins

     mmggrrvviieeww
        visualise des images bitmap

     mmlleessss
        demarre  less/more  dans  une fenetre separee, avec un menu pour
        less  wtag/mnew/demarrer  n'importe  quel  programme  dans   une
        fenetre separee independante.

     mmvvii
        demarre vi dans une fenetre separee, avec souris

     oocclloossee
        ferme une fenetre (ancien)

     oommggrrmmaaiill
        annonce l'arrivee de courrier (ancien)

     ppbbmmrraawwttoommggrr,,ppggmmrraawwttoommggrr,,ppppmmrraawwttoommggrr
        convertit des bitmats PBM,PGM,PPM brutes en format bitmap mgr

     ppbbmmssttrreeaamm
        fractionne une sequence de bitmaps

     ppbbmmttoopprrtt
        impression a partir de PBM

     ppggss
        un patch ghostscript et interface, un visualisateur PS

     ppiilloott
        balaye des bitmaps et visualise des images

     rreesseettwwiinn
        fait le menage dans une fenetre si le client se plante

     rroottaattee
        rotation d'un bitmap de 90 degres.

     ssccrreeeenndduummpp
        sauvegarde un ecran graphique dans un fichier bitmap

     sseett__ccoonnssoollee
        redirige les messages  console vers une fenetre

     sseett__tteerrmmccaapp
        ajuste une valeur TERMCAP appropriee

     sseettnnaammee
        nomme une fenetre, pour les messages et pour l'iconifier

     sshhaappee
        redimensionne une fenetre

     ssqquuaarree
        transforme une fenetre en carre

     ssqquueeeezzee
        compresse un bitmap mgr

     ssttaarrttuupp
        fournit  un  fichier  de  demarrage  pour  la  disposition de la
        fenetre courante

     tteexxmmggrr
        pour previsualiser un fichier TeX dvi

     tteexxtt22ffoonntt,, ffoonntt22tteexxtt
        conversion entre formats fonte mgr et un texte dump

     uunnssqquueeeezzee
        pour decompresser un bitmap mgr

     vvggaaffoonntt22mmggrr,,mmggrrffoonntt22vvggaa
        conversion de format de fontes mgr et VGA

     wwiinnddooww__pprriinntt
        imprime l'image d'une fenetre

     zzoooomm
        editeur d'icones

     bboouunnccee,, ggrraavv,, hhiillbbeerrtt,, mmggrreeyyeess,, ssttrriinnggaarrtt,, wwaallkk
        demos graphiques

  44..33..  AApppplliiccaattiioonnss MMGGRR ddiissttrriibbuueeeess sseeppaarreemmeenntt,, ccff ffiicchhiieerr ""SSUUPPPPOORRTT""

     ccaallccttooooll
        calculatrice

     cchheessss
        interface pour /usr/games/chess

     ggnnuu eemmaaccss
        editeur avec souris lisp/term/mgr.el et aide menu

     ggnnuupplloott
        traceur de donnees scientifiques universel

     mmeettaaffoonntt
        creation et conception de fontes

     oorriiggaammii
        editeur de dossier

     ppbbmmpplluuss
        conversions et manipulations de format portable bitmap

     ppllpplloott
        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.
  55..  PPrrooggrraammmmaattiioonn ppoouurr MMGGRR

  Le manuel des programmeurs MMGGRR, 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
  MMGGRR en lisant et essayant le pilote de terminal mgr.el pour GNU Emacs,
  qui met en oeuvre la bibliotheque interface MMGGRR 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 MMGGRR doivent etre inte-
  grees avec votre boucle de manipulation d'evenement.

  La seule fonction manquante pour les dessins dans le protocole MMGGRR 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.

  66..  DDooccuummeennttaattiioonn ssuupppplleemmeennttaaiirree

  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.

  77..  RReemmeerrcciieemmeennttss

  Stephen  Uhler,  avec  d'autres  travaillant  chez  Bellcore,  fut  le
  concepteur initial de MMGGRR, des lors Bellcore a des droits d'auteur sur
  la plupart des codes et des documentations de MMGGRR, 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 MMGGRR.

  +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 MMGGRR
     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 Décembre 1996

  Ce document expose le fonctionnement du Miniloader, un programme pour
  les machines Alpha qui sert à initialiser le système et démarrer
  Linux. Le "Alpha Linux Miniloader" (pour être exact) est également
  dénommé MILO.
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 Droits d'auteurs (Copyright)
     1.2 Nouvelles versions de ce document

  2. Qu'est-ce que MILO ?

  3. Images précompilées de MILO

  4. Comment compiler MILO ?

  5. Comment charger MILO ?

     5.1 Chargement de MILO depuis la console ARC pour Windows NT
     5.2 Démarrage de MILO depuis l'AlphaBIOS Windows NT
     5.3 Démarrage de MILO depuis le Debug Monitor des cartes d'évaluation
     5.4 Chargement de MILO depuis une disquette de démarrage failsafe
     5.5 Démarrage de MILO à partir de la mémoire Flash
     5.6 Démarrage de MILO par le biais de la console SRM
     5.7 Informations spécifiques à certains systèmes
        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 Démarrage de Linux
     6.3 Redémarrage de Linux
     6.4 La commande ''bootopt''

  7. Exécution du gestionnaire de mémoire 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. Dépannage

  10. Remerciements


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document expose le fonctionnement du logiciel MILO (Miniloader)
  pour Alpha AXP. Ce logiciel de console a pour fonction d'initialiser
  le système Alpha AXP, de charger et démarrer Linux et, pour finir, il
  met un PALcode à disposition de Linux.


  11..11..  DDrrooiittss dd''aauutteeuurrss ((CCooppyyrriigghhtt))

  Ce document a été réalisé en 1995, 1996, 1997 par David A Rusling. (c)
  Copyright 1995, 1996, 1997.

  Document traduit de l'anglais en 1997 par Frédéric 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).


  CCooppyyrriigghhtt.. Comme il en est de tous les documents HOWTO pour Linux,
  cette documentation peut être reproduite, distribuée intégralement ou
  en partie seulement sur n'importe quel média, physique ou
  électronique, du moment que cet avertissement sur les droits d'auteur
  est présent sur toutes les copies. L'utilisation commerciale est
  autorisée et encouragée ; 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
  décharge de responsabilité  sont conservées intacte et qu'une notice
  présentant le traducteur y figure.


  DDéécchhaarrggee ddee rreessppoonnssaabbiilliittéé.. Bien qu'ayant essayé d'inclure les
  informations les plus précises et correctes à ma disposition, je ne
  peux garantir que l'utilisation faite de ce document n'aboutisse pas à
  des pertes de données ou de matériels. 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
  conséquences de son utilisation.


  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  La dernière 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>.


  22..  QQuu''eesstt--ccee qquuee MMIILLOO ??

  Sur machines Intel, le BIOS configure le système et ensuite charge,
  depuis le secteur d'amorçage d'un disque DOS, une image à exécuter.
  Cela est en quelque sorte la fonction principale de MILO sur un
  système Alpha. Il existe toutefois un certain nombre de différences
  entre BIOS et MILO, notamment le fait que MILO intègre certains
  pilotes de périphériques Linux inchangés. MILO est un logiciel appelé
  FirmWare, à l'inverse de LILO qui dépend du logiciel FirmWare BIOS
  responsable de son chargement et de son exécution en mémoire centrale.
  Les principales fonctions de MILO sont :


  1. PALcode ;

  2. Initialisation du gestionnaire de mémoire. (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 périphériques en mode bloc (par exemple le pilote
     de disquettes) ;

  6. Un support des systèmes 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 mémoire spécifiques à linux) ;

  9. Configuration de la NVRAM (mémoire non volatile) pour la gestion de
     variables d'environnement.


  Les paragraphes suivants décrivent ces fonctionnalités plus en détail.


  Le PALcode peut être perçu comme une minuscule couche logicielle qui
  prépare le processeur Alpha en vue de l'utilisation d'un système
  d'exploitation spécifique. Il fonctionne dans un mode spécial du
  processeur (PALmode) qui a certaines limitations mais utilise les
  instructions standard des processeurs Alpha,  plus cinq instructions
  supplémentaires. De cette manière le processeur Alpha peut exécuter
  une grande diversité de systèmes d'exploitation tels que Windows NT,
  OpenVMS, Digital Unix et bien sûr Linux. Le PALcode que MILO utilise
  (et in extenso Linux lui-même) est, comme le reste de MILO un
  freeware. Il est inspiré d'un exemple de PALcode pour Digital Unix que
  Digital fournissait avec ses premières cartes d'évaluation. Les
  différences entre les PALcode sont dues à des différences qui existent
  dans la cartographie de la mémoire, dans la gestion des interruptions
  entre les différentes versions du processeur Alpha (par exemple le
  21066 possède une cartographie des entrées-sorties différente de
  l'association du 21064 avec les contrôleurs E/S de la famille 2107x,
  en effet le 21066 intègre un équivalent de ce contrôleur sur son
  support).


  Pour que MILO fonctionne correctement il lui faut savoir quelle est la
  quantité de mémoire disponible, à quel endroit Linux peut
  éventuellement être chargé en mémoire, et il doit, de plus, être
  capable d'allouer temporairement de la mémoire pour les pilotes de
  périphériques Linux. Le code contient une cartographie de la mémoire
  qui comporte des espaces disponibles pour une allocation de pages
  mémoire permanentes ou temporaires. Lorsqu'il démarre, MILO se
  décompresse à l'emplacement mémoire adéquat. Lorsqu'il transfère le
  contrôle au noyau Linux, il réserve un espace pour une instance
  compressée de lui-même, pour le PALcode (indispensable au
  fonctionnement du noyau) ainsi que quelques structures de données.
  Cela laisse la quasi-totalité de la mémoire centrale libre pour Linux.


  L'opération finale du gestionnaire mémoire est de configurer et
  d'activer l'adressage virtuel afin que les structures de données
  attendues par Linux soient à leur place en mémoire virtuelle.


  MILO contient du code d'initialisation de l'affichage qui prépare le
  système graphique à l'utilisation de Linux.  Il détectera et utilisera
  un adaptateur VGA s'il est présent, sinon il essaiera d'utiliser le
  pilote TGA (21030). S'il y a échec de cette initialisation, MILO
  considèrera qu'il n'y a aucun périphérique graphique sur le système.
  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 périphériques de Linux résident 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 réalisée 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 périphérique compatible avec Linux. MILO contient, en
  standard, tous les pilotes de périphériques en mode bloc du noyau
  Linux.


  MILO charge le noyau Linux depuis un vrai système de fichiers plutôt
  que depuis un secteur d'amorçage ou d'autres emplacements étranges. Il
  supporte les systèmes de fichiers MSDOS, EXT2 et ISO9660. Les fichiers
  GZIPpés sont également reconnus et recommandés, en particulier lors
  d'un chargement à partir d'une disquette qui reste un support
  relativement lent. MILO les reconnaît grâce à leur suffixe _._g_z.


  Un gestionnaire de clavier rudimentaire est inclus dans MILO si bien
  qu'avec un pilote de périphérique vidéo d'une simplicité égale il
  dispose d'une interface utilisateur simple.  Cette interface permet de
  lister les systèmes de fichiers disponibles par le biais de pilotes de
  périphériques configurés, de démarrer Linux ou des utilitaires de
  mises à jour de la mémoire flash, de définir des variables
  d'environnement agissant sur le démarrage du système. Comme avec LILO
  vous pouvez transmettre des arguments au noyau.


  MILO doit renseigner le noyau Linux sur la nature du matériel sous-
  jacent (type de carte mère, quantité de mémoire RAM totale et quantité
  libre). Il effectue cela en utilisant les informations contenues dans
  le HWRPB.  Celles-ci sont disposées aux emplacements appropriés en
  mémoire virtuelle juste avant que le contrôle du système ne soit
  transféré au noyau Linux.


  33..  IImmaaggeess pprrééccoommppiillééeess ddee MMIILLOO

  Si vous envisagez d'utiliser Linux sur un système Alpha standard, un
  ensemble d'images précompilées "standard" est à votre disposition.
  Celles-ci ainsi que leurs sources et bien d'autres choses
  intéressantes sont disponibles à l'adresse suivante :
  <ftp://gatekeeper.dec.com/pub/Digital/Linux-Alpha/Miniloader>.


  Le sous-répertoire images contient un répertoire par type de système
  standard (ex : AlphaPC64) adoptant les conventions de nomenclatures
  suivantes :


  1. MILO - Image de MILO, celle-ci peut être démarrée de diverses
     manières ;

  2. fmu.gz - Utilitaire de gestion de la mémoire flash ;

  3. MILO.dd - Image d'une disquette bootable de MILO, pouvant être
     reproduite grâce à rawrite.exe sous DOS ou dd sous Linux.


  Le sous-répertoire test-images contient un ensemble d'images
  expérimentales sous la même forme que les précédentes. Bien
  qu'expérimentales, ces images tendent à contenir les dernières
  fonctionnalités.


  44..  CCoommmmeenntt ccoommppiilleerr MMIILLOO ??

  La compilation de MILO s'effectue de manière indépendante du noyau.
  Étant donné qu'il requiert des parties du noyau pour fonctionner, vous
  devrez, en premier lieu, configurer un noyau qui corresponde au
  système auquel MILO est destiné. Cela correspond à attribuer le même
  numéro 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 récente du noyau, mais avec celle-ci ce ne sera pas le
  cas. Étant donné que les librairies dynamiques sont complètement
  fonctionnelles, il existe deux versions des sources de MILO. Pour
  effectuer la compilation de MILO dans sa version ELF vous devez
  premièrement extraire les sources standard puis appliquer un patch à
  ces dernières, correspondant au numéro de version du patch ELF. Je
  considérerai, dans la suite de ce document, que les sources et les
  fichiers objets du noyau sont situés dans le répertoire
  /usr/src/linux, et que le noyau a été correctement compilé à l'aide de
  la commande make boot.


  Pour compiler MILO, allez dans le répertoire contenant les sources de
  MILO et faites appel à la commande make de la manière suivante :


       $ make KSRC=/usr/src/linux config





  De même que pour la compilation du noyau, le système vous posera un
  certain nombre de questions.



       Echo output to the serial port (MINI_SERIAL_ECHO) [y]





  Il est utile d'utiliser le port série comme redirection de la fonction
  du noyau printk ; celle-ci est effectuée 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 bibliothèque de fonctions dont la
  distribution est gratuite si elle est utilisée sur une machine à base
  de processeur Alpha. Les sources n'en sont pas disponibles. Si vous
  répondez 'n', l'émulation BIOS équivalente freeware sera compilée.
  Sachez que vous ne pouvez pas encore choisir le système de Digital
  utilisant le système ELF (la bibliothèque n'est pas encore prête).
  Vous devrez donc répondre '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 précompilée du PALcode fourni avec MILO.


  Tout est désormais prêt, vous pouvez lancer la compilation :


       $ make KSRC=/usr/src/linux





  Lorsque la compilation s'est achevée avec succès, l'image de MILO est
  écrite dans le fichier milo. Il y a un grand nombre de fichiers
  appelés milo.*, ceux-ci devront être ignorés.


  55..  CCoommmmeenntt cchhaarrggeerr MMIILLOO ??

  La manière la plus courante et la plus simple pour charger MILO est de
  le faire à partir de la console ARC. Cependant il est possible de
  réaliser cette opération de diverses manières :

  ·  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.


  55..11..  CChhaarrggeemmeenntt ddee MMIILLOO ddeeppuuiiss llaa ccoonnssoollee AARRCC ppoouurr WWiinnddoowwss NNTT

  La plupart, sinon la totalité, des systèmes à base d'Alpha AXP
  intègrent le firmware ARC pour Windows NT et cela est la méthode
  recommandée pour démarrer MILO et de surcroît Linux. Une fois que vous
  disposez de ce firmware et de la version adéquate de MILO, la méthode
  est complètement générique.


  Le firmware ARC pour Windows NT offre un environnement dans lequel les
  programmes peuvent demander à celui-ci d'effectuer des opérations. Le
  programme OSLoader de Windows NT réalise exactement cela. Linload.exe
  est comparable mais beaucoup plus simple, il fait juste ce qui est
  nécessaire au chargement et à l'exécution de MILO. Il charge le
  fichier image adéquat en mémoire à l'adresse 0x00000000 puis il
  exécute les deux instructions swap-PAL puis PALcall à cette adresse.
  MILO, comme Linux, utilise un PALcode différent de celui utilisé par
  Windows NT, cela expliquant pourquoi l'instruction swap est
  nécessaire.  MILO se reloge lui-même à l'adresse 0x200000 puis
  poursuit la réinitialisation du PALcode à cette nouvelle adresse.


  Avant d'ajouter des options de démarrage 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 démarrage 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. Répondez "yes" à la question suivante (qui stipule que linload.exe
     est au même endroit que le système d'exploitation ; pour la console
     ARC, MILO est vu comme un système d'exploitation à part entière)

  8. Entrez '\' ensuite (stipulant que la racine du système est la
     racine de notre disquette)

  9. Entrez le nom de ce choix de démarrage (Linux par exemple !)

  10.
     Répondez '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 sélectionnez
     le nom que vous avez choisi ci-dessus dans le but de l'éditer.

  12.
     Avec les flèches, sélectionnez "OSLOADFILENAME" puis saisissez le
     nom de l'image MILO que vous souhaitez utiliser. Par exemple
     noname.arc ou milo suivi de Entrée.

  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 démarrer
     MILO.


  Après avoir réalisé 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 désormais démarrer MILO (puis Linux). Vous pouvez aussi
  charger linload.exe et MILO depuis un système 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'interprète comme une commande. Donc, pour démarrer 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 méthode de démarrage de MILO via la console ARC (bien que
  tortueuse) est d'appeler MILO fwupdate.exe puis de choisir l'option
  'Upgrade Firmware'.


  55..22..  DDéémmaarrrraaggee ddee MMIILLOO ddeeppuuiiss ll''AAllpphhaaBBIIOOSS WWiinnddoowwss NNTT

  Avec l'apparition des machines de la série XLT, Digital a changé la
  console ARC pour ses systèmes Windows NT et l'a remplacée par
  l'AlphaBIOS. Cette nouvelle console offre l'avantage d'une plus grande
  convivialité. Ce changement d'interface implique un changement de
  procédure de configuration pour ceux qui souhaitent démarrer Linux
  pour Alpha dans ce contexte.

  La première chose à faire est d'installer la dernière version de
  l'AlphaBIOS sur votre système. Celle-ci est disponible à l'adresse
  suivante : <http://www.windows.digital.com/support/sysoft.htp>.

  Téléchargez le fichier ZIP, décompactez-le et installez-le comme suit
  :

  1. Copiez le fichier sur une disquette DOS ;

  2. Allumez l'ordinateur et insérez la disquette. Lors de l'affichage
     des premières 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 démarrer votre
  machine comme suit :

  1. Créez une disquette DOS contenant les fichiers linload.exe et
     milo ;

  2. Allumez le système et entrez dans le setup ;

  3. Choisissez "Utilities->OS Selection Setup" ;

  4. Appuyez sur INSERT pour ajouter une nouvelle entrée ;

  5. Pour "Boot Name" entrez un nom de votre choix (ici Linux) puis
     pressez Tab pour changer de champ ;

  6. Avec les flèches, 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 boîte de dialogue
  angoissante indiquant : "Warning: Operating System Selection not
  valid!".  Ne tenez pas compte de cette erreur (cela ne pose de
  problème qu'à NT), pressez Entrée pour valider.

  1. Pressez F10 puis Entrée pour valider ces changements ;

  2. Pressez Esc jusqu'à arriver à l'écran d'accueil ;

  3. Choisissez, à l'aide des flèches, l'entrée que vous venez de
     saisir, pressez Entrée pour lancer MILO.

  Si la première partition de votre disque dur est un système de
  fichiers DOS de petite taille destiné au démarrage (ainsi que la
  procédure d'installation le recommande), lorsque Linux sera installé,
  vous devrez y copier linload.exe et MILO. Au démarrage 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 démarche suivante :

  1. Entrez dans le setup (F2 à l'écran de démarrage) ;

  2. Choisissez "Utilities->OS Selection setup" ;

  3. Sélectionnez l'entrée correspondant à Linux, puis pressez F6 pour
     la modifier ;

  4. Placez le curseur sur l'entrée correspondant à la partie
     périphérique de la ligne "Boot File" (device pour les versions en
     Anglais).  Avec les flèches, choisissez la partition sur laquelle
     résident linload.exe et MILO. Appuyez sur Entrée pour valider.

  5. Si vous souhaitez que votre système démarre automatiquement après
     le chargement de MILO positionnez-vous (à l'aide de la touche TAB)
     sur la variable "OS Options" puis spécifiez ici quelle est la ligne
     de commande à fournir à MILO, par exemple : "boot sda2:vmlinux.gz".
     Pressez Entrée 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.


  55..33..  dd''éévvaalluuaattiioonn DDéémmaarrrraaggee ddee MMIILLOO ddeeppuuiiss llee DDeebbuugg MMoonniittoorr ddeess
  ccaarrtteess

  Les cartes d'évaluation (et souvent les cartes conçues à partir de
  leur exemple) proposent un logiciel appelé "debug monitor". Reportez-
  vous à la documentation de votre système avant d'envisager cette
  possibilité. Les systèmes 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 préparer à connecter un terminal série à votre système. Son
  interface est très simple et une commande d'aide (help) documente une
  grande quantité de commandes. Les plus intéressantes de ces commandes
  incluent les mots boot et load.


  Le debug monitor peut charger une image à partir du réseau (netboot)
  ou d'une disquette (flboot). Dans tous les cas, l'image doit être
  chargée à 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>





  55..44..  CChhaarrggeemmeenntt ddee MMIILLOO ddeeppuuiiss uunnee ddiissqquueettttee ddee ddéémmaarrrraaggee ffaaiillssaaffee

  D'après les informations _d_o_n_t _j_e _d_i_s_p_o_s_e, seul l'AXPpci33 propose la
  reconnaissance de secteur d'amorçage de type failsafe floppy (Section
  ``AXPpci33 (Noname)'').


  Si vous ne disposez pas d'une image MILO standard précompilée, vous
  devrez confectionner une disquette au format SRM. Une fois MILO
  compilé, vous devrez exécuter 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 précompilée vous pourrez construire
  la disquette de la manière suivante :



       dd if=MILO.dd of=/dev/fd0





  55..55..  DDéémmaarrrraaggee ddee MMIILLOO àà ppaarrttiirr ddee llaa mméémmooiirree FFllaasshh

  Il existe certains systèmes qui permettent d'intégrer MILO directement
  dans la PROM Flash, permettant ainsi le démarrage 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'')


  55..66..  DDéémmaarrrraaggee ddee MMIILLOO ppaarr llee bbiiaaiiss ddee llaa ccoonnssoollee SSRRMM

  La console SRM (abréviation de System Reference Manual) ne reconnaît
  aucun système de fichiers ni même aucune partition disque. Elle
  s'attend tout simplement à trouver le logiciel d'amorçage à une
  position physique démarrant à un emplacement donné (il s'agit d'un
  offset ou position relative). L'information décrivant ce logiciel
  d'amorçage (sa taille et sa position relative) est décrite dans le
  premier bloc de 512 octets du disque. Pour charger MILO depuis la SRM
  vous devez générer cette structure de données 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 périphérique de démarrage, compilez mboot
  et bootm puis écrivez-les sur disque à l'aide de la commande
  suivante :



       $ cat mboot bootm > /dev/fd0





  ou bien téléchargez une image appropriée 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 démarrer MILO depuis la console
  SRM, puis d'utiliser une de ses nombreuses commandes pour démarrer.
  Par exemple, pour démarrer depuis une disquette, vous devrez effectuer
  l'opération 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 systèmes suivants sont compatibles avec la console SRM :

  ·  Noname (Section ``AXPpci33 (Noname)'')

  ·  AlphaPC64 (Section ``AlphaPC64 (Cabriolet)'')

  ·  EB164 (Section ``EB 164'')

  ·  PC164 (Section ``PC164'')


  55..77..  IInnffoorrmmaattiioonnss ssppéécciiffiiqquueess àà cceerrttaaiinnss ssyyssttèèmmeess

  55..77..11..  AAXXPPppccii3333 ((NNoonnaammee))

  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
  mémoire PROM flash, exécutable depuis MILO permet de copier ce dernier
  en mémoire flash. En revanche, nous tenons à vous avertir que cette
  manipulation est très périlleuse car la Noname ne comportant que 256
  Ko de mémoire flash, elle ne peut contenir qu'une image en PROM. Si
  l'image que vous copiez en flash est corrompue, votre système ne
  démarrera plus.


  La méthode de démarrage des cartes Noname est contrôlée par les
  jumpers J29 et J28. Ils sont disposés comme suit :









  Numéro 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 intéressent sont sur J28,
  dont les plots 1-3, qui démarrent la console depuis la flash et J29,
  dont les plots 1-3 permettent de démarrer la console depuis une
  disquette. La seconde option est celle dont vous avez besoin pour
  démarrer MILO la première fois.  Une fois que les jumpers auront été
  configurés pour l'utilisation d'une disquette de démarrage, insérez la
  disquette contenant MILO en version bootable dans le lecteur puis
  relancez l'ordinateur. En l'espace de quelques secondes (après
  l'extinction de la lumière du lecteur), vous devrez constater que
  l'écran passe du noir au blanc et y lire les informations relatives à
  l'exécution de MILO.  Si les aspects techniques vous intéressent,
  sachez que la carte Noname charge le contenu de la disquette à
  l'adresse 0x104000 et les images provenant de la mémoire flash en
  0x100000. Pour cette raison, MILO intègre son PALcode à l'adresse
  0x200000. Lors de son démarrage, il se reloge lui-même à l'adresse
  correcte.


  55..77..22..  AAllpphhaaPPCC6644 ((CCaabbrriioolleett))

  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 ``Démarrage de MILO par le biais de la console
  SRM'') et du Debug Monitor (Section ``Démarrage de MILO depuis le
  debug monitor des cartes d'évaluation'').  Ces images sont en flash et
  il reste de la place dans cette mémoire pour ajouter l'image de MILO
  de manière à pouvoir démarrer MILO directement depuis la PROM. Un
  utilitaire de gestion de la mémoire flash est disponible sous MILO,
  ainsi il est possible d'intégrer MILO à la mémoire flash lorsque
  celui-ci s'exécute (Section ``Exécution du gestionnaire de mémoire
  flash'').  Ce procédé accepte l'utilisation de variables
  d'environnement MILO.


  Il est possible de choisir parmi les options de démarrage (ARC, SRM,
  MILO) en utilisant une combinaison de jumpers et de définir des
  options de démarrage qui seront sauvegardées 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 exécuté.

  ·  SP Bit 7 fermé : Exécuter l'image définie dans la NVRAM

  ·  SP Bit 7 ouvert : Exécuter la première image.


  Donc, si le SP Bit 7 est ouvert, le Debug Monitor sera exécuté car il
  est toujours positionné en première place dans la PROM. Et si le SP
  Bit 7 est fermé, l'image exécutée sera celle définie dans l'horloge
  système (TOY). L'ARC, le Debug Monitor et MILO acceptent cette
  option ; il faut, cependant, être très prudent lors de son
  utilisation. Par exemple, vous ne pouvez pas définir d'option qui vous
  permettra de démarrer MILO au démarrage suivant : lors de
  l'utilisation de la console ARC, cette dernière vous permet de passer
  en mode Debug Monitor ou ARC lors du démarrage, mais elle ne permet
  pas de passer en mode MILO.


  Pour inclure MILO dans la mémoire flash via le Debug Monitor, vous
  aurez besoin d'une image adéquate (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 paramètres, '7'
  représente un identificateur d'image flash utilisé par la SROM et
  -l200000 indique l'adresse de chargement de cette image).


  Pour charger cette image en mémoire, utilisez une des commandes
  flload, netload, ... à l'adresse 0x200000, puis insérez l'image en
  mémoire flash de la manière suivante :



       AlphaPC64> flash 200000 8





  200000 est l'adresse de chargement et 8 est le numéro du segment de
  mémoire à 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).


  Définissez l'image que la SROM va exécuter au démarrage en donnant une
  valeur à la variable TOY bootopt :



       AlphaPC64> bootopt 131




  (131 indique la 3ème image, 129 la 1ère image, 130 la 2ème, etc...)


  Éteignez la machine, mettez le jumper 7 en place et redémarrez la
  machine. Vous devrez alors pouvoir observer MILO s'exécuter.
  Félicitations ! 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 redémarrer en mode Debug Monitor, reprenez
  les étapes les unes à la suite des autres, méthodiquement, en prenant
  garde de ne rien oublier.


  55..77..33..  EEBB 6666++

  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 dérivées des
  cartes d'évaluation possèdent ce logiciel. Habituellement, ces cartes
  contiennent la console ARC. Un utilitaire de gestion de la mémoire
  flash est disponible sous MILO, ainsi il est possible d'intégrer MILO
  à la mémoire flash lorsque celui-ci s'exécute (Section ``Exécution du
  gestionnaire de mémoire flash''). Ce système accepte les variables
  d'environnement MILO.


  Ces cartes disposent de plusieurs images en mémoire flash contrôlées
  par jumper. Les deux bancs de jumpers sont J18 et J16 et se situent au
  centre bas de la carte (considérant que le processeur Alpha se situe
  en haut de la carte). Vous pouvez choisir l'option de démarrage par
  ces jumpers (et MILO lorsqu'il est chargé) ainsi qu'une variable
  d'environnement sauvegardée dans la mémoire non volatile (NVRAM TOY).


  jumper 7-8 Fermé signifie qu'il faut utiliser l'image désignée par la
  variable bootopt, lorsqu'il est ouvert le Debug Monitor est exécuté.


  Pour le reste de la configuration, reportez vous au paragraphe
  précédent traitant de l'AlphaPC64 (Section ``AlphaPC64 (Cabriolet)'').


  55..77..44..  EEBB 6644++ // AAssppeenn AAllppiinnee

  Cette carte est très similaire à l'AlphaPC64 excepté qu'elle ne
  contient pas de mémoire flash utilisable par MILO. Cette carte possède
  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 gravée la
  console ARC.


  55..77..55..  UUnniivveerrssaall DDeesskkttoopp BBooxx ((MMuullttiiaa))

  C'est une station ultra compacte à base d'AXP 21066 qui intègre un
  sous-système 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 démarrage
  de MILO (Section ``Chargement de MILO depuis la console ARC pour
  Windows NT'').


  55..77..66..  EEBB 116644

  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 dérivées des
  cartes d'évaluation possèdent ce logiciel. Habituellement, ces cartes
  contiennent la console ARC. Un utilitaire de gestion de la mémoire
  flash est disponible sous MILO, ainsi il est possible d'intégrer MILO
  à la mémoire flash lorsque celui-ci s'exécute (Section ``Exécution du
  gestionnaire de mémoire flash''). Ce système accepte les variables
  d'environnement MILO. La console SRM est, de plus, disponible (Section
  ``Démarrage de MILO par le biais de la console SRM'').


  Ces cartes disposent de plusieurs images en mémoire flash contrôlées
  par jumper. Le banc de deux jumpers s'appelle J1 et se situe en bas à
  gauche de la carte (considérant que le processeur Alpha se situe en
  haut de la carte). Vous pouvez choisir l'option de démarrage par ces
  jumpers (et MILO lorsqu'il est chargé) ainsi qu'une variable
  d'environnement sauvegardée dans la mémoire non volatile (NVRAM TOY).
  jumper SP-11 de J1 fermé signifie qu'il faut utiliser l'image désignée
  par la variable bootopt ; lorsqu'il est ouvert le Debug Monitor est
  exécuté.


  Pour le reste de la configuration, reportez-vous au paragraphe
  précédent traitant de l'AlphaPC64 (Section ``AlphaPC64 (Cabriolet)'').


  55..77..77..  PPCC116644

  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 dérivées des
  cartes d'évaluation possèdent ce logiciel. Habituellement, ces cartes
  contiennent la console ARC. Un utilitaire de gestion de la mémoire
  flash est disponible sous MILO, ainsi il est possible d'intégrer MILO
  à la mémoire flash lorsque celui-ci s'exécute (Section ``Exécution du
  gestionnaire de mémoire flash''). Ce système accepte les variables
  d'environnement MILO. La console SRM est, de plus, disponible (Section
  ``Démarrage de MILO par le biais de la console SRM'').


  Ces cartes disposent de plusieurs images en mémoire flash contrôlées
  par jumpers. Le banc principal de jumpers s'appelle J30, il contient
  les jumpers de configuration. Le jumper CF6 fermé signifie que le
  système démarrera le Debug Monitor, il est par défaut ouvert.


  Pour le reste de la configuration, reportez-vous au paragraphe
  précédent traitant de l'AlphaPC64(Section ``AlphaPC64 (Cabriolet)'').


  55..77..88..  XXLL226666

  Le XL266 est un des systèmes connus sous le nom d'Avanti. Il possède
  une carte fille sur laquelle résident le processeur Alpha et le cache
  qui se connecte à la carte mère. Cette carte remplace une carte fille
  Pentium équivalente.


  Certains de ces systèmes sont vendus avec la console SRM, mais
  certains autres ne sont livrés qu'avec la console ARC (Section
  ``Chargement de MILO depuis la console ARC pour Windows NT'').


  Voici une liste compatible avec cette série :

  ·  AlphaStation 400 (Avanti),

  ·  AlphaStation 250,

  ·  AlphaStation 200 (Mustang),

  ·  XL. Il en existe deux modèles, XL266 et XL233 qui ne diffèrent que
     par la vitesse du processeur et la taille de la mémoire cache.


  NNoottee :: Le système que j'utilise pour développer 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 systèmes sont,
  techniquement, équivalents. Ils possèdent les mêmes chipsets et les
  mêmes mécanismes d'interruptions.



  55..77..99..  PPllaattffoorrmm22000000

  Il s'agit d'un système à base de processeur 21066 à 233 Mhz.


  66..  LL''iinntteerrffaaccee uuttiilliissaatteeuurr ddee MMIILLOO

  Après avoir correctement installé MILO (Abrév. de MIniLOader) vous
  devrez obtenir l'invite de commande de MILO. Il y a une interface de
  commandes très simple que vous pouvez utiliser dans le but de démarrer
  une image Linux particulière. Utilisez la commande help pour obtenir
  une description sommaire des commandes.


  66..11..  LLaa ccoommmmaannddee hheellpp

  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.





  NNoottee :: la commande bootopt n'apparaît que pour les systèmes AlphaPC64
  (et équivalents).


  PPéérriipphhéérriiqquueess.. Jusqu'à ce que vous utilisiez une commande qui
  nécessite l'utilisation d'un des périphériques, aucune initialisation
  n'est réalisée sur ces derniers. La première commande show, ls, boot
  ou run provoquera l'initialisation des périphériques. Les pilotes de
  périphériques portent exactement les mêmes noms que ceux de Linux.
  Donc le premier disque IDE sera appelé hda et la première partition
  sera hda1. Utilisez la commande show pour obtenir une liste des
  périphériques disponibles.


  SSyyssttèèmmeess ddee ffiicchhiieerrss.. MILO est compatible avec trois différents types
  de systèmes de fichiers : MSDOS, EXT2 et ISO9660. À partir du moment
  oû un périphérique est disponible pour lui, MILO est à même de charger
  et d'exécuter n'importe quelle image disponible. Le système de
  fichiers par défaut est EXT2. Toutes les commandes utilisant les
  systèmes de fichiers permettent d'en préciser 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:





  VVaarriiaabblleess.. MILO contient quelques variables qui aident au processus de
  démarrage. Si vous démarrez à partir de la console ARC, MILO utilisera
  les variables d'environnement définies par ce firmware. Pour certains
  systèmes (tels que l'AlphaPC64), MILO dispose de son propre jeu de
  variables qui ne changent pas d'un démarrage à 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 définir de
  valeur délai (AUTOBOOT_TIMEOUT) car MILO démarrera après avoir attendu
  0 seconde. Ce n'est peut-être pas ce que vous souhaitez.


  PCI_LATENCY représente le nombre de cycles PCI qu'un périphérique
  fonctionnant en bus master se réserve lorsqu'il acquiert le contrôle
  du bus. La valeur par défaut est de 32 et la maximum de 255. Définir
  une valeur élevée revient à dire que chaque fois qu'un périphérique
  prend le contrôle du bus PCI, il transfèrera plus de données.
  Cependant cela signifie aussi qu'un périphérique devra attendre plus
  longtemps pour obtenir le contrôle du bus.


  66..22..  DDéémmaarrrraaggee ddee LLiinnuuxx

  La commande boot charge et démarre un noyau Linux à partir d'un
  périphérique. Vous aurez besoin d'avoir un disque contenant ce noyau
  (SCSI, IDE, disquette dans un format reconnu par MILO). Ces images
  peuvent être compressées à l'aide de gzip ; les premières versions de
  MILO reconnaissaient ces fichiers à l'aide de leur extension '.gz',
  tandis que les plus récentes font appel à la signature du fichier.


  Il est important de retenir que la version de MILO ne nécessite pas de
  correspondance avec celle du noyau Linux que vous souhaitez charger.
  Vous démarrez Linux avec la commande suivante :



  MILO> boot [-t file-system] device-name:file-name \
             [[boot-option] [boot-option]...]





  device-name représente le nom du périphérique que vous souhaitez
  utiliser, file-name le nom de fichier de l'image à charger en mémoire.
  Tous les arguments spécifiés par la suite sont directement transmis au
  programme exécuté (ici le noyau Linux).


  Si vous installez Linux Red Hat pour Alpha vous devrez spécifier un
  périphérique racine (root device) et autres options :



       MILO> boot fd0:vmlinux.gz root=/dev/fd0 load_ramdisk=1





  MILO contient automatiquement les périphériques en mode bloc
  configurés 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 même important
  d'attribuer un ID SCSI raisonnable à votre contrôleur SCSI. Par défaut
  MILO l'initialisera à la valeur maximale (7) qui, en principe, devrait
  fonctionner correctement. Néanmoins, si vous le souhaitez, vous pouvez
  spécifier l'ID SCSI de votre N-ième contrôleur SCSI en définissant la
  variable SCSI_n_HOSTID ; par exemple pour préciser que l'ID SCSI du
  contrôleur numéro 0 est 7 utilisez la commande suivante :



       setenv SCSI0_HOSTID 7





  66..33..  RReeddéémmaarrrraaggee ddee LLiinnuuxx

  Vous pouvez vouloir redémarrer Linux à l'aide de la commande shutdown
  -r now. Dans ce cas, le noyau Linux repasse le contrôle à MILO (par
  une instruction HALT CallPAL entrypoint). MILO laisse une version de
  lui-même compressée en mémoire pour cette seule raison et détecte que
  le système est redémarré par le biais du HWRPB (Hardware Restart
  Parameter Block). Dans ce cas vous pouvez  edémarrer à l'aide de la
  même commande qui vous a servi au démarrage précédent. Il y a un délai
  de 30 secondes qui vous permet d'interrompre ce processus et de
  démarrer n'importe quel autre noyau de n'importe quelle autre manière.


  66..44..  LLaa ccoommmmaannddee ''''bboooottoopptt''''

  Pour les systèmes utilisant la mémoire flash comme les AlphaPC64,
  EB164 et EB66+, il existe différentes options de démarrage. Celles-ci
  sont modifiables à l'aide de la commande bootopt. Cette commande a un
  unique argument : il s'agit d'un nombre décimal qui représente le type
  d'image à exécuter au prochain redémarrage de la machine (Allumage /
  Extinction ou Reset).


  La valeur 00 active le Debug Monitor, 11 active la console ARC.


  Ce chiffre correspond en fait à la N-ième image présente dans la PROM.
  Afin d'indiquer que l'action à effectuer est le démarrage, il faut
  ajouter 128 à ce chiffre pour obtenir la valeur à transmettre à
  bootopt. Vous aurez donc la commande suivante (sachant que MILO est la
  3ème image en PROM) :



       MILO> bootopt 131




  Note : Soyez très vigilant avec cette commande, une bonne règle est de
  ne jamais utiliser la valeur 0 (Debug Monitor), mais utilisez plutôt
  le système des jumpers pour obtenir ce résultat.


  77..  EExxééccuuttiioonn dduu ggeessttiioonnnnaaiirree ddee mméémmooiirree ffllaasshh

  La commande run est utilisée pour exécuter le gestionnaire de mémoire
  flash. Avant de démarrer, vous devrez disposer d'un périphérique
  accessible par MILO contenant le programme updateflash. Celui-ci
  (comme vmlinux) peut être compressé avec gzip. Vous devez exécuter ce
  programme à l'aide de la commande suivante :



       MILO> run fd0:fmu.gz





  Une fois chargé et initialisé, le gestionnaire de mémoire flash vous
  donnera quelques informations concernant le périphérique 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 systèmes qui permettent la sauvegarde de variables
  d'environnement et qui disposent de plus d'un bloc de mémoire flash
  (par exemple l'AlphaPC64), le gestionnaire de mémoire flash cherchera
  un bloc disponible pour la sauvegarde des variables d'environnement de
  MILO. Si un tel bloc existe, le gestionnaire de mémoire flash vous
  indiquera son emplacement. Dans le cas contraire, vous devrez utiliser
  la commande environment pour définir un bloc et l'initialiser. Dans
  l'exemple ci-dessus le bloc numéro 12 de la mémoire flash renferme les
  variables d'environnement de MILO.


  77..11..  LLaa ccoommmmaannddee ''''hheellpp''''



       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 systèmes EB66+, EB164, PC164 et AlphaPC64 (ainsi que leur
  clones).


  77..22..  LLaa ccoommmmaannddee ''''lliisstt''''

  La commande ''list'' affiche les informations sur l'utilisation de la
  mémoire flash. Pour les systèmes 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>





  77..33..  LLaa ccoommmmaannddee ''''pprrooggrraamm''''

  Le gestionnaire de mémoire flash contient une copie compressée d'une
  image flash de MILO. Cette commande vous permet de sauvegarder cette
  image dans la PROM. La commande vous permet de revenir en arrière,
  mais avant de l'utiliser vous devriez utiliser la commande list pour
  définir où il faut mettre MILO. Si MILO est déjà dans la mémoire
  flash, le gestionnaire de mémoire 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 extrêmement prudent lorsque vous effectuez ce genre de
  manipulation. Une très bonne règle à respecter est de ne jamais
  effacer le Debug Monitor.


  77..44..  LLaa ccoommmmaannddee ''''eennvviirroonnmmeenntt''''

  Cette commande détermine quel est le bloc qui recevra les variables
  d'environnement.


  77..55..  LLaa ccoommmmaannddee ''''bboooottoopptt''''

  Il s'agit de la même commande que celle de MILO (Section ``La commande
  ''bootopt'''').


  77..66..  LLaa ccoommmmaannddee ''''qquuiitt''''

  Cette commande n'a que peu de sens, car la seule manière possible pour
  se retrouver sous MILO est de redémarrer le système.


  88..  RReessttrriiccttiioonnss

  Malheureusement la perfection n'étant pas de ce monde, il existe des
  restrictions auxquelles il faut se plier.


  MILO n'est pas conçu pour charger d'autres systèmes d'exploitation que
  Linux, cependant il peut charger et exécuter des images dont
  l'exécution est possible au même emplacement mémoire que Linux (c'est
  à dire : 0xFFFFFC0000310000). C'est ce qui permet au gestionnaire de
  mémoire flash de fonctionner.


  Les sources du PALcode contenues dans miniboot/palcode/_t_o_t_o sont
  correctes, mais ce PALcode est problématique lorsqu'il est compilé
  avec la dernière version de gas.  Problème qui n'existe pas avec
  l'ancien exécutable gas fourni avec les cartes d'évaluation. J'essaie
  actuellement de trouver quelqu'un capable de résoudre ce problème.
  Pour l'instant, j'ai fourni un PALcode précompilé pour les cartes
  supportant MILO et David Mosberger-Tang a une version de gas corrigée
  sur son site ftp.
  99..  DDééppaannnnaaggee

  Voici un ensemble de problèmes courants que certaines personnes ont
  rencontrés ; vous trouverez, ensuite, leur solution.


  LLeeccttuurree ddee ddiissqquueess DDOOSS ddeeppuuiiss llee DDeebbuugg MMoonniittoorr..

  Quelques versions du Debug Monitor (pré-version 2.0) ont un problème
  avec le gestionnaire DOS généré à partir de Linux. Ce problème se
  manifeste de la manière 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 différence entre le système de fichiers DOS tel que
  l'attend le Debug Monitor et l'implémentation de DOSFS sous Linux.
  Afin de résoudre ce problème, 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
  opérations suivantes sur une machine DOS :



       copy a:MILO.cab c:
       copy c:MILO.cab a:
       del c:MILO.cab





  Et réessayez de démarrer depuis cette disquette. Cela devrait résoudre
  le problème.


  MMiilloo aaffffiicchhee uunnee sséérriiee ddee O> eett nn''aacccceeppttee ppaass ddee ccoommmmaannddeess..  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 déboguer,
  mais pas tant que ça si vous avez un périphérique autre qu'un terminal
  série connecté.  Si cela arrive, déconnectez le périphérique attaché
  au port COM1 ou mettez-le hors tension jusqu'à ce que le noyau Linux
  ait démarré. À ce stade tout devrait fonctionner correctement.


  MMIILLOO ssee ppllaaiinntt ddee ccee qquuee ll''iimmaaggee dduu nnooyyaauu ppoossssèèddee uunn mmaauuvvaaiiss

  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 récente 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.


  MMIILLOO aaffffiicchhee ""......ttuurrnniinngg oonn vviirrttuuaall aaddddrreessssiinngg aanndd jjuummppiinngg ttoo tthhee
  LLiinnuuxx KKeerrnneell"" ppuuiiss rriieenn nnee ssee ppaassssee..

  Une des causes possibles est que l'image du noyau est configurée de
  manière incorrecte ou qu'elle a été produite pour un autre type de
  machine Alpha. Une autre possibilité est que la carte vidéo 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 série ou alors d'essayer le noyau qui était
  livré avec votre distribution Linux.
  MMIILLOO nnee rreeccoonnnnaaîîtt ppaass lleess ppéérriipphhéérriiqquueess SSCCSSII..

  L'image standard de MILO comporte autant de pilotes de périphériques
  qu'il en existe de stables pour Alpha (au moment de la rédaction de ce
  manuel il contient les pilotes pour : NCR810, QLOGIC ISP, Buslogic et
  Adaptec 294x/394x). Si votre carte n'est pas supportée c'est peut-être
  que le pilote n'est pas encore suffisamment stable sur plate-forme
  Alpha. Vous pouvez obtenir la liste des périphériques SCSI supportés
  par une image MILO avec la commande show.


  1100..  RReemmeerrcciieemmeennttss

  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 débogages ;

  ·  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-même, faites-le moi savoir :
  david.rusling@reo.mts.dec.com <mailto:david.rusling@reo.mts.dec.com>,
  afin de ne pas développer deux fois la même chose.


  Pour finir, un grand merci à Digital pour le développement 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 décrit le matériel, les logiciels et les procédures à
  suivre pour créer et écouter des fichiers son _M_P_3 sous Linux.
  ______________________________________________________________________

  Table des matières


  1. Introduction

  2. Copyright

  3. Où trouver ce document

  4. Remerciements

     4.1 Dénégation

  5. Matériel nécessaire et influence sur les performances

  6. Logiciels nécessaires

  7. Configuration du système

     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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document décrit le matériel, les logiciels et les procédures à
  suivre pour créer et écouter des fichiers son _M_P_3 sous Linux.


  22..  CCooppyyrriigghhtt

  Ce HOWTO est © Philip Kerr, 1999.

  Sauf indication contraire, les droits d'auteur des HOWTO Linux sont
  détenus par leurs auteurs respectifs. Les HOWTO Linux peuvent être
  reproduits et distribués, en totalité ou en partie, sur tout média
  physique ou électronique dans la mesure où ce copyright est préservé
  dans chaque copie. La distribution commerciale en est autorisée et
  encouragée. L'auteur apprécierait toutefois qu'on lui notifie
  individuellement ce genre de distribution.

  Le présent copyright doit couvrir toute traduction, compilation et
  autre travail dérivé des HOWTO Linux. C'est-à-dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au delà du présent
  copyright à des ouvrages inspirés, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions à ces règles
  seront tolérées : contactez le coordinateur des HOWTO à l'adresse
  donnée ci-dessous.

  Pour résumer, nous souhaitons une diffusion aussi large que possible
  de ces informations. Néanmoins, nous entendons garder la propriété
  intellectuelle (copyright) des HOWTO, et apprécierions d'être informés
  de leur redistribution.

  Pour toute question plus générale, merci de contacter le coordinateur
  des HOWTO, Tim Bynum, à l'adresse électronique linux-
  howto@metalab.unc.edu.


  33..  OOùù ttrroouuvveerr ccee ddooccuummeenntt

  La dernière version officielle de ce document se trouve sur le site du
  Linux Documentation Project  <http://metalab.unc.edu/LDP/>. La
  dernière version française se trouve à
  <http://www.freenix.org/linux/HOWTO/>.


  44..  RReemmeerrcciieemmeennttss

  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
  réfère:

  ·  _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


  44..11..  DDéénnééggaattiioonn

  Vous utilisez les informations contenues dans ce document à vos
  propres risques. Nous déclinons toute responsabilité quant à son
  contenu.  L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entièrement à vos propres risques.

  Tous les droits sont détenus par leurs propriétaires 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 particulière ne constitue
  pas une adhésion.

  Il est fortement conseillé d'effectuer une sauvegarde de votre système
  avant une installation importante ainsi qu'à intervalles réguliers.


  55..  MMaattéérriieell nnéécceessssaaiirree eett iinnfflluueennccee ssuurr lleess ppeerrffoorrmmaanncceess

  Le traitement de son numérique est une tâche qui demande beaucoup de
  ressources, notamment en termes de puissance de calcul et
  d'entrées/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 résultats. La différence 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'après 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 récemment 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 données: si vous
  partez de déchets, vous obtiendrez des déchets.

  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 système basé sur
  de l'IDE, le mode 4 ou l'UDMA sont préferables, dans la mesure où ils
  ont un débit presque acceptable.

  La solution idéale reste un système à base de SCSI, dont les disques
  et les interfaces ont un bien meilleur débit, 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 crêtes, les débits moyens seront plus faibles. Si vous
  pouvez trouver ou vous offrir un disque SCSI AV, allez-y. Les disques
  AV ont des têtes de lecture/écriture optimisées pour les transferts
  continus de données; les autres disques SCSI et IDE ne peuvent
  normalement soutenir un transfert de données car leurs têtes chauffent
  trop !

  Naturellement, un disque équipé de cache donnera des résultats plus
  homogènes, vu que le cache peut servir de tampon lorsque les têtes se
  déplacent ou ne peuvent pas soutenir le débit.

  Si votre disque n'est pas à la hauteur, vos enregistrements seront
  parsemés de coupures et d'erreurs lorsque le disque n'arrivera pas à
  enregistrer le signal. Si vous enregistrez des événements uniques,
  comme des concerts, investissez dans un bon système disque SCSI.

  Une charge système élevée peut aussi causer des coupures dans des
  enregistrements d2d. Des tâches de fond peuvent momentanément occuper
  le système. Il vaut mieux réduire les services au minimum vital,
  particulièrement les services réseau. Pour plus d'informations à
  propos des services réseau et des scripts de démarrage, reportez-vous
  au _S_A_G et au _N_A_G.

  La pagination de la mémoire virtuelle peut aussi provoquer des
  erreurs, donc mettez le plus de mémoire physique possible. Je
  recommande au moins 32 Mo, mais vous pouvez avoir besoin de plus.

  Pour ceux qui veulent tirer le maximum de leur système, optimiser le
  noyau ne fera probablement pas de mal.

  Alors que le matériel ci-dessus vous donnera un système acceptable
  pour encoder des données sonores, ne négligez pas l'emploi de matériel
  plus ancien et moins performant si c'est tout ce à quoi vous avez
  accès.

  La configuration d'un système bas de gamme pour donner de bons
  résultats sera un défi intéressant pour un administrateur système, et
  le résultat sera probablement une machine Linux plus heureuse.

  Un autre point important est la connectique. Des cãbles 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 plaqués or aideront aussi à
  obtenir un son de bonne qualité. Enfin, séparez bien les câbles audio
  des câbles transmettant d'autres données pour éviter les risques
  d'interférences.


  Mais n'oubliez pas, une fortune dépensée en câbles sera perdue si le
  reste du système n'est pas optimisé.

  Pour encoder des MP3 depuis un CD-ROM, la vitesse et le type du
  lecteur déterminent le temps nécessaire à 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'entrée ligne de la carte son.

  Pour des informations détaillées sur la configuration des cartes son,
  lisez le _S_o_u_n_d_-_H_O_W_T_O.


  66..  LLooggiicciieellss nnéécceessssaaiirreess

  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, déterminera les logiciels nécessaires à la
  production du fichier WAV.

  Si vous voulez enregistrer depuis une source sonore, vous aurez besoin
  d'un programme pour lire les données sur l'entrée 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 téléchargé
  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.



  77..  CCoonnffiigguurraattiioonn dduu ssyyssttèèmmee

  Cette section décrit 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 système Intel sous Red Hat 5.2, mais cette
  section devrait être raisonnablement indépendante de la distribution
  utilisée. Je traiterai prochainement de la plate-forme Sparc. Si ce
  HOWTO vous est utile avec d'autres types de matériel, 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 décrivent l'art et la manière de configurer le son sous
  Linux beaucoup mieux que je ne saurais le faire.


  77..11..  CCoonnffiigguurraattiioonn ppoouurr llaa ccaappttuurree dd''uunnee ssoouurrccee aannaallooggiiqquuee

  Pour commencer, configurez votre équipement audio. Il existe de
  multiples façons d'amener le son jusqu'à votre machine Linux. Voici
  les plus communes :

  Sortie ligne vers entrée ligne. La plupart des appareils audio ont une
  sortie ligne. Le niveau ligne est un standard précisant 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
  récentes peuvent utiliser l'autre. La différence ne devrait pas être
  trop importante si vous n'enregistrez pas à un volume très important.

  La sortie ligne est généralement utilisée 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 problème. Les tourne-disques peuvent être plus
  embêtants; voir ci-dessous pour en savoir plus.

  Vous pouvez aussi capturer du son depuis un magnétoscope. La plupart
  des magnétoscopes ont une sortie ligne, ou vous pouvez obtenir un
  signal au niveau ligne depuis une prise péritel si votre magnétoscope
  en est équipé.

  Sortie d'amplificateur vers entrée ligne, sortie ligne vers entrée
  cassette sur l'amplificateur. Essentiellement, vous remplacez la
  platine cassette reliée à votre ampli hi-fi par votre système Linux.
  Le lien entre la sortie ligne et l'entrée de l'ampli permet de
  contrôler le niveau de l'enregistrement.

  Micro sur entrée micro. Le courant généré par un microphone est
  beaucoup plus faible que le niveau ligne. Si vous branchez votre micro
  sur votre entrée 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'entrée micro, peut endommager votre carte son !

  Tourne-disques sur entrée micro. Hélas, je ne dispose pas
  d'informations à ce sujet pour le moment. Si je me souviens bien, le
  tourne-disques devrait être branché sur l'entrée micro, vu qu'il
  utilise un mécanisme similaire et des courants comparables.

  Les claviers et synthés doivent être branchés sur l'entrée ligne, et
  les guitares sur l'entrée ligne via une boîte de direct (DI box,
  utilisée 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 tournés vers les haut-parleurs.


  77..22..  CCoonnffiigguurraattiioonn ppoouurr ll''eexxttrraaccttiioonn ddee ssoonn ddeeppuuiiss uunn CCDD

  Configurer votre système 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.


  77..33..  CCoonnffiigguurraattiioonn aaddddiittiioonnnneellllee

  Logez-vous normalement sur votre système, puis utilisez un programme
  mixeur pour regler des niveau d'enregistrement assez forts pour avoir
  un son décent, mais pas trop pour éviter la distorsion. Normalement,
  j'évalue ça à l'oreille ; après quelques temps, vous connaîtrez le
  meilleur niveau pour votre système.

  Je recommande ou bien d'arrêter tous les services non indispensables,
  ou bien de passer en mode utilisateur seul, en particulier si vous
  enregistrez depuis une source extérieure. Cela assure que seuls un
  nombre minimum de services fonctionnent, et donc que les erreurs
  d'enregistrement sont réduites au minimum.

  J'ai réservé un disque SCSI à l'enregistrement du son. J'y ferai
  référence comme /mnt/mp3. J'ai fait cela principalement pour le gain
  de performances apporté par un disque SCSI. De plus, enregistrer sur
  un disque séparé, dont vous savez que la tête ne va pas tout à coup se
  déplacer à l'autre bout du disque pendant que vous êtes en train
  d'enregistrer, est une Bonne Chose. :-)

  Pour les détails de la configuration d'un système 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.


  88..  EEnnccooddaaggee ddeeppuuiiss uunnee ssoouurrccee aauuddiioo

  Premièrement, assurez-vous que vous avez suffisamment de place sur
  votre disque dur. Pour un enregistrement de qualité CD (44,1 kHz,
  16 bits, stéréo), une minute prend près de 5 Mo.

  En général, j'enregistre avec une qualité DAT, 48 kHz, 16 bits,
  stéréo.

  Avec wavrec, j'utilise la syntaxe suivante:



       /usr/local/bin/wavrec -t 60 -s 48000 -S /mnt/mp3/temp.wav




  La première partie est le chemin d'accès explicite de wavrec. le -t 60
  précise la durée de l'enregistrement en secondes. l'option -s 48000
  donne la fréquence d'échantillonnage en bits/s (la fréquence du DAT
  est 48000, celle du CD, 44100). La dernière option indique le fichier
  de sortie.

  Pour voir la liste complète 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 précise la fréquence. En l'occurrence, je l'ai reglée au
  maximum: 256 kbits/s. Le chemin d'accès de bladeenc peut aussi être
  différent sur votre système 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.


  99..  EEnnccooddaaggee ddeeppuuiiss uunn lleecctteeuurr ddee CCDD--RROOMM

  Là encore, vérifiez 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] [répertoire cible]\n\n";
       }
       ______________________________________________________________________




  La ligne intéressante est



       $cdcap = system("cdparanoia", $count, "/mnt/mp3/tmp/cdda.wav");




  Cette ligne appelle l'extracteur de CD audio, cdparanoia, qui
  convertit les données brutes extraites d'un CD en fichier WAV.

  Les options sont $count (le nombre de pistes à extraire), puis le
  chemin d'accès des fichiers WAV produits. Dans mon exemple, il d'agit
  d'un répertoire tmp sur mon disque réservé 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 séparément, 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 très simple et ne s'embarrasse pas de
  détails comme la récupération d'erreurs. Vous êtes libre de
  l'améliorer. :-)


  1100..  LLiirree ddeess MMPP33

  Maintenant, vous devriez avoir quelques fichiers MP3 prêts à lire.

  Les deux lecteurs MP3 les plus appréciés sous Linux sont Xaudio et
  xmms (anciennement x11amp). J'ai donné des liens vers leurs sites web
  dans la section ``Logiciels nécessaires''.

  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 intéressants pour nous sont xaudio et
  mxaudio.

  Après l'avoir installé sur votre système, vous avez le choix entre
  utiliser la version en ligne de commande xaudio ou la version X
  mxaudio.

  L'interface de mxaudio est agréable 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 répertoire, xaudio *.mp3.

  Les deux programmes sont accompagnés de fichiers README.


  1111..  RReettoouurrss

  De nouveaux matériels et logiciels sortent sans cesse. Si vous
  utilisez des versions plus récentes du matériel et/ou des logiciels
  décrits 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 française par Gacquer Frédéric gacquer at neuronnex­
  ion.fr) 15 juin 1998 V 0.9 (Puis relu par ...)
  Janvier 1998

  Ce document décrit 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 système ou avec d'autres sites.
  ______________________________________________________________________

  Table des matières



















































  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 limitée

  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 Matériel
     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 répertoire
     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 Définir un agent de courriel local
     5.4 Les tables dbm de sendmail+IDA
     5.5 Bon quelles entrées sont vraiment nécessaires ?
     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 Récupérer 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




  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn,, ccooppyyrriigghhtt eett aavveerrttiisssseemmeenntt ((DDiissccllaaiimmeerr))



  11..11..  LLee ccoouurrrriieerr éélleeccttrroonniiqquuee eett llee ccoouurrrriieerr nnoonn ssoolllliicciittéé ((ssppaammmmiinngg))


  Premièrement, 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 empêcher
  les généreux collaborateurs d'être spammés !


  11..22..  OObbjjeeccttiiff


  Le but de ce document est de répondre à quelques questions et
  commentaires et correspond à la définition de la "Foire Aux
  Questions", sur les logiciels de courriel sous Linux en général, et la
  version des distributions Linux Debian et Redhat en particulier.


  11..33..  NNoouuvveelllleess vveerrssiioonnss

  Les nouvelles versions de ce document seront régulièrement postées sur
  comp.os.linux.announce, comp.answers et mail.answers. Ils seront
  ajoutés dans plusieurs sites ftp anonymes qui archivent en particulier
  ces documents, notamment sunsite.unc.edu:/pub/Linux/docs/HOWTO.

  De plus, vous pourrez en général trouver ce document à la page
  d'accueil de Linux WorldWideWeb à
  <http://sunsite.unc.edu/mdw/linux.html>.


  11..44..  VVooss iimmpprreessssiioonnss

  Vos impressions, par courriel, concernant ce document m'intéressent,
  qu'elles soient positives ou négatives. Précisément, contactez moi si
  vous trouvez des erreurs ou d'évidentes omissions.

  Je lis, mais ne réponds pas forcément, à tous les courriels que je
  reçois. Les demandes d'amélioration seront examinées et prises en
  compte selon la formule du temps disponible, l'intéret de la demande
  et ma pression artérielle du jour :-)

  Les remarques désobligeantes, courriels incendiaires (flames) iront
  gentimment dans /dev/null donc pas de problème.

  Les remarques concernant le format en cours doivent être adressées au
  coordinateur du HOWTO : Greg Hankins (gregh at sunsite.unc.edu).


  11..55..  CCooppyyrriigghhtt

  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.




  11..66..  GGaarraannttiiee lliimmiittééee

  Bien sûr, je désavoue tout responsabilité pour le contenu de ce
  document.  L'utilisation des concepts, exemples, et/ou autre contenu
  de ce document est entièrement à votre risque.


  22..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn


  22..11..  UUSSEENNEETT

  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 générique comp.os.linux.*.

  Ne postez pas dans la hiérarchie de comp.os.linux sauf si c'est
  réellement 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'exécute".

  Laisser moi le redire.

  Dorénavant il n'y a virtuellement aucune raison de poster quoi que ce
  soit, de relatif au courriel, dans la hiérarchie comp.os.linux. Il
  existe des forums de discussion dans la hiérarchie comp.mail.* qui
  répondront à *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 générales à propos du courrier
     électronique.

  ·  comp.mail.multi-media   Le courrier électronique multimédia.

  ·  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.


  22..22..  LLeess lliisstteess ddee ddiiffffuussiioonn

  Il existe plusieurs listes de diffusion sendmail, smail et qmail.


  Vous trouverez les adresses dans /usr/doc/celuiquevousavezchoisi.


  22..33..  LLeess aauuttrreess ddooccuummeennttss ddee LLDDPP..

  Il y a plusieurs éléments 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 système dans /usr/doc/smail ou /usr/doc/sendmail
     :-)

  ·  Le Guide d'Administration Réseau de Linux.

  ·  Le HOWTO Communication Série

  ·  Le HOWTO Ethernet

  ·  Le HOWTO UUCP si vous êtes alimenté via UUCP.


  22..44..  LLiivvrreess

  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 résoudre les programmes et les
     protocoles impliqués dans un site USENET.

  ·  "Unix Communications" de 'The Waite Group' contient bonne une
     description de tous les éléments (et plus) et comment ils
     s'imbriquent.

  ·  "Sendmail" de O'Reilly and Associates semble être la référence la
     plus complète sur Sendmail-v8 et sendmail+IDA. C'est un
     incontournable pour quiconque souhaite comprendre sendmail sans
     perdre son calme. Il existe en version française sous le titre
     "Sendmail seconde édition" (NDT).

  ·  "The Internet Complete Reference" d'Osborne est livre de référence
     détaillé qui explique les services variés 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 française
     sous le titre "Guide d'administration réseau sous linux" (NDT).



  33..  CCoonnffiigguurraattiioonn rreeqquuiissee

  33..11..  MMaattéérriieell

  Il n'y a pas de configuration matérielle spécifique pour le courriel
  sous Linux.

  Vous aurez besoin d'un quelconque logiciel de 'transport' pour vous
  connecter à des systèmes 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 général, vous voudrez
  une UART 16550 sur votre carte série ou implémentée dans votre modem
  pour gérer les vitesses supérieures à 9600 baud.

  Si vous ne voyez ce que signifie cette dernière phrase, veuillez
  consultez le groupe comp.dcom.modems ou les différentes excellentes
  FAQ (Foire Aux Questions) sur les modems et les communications séries.
  Ainsi que les courriels postés sur USENET.

  33..22..  LLooggiicciieellss

  Bon, le problème est là. Que pouvons nous faire avec les logiciels de
  courrier électronique ?

  ·  Nombre de sites

     Alimenter à plus de 100 sites avec des options compliquées pour les
     noms de domaines ? Prendre sendmail !

     Alimenter à moins de 100 sites sans avoir à trop jouer avec les
     noms de domaines ?  Prendre smail !

  ·  Sécurité

     Alimenter à plus ou moins 100 sites mais avec une sécurité élevée ?
     Prendre qmail !

     Alimenter moins de 100 sites mais avec un niveau normal de sécurité
     ? Prendre smail !

  ·  Différentes manières 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 sûr, 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 compliquées, qmail est parfait pour
  une sécurité élevée ; l'intermédiaire 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 général smail.

  44..  SSmmaaiill vv33..11

  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 sûr.

  44..11..  CCoonnffiigguurreerr ssmmaaiill

  Installez les binaires smail à partir de votre distribution (je vous
  recommande cette façon) ou récupérez 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 différente si vous utilisez
  d'anciennes distributions) ; Editons les !


  44..22..  LLee ffiicchhiieerr ccoonnffiigg




              # 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 définir
  "-transport_file" pour indiquer que vous n'en avez pas besoin.

  Vous pouvez aussi utiliser "postmaster_address = votrenom", cacher la
  topologie du réseau pour les adresses sortantes (si vous êtes une
  passerelle) en utilisant "visible_name", positionner quelle adresse
  d'alias pourra aussi être utilisée pour le courriel que vous recevez,
  en utilisant "more_hostnames".

  Lire la documentation smail pour plus de détails ou les exemples dans
  /usr/doc/smail/examplespour voir si l'un d'eux correspond à votre
  situation.


  44..33..  LLee ffiicchhiieerr ddiirreeccttoorrss



















    # aliasinclude - développe les adresses ":include:filename" produite par les fichiers
    # alias.
    # Cette entrée et la suivante sont du réchauffé. Les raisons
    # d'un changement significatif sont mineures. Leur unique raison est
    # de reconnaitre et de développer 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 spécial
            nobody;                         # associer l'utilisateur nobody avec les adresses
                                            #  si violation de permissions moyenne (???)
                                            # sont rencontrées
            copysecure,                     # prendre les permissions du directeur alias
            copyowners,                     # prendre le droit propriétaire du directeur alias

    # forwardinclude - développe les adresses ":include:filename" produites
    # par les fichiers forward
    forwardinclude:
            driver = forwardinclude,        # utiliser ce pilote pour cas spécial
            nobody;
            copysecure,                     # prendre les permissions du directeur forwarding
            copyowners,                     # prendre le droit propriétaire du directeur
                                            #  forwarding

    # aliases - cherche à développer les alias stockés dans la base de donnée
    # 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,
    # créer quelques petits systèmes de développement d'alias, ou autres. Dans
    # cette configuration de site, le fichier aliases est utilisé principalement
    # pour des informations d'aliases/forwarding liés aux machines. Les informations générales
    # pour faire suivre le courrier doivent être mises dans la base de donnée "forward".
    aliases:
            driver=aliasfile,               # directeur d'alias généraliste
            -nobody,                        # toutes les adresses sont associés à nobody
                                            # par défaut, donc mettre l'option
                                            # n'est pas trés utile.
            sender_okay,                    # ne pas enlever l'expéditeur lors des
                                            # développements d'adresses.
            owner=owner-$user;              # les problèmes vont à une adresse propriétaire
            file=/etc/aliases,
            modemask=002,                   # l'accès en écriture ne doit pas être autorisé à tous
            optional,                       # ignore si le fichier n'existe pas
            proto=lsearch,                  # fichier ASCII non trié.

    # forward - chercher à développer selon le contenu de la base forwarding
    # C'est la base de forwarding utilisateur pour un grand sous-domaine.
    # Les entrées sont gardées ici pour les utilisateurs en cours ou passé,
    # pour faire suivre leur courrier à leur machine préférée. La base forward
    # est installée sur la couche réseau TCP/IP lors des changements, pour
    # garder le réseau consistent.
    #forward:
    #       driver = aliasfile,             # Directeur d'alias généraliste
    #       -nobody,                        # toutes les adresses sont associés à nobody
    #                                       # par défaut, donc mettre l'option
    #                                       # n'est pas trés utile.
    #       owner = real-$user;             # les problèmes vont à une adresse propriétaire
    #
    #       file = /etc/forward,
    #       modemask = 002,
    #       proto = dbm,                    # Utiliser la librairie dbm(3X) pour les accès.

    # dotforward - développe les fichiers .forward dans les répertoires personnels
    #  des utilisateurs.
    # Pour les utilisateurs qui ont une entrée dans la base "forward", un fichier
    # .forward n'est utilisé que sur la machine personnelle, comme identifiée
    # dans la base forward. Si c'est utilisé, c'est traité comme une liste d'adresse
    # indiquant à qui doit être envoyé les courriels, plutôt (ou en plus) qu'à
    # l'utilisateur référencé dans l'adresse locale.
    dotforward:
            driver = forwardfile,           # le directeur généraliste forwarding
            owner = postmaster, nobody, sender_okay;

            file = ~/.forward,              # Le fichier .forward dans le répertoire personnel
            checkowner,                     # l'utilisateur peut être propriétaire de ce fichier
            owners = root,                  # ou bien root
            modemask = 002,                 # Ne doit pas être accessible à tous en écriture
            caution = daemon:root,          # ne rien exécuter en tant que root ou daemon
            # être trés attentif aux accès à distance des répertoires utilisateurs (?)
            unsecure = "~uucp:/tmp:/usr/tmp:/var/tmp"

    # forwardto - développe le "Forward to " dans les fichiers boîtes aux lettres utilisateur
    # Cela émule le méchanisme du suivi de courrier V6/V7/System-V qui utilise
    # une ligne des adresses forward au début des fichiers boites aux lettres (BAL) utilisateur
    # avec comme préfixe la chaîne "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 propriétaire de ce fichier
            owners = root,                  # ou root
            modemask = 0002,                # sous System V, le groupe mail à la permission écrire
            caution = daemon:root           # ne rien exécuter sous root ou daemon

    # user - apparie un utilisateur sur l'hôte local et délivre le courrier
    # dans leur boîte 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 préfixés avec la chaîne "real-"
    # Trés utile pour permettre à une adresse de délivrer expllicitement dans
    # une BAL utilisateur. Par exemple, les erreurs dans le développement d'un fichier
    #.forward pourra être délivrer ici, ou des boucles de suivi de courrier entre
    # plusieurs machines peuvent être résolues en utilisant une adresse real-utilisateur.
    # Aussi, les utilisateurs ui souhaite utiliser le courriel comme moyen de transfert de
    # données vers une machine qui n'est pas leur machine personnelle peuvent envoyer un
    # courriel à real-nom-de-login@hôte-distant.
    real_user:
            driver = user;
            transport = local,
            prefix = "real-"                # par exemple, apparie real-root

    # lists - développe les listes de diffusion stockées dans le répertoire list
    # Les listes de diffusions peuvent être crées simplement en créant un fichier
    # dans le répertoire /etc/smail/lists.
    lists:  driver = forwardfile,
            caution,                        # transmet toutes les adresses avec précaution
            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 caractères.
            file = lists/${lc:user}         # Les listes sont sous $smail_lib_dir

    # owners - développe les listes de diffusion stockées dans le répertoire list owner.
    # Les listes de diffusion listes propriétaires peuvent être simplement crées en
    # créant un fichier dans le répertoire /etc/smail/lists/propriétaire. Les listes de
    # diffusion propriétaires sont envoyées localement, les erreurs générées s'arrangent
    # avec la liste de diffusion du même nom. Pour créer une liste propriétaire pour une
    # liste de diffusion,  créer un fichier avec le nom de la liste dans
    # /etc/smail/lists/propriétaire. Cela va créer une adresse de liste de nom
    # propriétaire-nom_de_liste, comme utilisée par le directeur "lists" plus haut.
    owners: driver = forwardfile,
            caution,                        # transmet toutes les adresses avec précaution
            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 caractères.
            prefix = "owner-",
            file = lists/owner/${lc:user}   # Les listes sont sous $smail_lib_dir

    # request - développe les listes de diffusions stockées dans un répertoire de liste
    # de requête. Les listes de diffusion listes de requête peuvent être crées simplement
    # en créant un fichier dans le répertoire /etc/smail/lists/request. Les adresses requête
    # sont utilisées typiquement comme adresse standard pour les interrogations à propos
    # d'une liste de diffusion. Par exemple, les requêtes pour s'abonner ou se désabonner
    # d'une liste seront généralement envoyées à "list-request", qui devra être configurée
    # pour faire suivre le courrier à la ou les personnes appropriées.
    request: driver = forwardfile,
            caution,                        # transmet toutes les adresses avec précaution
            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 caractères.
            suffix = "-request",
            file = lists/request/${lc:user} # les listes sont sous $smail_lib_dir





  44..44..  LLee ffiicchhiieerr ffiiddooppaatthhss

  Créez un tel fichier seulement si vous utilisez ifmail et FIDO.


  44..55..  LLee ffiicchhiieerr rroouutteerrss





























  # forces - forcer certains chemins d'accès
    # L'existence de cette base de donnée est un moyen de coder en dur les chemins des
    # diverses machines ou domaines. Utilisé pour créer des distorsions temporaires
    # des autres bases de données de routage (?). Pour changer la base, éditer le
    # fichier maps/force.path puis faire un "make" dans le sous-répertoire 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 forçage 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",       # spécifiquement, utilise le programme uuname
    #        domain=uucp                    # enlève le suffixe ".uucp"

    # smart_host - un directeur spécifique particulier d'hôte intelligent
    # Si l'attribut smart_path du fichier de configuration est défini comme
    # chemin entre l'hôte local et l'hôte distant, alors les noms d'hôtes
    # qui ne seraient pas reconnus sinon seront envoyées au ?. L'attribut
    # du fichier de configuration smart_transport peut être utilisé pour
    # indiquer un transport différent.
    # Si l'attribut smart_path n'est pas spécifié, ce routeur (?) est ignoré.
    smart_host:
            driver = smarthost,             # Pilote du cas spécial (?)
            transport = uux                 # Par défaut 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
  même coder en dur les chemins vers différentes machines ou domaines
  dans /etc/smail/maps/table.


  44..66..  LLee ffiicchhiieerr ttrraannssppoorrttss
















    # local - délivre le courriel aux utilisateurs locaux
    # Indique à smail d'ajouter directement dans les fichiers BAL dans le répertoire
    # /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;                 # insère > 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 sécurité accrue
    #       group = mail,            # groupe pour être propriétaire des fichiers pour System V
    #       mode = 0660,             # sous System V, le groupe mail doit pouvoir accéder
    #       suffix = "\n",           # ajouter un code nouvelle ligne supplémentaire
    #       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
    # séparées 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;                 # insère > avant From dans le corps

            cmd = "/usr/bin/procmail",      # utilise procmail pour délivrer 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,           # réessayer si un tube est cassé

    # pipe - délivre le courriel à des commandes shells.
    # Cela est utilisé implicitement quand smail rencontre des adresses commençant
    # avec un caractère barre verticale, comme "|/usr/lib/news/recnews talk.bizarre".
    # La barre verticale est enlevée 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 cassées.

    # file - délivrer le courrier dans des fichiers
    # Utilisé implicitement lorsque smail rencontre des adresses qui commencent
    # par un slash (/) ou un caractère 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,                    # développe ~ 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 délivrer à l'hôte 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 caractères d'adresses
    # le drapeau -r la livraison immédiate, des parenthèses autour de la variable
    # $user emp^eche l'interprétation des caractères spéciaux 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 cassés.
            umask = 0022,
    #       pipe_as_sender,

    # uux_one_addr - délivre le courrier par UUCP à un hôte distant qui ne peut
    #                prendre qu'une adresse à la fois.
    # Cela est souvent nécessaire quand on livre le courrier à un site qui
    # tourne sous une version non modifiée 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 empêche une livraison immédiate
            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,                      # exécute getmail sous "root"
            group=mail,                     # exécute 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 réseau 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 nécessaire de restreindre max_addrs à 100, puisqu'il
    #  s'agit de la limite inférieure dont a besoin l'implémentation SMTP pour
    # prendre en charge un message.

    smtp:   driver=tcpsmtp,
            inet,                           # si UUCP_ZONE n'est pas défini
    #       uucp,                           # si UUCP_ZONE est défini
            -max_addrs, -max_chars;         # pas de limite sur le nombre d'adresses

            short_timeout=5m,               # le timeout pour les opérations courtes
            long_timeout=2h,                # le timeout pour les opérations 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,                       # résoud 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'hôte 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 définissant les agents de transport
  (comme uux, smtp ...) vous pouvez les utiliser comme paramètres dans
  l'autre fichier config.

  A noter que j'ai commenté quelques parties, comme les "pipes" ou
  "file", pour améliorer la sécurité.


  44..77..  LLee rrééppeerrttooiirree mmaappss//

  Il contient les fichiers map et tables :

  Commençons 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 définir différent transport pour différents chemins, par
  exemple "smtp" pour vos machines dans votre réseau 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 "*"
  !).




  44..88..  DD''aauuttrreess bboonnss eexxeemmpplleess

  Les fichiers précédents sont ceux que j'utilise actuellement pour mon
  site, vous ne devriez rencontrer aucun problème 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 différentes façons.


























































  #ident "@(#) transports,v 1.2 1990/10/24 05:20:46 tron Exp"

    # Voir smail(5) pour une description complète du contenu de ce fichier

    # local - délivre le courrier aux utilisateurs nouveaux
    #
    # Indiquer à smail d'ajouter directement aux fichiers BAL utilisateur dans le
    # répertoire /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;                 # insère > avant From dans le corps

            file = /usr/mail/${lc:user},    # utiliser cet emplacement pour System V
            group = mail,                   # groupe propriétaire de fichier pour System V
            mode = 0660,                    # sous System V, le groupe mail a accès
            suffix = "\n",                  # ajoute à nouveau un retour chariot supplémentaire
            append_as_user,

    # pipe - délivre 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 enlevée de l'adresse avant d'être donnée 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 cassés

    # file - délivre du courrier dans des fichiers
    #
    # Ceci est utilisé implicitement quand smail rencontre des adresses qui commencent
    # avec un caractère 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,                    # développe ~ et $ dans l'adresse
            suffix = "\n",
            mode = 0644

    # uux - délivre au programme rmail pour un site UUCP distant
    #
    # Dans une transaction UUCP on peut délivrer à l'hôte 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 caractères pour l'adresse

            # le drapeau -r empeche une livraison immédiat, les parenthèses autour
            # de la variable $user empeche l'interprétation des caractères spéciaux par uux.
            cmd = "/usr/bin/uux - -r -g$grade $host!rmail $((${strip:user})$)",
            umask = 0022,
            pipe_as_sender
    # uux_one_addr - délivre le courrier à travers UUCP à un hote distant qui prends
    # une adresse à la fois
    #
    # Cela est souvent nécessaire lorsque l'on délivre du courrier à un site utilisant
    # une version non modifiée 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 immédiate
            cmd = "/usr/bin/uux - -r -g$grade $host!rmail (${strip:user})",
            umask = 0022, pipe_as_sender

    # demand - délivre à 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 immédaitement
            cmd = "/usr/bin/uux - -g$grade $host!rmail $(($user)$)",
            umask = 0022, pipe_as_sender

    # uusmtp - délivre à 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.
    # lève 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 immédiate, les adresses destinataires
      # sont stockées dans les données envoyées à l'entrée standard de smtp.
            cmd = "/usr/bin/uux - -r -g$grade $host!rsmtp",
            umask = 0022, pipe_as_sender

    # demand_uusmtp - délivre à 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 immédiatement
            cmd = "/usr/bin/uux - -g$grade $host!rsmtp",
            umask = 0022, pipe_as_sender

    # smtp - délivre 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 réseau BSD existe.


    # NOTE: il peut etre nécessaire de restreindre max_addrs à 100, puisque c'est la limite
    #       inférieure 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 utilisés pour livrer le courrier
    # à des hotes spécifiques à 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





  44..99..  RReellaanncceerr iinneettdd

  Pour exécuter smail en tant que démon 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.


  44..1100..  SSmmaaiill eett ssmmttpp

  Généralement, les fournisseurs d'accès (ISP) utilisent smtp, par
  conséquent vous ne devriez pas avoir de problème pour envoyer vos
  courriels. Si votre ligne internet est hors service lors de l'envoi de
  courriel, dans ce cas les courriels résident dans
  /var/spool/smail/input. Lorsque la ligne est à nouveau opérationnelle,
  runq est démarré et envoi les courriels en attente.  Toutefois, la
  réception de courriel est le problème puisque votre fournisseur
  d'accès a plusieurs clients à gérer, et pas seulement vous !

  Habituellement, vous pouvez récupérer vos courriels via le protocole
  POP, voir la section POP ci-dessous.


  55..  SSeennddmmaaiill++IIDDAA

  Pour les sites d'importance, sendmail vaut la peine d'être choisi, en
  raison de son incroyable facilité d'utilisation, mais vous devez vous
  décider 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 récent (2.0), le choix sera sendmail 8.x

  Rappelez-vous, les débutants en linux ou les personnes concernées par
  la sécurité/facilité de la configuration devraient plutôt essayer
  d'utiliser smail ou qmail, qui sont plus facile à utiliser et plus
  sûr.

  55..11..  IInnssttaallllaattiioonn dduu ssoouurrccee


  ·

     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'hôte.m4".

     Editez la répartition de hostname, aliases, smarthost et en
     répartir la bonne dans votre site. Le fichier par défaut est pour
     un site n'utilisant qu'uucp qui a des entêtes de domaine et qui
     communique avec l'hôte intelligent (Smart host) .  Puis faire "make
     votre_nom-d'hôte.cf" et mettre le fichier résultant dans
     /etc/sendmail.cf.


  ·  Si vous n'utilisez que uucp, vous n'avez *AUCUN* besoin de créer
     une des tables mentionnées 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 entrées
     uucpxtable pour chacun (ou leur envoyer un courriel passera par
     l'hôte intelligent) et exécuter 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 sécurité dans la 5.67a et les
  précédentes. Une autre amélioration 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 détails.

  Les sources de sendmail+IDA se trouvent sur  <vixen.cso.uiuc.edu> ;
  Ils ne nécessitent 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 particulièrement é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 sécurité qui ETAIENT (!!!) dans les anciennes versions que
  vous auriez récupérées ou compilées avant le premier décembre 1993 ont
  été comblés.


  Aujourd'hui  le noyau est le 2.0, vous devriez utiliser sendmail 8.x
  au lieu de sendmail+IDA, mais je vous avez déjà dit de choisir plutôt
  sendmail 8.x :-)


  55..22..  LLee ffiicchhiieerr sseennddmmaaiill..mm44

  Sendmail+IDA requiert de créer le fichier sendmail.m4 plutôt 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 particulièrement 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 général 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 récupère 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 hôte relais intelligent
      define(RELAY_MAILER, UUCP-A)dnl               # nous atteignons moria via uucp
      dnl #
      dnl #--------------------------------------------------------------------
      dnl #
      dnl # les différentes tables de recherche dbm
      dnl #
      define(ALIASES, LIBDIR/aliases)dnl            # alias systèmes
      define(DOMAINTABLE, LIBDIR/domaintable)dnl    # mettre le domaine aux hôtes
      define(PATHTABLE, LIBDIR/pathtable)dnl        # chemins base de données
      define(GENERICFROM, LIBDIR/generics)dnl       # adresses From génériques
      define(MAILERTABLE, LIBDIR/mailertable)dnl    # mailers par hôte ou domaine
      define(UUCPXTABLE, LIBDIR/uucpxtable)dnl      # chemins vers les hôtes que nous fournissons
      define(UUCPRELAYS, LIBDIR/uucprelays)dnl      # chemins court-circuits
      dnl #
      dnl #--------------------------------------------------------------------
      dnl #
      dnl # inclue le code 'réel' 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 -------





  55..33..  DDééffiinniirr uunn aaggeenntt ddee ccoouurrrriieell llooccaall

  A la différence de la plupart des distributions Unix, Linux n'a pas
  par défaut un agent pour délivrer le courriel local. Dorénavent,
  deliver ou procmail est généralement installé, ainsi aucune difficulté
  ne sera ajoutée à cette installation déjà 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 définir 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 définition par défaut 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
  définirez plutôt 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 réside dans
  /bin. Veuillez noter que procmail est en général meilleur que deliver,
  par exemple pour le filtrage de courriel.


  55..44..  LLeess ttaabblleess ddbbmm ddee sseennddmmaaiill++IIDDAA

  Mettre en place un comportement particulier, pour les sites ou les
  domaines, est effectué à travers un nombre de tables dbm optionnelles
  plutôt 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 dernière version du Guide
  d'Administration Réseau du Projet de Documentation Linux (LDP) qui
  sera disponible vraiment-bientôt-maintenant pour plus de détails.


  ·  mailertable - défini les comportements particuliers pour les sites
     distants ou les domaines.

  ·  uucpxtable - force uucp à délivrer le courriel aux hôtes qui sont
     au format DNS

  ·  pathtable - défini les chemins BANG ??? UUCP pour les sites
     distants ou les domaines.

  ·  uucprelays - court circuite le chemin pathalias vers les hôtes
     distants connus

  ·  genericfrom - converti les adresses internes en adresses génériques
     visible pour le monde extérieur.

  ·  xaliases - converti les adresses génériques en/à partir d'adresses
     internes valides.

  ·  decnetxtable - converti les adresses RFC-822 en adresses style
     DECnet.





  55..55..  BBoonn qquueelllleess eennttrrééeess ssoonntt vvrraaiimmeenntt nnéécceessssaaiirreess ??

  Lorsque vous n'utilisez aucune des tables optionnelles dbm, sendmail
  délivre le courrier via le RELAY_HOST et RELAY_MAILER définis dans le
  fichier sendmail.m4 utilisé pour générer sendmail.cf. Il est aisé de
  passer outre ce comportement à travers des entrées dans domaintable ou
  uucpxtable.

  Un site générique 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'entrées spécifiques du tout.

  De fait, tous les systèmes devraient utiliser les macros DEFAULT_HOST
  et PSEUDONYMS, qui définissent le nom canonique et l'alias du site par
  lequel il se fait connaitre.

  Si tout ce que vous avez est un hôte relais et un agent relais de
  courrier, vous n'avez pas à prendre les options par défaut puisque
  cela marche automagiquement. Les hôtes 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 manière simple et
  juste transmettre tous vos courriel sortant vers votre fournisseur
  d'accès et le laisser s'en occuper.  Ainsi vous devrez définir votre
  domaine dans ISOLATED_DOMAINS et VALIDATION_DOMAINS, vous devrez
  définir votre fournisseur d'accès dans RELAY_HOST et RELAY_MAILER à
  TCP. Bien sûr, vous voulez demander la permission avant de monter un
  système comme relais général.


  55..66..  SSeennddmmaaiill 88..xx

  Le Sendmail 8.7.x de Berkeley a été la dernière 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 récupérant une des nombreuses
  distributions binaires de l'habituel site d'archives Linux plutôt 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.


  55..77..  UUnn ffiicchhiieerr mmcc dd''eexxeemmppllee ppoouurr llaa 88..77..xx

  De même 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 hôte linux qui est configuré comme suit:
                 #
                 #       - connecté à Internet pour le courrier sortant (ici ppp)
                 #       - connecté via UUCP pour le mail entrant
                 #       - entête 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'accès 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')





  55..88..  LLeess ........ ddee SSeennddmmaaiill vv88

  Je suppose qu'il y a quelques différences pour les 'bigots IDA' parmi
  nous.



  Au lieu de 'runq', taper 'sendmail -q' pour traiter la file d'attente
  !




  55..99..  LLeess aaggeennttss ddiissttrriibbuutteeuurrss llooccaauuxx

  A la différence de la plupart des systèmes d'exploitation, Linux
  n'avait pas de courriel intégré : vous deviez avoir un programme pour
  distribuer le courrier local, comme "lmail", "procmail" ou "deliver".

  Toutefois, toutes les distributions récentes inclues un distributeur
  local !


  La documentation sur l'utilisation aussi bien pour la distribution
  locale est dans la révision binaire de sendmail5.67b+IDA1.5 (sur
  sunsite) citée plus haut.


  66..  LLee ccoouurrrriieell PPOOPP

  Cette section concerne aussi IMAP, pas trés différent de POP.


  66..11..  HHiissttoorriiqquuee

  Sur un réseau de station de travail, le courriel a toujours été un
  problème :


  ·  Soit vous utilisez ""user@computer.foo.com" avec des soucis lorsque
     "computer" est hors service, faire connaitre votre réseau aux
     personnes extérieures,  avoir différentes adresses pour une
     personne passant à une autre machine, ...

  ·  Soit vous installez un centre de tri (mail hub), "mailhost.foo.com"
     avec des règles de réécritures, ainsi tous les utilisateurs
     semblent faire leur envoi de la même adresse, même s'ils sont sur
     des ordinateurs différents.

  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 méthode était retransmettre (forwarding) ou UUCP,
  smtp, etc. mais c'est trop compliqué.

  Alors vint POP/IMAP, chacun avec des problèmes de sécurité au début,
  (maintenant résolus en utilisant ssh sur les nouvelles versions) :


  66..22..  RRééccuuppéérreerr ssoonn ccoouurrrriieerr

  Ici se trouve un des principaux désavantages de POP : le mot de passe
  est envoyé en texte clair sur le réseau, et quelques agents
  utilisateurs ne connaissent simplement pas POP : vous devez utiliser
  un lecteur de courrier connaissant POP, comme Pine, Emacs, Netscape,
  Mutt ...

  Les problèmes de mot de passe peuvent être résolus en créant un
  "cannal" crypté que POP utilisera ou en utilisant les extensions de
  APOP ou RPOP. Le problème du lecteur de courriel peut être resolu soit
  en changeant d'agent utilisateur (mozilla est prêt pour POP, de même
  Emacs ou Pine) ou en utilisant un "récupérateur de courriel" POP
  associé à un agent distributeur local.

  gwpop (a Good Way to POP, une bonne façon de faire du POP) vaut le
  coup puisqu'il crée un "cannal" crypté et dépose 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 exécuterez :



            $ 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 différentes
  options ci-dessus !)


  66..33..  EEnnvvooyyeerr dduu ccoouurrrriieerr

  Pour cela, vous devez utiliser un logiciel de courrier connaissant
  SMTP, comme qmail, sendmail, smail ou mozilla (celui là fait tout :
  lecteur de mail, récupération par POP, envois par smtp !)

  Se référer à l'une des sections prédédentes pour installer et
  configurer celui que vous préférez le plus. Alors, vous serez au stade
  du "Test", essayez d'envoyer quelques courriers à un compte local sur
  le centre de tri (mail hub).


  66..44..  LLiirree ssoonn ccoouurrrriieell

  Si votre programme ne fait pas tout lui même, vous pouvez installer
  elm, pgp, mush, pine ...beaucoup de bons programmes sont disponible
  gratuitement pour les plateformes linux !


  66..55..  TTeessttss

  Pour vérifier 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  créer 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 bannière du centre de tri pop.
  Si vous n'utilisez pas ssh, n'oubliez pas de mettre en commentaire
  $ssh dans le script gwpop. Pour vérifier si procmail est en cours,
  essayez "procmail -v".


  66..66..  UUttiilliissaattiioonn

  Maintenant vous pouvez éditer le script Perl de gwpop pour vérifier
  que tout va bien, puis exécuter 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 téléchargé vers votre machine locale à
  l'endroit indiqué à gwpop. (S'il vous plait testez avec quelques
  Courriels !).

  Vous pouvez aussi utilisez gwpop comme démon :



             $ gwpop -d $HOME/tmp votre-nom-utilisateur





  Les messages de gwpop sont envoyés à syslog et gwpop s'exécute sans
  fin ; un signal "HUP" obligera gwpop à chercher vos Courriels.

  Vous pourrez trouvez les logiciels de POP mentionnés ici :

  ·  <ftp://ftp.pasteur.fr/pub/Network/gwpop>

  ·  <ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail>

  ·  <http://www.cs.hut.fi/ssh/>


  77..  LLeess ""aaggeennttss uuttiilliissaatteeuurrss"" ddee CCoouurrrriieell

  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"
  mentionnés 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 !





  77..11..  EEllmm

  Elm se compile, s'installe et s'exécute 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 créer un
  fichier /usr/local/lib/elm/elm.rc pour outrepasser les informations
  précompilées de hostname et de domain :


  ·  remplacer "sousdomaine.domaine" avec votre nom de domaine

  ·  "monnomdhôte" avec le nom canonique du nom d'hôte



                 #---------- /usr/local/lib/elm/elm.rc ------------------
                 #
                 # Nom d'hôte non qualifié
                 hostname = monnomdhôte
                 #
                 # domaine local
                 hostdomain = sousdomaine.domaine
                 #
                 # Nom d'hôte entièrement qualifié
                 hostfullname = monnomdhôte.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 reçu. Metamail est disponible à <thumper.bellcore.com>
  et bien sûr via "archie".

  Dans la catégorie "trop beau pour être vrai", il y a une distribution,
  Elm-2.4.24, avec "PGP intégré". Pour l'essayer, récupérer le fichier
  <ftp://ftp.viewlogic.com/pub/elm-2.4pl24pgp3.tar.gz>, qui est
  l'elm2.4.24 avec l'option PGP ajoutée. Vous le configurez et le
  compilez de la même manière que l'Elm normal, ce qui veut dire que
  vous devrez ajouter les patchs mentionnés plus haut.  Pour ce que cela
  vaut, je l'utilise ici et l'apprécie beaucoup. Bien sûr, il doit y
  avoir des versions disponibles plus récentes , y compris elm-ME+.

  Bien que cet élément ne soit pas spécifique à linux, il est néanmoins
  perçu (de façon erronée) comme un bug pénible 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 problème est d'enlever
  les alias de Courriel post-générés (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é récupéré la distribution binaire.


  Elm a un format amélioré et non compatible d'aliases ; vous devez vous
  assurez que le chemin qu'utilise Elm pour aliases est différent de
  celui que sendmail/smail utilise. Vu le nombre de remarques sur ce
  problème, il est évident qu'au moins une distribution majeure 'dans la
  rue' a été mal configurée (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 intéressantes ...


  77..22..  MMaaiillxx

  Epargnez vous des ennuis : aller simplement chercher le kit mailx de
  la Slackware 2.1.0 ou supérieure, qui a la bonne implémentation 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.


  77..33..  DD''aauuttrreess aaggeennttss uuttiilliissaatteeuurrss

  Ce qui suit est connu pour fonctionner sous linux. Consulter "archie"
  pour connaitre la façon de les trouver ...

  ·  Pine      - de l'Université de Washington

  ·  Metamail  - autorise l'utilisation MIME

  ·  mh        - une autre façon de gérer le Courriel

  ·  deliver   - fichier/gestion des Courriels basé sur des règles

  ·  procmail  - fichier/gestion des Courriels basé sur des règles

  ·  Majordomo - gère les listes de diffusion

  ·  Mserv     - permet les fichiers par Courriel


  88..  RReemmeerrcciieemmeennttss

  Les personnes qui suivent m'ont aidé au rassemblement de l'information
  et des expériences qui ont permis la réalisation 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.

  11..  IInnttrroodduuccttiioonn

  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.

  PPrreemmiieerree  eettaappee : 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.

  DDeeuuxxiieemmee  eettaappee  :  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 bbiinnaaiirree, 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.

  TTrrooiissiieemmee   eettaappee  :  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.

  11..11..  RReessuummoonnss uunn ppeeuu

  DDeeccoouuppaaggee hhoorriizzoonnttaall.  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.

  DDeeccoouuppaaggee        vveerrttiiccaall.        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.

  22..  UUnn ppeeuu ddee tthheeoorriiee dduu ssiiggnnaall......

  La  voix est un  bon exemple  de  signal permettant de  vehiculer  une
  information.   Ce     signal  est caracterise  par  sa bbaannddee ppaassssaannttee,
  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".

  22..11..  LLeess ssuuppppoorrttss ddee ttrraannssmmiissssiioonn

  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.

  33..  LLeess tteelleeccoommmmuunniiccaattiioonnss aannaallooggiiqquueess eett nnuummeerriiqquueess

  33..11..  LLeess tteelleeccoommmmuunniiccaattiioonnss aannaallooggiiqquueess

  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.

  33..22..  LLee ssiiggnnaall tteelleepphhoonniiqquuee

  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.

  33..33..  LLeess tteelleeccoommmmuunniiccaattiioonnss nnuummeerriiqquueess

  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.

  33..44..  AAlloorrss ppoouurrqquuooii ll''aannaallooggiiqquuee ??

  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.

  33..55..  DDee ll''aannaallooggiiqquuee aauu nnuummeerriiqquuee eett rreecciipprrooqquueemmeenntt

  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.

  33..55..11..  DDee ll''aannaallooggiiqquuee aauu nnuummeerriiqquuee

  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.

  33..55..22..  DDuu nnuummeerriiqquuee aa ll''aannaallooggiiqquuee

  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  pphhaassee,
  ll''aammpplliittuuddee ou la ffrreeqquueennccee.

  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  rraappiiddiittee   ddee   mmoodduullaattiioonn  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.

  33..66..  DDeess bbiittss eett ddeess ddeebbiittss

  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
  ddeebbiitt bbiinnaaiirree mmaaxxiimmuumm et la ccaappaacciittee ddee ttrraannssmmiissssiioonn mmaaxxiimmaallee.
  33..66..11..  LLee ddeebbiitt bbiinnaaiirree mmaaxxiimmuumm

  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   VV correspond   au   nombre de   niveaux significatifs  (ou etats)
  que peut prendre  le signal : c'est sa vvaalleennccee. 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.

  33..66..22..  LLaa ccaappaacciittee ddee ttrraannssmmiissssiioonn mmaaxxiimmaallee

  Un  des  inconvenients supplementaires des   supports est   le  bbrruuiitt.
  Or  la quantite de bruit  presente sur une ligne s'exprime par rapport
  a  la  puissance  utile  du  signal  transmis  :  c'est  le    rraappppoorrtt
  ssiiggnnaall//bbrruuiitt.   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 oonn nnee ppeeuutt ttrraannssmmeettttrree aa pplluuss  ddee 3300000000 bbiittss//ss (--
  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.

  44..  LLee mmooddeemm

  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'aaddaappttaattiioonn dduu   ssiiggnnaall aux  lignes du  reseau utilise,
     c'est-a-dire        de  modulation      et      de demodulation ;

  +o   un role de ddiiaalloogguuee 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   iinntteerrffaaccee
  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 pprroottooccoollee.

  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.

  44..11..  VVooccaabbuullaaiirree

  Un   aavviiss   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   EETTTTDD  (_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   EETTCCDD (_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 jjoonnccttiioonn ou iinntteerrffaaccee.

  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.

  44..22..  LLee mmooddee ddee ttrraannssmmiissssiioonn

  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 ssyynncchhrroonnee, ils sont cales sur  le
  meme rythme grace a des signaux d'horloge  emis avant la transmission.
  Dans   le   mode        aassyynncchhrroonnee,     l'horloge      du    recepteur
  n'est declenchee puis arretee que sur reception de bits de debut et de
  fin.   On  les  appelle  bits  de ssttaarrtt et de ssttoopp.  Ce mode, bien que
  moins  performant,  est  le  plus  utilise  actuellement   dans    les
  communications a travers  le  reseau public.

  44..33..  LLee ssuuppppoorrtt ddee ttrraannssmmiissssiioonn oouu lliiggnnee

  Un modem est utilisable principalement sur deux types de supports : le
  rreesseeaauu           ccoommmmuuttee     ou       la       lliiggnnee ssppeecciiaalliisseeee.  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 ddeeuuxx 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.

  44..44..  LL''aaddaappttaattiioonn dduu ssiiggnnaall

  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  vvaalleennccee
  4.  Plus generalement,  la    valence  d'un  signal    est  le  nombre
  d'etats   qu'il   peut prendre.  Cette   transformation du  signal est
  appelee ccooddaaggee.

  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  ddeeuuxx   bits   se  presentent,  il est  possible
  d'effectuer  uunnee    modulation.  A  l'autre   bout,  l'equipement  est
  capable  de     regenerer   deux  bits.  Le     debit (en bbiittss//ss)  est
  donc   bien   double de  la    vitesse   de  modulation  (exprimee  en
  bbaauuddss).

  44..44..11..  EExxeemmppllee

  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  (ttrriibbiittss)   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.

  44..44..22..  RReessuummee

  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  bbaauuddss.  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.

  44..55..  LLee ddiiaalloogguuee

  Interessons-nous   maintenant   au    dialogue    entre   l'equipement
  informatique  et la   jonction.

  44..55..11..  LLaa jjoonnccttiioonn sseerriiee

  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

  44..55..22..  LLee ddiiaalloogguuee pprroopprreemmeenntt ddiitt

  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.

  44..55..33..  LLee ccoonnttrroollee ddee fflluuxx

  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 :

     llooggiicciieell
        Le modem  insere des caracteres   de controles dans  le flot  de
        donnees   circulant  entre l'ETCD et l'ETTD :  XXOOFFFF pour arreter
        l'envoi et XXOONN pour le reprendre.

     mmaatteerriieell
        Generalement appele CCRRTTSSCCTTSS,  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.

  44..66..  LLaa ccoonnnneexxiioonn aauu rreesseeaauu tteelleepphhoonniiqquuee ccoommmmuuttee

  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  (LLiinnuuxx,  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.

  44..66..11..  IInniittiiaalliissaattiioonn dduu mmooddeemm

  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.

  44..66..22..  EEttaabblliisssseemmeenntt ddee llaa ccoonnnneexxiioonn

  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).

  44..66..33..  RReeppoonnssee aauuttoommaattiiqquuee oouu mmaannuueellllee

  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 RRIINNGG  (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 00.

  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  |
      +--------------------------+   +-------------+  +--------------------------+

  44..66..44..  DDeeccoonnnneexxiioonn

  Plusieurs methodes permettent de mettre fin a un appel :

  +o  MMooddee  ccoommmmaannddee.. Mettre  le modem en   mode commande et  envoyer  la
     chaine +++ATH ;

  +o  PPeerrttee ddee  ppoorrtteeuussee.. L'une   des causes est  la  deconnexion normale
     de l'autre modem ;

  +o  OOuuvveerrttuurree  dduu  cciirrccuuiitt  110088  (DTR).  C'est    la  methode  la  plus
     couramment employee.

  55..  EEttaatt aaccttuueell ddee llaa nnoorrmmaalliissaattiioonn

  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

  55..11..  AA pprrooppooss dduu VV..4422 bbiiss

  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.

  55..22..  DDeebbiittss eett mmoodduullaattiioonnss

       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         |
  +-------------------------------------------------------------+

  66..  FFooiirree AAuuxx QQuueessttiioonnss

     CCoommmmeenntt ppuuiiss--jjee cchhaannggeerr  ffaacciilleemmeenntt  uunn ppaarraammeettrree ddee   mmoonn ppoorrtt
        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.

     PPoouurrqquuooii ffaauutt--iill ccoonnffiigguurreerr CCRRTTSSCCTTSS ssuurr llee ppoorrtt sseerriiee ??
        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.

     JJee  rreemmaarrqquuee  qquuee  aaggeettttyy mmooddiiffiiee lleess ddrrooiittss dduu ffiicchhiieerr //ddeevv//ttttyySS00,,
        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.

     AAuurraaiiss--jjee aacccceess aa mmoonn tteelleepphhoonnee ??
        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).

     LLoorrssqquuee  jjee mmee ccoonnnneeccttee cchheezz mmoonn  ffoouurrnniisssseeuurr,, ccoommmmeenntt  mmoonn aaddrreessssee
        IIPP
        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.

  77..  UUnn mmoott ssuurr lleess eemmppiilleemmeennttss pprroottooccoollaaiirreess ccoouurraammmmeenntt uuttiilliisseess

  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" !

  77..11..  TTCCPP//UUDDPP//IIPP

  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.

  77..22..  PPPPPP//SSLLIIPP

  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 :   RRFFCC--11005555
  (SLIP), RRFFCC--11117711 et RRFFCC--11117722 (PPP) et le PPPPPP--HHOOWWTTOO.

  77..33..  MMiissee eenn ooeeuuvvrree

  +----------------+-------+ +--------+ +--------+ +------+ +-----+
  |  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.

  77..44..  LLeess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn

  77..44..11..  LLeess aapppplliiccaattiioonnss

  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.

  77..44..22..  LLeess ccoouucchheess ddee ccoommmmuunniiccaattiioonn :: TTCCPP//UUDDPP//IIPP

  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>

  88..  LLee MMiinniitteell

  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.--)

  88..11..  LL''eeccrraann

  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)       |
       +-------------+----------------------------------+

  88..22..  LLee ccllaavviieerr

  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>

  88..33..  LLee mmooddeemm

  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.

  88..44..  UUttiilliissaattiioonn dduu MMiinniitteell ccoommmmee ssiimmppllee tteerrmmiinnaall

  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 :

  88..44..11..  CCoonnffiigguurraattiioonn ddee ggeettttyy

  Une methode simple consiste  a compiler un _g_e_t_t_y un  peu  particulier.
  Les       sources      se      trouvent       dans    le     paquetage
  ggeettttyy__ppss--22..00..77hh,   en  general  disponible par  _f_t_p (ftp.ibp.fr)  sous
  //ppuubb//lliinnuuxx//ttssxx--1111//ssoouurrcceess//ssbbiinn.

  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.

  88..55..  UUttiilliissaattiioonn dduu MMiinniitteell ppoouurr uunn aacccceess ddiissttaanntt

  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).

  99..  UUnn mmooddeemm ppaarrttiiccuulliieerr:: llee ccaabbllee nnuullll--mmooddeemm

  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  |
  |      |       |                                 |      |       |
  +------+-------+---------------------------------+------+-------+

  1100..  CChhooiixx dd''uunn mmooddeemm

  Si vous etes sur le  point d'investir dans un modem,  il y a au  moins
  trois facteurs determinants pour vous :

     LLee ccoouutt
        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.

     LLee ddeebbiitt
        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".

     LLee ttyyppee ddee mmooddeemm :: iinntteerrnnee oouu eexxtteerrnnee
        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 ?

  1111..  QQuueellqquueess cchhiiffffrreess

  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.

  1111..11..  DDeebbiitt rreeeell

  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 ssttaarrtt et  de  ssttoopp,  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    |
       +---------------+--------------+--------+----------+

  1111..22..  CCoouuttss ddee ccoonnnneexxiioonn

  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.

  1122..  EEnnvviissaaggeerr dd''eeccrriirree ddeess aapppplliiccaattiioonnss

  Vous   avez   surement      plein    d'idees            d'applications
  interessantes,   mais    envisager  de  controler   une jonction serie
  vous fait peur ? Voici quelques petites indications.

  1122..11..  EEtt ssii cc''eettaaiitt ssiimmppllee ??

  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 : ooppeenn,,
  rreeaadd,,    wwrriittee,, iiooccttll,, cclloossee.   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.

  1122..11..11..  ooppeenn,, cclloossee

  La   methode  d'ouverture  et  de   fermeture   d'un  port  serie  est
  classique.   Neanmoins  un  mecanisme  particulier se   cache derriere
  la primitive  ooppeenn  qui est rapidement  decrit a la  section  ``Appels
  entrants (Dial-in) et appels sortants (Call-out) sous Linux''.

  1122..11..22..  rreeaadd,, wwrriittee

  Rien a signaler de particulier.

  1122..11..33..  iiooccttll

  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 :-)) :

     TTCCGGEETTSS -- TTCCSSEETTSS
        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)

     TTIIOOCCSSTTTTYY -- TTIIOOCCNNOOTTTTYY
        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

     TTCCFFLLSSHH eett ccoommppaaggnniiee
        positionnement d'indicateurs (voir la commande stty)

     TTIIOOCCGGSSEERRIIAALL -- TTIIOOCCSSSSEERRIIAALL
        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.

     TTIIOOCCMMGGEETT -- TTIIOOCCMMSSEETT
        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

  1122..22..   AAppppeellss  eennttrraannttss  ((DDiiaall--iinn)) eett aappppeellss ssoorrttaannttss ((CCaallll--oouutt)) ssoouuss
  LLiinnuuxx

  1122..22..11..  IInnttrroodduuccttiioonn

  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.

  1122..22..22..  GGeessttiioonn

  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  bbllooqquuaanntt  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).

  1133..  QQuueellqquueess aapppplliiccaattiioonnss iinntteerreessssaanntteess

  1133..11..  UUnn nnuummeerrootteeuurr

  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.

  1133..22..  mmooddeemmssttaatt eett ccoommppaaggnniiee

  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.

  1133..33..  UUnn ddeetteecctteeuurr ddee ssiiggnnaall 110099 ((CCDD))

  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
  ______________________________________________________________________

  1144..  RReemmeerrcciieemmeennttss

  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 systèmes multi-disques
  Stein Gjoen, sgjoen (at) nyx.net
  Traduit en français 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 spécifique
  à Linux, il peut aussi d'appliquer à d'autres systèmes d'exploitation
  multi-tâches, étant donnée l'approche générale adoptée ici.
  ______________________________________________________________________

  Table des matières






















































  1. Introduction

     1.1 Copyright
     1.2 Avertissement
     1.3 Nouveautés
     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 Géométrie
     3.3 Média
        3.3.1 Disques magnétiques
        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 Câbles et nappes
     3.6 Adaptateurs
     3.7 Systèmes multi-canaux
     3.8 Systèmes multi-cartes
     3.9 Comparatif de vitesse
        3.9.1 Contrôleurs
        3.9.2 Types de bus
     3.10 Jeux de tests (Benchmarks)
     3.11 Comparaisons
     3.12 Perspectives
     3.13 Recommandations

  4. Considérations diverses

     4.1 Usage des systèmes de fichiers
        4.1.1 Swap
        4.1.2 Stockage temporaire(
        4.1.3 Queues (
        4.1.4 Répertoires utilisateurs (
        4.1.5 Exécutables (
        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 systèmes de gestion de volume
        4.3.3 Le patch
        4.3.4 Considérations générales sur les systèmes de fichiers.
        4.3.5 Systèmes de fichiers des cédéroms
        4.3.6 Compression
        4.3.7 Autres systèmes de fichiers
        4.3.8 Position physique des pistes
        4.3.9 Vitesse des disques
  5. Autres systèmes 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 répertoires et des fichiers

     8.1 Choisir les partitions
     8.2 Répartir les partitions entre les disques.
     8.3 Trier les partitions et les disques
     8.4 Optimisation
        8.4.1 En tenant compte de spécificité des disques
        8.4.2 Utilisation du parallélisme
     8.5 Besoins et usage
     8.6 Serveurs
        8.6.1 Répertoires 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 Pièges
     8.8 Compromis

  9. Implémentation

     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 Défragmentation
     10.3 Effacement
     10.4 Mises à jour

  11. Utilisation avancée

     11.1 Paramètres du disque dur
     11.2 Paramètres du système 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 préparation
     14.2 Demande d'information
     14.3 Suggestions pour participer à un projet.

  15. Questions / Réponses

  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: numéros et noms symboliques
     16.6 Consommation et Chaleur
     16.7 Dejanews
     16.8 Structure de la hiérarchie des fichiers
     16.9 Numérotation 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: numérotation

  20. Appendice D: Exemple 1: serveur généraliste

     20.1 Points de montage et liens
     20.2 emplacement des partitions
     20.3 Numérotation

  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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  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 apparaîtront à mesure des changements pour
  indiquer l'état du document.


  J'ai écrit ce document principalement parce que j'ai hérité de trois
  vieux disques SCSI pour mettre en place mon système Linux et je
  voulais savoir comment utiliser au mieux les capacités de parallélisme
  d'un système 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 parallèle avec le Linux Filesystem Structure
  Standard (FSSTND): en aucun cas il ne le remplace mais il explique où
  mettre physiquement les répertoires détaillés 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 détails restent
  à préciser 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 français 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 précises dans les FAQs du
  forum comp.sys.ibm.pc.hardware.

  C'est aussi une expérience pour moi d'écrire ce HOWTO et j'espère
  qu'il évoluera pour devenir plus détaillé et peut-être même plus
  correct.

  Avant tout quelques rappels légaux. L'actualité a montré combien c'est
  important.


  11..11..  CCooppyyrriigghhtt


  Copyright 1998 Stein Gjoen.

  Linux est une marque déposée appartenant à Linus Torvalds.

  Toutes les marques et logos citées dans ce document sont déposées par
  leurs propriétaires respectifs.

  Sauf indication contraire, les HOWTOs Linux sont sous le copyright de
  leur(s) auteur(s). Les HOWTOs Linux peuvent être reproduits et
  distribués intégralement 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 autorisée et
  même encouragée; cependant, l'auteur apprécierait 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 règle 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.


  11..22..  AAvveerrttiisssseemmeenntt


  Je décline toute responsabilité au sujet du contenu de ce HOWTO.
  Utilisez les concepts, les exemples et les trucs à vos risques et
  périls.

  Les marques citées dans ce document sont déposées par leurs
  propriétaires respectifs.

  Enfin, vous êtes expressément invités à faire une sauvegarde de tout
  votre système avant tout grand changement et à intervalles réguliers.


  11..33..  NNoouuvveeaauuttééss


  Ce HOWTO a maintenant un index et utilise les SGMLtools 1.0.5. Il ne
  sera donc pas formaté correctement avec une version antérieure.

  La nouveauté la plus récente 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
  avancées. Les gens s'intéressent de plus en plus au VFAT32 et il y a
  des additions concernant ce système 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 préfixe "mini" qui
  commençait à 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 récent est la section sur la meilleure manière d'obtenir de
  l'aide face à un problème que vous n'arrivez pas à résoudre, ainsi que
  d'autres suggestions pour la maintenance. Cette section migrera
  bientôt vers un autre HOWTO.

  A cause des quantités 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é ajoutés.

  Depuis la version 0.14 il y a eu trop de changements pour les énumérer
  ici. J'ai reçu beaucoup de remarques et un patch important de kris
  (at) koentopp.de qui ajoutait de nombreux détails. En fait ce document
  a grandi au-delà de mes prévisions.

  Je suis aussi passé en Debian 1.3 et j'ai remplacé les valeurs
  d'espace disque de ma vielle Slackware en conséquence. 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 systèmes
  d'exploitation. Au moment où j'écris la Debian 2.0 est sortie en
  version bêta et elle sera utilisée pour les versions futures de ce
  document.

  Les nouveaux systèmes de fichiers, journalisés, à héritage, ou
  optimisés pour fichiers à taille variable (comme les fichiers de log)
  bénéficient d'un nouvel intérêt dans les forums de comp.os.linux.
  Restez à l'écoute pour les mises à jour. Le vieux programme de
  défragmentation pour ext2fs est en cure de rajeunissement et il y a
  toujours du travail sur la compression.

  La dernière 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 dernière version traduite en français est sur Freenix
  <http://www.freenix.org/>.
  Ce HOWTO est disponible en plusieurs formats: SGML, HTML, PostScript
  ou texte simple.

  La traduction française 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-même.


  11..44..  RReemmeerrcciieemmeennttss

  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 spéciaux 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 académique 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 envoyés
  à mon adresse: sgjoen@nyx.net.

  Et maintenant, allons-y !




  22..  OOrrggaanniissaattiioonn ddee ccee ddooccuummeenntt

  Les HOWTOS sont plus des documents pédagogiques que des manuels de
  référence. On présentera donc les choses plutôt comme des des
  problèmes à résoudre et leurs solutions que comme un cours sur la
  structure des disques durs. Cependant une introduction sur la manière
  dont un disque dur fonctionne est indispensable.


  22..11..  SSttrruuccttuurree llooggiiqquuee

  Elle est basée sur un empilement de couches avec au sommet le système
  de fichiers tel que les applications l'utilisent et tout en bas la
  couche physique.



               _____________________________________________________________
               |__     Fichiers, répertoires   ( /usr /tmp etc)          __|
               |__     Système de fichiers     (ext2fs, vfat etc)        __|
               |__     Gestion du volume       (AFS)                     __|
               |__     RAID, concaténation     (md)                      __|
               |__     Pilote de périphérique  (SCSI, IDE etc)           __|
               |__     Contrôleur              (chipset, carte)          __|
               |__     Connection              (cable, réseau)           __|
               |__     Disque                  (magnétique, optique etc) __|
               -------------------------------------------------------------




  Dans le diagramme ci-dessus la gestion de volume, le mode RAID et la
  concaténation sont optionnels. Les trois derniers niveaux sont
  matériels et les autres logiciels. Chaque niveau sera amplement
  détaillé ci-dessous.


  22..22..  SSttrruuccttuurree dduu ddooccuummeenntt

  La plupart des utilisateurs partent avec un certain matériel et ont
  des une certaine idée de ce qu'ils veulent faire et de la taille de
  leur système. Ce sera mon plan: nous parlerons d'abord du matériel,
  puis des contraintes de mise en place et je détaillerai ma façon de
  faire. Elle a bien marché chez moi aussi bien que pour des serveurs
  réseau au travail ou en milieu académique comme me l'a rapporté mon
  collègue japonais.

  Enfin je donnerai certaines tables de valeurs destinées à vous guider
  dans la mise en place de votre machine. Comme je l'ai déjà dit, tous
  les commentaires sont les bienvenus.


  22..33..  PPllaann ddee lleeccttuurree

  Bien que n'étant pas le plus gros ce HOWTO est déjà bien gros et on
  m'a demandé un plan de lecture pour permettre de le lire en diagonale.
  CHoisissez selon votre niveau:


     EExxppeerrtt
        Si vous connaissez bien Linux et les technologies des disques
        durs, consultez seulement les tables en appendice.
        Eventuellement vous pouvez lire les Questions/Réponses et le
        chapitre ``Bric à Brac''


     EExxppéérriimmeennttéé
        Si vous connaissez bien les ordinateurs allez directement au
        chapitre ``technologies'' et poursuivez.


     DDéébbuuttaanntt
        Désolé. Vous devrez tout lire. En plus je vous recommande les
        autres HOWTOs concernant les disques.



  33..  TTeecchhnnoollooggiieess ddee ddiissqquueess dduurrss

  Une discussion très complète 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
  régulièrement postée dans les forums Usenet.  On ne présentera ici que
  ce qui est indispensable à la compréhension de la suite.


  33..11..  DDiissqquuee

  C'est l'appareil où vos données sont physiquement enregistrées, et
  bien que le système d'exploitation peut les rendre similaires à
  l'usage, il en existe des types très différents. On ne parlera pas des
  disquettes, sauf dans une prochaine version si beaucoup de monde le
  réclame.


  33..22..  GGééoommééttrriiee

  Un disque dur est constitué d'un ou plusieurs plateaux tournants qui
  contiennent des données lues et écrites par des capteurs.  Les
  capteurs sont fixes les uns par rapport aux autres et les transferts
  de données ont donc lieu en même temps sur tout les plateaux, ce qui
  définit un cylindre de pistes. Le disque est aussi divisé en secteurs.

  On spécifie la géométrie d'un disque avec trois nombres: le nombre de
  Cylindres, de Têtes 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 déclare au BIOS

  ·  le CHS logique utilisé par le système 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


  33..33..  MMééddiiaa

  La technologie du médium employé détermine des paramètres importants
  comme le taux de lecture/écriture, le temps moyen d'accès, la capacité
  et le fait d'être en lecture seule ou non.


  33..33..11..  DDiissqquueess mmaaggnnééttiiqquueess

  C'est le médium le plus courant pour la mémoire 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
  récemment leur apparition sur le marché. Le temps d'accès 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 mesurés
  avec des unités différentes. Le premier est le taux de transfert du
  plateau vers la mémoire 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)


  33..33..22..  DDiissqquueess ooppttiiqquueess

  Des disques optiques en lecture/écriture existent mais ils sont lents
  et peu répandus. Ils étaient utilisés dans les machines NeXT mais très
  critiqués pour leur faible vitesse. Celle-ci est due à la nature
  thermique du changement de phase qui matérialise l'enregistrement de
  données. Même avec des lasers assez puissants, les changements de
  phase sont plus lents qu'avec un champ magnétique.

  Les cédéroms 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 débit peut atteindre 1,5 Mo/s.
  Les données sont sur une seule piste en spirale, on ne peut donc pas
  vraiment parler de géométrie pour ces disques. La densité des données
  est constante donc le lecteur utilise une vitesse linéaire constante
  (CLV). Le temps d'accès est aussi plus lent, environ 100 ms, en partie
  à cause de la piste en spirale. Les lecteurs récents utilisent des
  vitesses angulaires constantes (CAV) à certains endroits du disque:
  cette technologie mixte CAV/CLV augmente le débit et réduit le temps
  d'accès car il y a moins besoin d'accélérer et de ralentir la vitesse
  angulaire (pour garder une vitesse linéaire constante).

  Un nouveau type de disque semblable au cédérom (le DVD) permettra
  jusqu'à 18 Go de stockage.


  33..33..33..  DDiissqquueess àà ééttaattss ssoolliiddeess

  Cette technologie récente est surtout utilisée dans les portables et
  les systèmes embarqués. Ne contenant aucune partie mobiles ils sont
  très rapides pour le taux de transfert comme pour le temps d'accès.
  Le type le plus courant est la mémoire vive "flashable" (flash-RAM)
  mais d'autre types de mémoire vive sont aussi utilisés. Il y a
  quelques années de grands espoirs se sont portés sur la mémoire à
  bulles magnétiques mais elle s'est avérée chère et pas pratique.

  En général les disques de mémoire vive sont une mauvaise idée: mieux
  vaut mettre beaucoup de mémoire sur la carte mère et laisser le
  système d'exploitation la diviser en fichiers, cache, zone de
  programmes et de données. Les disques de mémoire vive sont utiles
  seulement pour des usages très spécifiques, comme des systèmes temps
  réel avec des délais très courts.

  La mémoire flash est aujourd'hui disponible par dizaines de Mo et on
  pourrait être tenté de l'utiliser pour un stockage temporaire rapide
  des données. Mais il y a un os: on ne peut écrire sur de la mémoire
  flash qu'un nombre assez limité de fois. Mettre swap, /tmp ou /var/tmp
  sur un périphérique de ce genre réduirait drastiquement sa durée de
  vie. En revanche il peut être intéressant d'utiliser de la mémoire
  flash pour des données lues souvent et écrites peu souvent.

  Pour augmenter la durée de vie il faudra des pilotes spéciaux qui
  minimisent le nombre de fois où on doit effacer un bloc mémoire.

  Cet exemple montre bien l'intérêt qu'il y a à séparer l'arborescence
  des fichiers entre plusieurs périphériques.

  Les lecteurs à état solide n'ont pas d'adressage pas
  cylindre/tête/secteur mais cette géométrie est simulée par le pilote:
  ainsi de l'extérieur ils se comportent exactement comme un disque dur.


  33..44..  IInntteerrffaacceess

  Il y a une pléthore d'interfaces dans une gamme de prix très étendue.
  La plupart des cartes-mères comprennent une interface IDE ou mieux, la
  puce Triton d'Intel sur bus PCI qui est très répandue aujourd'hui.
  Beaucoup de cartes-mères ont aussi une puce d'interface SCSI fabriquée
  par Symbios (nouveau nom de NCR) et directement connectée au bus PCI.
  Vérifiez ce que vous avec et ce que le BIOS de voter carte-mère
  supporte.


  33..44..11..  MMFFMM eett RRLLLL

  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 sûr penser qu'une partition de
  secours avec un DOS potable dessus est toujours utile.


  33..44..22..  EESSDDII

  En fait, ESDI est une adaptation de l'interface SMD, très utilisée sur
  les "gros" ordinateurs, avec le câblage de l'interface ST506, plus
  pratique que les 60 + 26 broches du connecteur SMD. L'interface ST506
  était très nulle et dépendait complètement du contrôleur et du
  processeur pour faire les calculs de tête/cylindre/secteur et garder
  une trace de la position de la tête, etc. L'interface ST506 exigeait
  du contrôleur qu'il gère de façon détaillée les paramètres physique du
  lecteur et le formatage des pistes, bit par bit. Ce genre d'interface
  a vécu 10 ans si on compte les variantes MFM, RLL, ERLL et ARLL. ESDI,
  d'un autre côté, était "intelligente": le contrôleur 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 transférer des
  données. ESDI permettait d'utiliser une densité d'enregistrement
  variable, ou beaucoup d'autres choses. Bien que pas mal de techniques
  de ESDI aient été incorporées à IDE, c'est SCSI qui a progressivement
  détrôné ESDI.


  33..44..33..  IIDDEE eett AATTAA

  Avec les progrès de la miniaturisation, les contrôleurs, autrefois sur
  une carte ISA, ont été intégrés 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 têtes et 1024
  secteurs, la capacité fut limitée à 504 Mo. Dans la plus pure
  tradition de l'industrie informatique, cette limitation a été ensuite
  contournée par des bidouilles infâmes dans le BIOS. En clair, vous
  devez lire très attentivement la documentation de votre BIOS pour
  savoir de quand il date et quelle taille de disque il autorise.
  Heureusement avec Linux vous pouvez spécifier directement au noyau
  (donc sans avoir besoin de passer par le BIOS) les paramètres (CHS) du
  disque. La documentation de Lilo et de Loadlin détaille comment le
  faire. IDE est synonyme d'ATA, AT Attachements. IDE utilise un
  programmes d'entrées-sorties (_P_I_O_-_m_o_d_e) très gourmand en temps de
  calcul qui monopolise le processeur principal. Le taux de transfert
  optimal (théorique) est de 8,3 Mo/s. IDE ne permet pas l'accès direct
  à la mémoire (DMA)


  33..44..44..  EEIIDDEE,, FFaasstt--AATTAA eett AATTAA--22

  Ces trois termes sont à peu près é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'accès direct à la
  mémoire (DMA). Le taux de transfert maximal est 16,6 Mo/s.


  33..44..55..  UUllttrraa--AATTAA ((oouu UUllttrraa--DDMMAA))

  Ce nouveau mode DMA est à peu près deux fois plus rapide que l'EIDE
  PIO-Mode 4. Deux disques avec et sans l'Ultra-DMA peuvent être mis sur
  la même nappe sans pénalité 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.


  33..44..66..  AATTAAPPII

  ATAPI signifie _A_T_A _P_a_c_k_e_t _I_n_t_e_r_f_a_c_e et a été conçu mettre des cédéroms
  sur une interface IDE. Comme l'IDE, il est simple et pas cher.


  33..44..77..  SSCCSSII

  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
  générique qu'on peut utiliser pour brancher des disques, des plateaux
  de disques, des imprimantes, des scanners, des graveurs de cédéroms,
  ...  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-
  tâche.

  L'interface standard a 8 bits de large et peut gérer 8 périphériques.
  L'interface _w_i_d_e_-_S_C_S_I a 16 bits de large (elle est donc deux fois plus
  rapide à la même fréquence) et peut gérer 16 périphériques. La carte
  SCSI est toujours comptée comme un périphérique, habituellement avec
  le numéro 7 (les autres étant numérotés de 0 à 6). Le SCSI 32 bits
  existe aussi mais il demande en général un ensemble de câbles 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, réalise 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 câbles 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
  câbles. Les disques SCSI sont aussi en général de meilleure qualité
  que les disques IDE. Souvent on peut les brancher et les débrancher "à
  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 recommandés.

  Un autre avantage du SCSI est qu'on peut connecter facilement des
  lecteurs de DAT pour sauvegarder des données, ainsi que certaines
  imprimantes ou scanners. Il est même possible de l'utiliser comme un
  réseau ultra-rapide entre ordinateurs qui partagent des périphérique
  SCSI. C'est cependant non-trivial en particulier pour assurer la
  cohérence de la mémoire tampon des deux cartes SCSI.


  33..55..  CCââbblleess eett nnaappppeess


  Ce n'est pas un cours de hardware mais certaines informations sur les
  câbles sont nécessaires. Cette pièce si simple de l'équipement est
  souvent la cause de bien des problèmes. Aux vitesses actuelles il faut
  tenir compte de son impédance, et sans un minimum de précautions on
  risque des dysfonctionnement ou bien la panne complète. Certains
  adaptateurs SCSI sont plus sensibles que d'autres à la qualité des
  câbles.

  Les câbles blindés sont bien sûr meilleurs (ils sont protégés des
  interférences électromagnétiques) mais beaucoup plus chers.  Avec un
  peu d'habileté vous obtiendrez de bon résultats sur un câble 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 connectées,
     donc elle comptent pour _u_n _s_e_u_l câble. Dans tous les cas les nappes
     IDE doivent être aussi courtes que possible. Si vous avez des
     plantages incompréhensibles ou des changements spontanés de
     données, examinez votre câblage. Essayer un mode PIO moins élevé
     (entre 1 et 4) ou déconnectez la seconde nappe si le problème
     persiste.

  ·  Utilisez le moins de câble possible, mais n'oubliez pas la
     séparation de 30cm minimum entre deux périphériques 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 périphériques SCSI et à la
     bonne position, c'est-à-dire aux deux extrémités de la chaîne SCSI.
     Souvenez-vous que l'adaptateur peut avoir une auto-terminaison:
     dans ce cas, il suffit de vérifier que l'autre extrémité est bien
     terminée.

  ·  Ne mélangez pas les câbles blindés et non blindés, n'enroulez pas
     les câbles autour du métal, évitez de placer les câbles trop près
     des parties métalliques. Cela peut créer des différences
     d'impédance qui à leur tour entraînent la réflexion des signaux et
     augmentent le bruit sur le câble. Avec des contrôleurs multi-canaux
     le problème se pose de façon plus aiguë encore. On peut essayer de
     mettre du plastique autour des câbles pour éviter une trop grande
     proximité avec les éléments métalliques.


  33..66..  AAddaappttaatteeuurrss

  C'est l'autre extrémité de l'interface du disque, la partie connectée
  à un bus de la carte-mère. La vitesse du bus doit être assez élevée
  pour ne pas être une limitation par rapport à celle du disque.  Mettre
  une rangée de disques RAID-0 sur une carde ISA serait du gâchis (car
  le bus ISA est trop lent). La plupart des machines actuelles ont un
  bus PCI 32 bits avec un débit 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'intérieur des disques, ce qui
  reste et qui constitue l'interface E(IDE) est ridiculement petit:
  souvent c'est intégré au contrôleur 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 contrôleur PCI.  En
  contrepartie, il décharge le processeur de certains calculs lors des
  accès disque.

  Certains adaptateurs SCSI comportent même une mémoire cache et de
  l'intelligence pour anticiper les décisions du système d'exploitation.
  Mais le résultat dépend fortement du système d'exploitation utilisé.
  Linux a de son côté tant d'optimisations que le gain est souvent assez
  faible.

  Mike Neuffer, qui a écrit les pilotes pour les contrôleurs DPT, assure
  que ces contrôleurs sont assez intelligents pour obtenir d'excellentes
  perfomances pourvu qu'ils aient suffisament de mémoire cache, et que
  les gens qui n'ont pas obtenu de gain de perfomances significatif avec
  des contrôleurs plus élaborés n'utilisent pas assez bien le
  contrôleur.


  33..77..  SSyyssttèèmmeess mmuullttii--ccaannaauuxx

  Pour augmenter les performances globales il faut identifier les
  facteurs limitants et les éliminer. Dans certains cas, avec un grand
  nombre de disques connectés, il est intéressant d'avoir plusieurs
  contrôleurs travaillant en parallèle, aussi bien pour le SCSI que pour
  l'IDE (les cartes mères ont souvent deux canaux IDE). Bien sûr Linux
  sait en tirer profit.

  Certains contrôleurs RAID offrent 2 ou 3 canaux et c'est intéressant
  de répartir la mémoire de masse entre plusieurs canaux. Autrement dit,
  avec deux disques SCSI que vous voulez RAID-er et un contrôleur à deux
  canaux, placez un disque sur chaque canal.


  33..88..  SSyyssttèèmmeess mmuullttii--ccaarrtteess

  On peut avoir du SCSI et du IDE sur la même machine, mais aussi
  plusieurs contrôleurs SCSI. Vérifiez dans le SCSI-HOWTO quels
  contrôleurs vous pouvez combiner. Sans doute vous devrez indiquer au
  noyau qu'il doit juste détecter un contrôleur au démarrage (l'autre
  contrôleur sera détecté et utilisé plus tard). Voyez la documentation
  de Lilo et du SCSI pour plus de détails.

  Les systèmes à plusieurs contrôleurs peuvent offrir un gain de vitesse
  appréciable si on configure bien les disques, spécialement en mode
  RAID0. Pour bien paralléliser les disques et les contrôleurs, ajoutez
  les disques dans le bon ordre pour le driver md. Si le contrôleur 1
  est connecté aux disques  sda et sdb et le contrôleur 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
  répartira le plus souvent sur 2 contrôleurs.

  La même méthode s'applique aux disques IDE. La plupart des cartes-
  mères ont 4 ports IDE:


  ·  hda maître primaire


  ·  hdb esclave primaire

  ·  hdc maître secondaire

  ·  hdd esclave secondaire

  avec les deux disques primaires sur la même nappe, et les deux disques
  secondaires sur l'autre nappe. Il faut donc les concaténer dans
  l'ordre hda - hdc - hdb - hdd afin de paralléliser au maximum selon
  les deux canaux.


  33..99..  CCoommppaarraattiiff ddee vviitteessssee

  Les tables suivantes donnent des vitesses indicatives (rappel: il
  s'agit de vitesses _t_h_é_o_r_i_q_u_e_s maximales).


  33..99..11..  CCoonnttrrôôlleeuurrss



       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      --
       --------------------------------------------------






  33..99..22..  TTyyppeess ddee bbuuss




       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
       --------------------------------------------------








  33..1100..  JJeeuuxx ddee tteessttss ((BBeenncchhmmaarrkkss))

  C'est un sujet très, très délicat et je ne m'engagerai que très
  prudemment sur ce terrain miné. Il est très difficile de faire des
  tests comparables et significatifs.  Mais que ça ne décourage pas ceux
  qui voudront essayer ...

  On peut utiliser les benchmarks pour un diagnostic du système, pour
  voir s'il est aussi rapide qu'il le devrait étant donné ses
  composantes. Ainsi en passant d'un système de fichiers tout simple au
  RAID, vous attendrez une accélération significative, donc une perte de
  performances vous informera que quelque chose déco^H^H^H^H ne va pas.

  N'essayez pas de bricoler votre propre jeu de test, utilisez plutôt
  iozone et bonnie, et lisez la documentation très attentivement. Plus
  d'info dans la prochaine version du HOWTO.


  33..1111..  CCoommppaarraaiissoonnss

  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 très 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 contrôleurs
  multi-canaux).

  Vous avez besoin d'un IRQ par contrôleur SCSI, chaque contrôleur
  pouvant gérer jusqu'à 15 disques. En revanche, vous avez besoin d'un
  IRQ par disque IDE, ce qui peut générer des conflits.

  RLL et MFM sont trop vieux, lents et malpratiques pour être d'un
  utilité quelconque.


  33..1122..  PPeerrssppeeccttiivveess


  Le SCSI-3 est en préparation. Des disques plus rapides sont annoncés,
  et récemment un spécification monstre à 80 Mo/s sur un bus de 16 bits
  a été proposée.

  Certains constructeurs ont annoncé des matériels SCSI-3 mais c'est
  prématuré 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 continûment. L'introduction du DVD aura un grand
  impact dans un futur proche, avec 20 Go sur un seul disque on peut
  envisager même l'image intégrale des plus grands sites FTP. La seule
  chose certaine est que même si les disques ne sont pas mieux, ils
  seront plus gros.

  Note: J'avais écrit dans ce HOWTO que la vitesse maximale des cédéroms
  était 20x à cause de problèmes de stabilité mécanique, mais peu après
  le premier cédérom 24x était disponible ...  actuellement vous pouvez
  acheter un 40x et sans aucun doute des vitesses supérieures seront
  atteintes.




  33..1133..  RReeccoommmmaannddaattiioonnss

  A mon avis EIDE ou Utra-DMA est mieux pour commencer sur une machine
  personnelle, spécialement si vous utilisez MS-DOS. Si vous voulez
  étendre votre système plus tard ou l'utiliser comme serveur, il est
  fortement recommandé d'utiliser des disques SCSI. Actuellement le
  wide-SCSI est légèrement plus cher. Le SCSI standard a un bon rapport
  qualité-prix. Il existe un bus SCSI différentiel qui permet une plus
  grande longueur de câble, 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 système augmente la
  consommation d'électricité, et assurez-vous que l'alimentation et le
  refroidissement restent suffisants. Beaucoup de disques SCSI ont une
  option de démarrage en séquence adapté aux grands systèmes. Voir aussi
  ``Chaleur et Consommation''



  44..  CCoonnssiiddéérraattiioonnss ddiivveerrsseess

  Avec le PC familial, un utilisateur récemment converti à Linux
  cherchera surtout à obtenir les meilleures performances pour un
  matériel donné. Quelqu'un qui achète une machine pour un usage
  spécifique (comme un fournisseur d'accès à Internet) cherche au
  contraire à se procurer le matériel en fonction de ses besoins. Ce
  HOWTO couvre les deux situations.

  De manière générale, le mieux est d'avoir autant de disques que
  possible, mais on ne peut pas en rajouter indéfiniment et le coût est
  aussi un facteur. A taille totale égale, plus il y a de partitions et
  de disques, plus la maintenance est compliquée.


  44..11..  UUssaaggee ddeess ssyyssttèèmmeess ddee ffiicchhiieerrss

  Les différentes parties du FSSTND n'ont pas les mêmes exigences en
  terme de vitesse, de taille et de fiabilité. Casser la racine / est
  pénible mais peut être facilement réparé, casser /var/spool/mail c'est
  une autre histoire. Voici un bref résumé des principales parties d'un
  système de fichiers. Notez que c'est indicatif, qu'on peut très bien
  avoir des binaires dans /etc ou /lib et des librairies dans bin, etc.


  44..11..11..  SSwwaapp

  (ndT: le swap est une partie du disque utilisée pour prolonger la
  mémoire vive de la machine. Il se comporte donc exactement comme de la
  mémoire vive supplémentaire, mais en 1000 fois plus lent)

     VViitteessssee
        Maximum! Si toutefois vous dépendez trop du swap, achetez plus
        de mémoire vive. Attention au fait que sur la plupart des cartes
        mères le cache ne marchera pas au-delà de 128 Mo.


     TTaaiillllee
        Entre 1 fois et 2 fois celle de la mémoire vive.  4 Mo + 4 Mo
        (mémoire + swap) suffisent pour un système 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 mémoire et autant de swap soient nécessaires.

        Autre raison de ne pas lésiner sur la taille du swap: certains
        programmes ne libèrent pas complètement la mémoire qu'ils ont
        allouée, causant ce qu'on appelle des fuites de mémoire. La
        mémoire n'est pas libérée, même quand le programme s'arrête.
        Lorsque la mémoire vive et le swap sont pleins, il n'y a plus
        qu'à redémarrer. Heureusement ce genre de programmes est peu
        fréquent, mais avoir beaucoup de swap vous donne de la marge.

        Certains programmes bloquent leurs pages en mémoire vive (on ne
        peut donc pas les swapper). Ce peut être pour des raisons de
        sécurité ou de performance (par exemple pour un système temps
        réel). Bien sûr de tels programmes, en occupant de la mémoire
        qui ne peut être swappée, font que le système commence à
        utiliser le swap plus tôt que prévu.

        Le manuel de mkswap (man 8 mkswap) explique que chaque partition
        de swap ne doit pas excéder 128 Mo sur une machine 32-bit et
        256Mo sur une machine 64-bit.


     FFiiaabbiilliittéé
        Moyenne. En cas de problème vous le savez assez vite et vous
        pouvez perdre le travail en cours. Vous sauvegardez souvent,
        n'est-ce pas ?


     NNoottee 11
        Linux permet de bâtir un swap à cheval sur plusieurs disques.
        Taper man 8 swapon pour les détails. Cepandant, un swap réparti
        sur plusieurs disques est souvent plus lent.

        L'entrée 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
     précédentes.


     NNoottee 22
        Certains utilisent un disque de mémoire vive (RAM disk) comme
        mémoire swap. Mais comme l'usage du swap est d'augmenter la
        mémoire vive et qu'un RAM disk diminue la quantité de mémoire
        vive disponible (en particulier pour le cache disque), cette
        solution est à proscrire.


     NNoottee 22bbiiss
        Il y a une exception: sur un certain nombre de cartes-mères mal
        conçues, le cache externe ne peut pas cacher toute la mémoire
        vive qui peut être adressée. Ces cartes-mères peuvent supporter
        128 Mo, mais seuls les premiers 64 Mo bénéficieront du cache.
        Dans ces conditions, les performances seront améliorées si on
        utilise les 64 Mo restants comme un RAMdisk pour le swap ou le
        stockage temporaire.



  44..11..22..  SSttoocckkaaggee tteemmppoorraaiirree(( //ttmmpp  aanndd //vvaarr//ttmmpp ))


     VViitteessssee
        Très élevée. Sur un disque ou une partition séparée, cela
        réduira la fragmentation, mais de toute façon ext2fs fragmente
        très peu.


     TTaaiillllee
        Difficile à dire. A la maison quelques Mo suffisent mais sur un
        serveur, certains utilisateurs y stockent leurs fichiers de
        manière à échapper aux quotas et au contrôle, et cette partition
        peut grandir démesurément.  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
        répertoire /tmp de 300 Mo). Gardez un oeil sur ces répertoires,
        pour les fichiers cachés ou bien trop vieux. Attendez-vous un de
        ces jours à devoir retailler vos partitions à cause d'un /tmp
        trop petit.


     FFiiaabbiilliittéé
        Faible. Souvent les programmes évitent de planter et produisent
        le bon message d'erreur quand ces répertoires sont pleins ou
        provoquent une erreur. Des erreurs de fichiers aléatoires sont
        bien sûrs plus sérieuses, mais c'est le cas pour toutes les
        partitions !


     FFiicchhiieerrss
        Princicipalement de petits fichiers à durée 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 traîner dans /tmp. Avec la
        plupart des distributions, on a la possibilité d'effacer tout le
        contenu de /tmp au démarrage.


     NNoottee 11
        Dans le FSSTND il y a une note sur la possibilité de mettre /tmp
        dans un disque de mémoire vive.  Cependant, pour les mêmes
        raisons que pour le swap, ce n'est pas recommandé.  Comme ça a
        déjà été dit, n'utilisez pas de flash RAM pour ces répertoires.
        Gardez en tête que les fichiers de /tmp sont effacés au
        redémarrage, avec certaines distributions.


     NNoottee 22
        Dans les vieux systèmes on trouve un répertoire /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.


  44..11..33..  QQuueeuueess (( //vvaarr//ssppooooll//nneewwss  aanndd //vvaarr//ssppooooll//mmaaiill ))


     VViitteessssee
        Elevée, surtout pour les gros serveurs de news. Pour les queues
        d'impression: lente. Pour les news on peut envisager du RAID0.


     TTaaiillllee
        Pour les seveurs de news et de mail: dépend 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)


     FFiiaabbiilliittéé
        Mail: très haute, news: moyenne, queue d'impression: basse. Si
        votre mail est très important (mais n'est-ce pas le cas ?)
        songez à une solution RAID.


     FFiicchhiieerrss
        D'habitude un grand nombre de fichiers de quelques Ko, mais les
        fichiers d'une queue d'impression peuvent être assez gros.


     NNoottee
        Certaines documentations des news suggèrent de mettre tous les
        fichiers .overview dans un disque différent de celui des news.
        Voir les FAQs pour plus d'informations. La taille de ces
        fichiers est entre 3 et 10 pourcents du total.


  44..11..44..  RRééppeerrttooiirreess uuttiilliissaatteeuurrss (( //hhoommee ))


     VViitteessssee
        Moyenne. Certains programmes (comme les client des news) font de
        fréquentes mises à jour dans les répertoires des utilisateurs,
        ce qui peut avoir une importance s'il y a beaucoup
        d'utilisateurs. Pour les petits systèmes la vitesse n'est pas
        critique.


     TTaaiillllee
        A vous de voir ! Avec certains fournisseurs on paie selon la
        place disque, donc c'est une question de gros sous. De grands
        systèmes comme nyx.net <http://www.nyx.net/> (service Internet
        gratuit avec le mail, les news et la Toile) marchent bien avec
        une taille suggérée 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.


     FFiiaabbiilliittéé
        Variable. Perdre /home sur un système personnel est ennuyeux,
        mais recevoir 2000 coups de fils d'utilisateurs qui se plaignent
        que leur répertoire a disparu est plus qu'ennuyeux. Pour
        certains c'est vital. Vous faites des sauvegardes régulières,
        n'est-ce pas ?


     FFiicchhiieerrss
        A vous de voir. Le minimum des fichiers de démarrage de chaque
        utilisateur est une douzaine de fichiers pour environ 5 Ko.


     NNoottee 11
        Vous pouvez envisager le RAID pour la vitesse ou la fiabilité.
        Si vous voulez une vitesse et une fiabilité extrême, vous
        devriez envisager une autre solution logicielle et matérielle
        (serveurs haut-de-gamme, système avec tolérance aux pannes,
        etc).

     NNoottee 22
        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
        ``Répertoires Utilisateurs'' et ``WWW''.


     NNoottee 33
        La tendance naturelle des utilisateurs est d'utiliser au maximum
        l'espace disque qu'on leur alloue. Le système de Quotas Linux
        permet de limiter le nombre de blocs et d'inodes qu'un seul
        utilisateur peut allouer par système de fichiers. Voir le Linux
        Quota mini-HOWTO <http://www.freenix.fr/linux/HOWTO>



  44..11..55..

  EExxééccuuttaabblleess (( //uussrr//bbiinn  eett //uussrr//llooccaall//bbiinn ))


     VViitteessssee
        Lente. La vitesse de chargement d'un binaire n'est pas critique,
        j'en veux pour témoin les bonnes performances des systèmes
        "live" sur un CDROM.


     TTaaiillllee
        200 Mo devraient suffire. Un serveur à usages multiples devrait
        peut-être réserver 500 Mo pour anticiper la croissance.


     FFiiaabbiilliittéé
        Basse. Les binaires essentiels sont en général dans /bin et
        /sbin. Si l'on perd tous les binaires, c'est pénible car il faut
        tout réinstaller, mais pas dramatique.


     FFiicchhiieerrss
        La plupart entre 10 et 100 Ko. Certains assez gros (emacs ...)


  44..11..66..  LLiibbrraaiirriieess (( //uussrr//lliibb  aanndd //uussrr//llooccaall//lliibb ))


     VViitteessssee
        Moyenne. On trouve là plein de choses, des fontes comme des
        librairies dynamiques. Souvent les fichiers sont chargés en
        entier et donc une vitesse suffisante est nécessaire.


     TTaaiillllee
        Variable. C'est là par exemple que les traitement de texte
        stockent leurs dizaines de mégas 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 complète peut prendre plus de 250
        Mo. Parmi les plus gros consommateurs de place disque: GCC,
        Emacs, TeX/LaTeX, X11 et perl.


     FFiiaabbiilliittéé
        Basse. Comme pour les exécutables.


     FFiicchhiieerrss
        Assez gros avec un odre de grandeur de 1 Mo.
     NNoottee
        Pour des raisons historiques certains programmes (comme GCC dans
        /usr/lib/gcc/lib) stockent des exécutables dans les répertoires
        de librairies.


  44..11..77..  RRaacciinnee (( // ))


     VViitteessssee
        Assez lent: il n'y a là que le minimum, et la plupart des
        programmes ne sont lancés qu'au démarrage.


     TTaaiillllee
        Assez petit. Cepandant c'est une bonne idée de garder quelques
        fichiers et utilités de dépannage et plusieurs versions du
        noyau. 20 Mo devraient suffire.


     FFiiaabbiilliittéé
        Elevée. Une panne de la racine peut être relativement coûteuse
        en temps et en cheveux arrachés. 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 régulièrement ? Il y a des disquettes toutes
        faites et des utilitaires de création de disquette de secours. Y
        passer un peu de temps peut vous épargner de devenit un expert
        en réparation de la partition racine.


     NNoottee 11
        Si vous avez plein de disques, pourquoi ne pas mettre une
        partition de boot de secours sur un disque physiquement
        différent de celui sur lequel vous démarrez habituellement ? Le
        peu d'espace que ça vous coûtera sera amplement compensé par le
        temps gagné en cas de panne.


     NNoottee 22
        Pour la simplicité comme pour le dépannage, il n'est pas
        recommandé de mettre la partition racine sur un système RAID
        niveau 0.  Si vous utilisez RAID pour votre partition racine, il
        faut mettre l'option md pour votre noyau de secours.


     NNoottee 33
        Pour démarrer avec Lilo il est important que les fichiers
        essentiels au démarrage résident entièrement dans les 1023
        premiers cylindres. Ce qui comprend le noyau et les fichiers du
        répertoire /boot.


  44..11..88..  << DDOOSS,, eettcc..

  Au risque de paraître hérétique j'ai inclus ce paragraphe au sujet
  duquel beaucoup ont des réaction vives.  Malheureusement pas mal de
  disques sont livrés avec des outils d'installation et de maintenance
  basé sur ces systèmes et il faut en tenir compte.


     VViitteessssee
        Très lente. Les systèmes en question ne sont pas réputés pour
        leur vitesse donc il y a peu d'intérêt à utiliser des disques
        dernier cri. Le multitâche ou le multithread ne sont pas
        disponibles, donc les possibilités des disques SCSI ne sont pas
        pleinement exploitées. Un vieux disque IDE devrait faire
        l'affaire. Notons que Windows 95 et NT supportent le multi-
        tâches et devraient donc mieux profiter des caractéristiques du
        SCSI.


     TTaaiillllee
        La compagnie qui produit ces systèmes n'est pas réputée pour
        écrire des programmes petits et optimisés, attendez-vous à y
        consacrer plusieurs dizaines de Mo. Avec une vieille version de
        DOS ou Windows ça peut tenir dans 50 Mo.


     FFiiaabbiilliittéé
        Ha-ha. Comme une chaîne 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-détruire 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-détruira dans 10 secondes ..."

        On m'a demandé récemment de justifier mes prises de positions
        dans ce paragraphe. D'abord je m'excuse mais je n'appelle pas
        DOS et Windows des systèmes d'exploitation. Ensuite il y a des
        implications légales à prendre en considération. Je ne donnerai
        au lecteur que quelques mots-clés: DOS 4.0, DOS 6.x et divers
        utilitaires de compression disque dont le nom devrait rester
        secret.


  44..22..  EExxpplliiccaattiioonn ddeess tteerrmmeess

  Bien sûr le plus rapide est le mieux mais souvent le joyeux
  installateur de Linux a plusieurs disques de vitesse et de qualité
  variable. Bien sûr ce document pour rester utile à tous doit être
  général et ne saurait envisager tous les cas particuliers. Même ainsi
  il y a quelques détails à retenir:


  44..22..11..  VViitteessssee

  C'est un mélange de plusieurs termes: charge du processeur principal,
  temps de mise en place du transfert, temps d'accès et taux de
  transfert. Il n'y a pas d'optimum fixé mais souvent le prix est le
  facteur déterminant. 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'accès 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 premières attendent leur réponse 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'accès peut être
  avoir plus d'influence sur la vitesse globale.

  Les deux principaux paramètres sont:


     TTeemmppss dd''aaccccèèss
        le temps moyen pris par la tête de lecture pour aller d'une
        position à une autre au hasard. Ce paramètre a plus d'importance
        s'il y a beaucoup de petits fichiers.  Il y a aussi un petit
        délai avant que le secteur désiré tourne et se retrouve en face
        de la tête. Ce délai 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 coûtent plus chers, sont parfois bruyants et
        génèrent de la chaleur, paramètre qui compte si vous avez toute
        une rangée de disques. Avec les tous récents disques à 10000
        tours/min les besoins de refroidissement sont encore plus grands
        et des schémas d'aération minimale sont donnés.


     TTaauuxx ddee ttrraannssffeerrtt
        En Mo/s.  paramètre 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 spécifications des disques très
  attentivement, et de noter que le taux de transfert maximum est donné
  comme le taux de transfert entre la mémoire cache du disque et la
  mémoire principale, et _p_a_s comme le taux de transfert moyen entre le
  disque et la mémoire principale.  Voir aussi ``Consommation et
  Chaleur''.


  44..22..22..  FFiiaabbiilliittéé

  Bien sûr personne ne voudrait d'un disque pas très fiable. On ferait
  mieux de considérer les vieux disques comme non fiables. Pour le RAID
  il est suggéré d'utiliser un ensemble de disques différents de telle
  sorte que les pannes simultanées soient moins probables.

  Autant que je sache, je n'ai connu qu'un cas d'un système de fichiers
  totalement foutu, mais dans ce cas un matériel instable semblait la
  cause des problèmes.

  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 matériel fiable, remplacez vos vieux disques et gardez des
  roues de secours. Un disque peut marcher plus ou moins en continu
  pendant des années, mais ce qui tue un disque c'est souvent en fin de
  compte les variations de tension.


  44..22..33..  FFiicchhiieerrss

  La taille moyenne des fichiers est importante pour décider les bons
  paramètres du disque. Avec beaucoup de petits fichiers c'est le temps
  d'accès qui compte, et avec peu de gros fichiers c'est plutôt le taux
  de transfert. La queue des commandes SCSI est très bien adaptée à la
  gestion de beaucoup de petits fichiers, tandis que pour le taux de
  transfert EIDE et SCSI sont à peu près équivalents.


  44..33..  TTeecchhnnoollooggiieess

  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é ?


  44..33..11..  RRAAIIDD

  C'est une méthode pour augmenter la fiabilité ou la vitesse ou les
  deux en utilisant plusieurs disques en parallèle. Ainsi les temps
  d'accès et taux de transferts sont diminués. Avec des miroirs et des
  vérifications (checksums) on peut améliorer 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 système RAID soit logiciel (le module
  md du noyau) soit matériel avec un contrôleur supporté, qu'il soit
  PCI-SCSI ou SCSI-SCSI. Une solution matérielle est plus rapide, mais
  bien sûr plus chère.

  Les contrôleurs SCSI-SCSI sont d'habitude réalisés comme un ensemble
  de disques et un contrôleur, communiquant entre eux par un second bus
  SCSI et qui se connectent au bus SCSI. De l'extérieur, 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 matériel est pour les gens qui ont de
  grands ensembles de disques durs: comme le nombre d'entrées SCSI dans
  le répertoire /dev est limité, cette solution permet d'utiliser
  plusieurs disques avec un seul fichier de périphérique.

  Les contrôleurs PCI-SCSI, comme leur nom l'indique, sont connectés au
  bus PCI qui est plus rapide qu'un bus SCSI. Ces contrôleurs ont besoin
  de drivers spéciaux mais ils offrent du coup la possibilité de
  configurer le RAID à travers le réseau, ce qui simplifie
  l'administration.

  Actuellement seules quelques familles de cartes PCI-SCSI sont
  supportées par Linux.



     DDPPTT
        Les plus anciens et les plus matures sont les contrôleurs de DPT
        <http://www.dpt.com> parmi lesquels le SmartCache I/III/IV et le
        SmartRAID I/III/IV.  Ces contrôleurs sont supportés par le
        pilote EATA-DMA du noyau standard. Cette société a aussi une
        page d'information <http://www.dpt.com> qui décrit 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
        contrôleurs DPT sur SCSI <http://www.uni-mainz.de/~neuffer/scsi>
        et sur DPT <http://www.uni-mainz.de/~neuffer/scsi/dpt>.

        Ces contrôleurs ne sont pas les plus rapides mais leur fiabilité
        n'est plus à prouver.


     IICCPP--VVoorrtteexx
        Très récemment des contrôleurs de ICP-Vortex <http://www.icp-
        vortex.com> offrant jusqu'à 5 canaux indépendants et un matériel
        très rapide basé sur la puce i960. Le pilote a été écrit par le
        fabricant lui-même, qui prouve ainsi qu'il soutient Linux.


     DDAACC--996600
        Encore en bêta-version. Plus d'information dans un futur proche.

  Les contrôleurs SCSI-SCSI sont de petits ordinateurs, souvent avec une
  quantité appréciable de mémoire vive. Ils se présentent du point de
  vue extérieur 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 contrôleurs ont une option pour parler à
  plusieurs adresses simultanément. D'habitude ils sont configurés grâce
  à une interface ou à un émulateur de terminal vt100 connecté à leur
  interface série.


  Récemment j'ai appris que Syred faisait aussi des contrôleurs SCSI-
  SCSI supportés 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 aperçu du RAID qui a beaucoup de niveaux
  et de variantes. Le lecteur intéressé est invité à consulter la FAQ
  RAID.


  ·  Le mode RAID _0 n'est pas redondant du tout mais offre le plus de
     vitesse. Les données sont réparties sur plusieurs disques et les
     opérations de lecture/écriture se font en parallèle. D'un autre
     côté, si un disque a une panne tout est fichu. Ai-je déjà mentionné
     les sauvegardes ?

  ·  Le mode RAID _1. C'est la méthode la plus primitive pour obtenir de
     la redondance: les données sont copiées sur chaque disque. C'est
     bien sûr un immense gâchis mais on a un grand avantage: un temps
     moyen d'accès très court. En effet les ordre de lecture sont
     envoyés à tous les disques et c'est le premier à répondre qui
     gagne. Le taux de transfert n'est pas significativement plus élevé
     qu'avec un seul disque, mais en lisant une piste différente sur
     chaque disque on peut parfois gagner du temps.

     Si vous n'avez que 2 disques c'est la seule façon d'avoir de la
     redondance.

  ·  Les modes RAID _2 et _4 ne sont pas très courants et on n'en parlera
     pas ici.

  ·  Le mode RAID _3 utilise plusieurs disques (au moins 2) pour mettre
     des données réparties comme en RAID 0. Il utilise aussi des disques
     redondants pour stocker le OU exclusif des données des disques de
     données. Si le disque redondant tombe en panne, le système peut
     continuer à fonctionner sans problème. Si c'est un disque de
     données qui crashe, le système peut récupérer les données à partir
     des disques redondants et des autres. Une panne double met le
     système hors-service.

     Le mode RAID 3 ne fait du sens qu'avec au moins 2 disques de
     données et un pour la redondance. Il n'y a pas de limite théorique,
     mais la probabilité de panne augmente avec le nombre de disques. La
     limite habituelle est de 5 à 7 disques.

     Comme toutes les opérations d'écriture doivent être répercutées 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 système RAID 0 ayant autant de disques que le RAID 3 a
     de disques non redondants. La vitesse chute sévèrement lorsque
     l'ensemble doit restaurer les données depuis le disque redondant.

  ·  Le mode RAID _5 est comme le RAID 3, mis a part que l'information
     redondante est répartie sur l'ensemble des disques. Ça augmente la
     vitesse en écriture, puisque la charge est répartie.

  Il y a aussi des modes hybrides basés 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 répartition et la duplication, ce qui donne de
  très bons taux de transfert et temps d'accès moyen. Le revers de la
  médaille est que ça requiert beaucoup de disques et que c'est
  complexe.

  Le RAID _1_/_5 combine la redondance façon RAID 5 et le court temps
  d'accès du RAID 1. La redondance est améliorée 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 contrôleurs SCSI.


  44..33..22..  AAFFSS,, VVeerriittaass eett aauuttrreess ssyyssttèèmmeess ddee ggeessttiioonn ddee vvoolluummee

  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 embêté même s'il y a de la place dans
  la partition pour les news, car il n'est pas évident de retransférer
  les quotas d'une partition à l'autre. Les systèmes de gestion de
  volume font précisément ce travail. Les plus connus sont AFS et
  Veritas. Ils offrent aussi d'autres fonctions comme un journal des
  opérations 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 systèmes 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 générales et
  une FAQ.

  Il y a aussi des développements basés sur la dernière version libre
  d'AFS.

  La gestion de volume est pour l'instant un des gros manques de Linux.
  Un projet a démarré au sujet d'un système de partitions virtuelles qui
  réalisera la plupart des fonctions de gestion de volume qu'on trouve
  dans le système AIX d'IBM.


  44..33..33..  LLee ppaattcchh mmdd  ppoouurr llee nnooyyaauu LLiinnuuxx

  Il y a un projet de la part des développeurs 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
  développement. Les gens qui l'ont utilisé parlent d'un succès mitigé
  voire d'un crash total. Bref, soyez prudents.

  Actuellement md permet le mode linéaire 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
  développement. 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 prévoir quels disques on combine de manière à faire
  tourner tous les disques en parallèle, ce qui augmente les
  performances. Pour plus de détails se reporter à la documentation de
  md.


  44..33..44..  CCoonnssiiddéérraattiioonnss ggéénnéérraalleess ssuurr lleess ssyyssttèèmmeess ddee ffiicchhiieerrss..

  Dans le monde Linux ext2fs s'est imposé comme le système de fichiers à
  tout faire.  Mais pour certains usages spécifiques, d'autres systèmes
  de fichiers sont préférables. Pour les serveurs de news un système
  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 systèmes de fichiers avec journal ont
  l'avantage d'une vérification rapide. Un serveur de mail dans la
  classe 100 Go pourrait souffrir d'une vérification de systèmes de
  fichiers (avec fsck) prenant plusieurs jours au redémarrage.

  Le système de fichiers de Minix est le plus ancien, très peu utilisé
  actuellement. Le système Xiafs était un candidat sérieux pour devenir
  le standard de Linux mais il n'a pas vécu.

  Adam Richter d'Yggdrasil a posté récemment un message au sujet d'un
  système de fichiers avec journal et compression, mais c'est encore en
  développement. Une version qui ne marche pas est disponible sur le
  serveur ftp d'Yggdrasil <ftp://ftp.yggdrasil.com/private/adam> avec
  des versions patchées 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 système de fichiers basé sur la notion
  d'arbre, reiserfs <http://idiom.com/~beverly/reiserfs.html>.  Ce
  système a des fonctionnalités très intéressantes et il est plus rapide
  que ext2fs, mais il est encore expérimental et pas facile à intégrer
  dans le noyau. on peut attendre d'importants développements dans le
  futur. Ce projet se distingue du système de fichiers avec journal
  moyen car Hans a déjà du code qui tourne.

  Dans le système ext2fs existant, on pourrait ajouter de nouvelles
  fonctions comme les listes de contrôle d'accès (ACL, Access Control
  List), là encore dans un proche futur.

  Il existe aussi un système de fichiers avec cryptage, mais un fois
  encore vérifiez qu'il est légal dans votre pays (ndT: rappel: en
  France c'est illégal pour le moment).

  Les systèmes de fichiers sont un champ de recherches académiques et
  industrielles important, recherches dont les résultats 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 développement de tels
  prototypes, on peut s'attendre a des améliorations et des innovations
  continuelles.


  44..33..55..  SSyyssttèèmmeess ddee ffiicchhiieerrss ddeess ccééddéérroommss

  Il y a un certain nombre de systèmes de fichiers disponibles pour les
  cédéroms. Le plus ancien est le format _H_i_g_h _S_i_e_r_r_a, nommé ainsi
  d'après l'hôtel où les accords furent signés par les partenaires
  industriels. C'était l'ancêtre 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
  caractères, majuscules/minuscules confondues, etc). Plus tard une
  extension _R_o_c_k _R_i_d_g_e fut proposée, ajoutant les noms de fichiers longs
  et les droits d'accès entre autres.

  Le système de fichiers iso9660 de Linux supporte aussi bien le vieux
  High Sierra que les extensions Rock Ridge.

  Cepandant, une fois de plus Microsoft a décidé de choisir une de ces
  technologies comme nouveau "standard". Leur dernier bébé s'appelle
  _J_o_l_i_e_t et offre des possibilités 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 récemment 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 célèbre pour
       sa prison où Elwood était enfermé dans le film "Blues Brothers". Rock
       Ridge (l'extension UNIX de l'ISO 9660) fut baptisé d'après la ville
       imaginaire du film "Blazing Saddles."




  En fait c'était Jake qui était enfermé. Oups !


  44..33..66..  CCoommpprreessssiioonn

  Faut-il compresser son disque ou ses fichiers ? Voilà une question
  âprement débattue, 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 références sont données ici; à vous de vous
  tenir au courant des dernières mises à jour.


  ·  DouBle offre la compression de fichiers avec certaines limitations.

  ·  Zlibc ajoute  la compression au vol des fichiers quand on les
     charge, de façon transparente.

  ·  Il y a beaucoup de modules qui permettent de lire des fichiers
     compressés ou des partitions natives de plusieurs systèmes
     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 fontionnalités sont régulièrement ajoutées.

  ·  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.


  44..33..77..  AAuuttrreess ssyyssttèèmmeess ddee ffiicchhiieerrss

  Il y a le système de fichiers userfs qui permet un système de fichiers
  basé sur FTP, et a entre autres des possibilité de compression. docfs
  est basé sur ce système de fichiers.

  Avec les ajouts récents au noyau, on peut mettre un système 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 systèmes 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 systèmes de fichiers au stade
  expérimental qui ne sont pas évoqués ici.


  44..33..88..  PPoossiittiioonn pphhyyssiiqquuee ddeess ppiisstteess

  Avec les disques petits et lents, certain systèmes de fichiers
  utilisaient au mieux les caractéristiques physiques lors du placement
  des données stockées. Cependant, l'augmentation de la vitesse et
  l'apparition de contrôleurs intégrés avec mémoire cache ont réduit
  l'effet de ces optimisations.

  Néanmoins, 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 données à peu près constante sur toutes les
  pistes. On a donc un taux de transfert bien plus élevé sur le bord que
  sur l'intérieur du disque. Mais il y a aussi le fait que le temps
  d'accès moyen aux données sockées sur le centre du disque est plus
  court que pour les données stockées au centre ou à l'extérieur.

  Mais les disques récents utilisent une géométrie "logique" différente
  de la géométrie physique, le disque lui-même 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'extérieur mais
  c'est une convention et pas une norme.



     LLeess ppiisstteess iinnttéérriieeuurreess
        sont plus lentes pour le taux de transfert comme pour le temps
        d'accès.

        Elles sont plus adaptées à des partitions telles que DOS, la
        racine ou la queue d'impression, qui ne demandent pas de vitesse
        élévée.


     LLeess ppiisstteess dduu mmiilliieeuu
        sont en moyenne plus rapides que les pistes intérieures pour le
        taux de transfert comme pour le temps d'accès.  Elles sont bien
        adaptées pour des partitions comme swap, /tmp et /var/tmp.


     LLeess ppiisstteess eexxttéérriieeuurreess
        ont le taux de transfert le plus rapide mais un temps d'accès
        moyen aussi faible que les pistes intérieures. C'est là qu'on
        pourra mettre de gros fichiers comme des librairies.

  Le temps d'accès moyen peut être réduit en plaçant au centre les
  pistes les plus fréquemment demandées. Cela peut être fait avec fdisk
  en découpant un partition dans les pistes du milieu.  Ou bien, avec un
  disque vide au départ, on peut copier un fichier bidon avec dd de la
  taille de la moitié du disque environ; on crée ensuite les fichiers
  qui ont besoin d'un accès rapide et on efface le fichier bidon.

  Le dernier cas sert surtout pour les queues d'impression: on met le
  répertoire vide de départ au milieu du disque, ce qui réduira aussi la
  fragmentation.

  Avec les systèmes 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.


  44..33..99..  VViitteessssee ddeess ddiissqquueess


  Le système mécanique est souvent le même dans des disques IDE ou SCSI.
  Les contraintes mécaniques sont aujourd'hui un facteur limitant même
  si les progrès continuent. Il y a deux paramètres principaux,
  habituellement notés en millisecondes (ms):


     MMoobbiilliittéé ddee llaa ttêêttee
        La vitesse à laquelle la tête de lecture-écriture peut aller
        d'une piste à une autre, aussi appelé temps d'accès. Si vous
        calculez la double intégrale (la moyenne) de la distance sur
        tous les points de départ et tous les points d'arrivée
        possibles, vous trouverez que c'est équivalent à 1/3 de
        l'ensemble des pistes.


     VViitteessssee ddee rroottaattiioonn
        Elle détermine le temps nécessaire pour se placer dans le bon
        secteur, temps appelé latence.

  Quelques valeurs typiques de temps mouvement de la tête:



                                Type de disque


       Temps d'accès (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'accès à 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.


  55..  AAuuttrreess ssyyssttèèmmeess dd''eexxppllooiittaattiioonn..

  Beaucoup de Linuxiens ont plusieurs systèmes d'exploitation, ce qui
  est parfois nécessaire ne serait-ce que pour certains programmes de
  configuration du matériel qui ne tournent que sous DOS ou Windows,
  pour ne pas les nommer. D'où l'intérêt de cette courte section.


  55..11..  MMSS--DDOOSS

  Laissons là le débat pour savoir si c'est ou non un système
  d'exploitation. Ce qui est sûr est que la gestion du disque par MSDOS
  est très basique. On peut avoir de grandes difficultés 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 début du disque (sur les
  numéros de pistes les moins élevés).

  Étant conçu pour de petits disque le système de fichier de MSDOS (_F_A_T)
  alloue des blocs énormes sur les grands disques. Il crée aussi pas mal
  de fragmentation, ce qui ralentit le temps moyen d'accès comme le taux
  de transfert.

  Une solution est d'utiliser le programme de défragmentation mais il
  est fortement conseillé de faire un sauvegarde des données et de
  vérifier le disque (avec chkdsk ou scansidk pour les DOS plus récents)
  avant de défragmenter.

  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 protéger leurs
  logiciels. Or un fichier caché ne peut être changé d'endroit sur le
  disque, même s'il garde la même place dans l'arborescence des
  répertoires. En conséquence les programmes de défragmentation ne
  déplacent pas les fichiers cachés, ce qui réduit les effets de la
  défragmentation.

  Étant mono-tâche, mono-utilisateur, mono-tout, il n'y a aucun gain de
  vitesse à utiliser plusieurs disques sous MSDOS, a moins que vous
  utilisiez un contrôleur disque qui fait du RAID au niveau matériel.

  Les vieilles commandes join et subst pour gérer plusieurs disques
  demandaient beaucoup de travail pour un résultat nul. Elles n'existent
  plus dans les versions récentes.

  Bref, il n'y a pas grand chose à faire pour accélérer 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ù
  créer 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 réduira 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-tâche.

  Une autre alternative, libre, est Free DOS <http://www.freedos.org/>
  qui est un projet en développement. Un certain nombre d'utilitaires
  sont aussi disponibles.


  55..22..  WWiinnddoowwss

  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 système de fichiers
  vfat (plutôt que dos) pour monter ces partitions.

  Le nouveau système 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, même par NT 4.0 ou les utilitaires
  Norton-machin truc. Le noyau Linux supporte le format FAT32 et aussi
  le format de cédéroms Joliet depuis la version 2.0.35.

  La fragmentation est encore un problème. On peut limiter les dégâts en
  faisant une déframentation avant et après tout gros changement (comme
  l'installation d'un programme). Enlever les fichiers inutiles et vider
  la poubelle réduit 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 systèmes
  d'exploitation.

  Très récemment quelqu'un a commencé un projet pour que Win95
  reconnaisse le système de fichiers ext2fs. Voir cette page Web
  <http://www.globalxs.nl/home/p/pvs/> pour plus de détails.

  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 placés dans /windows/temp et
  changer cela est plus difficile.  On peut utiliser regedit à cette
  fin, mais on risque de mettre le système dans un état incohérent; et
  un Windows en panne est encore moins utile qu'un Windows vivant. Une
  erreur dans la base des registres peut nécessiter la ré-installation
  complète de Windows.

  De toute façon, 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 séparée est une meilleure idée, et
  c'est plus facile à faire. Gardez à l'esprit que la partition swap ne
  peut être utilisée à rien d'autre, même s'il y a de la place libre.


  55..33..  OOSS//22

  La seule chose à mentionner ici est qu'on peut ajouter un système de
  fichiers de manière à pouvoir lire les partitions ext2fs depuis OS/2.
  55..44..  NNTT

  Voilà un système plus sérieux 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 sérieux 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)


  55..55..  SSuunn OOSS

  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
  connaître 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 propriétaire. Ainsi jusqu'à Sun OS 4.x.y.
  Puis par une décision stratégique 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.


  55..55..11..  SSuunn OOSS 44

  Sun OS est familier à beaucoup de Linuxiens. La dernière version est
  4.1.4 plus un certain nombre de patches. Notez cependant que leur
  hiérarchie de fichiers est organisée différemment du FSSTND. Taper man
  hier pour un bref topo sur la hiérarchie de fichiers.


  55..55..22..  SSuunn OOSS 55 ((ii..ee.. SSoollaarriiss))

  Il y a une procédure d'installation basée sur Openwindows, qui vous
  aide à partitionner et formater les disques avant d'installer le
  système à partir du cédérom. Cette procédure plante lamentablement si
  votre installation est trop exotique, et comme elle cherche à
  installer tout un système à partir d'un cédérom elle plantera mais pas
  avant un certain nombre de minutes. C'est l'expérience que j'en ai eu.
  Pour contourner le problème nous avons tout installé sur une partition
  et ensuite nous avons déplacé les répertoires aux bons endroits.

  Les valeurs par défaut 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 défaut une seule
  partition est utilisée. Il est conseillé de changer cela dès que
  possible.

  Sun OS 5 possède aussi un système de fichiers conçu 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 mémoire vive
  manque des parties du pseudo-disques seront déplacés vers la mémoire
  tampon, il est donc possible d'avoir des fichiers temporaires dans la
  partition de swap. Linux n'a pas de système de fichiers de ce genre:
  on en avait parlé mais les opinions étaient partagées. J'aimerais
  d'ailleurs avoir des commentaires à ce sujet.

  Jusqu'ici, le seul commentaire était: non !! Sous Solaris 2.0, créer
  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 mémoire tampon (ndT: Ce
  n'est qu'un des milliers de bugs de Solaris 2.0).  Le pire est que
  cette panne complète peut arriver avec des programmes utilisateurs
  (donc pas seulement avec des programmes en mode noyau) et à moins de
  savoir contourner le problème 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 très long, très lent et totalement incompréhensible ...


  66..  CClluusstteerrss

  Je vais brièvement évoquer ici les manières 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
  séparé.

  Aujourd'hui les ordinateurs sont obsolètes au bout d'un temps très
  court. Du vieux matériel peut pourtant se révéler très utile sous
  Linux. Utiliser un vieux pécé commer serveur réseau a, en plus de la
  valeur pratique, un certain intérêt éducatif. Je ne parlerai ici que
  de ce qui concerne les disques.

  Plusieurs formes de partage (clustering) sont possibles aujourd'hui,
  depuis la répartition automatique de la charge entre plusieurs
  machines jusqu'à des matériels 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 façon à ce que les ressources soit disponibles à
  égalité pour tous les noeuds du réseau.

  Il n'y a pas de bonne définition 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 débutant je
  décrirai juste un réseau local simple. C'est une bonne manière de
  profiter de vieux matériel qui serait inutilisable dans ça.

  La meilleure façon d'utiliser une vieille machine est d'en faire un
  serveur de réseau. Dans ce cas, le facteur limitant est plutôt la
  bande passante du réseau que la vitesse du serveur. A la maison vous
  pouvez déplacer 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 répertoires ne doivent pas être exportés. On
  exportera /usr et /var/spool, peut-être aussi /usr/local mais sans
  doute pas /var/spool/lpd.


  La plupart du temps même de vieux disques offrent des performances
  suffisantes. Cependant, si vous avez un usage intensif des disques du
  serveur et un réseau à haut débit, 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 données.

  Un tel réseau (un _t_o_a_s_t_e_r _n_e_t_w_o_r_k comme on l'appelle) peut être une
  très bonne façon d'apprendre l'administration système. Il y a des
  HOWTOs sur le sujet mais vous devez garder en tête les choses
  suivantes:


  ·  Ne choisissez pas les numéros IP n'importe comment. Configurez
     votre réseau local avec les adresses IP réservées à l'usage privé,
     et utilisez votre serveur de réseau comme un routeur qui gérera le
     masquage des adresses IP.

  ·  Si vous configurez le routeur comme un pare-feu (firewall) il se
     peut que vous soyez incapable d'accéder à vos propres données
     depuis l'extérieur. Cela dépend de la configuration du pare-feu.

  Le réseau _n_y_x est un exemple de cluster. Il est constitué de:

     nnyyxx
        est l'une des deux machines sur lesquelles les utilisateurs se
        loguent et assure aussi certaines fonctions réseau

     nnooxx
        (ou nyx10) est la machine principale pour utilisateurs et aussi
        un serveur de courrier électronique.

     nnoocc
        est un serveur pour les news. La queue des news est accessible
        par un montage NFS pour nyx et nox.

     aarraacchhnnee
        (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 avancés, 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/>.


  77..  PPooiinnttss ddee mmoonnttaaggee

  Il est important de ne pas scinder la hiérarchie des répertoires au
  mauvais endroits. Cette section dépend fortement du FSSTND et sans
  doute changera complètement quand le FHS sera utilisée dans une
  distribution Linux.

  Voici donc un liste des répertoires que vous _p_o_u_v_e_z (et non que vous
  _d_e_v_e_z) mettre sur une partition séparée. Pour indiquer combien il est
  opportun de placer tel répertoire sur une partition séparée, un
  échelle de 0 à 5 est adoptée:

       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 sûr peut varier, par exemple sur une machine à la
  maison il n'est pas très utile de scinder le répertoire /var/spool
  mais pour un fournisseur d'accès à 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
  séparée ? Réponse: le montage est fait d'après les instructions du
  fichier /etc/fstab, donc si /etc n'est pas sur la partition racine, et
  que cette partition n'est pas montée, aucun montage ne peut être
  effectué ...  c'est comme d'avoir claqué la porte en laissant la clé à
  l'intérieur.


  88..  PPllaacceemmeenntt ddeess ppaarrttiittiioonnss,, ddeess rrééppeerrttooiirreess eett ddeess ffiicchhiieerrss

  Nous en savons maintenant assez pour parler de placement.  J'ai mis ma
  méthode au point après avoir essayé toutes les combinaisons possibles
  sur mes 3 vieux disques SCSI.

  Les tables données en appendice servent à simplifier le processus.
  Elles vous aideront à optimiser votre système mais aussi à le dépanner
  éventuellement. Quelques exemples sont donnés.


  88..11..  CChhooiissiirr lleess ppaarrttiittiioonnss

  Réfléchissez à vos besoins et posez sur le papier une liste de toutes
  les parties de votre système de fichiers que vous voulez mettre sur
  une partition séparée. Notez la taille de chacune et triez-les par
  vitesse décroissante.

  La table du chapitre ``Appendice A'' est utile pour choisir quels
  répertoires mettre dans quelles partitions.  Elle est triée par ordre
  logique, avec des blancs pour vos notes personnelles et des remarques
  sur les points de montage. Elle n'est PAS triée par vitesse
  décroissante, mais les besoins en vitesse sont indiqués 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
  différents 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.


  88..22..  RRééppaarrttiirr lleess ppaarrttiittiioonnss eennttrree lleess ddiissqquueess..

  Il faut maintenant déterminer sur quelles disques physiques seront
  placées les partitions choisies ci-dessus. Voici un algorithme pour
  optimiser le parallélisme 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 répartit comme
  suit:



               A : 9 4 3
               B : 8 5 2
               C : 7 6 1




  Cela fait une "moyenne des vitesses" à peu près égale sur chaque
  disque.

  Utiliser la table de l'appendice B pour déterminer quels disques
  utiliser pour quelles partitions afin de profiter au maximum du
  parallélisme.

  Notez la vitesse de chacun de vos disques dans la bonne colonne.
  Éventuellement, permutez les répertoires, les partitions et les
  disques jusqu'à être content du résultat.



  88..33..  TTrriieerr lleess ppaarrttiittiioonnss eett lleess ddiissqquueess

  L'étape suivante est de sélectionner les numéros de partition pour
  chaque disque.

  Utilisez la table du chapitre ``appendice C'' pour sélectionner les
  numéros de partitions à l'intérieur de chaque disque. Remplissez avec
  ces valeurs les tables des Appendices A et B.  Ces tables vous
  serviront lorsque vous installerez votre système (étape de
  partitionnement avec fdisk ou cfdisk)


  88..44..  OOppttiimmiissaattiioonn

  Des considérations spécifiques à un matériel 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
  répartition suivante:



               A : 9 6 5
               B : 8 7 4
               C : 3 2 1





  88..44..11..  EEnn tteennaanntt ccoommppttee ddee ssppéécciiffiicciittéé ddeess ddiissqquueess

  Des disques de vitesse globale comparable peuvent s'avérer plus ou
  adaptés à un usage ou à un autre. Comme on l'a déjà dit, les binaires,
  qui sont nombreux et petits, sont bien à leur place dans un disque de
  temps d'accès moyen faible et qui gère une queue des requêtes. 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.


  88..44..22..  UUttiilliissaattiioonn dduu ppaarraalllléélliissmmee

  On peut éviter la surcharge du disque en pensant aux tâches. Par
  exemple si vous exécutez un programme de /usr/local/bin il y a des
  chances que vous accéderez aussi à /usr/local/lib; placer ces deux
  répertoires sur des disques physiquement différents permet de diminuer
  le temps de recherche et autorise les opérations en parallèle ou
  l'utilisation du cache. Des gains de performance surprenants peuvent
  être obtenus ainsi. Identifiez les tâches communes, les partitions
  qu'elles utilisent et gardez ces partitions sur des disques
  physiquement différents.

  Voici quelques exemples:



     LLeess aapppplliiccaattiioonn bbuurreeaauuttiiqquueess
        comme les traitements de texte ou les tableurs sont des exemples
        typiques de logiciels peu gourmands en temps CPU comme en accès
        disque (une fois lancés).  Cepandant, ces logiciels ont souvent
        des fonctions de sauvegarde automatique qui créent du traffic
        dans les répertoires personnels des utilisateurs. Avoir les
        répertoires personnels sur plusieurs disques répartira la
        charge.


     LLeess lleecctteeuurrss ddee NNeewwss
        ont aussi des fonctions de sauvegarde automatique, et les
        fournisseurs d'accès à Internet ont intérêt à séparer les
        répertoires utilisateurs entre plusieurs disques.

        Les queues des serveurs de News (/var/spool/news) sont connues
        pour leurs grand nombre de répertoires 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 système pourra supporter un grand nombre de
        requêtes par seconde. On peut même mettre les news et les
        fichiers .overview sur des disques séparés: voir les FAQs sur
        les serveurs INN à ce sujet.

        Voir aussi la page Web dédiée à l'optimisation des serveurs INN
        <http://www.spinne.com/usenet/inn-perf.html>


     LLeess bbaasseess ddee ddoonnnnééeess
        sont gourmandes en terme d'accès disques comme de temps de
        calcul. Cela dépend beaucoup de l'application envisagée. On peut
        envisager le RAID pour avoir à la fois performance et fiabilité.


     LLee ccoouurrrriieerr éélleeccttrroonniiqquuee
        met en jeu les répertoires des utilisateurs comme les queues de
        courrier arrivé/à envoyer.  Si possible garder les répertoires
        des utilisateurs et les queues sur des disques différents. Pour
        un serveur de courrier on peut envisager de mettre les queues de
        courrier reçu et à envoyer sur des disques différents.

        Perdre du courrier est extrêmement gênant, si vous êtes un
        fournisseur d'accès ou un routeur. Envisager le RAID et faire
        des sauvegardes fréquentes.


     LLee ddéévveellooppppeemmeenntt ddee llooggiicciieellss
        peut demander un grand nombre de répertoires pour les binaires,
        les librairies, les fichiers d'en-tête, les sources et
        l'archive. Séparer autant que possible tous ces répertoires. Sur
        des petits systèmes vous pouvez placer /usr/src et l'archive sur
        le même disque que les répertoires personnels.


     SSuurrffeerr ssuurr llee NNeett
        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 précédents, la vitesse compte.
        Cepandant, si vous êtes connectés à un bon serveur de proxy les
        utilisateurs n'ont plus besoin de cache individuel.  Voir aussi
        ``Les répertoires personnels des utilisateurs'' et ``Le Web''.



  88..55..  BBeessooiinnss eett uussaaggee

  Lorque vous achetez une boîte de 10 cédéroms 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.



     TTeesstteerr
        Linux est simple et vous n'avez même pas besoin d'un disque dur
        pour cela. Il sufit d'une disquette de démarrage comme celles
        fournies avec les distributions. Si vos périphérique ne sont pas
        supportés, n'oubliez pas qu'il y a souvent plusieurs versions de
        disquette de démarrage pour les périphériques exotiques qui
        peuvent vous dépanner jusqu'à la compilation d'un noyau
        personnalisé.


     AApppprreennddrree
        comment marche un système d'exploitation est très facile avec
        Linux:  c'est un système 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.


     SSii ççaa ddeevviieenntt uunn hhoobbbbyy
        des programmes plus nombreux sont nécessaires, mais 500 Mo sur
        un seul disque devraient suffire pour les binaires, les sources
        et la documentation.


     PPoouurr uunn uussaaggee pprrooffeessssiioonnnneell
        ou amateur sérieux, il faut encore plus de place, des queues
        pour le courrier électronique et les nouvelles, etc. Séparer les
        fichiers entre plusieurs disques peut être bénéfique. La place
        requise est plus difficile à estimer, mais 2 à 4 Go devraient
        être plus que suffisants, même pour un petit serveur.


     LLeess sseerrvveeuurrss
        vont du simple serveur de courrier électronique au gros serveur
        pour un fournisseur d'accès à Internet. Compter 2 Go pour le
        système de base, ajouter ensuite de la place (et probablement
        des disques) pour chaque service proposé. Le coût est ici le
        facteur limitant mais si on veut justifier le S de Service il
        faut bien dépenser un peu. J'admets que tous les fournisseurs
        d'accès ne le font pas.



  88..66..  SSeerrvveeuurrss

  Dans les appendices on trouvera les valeurs à employer pour un serveur
  départemental (de 10 à 100 utilisateurs). Dans cette section on
  parlera des grands serveurs. De manière générale 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
  système RAID. Ce qui est mentionné ici s'ajoute aux remarques
  précédentes.

  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 idée de réserver un ou plusieurs disque SCSI pour chaque tâche.
  Cela permet de récupérer efficacement les données 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 données, donc vous devez garder une copie papier
  de votre fichier /etc/fstab comme des numéros de série des disques
  SCSI.


  88..66..11..  RRééppeerrttooiirreess ppeerrssoonnnneellss ddeess uuttiilliissaatteeuurrss

  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 répartir la
  charge entre les disques. Par exemple vous pouvez utiliser les deux
  premières 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.


  88..66..22..  SSeerrvveeuurr FFTTPP aannoonnyymmee

  C'est un équipement essentiel si vous attachez de l'importance à la
  notion de service. Les bons serveurs sont bien maintenus, documentés,
  à jour, et très 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 général c'est plutôt la bande passante du réseau 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 mémoire vive est importante aussi: 256 Mo
  pour un gros serveur mais de plus petits peuvent se contenter de 64
  Mo.


  88..66..33..  LLaa ttooiillee ((WWWWWW))

  Pour beaucoup c'est la principale raison d'aller sur l'Internet. En
  plus de consommer de la bande passante, cette activité génère des
  besoins en cache disque. Garder le cache sur un disque rapide, à part
  peut être intéressant. Avoir un serveur de proxy est encore mieux.
  Cela peut réduire la taille du cache pour chaque utilisateur et
  accélérer le service en diminuant la bande passante utilisée.

  Un serveur de cache a besoin d'un ensemble de disques rapides, le
  RAID0 est idéal dans ce cas car la fiabilité n'est pas primordiale.  2
  Go devraient suffire. Ne pas oublier d'adapter la durée de vie des
  pages dans le cache à la capacité disque et aux besoins. On peut
  adapter la durée 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 détails.


  88..66..44..  CCoouurrrriieerr éélleeccttrroonniiqquuee

  La plupart des machines manipulent, peu ou prou, du courrier
  électronique. Cependant, les grands serveurs de courrier forment une
  catégorie à part. C'est une tâche très exigeante et même un gros
  serveur doté de disques rapides et d'une bonne connexion au réseau
  peut se révéler lent à l'usage. A la différence des news qui sont
  réparties sur plusieurs serveurs, le courrier électronique est
  centralisé. La sécurité est donc bien plus importante. Pour un gros
  serveur envisagez une solution RAID redondante (RAID4 ou RAID5).


  88..66..55..  NNeewwss

  C'est une tâche qui demande de grands volumes, mais cela dépend
  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 hiérarchie
  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 prétendre assurer un "Service
  d'Accès à 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 croître.



  88..66..66..  AAuuttrreess

  Il y a plein de services disponibles sur Internet, même 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
  appréciables.


  88..77..  PPiièèggeess

  Les dangers de tout scinder entre des partitions distinctes sont
  mentionnés 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, même 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 terminés 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'accès en parallèle à plusieurs partitions


  88..88..  CCoommpprroommiiss

  Une manière d'éviter le piège 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 répertoires (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
  mêmes propriétés à tous les sous-répertoires de chacun de ces
  répertoires, et nous voulons l'éviter. Tailler 4 partitions pour ces 4
  répertoires ferait perdre de la flexibilité, nous l'éviterons aussi.
  La bonne solution est de faire de ces 4 répertoires des liens
  symboliques vers les bons répertoires 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 répertoires rapides sur le disque rapide sans
  avoir à faire une partition pour chacun d'entre eux.

  Le désavantage est que c'est relativement compliqué et qu'il faut
  prévoir tous les points de montage, liens symboliques et partitions
  avant d'installer le système.
  99..  IImmpplléémmeennttaattiioonn

  Les distributions récentes ont des outils qui vous guideront pour le
  partitionnement et le formatage des disques, et généreront un fichier
  /etc/fstab automatiquement. Mais pour y faire des modifications par la
  suite, vous devez comprendre les mécanismes que ça met en jeu.


  99..11..  DDiissqquueess eett PPaarrttiittiioonnss

  Avec DOS ou autre vous trouvez toutes les partitions avec des noms
  comme C: D:, sans différenciation pour les disques IDE, SCSI, réseau,
  etc. Dans le monde de Linux c'est différent. Au démarrage 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 périphériques (souris, clavier, disquette, etc), voir
  /dev/MAKEDEV et /usr/src/linux/Documentation/devices.txt.

  Les partitions sont notées par des numéros 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 montées selon les indication du fichier /etc/fstab
  pour que les fichiers qu'elles contiennent soient accessibles.


  99..22..  PPaarrttiittiioonnnneemmeenntt

  D'abord vous devez partitionner chaque disque. Sous Linux il y a deux
  méthodes, 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 possibilités, comme fdisk ou fips. Ce dernier a l'avantage
  qu'il peut partitionner un disque sans nécessairement écraser toutes
  les données. Avant de lancer fips vous devez défragmenter votre
  disque. Si vous utilisez FAT32 vous pouvez utiliser la dernière
  version de fips (à partir de 15c).

  Il faudra d'abord défragmenter. Cela mettra toutes les données au
  début du disque, et l'espace vide restant peut être utilisé pour
  tailler de nouvelles partitions.

  De toute façon, il est indispensable de faire une sauvegarde complète
  de toutes vos données importantes avant de partitionner.

  Il y a trois types de partitions, primaire, étendue and logique. On ne
  peut démarrer que sur une partition primaire, et le nombre de
  partitions primaires est limité à 4. Si vous avez besoin de plus de
  partitions, vous devez définir des partitions étendues, qui
  contiendront de partitions logiques.

  Chaque partition a un numéro qui indique quel système 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 tâches. Cependant cet outil n'est pas tout à fait mature:
  s'il ne fait pas ce que vous voulez, utilisez plutôt fdisk ou cfdisk.


  99..33..  DDiissqquueess MMuullttiipplleess (( mmdd ))

  Assurez-vous que vous avez la documentation la plus récente sur cette
  fonctionnalité du noyau. Ce n'est pas encore stable, vous voilà
  prévenu.

  En bref cela consiste à rassembler des partitions en de nouveaux
  périphériques md0, md1 etc. en utilisant mdadd, puis à les activer
  avec mdrun. Cela peut être automatisé avec le fichier /etc/mdtab.

  On peut ensuite considérer md0, md1 comme n'importe quel disque. Il y
  a maintenant un HOWTO sur le RAID avec md auquel je vous renvoie pour
  les détails.


  99..44..  FFoorrmmaattaaggee

  Après le partitionnement vient le formatage, c'est-à-dire l'écriture
  des structures de données qui permettront de décrire les attributs et
  la position des fichiers. Si c'est la première 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 résoudre
  des problèmes comme la terminaison (pour le SCSI). Voir la
  documentation de mkfs pour les détails.

  Linux est compatible avec un nombre impressionnant de systèmes de
  fichiers. Faire man fs pour la liste complète. Notez que votre noyau
  doit avoir le pilote adéquat pour pouvoir accéder à un système de
  fichiers. Lors de l'étape de configuration du noyau (make menuconfig
  ou make xconfig) vous avez de l'aide en ligne pour chaque système 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 systèmes de
  fichiers minix, msdos et ext2fs compilés dans le noyau.

  Les partitions de swap (échange) doivent aussi êtres formatées,
  utilisez mkswap pour ça.


  99..55..  MMoonnttaaggee

  Les données d'une partitions ne sont pas visibles avant d'êtres
  montées 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 démarrage. La liste des partitions avec leur
  point de montage est dans le fichier /etc/fstab. Lisez le manuel de
  mount et faites très attention aux tabulations dans le fichier
  /etc/fstab (elles ne sont pas équivalentes à des espaces).


  1100..  MMaaiinntteennaannccee

  C'est le travail de l'ingénieur système de garder un oeil sur les
  disques et les partitions. Si une partition est pleine, le système
  aura des dysfonctionnements, quelle que soit la place libre sur les
  autres partitions.
  Pour voir la liste des partitions actuellement montées, avec le point
  de montage et le pourcentage de place libre, taper df.  Cela doit être
  fait régulièrement, par exemple avec une crontab.

  Les partitions de swap peuvent être surveillées avec les outils de
  statistique de la mémoire comme free, procinfo ou top.

  Surveiller l'usage des disques est plus délicat mais c'est important
  pour les performances. Il faut éviter que le même disque soit
  sollicité tout le temps quand d'autres sont inactifs.

  Il est important quand on installe un logiciel de savoir précisément
  où vont les fichiers. Ainsi, pour des raisons historiques, GCC qui met
  des exécutables dans les répertoires de librairie. On peut aussi
  mentionner X11 dont la structure est très complexe.

  Lorsque votre système 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 paramètres globaux du shell
  peut vous aider à éviter d'avoir des fichiers core un peu partout.


  1100..11..  SSaauuvveeggaarrddee

  Le lecteur attentif aura remarqué les allusions répétés à 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 avérée inutilisable, voire inexistante. Il est en
  général plus simple d'investir dans des moyens de sauvegarde décents
  que de se trouver une seconde identité ...

  Il y a de nombreuses possibilités, et un mini-HOWTO ( Backup-With-
  MSDOS ) détaille tout ce que vous devez savoir, en plus d'informations
  spécifiques à MSDOS.

  En plus de faire des sauvegardes, vous devez vous assurer que vous
  pouvez retrouver les données. Les données écrites ne sont pas toujours
  correctes, et de nombreux administrateurs systèmes ont un jour
  commencé à restaurer le système après un accident, joyeux à la pensée
  que tout marchait, lorsqu'ils découvrirent avec horreur que les
  sauvegardes n'étaient pas utilisables. Soyez prudents.


  1100..22..  DDééffrraaggmmeennttaattiioonn

  Cela varie beaucoup selon le système de fichiers. Certains souffrent
  d'une défragmentation rapide et presque paralysante. Heureusement ce
  n'est pas le cas de ext2fs et c'est pourquoi on a très peu parlé des
  outils de défragmentation. En fait, il en existe, mais il est rare
  qu'on en aie même 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 récupération. Si
  cela ne concerne qu'une petite partie des fichiers, pas exemple les
  répertoires 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.


  1100..33..  EEffffaacceemmeenntt

  Le plus souvent le manque de place est résolu par l'effacement des
  fichiers inutiles qui s'accumulent. Les programmes qui ne terminent
  pas normalement laissent toutes sortes de trucs traîner 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 déboguer. Ces fichiers peuvent se
  trouver n'importe où dont il est recommandé de les chercher de façon
  globale. (ndT: find / -name core devrait marcher)

  L'arrêt prématuré des programmes laisse aussi des fichiers temporaires
  dans des répertoires comme /tmp ou /var/tmp, fichiers qui auraient été
  effacés si le programme avait terminé normalement. Ces répertoires
  sont en général nettoyés au démarrage, mais si vous ne redémarrez
  jamais ils peuvent finir par être plein de vieux trucs. N'effacez pas
  les fichiers aveuglément. Des utilitaires comme find et file peuvent
  vous servir à localiser les fichiers plus vieux que telle date et à
  connaître le type d'un fichier.

  Beaucoup de choses sont archivés lorsque le système fonctionne, en
  particulier dans le répertoire /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 système
  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 affichés par ls -l, c'est pourquoi on
  recommande d'utiliser plutôt ls -Al.

  Le dépassement de capacité des répertoires utilisateurs est une
  question délicate. De véritables guerres ont déjà eu lieu entre
  utilisateurs et administrateurs à ce sujet. Le tact, la diplomatie et
  un budget généreux 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 défaut
  pour empêcher 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 inaperçu à côté de . et .. si on fait ls
  -al. La solution est de faire ls -Al qui affiche tous les fichiers
  sauf . et ..


  1100..44..  MMiisseess àà jjoouurr

  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 côté 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
  réinstallation complète de la toute dernière version de votre
  distribution préférée. Dans ce cas faites très attention à ne pas
  écraser vos réglages essentiels. Les fichiers de configuration sont
  pour la plupart dans le répertoire /etc. Procéder avec soin, avec une
  sauvegarde récente et des disquettes de sauvetage qui marchent. Une
  autre possibilité que la réinstallation est de simplement copier le
  vieux répertoire vers le nouveau, qui est monté sur un point de
  montage provisoire. Puis éditer le fichier /etc/fstab pour que le
  chemin du répertoire pointe vers la nouveau, et redémarrez. Si le
  démarrage échoue, vous pouvez redémarrer avec une disquette de
  secours, éditer à nouveau /etc/fstab et réessayer.

  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
  découvrez que vous devez restaurer le système d'après une sauvegarde.

  Le Tips-HOWTO donne l'exemple suivant pour déplacer toute une
  structure de répertoire:

  ______________________________________________________________________
  (cd /source/directory; tar cf - . ) | (cd /dest/directory; tar xvfp -)
  ______________________________________________________________________



  Ça marchera sur la plupart des systèmes Unix. Attention aux
  répertoires dont la structure arborescente est trop profonde, elle
  peut faire échouer un tar autre que GNU tar.

  Si vous avez accès à GNU cp (c'est toujours le cas sous Linux) vous
  pouvez aussi bien utiliser


  ______________________________________________________________________
  cp -av /source/directory /dest/directory
  ______________________________________________________________________



  GNU cp sait se débrouiller avec les liens symboliques, les FIFO et les
  fichiers de périphériques et les copier correctement.

  Rappelez-vous que ce n'est jamais une bonne idée de transférer /dev ou
  /proc


  1111..  UUttiilliissaattiioonn aavvaannccééee

  Linux et ses cousins offrent de nombreuses possibilités pour une
  destruction rapide et efficace du système. Ce document n'y fait pas
  exception. Avec le savoir vient le pouvoir et donc le danger, et les
  paragraphes qui suivent présentent des sujets plus ésotériques qui ne
  devraient pas être abordés avant d'avoir lu et compris la
  documentation et les pièges. Vous devriez faire une sauvegarde, et
  essayer au moins une fois d'écraser et de restaurer complètement votre
  système. Sinon vous ne serez pas le premier à avoir une superbe
  sauvegarde et rien pour la réinstaller (ou, encore plus gênant, des
  fichiers essentiels manquent sur la bande).

  Les techniques décrites ici sont rarement utiles mais servent à des
  installations particulières. Pensez sérieusement à ce que vous voulez
  faire avant d'aller plus loin.





  1111..11..  PPaarraammèèttrreess dduu ddiissqquuee dduurr

  Les paramètres physiques du disque dur peuvent être changés avec
  l'utilitaire hdparms. Le paramètre le plus intéressant est sans doute
  _r_e_a_d_-_a_h_e_a_d qui détermine combien de bits on doit lire d'avance en
  lecture séquentielle.

  Ce qui fait le plus de sens est de sélectionner 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 spécialisés dans les news ou le courrier électronique des
  grands serveurs.

  Pour des raisons de sécurité les valeurs par défaut de hdparm sont
  plutôt conservateurs. L'inconvénient est que vous pouvez avoir des
  interruptions qui se perdent si vous avez des IRQ à grande fréquence
  comme lorsqu'on utilise le port série et un disque IDE en même temps,
  les IRQ du disque vont masquer les autres. Ce qui entraîne des
  performances tout sauf optimales lors du téléchargement sur Internet.
  Sélectionner hdparm -u1 device enlèvera ce masquage et même améliorera
  vos performances, ou bien endommagera les données du disque. A essayer
  avec prudence et avec des sauvegardes récentes.


  1111..22..  PPaarraammèèttrreess dduu ssyyssttèèmmee ddee ffiicchhiieerrss

  La plupart des systèmes de fichiers viennent avec un utilitaire de
  configuration: ainsi tune2fs pour ext2fs.  On peut jouer avec
  plusieurs paramètres, mais le plus utile est peut-être la taille qu'on
  peut réserver.  Cela peut vous aider à avoir plus d'espace utile sur
  vos disques. En revanche vous aurez moins de place pour réparer le
  système s'il crashe.


  1111..33..  SSyynncchhrroonniissaattiioonn ddeess aaxxeess

  Cela ne devrait pas être dangereux en soi, mis à part que les détails
  exacts des connections ne sont pas bien connus pour beaucoup de
  disques. La théorie est simple: garder une différence de phase fixe
  entre les différents disques d'un ensemble RAID. Cela diminue le temps
  d'attente pour que la bonne piste soit en position pour la tête de
  lecture/écriture.  En pratique , avec de grands tampons pour la
  lecture d'avance, le gain est négligeable.

  La synchronisation des axes ne doit pas être utilisée dans un ensemble
  RAID0 ou RAID 0/1 car on perdrait le bénéfice d'avoir les têtes de
  lectures sur des emplacements différents.


  1122..  PPoouurr pplluuss dd''iinnffoorrmmaattiioonn

  Il y a pas mal d'information disponible pour ceux qui mettent en place
  un grand système, par exemple les fournisseurs d'accès à Internet.
  Les FAQs des forums suivants sont utiles:


  1122..11..  FFoorruummss

  Parmi les plus intéressants:

  ·  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 destinée à répondre 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>.


  1122..22..  MMaaiilliinngg lliissttss

  Ce moyen de communication destiné aux développeurs 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 développement.
  Parmi les listes qui nous concernent, linux-raid, linux-scsi et linux-
  ext2fs. La plupart des mailing lists intéressantes sont sur le serveur
  vger.rutgers.edu, mais il est vraiment surchargé, essayez plutôt 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 même adresse.  A cause
  du succès de ce serveur il est possible que la réponse prenne un
  certain temps.

  Il y a aussi un certain nombre de serveurs majordomo intéressants,
  comme la liste des pilotes EATA <mailto:linux-eata@mail.uni-mainz.de>
  et la liste des entrées/sorties intelligentes <mailto:linux-
  i2o@dpt.com>.

  Les mailing lists évoluent rapidement mais un certain nombre de listes
  intéressantes sont sur la page du Linux Documentation Project
  <http://sunsite.unc.edu/LDP>.


  1122..33..  HHOOWWTTOO

  Ce sont les premières sources d'information générale, mais on y trouve
  aussi la solution à bien des problèmes spécifiques.  Les HOWTOs
  apparentés à 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 français) est Freenix
  <http://www.freeenix.fr>.

  Il y a un nouveau HOWTO qui parle de la mise en place d'un système
  RAID DPT, voir the DPT RAID HOWTO homepage
  <http://www.ram.org/computing/linux/dpt_raid.html>.


  1122..44..  MMiinnii--HHOOWWTTOO

  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 mêmes endroits que les HOWTOs.

  Le vieux Linux Large IDE mini-HOWTO est obsolète, lisez plutôt
  /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).


  1122..55..  DDooccuummeennttaattiioonn llooccaallee

  Le plupart des distributions Linux ont un répertoire de documentation
  <file:///usr/doc> où l'on trouve souvent un sous-répertoire un sous-
  répertoire pour les HOWTOs <file:///usr/doc/HOWTO>

  Les fichiers de configuration mentionnés plus haut sont dans le
  répertoire /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
  sûr la source ultime d'information.  Pas seulement avec les
  commentaires qui sont dans le code mais aussi avec le répertoire 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 stockés les messages du noyau
  <file:///var/log/messages> permettent de savoir ce qui se passe, en
  particulier si les messages ont défilé trop vite au démarrage. Avec la
  commande tail -f /var/log/messages dans une fenêtre ou un écran
  séparé, vous aurez une information toujours à jour sur ce qui se passe
  dans votre système.

  Vous pouvez aussi utiliser le système de fichiers /proc <file:///proc>
  qui donne de l'info en temps réel sur le système.  Utiliser cat plutôt
  que more pour voir ces fichiers car leur longueur déclarée est zéro.

  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 privée des développeurs.


  1122..66..  PPaaggeess WWWWWW

  Il y a un grand nombre de pages Web intéressantes, et elles bougent
  beaucoup, ne soyez pas étonnés si ces liens deviennent obsolètes.

  Un bon point de départ 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
     contrôleurs RAID, a des pages intéressantes sur SCSI
     <http://www.uni-mainz.de/~neuffer/scsi> et DPT <http://www.uni-
     mainz.de/~neuffer/scsi/dpt>.

  ·  Sur le développement du RAID 1 logiciel, voir la page des
     développeurs 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 détaillée 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'intégrerait à ext2fs et
     s'appelle e2compr. Voir la maison-page de e2compr
     <http://netspace.net.au/~reiter/e2compr.html>.

  ·  Pour plus d'information sur le démarrage et sur BSD voir ici
     <http://www.paranoia.com/~vax/boot.html> page.

  On trouve des tableaux sur les disques, les contrôleurs, etc. à la
  page appelée The Ref <http://theref.c3d.rl.af.mil>.  On peut
  l'interroger en ligne ou télécharger la base de données par FTP
  <ftp://theref.c3d.rl.af.mil/public>.


  1122..77..  MMootteeuurrss ddee rreecchheerrcchhee

  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>, dédié à 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
  plutôt le forum français sur Linux <news:fr.comp.os.linux>)


  1133..  CCoommmmeenntt oobbtteenniirr ddee ll''aaiiddee


  Il se peut que, dans l'incapacité à résoudre vos problèmes par vous-
  même, vous ayez besoin d'aide. Le moyen le plus sûr 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 problème est que
  le rapport signal/bruit des newsgroups est parfois faible et votre
  question peut très bien passer inaperçue.

  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
  précis.

  Il est recommandé de décrire le problème avec assez de détails pour
  permettre aux gens de vous aider. Il peut se produire là où vous vous
  y attendez le moins. Voilà pourquoi il faut décrire:


     MMaattéérriieell

     ·  Le Processeur

     ·  Le chipset (LX, BX, etc)

     ·  Le bus (ISA, VESA, PCI etc)

     ·  Les cartes d'extension (carte graphique, etc.)


     LLooggiicciieell

     ·  La version du BIOS (Pour la carte-mère et éventuellement les
        adaptateurs SCSI)

     ·  LILO, s'il est utilisé

     ·  La version du noyau et les patchs ou modifications éventuels

     ·  Les paramètres du noyau (s'il y en a)

     ·  Les programmes qui font apparaître l'erreur (avec numéro de
        version)


     PPéérriipphhéérriiqquueess

     ·  Type du disque, fabriquant, version et modèle.

     ·  Les autres périphériques présents sur le même bus.


  Un exemple d'inter-relation de ces différents éléments: on a déjà vu
  un vieux chipset qui cause des problèmes 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 à détecter la source du problème). Bien sûr si le disque est en
  panne il est possible que ces messages ne soient pas enregistrés, mais
  on peut au moins scroller en arrière avec les touches SHIFT et PAGE
  UP.


  1144..  RReemmaarrqquueess eenn gguuiissee ddee ccoonncclluussiioonn

  La configuration des disques et le choix des partitions sont
  difficiles, et on n'a pas donné de règles fixes ici. Cependant, y
  travailler un peu peut apporter des gains considérables. 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
  décoration. Avec un système bien fait, les petites diodes qui
  indiquent l'activité des disques doivent clignoter comme des lampes de
  discothèque. Linux permet le RAID au niveau logiciel mais supporte
  aussi quelques contrôleurs RAID SCSI. Vérifiez ce qui est disponible.
  Plus tard, si vous re-partitionnez votre système, vous pourrez jetez à
  nouveau un oeil à ce document. Les commentaires et les contributions
  sont bienvenus.


  1144..11..  EEnn pprrééppaarraattiioonn


  Il y a encore quelques sujets qui vont apparaître ici. En particulier
  je vais ajouter d'autres exemples de tables pour la configuration de
  grands réseaux. Des exemples de réseaux marchant sans problème sont
  les bienvenus.

  Il reste aussi un peu de boulot dans ce HOWTO sur les systèmes de
  fichiers et utilitaires.

  Une grande section sera ajoutés sur les technologies de disque dur
  ainsi qu'une meilleure description sur l'utilisation de fdisk or
  cfdisk. La section sur les systèmes de fichiers se remplira au fur et
  à mesure que les nouveautés sortiront.

  J'ai reçu récemment une plaquette de DPT, qui fabrique le premier
  système RAID hardware supporté par Linux. Leurs feuillets portent
  maintenant le petit pingouin Linux. Bientôt 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 décision, en donnant un point de départ simple et plus complet.


  1144..22..  DDeemmaannddee dd''iinnffoorrmmaattiioonn

  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, précieux lecteurs, pouvez m'apporter.


  ·  Plus d'information sur la taille de swap nécessaire et la plus
     grande taille de swap autorisée avec les différentes versions du
     noyau.

  ·  Est-ce qu'il est fréquent qu'un disque soit abîmé ou qu'un système
     de fichier soit corrompu ? Autant que je me souvienne, je n'ai
     jamais connu que des problèmes dûs à du matériel défectueux.

  ·  J'ai aussi besoin de documentation sur la vitesse comparée des
     disques.

  ·  Y a-t-il d'autres contrôleurs RAID compatibles avec Linux ?

  ·  Des pistes quant aux systèmes de fichiers, à la gestion de volumes
     et assimilés sont bienvenues.

  ·  Quels utilitaires dignes d'intérêt sont disponibles ?

  ·  Il faudrait aussi une liste complète des sources d'information.
     Peut-être sur un document séparé ?

  ·  L'usage de /tmp et /var/tmp est difficile à déterminer, en fait
     savoir quels programmes utilisent quel répertoire n'est pas
     évident, plus d'information à ce sujet est bienvenue. Cependant, il
     reste clair que ces deux répertoires doivent être sur des disques
     différents pour profiter du parallélisme.




  1144..33..  SSuuggggeessttiioonnss ppoouurr ppaarrttiicciippeerr àà uunn pprroojjeett..

  Sur les forums comp.os.linux.* on trouve plein de bonnes idées. Je
  vais en lister ici quelques-uns en rapport avec notre sujet.  Les
  projets ambitieux comme un nouveau système de fichiers doivent
  toujours être postés soit pour trouver des collaborateurs soit pour
  voir si quelqu'un ne travaille pas déjà dessus.



     DDeess oouuttiillss ddee PPllaannnniinngg
        qui automatisent la conception d'un système constituent un
        projet de taille moyenne. Une sorte d'exercice en programmation
        par contraintes.


     DDeess oouuttiillss ddee ppaarrttiittiioonnnneemmeenntt
        qui acceptent en entrée le résultat du programme mentionné ci-
        dessus et formatent les disques en parallèle puis créent
        l'arborecence de fichiers avec les bons liens symboliques. Ce
        serait encore mieux si on intégrait ça à des programmes
        d'installation existants. Le programme d'installation de Solaris
        est un bon exemple à méditer.


     DDeess oouuttiillss ddee ssuurrvveeiillllaannccee
        qui surveillent les partitions et tirent la sonnette d'alarme
        avant qu'elles soit pleines.


     DDeess oouuttiillss ddee mmiiggrraattiioonn
        qui permettent de déplacer sans danger des arborescences
        entières (par exemple pour migrer vers un système RAID).  Ce
        serait par exemple un script shell assez simple contrôlant un
        programme de sauvegarde. Cependant, veillez à ce qu'il soit
        sécurisé et qu'il permette de revenir en arrière.



  1155..  QQuueessttiioonnss // RRééppoonnsseess

  Voici quelques questions fréquentes et leur réponse.


  ·  Q: De combien de disque dur Linux a besoin ?

  ·  R: Linux marche très bien avec un seul disque dur. Avoir assez de
     mémoire 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 désavantages dans ce cas ?

  ·  R: Un seul petit désavantage. Si une partition n'a plus de place
     libre, le système peut se bloquer ou se comporter bizarrement. La
     gravité dépend bien sûr de la partition affectée. Cependant, ce
     n'est pas difficile à contrôler, avec la commande df qui donne une
     vue générale de la situation. Utiliser aussi la commande free pour
     s'assurer que la mémoire virtuelle (c'est-à-dire la mémoire vive +
     le swap) est suffisante.

  ·  Q: OK, je dois donc séparer mon système entre autant de partitions
     que possible pour un seul disque ?

  ·  R: Non, car cela a plusieurs désavantages. D'abord la maintenance
     est plus complexe et le gain peut être mineur. Des partitions trop
     grandes ne sont pas non plus l'idéal. Il y a un juste milieu, qui
     dépend 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 répertoires ne doivent pas
     être séparés de la racine (voir le FHS pour les détails)

  ·  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 détails.

  ·  Q: J'ai installé le dernier Windows95 mais je n'arrive pas à
     accéder aux partitions Windows depuis Linux.

  ·  R: Sans doute votre partition Windows est formatée en FAT32. C'est
     le cas pour Windows 95 OSR2 et pour Windows 98.  Linux a un support
     pour ce système 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 répertoire vide. Le point de montage est un
     répertoire et s'il n'est par vide le montage masquera son contenu.
     Et en faisant la somme vous verrez qu'il manque la place occupée
     par le contenu de ce répertoire avant montage.

     Pour résoudre ça vous pouvez démarrer depuis une disquette de
     sauvetage et voir ce qui se cache derrière les points de montage.
     Vous pouvez ensuite effacer ou transférer ces données 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 système utilisant les Unix libres et avec 10000
     utilisateurs. Je m'en sers pour héberger mes pages Web mais aussi
     comme source d'inspiration pour ce HOWTO, en ce qui concerne la
     configuration de réseaux assez vastes. Voir la page d'accueil de
     Nyx <http://www.nyx.net> qui indique aussi comment obtenir un
     compte gratuit.



  1166..  BBrriicc--àà--bbrraacc

  C'est une section où vont tous les paragraphes que je n'ai pas pu
  caser ailleurs: ils y restent plus ou moins longtemps.


  1166..11..  CCoommbbiinneerr llee sswwaapp  eett //ttmmpp

  On a discuté dans les forums linux au sujet de systèmes de fichiers
  spécialisés 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
  système de fichiers spécialisé 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
  limitée, ce qui revient à metter les fichiers temporaires sur la
  partition de swap.

  Il y a pourtant un hic. Ce schéma interdit d'agir en parallèle 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 problème de sécurité vis-à-vis des utilisateurs qui
  tentent d'effondrer une machine en remplissant le répertoire /tmp.


  1166..22..  DDiissqquueess ddee sswwaapp  eennttrreellaaccééss..

  Les partitions de swap sont accédées par la méthode du colibri
  (c'est-à-dire dans le désordre), afin de répartir grosso modo la
  charge entre plusieurs disques.  Linux offre en plus la possibilité
  d'attribuer des priorités aux disques, ce qui est utile si on a des
  disques de vitesse différente.  Voir man 8 swapon et man 2 swapon pour
  les détails.


  1166..33..  FFaauutt--iill aavvooiirr oouu nnoonn uunnee ppaarrttiittiioonn ddee sswwaapp ??

  Dans de nombreux cas vous n'avez pas besoin d'une partition, par
  exemple si vous avez beaucoup de mémoire 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 système ou avec la commande top) s'il y a des moments
  où vous n'avez plus de mémoire libre.

  Enlever la partition de swap a deux avantages:

  ·  Vous gagnez de la place disque

  ·  Vous gagnez sur le temps moyen d'accès 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
  chauffées: on n'en a pas besoin la plupart du temps, mais c'est bien
  agréable parfois. (ndT: Ah qu'en termes galants ces choses-là sont
  mises !)


  1166..44..  PPooiinnttss ddee mmoonnttaaggee eett //mmnntt


  Dans une ancienne version de ce document, je proposais de mettre
  toutes les partitions montées sur des sous-répertoires de /mnt. C'est
  cependant une mauvaise idée car /mnt lui-même peut être utilisé comme
  point de montage, ce qui rend toutes les autres partitions
  inaccessibles. (voir Questions et Réponses). Je propose plutôt 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. Espérons que le FHS mettra de l'ordre dans tout ça.


  1166..55..  SSCCSSII:: nnuumméérrooss eett nnoommss ssyymmbboolliiqquueess



  Les partitions sont nommées dans l'ordre où elles sont trouvées, et ne
  dépendent pas du numéro SCSI. Cela signifie que si vous ajoutez un
  disque avec un numéro intermédiaire, ou si vous changez les numéros
  d'une autre manière, 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 réserver les premiers numéros
  aux disques fixes et les derniers pour les media amovibles.

  Beaucoup se sont fait avoir par cette ``feature'' et réclament 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 idée
  de mettre le disque contenant la partition racine au premier numéro
  SCSI. Ainsi il ne sera pas re-numéroté si un autre disque a une panne.

  Le coeur du problème est le nombre limité de bits disponibles pour les
  numéros majeurs et mineurs des fichiers du répertoire /dev utilisés
  pour décrire le device lui-même. Voir man MAKEDEV.  Actuellement deux
  solutions sont envisagées:

     ssccssiiddeevv
        crée une base de données avec les disques et l'endroit où ils
        sont, voir  man scsifs.

     ddeevvffss
        est un projet à plus long terme, qui veut contourner tout la
        numérotation des fichiers de périphériques en faisant du
        répertoire /dev un répertoire dy noyau tout comme /proc. A
        suivre.

  Les numéros SCSI sont aussi utilisés pour l'arbitrage. Si plusieurs
  disques demandent un service, le disque qui a le numéro le plus faible
  a la priorité.


  1166..66..  CCoonnssoommmmaattiioonn eett CChhaalleeuurr

  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 même à eau. La technologie a progressé très
  vite, offrant des composants rapides mais aussi peu gourmands en
  énergie. Cependant, il y a des choses qu'on doit garder en tête avant
  d'ajouter à l'ordinateur un disque ou une carte PCI. Gardez à l'esprit
  que l'énergie consommée va bien quelque part, et que la plupart est
  transformée en chaleur. Si la chaleur n'est pas dissipée, il en
  résultera une surchauffe qui diminue la fiabilité et la durée de vie
  des composants. Les constructeurs ont de exigences de refroidissement,
  en termes de mètres cubes par minute, et on ne saurait trop conseiller
  d'en tenir compte.

  Gardez des passages pour l'air, nettoyez la crasse et vérifiez la
  température des disques. S'il sont brûlants au toucher, c'est sans
  doute qu'ils sont en surchauffe.

  Si possible utilisez l'accélération séquentielle (_s_e_q_u_e_n_t_i_a_l _s_p_i_n_-_u_p)
  pour les disques. C'est l'accélération qui consomme le plus
  d'électricité et si tous les disques démarrent en même temps vous
  risquez de dépasser la puissance fournie par votre alimentation.


  1166..77..  DDeejjaanneewwss

  C'est un système que la plupart conaissent déjà. Il permet d'effectuer
  des recherches parmi les articles postés 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 parallèles, la plupart utilisant le module md pour gérer 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 mémoire vive ou
  plus.

  Une machine de la base de données a normalement 1 disque pour le
  système d'exploitation et entre 4 et 6 disques gérés par md où les
  articles sont archivés. Les disques sont connectés à un adaptateur PCI
  SCSI (BusLogic Modèle BT-946C ou BT-958), un par machine.

  Les erreurs disque ne constituent que 0,25% des indisponibilités du
  système.

  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 Télécom utilise un nombre comparable
  de stations Linux pour un moteur de recherche)


  1166..88..  SSttrruuccttuurree ddee llaa hhiiéérraarrcchhiiee ddeess ffiicchhiieerrss

  Il y a beaucoup de schémas pour les hiérarchies de fichiers, qui
  diffèrent du FHS par la philosophie, la stratégie et l'implémentation.
  Il n'est pas possible de les détailler ici, le lecteur est renvoyé à
  man hier qui est disponible sur beaucoup d'architectures.


  1166..99..  NNuumméérroottaattiioonn ddeess ppiisstteess eett ooppttiimmiissaattiioonn

  Autrefois les systèmes de fichiers utilisaient les paramètres
  physiques du disque pour optimiser les transferts, par exemple en
  essayent de metter tout un fichier dans la même piste afin
  d'économiser les temps du changement de piste. Aujourd'hui avec les
  paramètres logiques, le cache et les schémas pour éviter les secteurs
  défectueux, ce genre d'optimisation ne fait plus de sens et peut même
  coûter plus cher qu'elle ne rapporte. Certains systèmes d'exploitation
  utilisent encore ce genre d'algorithmes, mais plus Linux.




  1177..  ssyymmbboolliiqquueess AAppppeennddiiccee AA:: PPaarrttiittiioonnnneemmeenntt:: ppooiinnttss ddee mmoonnttaaggee eett
  lliieennss


  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 accéder à une partition ou
  périphérique. Cette table est aussi l'endroit idéal pour noter les
  liens (ou raccourcis) que vous établirez. La taille correspond à une
  installation assez complète de Debian 1.3.











  Répertoire      Point de montage  vitesse temps   taux       taille
                                            moyen   de
                                            d'accès 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 :                                             ____





  1188..  AAppppeennddiiccee BB:: PPaarrttiittiioonnnneemmeenntt:: eemmppllaacceemmeenntt ddeess ppaarrttiittiioonnss


  Ici vous choisirez dans quel disque va chacune des partitions de la
  table précédente, en gardant à l'esprit les remarques dans la section
  ``postition physique des pistes''.












    Disque          sda     sdb     sdc     hda     hdb     hdc     ___

  No SCSI         |  __   |  __   |  __   |

  Répertoire

  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:





  1199..  AAppppeennddiiccee CC:: PPaarrttiittiioonnnneemmeenntt:: nnuumméérroottaattiioonn

  Cette troisième table sert juste à trier les partitions en attribuant
  un numéro à chacune, sous la forme attendue par fdisk.  Ici vous
  pouvez tenir compte de la position physique des pistes pour
  l'optimisation.

  Ces numéros seront utilisés pour mettre à jour les tables précédentes:
  les trois tables sont très utiles pour la maintenance.

  En cas de crash disque, vous trouverez utile de savoir quel numéro
  SCSI correspond à quel disque, gardez en conséquence 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              :       :       :       :       :       :       :






  2200..  AAppppeennddiiccee DD:: EExxeemmppllee 11:: sseerrvveeuurr ggéénnéérraalliissttee

  La table suivante montre la configuration d'un serveur généraliste de
  taille moyenne. C'est un serveur réseau (DNS, courrier électronique,
  FTP, news, imprimante partagée, etc.), un serveur X pour plusieurs
  programmes de CAO, un serveur de cédérom 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 séparant /usr/local de /usr mais
  on a supposé ça n'en valait pas la peine vue la complexité de gestion
  que cela entraîne. 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 répartira
  la charge principale entre ces deux-là. Pour réduire le déséquilibre
  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 contrôleur RAID matériel
  était au-delà du budget.


  2200..11..  PPooiinnttss ddee mmoonnttaaggee eett lliieennss













  Répertoire      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





  2200..22..  eemmppllaacceemmeenntt ddeess ppaarrttiittiioonnss
























  Répertoire        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  |






  2200..33..  NNuumméérroottaattiioonn




                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  :








  2211..  AAppppeennddiiccee EE:: EExxeemmppllee 22:: sseerrvveeuurr eenn mmiilliieeuu uunniivveerrssiittaaiirree


  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 répertiore pour les fichiers de log et de
  cache d'un serveur de proxy Web qui s'appelle "delegated". Il y a 1000
  à 1500 requêtes 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 utilisés, comme les données expérimentales (et spécialement
  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 dépannage. Une disquette de démarrage est faite
  pour démarrer sur cette partition.
















































  =================================================

  Répertoire                 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 même partition si l'espace disque vient à manquer.

  /mnt.lib semble aussi trop grand, mais je prévois une nouvelle
  installation de TeX et de ghostcript, ce qui prend 100 Mo avec les
  fontes japonaises !

  Le système est sauvegardé sur un Seagate Tapestore 8000 (Travan TR-4,
  4G/8G).




  2222..  AAppppeennddiiccee FF:: EExxeemmppllee 33:: SSPPAARRCC SSoollaarriiss


  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 données.

  La simplicité prime ici, donc /usr/lib n'a pas été séparé de /usr.

  C'est une configuration classique, prévue pour 100 utilisateurs.



          Disque:       SCSI 0                     SCSI 1

          Partition     Taille(Mo)  Montée sur     Taille (Mo) Montée 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 spécifiques à ce serveur, il est parfois
  nécessaire 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é utilisée un certain temps avec succès.

  Pour un système général et plus équilibré il faudrait échanger /tmp et
  /var/tmp puis déplacer /var vers le disque 1.


  2233..  AAppppeennddiiccee GG:: EExxeemmppllee 44:: SSeerrvveeuurr aavveecc 44 ddiissqquueess


  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 matériel 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 optimsée vis-à-vis du positionnement des pistes
  mais aussi pour diminuer le temps d'accès moyen.

  Si vous voulez DOS ou Windows vous devrez utiliser sda1 et décaler les
  autres partitions. Il serait intéressant d'utiliser le swap de sdb2,
  sdc2 et sdd2 pour le swap de Windows et pour le répertoire temporaire
  de Windows. Voir les HOWTOs qui expliquent comment faire cohabiter
  plusieurs systèmes 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 combinées en RAID
  0 avec deux exceptions, le swap qui est entrelacé, et et les
  partitions home et mail qui sont réalisées en RAID 1 pour des raisons
  de sécurité.

  Notez que les fichiers de démarrage et la racine sont séparés: seuls
  les fichiers de démarrage doivent être placés en-desous de la limite
  du 1023-ième cylindre. Le reste de la racine peut être placé n'importe
  où, et ici ils sont placés sur la partition la plus lente et la plus à
  l'extérieur. Par simplicité et pour la sécurité, la partition racine
  n'est pas un système RAID.


  2244..  AAppppeennddiiccee HH:: EExxeemmppllee 55:: AAvveecc 22 ddiissqquueess


  Avec deux disques on peut faire moins de choses compliquées mais le
  schéma ci-dessous devrait donner un point de départ:



       Partition       sda             sdb
                       ----            ----
               1       boot            lib
               2       swap            news
               3       /tmp            swap
               4       /usr            /var/tmp
               5       /var            /home
               6       / (root)





  2255..  AAppppeennddiiccee II:: EExxeemmppllee 66:: AAvveecc uunn sseeuull ddiissqquuee


  Même si ça tombe hors du champ de ce HOWTO, il est indéniable que les
  très 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 intéressant de constater que les gens n'ont
  auun problème à remplir de tels disques, et l'avenir semble très rose
  pour les fabricants qui prévoient des disques encore plus gros.


  Bien sûr 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 tête.



       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 système de fichiers DOS qui doit être
  sur la toute dernière partition, sinon Windows plante.







































  Réseau 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, Août 1999.

  Auteurs précédents: Terry Dawson (auteur principal), VK2KTJ; Alessan­
  dro Rubini (mainteneur) Le système Linux possède un support réseau
  inclus dans le noyau et écrit presque entièrement à partir de zéro.
  Les performances de l'implémentation tcp/ip des derniers noyaux en
  font une alternative digne de respect même vis à vis de ses meilleurs
  concurrents.  Le but de ce document est de décrire comment installer
  et configurer le logiciel de réseau sous Linux, ainsi que les outils
  nécessaires.
  ______________________________________________________________________

  Table des matières

















































  1. Introduction

  2. Historique du document

     2.1 Retour d'informations

  3. Comment utiliser ce document.

     3.1 Les conventions utilisées dans ce document

  4. Informations générales concernant le réseau  sous Linux.

     4.1 Brève histoire du développement du noyau du réseau Linux.
     4.2 Informations sur la couche réseau de Linux.
     4.3 Où obtenir des informations sur le réseau,  non spécifiques de Linux.

  5. Informations générales concernant la configuration réseau

     5.1 De quoi ai-je besoin pour démarrer ?
        5.1.1 Sources du noyau récentes (Optionnel).
        5.1.2 Outils de réseau récents
        5.1.3 Applications réseau
        5.1.4 Adresses et explications.
     5.2 Où mettre les commandes de configuration ?
     5.3 Créer vos interfaces réseau
     5.4 Configurer une interface réseau
     5.5 Configurer votre solveur de noms
        5.5.1 Qu'y a-t-il dans un nom ?
        5.5.2 Les informations nécessaires
        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 réseau 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 réseau
        5.9.1 (TT
        5.9.2 (TT
     5.10 Sécurité réseau et contrôle d'accès
        5.10.1 /etc/ftpusers
        5.10.2 /etc/securetty
        5.10.3 Le mécanisme de contrôle d'accès des hôtes
           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 démon
        5.10.6 Pare-feu (Firewall) sur le réseau
        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 réseau avec tunneling.
        6.8.2 Une configuration d'hôte 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 réseau)
     6.15 Mise en forme du trafic - Changer la bande passante allouée
     6.16 Routage avec Linux-2.2

  7. Utilisation du matériel 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 réseau à 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 téléphonique  et DIP
        7.5.5 Serveur SLIP dynamique avec une ligne téléphonique 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 réseau

     8.1 ARCNet
     8.2 Appletalk (
        8.2.1 Configurer le support Appletalk.
        8.2.2 Exporter un système 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. Câbles et câblages

     9.1 Câble série NULL Modem
     9.2 Câble port parallèle (câble PLIP)
     9.3 Câblage Ethernet 10base2 (coaxial fin)
     9.4 Câblage Ethernet à paires torsadées

  10. Glossaire des termes utilisés dans ce document.
  11. Linux pour un fournisseur d'accès à l'Internet ?

  12. Remerciements

  13. Copyright.

  14. Note du traducteur



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ceci est la première 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 précises en temps et
  en heure sur les publications en relation avec les réseaux sous linux.

  Ce document, comme les autres HOWTO dont nous avons la charge, va
  devenir totalement différent et deviendra rapidement ``le réseau sous
  Linux-HOWTO'' et pas seulement le NET3-4-HOWTO. Nous traiterons de
  sujets tels que PPP, VPN et autres ...


  22..  HHiissttoorriiqquuee dduu ddooccuummeenntt

  Le premier document NET-FAQ fut écrit par Matt Welsh et Terry Dawson
  en vue de répondre aux questions qui étaient souvent posées au sujet
  des réseaux sous Linux, ceci en un temps où le LPD (Linux
  Documentation Project) n'existait pas encore.  Il s'agissait alors des
  toutes premières versions de développement du noyau réseau sous Linux.
  Le document NET-2-HOWTO, qui succéda 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 réseau du noyau Linux.  Ce
  document prend la suite à son tour et ne traite que de la version 4 du
  noyau réseau Linux et plus spécialement des versions du noyau 2.x et
  2.2.x.

  Les versions précédentes de ce document étaient devenues plutôt
  énormes en raison du grand nombre de sujets abordés. Pour résoudre ce
  problème, un certain nombre de documents HOWTO ont été créés et
  traitent de sujets spécifiques.  Ce document fait référence à ceux qui
  sont pertinents et aborde les sujets qui ne sont pas encore couverts
  par d'autres documents.


  22..11..  RReettoouurr dd''iinnffoorrmmaattiioonnss

  Nous apprécions 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 désirez que l'on ajoute quelque chose, contactez-nous.


  33..  CCoommmmeenntt uuttiilliisseerr ccee ddooccuummeenntt..

  Ce document est organisé de haut en bas. Les premières sections
  traitent d'informations sur le matériel et peuvent être sautées si
  cela ne vous intéresse pas ; ensuite il y a une discussion générale
  sur ce qui concerne les réseaux, et vous devez être certains de
  l'avoir assimilée avant de poursuivre vers les paragraphes plus
  spécifiques. Le restant, qui traite d'informations ``plus
  technologiques'', est regroupé en trois parties principales :
  informations sur Ethernet et IP, les technologies qui concernent le
  matériel PC le plus courant, et les technologies moins répandues.

  La démarche que je suggère pour parcourir ce document est donc la
  suivante :




     LLiirree lleess sseeccttiioonnss ggéénnéérraalleess
        Ces paragraphes s'appliquent à chaque technologie, ou presque,
        décrite plus tard, il est donc important que vous les ayez
        compris.  D'autre part, j'espère que beaucoup de lecteurs
        connaissent déjà le sujet.


     RRééfflléécchhiisssseezz àà vvoottrree rréésseeaauu
        Vous devez savoir comment votre réseau est, ou sera, conçu et
        quels matériels et types de technologies vous utiliserez.


     LLiisseezz llaa sseeccttiioonn ````EEtthheerrnneett eett IIPP'''' ssii vvoouuss êêtteess ccoonnnneeccttééss eenn
        ddiirreecctt
        sur un réseau local ou à l'Internet" Cette section traite de la
        configuration de base d'Ethernet et des différentes possibilités
        offertes par Linux, et qui concernent le réseau, telles que le
        pare-feu, le routage avancé, etc..

     LLiisseezz aapprrèèss ssii vvoouuss êêtteess iinnttéérreessssééss ppaarr lleess rréésseeaauuxx llooccaauuxx àà bbaass
        ccooûûtt oouu
        les connexions par téléphone" Cette section parle de PLIP, PPP,
        SLIP, et RNIS, les technologies utilisées habituellement sur les
        stations personnelles.

     LLiisseezz llaa sseeccttiioonn ccoonncceerrnnaanntt llaa tteecchhnnoollooggiiee qquuii ccoorrrreessppoonndd
        plus particulièrement à vos besoins."  Si vos besoins ne
        concernent pas IP et/ou un matériel courant, vous trouverez à la
        fin des détails sur les protocoles non-IP et les matériels de
        communication particuliers.

     CCoonnffiigguurreezz vvoottrree rréésseeaauu
        Si vous allez réellement essayer de configurer votre réseau,
        prenez soigneusement note de tout problème éventuel.

     CChheerrcchheezz ddee ll''aaiiddee ssii nnéécceessssaaiirree
        Si vous rencontrez des problèmes qui ne sont pas traités dans ce
        document, reportez-vous au paragraphe donnant les endroits où
        l'on peut en obtenir ou bien envoyer des reports de bogues.

     AAmmuusseezz--vvoouuss!!
        Le réseau est amusant, profitez-en.



  33..11..  LLeess ccoonnvveennttiioonnss uuttiilliissééeess ddaannss ccee ddooccuummeenntt

  Il n'y a pas de conventions spéciales utilisées ici, mais vous devez
  faire attention à la façon de montrer les commandes. En regardant la
  documentation habituelle d'Unix, toute commande qui doit être tapée
  est précédée d'une invite du shell.  Ce document utilise "user%" comme
  invite pour les commandes ne nécessitant pas de privilèges de
  superutilisateur, et "root#" pour les commandes que l'on doit exécuter
  comme utilisateur root. J'ai préféré utiliser "root#" à la place du
  classique "#" pour éviter toute confusion avec les extraits de scripts
  shell, ou le signe dièse est utilisé pour définir les lignes de
  commentaires.
  Lorsque les ``Options de Compilation du noyau'' sont mentionnées,
  elles le sont avec le format utilisé par _m_e_n_u_c_o_n_f_i_g. Elles devraient
  donc être compréhensibles même 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 déclaration
  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 copiés localement,
  au cas où vous utiliseriez la version html de ce document. Si vous ne
  possédez pas l'ensemble des documents, chaque HOWTO peut être récupéré
  sur metalab.unc.edu (répertoire /pub/Linux/HOWTO) ou l'un de ses
  nombreux miroirs.



  44..  ssoouuss LLiinnuuxx..  IInnffoorrmmaattiioonnss ggéénnéérraalleess ccoonncceerrnnaanntt llee rréésseeaauu




  44..11..  BBrrèèvvee hhiissttooiirree dduu ddéévveellooppppeemmeenntt dduu nnooyyaauu dduu rréésseeaauu LLiinnuuxx..

  Développer une nouvelle implémentation noyau de l'ensemble du
  protocole tcp/ip, de qualité, et qui marcherait aussi bien que les
  produits existants, n'était pas une tâche facile.  La décision de ne
  pas partir d'une implémentation existante fut prise à un moment où il
  y avait un doute sur d'éventuelles restrictions sur les droits de
  copie, en raison de décisions de justice U.S., et à un moment où il y
  avait beaucoup d'enthousiasme pour faire différemment et peut-être
  même mieux que ce qui avait été fait auparavant.

  Le premier volontaire pour diriger le développement fut Ross Biro
  <biro@yggdrasil.com>. Ross produisit une implémentation de routines
  simple, incomplète, mais parfaitement utilisable, à laquelle fut
  ajouté un pilote Ethernet pour la carte interface réseau WD-8003.  Ce
  fut suffisant pour que beaucoup de personnes essayent le logiciel et
  même certains s'arrangèrent pour se connecter, avec cette
  configuration, sur le réseau Internet en direct.  La pression de la
  communauté Linux qui s'occupait du développement du support réseau
  augmenta, et pour finir, la convergence de cette pression injuste et
  de ses propres obligations l'emportèrent sur les avantages que Ross en
  tirait; il arrêta donc sa tâche de coordinateur de développement.  Les
  efforts de Ross pour faire démarrer le projet, son acceptation de la
  responsabilité de faire vraiment quelque chose d'utile dans de telles
  circonstances mouvementées, furent le point de départ de tout le
  travail ultérieur et donc un élément essentiel du succès du produit
  actuel.

  Orest Zborowski <obz@Kodak.COM> produisit la première interface socket
  BSD pour le noyau Linux.  Ce fut un grand pas en avant et permit à
  beaucoup d'applications réseau existantes d'être portées sous Linux
  sans grandes modifications.

  À peu près à cette époque Laurence Culhane <loz@holmes.demon.co.uk>
  développa les premiers pilotes Linux pour supporter le protocole SLIP.
  Ceci permit à beaucoup de gens qui n'avaient pas accès à un réseau
  Ethernet d'essayer le logiciel réseau. Puis certains utilisèrent ce
  pilote pour se connecter sur l'Internet.  Cela donna à encore plus de
  personnes un aperçu de ce qui serait possible si Linux avait un
  support complet pour le réseau et augmenta le nombre d'utilisateurs
  utilisant et expérimentant ce logiciel réseau.

  L'une des personnes qui a aussi activement travaillé sur la
  construction du support réseau fut Fred van Kempen
  <waltje@uwalt.nl.mugnet.org>.  Après la période d'incertitude qui
  suivit le retrait de Ross, Fred offrit son temps et accepta le rôle de
  conducteur du développement sans rencontrer d'opposition.  Fred avait
  quelques projets ambitieux quant à la direction vers laquelle il
  voulait porter le logiciel réseau Linux, et il se mit à progresser
  dans ces directions.  Fred produisit une série de code réseau appelée
  le code noyau `NET-2' (le code `NET' étant celui de Ross), qui permit
  à beaucoup de personnes de l'utiliser avec intérêt.  Ensuite Fred mit
  nombre d'innovations dans la poursuite du développement, telle que
  l'interface de périphérique dynamique, le support du protocole radio-
  amateur AX-25 et une implémentation réseau conçue de manière 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 réseau à ce
  moment était constitué encore d'un grand nombre de patches qui
  devaient être appliqués au code noyau et n'était pas inclus dans la
  distribution normale.  Le document NET-FAQ et son successeur
  NET-2-HOWTO décrivait la procédure assez complexe pour que tout cela
  fonctionne.  Fred se concentra sur le développement 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 développement augmentait.

  Alan Cox <iialan@www.uk.linux.org> proposa une solution pour améliorer
  la situation.  Il proposa de prendre le code NET-2 de Fred, de le
  déboguer, de le rendre fiable et stable si bien qu'il satisferait
  l'utilisateur de base impatient, relâchant ainsi la pression sur Fred
  qui pourrait continuer son oeuvre.  Alan se mit au travail avec un
  certain succès et sa première version du code réseau Linux fut appelée
  `Net-2D(ebugged;)'.  Le code fonctionnait de manière fiable avec
  plusieurs configurations typiques et l'utilisateur de base était
  content. Alan avait vraiment des idées et une compétence à 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 développa alors deux écoles distinctes dans la communauté Linux,
  l'une ayant pour principe `que ça marche d'abord, puis on améliorera
  ensuite' et l'autre `améliorer d'abord'. Linus arbitra finalement et
  offrit son aide aux efforts de développement d'Alan et inclut son code
  dans la distribution standard du noyau.  Cela plaçait Fred dans une
  situation délicate. Tout développement de longue haleine souffrirait
  de l'absence d'utilisation et d'essais par l'utilisateur de base et
  cela signifierait que les progrès seraient longs et difficiles.  Fred
  continua à travailler encore quelque temps, puis se retira finalement,
  et Alan devint le nouveau pilote de développement du code réseau dans
  le noyau Linux.

  Donald Becker <becker@cesdis.gsfc.nasa.gov> révéla rapidement ses
  talents dans les aspects de bas niveau du réseau 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 mérite donc une mention spéciale.

  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
  réseau migra vers la distribution NET-3, sur laquelle les versions
  actuelles sont fondées.  Alan travailla sur de multiples aspects du
  code réseau et, avec l'assistance d'un grand nombre de personnes
  talentueuses venant de la communauté Linux, développa le code dans
  toutes sortes de directions. Alan produisit des pilotes de
  périphériques réseau, le premier standard AX.25 et les implémentations
  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 accroître le nombre de personnes utilisant Linux
  désireuses d'aller sur le réseau.

  Jonathon Naylor <jsn@cs.nott.ac.uk> apporta sa contribution en
  améliorant le code AX.25 d'Alan et en y ajoutant les protocoles NetRom
  et Rose. Le support AX.25/NetRom lui-même est tout à fait
  significatif, car aucun autre système d'exploitation que Linux ne peut
  se vanter d'avoir un support natif pour ce protocole.

  Il y a eu bien sûr des centaines d'autres personnes qui ont apporté
  une contribution significative à la couche réseau de Linux.  Vous en
  retrouverez certains plus tard dans les paragraphes traitant de
  technologies spécifiques, d'autres ont collaboré aux modules, pilotes,
  corrections de bogues, suggestions, rapports d'essais et support
  moral. Dans tous les cas chacun peut se prévaloir d'avoir joué un rôle
  et offert ce qu'il pouvait. Le code réseau Linux est un excellent
  exemple de ce que l'on peut obtenir avec un style Linux de
  développement anarchique, si cela ne vous a pas encore étonné, et on
  le voit encore, le développement ne s'est pas arrêté.



  44..22..  IInnffoorrmmaattiioonnss ssuurr llaa ccoouucchhee rréésseeaauu ddee LLiinnuuxx..

  Il y a un grand nombre d'endroits où l'on peut trouver de bonnes
  informations sur le réseau Linux.

  Il y a un tas de spécialistes disponibles. On peut en trouver une
  liste sur LinuxPorts Consultants Database.

  Alan Cox, l'actuel mainteneur du code réseau Linux entretient une page
  web contenant les points principaux du réseau actuel, et ses nouveaux
  développements, à 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 manière interactive
  sur Network Administrators Guide HTML version ou bien vous pouvez
  l'obtenir sous différents formats via ftp sur : metalab.unc.edu LDP
  ftp archive. Le livre d'Olaf est très compréhensible et fournit un
  point de vue de haut niveau sur la configuration réseau sous Linux.

  (NdT : ce livre a été traduit en français de manière remarquable par
  le regretté René Cougnenc)

  Il existe un groupe de discussion dédié au réseau et, en ce qui le
  concerne dans la hiérarchie 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 réseau
  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 différents réseaux IRC, il y a souvent des canaux #linux sur
  lesquels des personnes sont en mesure de répondre à vos questions au
  sujet du réseau Linux.

  Souvenez-vous lorsque vous faites part d'un problème d'y inclure le
  plus possible de détails nécessaires. Plus spécialement 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 problèmes 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 exécutées.


  44..33..  nnoonn ssppéécciiffiiqquueess ddee LLiinnuuxx..  OOùù oobbtteenniirr ddeess iinnffoorrmmaattiioonnss ssuurr llee
  rréésseeaauu,,

  si vous désirez des informations générales de base sur tcp/ip, alors
  je vous recommande de regarder les documents suivants :



     iinnttrroodduuccttiioonn àà TTCCPP//IIPP
        ce document se trouve à la fois sur en version texte et en
        version postscript.


     aaddmmiinniissttrraattiioonn TTCCPP//IIPP
        ce document se trouve à la fois sur en version texte et en
        version postscript.


  Si vous recherchez des informations plus détaillées 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, 3ème édition,
       1995.


  Si vous voulez apprendre comment écrire des applications réseau 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 deuxième é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 stockées ces RFC. Beaucoup de ceux-ci sont des
  sites ftp, d'autres fournissent des accès WWW avec un moteur de
  recherche qui cherche les bases de données RFC avec des mots-clés
  particuliers.
  Une source possible de RFC est : la base de données RFC de Nexor.



  55..  IInnffoorrmmaattiioonnss ggéénnéérraalleess ccoonncceerrnnaanntt llaa ccoonnffiigguurraattiioonn rréésseeaauu

  Vous devez connaître et bien comprendre les paragraphes suivants avant
  d'essayer de configurer votre réseau.  Ce sont des principes de base
  qui s'appliquent, indépendamment de la nature du réseau que vous
  voulez mettre en place.



  55..11..  DDee qquuooii aaii--jjee bbeessooiinn ppoouurr ddéémmaarrrreerr ??

  Avant de commencer à construire ou configurer votre réseau, vous aurez
  besoin de certaines choses. Les plus importantes sont :



  55..11..11..  SSoouurrcceess dduu nnooyyaauu rréécceenntteess ((OOppttiioonnnneell))..

  À noter:

  La majorité des distributions actuelles sont livrées avec l'option
  réseau activée, en sorte que vous n'avez pas besoin de recompiler le
  noyau. Si vous utilisez du matériel 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 réseau ou les cartes que vous voulez utiliser, vous aurez besoin
  des sources du noyau pour pouvoir le recompiler avec les options
  adéquates.

  Pour les utilisateurs des principales distributions comme RedHat,
  Caldera, Debian ou Suse, ce n'est plus vrai. Tant que vous restez avec
  un matériel de grande diffusion, il n'est pas nécessaire de recompiler
  le noyau, à moins que vous n'ayez une exigence très spécifique.


  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 même
  temps. Le site officiel est kernel.org, mais dans la mesure du
  possible, utilisez s'il vous plaît celui que je viens de donner.
  Souvenez-vous que ftp.kernel.org est particulièrement surchargé.
  Utilisez un miroir.: (NdT : et bien sûr ftp.lip6.fr) .

  Normalement les sources du noyau doivent être désarchivées dans le
  répertoire /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 répertoire 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 numéro de version). Les versions de développement (avec un
  chiffre impair en seconde place dans le numéro de version) peuvent
  avoir une structure ou autre chose qui peut poser problème avec les
  logiciels de votre système. Si vous n'êtes pas certain de résoudre ce
  type de problèmes, avec en plus ceux qui existeraient sur d'autres
  logiciels, ne les utilisez pas.
  D'autre part, certaines caractéristiques décrites dans ce document ont
  été introduites lors du développement 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 fonctionnalités.
  Lorsque j'écris ce paragraphe, en août 1998, la version de
  développement en cours est la 2.1.115 et la 2.2 va apparaître
  prochainement.



  55..11..22..  OOuuttiillss ddee rréésseeaauu rréécceennttss

  Ces outils sont les programmes utilisés pour configurer les fichiers
  de périphériques réseau. Ils vous permettent d'assigner des adresses
  aux périphériques et de configurer des routes par exemple.

  La plupart des distributions Linux modernes sont fournies avec les
  outils de réseau, aussi si vous avez fait votre installation à partie
  d'une distribution et que vous n'avez pas encore installé les outils
  de réseau, 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-même.  Ce
  n'est pas difficile.

  Les outils de réseau sont maintenus par Bernd Eckenfels et se trouvent
  sur : ftp.inka.de et sont recopiés sur : ftp.linux.uk.org.

  Vous pouvez également obtenir les derniers paquetages RedHat sur net-
  tools-1.51-3.i386.rpm

  Soyez sûrs de choisir la version la mieux appropriée à 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 dernière
  version peut-être obtenue sur : ftp.xos.nl.  Encore une fois, de
  nombreuses versions existent. Soyez sûrs de prendre celle qui s'adapte
  le mieux à votre noyau. Notez que les fonctionnalités pour pare-feu de
  Linux ont changé pendant le développement de la version 2.1 et ont été
  remplacées 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
  antérieure.


       Redhat 5.2 ou inférieure
       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 réglages
  du pare-feu. Si vous désirez plus d'informations détaillées sur
  ipchains, référez-vous au document mentionné ci-dessus.



  55..11..33..  AApppplliiccaattiioonnss rréésseeaauu

  Les programmes d'application réseau 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 très répandue, qui est maintenant
  maintenue par netbug@ftp.uk.linux.org.  Vous pouvez obtenir cette
  distribution sur : ftp.uk.linux.org.




  55..11..44..  AAddrreesssseess eett eexxpplliiccaattiioonnss..

  Les adresses de protocole Internet (IP) sont composées de quatre
  octets. La convention d'écriture est appelée `notation décimale
  pointée'. Sous cette forme chaque octet est converti en un nombre
  décimal (0-255), en omettant les zéros de tête (à moins que ce nombre
  ne soit lui-même un zéro) et chaque octet est séparé par le caractère
  `.'.  Par convention, chaque interface d'un hôte ou routeur possède
  une adresse IP. Il est permis, dans certaines circonstances, que la
  même adresse IP soit utilisée sur différentes interfaces d'une même
  machine, mais, en général, chaque interface possède sa propre adresse.

  Les réseaux IP (Protocole Internet) sont des séquences contiguës
  d'adresses IP. Toutes les adresses d'un même réseau ont des chiffres
  en commun.  La partie d'adresse commune à toutes les adresses d'un
  réseau s'appelle la `partie réseau' de l'adresse. Les chiffres
  restants s'appellent `partie hôte'. Le nombre de bits qui sont
  partagés par toutes les adresses d'un même réseau est appelé masque de
  réseau (netmask) et c'est le rôle du masque de réseau de déterminer
  quelles adresses appartiennent à `son' réseau et celles qui ne sont
  pas concernées.  Par exemple :









  ----------------------------------------     ----------------
  Adresse hôte (host address)                  192.168.110.23
  Masque de réseau (network mask)              255.255.255.0
  Partie réseau (network portion)              192.168.110.
  Partie hôte (host portion)                              .23
  ----------------------------------------     ----------------
  Adresse réseau (network address)             192.168.110.0
  Adresse de diffusion (broadcast address)     192.168.110.255
  ----------------------------------------     ----------------





  Toute adresse qui est `ANDÉE bit à bit' avec son masque de réseau
  révèlera l'adresse du réseau auquel elle appartient.  L'adresse du
  réseau est par conséquent l'adresse de plus petit nombre dans
  l'ensemble des adresses et a toujours la partie hôte codée avec des
  zéros.

  L'adresse de diffusion est une adresse spéciale que chaque hôte du
  réseau écoute en même temps que son adresse personnelle.  Cette
  adresse est celle à laquelle les datagrammes sont envoyés si tous les
  hôtes du réseau sont en mesure de les recevoir.  Certains types de
  données telles que les informations de routage et les messages
  d'alerte sont transmis vers l'adresse de diffusion de telle sorte que
  tous les hôtes du réseau peuvent les recevoir en même temps.  Il y a
  deux standards utilisés de manière courante pour définir ce que doit
  être l'adresse de diffusion. Le plus largement utilisé est de prendre
  l'adresse la plus haute possible du réseau 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 réseau comme adresse de diffusion. En pratique cela n'a pas
  beaucoup d'importance, mais vous devez être sûrs que tous les hôtes du
  réseau sont configurés avec la même adresse de diffusion.

  Pour des raisons d'administration, il y a quelque temps, lors du
  développement du protocole IP, des ensembles d'adresses ont été
  organisés en réseaux et ces réseaux ont été regroupés en ce que l'on a
  appellé classes. Ces classes donnent un certain nombre de réseaux de
  tailles standards auxquels on peut assigner des adresses. Ces classes
  sont :



       ----------------------------------------------------------
       |Classe de |Masque de     | Adresses de réseau           |
       | réseau   |  réseau      |                              |
       ----------------------------------------------------------
       |    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 dépend 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
  :



     IInnssttaalllleerr uunnee mmaacchhiinnee LLiinnuuxx ssuurr uunn rréésseeaauu IIPP eexxiissttaanntt
        Vous devez alors contacter un des administrateurs du réseau et
        lui demander les informations suivantes :

     ·  Adresse hôte;

     ·  Adresse réseau;

     ·  Adresse de diffusion;

     ·  Masque de réseau;

     ·  Adresse de routage;

     ·  Adresse du serveur de noms de domaine (DNS).

        Vous configurerez alors votre réseau Linux à l'aide de ces
        données.  Vous ne pouvez pas les inventer vous-même et espérer
        que votre configuration fonctionne.

     CCoonnssttrruuiirree uunn rréésseeaauu ttoouutt nneeuuff nnoonn ccoonnnneeccttéé àà
        l'Internet" Si vous construisez un réseau 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 sécurité et de fiabilité, il y a quelques
        adresses de réseau IP réservées à cet usage. Elles sont
        spécifiées dans la RFC 1597 et sont les suivantes :


        -----------------------------------------------------------
        |         ALLOCATIONS POUR RÉSEAUX PRIVÉS                 |
        -----------------------------------------------------------
        | Classe  | Masque de     | Adresses de réseau            |
        | réseau  |  réseau       |                               |
        -----------------------------------------------------------
        |    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 décider de la dimension de votre réseau et
     choisir ensuite les adresses dont vous avez besoin.



  55..22..  OOùù mmeettttrree lleess ccoommmmaannddeess ddee ccoonnffiigguurraattiioonn ??

  Il y a plusieurs possibilités de procédures de démarrage d'un système
  Linux. Après le démarrage du noyau, celui-ci exécute toujours un
  programme appelé `_i_n_i_t'. Ce programme lit le fichier de configuration
  appelé /etc/inittab et commence le processus de démarrage. Il y a
  quelques variantes de _i_n_i_t, bien que maintenant tout le monde se
  dirige vers la variante System V (cinq), développée par Miguel van
  Smoorenburg.

  Bien que que le programme _i_n_i_t soit toujours le même, les réglages du
  processus de démarrage se font différemment suivant le type de
  distribution.  Habituellement le fichier /etc/inittab contient une
  entrée telle que :



       si::sysinit:/etc/init.d/boot

  Cette ligne spécifie le nom du fichier script qui prend en charge
  réellement la séquence de démarrage. Ce fichier est en quelque sorte
  équivalent au fichier MS-DOS AUTOEXEC.BAT.

  Il y a aussi d'autres scripts appelés par le script de démarrage, et
  souvent le réseau est configuré dans l'un de ceux-ci.

  Le tableau suivant peut être utilisé comme guide suivant le système
  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
  répertoire pour les scripts qui mettent en route les services du
  système (et habituellement l'information ne se situe pas dans ces
  fichiers, par exemple les systèmes RedHat stockent l'ensemble de la
  configuration du système sous /etc/sysconfig, où elle est récupérée
  par les scripts de démarrage). Si vous voulez saisir les détails du
  processus de démarrage, je vous conseille de vérifier _/_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 systèmes, et
  nous pointerons sur lui dès qu'il sera disponible sur le réseau.


  La plupart des distributions récentes incluent un programme qui permet
  de configurer de nombreux types d'interfaces réseau. Si vous en
  possédez une, regardez si ce programme vous convient au lieu de tenter
  une configuration manuelle.




       -----------------------------------------
       Distrib   | Programme de configuration réseau
       -----------------------------------------
       RedHat    | /sbin/netcfg
       Slackware | /sbin/netconfig
       -----------------------------------------






  55..33..  CCrrééeerr vvooss iinntteerrffaacceess rréésseeaauu

  Sur beaucoup de systèmes Unix les périphériques réseau apparaissent
  dans le répertoire _/_d_e_v . Il n'en est pas de même avec Linux. Les
  périphériques réseau  sont créés dynamiquement par les logiciels et ne
  nécessitent donc pas de fichiers de périphériques.


  Dans la majorité des cas, le périphérique réseau est créé
  automatiquement par le pilote de périphérique pendant son
  initialisation lorsqu'il détecte votre matériel.  Par exemple le
  pilote Ethernet crée les interfaces eth[0..n] une à une quand il
  détecte votre matériel Ethernet. La première carte Ethernet trouvée
  devient eth0, la deuxième eth1, etc.

  Cependant, dans certains cas, notamment avec _S_L_I_P et _P_P_P, les
  périphériques réseau sont créés par un programme utilisateur. Le même
  mécanisme séquentiel s'applique sur les périphériques, mais ce n'est
  pas au moment du démarrage du système. La raison en est que, à
  l'inverse des dispositifs Ethernet, le nombre de périphériques _S_L_I_P ou
  _P_P_P actifs peut varier dans le temps.  Nous y reviendrons plus tard.



  55..44..  CCoonnffiigguurreerr uunnee iinntteerrffaaccee rréésseeaauu

  Lorsque vous avez tous les programmes requis, votre adresse et les
  informations réseau, vous pouvez alors configurer vos interfaces.
  Lorsque nous parlons de la configuration d'interface, nous faisons
  allusion au processus d'assignation des adresses du périphérique
  réseau, et au processus de réglage des paramètres 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 réseau `255.255.255.0'.  Le `_u_p' qui
  termine la commande enjoint à l'interface de devenir active, mais il
  peut être omis, étant par défaut. Pour clore une interface, vous
  faites juste ``ifconfig eth0 down''.

  Le noyau suppose certaines valeurs par défaut lorsque l'on configure
  les interfaces. Par exemple, vous pouvez indiquer une adresse de
  réseau 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 hypothèses fondées sur le masque de réseau que vous
  avez fourni, et si vous ne l'avez pas donnée, sur la classe de
  l'adresse IP configurée.  Dans mon exemple, le noyau considérera que
  c'est un réseau de classe C et configurera une adresse réseau 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 :

     uupp active une interface (est fait par défaut).

     ddoowwnn
        désactive une interface.

     [[--]]aarrpp
        active ou désactive le protocole de résolution d'adresses sur
        cette interface.

     [[--]]aallllmmuullttii
        active ou désactive la réception de tous les paquets multicast
        matériel (Ndt : Les adresses multicast sont un genre d'adresses
        de diffusion limitées à un groupe de machine qui n'ont pas
        nécessairement besoin de se trouver sur le même sous-réseau). Le
        multicast matériel permet à des groupes d'hôtes de recevoir des
        paquets adressés vers des destinations spéciales. Ce peut être
        important si vous utilisez des applications comme la
        vidéoconférence, mais la plupart du temps on ne l'utilise pas.

     mmttuu NN
        ce paramètre permet de régler le _M_T_U (Maximum Transfert Unit)
        sur le périphérique.

     nneettmmaasskk <<aaddddrr>>
        ce paramètre permet de fixer le masque de réseau.

     iirrqq <<aaddddrr>>
        ce paramètre ne fonctionne qu'avec certains types de matériels,
        mais vous permet d'en fixer l'IRQ.

     [[--]]bbrrooaaddccaasstt [[aaddddrr]]
        permet d'activer ou de désactiver l'acceptation de datagrammes
        destinés à l'adresse de diffusion.

     ((--))ppooiinnttooppooiinntt [[aaddddrr]]
        permet de fixer l'adresse de la machine à l'extrémité d'un lien
        point-à-point comme pour _s_l_i_p ou _p_p_p.

     hhww <<ttyyppee>> <<aaddddrr>>
        permet de fixer l'adresse matérielle de certains périphériques
        réseau. Ce n'est pas souvent utilisé pour Ethernet, mais utile
        pour d'autres types de réseau tels que AX.25.

  Vous pouvez utiliser la commande _i_f_c_o_n_f_i_g pour toutes les interfaces
  réseau. Quelques programmes utilisateurs comme _p_p_p_d et _d_i_p configurent
  automatiquement les périphériques en même temps qu'ils les créent, dès
  lors l'utilisation manuelle de _i_f_c_o_n_f_i_g n'est pas nécessaire.



  55..55..  CCoonnffiigguurreerr vvoottrree ssoollvveeuurr ddee nnoommss

  Le `_S_o_l_v_e_u_r _d_e _N_o_m_s' (Name Resolver) fait partie de la bibliothèque
  standard de Linux. Sa première fonction est de convertir des noms
  d'hôtes compréhensibles par l'homme, comme `ftp.funet.fi' , en
  adresses IP compréhensibles par une machine, comme 128.214.248.6.


  55..55..11..  QQuu''yy aa--tt--iill ddaannss uunn nnoomm ??

  Vous êtes probablement familiers avec l'aspect des noms d'hôtes
  Internet, mais vous ne savez pas comment ils sont composés ou
  décomposés. Les noms de domaine Internet sont hiérarchisés 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
  spécifiés dans la RFC-920. Quelques exemples :


     CCOOMM
        Organisations Commerciales

     EEDDUU
        Organisations ayant rapport avec l'Éducation

     GGOOVV
        Organisations Gouvernementales (NdT: parfois GOUV en France!)

     MMIILL
        Organisations Militaires

     OORRGG
        Autres organisations

     NNEETT
        Organisations ayant un rapport avec l'internet

     NNoomm ddee PPaayyss
        il existe des codes de deux lettres qui représentent un pays
        donné.

  Pour des raisons historiques la plupart des domaines appartenant à des
  domaines qui ne sont pas basés sur des noms de pays sont pour les
  organisations situées 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 utilisés par des sociétés hors des États-
  Unis.


  Chacun de ces domaines de premier niveau possède des sous-domaines.
  Les domaines de premier niveau fondés sur les noms de pays sont
  divisés ensuite en sous-domaines basés 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 situées en
  Australie ; notez que ce n'est pas une règle absolue, car les
  politiques réelles dépendant de l'autorité qui donne les noms pour
  chaque domaine.

  Le niveau de division suivant représente habituellement le nom de
  l'organisation. Ces sous-domaines sont variables, souvent ils sont
  fondés sur la structure en départements de l'organisation mais ils
  peuvent l'être également sur d'autres critères considérés comme
  rationnels et compréhensibles par les administrateurs réseau de
  l'organisation.

  La partie tout à fait à gauche du nom est toujours le nom unique
  assigné à la machine hôte et est appelée le nom d'hôte `_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 complètement 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'hôte 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 société 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 plutôt plus courts ; par exemple, mon
  fournisseur d'accès à l'internet est ``systemy.it'' et mon
  organisation à but non lucratif est ``linux.it'', sans sous-domaine
  com ou org, aussi mon propre hôte est simplement appelé
  ``morgana.systemy.it'' et rubini@linux.it est une adresse électronique
  valide. Notez que le propriétaire d'un domaine a le droit
  d'enregistrer les noms d'hôtes 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 propriétaires de linux.it
  étaient d'accord pour créer un sous-domaine pour ce groupe.


  55..55..22..  LLeess iinnffoorrmmaattiioonnss nnéécceessssaaiirreess

  Vous devez connaître le domaine auquel votre nom d'hôte 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 connaître 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.



  55..55..33..  //eettcc//rreessoollvv..ccoonnff

  Le fichier /etc/resolv.conf est le principal fichier de configuration
  pour le code de résolution de nom. Son format est très simple.  C'est
  un fichier texte avec un mot-clé par ligne. Il y a trois mots-clés
  typiquement utilisés, qui sont :

     ddoommaaiinn
        ce mot-clé indique le nom de domaine local.

     sseeaarrcchh
        ce mot-clé spécifie une liste d'autres noms de domaine pour
        rechercher un nom d'hôte.

     nnaammeesseerrvveerr
        ce mot-clé, qui peut être utilisé plusieurs fois, spécifie
        l'adresse IP d'un serveur de nom de domaine pour la résolution
        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 spécifie que le nom de domaine par défaut à ajouter aux
  noms non qualifiés (c'est-à-dire sans domaine) est maths.wu.edu.au, et
  que si l'hôte n'est pas trouvé dans ce domaine on peut aussi essayer
  le domaine wu.edu.au directement. Deux entrées de serveurs de noms
  sont fournies, chacune d'elles pouvant être appelée par le solveur de
  noms.



  55..55..44..  //eettcc//hhoossttss

  Le fichier /etc/hosts est l'endroit où vous mettez les noms et les
  adresses IP des hôtes locaux. Si vous mettez un hôte dans ce fichier,
  alors vous n'avez pas à interroger le serveur de nom de domaine pour
  obtenir son adresse IP. L'inconvénient est que vous devez tenir votre
  fichier à jour si l'adresse de cet hôte a changé.  Dans un système
  bien administré les seuls noms d'hôtes qui apparaissent habituellement
  sont l'interface loopback, et le nom des hôtes locaux.






  # /etc/hosts
  127.0.0.1      localhost loopback
  192.168.0.1    ma.belle.machine




  Vous pouvez spécifier plus d'un nom d'hôte, comme montré dans la
  première entrée (qui est standard pour l'interface loopback).



  55..55..55..  FFaaiirree ttoouurrnneerr uunn sseerrvveeuurr ddee nnoommss

  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).



  55..66..  CCoonnffiigguurreerr vvoottrree iinntteerrffaaccee llooooppbbaacckk

  L'interface `loopback' est un type spécial d'interface qui permet de
  vous connecter à vous-même. Il y a plusieurs raisons pour faire cela,
  par exemple si vous voulez faire des essais de logiciel réseau sans
  interférer avec quelqu'un d'autre sur votre réseau. Par convention,
  l'adresse IP `127.0.0.1' lui a été assignée. Aussi quelle que soit la
  machine où vous êtes, si vous ouvrez une connexion telnet vers
  127.0.0.1 vous atteindrez toujours l'hôte local.

  Configurer l'interface loopback est simple et vous devez vous assurer
  de l'avoir fait (mais notez que cette tâche est habituellement
  effectuée 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.



  55..77..  RRoouuttaaggee

  Le routage est un vaste sujet. On peut écrire de grandes quantités de
  textes sur ce sujet. La plupart d'entre vous ont besoin d'un simple
  routage, et certains même de rien du tout.  Je ne parlerai que des
  principes du routage. Si vous voulez plus d'informations je vous
  suggère de vous reporter aux références fournies en début du document.

  Commençons par une définition. Qu'est-ce que le routage IP ?  Voici
  celle que j'utilise :


       Le routage IP est le processus par lequel un hôte, ayant des
       connexions réseau multiples, décide du chemin par lequel
       délivrer les datagrammes IP qu'il a reçus.


  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 reçoit
  un datagramme de l'une de ses connexions, le routage est le mécanisme
  utilisé pour déterminer vers quelle interface il doit renvoyer ce
  datagramme. De simples hôtes ont besoin aussi de routage, tous les
  hôtes Internet ayant deux périphériques réseau, l'un étant l'interface
  loopback décrite auparavant et l'autre est celui qui est utilisé pour
  parler avec le reste du monde, soit un lien Ethernet, soit une
  interface série PPP ou SLIP.

  Ok, alors comment marche le routage ? Chaque hôte possède une liste
  spéciale de règles de routage, appelée une table de routage. Cette
  table contient des colonnes qui contiennent au moins trois champs, le
  premier étant une adresse de destination, le deuxième étant le nom de
  l'interface vers lequel le datagramme doit être routé et le troisième,
  qui est optionnel, l'adresse IP d'une autre machine qui transportera
  le datagramme vers sa prochaine destination sur le réseau 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 plutôt simple : un datagramme entrant est
  reçu, l'adresse de destination est examinée et comparée avec chaque
  entrée de la table. L'entrée qui correspond le mieux à cette adresse
  est choisie, et le datagramme est renvoyé vers l'interface spécifiée.
  Si le champ passerelle est rempli, alors le datagramme est renvoyé
  vers cet hôte via l'interface spécifiée, sinon l'adresse de
  destination est supposée comme étant sur le réseau supporté par
  l'interface.

  Pour manipuler ce tableau, une commande spéciale est utilisée.  Cette
  commande prend des arguments et les convertit en appels système pour
  demander au noyau d'ajouter, supprimer ou modifier des entrées dans la
  table de routage. Cette commande s'appelle `_r_o_u_t_e'.

  Un exemple simple. Imaginez que vous ayez un réseau Ethernet. On vous
  a dit que c'est un réseau 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 première é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 entrée dans la table de
  routage pour indiquer au noyau que les datagrammes destinés aux hôtes
  dont les adresses correspondent à 192.168.1.* doivent être dirigés
  vers le périphérique 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 entrée est une route réseau.  Un autre choix peut être
  `-host' qui est une route spécifique d'une adresse IP.

  Cette route vous permettra d'établir des connexions IP avec tous les
  hôtes sur votre segment Ethernet. Mais qu'en est-il des hôtes IP qui
  n'y sont pas ?

  Ce serait compliqué d'ajouter des routes pour chaque réseau
  destinataire, aussi il y a une astuce utilisée pour simplifier la
  tâche.  L'astuce est appelée route par `default'. La route par defaut
  s'adapte à toutes les destinations possibles, mais pas très bien, de
  telle sorte que si il y a une entrée qui correspond à l'adresse
  requise elle sera utilisée à la place de la route par defaut. L'idée
  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
  entrée 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
  entrée seront dirigés pour  routage ultérieur.

  Ainsi votre configuration complète 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 réseau vous en
  trouverez au moins un très semblable à celui-ci. C'est une configura­
  tion courante.

  Examinons maintenant une configuration un peu plus compliquée.
  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 décrit
  ci-dessus, seul le routeur aura besoin d'indiquer les routes réseau
  séparément car pour les stations de travail le mécanisme de routage
  par defaut les capturera toutes, laissant au routeur le soin de les
  séparer de manière appropriée. Vous pouvez vous demander pourquoi la
  route par défaut n'utilise pas `gw'.  La raison en est très simple :
  les protocoles de lien série comme PPP et SLIP ont seulement deux
  hôtes sur leur réseau, un à chaque bout. Spécifier à l'hôte 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 réseau. Les autres types
  comme Ethernet, arcnet ou token ring ont besoin que l'on indique une
  passerelle car ces réseaux supportent un grand nombre d'hôtes.



  55..77..11..  AAlloorrss,, qquuee ffaaiitt llee pprrooggrraammmmee rroouutteedd  ??

  La configuration de routage décrite ci-dessus est bien adaptée aux
  réseaux simples où il n'y a que des chemins uniques entre les
  destinations. Lorsque vous avez un réseau plus complexe les choses
  deviennent plus compliquées.  Heureusement pour la plupart d'entre
  vous, ce ne sera pas le cas.

  Le gros problème est qu'avec le `routage manuel' ou `routage statique'
  comme décrit ci-dessus, si une machine ou un lien tombe en panne dans
  le réseau, alors la seule façon de diriger vos datagrammes vers un
  autre chemin, s'il existe, est d'intervenir manuellement et d'exécuter
  les commandes adéquates. Naturellement c'est lourd, lent, peu pratique
  et source de risques. Des techniques variées ont été développées pour
  régler automatiquement les tables de routage dans le cas d'incidents
  sur un réseau où il y a plusieurs routes possibles, toutes ces
  techniques étant regroupées 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 très souvent utilisé sur les petits ou moyens
  réseaux d'entreprise. L'OPSF est plus moderne et plus apte à gérer de
  grands réseaux et mieux adapté dans le cas où il y a un grand nombre
  de chemins possibles à travers le réseau.  Les implémentations
  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'
  décrit 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 réseau IP de classe C (masque de réseau 255.255.255.0).
  Chaque routeur a également une liaison PPP vers chacun des autres rou­
  teurs. Ce réseau 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 défaillante, alors l'entrée de routage
  montre que les hôtes sur le segment A ne peuvent pas atteindre les
  hôtes sur le segment B car leurs datagrammes seront dirigés sur le
  lien ppp0 du routeur A qui est rompu.  Ils pourront encore continuer à
  parler aux hôtes du segment C, et les hôtes 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
  problèmes que les protocoles de routage dynamique comme RIP sont en
  mesure de résoudre.  Si chacun des routeurs A, B et C utilisent un
  démon de routage (NdT: démon est une francisation familière du vocable
  informatique anglais daemon, qui signifie Disk And Extension MONitor,
  c'est à dire qui n'est pas invoqué manuellement mais attend en tâche
  de fond que quelque chose se passe, que quelque condition se produise.
  Ce terme fut introduit au départ sous CTSS (Compatible Time Sharing
  System), un ancêtre du système MULTICS, lui-même parent d'UNIX (voir
  la traduction de René Cougnenc de `Le système Linux' de M. Welsh et L.
  Kaufman chez O'Reilly International Thomson), alors leurs tables de
  routage seront automatiquement réglées pour refléter le nouvel état du
  réseau même si l'une des liaisons est défectueuse. Configurer un tel
  réseau 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 démon de routage `_r_o_u_t_e_d' trouve automatiquement tous les ports
  actifs vers le réseau quand il démarre et écoute tous les messages sur
  chacun des périphériques réseau ce qui lui permet de déterminer et de
  mettre à jour sa table de routage.

  C'était une très brève explication du routage dynamique et de son
  utilisation. Si vous voulez d'avantage d'explications reportez-vous
  aux références listées en début de document.

  Les points importants relatifs au routage dynamique sont :

  1. Vous n'avez besoin d'utiliser un démon de routage dynamique que
     quand votre machine Linux peut choisir entre plusieurs routes pour
     une destination donnée. C'est la cas par exemple lorsque vous
     envisagez d'utiliser IP masquerade.

  2. Le démon de routage dynamique modifiera automatiquement votre table
     de routage pour tenir compte des changements survenus dans votre
     réseau.

  3. RIP est adapté aux réseaux de petite et moyenne taille.



  55..88..  CCoonnffiigguurreerr vvooss sseerrvveeuurrss rréésseeaauu eett lleess sseerrvviicceess..

  Les serveurs de réseau 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
  réseau.  Les ports réseau permettent die demander un service
  particulier à un hôte particulier  et de faire la différence entre une
  connexion telnet entrante et une connexion ftp entrante. L'utilisateur
  distant établit une connexion réseau avec votre machine puis le
  programme serveur, ou démon de réseau, à l'écoute du port, accepte la
  connexion et s'exécute. Il y a deux façons d'opérer pour les démons de
  réseau.  Les deux sont couramment utilisés en pratique. Ce sont :

     aauuttoonnoommee
        le programme démon écoute le port réseau désigné et lorsqu'il y
        a une connexion, il prend lui-même la connexion en charge pour
        fournir le service.

     eessccllaavvee dduu sseerrvveeuurr _i_n_e_t_d
        le serveur _i_n_e_t_d est un programme démon spécial spécialisé dans
        la conduite des connexions réseau. Il possède un fichier de
        configuration qui indique quel programme doit être utilisé
        lorsqu'une connexion entrante est reçue. Chacun des ports
        service doit être configuré soit avec le protocole tcp, soit
        avec le protocole udp.  Les ports sont décrits 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 numéros de port et
  /etc/inetd.conf qui sert pour la configuration du démon de réseau
  _i_n_e_t_d .



  55..88..11..  //eettcc//sseerrvviicceess

  Le fichier /etc/services est une simple base de données qui associe
  des noms compréhensibles par l'homme à des ports service
  compréhensibles par la machine. Son format est tout à fait simple. Le
  fichier est un fichier texte dont chaque ligne représente une entrée
  de la base de données. Chaque entrée comprend trois champs séparés par
  des caractères espace ou tabulation. Ces champs sont :

  nom      port/protocole        alias     # commentaire



     nnoomm
        un simple mot qui représente le service décrit.

     ppoorrtt//pprroottooccoollee
        ce champ est divisé en deux.

     ppoorrtt
        un nombre qui spécifie le numéro de port où le service désigné
        sera disponible. La plupart des services ont des numéros
        assignés. Ils sont décrits dans la RFC-1340.

     pprroottooccoollee
        c'est soit tcp soit udp.  Il est important de noter qu'une
        entrée comme 18/tcp est très différente de 18/udp et qu'il n'y a
        pas de raisons techniques que le même service existe sur les
        deux. Normalement le bon sens prévaut et c'est vraiment pour un
        service particulier disponible  à la fois sur tcp et udp que
        vous verrez une entrée pour les deux..

     aalliiaass
        autre nom qui peut être utilisé pour  désigner ce service.

  Tout texte apparaissant après le caractère `#' est ignoré et traité
  comme commentaire.



  55..88..11..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//sseerrvviicceess ..

  Toutes les distributions récentes de Linux fournissent un bon fichier
  /etc/services.  Juste au cas où vous construiriez tout depuis le
  départ, 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 numéro
  # de port à la fois pour TCP et UDP; ainsi, la plupart des ports ont deux
  #entrées même si le protocole ne supporte pas UDP.
  # Mis à jour d'après 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 spécifiques à 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'après ``Assigned Numbers'' :
  #
  #> Les Ports Enregistrés ne sont pas contrôlés par l'IANA et peuvent être
  #> utilisés sur la plupart des systèmes par des processus ordinaires
  #> ou des programmes exécutés par des utilisateurs ordinaires.
  #
  #> Les ports sont utilisés dans le TCP [45,106] pour nommer les extrémités
  #> des connexions logiques qui transportent les conversations de longue
  #> durée. Pour offrir des services à des utilisateurs non connus, un port
  #> de service pour contact a été défini. Cette liste spécifie le port utilisé
  #> par le processus serveur ainsi que son port de contact. Comme l'IANA ne peut
  #> contrôler l'usage de ces ports, on donne ici une liste d'utilisation
  #> de ces ports pour être agréable à 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 entrées 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 nécessaires (pour NetBSD)
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Services protocole de délivrance 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 réalité, le fichier augmente toujours en taille au fur et à
  mesure que de nouveaux services apparaissent. Si vous craignez que
  votre copie soit incomplète, je vous suggère de copier un nouveau
  fichier /etc/services provenant d'une distribution récente.



  55..88..22..  //eettcc//iinneettdd..ccoonnff

  Le fichier /etc/inetd.conf est le fichier de configuration du serveur
  démon _i_n_e_t_d . Il sert à dire à _i_n_e_t_d ce qu'il doit faire lorsqu'il
  reçoit 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
  démon serveur de réseau doit tourner, et comment.

  Son format est aussi très simple. C'est un fichier texte dont chaque
  ligne décrit un service que vous voulez fournir. Tout texte suivant un
  `#' est ignoré et considéré comme commentaire. Chaque ligne contient
  sept champs séparés par un nombre quelconque d'espaces (espace ou
  tabulation). Le format général est comme suit :


       service  type_de_socket  protocole  drapeaux  utilisateur  chemin  arguments





     sseerrvviiccee
        est le nom de service applicable à cette configuration, pris
        dans le fichier /etc/services.

     ttyyppee__ddee__ssoocckkeett
        ce champ décrit le type de socket que cette entrée considère
        comme pertinent, les valeurs permises sont : stream, dgram, raw,
        rdm, ou seqpacket.  C'est un peu technique par nature, mais par
        expérience, presque tous les services basés sur tcp utilisent
        stream et presque tous les services basés sur udp  utilisent
        dgram.  Il n'y a que quelques types de serveurs démons spéciaux
        utilisant d'autres valeurs.

     pprroottooccoollee
        le protocole considéré comme valide pour cette entrée. Il doit
        correspondre à l'entrée appropriée dans le fichier /etc/services
        et sera donc soit tcp soit udp.  Les serveurs basés sur Sun RPC
        (Remote Procedure Call) utilisent rpc/tcp ou rpc/udp.

     ddrraappeeaauuxx
        il n'y a en fait que deux valeurs pour ce champ. Celles-ci
        disent à _i_n_e_t_d si le programme serveur réseau libère le socket
        aprés démarrage, 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 démon serveur tournant déjà prenne en charge la
        nouvelle demande de connexion.  C'est encore compliqué, mais en
        pratique tous les serveurs tcp doivent avoir cette entrée
        positionnée sur nowait et la plupart des serveurs udp ont cette
        entrée positionnée sur wait.  Attention il y a quelques
        exceptions notables, laissez vous guider par l'exemple suivant
        si vous n'êtes pas sûrs.

     uuttiilliissaatteeuurr
        ce champ décrit quel compte utilisateur extrait de /etc/passwd
        sera considéré comme propriétaire du démon réseau lorsqu'il est
        lancé.  C'est très utile lorsque vous voulez vous protéger
        contre les trous de sécurité. Vous pouvez mettre nobody comme
        utilisateur pour une entrée si bien que dans le cas où le réseau
        comporte une brèche, les dommages éventuels seront minimisés.
        Cependant habituellement ce champ est réglé sur root, car
        beaucoup de serveurs ont besoin des privilèges de root pour
        tourner correctement.

     cchheemmiinn__ddee__sseerrvveeuurr
        ce champ est le chemin réel du programme à exécuter pour cette
        entrée.

     aarrgguummeennttss
        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.



  55..88..22..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//iinneettdd..ccoonnff

  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 données 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'implémentation
  # habituelle du démon `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 démarrer. 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 corrigés)
  #
  #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 corrigés)
  #
  #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






  55..99..  AAuuttrreess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn aayyaanntt uunn rraappppoorrtt aavveecc llee rréésseeaauu

  Il y a beaucoup de fichiers relatifs à la configuration réseau sous
  Linux susceptibles de vous intéresser. Vous n'aurez jamais à modifier
  ces fichiers, mais il est utile de les décrire pour que vous sachiez
  ce qu'ils contiennent et quelle est leur utilité.



  55..99..11..  //eettcc//pprroottooccoollss

  Le fichier /etc/protocols est une base de données qui donne la
  relation des numéros id de protocole avec leurs noms.  Il est utilisé
  par les programmeurs pour leur permettre de spécifier 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 générale de ce fichier est :


       nom du protocole     numéro    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'après: @(#)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






  55..99..22..  //eettcc//nneettwwoorrkkss

  Le fichier /etc/networks a une fonction similaire au fichier
  /etc/hosts. Il fournit une simple base de données de noms de réseau
  avec des adresses. Son format diffère en ce qu'il n'y a que deux
  champs par ligne, et que ces champs sont codés comme ceci :



        Nom du réseau   adresse de réseau




  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 réseau, et que ce réseau a une entrée dans le fichier /etc/networks
  la commande affichera alors le nom du réseau en lieu et place de son
  adresse.
  55..1100..  SSééccuurriittéé rréésseeaauu eett ccoonnttrrôôllee dd''aaccccèèss

  Laissez-moi débuter ce paragraphe en vous mettant en garde que la
  sécurisation de votre machine et du réseau contre les attaques
  pernicieuses est un art complexe. Je ne me considère pas du tout comme
  un expert dans ce domaine et bien que les mécanismes que je vais
  décrire puissent vous aider, si vous êtes préoccupés par la sécurité,
  alors je vous recommande d'effectuer vous-même des recherches sur le
  sujet. Il existe beaucoup de bonnes références sur l'Internet qui
  traitent du sujet, y compris Security-HOWTO

  Une importante règle pratique est : `NN''uuttiilliisseezz ppaass ddee sseerrvveeuurrss ddoonntt
  vvoouuss nn''aavveezz ppaass ll''uuttiilliittéé'.  Beaucoup de distributions arrivent avec
  plein de services configurés et démarrant automatiquement. Pour
  assurer quand même un minimum de sécurité 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 entrée 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 sécurité et de mécanismes de contrôle
  d'accès ; je vais décrire les plus élémentaires.



  55..1100..11..  //eettcc//ffttppuusseerrss

  Le fichier /etc/ftpusers est un mécanisme simple qui vous permet
  d'interdire l'accès de votre machine à certains utilisateurs de ftp.
  Il est lu par le programme démon (_f_t_p_d) lorsqu'une connexion ftp est
  reçue. 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






  55..1100..22..  //eettcc//sseeccuurreettttyy

  Le fichier /etc/securetty vous permet de spécifier sur quels fichiers
  de périphériques 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 périphériques tty
  autorisés (sur tous les autres root ne peut se connecter) :


       # /etc/securetty - consoles ou root peut se connecter
       tty1
       tty2
       tty3
       tty4







  55..1100..33..  LLee mmééccaanniissmmee ddee ccoonnttrrôôllee dd''aaccccèèss ddeess hhôôtteess ttccppdd ..

  Le programme _t_c_p_d que vous avez vu dans le fichier /etc/inetd.conf
  fournit les mécanismes de contrôle d'accès et de connexion aux
  services qu'il a pour but de protéger.

  Lorsqu'il est invoqué par le programme _i_n_e_t_d, il lit deux fichiers
  contenant les règles d'accès et il autorise ou interdit l'accès au
  serveur qu'il protège.

  Il cherche dans ces deux fichiers jusqu'à ce qu'il trouve une
  correspondance. S'il n'en trouve pas il suppose que l'accès est
  autorisé. Il recherche dans l'ordre suivant : /etc/hosts.allow,
  /etc/hosts.deny. Je décrirai chacun d'eux plus tard. Pour une
  description complète référez-vous aux pages de manuel appropriées
  (hosts_access(5) est un bon point de départ).



  55..1100..33..11..  //eettcc//hhoossttss..aallllooww

  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 hôtes dont l'accès 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 très simple :


       # /etc/hosts.allow
       #
       # <liste des services>: <liste des hôtes> [: commande]





     liste des services
        c'est une liste de serveurs, séparés par des virgules, auxquels
        les règles d'accès s'appliquent.  Exemples de serveur : ftpd,
        telnetd, et fingerd.

     liste des hôtes
        c'est une liste de noms d'hôtes, séparés par des virgules (vous
        pouvez utiliser également des adresses IP).  Vous pouvez en plus
        spécifier des noms d'hôtes ou des adresses IP avec des jokers
        pour obtenir des groupes d'hôtes.  Des exemples :
        gw.vk2ktj.ampr.org pour un hôte spécifique, .uts.edu.au pour
        tous les hôtes se terminant par cette chaîne , 44. pour toutes
        les adresses IP commençant par ces chiffres.  Il y a quelques
        expressions pour simplifier la configuration, parmi lesquelles :
        ALL pour tous les hôtes, LOCAL pour tout hôte dont le nom ne
        contient pas de `.' c'est à dire appartenant au même domaine que
        votre machine, et PARANOID pour tout hôte 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 paramètre optionnel. Ce paramètre est le nom complet
        d'une commande (avec son répertoire) qui sera exécutée chaque
        fois qu'il y aura correspondance.  Ce peut être par exemple une
        commande qui essaiera d'identifier qui se connecte, ou de
        générer un message par courrier ou tout message d'alerte pour
        l'administrateur système avertissant que quelqu'un est en train
        de se connecter.  On peut y inclure des extensions, par exemple
        : %h donnera le nom de l'hôte qui se connecte ou bien son
        adresse s'il n'a pas de nom , %d le programme démon 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)






  55..1100..33..22..  //eettcc//hhoossttss..ddeennyy

  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 hôtes qui _n_'_o_n_t _p_a_s
  _l_'_a_u_t_o_r_i_s_a_t_i_o_n  d'accéder à 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'entrée PARANOID est en fait redondante car l'autre entrée interdit
  tous les cas.  L'une ou l'autre entrée devrait convenir, en fonction
  de vos besoins particuliers.

  Mettre ALL: ALL par défaut dans le fichier /etc/hosts.deny puis
  autoriser certains services, en liaison avec les hôtes que vous avez
  choisis, dans le fichier /etc/hosts.allow, est la configuration la
  plus sûre.



  55..1100..44..  //eettcc//hhoossttss..eeqquuiivv

  Le fichier hosts.equiv est utilisé pour concéder à certains hôtes des
  droits d'accès leur permettant d'avoir un compte sur votre machine
  sans fournir de mot de passe. Cela est utile dans un environnement
  sécurisé où vous contrôlez toutes les machines, sinon ce peut être
  très risqué. Votre machine est aussi sûre que le moins sûr de vos
  hôtes de confiance. Pour augmenter la sécurité, n'utilisez pas cette
  possiblité et encouragez vos utilisateurs à ne pas utiliser le fichier
  .rhosts.



  55..1100..55..  CCoonnffiigguurreerr vvoottrree ddéémmoonn ffttpp  ccoorrrreecctteemmeenntt

  Beaucoup de sites sont intéressés à avoir un serveur _f_t_p anonyme pour
  permettre aux autres de transférer et de récupérer des fichiers sans
  avoir besoin d'une identification spéciale.  Si vous décidez d'offrir
  ce service soyez certains de configurer votre démon _f_t_p de manière
  adéquate pour les accès anonymes. La plupart des pages de manuel
  dédiées à ftpd(8) décrivent tous les détails pour y arriver. Vous
  devez toujours vous assurer que vous avez bien suivi les instructions.
  Un règle importante est de ne pas utiliser une copie de votre fichier
  /etc/passwd dans le répertoire /etc du compte anonyme. Soyez sûrs
  d'avoir éliminé tous les détails des comptes exceptés ceux qui sont
  nécessaires, autrement vous serez vulnérables vis à vis de ceux qui
  maîtrisent les techniques de mise en pièces des mots de passe.



  55..1100..66..  PPaarree--ffeeuu ((FFiirreewwaallll)) ssuurr llee rréésseeaauu

  Ne pas permettre aux datagrammes d'atteindre votre machine ou les
  serveurs est un excellent moyen de sécurisation. Ceci est abordé en
  profondeur dans Firewall-HOWTO et (de manière plus concise) plus loin
  dans ce document.



  55..1100..77..  AAuuttrreess ssuuggggeessttiioonnss

  Voici d'autres suggestions, potentiellement religieuses, à prendre en
  considération :

     sseennddmmaaiill
        en dépit de sa popularité, le démon _s_e_n_d_m_a_i_l apparaît avec une
        effrayante régularité dans les mises en garde concernant la
        sécurité. Faites comme vous voulez, mais j'ai choisi de ne pas
        l'utiliser.

     NNFFSS eett aauuttrreess sseerrvviicceess SSuunn RRPPCC
        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.




  66..  IInnffoorrmmaattiioonnss ssuurr IIPP eett EEtthheerrnneett

  Cette section traite d'informations spécifiques sur IP et Ethernet.
  Les sous-sections ont été rassemblées car je pense que ce sont les
  plus intéressantes de ce qui était appelé autrefois ``Technologies
  spécifiques''. Toute personne ayant un réseau local doit pouvoir tirer
  bénéfice de ces bonnes choses.



  66..11..  EEtthheerrnneett

  Les noms de périphériques Ethernet sont `eth0', `eth1', `eth2' etc. La
  première carte détectée par le noyau devient `eth0' et le reste est
  nommé dans l'ordre de détection.

  par défaut, le noyau Linux ne détecte qu'un seul dispositif Ethernet,
  vous devez donc donner des arguments sur la ligne de commande pour
  forcer le noyau à détecter des autres cartes.
  Pour savoir comment faire marcher votre carte Ethernet sous Linux
  référez-vous au Ethernet-HOWTO.

  Une fois que vous avez compilé convenablement votre noyau pour
  supporter les cartes Ethernet, la configuration des cartes est aisée.

  Typiquement vous faites ainsi (ce que la plupart des distributions
  font automatiquement pour vous, si vous les avez configurées 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é développés par Donald Becker,
  becker@CESDIS.gsfc.nasa.gov.




  66..22..  EEQQLL -- ééggaalliisseeuurr ddee cchhaarrggee àà lliiggnneess mmuullttiipplleess

  Le nom du périphérique EQL est `eql'. Avec les sources standards du
  noyau vous ne pouvez avoir qu'un seul périphérique 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
  débit que d'avoir une ligne à haut débit.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support --->
           [*] Network device support
           <*> EQL (serial line load balancing) support




  Pour supporter ce mécanisme la machine à l'autre bout de la ligne doit
  également supporter EQL.  Linux, Livingstone Portmasters et de
  nouveaux serveurs de ligne supportent des systèmes compatibles.

  Pour configurer EQL vous avez besoin des outils eql, disponibles sur :
  metalab.unc.edu.

  La configuration est plutôt directe. Vous commencez par configurer
  l'interface eql. C'est exactement comme un autre périphérique réseau.
  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 périphériques
  réseau point à point. La façon d'initialiser les connexions dépend du
  type de lien, voyez les paragraphes appropriés pour d'autres
  informations.
  Enfin vous devez associer le lien série et le dispositif EQL, cela
  s'appelle `asservissement' (enslaving) et est réalisé 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 paramètre `_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 déter­
  miner comment les datagrammes vont se répartir sur ce périphérique,
  aussi vous pouvez régler l'équilibrage des lignes en jouant avec cette
  valeur.

  Pour libérer une ligne d'un périphérique 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
  plutôt qu'aux périphériques séries eux-mêmes. Typiquement vous devriez
  utiliser :


       root# route add default eql




  Le pilote EQL fut développé par Simon Janes, simon@ncm.com.



  66..33..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..00))

  Les possibilités d'enregistrement IP du noyau Linux vous permettent de
  recueillir et d'analyser les données d'utilisation du réseau.  Les
  données collectées comprennent le nombre de paquets et le nombre
  d'octets en cumul depuis la dernière remise à zéro.  Vous avez à votre
  disposition une grande variété de réglages pour obtenir les données
  que vous désirez. Cette option a été enlevée du 2.1.102, car l'ancien
  dispositif pare-feu basé sur ipfwadm a été remplacé par
  ``ipfwchains''.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] IP: accounting





  Après 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
  différentes possibilités pour choisir les informations à enregistrer.
  J'ai pris un exemple simplifié qui pourrait vous être utile; lisez
  plutôt la page de manuel _i_p_f_w_a_d_m pour plus d'informations.

  Scenario : Vous avez un réseau 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
  présente comme un script shell :



               #!/bin/sh
               #
               # Donne les réglages d'enregistrement
               ipfwadm -A -f
               #
               # Met en place les raccourcis
               localnet=44.136.8.96/29
               any=0/0
               # Ajoute des réglages 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
               #
               # Réglages par défaut
               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 réglages
               ipfwadm -A -l -n
               #






  Les noms ``ftp-data'' et ``www'' se réfèrent aux lignes du fichier
  /etc/services.  La dernière commande liste chacune des règles
  d'enregistrement et affiche le total.

  Il est important de noter, lorsque l'on analyse les enregistrement IP,
  que lleess ttoottaauuxx ssoonntt iinnccrréémmeennttééss àà cchhaaqquuee ffooiiss, donc pour connaitre les
  différences vous devez exécuter les opérations mathématiques
  nécessaires.  Par exemple si je veux savoir combien de données 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            * -> *
  #






  66..44..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..22))

  On accède au nouveau code d'enregistrement par des ``chaînes IP pare-
  feu''.  Voir La page d'accueil des chaînes 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'après Documentations/Changes
  dans les sources du dernier noyau).




  66..55..  IIPP AAlliiaassiinngg

  Il y a des applications où être en mesure d'affecter plusieurs
  adresses IP à un seul périphérique réseau pourrait être utile.
  Certains fournisseurs d'accès à l'Internet utilise souvent cette
  possibilité pour fournir des offres www et ftp `à la carte' pour leurs
  clients. Vous pouvez vous référer au mini-HOWTO IP-Aliasing pour plus
  d'informations.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           ....
           [*] Network aliasing
           ....
           <*> IP: aliasing support




  Après avoir compilé et installé le noyau avec le support IP_Alias, la
  configuration est très simple. Les alias sont ajoutés aux
  périphériques réseau virtuels  associés au périphérique réseau réel.
  Une simple convention de noms s'applique pour périphériques : <nom de
  périphérique> : <numéro de périphérique virtuel>, par ex. eth0:0,
  ppp0:10 etc. Notez que le pilote de périphérique ifname:number ne peut
  être configuré _q_u_'_a_p_r_è_s le réglage de l'interface principale.

  Par exemple, supposons que vous ayez un réseau Ethernet avec
  simultanément deux sous-réseaux IP et que vous vouliez que votre
  machine ait un accès 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 associées avec cet alias seront enlevées automa­
  tiquement.


  66..66..  IIPP PPaarree--ffeeuu ((FFiirreewwaallll)) ((ppoouurr LLiinnuuxx--22..00))

  Le pare-feu IP et les publications le concernant sont traités de
  manière plus appronfondies dans le document Firewall-HOWTO. Le pare-
  feu IP vous permet de sécuriser votre machine contre les accès réseau
  non-autorisés en filtrant, ou acceptant, des datagrammes venant de, ou
  allant vers, des adresses IP de votre choix.  Il y a différentes
  règles : le filtrage en entrée, le filtrage en sortie, et le filtrage
  en retransmission. Les règles en entrée s'appliquent aux datagrammes
  qui sont reçus par un dispositif réseau. Les règles en sortie
  s'appliquent aux datagrammes qui sont émis par un dispositif réseau.
  Les règles en retransmission s'appliquent aux datagrammes qui ne sont
  pas pour cette machine, c'est à dire les datagrammes qui seront
  reroutés.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] Network firewalls
           ....
           [*] IP: forwarding/gatewaying
           ....
           [*] IP: firewalling
           [ ] IP: firewall packet logging




  La configuration du pare-feu IP est réalisée en utilisant la commande
  _i_p_f_w_a_d_m.  Comme mentionné plus haut, la sécurité n'est pas ma
  spécialité, aussi, bien que je vous présente un exemple utilisable par
  vous-même, faites des recherches et mettez au point vos propres
  règlages si la sécurité 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 protéger votre réseau local contre les
  accès extérieurs non autorisés.

  La configuration suivante est due à Arnt Gulbrandsen,
  <agulbra@troll.no>.

  L'exemple décrit une configuration de pare-feu pour une machine Linux
  /pare-feu/routeur illustrée 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 placées dans un
  fichier rc de telle sorte qu'elles seront démarrées automatiquement à
  chaque redémarrage du système. Pour une sécurité maximum, elles
  devront être effectuées après la configuration des interfaces réseau,
  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 règles de 'Forwarding'
          # Change le réglage par défaut 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, dévérouille 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 rejetés sont enregistrés. 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 réseau 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 "réponses" 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 réponses aux autres ports utilisateurs sont autorisées
          #
          /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'hôte
          # entrant de ne pas persévérer, sinon nous devrons attendre que
          # identd s'arrête.
          #
          /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 réseaux
          # 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'intérieur
          #
          /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 départ 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'extérieur pour tester votre configuration et en vérifier la
  fiabilité.



  66..77..  PPaarree--ffeeuu IIPP ((ppoouurr LLiinnuuxx--22..22))

  On accède au nouveau code d'enregistrement par des ``chaînes pare-feu
  IP''.  Voir La page d'accueil des chaînes 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'après 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 espérer une en Août 1999.




  66..88..  EEnnccaappssuullaattiioonn IIPPIIPP

  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.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] TCP/IP Networking
           [*] IP: forwarding/gatewaying
           ....
           <*> IP tunelling




  Les périphériques IP tunnel s'appellent `tunl0', `tunl1', etc..

  "Mais pourquoi ?" D'accord. D'accord. Les règles de routage classiques
  spécifient qu'un réseau IP comprend une adresse IP et un masque de
  réseau. Ceci fournit un ensemble d'adresses contiguës qui peuvent
  toutes être routées par l'intermédiaire d'une seule entrée de routage.
  Cela marche, mais signifie que vous ne pouvez utiliser une seule
  adresse uniquement lorsque vous êtes connecté à un point du réseau
  auquelle elle appartient.  Dans la plupart des cas, il n'y a pas de
  problèmes, mais si vous êtes en mouvement alors vous ne pouvez pas
  rester connecté au même endroit tout le temps. L'encapsulation  IP/IP
  ( IP tunneling) vous permet de passer outre cette contrainte en
  permettant aux paquets destinés à votre adresse d'être enveloppés et
  redirigés vers une autre adresse. Si vous savez que vous allez opérer
  depuis un autre réseau IP pour quelques temps, vous pouvez régler une
  machine qui est chez vous pour accepter des paquets destinés à votre
  adresse IP et les rediriger vers l'adresse que vous allez utiliser
  provisoirement.



  66..88..11..  UUnnee ccoonnffiigguurraattiioonn ddee rréésseeaauu aavveecc ttuunnnneelliinngg..




        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 réseau privé virtuel. Cet exemple présuppose
  que vous ayez deux machines chacune avec une seule connexion Internet.
  Chaque hôte a une seule adresse IP. Derrière chacune de ces machines
  se trouve des réseaux privés locaux configurés avec des adresses IP
  réservées. Supposez que vous vouliez permettre à chacun des hôtes du
  groupe A de se connecter à n'importe quel hôte du groupe B, comme
  s'ils étaient vraiment connectés à l'Internet via un routage réseau.
  L'encapsulation IPIP vous permettra de le faire. À noter que
  l'encapsulation ne vous permettra pas de faire en sorte que chacun des
  hôtes des réseaux 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 périphérique 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 périphérique 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 destinés à 192.168.1.0/24 dans un
  paquet d'encapsulation ayant pour adresses de destination
  aaa.bbb.ccc.ddd'.

  Notez que les configurations sont inversées à l'autre bout.  Le
  périphérique 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 `désencapsuler' les paquets IPIP,
  c'est à dire qu'elle doit aussi être configurée comme périphérique
  tunnel.


  66..88..22..  UUnnee ccoonnffiigguurraattiioonn dd''hhôôttee ppoouurr ll''eennccaappssuullaattiioonn IIPPIIPP..

  Ce n'est pas tout un réseau que vous aurez à router. Vous pouvez par
  exemple ne router qu'une seule adresse IP. Dans ce cas vous devrez
  configurer le périphérique tunl sur la machine `distante' avec sa
  propre adresse IP et à l'extrémité A n'utiliser qu'une route hôte
  (avec Proxy Arp) plutôt qu'une route réseau via le périphérique
  tunnel. Refaisons et modifions notre configuration de manière
  appropriée. Maintenant nous avons seulement l'hôte `B' qui veut agir
  comme si il était à la fois connecté à l'Internet et également au
  réseau distant supporté par l'hôte `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 (démarre le lien ppp link, règle la route par
               # défaut)
               pppd
               route add default ppp0
               #
               # configuration du périphérique de tunneling
               ifconfig tunl0 192.168.1.1 up
               route add -host 192.168.1.12 gw $remotegw tunl0
               #
               # Proxy ARP pour l'hôte distant
               arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub




  L'hôte 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 (démarre le lien ppp, règle la route par défaut)
          pppd
          route add default ppp0
          #
          # configuration du périphérique 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 hôte veut seulement se balader sur l'Internet et
  maintenir une adresse IP utilisable tout le temps. Référez-vous au
  paragraphe Mobile-IP pour avoir plus d'informations et savoir comment
  faire en pratique.



  66..99..  IIPP MMaassqquueerraaddee

  Beaucoup de gens ont une simple connexion par téléphone pour aller sur
  l'Internet. Presque tout le monde ne se voit offrir qu'une seule
  adresse IP par le founisseur d'accès avec ce type de configuration.
  Ceci est normalement suffisant pour permettre un accès complet au
  réseau. IP Masquerade est une astuce intelligente qui vous permet
  d'avoir plusieurs machines utilisant une seule adresse IP, en faisant
  croire aux autres hôtes 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 hôtes masqués
  peuvent appeler mais ne peuvent accepter ou recevoir des connexions
  réseau de la part d'hôtes éloignés. Cela signifie que certains
  services réseau comme _t_a_l_k ne peuvent fonctionner et que d'autres,
  comme _f_t_p doivent être configurés pour fonctionner en mode passif
  (PASV). Heureusement la plupart des services réseau comme _t_e_l_n_e_t,
  World Wide Web et _i_r_c fonctionnent correctement.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 périphérique réseau configuré, par exemple une carte Ethernet,
  avec des adresses réseau réservée. Les hôtes masqués seront ceux du
  second réseau. Chacun de ces hôtes aura l'adresse IP du port Ethernet
  réglée comme passerelle ou routeur par défaut.
  Une configuration typique ressemble à ceci :


       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| hôte |
         /                                 |  |      |
        /                                  |  --------
       -                                   -




  _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 adéquates pour cette configuration sont :


       # Routage réseau pour éthernet
       route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       #
       # Route par défaut pour le reste de l'internet.
       route add default ppp0
       #
       # Fait en sorte que tous les hôtes du réseau 192.168.1/24  soient masqués.
       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 réseau pour ethernet
                route add -net 192.168.1.0 netmask 255.255.255.0 eth0
                #
                # Route par défaut vers le reste de l'internet.
                route add default ppp0
                #
                # Fait en sorte que tous les hôtes sur le réseau 192.168.1/24 soient
                # masqués.
               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 détaillé qui est le ``IP-Masquerade-mini-HOWTO'' (qui donne en
  plus des renseignements pour configurer d'autres systèmes
  d'exploitation pour fonctionner avec un serveur de masquage linux).





  66..1100..  IIPP TTrraannssppaarreenntt PPrrooxxyy

  IP transparent proxy est un procédé qui vous permet de rediriger des
  serveurs ou des services destinés à 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.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 réalisé 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 hôte, seront redirigées vers le
  port 2323 de ce même hôte. Si vous utilisez un service sur ce port,
  vous pouvez rediriger des connexions telnet, les enregistrer ou
  exécuter tout ce qui bon vous semble.

  Un exemple plus intéressant est la redirection de tout le trafic http
  au travers d'un cache local. Cependant, le protocole utlisé par les
  serveurs proxy diffère 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 insérant un petit serveur, appelé
  transproxy (vous pouvez le trouver sur la toile). Vous pouvez choisir
  de faire tourner transproxy sur le port 8081, et exécuter 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 après
  avoir corrigé les différences de protocole.

  66..1111..  IIPPvv66

  À peine pensez-vous avoir commencé à comprendre comment fonctionne le
  réseau IP, que les règles ont changé!  IPv6 est l'abbréviation de
  version 6 du `Protocole Internet' (version 6 de IP). Il fut développé
  initialement pour calmer les inquiétudes de la communauté Internet
  quant à la pénurie é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
  réseaux IPv6 plus facilement gérables que les réseaux IPv4.

  Linux a déjà une implémentation IPv6 qui marche, mais pas encore
  complètement, dans la série des noyaux 2.2.*.

  Si vous voulez essayer cette prochaine génération de technologie
  Internet, ou si vous voulez un renseignement, lisez le document
  IPv6-FAQ qui se trouve sur www.terra.net.



  66..1122..  IIPP MMoobbiillee

  Le terme "mobilité IP" décrit la possibilité qu'un hôte a de
  transférer sa connexion réseau d'un point de l'Internet vers un autre
  sans changer d'adresse IP ou sans perdre la connectivité. Normalement
  quand un hôte IP change de point de connexion, il change aussi
  d'adresse IP.  La mobilité IP résoud ce problème en allouant une
  adresse IP fixe à l'hôte qui se déplace et en utilisant une
  encapsulation IP (tunneling) avec routage automatique pour s'assurer
  que les datagrammes qui lui sont destinés seront routés vers l'adresse
  effectivement utilisée à 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.



  66..1133..  MMuullttiiccaasstt

  L'IP Multicast permet de router simultanément des datagrammes IP vers
  un certain nombre d'hôtes se trouvant sur des réseaux différents.  Ce
  mécanisme 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.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
               [*] TCP/IP networking
               ....
               [*] IP: multicasting




  Un ensemble d'outils et quelques modifications de la configuration
  réseau sont nécessaires.  Pour plus d'informations sur le support
  multicast pour Linux, voyez le Multicast-HOWTO.html






  66..1144..  NNAATT -- NNeettwwoorrkk AAddddrreessss TTrraannssllaattiioonn ((TTrraadduuccttiioonn dd''aaddrreessssee rréésseeaauu))

  Le système de traduction d'adresse réseau IP ressemble plutôt au grand
  frère standardisé du système de masquage IP de Linux. Il est décrit en
  détail dans la RFC-1631 sur votre archive RFC la plus proche. NET
  fournit des possibilités que IP Masquerade ne sait pas faire, ce qui
  le rend plus apte à une utilisation de routeur pare-feu pour un réseau
  d'entreprise et des installations de plus grandes dimensions.

  Une implémentation alpha de NAT pour le noyau 2.0.29 de Linux a été
  développée par Michael.Hasenstein, Michael.Hasenstein@informatik.tu-
  chemnitz.de.  La documentaion et l'umplémentation de Michael se trouve
  sur :

  Linux IP Network Address Web Page

  Les noyaux 2.2.* récents incluent également quelques fonctions de NAT
  dans l'algorithme de routage.



  66..1155..  MMiissee eenn ffoorrmmee dduu ttrraaffiicc -- CChhaannggeerr llaa bbaannddee ppaassssaannttee aalllloouuééee

  Le metteur en forme de trafic est un pilote de périphérique qui crée
  de nouvelles interfaces; celles-ci sont limitées au point de vue
  trafic selon les réglages de l'utilisateur, et se connectent aux
  périphériques de réseau physiques pour la transmission réelle, et
  peuvent donc être utilisées comme route vers l'extérieur en vue de
  trafic réseau.


  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 contrôler que la bande passante
  du trafic sortant, car les paquets sont transmis par le metteur en
  forme si l'on se réfère aux tables de routage; ainsi, le
  fonctionnement suivant ``un routage par adresse de départ'' peut aider
  à limiter la bande passante totale d'hôtes spécifiques utilsant un
  routeur Linux.


  Linux-2.2 possède déjà 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 récent), sur ftp.systemy.it.



  66..1166..  RRoouuttaaggee aavveecc LLiinnuuxx--22..22

  La dernière version de Linux-2.2 permet un tas de réglages concernant
  le routage. Malheureusement, vous devez attendre la prochaine édition
  de cet HOWTO, ou bien lire les sources du noyau.



  77..  UUttiilliissaattiioonn dduu mmaattéérriieell ccoouurraanntt ppoouurr PPCC





  77..11..  RRNNIISS

  Le Réseau Numérique à Intégration de Service (RNIS) (en anglais ISDN:
  Integrated Services Digital Network) est une série de normes donnant
  les spécifications d'un réseau de données numériques à usage général.
  Un `appel' RNIS crée un service synchrone de données point à point
  vers la destination. RNIS est généralement délivré sur une ligne à
  haut débit divisée en un certain nombre de canaux discrets.  Il y a
  deux types de canaux, les `canaux B' qui transportent effectivement
  les données utilisateurs, et un canal unique appelé `canal D' qui est
  utilisé pour envoyer les informations de contrôle 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
  divisée en 30 canaux B discrets de 64 kps et un canal D de 64 kps.
  N'importe quel nombre de canaux peuvent être utilisés en même temps et
  ceci dans toutes les combinaisons possibles.  Vous pouvez par exemple
  établir 30 appels différents de 64 kps vers 30 destinations
  différentes, ou bien 15 appels de 128 kps chacun vers 15 destinations
  différentes (2 canaux utilisés 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 sociétés de Télécommunications de fournir un seul
  service de données pouvant délivrer soit le téléphone (avec une voix
  numérisée) ou bien des services de données vers votre domicile ou
  votre bureau sans avoir à effectuer de changements pour obtenir une
  configuration spéciale.

  Il y a plusieurs façons 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 réseau que votre
  opérateur de télécommunications a installé au moment de l'obtention de
  votre service RNIS, et qui présente des interfaces séries.  L'une de
  ces interfaces est utilisée pour entrer les commandes pour établir les
  appels et la configuration, et les autres sont reliées aux
  périphériques réseau qui utiliseront les circuits de données 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 périphérique série.
  Une autre façon, 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-même.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :



  ISDN subsystem  --->
          <*> ISDN support
          [ ] Support synchronous PPP
          [ ] Support audio via ISDN
          < > ICN 2B and 4B support
          < > PCBIT-D support
          < > Teles/NICCY1016PC/Creatix support




  L'implémentation Linux de RNIS supporte différents types de cartes
  internes RNIS.  Il y a celles énumérées 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
     téléchargés pour les rendre opérationnelles. Il y a un utilitaire
     séparé pour le faire.

  Tous les détails pour configurer le support RNIS Linux se trouvent
  dans le répertoire /usr/src/linux/Documentation/isdn/ et un document
  FAQ dédié à _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).

  NNoottee aauu ssuujjeett ddee PPPPPP. L'ensemble des protocoles PPP peut travailler
  sur des lignes série synchrone ou asynchrone. Le démon PPP `_p_p_p_d'
  couramment distribué pour Linux ne supporte que le mode asynchrone. Si
  vous désirez utiliser les protocoles PPP avec votre service RNIS vous
  aurez besoin d'une version spéciale. Les détails pour la trouver se
  trouvent dans la documentation mentionnée ci-dessus.



  77..22..  PPLLIIPP ppoouurr LLiinnuuxx--22..00

  Les noms de périphériques PLIP sont `plip0', `plip1', `plip2'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PLIP (parallel port) support





  _P_L_I_P (Parallel Line IP) est, comme SLIP, utilisé pour fournir une
  connexion réseau _p_o_i_n_t _à _p_o_i_n_t entre deux machines, sauf qu'il est
  conçu pour utiliser les ports parallèles de votre machine au lieu des
  ports séries. Parce qu'il est possible de transmettre plus d'un bit en
  même temps avec un port parallèle, il est possible d'atteindre de plus
  hautes vitesses avec l'interface _P_L_I_P qu'avec une sortie série
  standard (un schéma de câblage est donné plus loin dans ce document).
  De plus, même le plus simple des ports parallèles, le port imprimante,
  peut être utilisé, au lieu d'acheter un UART 16550AFN relativement
  cher pour vos ports séries. PLIP utilise beaucoup de CPU en
  comparaison d'une liaison série et ce n'est sûrement pas un bon choix
  si vous avez la possibilité d'avoir des cartes éthernet pas chères,
  mais ça fonctionne lorsque rien d'autre n'est disponible, et ça
  fonctionne très bien.

  Les pilotes PLIP entrent en compétition avec les autres pilotes du
  matériel branché sur le port parallèle. 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 série des noyaux 2.0.* les pilotes de périphérique PLIP sont
  affectés 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 parallèles ne correspondent pas aux combinaisons
  précédentes alors vous pouvez changer les IRQ en utilisant la commande
  _i_f_c_o_n_f_i_g avec le paramètre `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 à spécifier 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 contrôlé par deux temporisations de
  dépassement de temps, dont les valeurs par défaut devraient convenir
  la plupart du temps. Vous devrez peut-être les augmenter si vous avez
  un ordinateur particulièrement lent, auquel cas les valeurs devant
  être augmentées se trouvent sur l'aauuttrree ordinateur. Il existe un
  programme appelé _p_l_i_p_c_o_n_f_i_g qui permet d'effectuer ces réglages 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 utilisées sur le câble
  PLIP. Je les mets personnellement dans la base de données /etc/host :


        # entrées plip
        192.168.3.1 localplip
        192.168.3.2 remoteplip





  Le paramètre _p_o_i_n_t_o_p_o_i_n_t a la même signification que pour  SLIP,
  c'est-à-dire qu'il spécifie 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 utilisés.

  Plus d'information sur PLIP peut être obtenu avec le document ``PLIP-
  mini-HOWTO''.



  77..33..  PPLLIIPP ppoouurr LLiinnuuxx22..22

  Durant le développement des versions 2.1 du noyau, le support
  concernant les ports parallèles s'est amélioré.


  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 mêmes commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e comme dans le paragraphe
  précédent), mais l'initialisation du système est différente en raison
  du support port parallèle amélioré.

  Le ``premier'' périphérique PLIP est toujours appelé ``plip0'',
  premier signifiant celui qui est détecté en premier par le système,
  comme pour les périphériques Ethernet. Le port parallèle 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 parallèle,
  vous n'aurez qu'un seul répertoire appelé /proc/parport/0.

  Si votre noyau ne détecte pas l'IRQ utilisée par votre port parallèle,
  ``insmod plip'' échouera ; dans ce cas, vous écrivez juste le chiffre
  adéquat dans /proc/parport/0/irq et vous invoquez de nouveau _i_n_s_m_o_d.

  Une information complète sur la gestion des ports parallèles est
  disponible dans le fichier Documentation/parport.txt, qui se trouve
  dans les sources du noyau.




  77..44..  PPPPPP

  Les noms de périphériques PPP sont `ppp0', `ppp1', etc.  Les noms sont
  attribués séquentiellement, le premier périphérique étant `0'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PPP (point-to-point) support




  La configuration de PPP est discutée en détail dans le PPP-HOWTO.


  77..44..11..  MMaaiinntteennaannccee dd''uunnee ccoonnnneexxiioonn ppeerrmmaanneennttee aavveecc llee rréésseeaauu àà ll''aaiiddee
  ddee ppppppdd

  Si vous êtes suffisamment fortunés pour avoir une connexion semi-
  permanente avec le net et que vous vouliez que votre machine refasse
  la connexion PPP en cas de déconnexion, alors voici une astuce simple.

  Configurer PPP de sorte qu'il soit démarré par l'utilisateur root en
  lançant la commande :


       # pppd




  SSooyyeezz cceerrttaaiinnss d'avoir l'option `-detach' dans le fichier
  /etc/ppp/options. Puis, insérez la ligne suivante dans votre fichier
  /etc/inittab, avec les définitions des _g_e_t_t_y :


       pd:23:respawn:/usr/sbin/pppd




  Cela permettra au programme _i_n_i_t de démarrer et de surveiller le pro­
  gramme _p_p_p_d , et de le redémarrer automatiquement s'il meurt.




  77..55..  CClliieenntt SSLLIIPP

  Les fichiers de périphériques SLIP sont nommés `sl0', `sl1', etc. Le
  premier configuré étant `0' et les autres s'incrémentant au fur et à
  mesure de leur configuration.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 série, ce peut être un téléphone et un modem, ou tout
  autre ligne dédiée.  Bien sûr pour utiliser SLIP vous devez avoir
  accès à un _s_e_r_v_e_u_r _S_L_I_P dans votre entourage.  Beaucoup d'universités
  et de sociétés fournissent des accès SLIP de par le monde.

  SLIP utilise les ports séries de votre machine pour transporter les
  datagrammes IP. Pour cela il doit prendre le contrôle du périphérique
  série. Les noms de périphériques SLIP sont _s_l_0, _s_l_1, etc. Comment
  ceux-ci correspondent avec vos périphériques série ? Le code réseau
  utilise ce que l'on nomme un appel _i_o_c_t_l (i/o control) pour
  transformer les périphériques série en périphériques SLIP. Il y a deux
  programmes qui peuvent faire cela, ce sont _d_i_p et _s_l_a_t_t_a_c_h.




  77..55..11..  ddiipp

  _d_i_p (Dialup IP) est un programme élégant capable de régler la vitesse
  du dispositif série, de demander à votre modem d'appeler l'autre
  extrémité de la ligne, de vous connecter automatiquement au serveur
  distant, de chercher des messages qui vous ont été envoyés par le
  serveur et d'en extraire des informations telles que votre adresse IP
  et de faire le _i_o_c_t_l nécessaire pour basculer votre port série en mode
  SLIP.  _d_i_p est très flexible quant à l'utilisation de scripts et grâce
  à ceci vous pouvez automatiser vos procédures 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.



  77..55..22..  ssllaattttaacchh

  _s_l_a_t_t_a_c_h au contraire de _d_i_p est un programme très simple, très 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 périphérique série en périphérique SLIP. Il suppose
  que vous avez toutes les informations nécessaires et que la liaison
  série est établie avant de l'invoquer.  _s_l_a_t_t_a_c_h est idéal quand vous
  avez une liaison permanente avec votre serveur, comme un câble
  physique ou une ligne dédiée.



  77..55..33..  QQuuaanndd uuttiilliisseerr qquuooii ??

  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 dédiée,
  peut-être un câble, entre votre machine et le serveur et qu'il n'y a
  pas d'action spéciale nécessaire pour garder la ligne en activité.
  Voir la section `Connexion SLIP permanente' pour plus de détails.


  Configurer SLIP est analogue à la configuration d'une interface
  Ethernet (voir la section `Configurer un périphérique Ethernet' ci-
  dessus).  Cependant, il existe quelques différences.


  Tout d'abord, les liens SLIP ne sont pas des réseaux Ethernet en ce
  sens qu'il n'y a que deux hôtes sur le réseau, un à chaque extrémité
  de la liaison. À la différence de l'Ethernet qui est disponible dès
  que vous êtes câblé, avec SLIP, en fonction du type de lien que vous
  avez, vous serez amené à initialiser votre connexion réseau d'une
  manière spéciale.


  Si vous utilisez _d_i_p, alors cela ne sera pas fait au moment du
  démarrage de la machine, mais plus tard, quand vous serez prêt à
  utiliser la liaison.  Il est possible d'automatiser la procédure. 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 décrit bientôt.


  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 numéro.
  _d_i_p peut prendre en charge la connexion automatiquement.



  77..55..44..  eett DDIIPP SSeerrvveeuurr SSLLIIPP ssttaattiiqquuee aavveecc uunnee lliiggnnee ttéélléépphhoonniiqquuee

  Le serveur SLIP statique est celui qui vous fournit une adresse IP qui
  reste exclusivement la vôtre. À chaque fois que vous vous connectez à
  ce serveur, vous configurez votre port SLIP avec cette adresse. Le
  serveur SLIP statique répond à votre appel par modem, vous demande
  probablement un nom d'utilisateur et un mot de passe, et ensuite
  dirige tous les datagrammes destinés à votre adresse au travers de
  cette connexion. Si vous avez un serveur statique, alors vous mettez
  des entrées pour votre nom d'hôte 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 spéciales 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 adéquates et il configure l'interface pour vous après
  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.



  77..55..55..  SSeerrvveeuurr SSLLIIPP ddyynnaammiiqquuee aavveecc uunnee lliiggnnee ttéélléépphhoonniiqquuee eett DDIIPP

  Le serveur SLIP _d_y_n_a_m_i_q_u_e vous alloue une adresse IP de manière
  aléatoire, à partir d'un groupe d'adresses, à chaque fois que vous
  vous connectez. Cela signifie qu'il n'y a aucune garantie d'avoir la
  même adresse à chaque fois, et que celle-ci peut être utilisée par
  quelqu'un d'autre après la déconnexion. L'administrateur réseau qui a
  configuré le serveur SLIP a assigné un groupe d'adresses que le
  serveur SLIP peut utiliser quand il reçoit un appel entrant. Il prend
  alors la première adresse inutilisée, guide l'appelant au travers du
  processus de connexion et envoie un message de bienvenue contenant
  l'adresse IP qu'il a allouée 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 allouée par le serveur puis configurer le périphérique SLIP avec
  celle-ci.


  Encore une fois, _d_i_p fait le sale boulot et les nouvelles versions
  sont suffisamment élégantes 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 périphérique SLIP avec.

  Si votre serveur SLIP fonctionne ainsi, alors vous pouvez aller à la
  section `Utiliser DIP' pour savoir comment configurer _d_i_p de manière
  adéquate.



  77..55..66..  UUttiilliisseerr DDIIPP

  Comme expliqué plus haut, _d_i_p est un programme puissant qui simplifie
  et automatise le processus de composition d'un numéro vers un serveur
  SLIP, se connecte dessus, démarre la connexion et configure les
  périphériques SLIP à l'aide des commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e
  appropriées.


  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 réaliser chacune des actions que vous voulez qu'il fasse.
  Voyez le fichier sample.dip fourni avec _d_i_p pour avoir une idée de la
  manière 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 périphérique SLIP avec l'adresse IP
  donnée par le serveur dynamique. L'exemple suivant est une version
  modifiée 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 départ 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:
  # Après, postionner l'adresse et le nom de l'hôte distant.
  # Ma machine s'appelle 'xs4all.hacktic.nl' (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Positionne le masque de réseau sur sl0 à 255.255.255.0
  netmask 255.255.255.0
  # Règle le port série et la vitesse.
  port cua02
  speed 38400

  # Reset le modem et la ligne de terminal.
  # Cela semble poser problème à certains!
  reset

  # Notez! Valeurs "standards" prédéfinies de "errlevel":
  #  0 - OK
  #  1 - CONNECT
  #  2 - ERROR
  #
  # Vous pouvez les changer en faisant un grep dans *.c avec "addchat()"...

  # On se prépare pour numéroter.
  send ATQ0V1E1X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble
  dial 555-1234567
  if $errlvl != 1 goto modem_trouble

  # Nous sommes connectés. Nous nous enregistrons sur le système.
  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 enregistrés.
  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 grâce au serveur.
  # Ici nous supposons qu'après 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

  # réglage des paramètres 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 précédent 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'extrémité de la ligne une chaîne de caractères ressemblant
  à une adresse IP, c'est à dire des ensembles de nombres séparés par
  des caractères `.'. Cette modification fut mise en place plus
  spécialement 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 crée automatiquement une route par défaut 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 défaut,
  alors enlevez la commande _d_e_f_a_u_l_t du script.  Après 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 périphérique _s_l_0. C'est votre périphérique SLIP. Si le besoin
  s'en fait sentir, vous pouvez modifier manuellement sa configuration,
  après 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 différents 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 extrémités
  de la liaison doivent être d'accord, aussi assurez-vous que ce que
  vous avez choisi est en accord avec les réglages du serveur.

  L'exemple montré ci-dessus est plutôt robuste et devrait faire face à
  la plupart des erreurs. Référez-vous à la page de manuel de _d_i_p pour
  plus d'informations.  Naturellement, vous pouvez, par exemple,
  modifier le script pour réaliser des choses comme recomposer le numéro
  vers le serveur si la connexion n'a pas été faite au bout d'un certain
  temps, ou même essayer une série de serveurs si vous avez accès à plus
  d'un d'entre eux.



  77..55..77..  CCoonnnneexxiioonn ppeerrmmaanneennttee SSLLIIPP uuttiilliissaanntt uunnee lliiggnnee eett ssllaattttaacchh

  Si vous avez deux machines reliées par un câble, ou si vous êtes
  suffisamment riche pour avoir une ligne dédiée, ou un autre type de
  connexion permanente entre votre machine et une autre, alors vous
  n'avez pas besoin de vous casser la tête avec _d_i_p pour régler votre
  liaison série.  _s_l_a_t_t_a_c_h est un utilitaire très simple à utiliser et
  vous permet d'avoir les fonctionnalités juste nécessaires 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 périphérique série à la bonne vitesse et basculer
  votre périphérique série 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 dédiée
       #
       #  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ù :

     IIPPAA..IIPPAA..IIPPAA..IIPPAA
        représente votre adresse IP.

     IIPPRR..IIPPRR..IIPPRR..IIPPRR
        représente l'adresse IP de l'hôte distant.


  _s_l_a_t_t_a_c_h alloue le premier périphérique SLIP disponible au
  périphérique série spécifié.  _s_l_a_t_t_a_c_h démarre avec _s_l_0. Par
  conséquent la première commande _s_l_a_t_t_a_c_h relie le périphérique _s_l_0 au
  périphérique spécifé, 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
  grâce à 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 extrémités doivent être d'accord sur l'utilisation de la
  compression.




  77..66..  SSeerrvveeuurr SSLLIIPP

  Vous avez peut-être une machine connectée au réseau et vous aimeriez
  que d'autres personnes puissent s'y connecter pour y chercher des
  services de réseau, alors vous devez configurer votre machine comme
  serveur. Si vous voulez utiliser SLIP comme protocole de ligne série,
  vous avez trois possiblités pour configurer votre machine Linux comme
  serveur SLIP. Ma préférence est la première présentée, _s_l_i_p_l_o_g_i_n, car
  elle semble la plus facile à configurer et à comprendre, mais je
  présenterai un résumé pour chacune, ainsi vous pourrez décider par
  vous-même.



  77..66..11..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt sslliippllooggiinn

  _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 même 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 forcément la même que lors de la connexion précédente).

  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 après la connexion, _s_l_i_p_l_o_g_i_n est exécuté et cherche dans son
  fichier de configuration une entrée dont le nom correspond à celui de
  l'appelant. S'il en détecte une, il configure la ligne avec 8 bits de
  données, et utilise un appel _i_o_c_t_l pour basculer celle-ci en ligne
  SLIP.  Quand ce processus est fini, la dernière é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 adéquate, ainsi que le masque de
  réseau et positionne le routage approprié. Ce script est appelé
  habituellement /etc/slip.login, mais tout comme _g_e_t_t_y, si certains
  appelants nécessitent une initialisation spéciale, alors vous pouvez
  créer des scripts de configuration appelés /etc/slip.login.loginname
  qui seront utilisés à la place du script par défaut.

  Il y a quelques fichiers que vous devez configurer pour que _s_l_i_p_l_o_g_i_n
  travaille pour vous. Je décrirai 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 spécifique 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' après
     une déconnexion volontaire ou intempestive.



  77..66..11..11..  OOùù oobbtteenniirr sslliippllooggiinn

  Votre distribution contient peut-être déjà 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 précompilés
  et une page de manuel.
  Pour s'assurer que seuls les utilisateurs autorisés pourront faire
  tourner le programme _s_l_i_p_l_o_g_i_n, vous devez ajouter une entrée 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'exécuter.
  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 répertoire /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 conséquence.

  Lisez les fichiers README qui sont inclus dans le paquetage pour plus
  d'informations.



  77..66..11..22..  CCoonnffiigguurreerr //eettcc//ppaasssswwdd  ppoouurr uuttiilliisseerr SSLLIIPP

  Normalement vous devez créer des noms d'utilisateurs spéciaux, 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 préfixée avec la lettre capitale `S'.  Ainsi, par exemple,
  si l'appelant s'appelle radio alors vous pouvez créer une entrée dans
  le fichier /etc/passwd ressemblant à ceci :



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin




  Le nom du compte n'a pas réellement d'importance, du moment qu'il ait
  une signification pour vous.

  Note : l'appelant n'a pas besoin de répertoire home spécial car il
  n'utilisera pas de shell sur la machine, dès 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.



  77..66..11..33..  CCoonnffiigguurreerr //eettcc//sslliipp..hhoossttss

  Le fichier /etc/slip.hosts  est le fichier où _s_l_i_p_l_o_g_i_n cherche les
  entrées correspondant au nom de connexion pour obtenir les détails de
  configuration. C'est le fichier où sont indiqués l'adresse IP et le
  masque de réseau qui seront assignés à l'appelant et configurés pour
  leur usage. Des exemples d'entrées 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 entrées 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 attribuée à l'appelant. Si le champ vaut
     DYNAMIC alors l'adresse IP sera allouée suivant les informations
     contenues dans le fichier /etc/slip.tty décrit plus loin. NNoottee ::
     vous devez utiliser au moins la version 1.3 de sliplogin pour que
     cela fonctionne.

  4. Le masque de réseau assigné à la machine appelante, en notation
     décimale, par exemple 255.255.255.0 pour un masque de réseau de
     classe C.

  5. Un réglage du mode SLIP qui active/désactive la compression. Les
     valeurs autorisées sont "normal" et "compressed".

  6. Un paramètre de délai qui spécifie combien de temps la ligne peut
     rester inactive (aucun datagramme reçu) avant une déconnexion
     automatique. Une valeur négative désactive cette possiblité.

  7. arguments optionnels.

  Note : Vous pouvez mettre soit les noms d'hôtes soit les adresses IP
  en notation décimale pointée pour les champs 2 et3.  Si vous utilisez
  les noms d'hôtes, alors ces hôtes doivent être résolubles, c'est à
  dire que votre machine est capable de déterminer une adresse IP pour
  ces noms d'hôtes, autrement le script échouera pendant l'appel. Vous
  pouvez le tester en faisant telnet vers un nom d'hôte : 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'hôte. 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 décimale pointée ; ou bien voyez du
  côté de votre configuration de solveur de noms (voir la section
  Résolution de noms).

  Les modes les plus courants de SLIP sont :

     nnoorrmmaall
        mode SLIP normal non compressé.

     ccoommpprreesssseedd
        mode avec compression van Jacobsen des en-têtes (cSLIP)

  Bien sûr 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.



  77..66..11..44..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggiinn ..

  Après que _s_l_i_p_l_o_g_i_n ait exploré le fichier /etc/slip.hosts et ait
  trouvé une entrée qui convient, il essaye d'exécuter le fichier
  /etc/slip.login pour effectivement configurer l'interface SLIP avec
  son adresse IP et son masque de réseau.

  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 générique de connexion pour une ligne SLIP. Invoqué par sliplogin
       # avec les paramètres:
       #     $1       $2       $3    $4, $5, $6 ...
       # unité SLIP vitesse    pid   arguments tirés 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 périphérique SLIP avec sa propre adresse IP,
  l'adresse IP de l'hôte distant , le masque de réseau puis crée une
  route vers l'adresse distante via le périphérique SLIP. C'est-à-dire
  la même 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 hôtes
  placés sur le même segment éthernet que la machine serveur sauront
  comment atteindre l'hôte qui s'est connecté.  Le champ <hw_addr> doit
  être l'adresse matérielle de la carte Ethernet de la machine. Si votre
  machine serveur n'est pas sur un réseau Ethernet, vous pouvez ignorer
  cette ligne.



  77..66..11..55..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggoouutt

  Quand la connexion s'est arrêtée, assurez-vous que le périphérique
  série 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 très simple et
  est appelé avec le même 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 à zéro' l'interface qui supprimera
  la route précédemment créée.  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
  possède pas de port Ethernet.



  77..66..11..66..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..ttttyy

  Si vous utilisez une allocation d'adresse ip dynamique (tous les hôtes
  configurés 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 assignées aux ports. Vous n'aurez besoin de ce
  fichier que si vous voulez que votre serveur alloue des adresses aux
  utilisateurs de manière dynamique.

  Ce fichier est un tableau qui liste les périphériques _t_t_y supportant
  les connexions SLIP entrantes et l'adresse ip qui sera assignée 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 manière 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 nécessaires pour
  éviter du gaspillage.



  77..66..22..  SSeerrvveeuurr SSlliipp uuttiilliissaanntt ddiipp

  Tout d'abord laissez-moi dire que certaines informations ci-dessous
  proviennent des pages de manuel de _d_i_p, où la manière de faire tourner
  Linux comme serveur SLIP est brièvement décrite. 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 possède un mode de traitement des données d'entrée qui permet de
  localiser automatiquement un utilisateur entrant et qui configure la
  ligne série comme lien SLIP suivant les informations trouvées 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
  créant des comptes spéciaux où _d_i_p_l_o_g_i_n est utilisé comme shell de
  connexion.

  La première chose à faire est de créer un lien symbolique comme suit :



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin




  Ensuite vous devez ajouter des entrées à la fois dans vos fichiers
  /etc/passwd et /etc/diphosts. Les entrées que vous devez y mettre sont
  formatées comme suit :

  Pour configurer Linux comme serveur SLIP avec _d_i_p, vous devez créer
  quelques comptes SLIP spéciaux pour les utilisateurs, où _d_i_p (en mode
  d'entrée) est utilisé comme shell de connexion. Une convention
  suggérée est d'avoir tous les comptes SLIP commençant avec la lettre
  `S' majuscule, par exemple `Sfredm'.

  Un exemple d'entrée dans /etc/passwd pour un utilisateur SLIP
  ressemble à ceci :



       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin comme shell de connexion
       |          |         |   |    |    \_______ Répertoire personnel
       |          |         |   |    \____________ Nom complet d'utilisateur
       |          |         |   \_________________ GID
       |          |         \_____________________ UID
       |          \_______________________________ Mot de passe chiffré
       \__________________________________________ Nom de connexion Slip





  Après la connexion de l'utilisateur, le programme _l_o_g_i_n (s'il trouve
  et accepte l'utilisateur) exécute 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 démarré comme _d_i_p_l_o_g_i_n
  la première 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 première
  entrée qui corresponde soit à l'utilisateur soit au périphérique _t_t_y
  où l'appel est entré et se configure lui-même de manière appropriée.
  Par un choix judicieux : soit de donner à l'utilisateur une entrée
  dans le fichier diphosts, soit de laisser à l'utilisateur la
  configuration par défaut, vous pouvez construire votre serveur de
  telle manière que vous puissiez faire cohabiter des utilisateurs ayant
  des adresses allouées statiquement ou dynamiquement.

  _d_i_p ajoutera automatiquement une entrée `Proxy-ARP' si elle est
  invoquée en mode d'entrée, aussi vous n'avez pas à vous soucier
  d'ajouter de telles entrées manuellement.


  77..66..22..11..  CCoonnffiigguurreerr //eettcc//ddiipphhoossttss

  /etc/diphosts est utilisé par _d_i_p pour examiner des configurations
  préétablies concernant des hôtes éloignés. Ceux-ci peuvent être des
  hôtes se connectant sur votre machine, ou bien des machines sur
  lesquelles vous vous connectez.

  Le format général 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 numérique soit
     nominative

  4. Adresse locale : adresse IP de cette machine, soit numérique soit
     nominative.

  5. Masque de réseau : en notation décimale pointée

  6. Commentaires : vous y mettez ce que vous voulez.

  7. protocole : Slip, CSlip, etc.

  8. MTU : nombre décimal

  Un exemple d'entrée /etc/net/diphosts pour un hôte distant peut être :



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296




  qui spécifie 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 spécifie une liaison compatible cSLIP avec une adresse distante de
  145.71.34.1 et un MTU de 1006.

  Dès lors, tous les utilisateurs à qui vous permettez d'avoir une
  connexion avec allocation d'adresse IP statique auront une entrée dans
  /etc/diphosts. Si vous voulez que des utilisateurs qui appellent sur
  un port particulier aient leur adresse allouée dynamiquement, vous
  devez avoir une entrée pour le périphérique tty, mais pas d'entrée
  pour l'utilisateur lui-même. Vous devez vous souvenir de configurer au
  moins une entrée pour chaque périphérique tty que vos utilisateurs
  entrants utiliseront pour être sûrs qu'une configuration adéquate soit
  disponible, indépendamment 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 spécial, il devra juste basculer
  en mode SLIP chez lui et ensuite il sera connecté et configuré avec
  les paramètres contenus dans le fichier diphosts.



  77..66..33..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt ll''eennsseemmbbllee ddSSLLIIPP

  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
  nécessaire pour l'un des scripts.  Il serait préférable d'avoir une
  certaine expérience de _e_x_p_e_c_t pour que ce paquetage soit utile pour
  vous, mais que cela ne vous décourage pas.

  Matt a écrit une bonne procédure d'installation dans le fichier
  README, aussi je ne me fatiguerai pas à la répéter.

  Vous pouvez récupérer le paquetage _d_S_L_I_P sur son site d'origine :

  aappoolllloo..wweesstt..ooiicc..ccoomm


       /pub/linux/dillon_src/dSLIP203.tgz




  ou bien sur :

  mmeettaallaabb..uunncc..eedduu


       /pub/Linux/system/Network/serial/dSLIP203.tgz




  Lisez le fichier README et créez les entrées /etc/passwd et /etc/group
  aavvaanntt de faire make install.



  88..  AAuuttrreess tteecchhnnoollooggiieess rréésseeaauu

  Les paragraphes suivants traitent de sujets spécifiques concernant des
  technologies liées au réseau. Les informations qui y sont contenues ne
  s'appliquent pas forcément aux autres types de technologies réseau.
  Les sujets sont traités par ordre alphabétique.





  88..11..  AARRCCNNeett

  Les noms de fichier périphériques de ARCNet sont `arc0e', `arc1e',
  `arc2e' ... ou bien `arc0s', `arc1s', `arc2s', etc. La première carte
  détectée par le noyau devient `arc0e' ou `arc0s' et les autres sont
  nommées en suivant dans l'ordre de leur détection.  La lettre finale
  dépend de votre choix : soit un format d'encapsulation de paquets
  Ethernet, soit un format de paquets suivant RFC1051.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 référer 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 développé par Avery Pennarun,
  apenwarr@foxnet.net.



  88..22..  AApppplleettaallkk (( AAFF__AAPPPPLLEETTAALLKK ))

  Le support Appletalk ne possède pas de noms de périphériques
  spécifiques car il utilise les périphériques réseau existants.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           <*> Appletalk DDP




  Le support Appletalk permet à votre machine Linux de dialoguer avec
  les réseaux 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 supplémentaire est requis, il
  s'appelle _n_e_t_a_t_a_l_k. Wesley Craig netatalk@umich.edu représente une
  équipe appelée 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 implémentant 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 récupérer 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
       précisément pour changer la valeur de la variable
        DESTDIR qui définit l'endroit où les fichiers seront
       installés plus tard.
        Le répertoire par défaut, /usr/local/atalk, semble
        très raisonnable.
       user% make
       - puis, en temps que root :
       root# make install






  88..22..11..  CCoonnffiigguurreerr llee ssuuppppoorrtt AApppplleettaallkk..

  La première chose à faire pour que tout fonctionne est de vérifier que
  les entrées adéquates sont présentes dans le fichier /etc/services.
  Ces entrées 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 à créer les fichiers de configuration
  Appletalk dans le répertoire /usr/local/atalk/etc (ou bien à l'endroit
  où vous avez installé le paquetage).

  Le premier fichier à créer est /usr/local/atalk/etc/atalkd.conf.
  Initialement ce fichier ne nécessite qu'une ligne qui indique le
  périphérique supportant le réseau sur lequel sont vos machines Apple :



       eth0




  Le programme démon Appletalk ajoutera d'autres détails quand il
  tournera.



  88..22..22..  EExxppoorrtteerr uunn ssyyssttèèmmee ddee ffiicchhiieerrss LLiinnuuxx aavveecc AApppplleettaallkk..

  Vous pouvez exporter des systèmes de fichiers depuis votre machine
  Linux vers le réseau 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 même format et qui décrit quels systèmes de fichiers les
  utilisateurs connectés pourront recevoir avec des privilèges
  d'invités.

  Tous les détails, qui vous diront comment configurer ces fichiers et
  avec quelles options, peuvent être trouvés dans la page de manuel de
  _a_f_p_d.

  Un simple exemple :


       /tmp Scratch
       /home/ftp/pub "Public Area"




  Ce qui exportera votre système de fichiers /tmp comme volume
  AppleShare `Scratch' et votre répertoire public ftp comme volume
  AppleShare `Public Area'.  Les noms de volume ne sont pas
  obligatoires, le programme démon pouvant les choisir pour vous, mais
  ça ne coûte rien de les spécifier quand même.



  88..22..33..  TTeesstteerr AApppplleettaallkk..

  Pour tester si le programme fonctionne correctement, allez sur une des
  machines Apple, déroulez le menu Pomme, cliquez sur AppleShare, et
  votre boîte Linux devrait apparaître.



  88..22..44..  AAuuttrreess iinnffoorrmmaattiioonnss

  Pour en savoir plus sur la configuration de Appletalk pour Linux,
  référez 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.



  88..33..  AATTMM

  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.



  88..44..  AAXX2255 (( AAFF__AAXX2255 ))

  Les noms de périphériques AX.25 sont `sl0', `sl1', etc. avec les
  noyaux 2.0.* ou `ax0', `ax1', etc. avec les noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2




  Les protocoles AX25, Netrom et Rose sont couverts par le document
  AX25-HOWTO.  Ces protocoles sont utilisés par les radio-amateurs du
  monde entier pour l'expérimentation packet-radio.

  L'essentiel du travail d'implémentation de ces protocoles a été
  réalisé par Jonathon Naylor, jsn@cs.nott.ac.uk.



  88..55..  DDEECCNNeett

  Le support pour DECNet est en cours d'élaboration. Vous devriez le
  voir apparaitre dans l'un des prochains noyaux 2.1.*.



  88..66..  FFDDDDII ((FFiibbeerr DDiissttrriibbuutteedd DDaattaa IInntteerrffaaccee))

  Les noms de périphériques FDDI sont `fddi0', `fddi1', `fddi2' etc. La
  première carte détectée par le noyau s'appelle `fddi0' et le reste est
  nommé dans l'ordre de détection.

  Larry Stefani, lstefani@ultranet.com, a développé un pilote pour les
  cartes Digital Equipment Corporation FDDI EISA et PCI.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       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 spécifier le
  nom de l'interface FDDI appropriée dans les commandes _i_f_c_o_n_f_i_g et
  _r_o_u_t_e.



  88..77..  RReellaaiiss ddee ttrraammeess ((FFrraammee RReellaayy))

  Les noms de périphériques de `relais de trames' sont `dlci00',
  `dlci01' etc pour les systèmes d'encapsulation DLCI et  `sdla0',
  `sdla1' etc pour les FRAD(s) (Frame Relay Access Device).

  Le relais de trames est une nouvelle technologie réseau conçue pour
  s'adapter au trafic de transmission de données `par à coups' ou de
  nature intermittente.  Vous vous connectez à un réseau de ce type en
  utilisant un dispositif d'accès par relais de trames (FRAD).  Les
  supports Linux relais de trames supportent IP par-dessus celui-ci
  comme décrit dans la RFC-1490.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       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 développé 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 systèmes FRAD et DLCI après avoir reconstruit
  votre noyau, vous aurez besoin des outils de configuration. Ils sont
  disponibles sur ftp.invlogic.com.  Compiler et installer les outils
  est très 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 différente.

  Après l'installation vous devez créer un fichier /etc/frad/router.conf
  Vous pouvez utiliser cet exemple, qui est une version modifiée de l'un
  des fichiers donné en exemple :




































  # /etc/frad/router.conf
  # C'est un modèle de configuration pour relais de trames.
  # Tout y est inclus. Les valeurs par défaut sont fondées sur le code
  # fourni avec les pilotes DOS de la carte Sangoma S502A.
  #
  # Une ligne avec '#' est un commentaire
  # Les blancs sont ignorés (vous pouvez utiliser des tabulations aussi).
  # Les sections [] inconnues et les entrées inconnues sont ignorées.
  #

  [Devices]
  Count=1                 # nombre de périphériques à configurer
  Dev_1=sdla0             # nom d'un périphérique
  #Dev_2=sdla1            # nom d'un périphérique

  # Ce qui est spécifie ici s'applique à tous les périphériques, 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 défaut
  # T391=10               # valeur de T391  5 - 30, 10 par défaut
  # T392=15               # valeur de T392  5 - 30, 15 par défaut
  # N391=6                # valeur de N391  1 - 255, 6 par défaut
  # N392=3                # valeur de N392  1 - 10,  3 par défaut
  # N393=4                # valeur de N393  1 - 10,  4 par défaut

  # On spécifie ici les valeurs par défaut 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 spécifiques
  #
  #

  #
  #  Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Type de périphérique à configurer, actuellement seul
                          # SANGOMA est reconnu
  #
  # Spécifique 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 particulière
  Mem=C8                  # Adresse de fenêtre mémoire, A0-EE, dépend de la carte
  IRQ=5                   # numéro d'IRQ, pas nécessaire pour S502A
  DLCIs=1                 # Nombre de DLCI attachés à ce périphérique
  DLCI_1=16               # numéro du premier DLCI, de 16 à 991
  # DLCI_2=17
  # DLCI_3=18
  # DLCI_4=19
  # DLCI_5=20
  #
  # Ce qui est spécifie ici s'applique au périphérique seulement,
  # et remplace les valeurs par défaut
  #
  # Access=CPE            # CPE ou NODE,  CPE par défaut
  # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
  # Clock=Internal        # Externe ou Interne, Interne par défaut
  # Baud=128              # Débit spécifié du CSU/DSU attaché
  # MTU=2048              # Taille maximum de l'unité de transfert 4096 par défaut
  # T391=10               # valeur de T391   5 - 30, 10 par défaut
  # T392=15               # valeur de T392   5 - 30, 15 par défaut
  # N391=6                # valeur de N391   1 - 255, 6 par défaut
  # N392=3                # valeur de N392   1 - 10,  3 par défaut
  # N393=4                # valeur de N393   1 - 10,  4 par défaut

  #
  # Le second periphérique est une autre carte
  #
  # [sdla1]
  # Type=FancyCard        # Type de périphérique à configurer.
  # Board=                # Type de carte Sangoma
  # Key=Value             # valeurs spécifiques pour ce type de périphérique


  #
  # Paramètres de configuration DLCI par défaut.
  # Peuvent être écrasés par des configurations spécifiques
  #
  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 définis 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 définis 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 périphériques eux-mêmes.
  C'est un tout petit peu plus compliqué que la configuration normale
  d'un périphérique réseau; vous devez vous souvenir de monter le
  périphérique FRAD avant les périphériques 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
       #






  88..88..  IIPPXX (( AAFF__IIPPXX ))

  Le protocole IPX est la plupart du temps utilisé dans les
  environnements réseaux locaux Novell NetWare(tm).  Linux offre un
  support pour ce protocole, et peut être configuré pour agir comme
  extrémité réseau, ou comme routeur pour les environnements réseaux
  IPX.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] The IPX protocol
           [ ] Full internal IPX network




  Le protocole IPX et le NCPFS sont traités en détail dans le document
  IPX-HOWTO.




  88..99..  NNeettRRoomm (( AAFF__NNEETTRROOMM ))

  Les noms de périphériques NetRom sont `nr0', `nr1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           [*] Amateur Radio NET/ROM




  Les protocoles AX25, Netrom et Rose sont décrits dans le document
  AX25-HOWTO.  Ces protocoles sont utilisés par les radio-amateurs dans
  le monde entier pour l'expérimentation du packet-radio.

  L'essentiel du travail d'implémentation a été fait par Jonathon
  Naylor, jsn@cs.not.ac.uk.


  88..1100..  PPrroottooccoollee RRoossee (( AAFF__RROOSSEE ))

  Les noms de périphériques Rose sont `rs0', `rs1', etc.  .  Rose est
  disponible dans la série des noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           <*> Amateur Radio X.25 PLP (Rose)




  Les protocoles AX25, Netrom et Rose sont expliqués dans le AX25-HOWTO.
  Ces protocoles sont utilisés par les opérateurs radio-amateur du monde
  entier pour l'expérimentation du packet-radio.

  L'essentiel du travail d'implémentation de ces protocoles a été
  réalisé par Jonathon Naylor, jsn@cs.not.ac.uk.



  88..1111..  SSuuppppoorrtt SSAAMMBBAA -- ``NNeettBBEEUUII'',, ``NNeettBBiiooss'',, ``CCIIFFSS''..

  SAMBA est une implémentation du protocole Session Management Block.
  Samba permet aux Systèmes Microsoft et autres de monter et d'utiliser
  vos disques et imprimantes.

  SAMBA et sa configuration sont décrits en détail dans le SMB-HOWTO.



  88..1122..  SSuuppppoorrtt SSTTRRIIPP ((SSttaarrmmooddee RRaaddiioo IIPP))

  Les noms de périphériques STRIP sont `st0', `st1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :





  Network device support  --->
          [*] Network device support
          ....
          [*] Radio network interfaces
          < > STRIP (Metricom starmode radio IP)




  STRIP est un protocole conçu spécialement 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 intéressantes à lire, même si vous n'êtes pas
  directement concerné par le projet.

  Les radios Metricom se connectent sur un port série 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 réseau habituels ne supportent pas le
  pilote STRIP, vous devez donc télécharger des outils personnalisés à
  partir du serveur web MosquitoNet. Pour avoir des détails sur les
  logiciels à utiliser allez voir : MosquitoNet STRIP Page.

  En résumé la configuration consiste à utiliser un programme _s_l_a_t_t_a_c_h
  modifié pour régler la discipline de ligne d'un périphérique série
  pour SLIP, puis à configurer le périphérique `st[0-9]' résultant 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 entrées ARP pour chacun des hôtes de
  votre sous-réseau. Cela ne devrait pas être trop contraignant.



  88..1133..  TTookkeenn RRiinngg

  Le noms de périphériques Token ring sont `tr0', `tr1' etc. Token Ring
  est un protocole LAN standard IBM en vue d'éviter les collisions en
  fournissant un mécanisme qui n'autorise qu'une seule station du LAN à
  transmettre à un moment donné.  Un `jeton' est détenu par une station
  à un moment donné, et celle-ci est la seule autorisée à é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).

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 périphérique réseau à configurer.






  88..1144..  XX..2255

  X.25 est un protocole de circuit basé sur la commutation de paquets
  défini par le C.C.I.T.T. (un groupe de normalisation reconnu par les
  compagnies de télécommunications dans la plupart du monde). Une
  implémentation de X.25 et LAPB est en cours dans les noyaux récents
  2.1.*.

  Jonathon Naylor jsn@cs.nott.ac.uk dirige le développement et une liste
  de diffusion a été créée 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 dernières versions des outils de configuration peuvent être
  obtenues sur le site ftp de Jonathon à ftp.cs.nott.ac.uk.



  88..1155..  CCaarrttee WWaavveeLLaann

  Les noms de périphériques Wavelan sont `eth0', `eth1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 même manière.

  Vous pouvez avoir des informations sur la carte Wavelan sur
  Wavelan.com.



  99..  CCââbblleess eett ccââbbllaaggeess

  Ceux qui sont habiles du fer à souder peuvent vouloir fabriquer leurs
  propres câbles pour relier deux machines Linux. Les schémas de câblage
  suivants pourront les y aider.


  99..11..  CCââbbllee sséérriiee NNUULLLL MMooddeemm

  Tous les câbles NULL modem ne se ressemblent pas. Beaucoup ne font que
  faire croire à votre ordinateur que tous les signaux appropriés sont
  présents et échangent les données de transmission et de réception.
  C'est bien, mais cela signifie que vous devez utiliser le contrôle de
  flux logiciel (XON/XOFF) qui est moins efficace que le contrôle de
  flux matériel. Le câble suivant donne la meilleure transmission de
  signal entre les deux machines et vous permet d'utiliser le contrôle
  de flux matériel (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





  99..22..  CCââbbllee ppoorrtt ppaarraallllèèllee ((ccââbbllee PPLLIIPP))

  Si vous avez l'intention d'utiliser le protocole PLIP entre deux
  machines alors ce câble vous conviendra indépendamment du type de port
  parallèle 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 marquées avec un astérisque `*'.

  ·  Les masses supplémentaires sont 18,19,20,21,22,23 et 24.

  ·  Si le câble que vous utilisez possède un blindage, il doit être
     connecté à une des prises DB-25 et uunnee sseeuullee.

     AAtttteennttiioonn :: uunn ccââbbllee PPLLIIPP mmaall bbrraanncchhéé ppeeuutt ddééttrruuiirree vvoottrree ccaarrttee
     ccoonnttrrôôlleeuurr. Soyez attentifs et vérifiez chaque connexion deux fois
     pour être sûr de ne pas vous créer de travail inutile ou de gros
     ennuis.  Bien que l'on puisse utiliser des câbles PLIP sur des
     longues distances, évitez-le si possible. Les spécifications du
     câble permettent d'avoir une longueur d'environ 1 mètre. Faites
     attention si vous utilisez de grandes longueurs, car les sources de
     champs magnétiques élevés comme la foudre, les lignes de puissance
     et les émetteurs radio peuvent interférer et parfois endommager
     votre carte contrôleur. Si vous voulez vraiment connecter deux de
     vos ordinateurs sur une grande distance, utilisez plutôt des cartes
     Ethernet et un câble coaxial.
  99..33..  CCââbbllaaggee EEtthheerrnneett 1100bbaassee22 ((ccooaaxxiiaall ffiinn))

  10base2 est un standard de câblage Ethernet spécifiant l'utilisation
  d'un câble coaxial 52 ohms avec un diamètre d'environ 5 mm. Il faut se
  souvenir d'un nombre important de règles quand on relie deux machines
  avec un câblage 10base2.  La première est que vous devez utiliser des
  terminaisons àà cchhaaqquuee eexxttrréémmiittéé du câble. Un terminateur est une
  résistance de 52 ohms qui sert à s'assurer que le signal est absorbé
  et non réfléchi à l'extrémité du câble. Sans terminaison à chaque
  extrémité 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 extrémité représentent une terminaison, les `======'
  représentent une longueur de câble coaxial avec des prises BNC en bout
  et les `T' représentent un connecteur en `T'. Gardez la longueur de
  câble entre les connecteurs en `T' et les cartes Ethernet aussi courte
  que possible, l'idéal étant que ces connecteurs soient branchés
  directement sur la carte Ethernet.



  99..44..  CCââbbllaaggee EEtthheerrnneett àà ppaaiirreess ttoorrssaaddééeess

  Si vous n'avez que deux cartes Ethernet avec paires torsadées et que
  vous voulez les relier, vous n'avez pas besoin de répartiteur.  Vous
  pouvez câbler les deux cartes directement ensemble.  Un schéma
  montrant comment faire est inclus dans le document Ethernet-HOWTO



  1100..  GGlloossssaaiirree ddeess tteerrmmeess uuttiilliissééss ddaannss ccee ddooccuummeenntt..

  Ci-dessous une liste des termes les plus importants utilisés dans ce
  document.

     AARRPP
        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
        résolution d'adresses), permettant à une machine du réseau
        d'associer une adresse IP à une adresse matérielle.

     AATTMM
        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 réseau ATM enveloppe les données en
        blocs de taille standard pour pouvoir les convoyer efficacement
        d'un point à un autre. ATM est une technologie réseau à
        commutation de paquets.

     cclliieenntt
        C'est habituellement le morceau de logiciel d'un système du côté
        où se trouve l'utilisateur.  Il y a des exceptions, par exemple,
        dans le système de fenêtres 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'extrémité d'un système qui
        utilise le service fourni par un serveur. Dans le cas de
        systèmes _d_'_é_g_a_l _à _é_g_a_l tels que _s_l_i_p ou _p_p_p le client se trouve
        à l'extrémité qui a initialisé la connexion, l'autre extrémité,
        étant considérée comme le serveur.

     ddaattaaggrraammmmee
        Un datagramme est un paquet discret de données qui contient les
        adresses, et qui est l'unité de base de transmission sur un
        réseau IP. On peut aussi l'appeler `paquet'.

     DDLLCCII
        DLCI veut dire `Data Link Connection Identifier'(identifieur de
        connexion de liaison de données), et est utilisé pour identifier
        une liaison virtuelle unique point à point via un réseau à
        relais de trames (Frame Relay). Les DLCI sont normalement
        assignés par le fournisseur de réseau à relais de trames.

     RReellaaiiss ddee ttrraammeess
        Frame Relay (Relais de trames) est une technologie réseau idéale
        lorsque l'on a un trafic de nature cahotique ou sporadique. Les
        coûts peuvent être réduits quand on a de nombreux clients
        partageant la même capacité réseau et on compte sur le fait que
        les clients utilisent le réseau à des instants diiférents.

     AAddrreessssee mmaattéérriieellllee
        C'est un nombre qui identifie de manière unique un hôte sur un
        réseau physique au niveau de la couche accès. 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.

     IISSDDNN
        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(Réseau
        Numérique à Intégration de Services=RNIS). Il fournit des moyens
        standardisés avec lesquels les compagnies de télécommunications
        peuvent délivrer soit de la voix soit des informations vers des
        clients.  Techniquement c'est un réseau de données à commutation
        de paquets.

     IISSPP
        C'est l'acronyme de `Internet Service Provider' (fournisseur
        d'accès à l'Internet=FAI). Ce sont des organisations ou des
        sociétés qui fournissent une connexion réseau à l'Internet au
        public.

     AAddrreessssee IIPP
        C'est un nombre qui identifie de manière unique un hôte TCP/IP
        sur le réseau. Cette adresse est codée sur 4 octets et se
        présente habituellement sous la forme appelée "notation décimale
        pointée", où chaque octet est sous forme décimale, avec un point
        `.' entre chaque.

     MMSSSS
        Le Maximum Segment Size (_M_S_S) (Taille Maximum de Segment) est la
        plus grande quantité de données qui peut être transmise en une
        seule fois. Si vous voulez éviter des fragmentations MSS doit
        être égal à l'en-tête MTU-IP.

     MMTTUU
        Le Maximum Transmission Unit (_M_T_U) (taille maximum de l'unité de
        transfert) est un paramètre qui détermine le plus long
        datagramme pouvant être transmis par une interface IP sans avoir
        besoin d'être fragmenté en unités plus petites.  Le MTU doit
        être plus grand que le datagramme le plus grand que vous voulez
        transmettre sans être fragmenté. Note : ceci protège de la
        fragmentation uniquement de manière locale, d'autres liens sur
        le chemin peuvent avoir un MTU plus petit et les datagrammes
        seront fragmentés à cet endroit. Les valeurs typiques sont de
        1500 octets pour une interface Ethernet, ou de 576 octets pour
        une interface SLIP.

     rroouuttee
        La _r_o_u_t_e est le chemin que les datagrammes suivent à travers le
        réseau pour atteindre leur destination.

     sseerrvveeuurr
        C'est habituellement le morceau de logiciel ou l'extrémité d'un
        système é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 systèmes _é_g_a_l _à _é_g_a_l comme _S_L_I_P ou _P_P_P le serveur
        est considéré comme étant l'extrémité de la liaison qui est
        appelée et l'extrémité appeleante est le client.

     ffeennêêttrree
        La _f_e_n_ê_t_r_e (window) est la plus grande quantité de données que
        l'extrémité réceptrice peut accepter à un certain moment.



  1111..  LLiinnuuxx ppoouurr uunn ffoouurrnniisssseeuurr dd''aaccccèèss àà ll''IInntteerrnneett ??

  Si vous êtes intéressés par l'utilisation de Linux à des fins de
  fourniture d'accès Internet, je vous recommande de consulter la page
  ISP Linux pour une bonne liste de pointeurs vers les informations dont
  vous pourriez avoir besoin.



  1122..  RReemmeerrcciieemmeennttss

  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.



  1133..  CCooppyyrriigghhtt..


  _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 réseau 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 publiée
  par la Free Software Foundation ; soit avec la version 2 de la
  license, soit (à votre guise) avec une version ultérieure.

  Ce document est distribué avec l'espoir qu'il sera utile, mais SANS
  AUCUNE GARANTIE ; ni même la garantie implicite de COMMERCIALISATION
  ou D'ADAPTATION DANS UN BUT PARTICULIER. Voir la GNU General Public
  License pour plus de détails.

  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.

  1144..  NNoottee dduu ttrraadduucctteeuurr

  Voir les autres HOWTO traduits en français.  Lire également le livre
  «Administration réseau sous Linux, éditions O'Reilly».  Enfin voyez le
  site www.linux-france.com où vous trouverez de très bons articles
  décrivant en détail différents points évoqués dans ce document.

























































  Linux NFS HOWTO
  Nicolai Langfeldt janl@linpro.no
  v1.0, 1er octobre 1999

  (30 novembre 1999. Adaptation française par Christophe Deleuze,
  Christophe.Deleuze@lip6.fr).  HOWTO décrivant l'installation de
  serveurs et clients NFS.
  ______________________________________________________________________

  Table des matières
























































  1. Préambule

     1.1 Blabla légal
     1.2 Dénégation
     1.3 Retour
     1.4 Autre blabla

  2. LISEZMOI.d_abord

  3. Installer un serveur NFS

     3.1 Conditions préalables
     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 débit

  6. NFS et la sécurité

     6.1 Sécurité du client
     6.2 Sécurité du serveur : nfsd
     6.3 Sécurité du serveur : le portmapper
     6.4 NFS et les coupent-feu (firewalls)
     6.5 Résumé

  7. ``Checklist'' mount

  8. FAQ

  9. Exporter un système 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 Matériel nécessaire
     11.4 Configuration du serveur
        11.4.1 Démarrer le serveur NFS temporaire
        11.4.2 Monter la disquette et le cédérom
        11.4.3 Configurer le réseau sur le serveur provisoire
        11.4.4 Configurer le volume NFS
     11.5 Lancer le serveur NFS
        11.5.1 Prêt, commencez l'installation
     11.6 Problèmes
        11.6.1 Rien ici pour l'instant
     11.7 À faire
        11.7.1 Disquette DOS
        11.7.2 Commandes RPC

  12. PC-NFS


  ______________________________________________________________________

  11..  PPrrééaammbbuullee

  11..11..  BBllaabbllaa llééggaall

  (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
  basée sur la FAQ NFS compilée par Alan Cox. La section _C_h_e_c_k_l_i_s_t est
  basée sur une _c_h_e_c_k_l_i_s_t des problèmes de mount compilée par IBM
  Corporation. La section ``NFS serveur sur disquette'' a été écrite par
  Ron Peters.

  (C)opyright 1997-1999 Christophe Deleuze pour la version française. Si
  vous lisez ce document sous le pont de l'Alma, veillez à respecter les
  limitations de vitesse.


  11..22..  DDéénnééggaattiioonn

  Ni Nicolai Langfeldt, ni Ron Peters ni leurs employeurs, ni qui que ce
  soit, n'assume de responsabilité pour les conséquences que les
  instructions de ce document peuvent avoir. Si vous choisissez de
  suivre ces instructions, bonne chance !



  11..33..  RReettoouurr

  Ce document ne sera jamais terminé, merci de m'envoyer par mail vos
  problèmes et réussites, cela pourra améliorer 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 réponses sont revenues à cause d'une adresse
  incorrecte.


  11..44..  AAuuttrree bbllaabbllaa

  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.



  22..  LLIISSEEZZMMOOII..dd__aabboorrdd

  NFS, le système de fichiers par réseau, a trois caractéristiques
  importantes :


  ·  il permet le partage de fichiers sur un réseau ;

  ·  il marche suffisamment bien ;

  ·  il crée tout un tas de problèmes de sécurité bien connus des
     crackers qui peuvent facilement les exploiter pour obtenir l'accès
     (lecture, écriture et effacement) à tous vos fichiers.


  Je parlerai de ces deux aspects dans ce HOWTO. Lisez bien la section
  sécurité et vous supprimerez quelques risques stupides. Ne dites pas
  que je ne vous ai pas prévenus. Les passages sur la sécurité sont
  parfois assez techniques et demandent quelques connaissances en réseau
  IP. Si vous ne connaissez pas les termes utilisés vous pouvez soit
  consulter le HOWTO réseau, improviser ou vous procurer un livre sur
  l'administration de réseau TCP/IP pour vous familiariser avec TCP/IP.
  C'est une bonne idée de toutes façons si vous administrez des machines
  UNIX/Linux. Un très 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 à régler vos problèmes 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 prévu.


  Si vous voulez/avez besoin de le récupérer et compiler vous même, le
  site de référence 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''.



  33..  IInnssttaalllleerr uunn sseerrvveeuurr NNFFSS

  33..11..  CCoonnddiittiioonnss pprrééaallaabblleess

  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
  réseau (NET-3) et configurez correctement le réseau.


  33..22..  PPrreemmiieerrss ppaass

  Avant de faire quoi que ce soit d'autre, il nous faut un serveur NFS
  installé. Si vous faites partie d'un département réseau d'une
  université ou autre, il y a probablement un grand nombre de serveurs
  NFS qui tournent déjà. Si votre but est d'utiliser un serveur déjà
  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 système pour trouver comment
  configurer le serveur NFS et l'exportation des systèmes de fichiers
  par NFS. Ce HOWTO contient une section décrivant les manipulations
  nécessaires sur divers systèmes. 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.



  33..33..  LLee ppoorrttmmaappppeerr

  Le portmapper de Linux est appelé soit portmap soit rpc.portmap. La
  page de manuel sur mon système dit que c'est un convertisseur de port
  DARPA vers numéro de programme RPC. C'est là que se trouve la première
  faille de sécurité. La gestion de ce problème est décrite à la section
  ``sur la sécurité'', que, encore une fois, je vous invite très
  fortement à lire.

  Lancez le portmapper. Il devrait être dans le répertoire /usr/sbin
  (sur quelques machines il est appelé rpcbind). Vous pouvez le lancer à
  la main pour cette fois mais il devra être lancé à chaque démarrage de
  la machine, il faudra donc créer ou éditer les scripts rc. Les scripts
  rc sont décrits dans la page de manuel init, ils sont généralement
  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 vérifiez qu'il tourne avec ps -aux, puis rpcinfo -p. Il y
  est ? Benissimo.



  Encore une chose. L'accès distant à votre portmapper est contrôlé par
  le contenu de vos fichiers /etc/hosts.allow et /etc/hosts.deny. Si
  rcpinfo -p échoue alors que le portmapper tourne, vérifiez ces
  fichiers. Voyez la section ``sur la sécurité'' pour les détails
  concernant ces fichiers.


  33..44..  MMoouunnttdd eett nnffssdd

  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
  système 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 accès 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 défaut). D'autres options
  existent, et je parlerai de quelques unes liées à la sécurité plus
  loin. Elles sont toutes décrites dans la page de manuel exports qu'il
  faut lire au moins une fois dans sa vie. Il y a de meilleures façons
  de faire que de lister tous les hosts dans le fichier exports. Peuvent
  être autorisés à monter un système de fichiers NFS, des groupes
  réseaux (_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 réseaux
  IP. Mais il faudra vérifier qui peut obtenir un accès au serveur avec
  ce type d'autorisations groupées.


  Note : ce fichier exports n'utilise pas la même syntaxe que d'autres
  Unix. Ce HOWTO contient une section sur la façon dont les autres Unix
  exportent leurs fichiers.

  Maintenant nous sommes prêts à 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 façon 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 réexportés
  ______________________________________________________________________



  Sauvez le dans /usr/sbin/exportfs par exemple, et n'oubliez pas de lui
  appliquer chmod a+rx. Désormais, chaque fois que vous changez votre
  fichier exports, lancez ensuite exportfs en root.

  Maintenant, vérifiez 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 même 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 répondre, voyez ``la section sécurité'' à 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.

  Après avoir vérifié que le portmapper rend compte des services vous
  pouvez vérifier aussi avec ps. Le portmapper continuera à afficher les
  services même si les programmes qui les offrent ont crashé. Il vaut
  donc mieux vérifier par ps si quelque chose ne marche pas.

  Bien sur, vous devrez modifier vos fichiers systèmes rc pour lancer
  mountd et nfsd au démarrage de la même façon que le portmapper. Il y a
  de très fortes chances que les scripts existent déjà sur votre
  machine, vous aurez juste à décommenter les bonnes lignes ou les
  activer pour les bons _r_u_n_l_e_v_e_l_s (pardon niveaux d'exécution) 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 prêts
  à enchaîner sur le client NFS.


  44..  IInnssttaalllleerr uunn cclliieenntt NNFFSS

  Tout d'abord il faudra compiler un noyau avec le système 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 très 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 appropriée et le système de fichiers apparaîtra.
  Continuons avec l'exemple de la section précédente, 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 système
  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 système de
  fichiers local, mais beaucoup plus pratique que ftp. Si, au lieu de
  monter le système 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 après 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
  problème avec les fichiers hosts.{allow,deny} mentionné plus haut.

  Pour vous débarrasser du système de fichiers, vous pouvez faire :


  ______________________________________________________________________
  umount /mnt
  ______________________________________________________________________



  Pour que le système monte automatiquement un système de fichiers NFS
  au démarrage, éditez /etc/fstab de la façon 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.






  44..11..  OOppttiioonnss ddee mmoonnttaaggee

  Il y a trois comportements principaux des clients NFS en cas de chute
  du serveur qui sont spécifiés par les options de montage :


     ssoofftt
        Le client NFS renverra une erreur au processus concerné si après
        quelques essais le serveur NFS persiste à ne pas répondre. Si
        vous voulez utiliser cette option, vous devez vérifier que votre
        logiciel la gère correctement. Je ne recommande pas ce réglage,
        c'est un bon moyen de perdre des données et corrompre des
        fichiers. En particulier, n'utilisez pas ça pour les disques où
        sont stockés vos mails (si vous tenez à vos mails).


     hhaarrdd
        Le client NFS réessaiera infiniment jusqu'à ce qu'il soit tué.
        Les opérations reprendront normalement si le serveur NFS se
        rétablit ou redémarre. Le client ne pourra pas être interrompu
        ou tué.


     hhaarrdd,,iinnttrr
        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 ttoouuss les
        systèmes de fichiers NFS, y compris le _s_p_o_o_l du mail.



  Reprenons l'exemple précédent, votre entrée fstab est maintenant :


  ______________________________________________________________________
  # device       mountpoint   fs-type    options            dumps  sfckorder
  ...
  eris:/mn/eris/local   /mnt  nfs   rsize=1024,wsize=1024,hard,intr 0   0
  ...
  ______________________________________________________________________





  44..22..  OOppttiimmiissaattiioonn ddee NNFFSS

  Normalement, si les options rsize et wsize ne sont pas précisées, NFS
  écrira et lira par blocs de 4096 ou 8192 octets. Mais certaines
  combinaisons de noyau Linux et cartes réseau ne peuvent pas
  fonctionner avec ces valeurs, de plus, même si cela marche, cela peut
  ne pas être optimal du tout. Il nous faudra donc expérimenter et
  trouver les valeurs de rsize et wsize qui fonctionnent et donnent les
  transferts les plus rapides. Vous pouvez tester la vitesse obtenue
  avec différentes valeurs des options avec des commandes simples. La
  commande mount ci-dessus ayant été exécutée, si vous avez l'accès en
  écriture sur le disque vous pouvez tester les performances en écriture
  séquentielle :


  ______________________________________________________________________
  time dd if=/dev/zero of=/mnt/testfile bs=16k count=4096
  ______________________________________________________________________


  Ceci crée 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 intéressant. 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 démontez (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 accès
  aléatoires. Immédiatement après avoir remounté avec une taille
  supèrieure, placez vous (cd) dans le système de fichiers et faites des
  trucs comme ls, explorez un peu pour vérifier que tout est bien
  normal. Si la valeur de rsize/wsize est trop grande, les symptômes
  sont _v_r_a_i_m_e_n_t bizarres et pas évidents. Un symptôme typique est une
  liste de fichiers donnée par ls incomplète sans aucun message
  d'erreur. Ou la lecture de fichier qui échoue mystérieusement et sans
  message d'erreur. Après vous être assurés que les wsize/rsize choisis
  fonctionnent, vous pouvez faire les tests de rapidité. Différentes
  plateformes de serveur auront peut-être des tailles optimales
  différentes. SunOS et Solaris sont réputés pour être beaucoup plus
  rapides avec une taille de 4096 octets.


  Les noyaux Linux récents (depuis 1.3) font parfois des lectures
  anticipées (_r_e_a_d _a_h_e_a_d) pour des rsizes supérieurs ou égaux à la
  taille de page de la machine. Sur les processeurs Untel la taille de
  la page est de 4096 octets. La lecture anticipée 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
  spécifications de NFS disent que les requêtes d'écriture de NFS ne
  doivent pas être considérées comme terminées avant que les données ne
  soient sur un médium non versatile (normalement le disque). Ceci
  réduit les performances à l'écriture, les écritures asynchrones sont
  plus rapides. Le nfsd Linux ne fait pas d'écritures synchrones car
  l'implémentation du système de fichiers ne s'y prête pas, mais sur les
  serveurs non Linux vous pouvez augmenter les performances de cette
  façon dans votre fichier exports :


  ______________________________________________________________________
  /dir    -async, access=linuxbox
  ______________________________________________________________________




  ou quelque chose du genre. Référez vous à la page de manuel exports de
  la machine concernée. Notez que ceci augmente les risques de perte de
  données.






  55..  NNFFSS ssuurr lleess lliiggnneess àà ffaaiibbllee ddéébbiitt

  Les lignes lentes (à faible débit) comprennent les modems, RNIS et
  aussi sans doute les autres connexions longue distance.


  Cette section est basée sur la connaissance des protocoles utilisés
  mais pas sur des expérimentations. Faites moi savoir si vous essayez
  ceci ;-)


  La première chose à retenir est que NFS est un protocole lent. Il a un
  grand _o_v_e_r_h_e_a_d (sur-coût en bande passante). Utiliser NFS, c'est
  presque comme utiliser kermit pour transférer 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 défaut NFS est paramétré pour des lignes rapides et à faible
  latence. Si vous utilisez les paramètres par défaut sur des lignes à
  grande latence cela peut provoquer des erreurs, des annulations, des
  rétrécissements de fichiers, et des comportements bizarres.


  La première 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 façon d'avoir des problèmes bizarres. Utilisez plutôt l'option
  de montage hard. Quand hard est actif les temporisations déclenchent
  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 deuxième chose à faire est d'ajuster les options de montage timeo
  et retrans. Elles sont décrites dans la page de manuel nfs(5), en
  voici un extrait (version française) :



























  ______________________________________________________________________
         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 réponse n'est pas reçue avant la
  temporisation de 0,7 seconde (700 ms), le client NFS répétera la
  requête et doublera la temporisation à 1,4 seconde. Si la réponse
  n'arrive pas dans les 1,4 seconde, la requête est répétée à nouveau et
  la temporisation est doublée à 2,8 secondes.


  La vitesse de la ligne peut être mesurée 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 chargée ce temps sera encore plus élevé,
  facilement le double. En général, la latence augmente avec la taille
  des paquets et la charge de la ligne. Si vous comptez utiliser FTP et
  NFS en même temps il faudra mesurer les temps du ping pendant un
  transfert FTP et augmenter timeo en accord avec la latence de votre
  ligne.


  66..  NNFFSS eett llaa ssééccuurriittéé

  Je ne suis en aucun cas un expert en sécurité informatique. Mais j'ai
  traîné dans le secteur et j'ai un _p_e_t_i_t conseil pour ceux qui se
  préoccupent de la sécurité. Mais attention. Ce n'est pas absolument
  pas une liste complète des problèmes liés à NFS et si vous pensez être
  en sécurité 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'intérêt si vous êtes sur un
  réseau _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 accès sur
  les machines du réseau. I.e., il ne devrait y avoir aucun moyen de se
  connecter à votre réseau depuis l'extérieur et il ne devrait être
  relié à aucun autre réseau où vous n'avez pas confiance en tous les
  utilisateurs et en sa sécurité. Vous pensez que je suis parano ? Pas
  du tout. C'est un conseil de sécurité _d_e _b_a_s_e. Et rappelez-vous que
  c'est juste le commencement. Un site _s_û_r nécessite un administrateur
  consciencieux et bien informé qui sait où trouver l'information sur
  les problèmes de sécurité existants ou potentiels.


  Un problème 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 très facile de casser le compte root du
  client. Et vice versa. Il y a quelques moyens de gérer ce problème 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 problèmes (et des solutions)
  évoquées ci-dessous sont traités dans ces documents. Voyez
  ftp.cert.org:/01-README pour une liste à jour. En voici quelques-uns
  liés à NFS (il n'y a pas à ma connaissance de version française) :


  ______________________________________________________________________
  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.
  ______________________________________________________________________



  66..11..  SSééccuurriittéé dduu cclliieenntt

  Du côté client il y a quelques options de mount qui permettent de ne
  pas faire trop confiance au serveur. L'option nosuid interdit le
  démarrage de programmes suid depuis le système de fichiers NFS. C'est
  une option à utiliser systématiquement, car elle empêche le root du
  serveur de créer un fichier suid sur le système 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'exécution des fichiers du système de fichiers NFS avec
  l'option noexec. Mais ceci est beaucoup moins utile que nosuid car le
  système de fichiers contiendra très probablement au moins _q_u_e_l_q_u_e_s
  scripts ou programmes à exécuter. Ces options se rentrent dans la
  colonne d'options, avec wsize et rsize, séparées par des virgules.



  66..22..  SSééccuurriittéé dduu sseerrvveeuurr :: nnffssdd

  Du côté 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'accéder
  (en lecture, écriture ou effacement) au système 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
  accéder/modifier les fichiers du serveur que seul le root du serveur
  peut accéder/modifier. C'est bien, et vous aurez probablement à
  utiliser cette option sur tous les systèmes 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
  accéder à ses fichiers !'' Et là je réponds : ``Oui, c'est comme ça,
  c'est Unix''. Ceci a une conséquence 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 accéder est le compte root du serveur. Plusieurs autres
  options permettant de ne pas faire confiance à qui ne vous plait pas
  sont énumérées 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 vérifie que toutes les
  requêtes viennent d'un port privilégié. S'il accepte les requêtes de
  n'importe quel port du client, un utilisateur quelconque peut exécuter
  un programme qu'il est facile de se procurer sur l'Internet. Il parle
  le protocole NFS et pourra prétendre être n'importe qui et être cru.
  Ça fait peur hein ? Le nfsd Linux effectue cette vérification par
  défaut, sur d'autres systèmes d'exploitation il faut la valider. Ça
  devrait être décrit dans les pages du manuel de ce système.


  Autre chose. N'exportez jamais un système de fichiers vers `localhost'
  ou 127.0.0.1.  Croyez-moi.



  66..33..  SSééccuurriittéé dduu sseerrvveeuurr :: llee ppoorrttmmaappppeerr

  Le portmapper de base, en combinaison avec nfsd présente un problème
  de conception qui rend possible de récupérer les fichiers d'un serveur
  NFS sans avoir aucun privilège. Heureusement le portmapper utilisé par
  la plupart des distributions Linux est relativement sûr vis à vis de
  cette attaque, et peut être sécurisé en configurant les listes d'accès
  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, même aujourd'hui,
  alors que le problème est connu depuis plusieurs années. Au moins une
  distribution contient même la page de manuel pour un portmapper sûr
  alors que le portmapper effectivement installé n'est _p_a_s sûr. Pour
  déterminer simplement si votre portmapper est le bon ou pas, lancez
  strings(1) et voyez s'il lit les fichiers appropriés /etc/hosts.deny
  et /etc/hosts.allow. Si votre portmapper est /usr/sbin/portmap
  exécutez 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'accès à _q_u_i_c_o_n_q_u_e. Maintenant qu'il est fermé, lancez
  rpcinfo -p pour vérifier 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'accès 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 accès à votre portmapper. Sur le système Linux moyen  il
  y a très peu de machines qui ont une bonne raison de demander cet
  accès. 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'accéder à ces services sur votre
  machine devraient y être autorisées. Disons que votre machine est
  129.240.223.254 et que tout ce qui vit sur le sous réseau
  129.240.223.0 doit pouvoir y accéder (si ceci n'est pas clair pour
  vous, voyez le HOWTO réseau). On écrit :


  ______________________________________________________________________
  portmap: 129.240.223.0/255.255.255.0
  ______________________________________________________________________



  dans hosts.allow. C'est l'adresse de réseau que vous donnez aussi à la
  commande route et le masque de réseau que vous donnez à ifconfig. Pour
  le périférique 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 réseau dans la première colonne)

  Les fichiers hosts.deny et hosts.allow sont décrits dans les pages de
  manuel de mêmes noms.

  IIMMPPOORRTTAANNTT : ne _r_i_e_n mettre d'autre que des adresses IP (numériques)
  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 (numérique) à partir de l'adresse
  alphanumérique ex. ftp.lip6.fr donne 132.227.77.2) peuvent
  indirectement déclencher une activité portmap qui déclenchera un _h_o_s_t
  _n_a_m_e _l_o_o_k_u_p qui déclenchera...

  Ceci fait, votre serveur devrait être un peu plus solide. Le dernier
  problème (mais oui !) est que quelqu'un casse le compte root (ou boute
  MS-DOS) sur une machine de confiance et utilise ce privilège pour
  envoyer des requêtes depuis un port sûr en se faisant passer pour
  n'importe quel utilisateur.




  66..44..  NNFFSS eett lleess ccoouuppeenntt--ffeeuu ((ffiirreewwaallllss))

  C'est une très bonne idée 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). Vérifiez 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 récents pour leur spécifier le port
  à utiliser. Vous pouvez donc choisir un port qui ne soit pas bloqué
  par le firewall.




  66..55..  RRééssuumméé

  Si vous configurez correctement votre installation portmapper/NFS avec
  hosts.allow/deny, root_squash, nosuid et les ports privilégiés, vous
  évitez beaucoup des bogues connues de NFS et pouvez presque vous
  sentir en sécurité au moins pour _ç_a. Mais de toutes façons : quand un
  intrus obtient l'accès à votre réseau, il/elle peut faire apparaître
  des commandes bizarres dans votre .forward ou lire votre mail quand
  /home ou /var/spool/mail sont exportés. Pour la même raison, vous ne
  devriez jamais accéder à votre clé privée 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 système complexe et il n'est donc
  pas totalement exclu que de nouvelles bogues soient découvertes, soit
  dans la conception soit dans l'implémentation que nous utilisons. Il
  pourrait même y avoir des défauts de sécurité 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 français, consultez
  fr.comp.os.linux.annonces).



  77..  ````CChheecckklliisstt'''' mmoouunntt

  Cette section est basée sur la _m_o_u_n_t _c_h_e_c_k_l_i_s_t (liste des problèmes
  liés à mount) de IBM Corp. Je les remercie de m'autoriser à l'utiliser
  dans ce HOWTO. Si vous avez un problème en montant un système de
  fichiers NFS, consultez cette liste avant de poster votre problème sur
  les niouzes. Chaque point décrit un type de problème et sa solution.


  1. Mount répète RPC: Program not registered


     Le portmapper tourne ?

     SSoolluuttiioonn :: lancez-le.

     mountd tourne ?

     SSoolluuttiioonn :: lancez-le.

     nfsd tourne ?

     SSoolluuttiioonn :: lancez-le.

     /etc/hosts.deny empêche le portmapper de répondre ?

     SSoolluuttiioonn :: vous pouvez enlever la règle en question dans hosts.deny
     ou en ajouter une dans hosts.allow de façon que le portmapper soit
     autorisé à vous parler.


  2. Système de fichier non exporté, ou non exporté au client en
     question.


     SSoolluuttiioonn :: exportez le [Ndt : merci IBM !]


  3. La résolution 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 résolu en johnmad.austin.ibm.com. La permission de
     monter est refusée.


     SSoolluuttiioonn :: exportez vers les deux formes du nom.


     Cela peut aussi arriver si le serveur a deux interfaces avec des
     noms différents et que les exports n'en spécifient qu'un.


     SSoolluuttiioonn :: 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
     bibliothèque) sur le client. Assurez-vous que le client peut faire
     host <name>; host <ip_addr>; et que les deux donnent la même
     machine.


     SSoolluuttiioonn :: mettez de l'ordre dans la résolution de noms.


  4. Le système de fichiers a été monté après que NFS soit lancé (sur ce
     serveur). Dans ce cas le serveur exporte le point de montage sous-
     jacent, pas le système de fichiers.


     SSoolluuttiioonn :: éteignez nfsd et relancez le.


     NNoottee :: les clients qui avaient monté le point de montage sous-
     jacent auront des problèmes pour y accéder après le redémarrage.



  5. La date est très décalée sur une ou sur les deux machines (cela
     peut mettre la pagaille pour make)


     SSoolluuttiioonn :: réglez 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.

     SSoolluuttiioonn :: diminuez le nombre de groupes auxquels l'utilisateur
     appartient ou montez depuis un autre utilisateur.


  88..  FFAAQQ

  Voici la section FAQ. Elle est en partie basée sur une vieille FAQ NFS
  écrite par Alan Cox.

  Si vous avez un problème pour monter un système de fichier, voyez si
  votre problème est décrit 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 corrigée à partir de nfs-server2.2beta16.


  2. Quand j'essaye de monter le système de fichiers j'obtiens



           can't register with portmap: system error on send







  Vous utilisez probablement un système Caldera. Il y a une bogue dans
  les scripts rc. Contactez Caldera pour obtenir la solution.


  3. Pourquoi ne puis-je pas exécuter un fichier après 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, après 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'exécuter. Les nfsd plus récents que le printemps
     95 [Ndt : hum...] ferment les fichiers ouverts après quelques
     secondes, les plus vieux pouvaient ne pas les relâcher avant
     plusieurs jours...


  4. Mes fichiers NFS sont tous en lecture seule.


     Le serveur NFS Linux est par défaut en lecture seule. Voyez les
     sections ``Mountd et nfsd'' et ``Exporter des systèmes de fichier''
     dans ce HOWTO et référez 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 régulièrement.


     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 redémarre ma machine elle se bloque parfois en essayant de
     démonter un serveur NFS bloqué (_h_u_n_g).


     Ne démontez ppaass les serveurs NFS en redémarrant ou arrêtant la
     machine, ça ne créera pas de problèmes si vous ne le faites pas. La
     commande est umount -avt nonfs.


  10.
     Les clients NFS Linux sont très lents quand ils écrivent sur des
     systèmes Sun ou BSD.


     Normalement les écritures NFS sont synchrones (vous pouvez le
     désactiver si vous ne craignez pas de perdre des données). Les
     noyaux dérivés de BSD ont tendance à ne pas savoir travailler avec
     des petits blocs. Ainsi quand vous écrivez 4K de données 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 fragmentés. Le noyau ne
     conserve qu'un nombre limité de fragments de paquets incomplets
     avant de commencer à jeter des paquets. En 2.2, ce paramètre est
     réglable à l'exécution au moyen du système de fichier /proc :
     /proc/sys/net/ipv4/ipfrag_high_tresh et ipfrag_low_tresh. En 2.0 ce
     sont des constantes définies à 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 mémoire consommée par les fragments UDP non réassemblés atteint
     ``ipfrag_high_thresh'' (en octets, 256K par défaut en 2.2.3 et
     2.0.36) elle est ramenée à ``ipfrag_low_tresh'' d'un coup, en
     jetant des fragments. Ainsi, si la borne supérieure (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 inférieure (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 implémente 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 réservés (<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 réservés (truc
  fourni par Brian Gorka).





  99..  EExxppoorrtteerr uunn ssyyssttèèmmee ddee ffiicchhiieerrss

  Bien sur, la façon d'exporter les systèmes de fichiers par NFS n'est
  pas toujours la même sur toutes les plate-formes. Linux et Solaris 2
  sont les plus déviants. Cette section liste de manière superficielle
  la façon de procéder sur la plupart des systèmes. Si votre système
  n'est pas traité ici, cherchez dans vos pages de manuel. Les mot-clés
  sont : nfsd, system administration tool, rc scripts, boot scripts,
  boot sequence, /etc/exports, exportfs. J'utiliserai le même exemple
  tout au long de cette section : comment exporter /mn/eris/local vers
  apollon en lecture/écriture.


  99..11..  IIRRIIXX,, HHPP--UUXX,, DDiiggiittaall--UUNNIIXX,, UUllttrriixx,, SSuunnOOSS 44 ((SSoollaarriiss 11)),, AAIIXX

  Ces systèmes utilisent le format export traditionnel de Sun. Dans
  /etc/exports, écrivez :


  ______________________________________________________________________
  /mn/eris/local -rw=apollon
  ______________________________________________________________________



  La documentation complète se trouve dans la page de manuel exports.
  Après avoir édité le fichier, lancez exportfs -av pour exporter les
  systèmes de fichiers.


  La rigueur de la syntaxe demandée par exportfs varie. Sur certains
  systèmes vous verrez que la ligne précédente peut être :


  ______________________________________________________________________
  /mn/eris/local apollon
  ______________________________________________________________________



  ou même quelque chose de dégénéré 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.


  99..22..  SSoollaarriiss 22

  Sun ont complètement réinventé la roue quand ils ont fait Solaris 2,
  et donc c'est complètement différent des autres systèmes. Il faut
  éditer le fichier /etc/dfs/dfstab et y placer les commandes de partage
  (_s_h_a_r_e) documentées 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 systèmes de
  fichiers.



  1100..  NNFFSS ssoouuss LLiinnuuxx 22..22

  Au moment où j'écris, la version courante du noyau est 2.2.12 et
  utiliser NFS peut être assez pénible. 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'implémentation 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 présente 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 intégrateur de système professionnel ils auront
  probablement intégré complètement ``knfsd'' et vous n'avez pas de
  soucis à vous faire, cela marchera. Pour l'essentiel. Jusqu'à ce que
  vous vouliez compiler un noyau vous même. Si vous utilisez un noyau
  2.2 standard (au moins jusqu'à 2.2.12) knfsd ne fonctionnera pas.

  Pour le faire fonctionner vous même 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 bénévolement. Récupérez le depuis votre miroir de
  noyau local, le site maître est ftp.kernel.org:/pub/linux/devel/gcc/.
  CCee nn''eesstt ppaass ddeessttiinnéé aauu ggrraanndd ppuubblliicc. Si vous trouvez que c'est trop
  compliqué, n'insistez pas et attentez qu'un paquetage noyau soit
  disponible auprès de votre intégrateur (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 liées à NFS dans Linux 2.2. Lisez-la.



  1100..11..  LLee cclliieenntt

  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 démarrage. Statd a besoin d'un
  répertoire appelé /var/lib/nfs qu'il vous faudra créer avant de le
  lancer (sans quoi il se termine immédiatement 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 débits sont
  extrêmement faibles, bien pire qu'avec Linux 2.0. Bien sur on peut
  corriger le problème. Les noyaux 2.2 d'Alan Cox (un petit peu plus
  expérimentaux que ceux de Linus) incluent un patch pour améliorer 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 référence 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 intégré dans Linux 2.4, car il demande trop
  de changements dans le noyau pour être accepté dans le cycle de
  développement actuel. Attendez Linux 2.5.

  trondmy propose des patchs pour utiliser NFS version 3 avec Linux, et
  qui permettent aussi d'utiliser TCP comme mécanisme de transport au
  lieu d'UDP. NFSv3 est très bien pour des réseaux grande distance ou
  avec des taux de pertes non nuls, ou des temps de latence élevés.

  Si vous utilisez ces patchs, il vous faut lire linux-kernel, car de
  sales bugs, qui mangent vos fichiers, sont parfois découverts. Alors
  ssooyyeezz pprruuddeenntt.


  1100..22..  LLee sseerrvveeuurr

  Le serveur NFS de Linux 2.2 et suivants est appelé "knfsd". Il est
  difficile à configurer. Il faudra vous débrouiller tout seul ou
  utiliser ce que SuSE, RedHat et autres fournissent dans leurs
  paquetages 2.2. Désolé, mais vous pouvez toujours utiliser l'ancien
  nfsd. Il est lent mais facile à installer.



  1111..  SSeerrvveeuurr NNFFSS ssuurr uunnee ddiissqquueettttee

  Cette section a été écrite par Ron Peters, rpeters@hevanet.com. Elle
  explique comment installer un serveur NFS en démarrant depuis une
  disquette. L'objectif initial était de partager par NFS un cédérom
  d'une autre machine pour installer Linux sur une machine sans lecteur
  de cédérom.



  1111..11..  IInnttrroodduuccttiioonn

  Ce document a pour but d'aider ceux qui auront le même problème que
  moi récemment. J'installais un serveur Linux sur une machine sans
  lecteur de cédérom 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 intérêt, mais j'aurais
  bien aimé l'avoir quand j'essayais d'installer ma machine.

  Vu que la machine n'avait pas de lecteur de cédérom, j'ai pensé
  installer un serveur NFS pour Win95 afin de partager le lecteur de
  cédérom juste le temps d'installer ma machine et de la mettre sur le
  réseau. 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 limitée à 14
  jours), l'un ne marcha pas ``clés en main'' et l'autre n'était pas
  capable de gérer les conventions de nommage Linux suffisamment bien
  pour mener à bien l'installation.

  J'ai donc décidé d'essayer de redémarrer ma machine Win95 sous Linux
  avec les disquettes boot/root et d'utiliser une disquette
  supplémentaire pour installer un serveur NFS.

  Cela a été remarquablement simple, la procédure est en fait
  probablement plus simple que de lire cette introduction. Cependant, je
  pense qu'il est intéressant de rassembler les information nécessaires
  dans ce document.


  1111..22..  AAtttteenntteess

  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 méthode d'installation Slakware, non pas qu'elle soit plus facile
  ou meilleure ou pire, mais simplement qu'elle m'est familière 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 problèmes liés à la
  version du système. Je recommanderais simplement d'utiliser un système
  relativement récent, ce qui devrait être le cas si vous utilisez les
  disquettes boot/root de la distribution à installer.


  1111..33..  MMaattéérriieell nnéécceessssaaiirree


  ·  Une machine et une disquette de boot supportant le réseau. La
     machine devant jouer le rôle du serveur NFS doit avoir une carte
     réseau reconnue pendant le démarrage. Pour plus d'informations,
     voir le HOWTO sur le réseau (NET4-HOWTO).

  ·  Une deuxième disquette contenant rpc.portmap, rpc.mountd et
     rpc.nfsd. Vous pouvez trouver facilement ces fichiers par un
     ftpsearch sur le ouèbe.

  ·  Un cd (par exemple) Slakware (ou autre).


  1111..44..  CCoonnffiigguurraattiioonn dduu sseerrvveeuurr



  1111..44..11..  DDéémmaarrrreerr llee sseerrvveeuurr NNFFSS tteemmppoorraaiirree

  Démarrez la machine qui sera serveur NFS depuis la disquette de
  démarrage et assurez-vous que la carte réseau est reconnue, de même
  que le lecteur de cédérom. Dans la suite je suppose que la carte
  réseau en question est eth0.


  1111..44..22..  MMoonntteerr llaa ddiissqquueettttee eett llee ccééddéérroomm

  Une fois que le système est démarré, vous n'avez plus besoin des
  disquette boot/root, le système étant complètement installé en disque
  mémoire. Remplacez la disquette root par la disquette supplémentaire,
  et montez la :

  mount /dev/fd0 /floppy

  Ceci fonctionne pour une disquette avec un système de fichiers ext2.
  J'imagine que la disquette pourrait utiliser un système 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 cédérom :

  mount -t iso9660 /dev/hdc /cdrom

  J'ai utilisé les périphériques disquette et cédérom, 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, créez-les, ou bien vous pouvez utiliser n'importe
  quels autres points de montage.





  1111..44..33..  CCoonnffiigguurreerr llee rréésseeaauu ssuurr llee sseerrvveeuurr pprroovviissooiirree

  Il faut maintenant configurer le serveur NFS et le réseau. 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 réseau (netmask).

  BROADCAST:172.16.5.255 #L'adresse de diffusion sur le réseau

  ETHNETWORK:172.16.5.0  #L'adresse réseau

  GATEWAY:172.16.5.251 #Nécessaire seulement si vous avez une
  passerelle. Si c'est le cas, vous le savez. La plupart des réseau ``à
  la maison'' n'en ont pas.


  Les commandes pour se connecter au réseau (utiliser les valeurs
  données 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 réseau et devriez pouvoir
  faire des ping sur les autres machines.


  1111..44..44..  CCoonnffiigguurreerr llee vvoolluummee NNFFSS

  Choisissez le répertoire à partager. Dans mon exemple, c'était
  /cdrom/slakware. Placez-le dans le fichier /etc/exports :

  echo "/cdrom/slakware" > /etc/exports




  1111..55..  LLaanncceerr llee sseerrvveeuurr NNFFSS

  Allez dans /floppy/usr/bin et lancez :

  ./rpc.portmap

  ./rpc.mountd

  ./rpc.nfsd



  1111..55..11..  PPrrêêtt,, ccoommmmeenncceezz ll''iinnssttaallllaattiioonn

  Normalement, le répertoire /cdrom/slakware est maintenant partageable.
  Démarrez votre machine (celle à installer) depuis les disquettes
  boot/root (j'ai utilisé les mêmes qui ont servi à démarrer le serveur)
  et commencez l'installation.
  Quand il faut choisir le média 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
  répertoire à 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.


  1111..66..  PPrroobbllèèmmeess



  1111..66..11..  RRiieenn iiccii ppoouurr ll''iinnssttaanntt

  Je n'ai rien à dire à ce sujet pour le moment. Peut être si des gens
  utilisent cette procédure, on aura des choses à ajouter.


  1111..77..  ÀÀ ffaaiirree



  1111..77..11..  DDiissqquueettttee DDOOSS

  Voir si la disquette supplémentaire peut être au format DOS.


  1111..77..22..  CCoommmmaannddeess RRPPCC

  Vérifiez l'ordre dans lequel lancer les commandes rpc.* et si toutes
  sont nécessaires.



  1122..  PPCC--NNFFSS

  Vous ne voulez pas utiliser PC-NFS, mais plutôt 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 plutôt samba.























  Le Linux NIS(YP)/NYS/NIS+ HOWTO
  Thorsten Kukuk
  Version 0.12, 12 Juin 1998

  Ce document décrit la façon de configurer Linux en client de NIS(YP)
  ou de NIS+, et la façon d'installer un serveur NIS.
  ______________________________________________________________________

  Table des matières

























































  1. Version française

  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 générales

     3.1 Glossaire des termes employés
     3.2 Quelques informations générales

  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 Déterminez si vous êtes un serveur, un esclave ou un client
     7.2 Les programmes
     7.3 Le démon 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. Vérifier l'installation de NIS ou de NYS

  12. Problèmes et erreurs de fonctionnement de NIS

  13. FAQ : Les questions les plus fréquemment posées



  ______________________________________________________________________

  11..  VVeerrssiioonn ffrraannççaaiissee


  Ce document constitue la version française du NIS-HOWTO, adaptation
  réalisée par Frédéric Veynachter (frederic.veynachter@hol.fr), le 26
  juillet 1998, fortement inspirée de la traduction précédemment
  réalisée 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
  française 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 mêmex
  endroits.

  Les différents sites conseillés dans  ce document possèdent sûrement
  des miroirs plus proches de chez vous, comme par exemple ftp.lip6.fr,
  ftp.loria.fr ... utilisez-les !


  22..  IInnttrroodduuccttiioonn

  Les machines sous Linux sont de plus en plus souvent installées et
  connectées dans des réseaux informatiques.Pour simplifier
  l'administration système, la plupart des réseaux (surtout ceux qui
  sont fondés sur du matériel 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-mêmes ces
  services. Elles peuvent également se comporter comme des clients NIS+,
  mais il s'agit encore d'une version béta.

  Ce document tente de répondre 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 rédigé et maintenu par:


       Thorsten Kukuk, kukuk@vt.uni-paderborn.de


  La version initiale de ce document a été réalisée 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.


  22..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Vous pourrez toujours trouver la dernière 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 présentes sur
  différents sites ftp et web consacrés à Linux, y compris sur la page
  principale du LDP (Linux Documentation Project).

  Des liens vers les traductions de ce document peuvent être trouvés à
  l'adresse http://www-vt.uni-paderborn.de/~kukuk/linux/nis-howto.html
  <http://www-vt.uni-paderborn.de/~kukuk/linux/nis-howto.html>.


  22..22..  AAvveerrttiisssseemmeenntt

  Même si ce document rassemble le maximum de données selon notre
  connaissance, il peut contenir, et contient sans doute, certaines
  erreurs. Nous vous demandons de lire attentivement tous les fichiers
  README qui sont livrés avec les outils décrits dans ce document, pour
  avoir plus de détails et une information plus précise.  Nous
  essayerons, dans la mesure du possible, d'éviter que des erreurs se
  glissent ans ce document.


  22..33..  RReettoouurr dd''iinnffoorrmmaattiioonn eett ccoorrrreeccttiioonnss

  Si vous avez des questions ou des commentaires à propos de ce
  document, n'hésitez 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 problèmes
  spécifiques à une distribution de Linux. Je ne les connais pas toutes.
  J'essayerai néanmoins d'intégrer toute solution qui me sera envoyée.


  22..44..  RReemmeerrcciieemmeennttss

  Nous voudrions remercier toutes les personnes qui ont contribué
  (directement ou indirectement) à ce document. Par ordre alphabétique :



       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.


  33..  GGlloossssaaiirree eett iinnffoorrmmaattiioonnss ggéénnéérraalleess

  33..11..  GGlloossssaaiirree ddeess tteerrmmeess eemmppllooyyééss

  Dans ce document, bon nombre d'acronymes sont employés. Voici la liste
  des plus utilisés, avec une brève explication.


     DDBBMM
        DataBase Management (Gestion de la base de données):
        bibliothèque de fonctions pour maintenir les clefs et le contenu
        de la base de données.
     DDLLLL
        Dynamically Linked Library (Bibliothèque liée dynamiquement):
        bibliothèque de fonctions chargées dynamiquement à l'exécution.


     ddoommaaiinnnnaammee
        Nom du domaine : nom "clef" utilisé par les clients NIS pour
        qu'ils puissent trouver un serveur NIS convenable qui gère la
        clef du domaine. Notez que cela n'a rien à voir avec le
        "domaine" DNS (nom de la machine) des machines.


     FFTTPP
        File Transfer Protocol  (Protocole de transfert de fichiers) :
        protocole utilisé pour transférer des fichiers entre deux
        ordinateurs.


     lliibbnnssll
        Name services library  : bibliothèque d'appels systèmes (tels
        que getpwnam, getservbyname, ...)  sur les systèmes Unix SVR4.
        La GNU libc utilise cette bibliothèque pour les fonctions NIS
        (YP) et NIS+.


     lliibbssoocckkeett
        Bibliothèque de fonctions de manipulation de sockets socket,
        bind, listen, ... sur les systèmes SVR4.


     NNIISS
        Network Information Service (Service d'information du réseau):
        service qui permet à certaines informations d'être connues par
        toutes les machines disponibles sur le réseau. Ce service est
        géré dans la bibliothèque standard de la libc Linux. Il est
        considéré par la suite comme étant le "NIS traditionnel".


     NNIISS++
        Network Information Service (Plus...)   : en gros, version de
        NIS améliorée. NIS+ a été conçu par Sun Microsystems Inc.  pour
        remplacer NIS, avec un niveau de sécurité supérieur et une
        meilleure gestion pour les grosses installations.


     NNYYSS
        Il s'agit du nom d'un projet de développement et de
        standardisation pour NIS+, YP et Switch.  Il est dirigé par
        Peter Eriksson (<peter@ifm.liu.se>).  Il contient entre autres
        choses une réimplémentation complète du code de NIS
        (c'est-à-dire YP) qui utilise les fonctionnalités  _N_a_m_e _S_e_r_v_i_c_e_s
        _S_w_i_t_c_h de la bibliothèque NYS.


     NNSSSS
        Name Service Switch (littéralement, commutation des noms de
        service): le fichier /etc/nsswitch.conf détermine l'ordre de
        recherche d'informations en fonction des services demandés.


     RRPPCC
        Remote Procedure Call (Appel de procédure distante): les
        routines RPC permettent aux programmes C d'appeler d'autres
        machines à travers le réseau.  Lorsque des personnes parlent de
        RPC, elles parlent souvent en fait de la version Sun RPC.

     YYPP Yellow Pages(tm)  : marque déposée par British Telecom. (les
        pages jaunes... comme les nôtres !).


     TTCCPP--IIPP
        Transmission Control Protocol/Internet Protocol : protocole de
        communication le plus fréquemment utilisé sur les machines Unix.


  33..22..  QQuueellqquueess iinnffoorrmmaattiioonnss ggéénnéérraalleess

  Les quatre lignes ci-dessous sont une citation du manuel
  d'administration réseau 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'abréviation 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 Réseau).  Son but est de fournir des informations, qui
  doivent être connues sur l'ensemble du réseau, à toutes les machines
  connectées. Les informations susceptibles d'être distribuées par NIS
  sont:


  ·  noms de login, mots de passe, répertoires 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 enregistrés dans la base de données NIS, vous pourrez vous loguer
  sur toutes les machines du réseau sur lesquelles un client NIS est
  lancé.

  Sun est une marque déposée de Sun Microsystems Inc, brevetée par
  SunSoft, Inc.



  44..  NNIISS oouu NNIISS++ ??

  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
  sécurité importants. NIS+ est bien plus problématique à administrer
  (c'est plutôt facile à manipuler du côté du client, mais en ce qui
  concerne le côté serveur, c'est une horreur). Un autre problème est
  que le support de NIS+ pour Linux est encore en cours de développement
  : vous devrez avoir la toute dernière 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.




  44..11..  lliibbcc 44//55 aavveecc ""NNIISS ttrraaddiittiioonnnneell"" oouu NNYYSS ??

  Le choix entre "NIS traditionnel" ou le code NIS dans la bibliothèque
  NYS est un choix entre paresse et maturité d'un côté, flexibilité et
  amour de l'aventure de l'autre.

  Le code "NIS traditionnel" se trouve dans la bibliothèque C standard,
  existe depuis fort longtemps, et souffre parfois de son age et de son
  léger manque de souplesse.

  Le code NIS de la bibliothèque NYS vous oblige à recompiler la
  bibliothèque libc pour y inclure le code NYS (à moins que vous ne
  trouviez une version de libc précompilée chez quelqu'un qui l'a déjà
  fait).

  Une autre différence est que le code "NIS traditionnel" gère en partie
  les groupes de réseaux NIS (_N_e_t_g_r_o_u_p_s), alors que le code NYS ne le
  fait pas. D'un autre côté, le code NYS vous permet d'utiliser les mots
  de passe Shadow d'une manière 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
  bibliothèque 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 gérer les "maps" NIS/NIS+ suivantes : aliases, ethers,
  group, hosts, netgroups, networks, protocols, publickey, passwd, rpc,
  services et shadow. La bibliothèque GNU C ne pose aucun problème avec
  les mots de passe Shadow sur NIS.


  55..  CCoommmmeenntt ççaa mmaarrcchhee ??

  55..11..  CCoommmmeenntt ffoonnccttiioonnnnee NNIISS((YYPP)) ??

  A l'intérieur d'un réseau, il doit y avoir au moins une machine
  faisant office de serveur NIS. Vous pouvez avoir plusieurs serveurs
  NIS, chacun gérant plusieurs "domaines" NIS, ou bien vous pouvez avoir
  des serveurs NIS coopératifs. 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 mélanger les deux possibilités.

  Les serveurs esclaves n'ont qu'une copie de la base de données et la
  reçoivent du serveur NIS maître lorsque des changement sont effectués
  dans la base de données. En fonction du nombre de machine et de la
  fiabilité de votre réseau, vous pouvez décider d'installer un ou
  plusieurs serveurs esclaves. Lorsqu'un serveur NIS tombe en panne ou
  bien s'il est trop long pour répondre aux requêtes, un client NIS
  connecté à ce serveur va alors essayer d'en trouver un en état de
  marche.

  Les bases de données NIS sont au format DBM, un dérivé des bases de
  données 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 maître devrait avoir les deux
  types : la base ASCII et la base DBM.

  Les serveurs esclaves seront avertis de tout changement dans les
  tables NIS (grâce au programme yppush), et effectueront
  automatiquement les changements nécessaires pour synchroniser leurs
  bases de données. Les clients NIS n'ont pas besoin d'effectuer cette
  opération puisqu'ils communiquent tout le temps avec le serveur NIS
  pour lire les informations rangées dans les bases de données DBM.


  L'auteur des clients YP pour Linux nous a informé que la nouvelle
  version de ypbind (située 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
  sécurisé car n'importe qui peut installer un serveur NIS et peut donc
  répondre aux requêtes...).


  55..22..  CCoommmmeenntt ffoonnccttiioonnnnee NNIISS++ ??

  NIS+ est une nouvelle version du service d'information réseau de Sun.
  La différence la plus notable entre NIS et NIS+ est que NIS+ est
  capable de gérer des données chiffrées ainsi que l'authentification
  _v_i_a les RPC sécurisés.

  Le modèle 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
  (répertoire, entrée, groupe, lien, table et privé).

  Le répertoire NIS+ qui constitue la racine de l'espace de nommage NIS+
  est appelé le répertoire racine. Il existe deux répertoires spéciaux
  NIS+ : org_dir et groups_dir. Le premier regroupe toutes les tables
  d'administration, telles que passwd, hosts, et mail_aliases.  Le
  second répertoire contient les objets groupe NIS+ qui sont utilisés
  pour contrôler les accès. L'ensemble des répertoires org_dir,
  groups_dir et leurs parents sont considérés comme étant un domaine
  NIS+.


  66..  LLee RRPPCC PPoorrttmmaappppeerr

  Pour lancer n'importe lequel des programmes mentionnés ci-dessous,
  vous aurez besoin de lancer le programme /usr/sbin/rpc.portmap.
  Certaines distributions de LLiinnuuxx ont déjà dans le code du script
  /etc/rc.d/rc.inet2  ce qui est nécessaire pour lancer ce démon.  Tout
  ce que vous avez à faire, c'est de décommenter ce qui est nécessaire
  puis à rebooter votre machine pour l'activer.  Lisez la documentation
  de votre distribution pour plus de détails.

  Le RPC portmapper (portmap(8)) est un serveur qui convertit les
  numéros des programmes RPC en numéros de ports pour le protocole
  TCP/IP (ou UDP/IP). Il doit être lancé dans un certain ordre pour
  réaliser 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 démon
  portmap quel numéro de port il scrute, et quels sont les numéros de
  programmes RPC avec lesquels il est prêt à travailler. Lorsque le
  client souhaite réaliser un appel RPC à certain numéro de programme,
  il contacte dans un premier temps portmap sur le serveur de la machine
  pour déterminer le numéro de port où il doit alors envoyer les paquets
  RPC.

  En principe, les serveurs RPC standards sont lancés par inetd (manuel
  inetd(8)), donc portmap doit être lancé avant qu'inetd ne le soit.

  Pour les RPC sécurisés, le portmapper a besoin des services d'horloge.
  Assurez-vous qu'ils sont activés 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 après toute modification
  de ce fichier !


  77..  DDee qquuooii aavveezz--vvoouuss bbeessooiinn ppoouurr ccoonnffiigguurreerr NNIISS ??



  77..11..  DDéétteerrmmiinneezz ssii vvoouuss êêtteess uunn sseerrvveeuurr,, uunn eessccllaavvee oouu uunn cclliieenntt

  Pour répondre à cette question, nous pouvons considérer deux cas :

  1. votre machine va être insérée dans un réseau avec des serveurs NIS
     déjà existants ;

  2. vous n'avez pas encore de serveur NIS dans votre réseau.

  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 démon doit toujours être lancé, c'est-à-dire
  qu'il doit toujours apparaître dans la liste des processus.  Comme
  c'est un démon, il doit être lancé au démarrage de votre machine dans
  le fichier de démarrage (/etc/rc.local, /etc/init.d/nis,
  /etc/rc.d/init.d/ypbind).  Dès que ypbind fonctionne, votre système
  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 (généralement 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 ) décrit comment configurer
  un serveur NIS sur votre machine Linux en utilisant la version ypserv
  implémentée par Peter Eriksson et Thorsten Kukuk. On peut remarquer
  qu'à partir de la version 0.14 de cette implémentation, le concept de
  maître-esclave dont nous avons parlé dans la section 5.1 est géré.

  Il existe également un autre serveur NIS en libre distribution, appelé
  yps, écrit par Tobias Reber en Allemagne, et qui gére le concept de
  maître-esclave mais qui a d'autres limitations et qui n'est plus
  maintenu.


  77..22..  LLeess pprrooggrraammmmeess

  La bibliothèque /usr/lib/libc.a (version 4.4.2 et supérieure) ou la
  bibliothèque dynamique partagée /lib/libc.so.x contient tous les
  appels systèmes correspondants pour compiler sans problème 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 supérieure, donc, pour plus de
  sûreté, évitez d'utiliser des bibliothèques plus anciennes.  Les
  clients NIS peuvent être récupérés 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 récupéré ces programmes, suivez les
  instructions qui sont livrées avec. yp-clients 2.2 doit être utilisé
  avec les bibliothèques libc4 et libc5 jusqu'à la version 5.4.20. Les
  libc 5.4.21 et glibc 2.x nécessitent 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 présentent de
  nombreux défauts. Utilisez la libc 5.4.36 ou une version supérieure,
  sinon, la plupart des programmes de YP ne fonctionneront pas. ypbind
  3.3 fonctionnera également avec toutes les bibliothèques. Vous ne
  devriez jamais utiliser la version ypbind qui est fournie dans yp-
  clients 2.2.


  77..33..  LLee ddéémmoonn yyppbbiinndd


  Nous supposons que vous avez compilé correctement les programmes et
  que vous êtes prêt à les installer. L'endroit où installer le démon
  ypbind est le répertoire /usr/sbin. Certains peuvent vous dire que
  vous n'avez pas besoin de ypbind sur un système qui utilise NYS. C'est
  faux : ypwhich et ypcat en ont besoin.

  Vous  devez réaliser cette opération en tant que super-utilisateur
  (i.e. "root"), bien sûr.  Les autres binaires (ypwhich, ypcat, yppoll,
  ypmatch) doivent être placés dans un répertoire accessible à tous les
  utilisateurs, normalement c'est le répertoire /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 système est capable de résoudre 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 :

  ·  Vérifiez que votre nom de domaine est défini. Si ce n'est pas le
     cas, faites





              /bin/domainname-yp nis.domain






  où nis.domain doit être une chaîne, 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 données du serveurs NIS. Si vous ne connaissez pas le nom du
  domaine de votre réseau, contactez votre administrateur système.

  ·  Lancez /usr/sbin/rpc.portmap s'il ne tourne pas déjà.

  ·  Créez le répertoire /var/yp s'il n'existe pas.

  ·  Lancez /usr/sbin/ypbind

  ·  Utilisez la commande rpcinfo -p localhost pour vérifier 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 (chiffrés !) de la base de données NIS.

  IMPORTANT : si vous avez évité la procédure de test, vérifiez que vous
  avez positionné le nom de votre domaine, et créé le répertoire :



           /var/yp




  Ce répertoire DOIT exister pour qu'ypbind soit correctement lancé.

  Pour vérifier 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 défaut avec Linux et qui crée de nombreux problèmes.

  Si le test a fonctionné, vous pouvez alors modifier les fichiers
  /etc/rc.d sur votre système pour qu'ypbind soit lancé lors de
  l'amorçage 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'amorçage.

  Normalement, tout est prêt. Relancez votre machine et observez les
  messages pour voir si ypbind est lancé.


  77..44..  CCoonnffiigguurreerr uunn cclliieenntt NNIISS eenn uuttiilliissaanntt llee NNIISS ttrraaddiittiioonnnneell


  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 détails.

  Ajoutez ensuite la ligne suivante dans le fichier /etc/passwd de vos
  machines clientes :



       +::::::




  Vous pouvez également utiliser les caractères + 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 interpréteur de commandes
  différent (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 gérer 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 même
  accès 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 défini de la sorte :


       sysadmins (-,software,) (-,kukuk,)


  IMPORTANT : la fonctionnalité de netgroup n'est implémentée qu'à
  partir de la libc version 4.5.26. Mais si vous possédez une libc plus
  ancienne que la 4.5.26, tout utilisateur dans la base de donnée des
  mots de passe peut accéder à la machine linux si vous lancez ypbind.


  77..55..  CCoonnffiigguurreerr uunn cclliieenntt NNIISS eenn uuttiilliissaanntt NNYYSS


  Il vous suffit d'avoir le fichier de configuration NIS (/etc/yp.conf)
  qui pointe sur le (ou les) serveur(s) adéquat(s), ainsi qu'un fichier
  /etc/nsswitch.conf correctement configuré.

  Vous devriez également installer ypbind. Il n'est pas nécessaire pour
  la libc, mais les outils NIS(YP) en ont besoin.

  Si vous souhaitez utiliser les fonctionnalités 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 première fois, répondez "NO" à la
  question "Values correct" (NDT: en français, "Est-ce que les valeurs
  sont correctes ?"), puis répondez "YES" à la question "Build a NYS
  libc from nys" (NDT: en français, "Construire une libc NYS à partir de
  nys ?").


  77..66..  CCoonnffiigguurreerr uunn cclliieenntt NNIISS eenn uuttiilliissaanntt llaa gglliibbcc 22..xx


  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 caractère "+" à
  la fin de ces fichiers, et vous pourrez alors utiliser les
  fonctionnalités d'inclusion/d'exclusion d'utilisateurs.  La
  configuration est exactement la même que sous Solaris 2.x.


  77..77..  LLee ffiicchhiieerr nnsssswwiittcchh..ccoonnff


  Le fichier de configuration /etc/nsswitch.conf détermine l'ordre dans
  lequel sont effectuées les recherches de certaines informations, en
  fonction des données et des services, de la même manière que le
  fichier /etc/host.conf détermine la façon 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 effectuée
  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 renvoyée. 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 entrées passwd_compat, group_compat et shadow_compat ne sont
  gérées qu'avec la glibc 2.x. S'il n'y a pas d'entrée shadow dans
  /etc/nsswitch.conf, la glibc utilisera l'entrée passwd pour effectuer
  ses recherches. Il existe certaines entrées supplémentaires avec la
  glibc comme hesoid. Pour plus d'informations, consultez la
  documentation de la glibc.


  88..  MMoottss ddee ppaassssee SShhaaddooww aavveecc NNIISS eett PPAAMM

  L'utilisation des mots de passe Shadow avec NIS est toujours une
  mauvaise idée.  Vous perdez toute la sécurité apportée par le système
  Shadow. Une bonne façon d'éviter les mots de passe Shadow avec NIS est
  de ne mettre dans le fichier /etc/shadow que les utilisateurs du
  système local. Enlevez de la base de données Shadow toutes les entrées
  correspondant aux utilisateurs NIS, et remettez les mots de passe dans
  /etc/passwd. Vous pourrez ainsi utiliser le système 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
  bibliothèque GNU C 2.x. C'est la seule bibliothèque libc pour Linux
  qui gère l'utilisation des mots de passe Shadow avec NIS. Sous Linux,
  la libc5 ne le permet pas. La libc5 compilée avec le support de NYS
  contient une partie de code permettant le mélange Shadow - NIS, mais
  ce code présente de sérieuses erreurs dans certains cas et ne
  fonctionne pas correctement avec toutes les entrées Shadow.

  Le problème suivant est PAM. La bibliothèque GNU C gère l'utilisation
  des mots de passe Shadow avec NIS, mais PAM ne le fait pas,
  essentiellement  pam_pwdb/libpwdb.  C'est un gros problème pour les
  utilisateurs de RedHat 5.x. Si vous avez glibc et PAM, vous devez
  changer les entrées dans /etc/pam.d/*. Changez toutes les entrées de
  pam_pwdb par l'intermédiaire des modules pam_auth_unix_*. Cette
  méthode devrait fonctionner.


  99..  QQuuee ffaauutt--iill ppoouurr ccoonnffiigguurreerr NNIISS++ ??



  99..11..  LLeess pprrooggrraammmmeess


  Le code de NIS+ pour Linux a été développé pour la bibliothèque GNU C
  2.  Il existe également une version pour la libc5 de Linux, puisque
  toutes les applications commerciales sont compilées en édition de lien
  avec cette bibliothèque, et que vous ne pouvez pas les recompiler en
  utilisant la glibc. Il y a des problèmes avec la libc5 et NIS+: Vous
  ne pourrez pas réaliser d'édition de lien statique de vos programmes,
  et les programmes compilés avec cette bibliothèque ne fonctionneront
  pas avec les autres versions de la libc5.

  Vous devez récupérer et recompiler la dernière version de la glibc2,
  et une distribution basée sur cette bibliothèque comme la Redhat
  Mustang ou l'instable Debian. Mais attention : il s'agit toujours
  d'une version bêta. Lisez la documentation concernant la glibc et
  celle fournie par la distribution.  La glibc2.0.x ne gère pas
  pleinement NIS+, et ne l'intégrera jamais. La première version avec la
  gestion NIS+ sera la 2.1.

  Les programmes clients NIS+ peuvent être récupérés 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 basées sur la glibc peuvent être récupérées 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 livrées avec les
  sources.  Vous pouvez trouver à l'adresse suivante la version patchée
  de la libc5, basée sur NYS et sur les sources de la glibc, qui peut
  être utilisée 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 dernières sources.


  99..22..  CCoonnffiigguurreerr uunn cclliieenntt NNIISS++


  IMPORTANT : pour configurer un client NIS+, lisez la documentation
  NIS+ Solaris pour voir ce qu'il convient de faire du côté serveur.  Ce
  document ne décrit que le côté client !

  Après avoir installé la nouvelle libc ainsi que nis-tools, créez les
  références pour le nouveau client sur le serveur NIS+. Assurez vous
  que portmap est lancé.  Ensuite, vérifiez que votre PC Linux est à la
  même heure que le serveur NIS+. Pour réaliser des RPC sécurisés, vous
  disposez d'une courte période de 3 minutes, durant lesquelles les
  références sont valides. Lancer xntpd sur toutes les machines peut
  être une bonne idée. Après tout ça, exécutez les commandes suivantes :



       domainname nisplus.domain.
       nisinit -c -H <serveur NIS+>




  pour initialiser le système de lancement. Lisez la page de manuel de
  nisinit pour connaître les différentes options existantes.  Assurez-
  vous que le nom de domaine est toujours bien positionné lors d'un
  réamorçage. Si vous ne connaissez pas votre nom de domaine NIS+ sur
  votre réseau, demandez-le à votre administrateur système.

  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'amorçage de la machine. Lancez


       keylogin -r




  pour conserver la clef privée sur votre système (j'espère que vous
  avez ajouté la clef publique de la nouvelle machine sur le serveur
  NIS+ !).

  "niscat passwd.org_dir" doit désormais vous donner toutes les entrées
  contenues dans la base de données passwd.


  99..33..  NNIISS++,, kkeeyyllooggiinn,, llooggiinn eett PPAAMM

  Lorsque l'utilisateur se connecte, il a besoin de fixer sa clef
  secrète 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 gère 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





  99..44..  LLee ffiicchhiieerr nnsssswwiittcchh..ccoonnff


  Le fichier de configuration /etc/nsswitch.conf détermine l'ordre dans
  lequel sont effectuées les recherches de certaines informations, en
  fonction des données et des services, de la même manière que le
  fichier /etc/host.conf détermine la façon 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 trouvée, alors une
  erreur est renvoyée.

  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





  1100..  CCoonnffiigguurreerr uunn sseerrvveeuurr NNIISS



  1100..11..  LLee pprrooggrraammmmee sseerrvveeuurr yyppsseerrvv


  Ce document ne décrit que la manière de configurer le serveur NIS
  "ypserv".

  Les programmes serveur NIS peuvent être trouvés 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 même que cela soit le NIS
  traditionnel ou NYS.

  Compilez les sources pour générer les programmes "ypserv" et
  "makedbm".  Si votre serveur est considéré comme maître, déterminez
  quels fichiers vous souhaitez rendre disponibles via NIS et ajoutez ou
  supprimez les entrées appropriées dans /var/yp/Makefile.

  Il y a une seule grande différence entre ypserv 1.1 et ypserv 1.2.
  Depuis la version 1.2, ypserv utilise une mémoire cache pour les
  manipulations de fichiers.  Cela signifie que vous devez toujours
  appeler makedbm avec l'option -c si créez de nouvelles maps. Assurez-
  vous que vous utilisez le nouveau /var/yp/Makefile fourni avec ypserv
  1.2 ou une version supérieure, 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 répondre un message du genre



           program 100004 version 2 ready and waiting




  Maintenant, générez la base de donnée NIS (YP).  Sur le serveur
  maître, 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 problèmes, vous pouvez lancer ypserv et
  ypbind en mode debug sur des xterms différents. La sortie écran du
  mode débug 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 manière, vous êtes sûr que les maps NIS sont synchronisées et
  sont à jour, même s'il peut arriver qu'une mise à jour soit ratée
  parce que l'esclave était arrêté lors de la mise à jour du maître.

  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 maître. Ensuite, lancez


           % /usr/lib/yp/ypinit -s masterhost




  sur l'esclave, et ajoutez le nom du serveur au fichier
  /var/yp/ypservers. Après cela, lancez la commande "make" dans le
  répertoire /var/yp pour mettre les maps à jour.

  Si vous souhaitez restreindre l'accès au serveur NIS, vous devez
  configurer le serveur NIS comme s'il était également un client en
  lançant ypbind et en ajoutant les entrées "+" dans le fichier
  /etc/passwd. La bibliothèque de fonctions va alors ignorer les entrées
  normales après la première entrée NIS et va récupérer le reste des
  informations en utilisant NIS.  C'est de cette manière que sont
  maintenues les règles d'accès 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'interpréteur de
  commandes /etc/NoShell. L'utilisateur _m_i_q_u_e_l_s aura un accès 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 systèmes, les fichiers passwd et group sont généralement
  conservés dans le répertoire /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 créer
  vos propres outils.

  Toutefois, yppasswd, ypchsh et ypchfn fonctionneront bien sur.


  1100..22..  LLee pprrooggrraammmmee sseerrvveeuurr yyppss


  Pour mettre en place le serveur NIS yps, consultez les paragraphes
  précédents. Sa configuration est assez similaire sans être exactement
  la même, 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 sécurité. 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





  1100..33..  LLee pprrooggrraammmmee rrppcc..yyppppaasssswwdddd

  À chaque fois qu'un utilisateur change son mot de passe, le mot de
  passe de la  base de données NIS, ainsi que celui des autres bases de
  données NIS, doit être mis à jour. Le programme rpc.yppasswd est un
  serveur qui gére les modifications de mot de passe et qui s'assure que
  les informations NIS seront correctement mises à jour. rpc.yppasswdd
  est désormais intégré dans ypserv. Vous n'avez plus besoin des
  vieilles versions séparées 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 gère totalement
  les Shadow. yppasswd fait maintenant parti de yp-tools-1.2.tar.gz.

  Le lancement de rpc.yppasswdd n'est nécessaire que sur le serveur
  maître.  Par défaut, les utilisateurs ne sont pas autorisés à changer
  leur Nom complet (NDT: Prénom + 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.


  1111..  VVéérriiffiieerr ll''iinnssttaallllaattiioonn ddee NNIISS oouu ddee NNYYSS

  Si tout fonctionne correctement (comme cela devrait être), vous
  devriez être capable de vérifier votre installation avec quelques
  commandes simples. Supposons que le fichier de mots de passe soit géré
  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'entrée 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 paramètre.
  Il va afficher toutes les informations renvoyées par la fonction
  getpwnam concernant l'utilisateur.  Cela peut vous permettre de savoir
  si l'entrée est correcte. Un problème assez fréquemment rencontré est
  une redéfinition du champ de mot de passe par un "*".
  1122..  PPrroobbllèèmmeess eett eerrrreeuurrss ddee ffoonnccttiioonnnneemmeenntt ddee NNIISS

  Voici certains problèmes rencontrés par différents utilisateurs :


  1. Les bibliothèques 4.5.19 sont défectueuses. 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 récupérer la commande su à partir de la
     distribution de la _s_l_a_c_k_w_a_r_e 1.2.0 ou supérieure. Éventuellement,
     vous pouvez également y récupérer les bibliothèques mises à jour.

  3. Vous pouvez avoir quelques problèmes avec NIS et DNS sur la même
     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 démarre avec des
     messages du genre :

              yp_match: clnt_call:
                          RPC: Unable to receive; errno = Connection refused



  et les logins sont refusés pour les utilisateurs référencés dans la
  base de donnée NIS. Loguez vous en tant que root si vous le pouvez,
  tuez ypbind puis relancez-le.

  5. Après avoir mis à jour la libc version supérieure à 5.4.20, les
     outils YP ne fonctionneront plus. Vous devez utiliser les yp-tools
     version 1.2 ou supérieure pour la libc >= 5.4.21 et glibc 2.x, et
     la version yp-clients 2.2 pour les versions précédentes.  yp-tools
     2.0 devrait fonctionner avec toutes les bibliothèques.

  6. Dans les libc 5.4.21 - 5.4.35, yp_maplist est défectueux.  Vous
     devrez prendre une version 5.4.36 ou supérieure, sinon, certains
     programmes pour YP comme ypwhich généreront une erreur _s_e_g_._f_a_u_l_t.

  7. La libc5 avec le NIS traditionnel ne gère 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".


  1133..  FFAAQQ :: LLeess qquueessttiioonnss lleess pplluuss ffrrééqquueemmmmeenntt ppoossééeess

  Bon nombre de questions doivent être résolues désormais. Si vous avez
  des questions sans réponse, 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.

































































  Réseau sous Linux :
  Auteur : Joshua Drake poet@linuxports.com
  v1.6.2, Décembre 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 matières
























































  1. Introduction.

  2. Histoire de ce document

     2.1 Retour d'informations

  3. Comment utiliser ce document.

     3.1 Les conventions utilisées dans ce document

  4. Informations générales concernant le réseau  sous Linux.

     4.1 Informations sur la couche réseau de Linux.
     4.2 Où obtenir des informations sur le réseau,  non spécifiques de Linux.

  5. Informations générales concernant la configuration réseau

     5.1 De quoi ai-je besoin pour démarrer ?
        5.1.1 Sources du noyau récents (Optionnel).
        5.1.2 Adresses et explications.
     5.2 Où mettre les commandes de configuration ?
     5.3 Créer vos interfaces réseau
     5.4 Configurer une interface réseau. 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 nécessaires
        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 réseau 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 réseau
        5.9.1 (TT
        5.9.2 (TT
     5.10 Sécurité réseau et contrôle d'accès
        5.10.1 /etc/ftpusers
        5.10.2 /etc/securetty
        5.10.3 Le mécanisme de contrôle d'accès des hôtes
           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 démon
        5.10.6 Pare-feu (Firewall) sur le réseau
        5.10.7 Autres suggestions

  6. Informations sur Ethernet

     6.1 Cartes Ethernet supportées
        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 générales sur Ethernet
     6.3 Utiliser plusieurs cartes Ethernet sur la même 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 Réglage d'un client DHCP pour les utilisateurs de LinuxConf
     7.3 Réglage d'un serveur DHCP sous Linux
        7.3.1 Options de DHCPD
        7.3.2 Démarrage 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 réseau avec tunneling.
        7.8.2 Une configuration d'hôte 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 allouée

  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 matériel 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 réseau à 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 téléphonique  et DIP
        9.4.5 Serveur SLIP dynamique avec une ligne téléphonique 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 réseau

     10.1 ARCNet
     10.2 Appletalk (
        10.2.1 Configurer le support Appletalk.
        10.2.2 Exporter un système 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. Câbles et câblages

     11.1 Câble série NULL Modem
     11.2 Câble port parallèle (câble PLIP)
     11.3 Câblage Ethernet 10base2 (coaxial fin)
     11.4 Câblage Ethernet à paires torsadées

  12. Glossaire des termes utilisés dans ce document.

  13. Copyright.

  14. Note du traducteur



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn..

  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.





  22..  HHiissttooiirree ddee ccee ddooccuummeenntt

  Le premier document NET-FAQ fut écrit par Matt Welsh et Terry Dawson
  pour répondre aux questions fréquemment posées concernant les réseaux
  sous Linux, ceci au moment où le LPD (Linux Documentation Project)
  démarrait tout juste.  Il s'agissait alors des toutes premières
  versions de développement du noyau réseau sous Linux.  Le document
  NET-2-HOWTO, qui succéda 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 réseau du noyau Linux.  Ce document prend
  la suite à son tour et ne traite que de la version 4 du noyau réseau
  Linux et plus spécialement des versions du noyau 2.x et 2.2.x.

  Les versions précédentes de ce document étaient devenues plutôt
  énormes en raison du grand nombre de sujets abordés. Pour résoudre ce
  problème, un certain nombre de documents HOWTO ont été créés et
  traitent de sujets spécifiques.  Ce document fait référence à ceux qui
  sont pertinents et aborde les sujets qui ne sont pas encore couverts
  par d'autres documents.


  22..11..  RReettoouurr dd''iinnffoorrmmaattiioonnss

  Nous apprécions 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 désirez que l'on ajoute quelque chose, contactez-nous.


  33..  CCoommmmeenntt uuttiilliisseerr ccee ddooccuummeenntt..

  Ce document est organisé de manière à être lu progressivement.  Les
  premières sections traitent d'informations sur le matériel et peuvent
  être passées si cela ne vous intéresse pas. Ensuite, vous trouverez
  une discussion générale sur les réseaux, et vous devez être certains
  de l'avoir assimilée avant de poursuivre vers les paragraphes plus
  spécifiques. Le reste traite l'aspect plus technique, et est regroupé
  en trois parties principales : informations sur Ethernet et IP, les
  technologies concernant le matériel PC le plus courant, et les
  technologies moins répandues.


  La démarche que je suggère pour parcourir ce document est donc la
  suivante :




     LLiirree lleess sseeccttiioonnss ggéénnéérraalleess
        Ces paragraphes s'appliquent à chaque, ou presque, technologie
        décrite plus loin et il est donc important que vous les ayez
        comprises.  D'autre part, j'espère que de nombreux de lecteurs
        connaissent déjà le sujet.



     RRééfflléécchhiisssseezz àà vvoottrree rréésseeaauu
        Vous devez savoir comment votre réseau est (ou sera) conçu et
        quels matériels et types de technologies vous utiliserez.




     LLiisseezz llaa sseeccttiioonn ````EEtthheerrnneett eett IIPP'''' ssii vvoouuss êêtteess ccoonnnneeccttééss eenn
        ddiirreecctt
        sur un réseau local ou à l'Internet" Cette section traite de la
        configuration de base d'Ethernet et des différentes possibilités
        offertes par Linux, et qui concernent le réseau, telles que le
        pare-feu, le routage avancé, etc..


     LLiisseezz aapprrèèss ssii vvoouuss êêtteess iinnttéérreessssééss ppaarr lleess rréésseeaauuxx llooccaauuxx àà bbaass
        ccooûûtt
        ou les connexions par téléphone" Cette section parle de PLIP,
        PPP, SLIP, et RNIS, les technologies utilisées habituellement
        sur les stations personnelles.


     LLiisseezz llaa sseeccttiioonn ccoonncceerrnnaanntt llaa tteecchhnnoollooggiiee qquuii ccoorrrreessppoonndd
        plus particulièrement à vos besoins."  Si vos besoins ne
        concernent pas IP et/ou un matériel courant, vous trouverez à la
        fin des détails sur les protocoles non-IP et les matériels de
        communication particuliers.


     CCoonnffiigguurreezz vvoottrree rréésseeaauu
        Si vous allez réellement essayer de configurer votre réseau,
        prenez soigneusement note de tout problème éventuel.


     CChheerrcchheezz ddee ll''aaiiddee ssii nnéécceessssaaiirree
        Si vous rencontrez des problèmes qui ne sont pas traités dans ce
        document, reportez-vous au paragraphe donnant les endroits où
        l'on peut en obtenir ou bien envoyer des reports de bogues.

     AAmmuusseezz--vvoouuss!!
        Le réseau est amusant, profitez-en.



  33..11..  LLeess ccoonnvveennttiioonnss uuttiilliissééeess ddaannss ccee ddooccuummeenntt

  Il n'y a pas de convention spéciale utilisée dans ce document, mais
  vous devez faire attention à la façon dont les commandes sont
  spécifiées. En consultant la documentation habituelle d'Unix, toute
  commande qui doit être tapée est précédée d'une invite du shell.  Ce
  document utilise "user%" comme invite pour les commandes ne
  nécessitant pas de privilèges de superutilisateur, et "root#" pour les
  commandes que l'on doit exécuter comme super-utilisateur (root).  Je
  préfère utiliser "root#" à la place du classique "#" pour éviter toute
  confusion avec les extraits de scripts shell, ou le signe dièse est
  utilisé pour définir les lignes de commentaires.




  Lorsque les ``Options de Compilation du noyau'' sont mentionnées,
  elles le sont avec le format utilisé par _m_e_n_u_c_o_n_f_i_g. Elles devraient
  donc être compréhensibles même 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.



  44..  ssoouuss LLiinnuuxx..  IInnffoorrmmaattiioonnss ggéénnéérraalleess ccoonncceerrnnaanntt llee rréésseeaauu


  44..11..  IInnffoorrmmaattiioonnss ssuurr llaa ccoouucchhee rréésseeaauu ddee LLiinnuuxx..

  Il existe un grand nombre d'endroits où l'on peut trouver de bonnes
  informations sur le réseau Linux.

  Il y a un tas de spécialistes disponibles. On peut en trouver une
  liste sur LinuxPorts Consultants Database.

  Alan Cox, l'actuel mainteneur du code réseau Linux entretient une page
  web contenant les points principaux du réseau actuel, et ses nouveaux
  développements, à l'adresse : www.uk.linux.org.

  Il existe un groupe de discussion dédié au réseau et, en ce qui le
  concerne dans la hiérarchie 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 réseau
  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 problème d'y inclure le
  plus possible de détails nécessaires. Plus spécialement 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 problèmes 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 exécutées.


  44..22..  nnoonn ssppéécciiffiiqquueess ddee LLiinnuuxx..  OOùù oobbtteenniirr ddeess iinnffoorrmmaattiioonnss ssuurr llee
  rréésseeaauu,,

  si vous désirez des informations générales de base sur tcp/ip, alors
  je vous recommande de regarder les documents suivants :



     iinnttrroodduuccttiioonn àà TTCCPP//IIPP
        ce document se trouve à la fois sur en version texte et en
        version postscript.


     aaddmmiinniissttrraattiioonn TTCCPP//IIPP
        ce document se trouve à la fois sur en version texte et en
        version postscript.


  Si vous recherchez des informations plus détaillées 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, 3ème édition,
       1995.


  Si vous voulez apprendre comment écrire des applications réseau 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 deuxième é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 stockées ces RFC. Un grand nombre sont des sites
  ftp, d'autres fournissent des accès WWW avec un moteur de recherche
  qui fouille dans les bases de données RFC avec des mots-clés
  particuliers.

  Une source possible de RFC est : la base de données RFC de Nexor.



  55..  IInnffoorrmmaattiioonnss ggéénnéérraalleess ccoonncceerrnnaanntt llaa ccoonnffiigguurraattiioonn rréésseeaauu

  Vous devez connaître et bien comprendre les paragraphes suivants avant
  d'essayer de configurer votre réseau.  Ce sont des principes de base
  qui s'appliquent, indépendamment de la nature du réseau que vous
  voulez mettre en place.



  55..11..  DDee qquuooii aaii--jjee bbeessooiinn ppoouurr ddéémmaarrrreerr ??

  Avant de commencer à construire ou configurer votre réseau, vous aurez
  besoin de certaines choses. Les plus importantes sont :



  55..11..11..  SSoouurrcceess dduu nnooyyaauu rréécceennttss ((OOppttiioonnnneell))..

  À noter:

  La majorité des distributions actuelles sont livrées avec l'option
  réseau activée, de sorte que vous n'avez pas besoin de recompiler le
  noyau. Si vous utilisez du matériel 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 gère pas les types de
  réseau ou les cartes que vous voulez utiliser, vous aurez besoin des
  sources du noyau pour pouvoir le recompiler avec les options
  adéquates.

  Pour les utilisateurs des principales distributions comme RedHat,
  Caldera, Debian ou Suse, ce n'est plus vrai. Tant que vous restez avec
  un matériel de grande diffusion, il n'est pas nécessaire de recompiler
  le noyau, à moins que vous n'ayez une exigence très spécifique.


  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 même
  temps. Le site officiel est kernel.org, mais dans la mesure du
  possible, utilisez s'il vous plaît celui que je viens de donner.
  Souvenez-vous que ftp.kernel.org est particulièrement surchargé.
  Utilisez un miroir.  (NdT : et bien sûr ftp.lip6.fr) .

  Normalement les sources du noyau doivent être désarchivées dans le
  répertoire /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 répertoire 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 numéro de version). Les versions de développement (avec un
  chiffre impair en seconde place dans le numéro de version) peuvent
  avoir une structure ou autre chose qui peut poser problème avec les
  logiciels de votre système. Si vous n'êtes pas certain de résoudre ce
  type de problèmes, avec en plus ceux qui existeraient sur d'autres
  logiciels, ne les utilisez pas.



  55..11..22..  AAddrreesssseess eett eexxpplliiccaattiioonnss..

  Les adresses de protocole Internet (IP) sont composées de quatre
  octets. La convention d'écriture est appelée `notation décimale
  pointée'. Sous cette forme chaque octet est converti en un nombre
  décimal (0-255), en omettant les zéros de tête (à moins que ce nombre
  ne soit lui-même un zéro) et chaque octet est séparé par le caractère
  `.'.  Par convention, chaque interface d'un hôte ou routeur possède
  une adresse IP. Il est permis, dans certaines circonstances, que la
  même adresse IP soit utilisée sur différentes interfaces d'une même
  machine, mais, en général, chaque interface possède sa propre adresse.

  Les réseaux IP (Protocole Internet) sont des séquences contiguës
  d'adresses IP. Toutes les adresses d'un même réseau ont des chiffres
  en commun.  La partie d'adresse commune à toutes les adresses d'un
  réseau s'appelle la `partie réseau' de l'adresse. Les chiffres
  restants s'appellent `partie hôte'. Le nombre de bits qui sont
  partagés par toutes les adresses d'un même réseau est appelé masque de
  réseau (netmask) et c'est le rôle du masque de réseau de déterminer
  quelles adresses appartiennent à `son' réseau et celles qui ne sont
  pas concernées.  Par exemple :



       ----------------------------------------     ----------------
       Adresse hôte (host address)                  192.168.110.23
       Masque de réseau (network mask)              255.255.255.0
       Partie réseau (network portion)              192.168.110.
       Partie hôte (host portion)                              .23
       ----------------------------------------     ----------------
       Adresse réseau (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 réseau
  révèlera l'adresse du réseau auquel elle appartient.  L'adresse du
  réseau est par conséquent l'adresse de plus petit nombre dans
  l'ensemble des adresses et a toujours la partie hôte codée avec des
  zéros.

  L'adresse de diffusion est une adresse spéciale que chaque hôte du
  réseau écoute en même temps que son adresse personnelle.  Cette
  adresse est celle à laquelle les datagrammes sont envoyés si tous les
  hôtes du réseau sont en mesure de les recevoir.  Certains types de
  données telles que les informations de routage et les messages
  d'alerte sont transmis vers l'adresse de diffusion de telle sorte que
  tous les hôtes du réseau peuvent les recevoir en même temps.  Il y a
  deux standards utilisés de manière courante pour définir ce que doit
  être l'adresse de diffusion. Le plus largement utilisé est de prendre
  l'adresse la plus haute possible du réseau 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 réseau comme adresse de diffusion. En pratique cela n'a pas
  beaucoup d'importance, mais vous devez être sûrs que tous les hôtes du
  réseau sont configurés avec la même adresse de diffusion.

  Pour des raisons d'administration, il y a quelque temps, lors du
  développement du protocole IP, des ensembles d'adresses ont été
  organisés en réseaux et ces réseaux ont été regroupés en ce que l'on a
  appellé classes. Ces classes donnent un certain nombre de réseaux de
  tailles standards auxquels on peut assigner des adresses. Ces classes
  sont :



       ----------------------------------------------------------
       |Classe de |Masque de     | Adresses de réseau           |
       | réseau   |  réseau      |                              |
       ----------------------------------------------------------
       |    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 dépend 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
  :



     IInnssttaalllleerr uunnee mmaacchhiinnee LLiinnuuxx ssuurr uunn rréésseeaauu IIPP eexxiissttaanntt
        Vous devez contacter un des administrateurs du réseau et lui
        demander les informations suivantes :

     ·  Adresse hôte;

     ·  Adresse réseau;

     ·  Adresse de diffusion;

     ·  Masque de réseau;

     ·  Adresse de routage;

     ·  Adresse du serveur de noms de domaine (DNS).

        Vous configurerez alors votre réseau Linux à l'aide de ces
        données.  Vous ne pouvez pas les inventer vous-même et espérer
        que votre configuration fonctionne.

     CCoonnssttrruuiirree uunn rréésseeaauu ttoouutt nneeuuff nnoonn ccoonnnneeccttéé àà
        l'Internet" Si vous construisez un réseau 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 sécurité et de fiabilité, il y a quelques
        adresses de réseau IP réservées à cet usage. Elles sont
        spécifiées dans la RFC 1597 et sont les suivantes :






     -----------------------------------------------------------
     |         ALLOCATIONS POUR RÉSEAUX PRIVÉS                 |
     -----------------------------------------------------------
     | Classe  | Masque de     | Adresses de réseau            |
     | réseau  |  réseau       |                               |
     -----------------------------------------------------------
     |    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 décider de la dimension de votre réseau et
     choisir ensuite les adresses dont vous avez besoin.



  55..22..  OOùù mmeettttrree lleess ccoommmmaannddeess ddee ccoonnffiigguurraattiioonn ??

  Il y a plusieurs possibilités de procédures de démarrage d'un système
  Linux. Après le démarrage du noyau, celui-ci exécute toujours un
  programme appelé `_i_n_i_t'. Ce programme lit le fichier de configuration
  appelé /etc/inittab et commence le processus de démarrage. Il y a
  quelques variantes de _i_n_i_t, bien que maintenant tout le monde se
  dirige vers la variante System V (cinq), développée par Miguel van
  Smoorenburg.

  Bien que que le programme _i_n_i_t soit toujours le même, les réglages du
  processus de démarrage se font différemment suivant le type de
  distribution.  Habituellement le fichier /etc/inittab contient une
  entrée telle que :



       si::sysinit:/etc/init.d/boot




  Cette ligne spécifie le nom du fichier script qui prend en charge
  réellement la séquence de démarrage. Ce fichier est en quelque sorte
  équivalent au fichier MS-DOS AUTOEXEC.BAT.

  Il y a aussi d'autres scripts appelés par le script de démarrage, et
  souvent le réseau est configuré dans l'un de ceux-ci.

  Le tableau suivant peut être utilisé comme guide suivant le système
  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
  répertoire pour les scripts qui mettent en route les services du
  système (et habituellement l'information ne se situe pas dans ces
  fichiers, par exemple les systèmes RedHat stockent l'ensemble de la
  configuration du système sous /etc/sysconfig, où elle est récupérée
  par les scripts de démarrage). Si vous voulez saisir les détails du
  processus de démarrage, je vous conseille de vérifier _/_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 systèmes, et
  nous pointerons sur lui dès qu'il sera disponible sur le réseau.


  La plupart des distributions récentes incluent un programme qui permet
  de configurer de nombreux types d'interfaces réseau. Si vous en
  possédez une, regardez si ce programme vous convient au lieu de tenter
  une configuration manuelle.




       -----------------------------------------
       Distrib   | Programme de configuration réseau
       -----------------------------------------
       RedHat    | /sbin/netcfg
       Slackware | /sbin/netconfig
       -----------------------------------------






  55..33..  CCrrééeerr vvooss iinntteerrffaacceess rréésseeaauu

  Sur un grand nombre de systèmes Unix, les périphériques réseau
  apparaissent dans le répertoire _/_d_e_v . Il n'en est pas de même avec
  Linux. Les périphériques réseau  sont créés dynamiquement par les
  logiciels et ne nécessitent donc pas de fichiers de périphériques.

  Dans la majorité des cas, le périphérique réseau est automatiquement
  créé par le gestionnaire de périphérique lors de son initialisation
  par le noyau.  Par exemple le pilote Ethernet crée les interfaces
  eth[0..n] une par une lorsqu'il détecte votre matériel Ethernet. La
  première carte Ethernet trouvée devient eth0, la deuxième eth1, etc.

  Cependant, dans certains cas, notamment avec _S_L_I_P et _P_P_P, les
  périphériques réseau sont créés par un programme utilisateur. Le même
  mécanisme séquentiel s'applique sur les périphériques, mais ce n'est
  pas au moment du démarrage du système. La raison en est que, à
  l'inverse des dispositifs Ethernet, le nombre de périphériques _S_L_I_P ou
  _P_P_P actifs peut varier dans le temps.  Nous y reviendrons plus tard.



  55..44..  CCoonnffiigguurreerr uunnee iinntteerrffaaccee rréésseeaauu.. NNooyyaauuxx 22..00 eett 22..22

  Lorsque vous avez tous les programmes requis, votre adresse et les
  informations réseau, vous pouvez alors configurer vos interfaces.
  Lorsque nous parlons de la configuration d'interface, nous faisons
  allusion au processus d'assignation des adresses du périphérique
  réseau, et au processus de réglage des paramètres 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 réseau `255.255.255.0'.  Le `_u_p' qui
  termine la commande enjoint à l'interface de devenir active, mais il
  peut être omis, étant par défaut. Pour clore une interface, vous
  faites juste ``ifconfig eth0 down''.

  Le noyau suppose certaines valeurs par défaut lorsque l'on configure
  les interfaces. Par exemple, vous pouvez indiquer une adresse de
  réseau 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 hypothèses fondées sur le masque de réseau que vous
  avez fourni, et si vous ne l'avez pas donnée, sur la classe de
  l'adresse IP configurée.  Dans mon exemple, le noyau considérera que
  c'est un réseau de classe C et configurera une adresse réseau 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 :

     uupp active une interface (est fait par défaut).

     ddoowwnn
        désactive une interface.

     [[--]]aarrpp
        active ou désactive le protocole de résolution d'adresses sur
        cette interface.

     [[--]]aallllmmuullttii
        active ou désactive la réception de tous les paquets multicast
        matériel (Ndt : Les adresses multicast sont un genre d'adresses
        de diffusion limitées à un groupe de machine qui n'ont pas
        nécessairement besoin de se trouver sur le même sous-réseau). Le
        multicast matériel permet à des groupes d'hôtes de recevoir des
        paquets adressés vers des destinations spéciales. Ce peut être
        important si vous utilisez des applications comme la
        vidéoconférence, mais la plupart du temps on ne l'utilise pas.

     mmttuu NN
        ce paramètre permet de régler le _M_T_U (Maximum Transfert Unit)
        sur le périphérique.

     nneettmmaasskk <<aaddddrr>>
        ce paramètre permet de fixer le masque de réseau.

     iirrqq <<aaddddrr>>
        ce paramètre ne fonctionne qu'avec certains types de matériels,
        mais vous permet d'en fixer l'IRQ.

     [[--]]bbrrooaaddccaasstt [[aaddddrr]]
        permet d'activer ou de désactiver l'acceptation de datagrammes
        destinés à l'adresse de diffusion.

     ((--))ppooiinnttooppooiinntt [[aaddddrr]]
        permet de fixer l'adresse de la machine à l'extrémité d'un lien
        point-à-point comme pour _s_l_i_p ou _p_p_p.

     hhww <<ttyyppee>> <<aaddddrr>>
        permet de fixer l'adresse matérielle de certains périphériques
        réseau. Ce n'est pas souvent utilisé pour Ethernet, mais utile
        pour d'autres types de réseau tels que AX.25.
  Avec les versions 2.2 du noyau, il y a un certain nombre d'options que
  nous n'avons pas énumérées ci-dessus. Parmi les plus intéressantes,
  citons le tunneling et les options IPV6. Voici les paramètres ifconfig
  pour les noyaux 2.2.

     iinntteerrffaaccee
        Le nom de l'interface. C'est habituellement le nom d'un
        gestionnaire de périphérique suivi par un numéro d'unité, par
        exemple eth0 pour la première interface Ethernet.

     uupp Ceci provoque l'activation de l'interface. C'est implicitement
        spécifié si un adresse est affectée à l'interface.

     ddoowwnn
        Ceci provoque la désactivation de l'interface.

     [[--]]aarrpp
        Active ou désactive l'utilisation du protocole ARP sur
        l'interface considérée.

     [[--]]pprroommiisscc
        Active ou désactive le mode «promiscuous» sur l'interface. Si il
        est choisi, tous les paquets du réseau seront reçus par
        l'interface.


     [[--]]aallllmmuullttii
        Active ou désactive le mode «all-multicast».  Si il est choisi
        tous les paquets multicast du réseau seront reçus par
        l'interface.


     mmeettrriicc NN
        Ce paramètre positionne le paramètre «metric» de l'interface.


     mmttuu NN
        Ce paramètre positionne le Maximum Transfer Unit (MTU) d'une
        interface.


     ddssttaaddddrr aaddddrr
        Positionne l'adresse IP distante d'un lien point-à-point (tel
        que PPP). Ce mot-clé est maintenant obsolète; utilisez à la
        place le mot-clé pointopoint.


     nneettmmaasskk aaddddrr
        Positionne le masque de réseau IP de l'interface. Donne les
        valeurs par défaut pour les classes habituelles de masque réseau
        A, B ou C (provenant de l'adresse IP de l'interface), mais on
        peut donner n'importe quelle valeur.


     aadddd aaddddrr pprreeffiixxlleenn
        Ajoute un adresse IPv6 à l'interface.



     ddeell aaddddrr pprreeffiixxlleenn
        Enlève une adresse IPv6 de l'interface.


     ttuunnnneell aaaa..bbbb..cccc..dddd
        Crée un nouveau périphérique SIT (IPv6-in-IPv4), tunnelling vers
        une destination donnée.
     iirrqq aaddddrr
        Positionne l'interruption utilisée par ce périphérique.  Tous
        les périphériques ne sont pas capables de changer d'IRQ de
        manière dynamique.


     iioo__aaddddrr aaddddrr
        Positionne l'adresse d'entrée-sortie du périphérique.


     mmeemm__ssttaarrtt aaddddrr
        Positionne l'adresse de début de la mémoire partagée utilisée
        par le périphérique. Seuls quelques périphériques en ont besoin.


     mmeeddiiaa ttyyppee
        Positionne le port physique ou bien le type de matériel qui doit
        être utilisé par le périphérique. Tous les périphériques ne
        peuvent pas changer ce réglage, et ceux qui peuvent le faire
        diffèrent quant aux valeurs qui peuvent leur être assignées. Les
        valeurs typiques pour sont 10base2 (thin Ethernet), AUI
        (transceiver externe) et autres. La valeur spéciale auto peut
        être utilisée pour dire au gestionnaire de périphérique de
        détecter automatiquement le périphérique. Encore une fois tous
        les gestionnaires de périphérique ne peuvent faire ceci.


     [[--]]bbrrooaaddccaasstt [[aaddddrr]]
        Si une adresse est donnée en argument, positionne l'adresse de
        protocole de diffusion de l'interface. Autrement, positionne (ou
        efface) le drapeau IFF_BROADCAST de l'interface.


     [[--]]ppooiinnttooppooiinntt [[aaddddrr]]
        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
        donnée comme argument, positionne l'adresse protocole à l'autre
        extrémité du lien, tout comme le faisait la commande dstaddr,
        devenue obsolète. Autrement, positionne ou efface le drapeau
        IFF_POINTTOPOINT de l'interface.


     hhww ccllaassss aaddddrreessss
        Positionne l'adresse matérielle de l'interface, si le
        gestionnaire de périphérique supporte cela. Le mot-clé doit être
        suivi par le nom de la classe matérielle et l'équivalent ASCII
        de l'adresse matérielle. Les classes matérielles actuellement
        supportées sont ether (Ethernet), ax25 5AMPR AX.25), ARCnet et
        netrom (AMPR NET/ROM).


     mmuullttiiccaasstt
        Positionne le drapeau multicast de l'interface. Normalement on
        n'en a pas besoin étant donné que les gestionnaires de
        périphérique positionne eux-mêmes le drapeau correctement.


     aaddddrreessss
        L'adresse IP que l'on doit assigner à l'interface.


     ttxxqquueeuueelleenn lleennggtthh
        Positionne la longueur de la file de transmission du
        périphérique.  Il est préférable de la mettre à une valeure
        faible pour les périphériques les plus lents ayant une latence
        (liens modem, ISDN) pour empêcher 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 réseau. Quelques programmes utilisateurs comme _p_p_p_d
        et _d_i_p configurent automatiquement les périphériques en même
        temps qu'ils les créent, dès lors l'utilisation manuelle de
        _i_f_c_o_n_f_i_g n'est pas nécessaire.


  55..55..  CCoonnffiigguurreerr vvoottrree ssoollvveeuurr ddee nnoommss

  Le `_S_o_l_v_e_u_r _d_e _N_o_m_s' (Name Resolver) fait partie de la bibliothèque
  standard de Linux. Sa première fonction est de convertir des noms
  d'hôtes compréhensibles par l'homme, comme `ftp.funet.fi' , en
  adresses IP compréhensibles par une machine, comme 128.214.248.6.


  55..55..11..  QQuu''yy aa--tt--iill ddaannss uunn nnoomm ??

  Vous êtes probablement familiers avec l'aspect des noms d'hôtes
  Internet, mais vous ne savez pas comment ils sont composés ou
  décomposés. Les noms de domaine Internet sont hiérarchisés 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
  spécifiés dans la RFC-920. Quelques exemples :


     CCOOMM
        Organisations Commerciales

     EEDDUU
        Organisations ayant rapport avec l'Éducation

     GGOOVV
        Organisations Gouvernementales (NdT: parfois GOUV en France !)

     MMIILL
        Organisations Militaires

     OORRGG
        Autres organisations

     NNEETT
        Organisations ayant un rapport avec l'internet

     NNoomm ddee PPaayyss
        il existe des codes de deux lettres qui représentent un pays
        donné.


  Pour des raisons historiques la plupart des domaines appartenant à des
  domaines qui ne sont pas basés sur des noms de pays sont pour les
  organisations situées 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 utilisés par des sociétés hors des États-
  Unis.



  Chacun de ces domaines de premier niveau possède des sous-domaines.
  Les domaines de premier niveau fondés sur les noms de pays sont
  divisés ensuite en sous-domaines basés 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 situées en
  Australie ; notez que ce n'est pas une règle absolue, car les
  politiques réelles dépendant de l'autorité qui donne les noms pour
  chaque domaine.

  Le niveau de division suivant représente habituellement le nom de
  l'organisation. Ces sous-domaines sont variables, souvent ils sont
  fondés sur la structure en départements de l'organisation mais ils
  peuvent l'être également sur d'autres critères considérés comme
  rationnels et compréhensibles par les administrateurs réseau de
  l'organisation.

  La partie tout à fait à gauche du nom est toujours le nom unique
  assigné à la machine hôte et est appelée le nom d'hôte `_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 complètement 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'hôte 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 société 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 plutôt plus courts ; par exemple, mon
  fournisseur d'accès à l'internet est ``systemy.it'' et mon
  organisation à but non lucratif est ``linux.it'', sans sous-domaine
  com ou org, aussi mon propre hôte est simplement appelé
  ``morgana.systemy.it'' et rubini@linux.it est une adresse électronique
  valide. Notez que le propriétaire d'un domaine a le droit
  d'enregistrer les noms d'hôtes 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 propriétaires de linux.it
  étaient d'accord pour créer un sous-domaine pour ce groupe.



  55..55..22..  LLeess iinnffoorrmmaattiioonnss nnéécceessssaaiirreess

  Vous devez connaître le domaine auquel votre nom d'hôte 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 connaître 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.



  55..55..33..  //eettcc//rreessoollvv..ccoonnff

  Le fichier /etc/resolv.conf est le fichier principal de configuration
  de la résolution de noms. Son format est très simple.  C'est un
  fichier texte avec un mot-clé par ligne. Il y a trois mots-clés
  typiquement utilisés, qui sont :

     ddoommaaiinn
        ce mot-clé indique le nom de domaine local.


     sseeaarrcchh
        ce mot-clé spécifie une liste d'autres noms de domaine pour
        rechercher un nom d'hôte.

     nnaammeesseerrvveerr
        ce mot-clé, qui peut être utilisé plusieurs fois, spécifie
        l'adresse IP d'un serveur de nom de domaine pour la résolution
        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 spécifie que le nom de domaine par défaut à ajouter aux
  noms non qualifiés (c'est-à-dire sans domaine) est maths.wu.edu.au, et
  que si l'hôte n'est pas trouvé dans ce domaine on peut aussi essayer
  le domaine wu.edu.au directement. Deux entrées de serveurs de noms
  sont fournies, chacune d'elles pouvant être appelée par le solveur de
  noms.



  55..55..44..  //eettcc//hhoossttss

  Le fichier /etc/hosts est l'endroit où vous mettez les noms et les
  adresses IP des hôtes locaux. Si vous mettez un hôte dans ce fichier,
  alors vous n'avez pas à interroger le serveur de nom de domaine pour
  obtenir son adresse IP. L'inconvénient est que vous devez tenir votre
  fichier à jour si l'adresse de cet hôte a changé.  Dans un système
  bien administré les seuls noms d'hôtes qui apparaissent habituellement
  sont l'interface loopback, et le nom des hôtes locaux.



       # /etc/hosts
       127.0.0.1      localhost loopback
       192.168.0.1    ma.belle.machine




  Vous pouvez spécifier plus d'un nom d'hôte, comme montré dans la
  première entrée (qui est standard pour l'interface loopback).



  55..55..55..  FFaaiirree ttoouurrnneerr uunn sseerrvveeuurr ddee nnoommss

  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).



  55..66..  CCoonnffiigguurreerr vvoottrree iinntteerrffaaccee llooooppbbaacckk

  L'interface `loopback' est un type spécial d'interface qui permet de
  vous connecter à vous-même. Il y a plusieurs raisons pour faire cela,
  par exemple si vous voulez faire des essais de logiciel réseau sans
  interférer avec quelqu'un d'autre sur votre réseau. Par convention,
  l'adresse IP `127.0.0.1' lui a été assignée. Aussi quelle que soit la
  machine où vous êtes, si vous ouvrez une connexion telnet vers
  127.0.0.1 vous atteindrez toujours l'hôte local.

  Configurer l'interface loopback est simple et vous devez vous assurer
  de l'avoir fait (mais notez que cette tâche est habituellement
  effectuée 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.


  55..77..  RRoouuttaaggee

  Le routage est un vaste sujet. On peut écrire de grandes quantités de
  textes sur ce sujet. La plupart d'entre vous ont besoin d'un simple
  routage, et certains même de rien du tout.  Je ne parlerai que des
  principes du routage. Si vous voulez plus d'informations je vous
  suggère de vous reporter aux références fournies en début du document.

  Commençons par une définition. Qu'est-ce que le routage IP ?  Voici
  celle que j'utilise :


       Le routage IP est le processus par lequel un hôte, ayant des
       connexions réseau multiples, décide du chemin par lequel
       délivrer les datagrammes IP qu'il a reçus.


  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 reçoit
  un datagramme de l'une de ses connexions, le routage est le mécanisme
  utilisé pour déterminer vers quelle interface il doit renvoyer ce
  datagramme. De simples hôtes ont besoin aussi de routage, tous les
  hôtes Internet ayant deux périphériques réseau, l'un étant l'interface
  loopback décrite auparavant et l'autre est celui qui est utilisé pour
  parler avec le reste du monde, soit un lien Ethernet, soit une
  interface série PPP ou SLIP.

  Ok, alors comment fonctionne le routage ? Chaque hôte possède une
  liste spéciale de règles de routage, appelée une table de routage.
  Cette table contient des colonnes qui contiennent au moins trois
  champs, le premier étant une adresse de destination, le deuxième étant
  le nom de l'interface vers lequel le datagramme doit être routé et le
  troisième, qui est optionnel, l'adresse IP d'une autre machine qui
  transportera le datagramme vers sa prochaine destination sur le réseau
  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 plutôt simple : un datagramme entrant est
  reçu, l'adresse de destination est examinée et comparée avec chaque
  entrée de la table. L'entrée qui correspond le mieux à cette adresse
  est choisie, et le datagramme est renvoyé vers l'interface spécifiée.
  Si le champ passerelle est rempli, alors le datagramme est renvoyé
  vers cet hôte via l'interface spécifiée, sinon l'adresse de
  destination est supposée comme étant sur le réseau supporté par
  l'interface.

  Pour manipuler ce tableau, une commande spéciale est utilisée.  Cette
  commande prend des arguments et les convertit en appels système pour
  demander au noyau d'ajouter, supprimer ou modifier des entrées dans la
  table de routage. Cette commande s'appelle `_r_o_u_t_e'.

  Un exemple simple. Imaginez que vous ayez un réseau Ethernet. On vous
  a dit que c'est un réseau 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 première é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 entrée dans la table de
  routage pour indiquer au noyau que les datagrammes destinés aux hôtes
  dont les adresses correspondent à 192.168.1.* doivent être dirigés
  vers le périphérique 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 entrée est une route réseau.  Un autre choix peut être
  `-host' qui est une route spécifique d'une adresse IP.

  Cette route vous permettra d'établir des connexions IP avec tous les
  hôtes sur votre segment Ethernet. Mais qu'en est-il des hôtes IP qui
  n'y sont pas ?

  Il serait compliqué d'ajouter des routes pour chaque réseau
  destinataire, aussi il y a une astuce utilisée pour simplifier la
  tâche.  L'astuce est appelée route par `default'. La route par default
  s'adapte à toutes les destinations possibles, mais pas très bien, de
  telle sorte que si il y a une entrée qui correspond à l'adresse
  requise elle sera utilisée à la place de la route par default. L'idée
  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
  entrée 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
  entrée seront dirigés pour  routage ultérieur.

  Ainsi votre configuration complète 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 réseau vous en
  trouverez au moins un très semblable à celui-ci. C'est une configura­
  tion courante.

  Examinons maintenant une configuration un peu plus compliquée.
  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 décrit
  ci-dessus, seul le routeur aura besoin d'indiquer les routes réseau
  séparément car pour les stations de travail le mécanisme de routage
  par defaut les capturera toutes, laissant au routeur le soin de les
  séparer de manière appropriée. Vous pouvez vous demander pourquoi la
  route par défaut n'utilise pas `gw'.  La raison en est très simple :
  les protocoles de lien série comme PPP et SLIP ont seulement deux
  hôtes sur leur réseau, un à chaque bout. Spécifier à l'hôte 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 réseau. Les autres types
  comme Ethernet, arcnet ou token ring ont besoin que l'on indique une
  passerelle car ces réseaux supportent un grand nombre d'hôtes.



  55..77..11..  AAlloorrss,, qquuee ffaaiitt llee pprrooggrraammmmee rroouutteedd  ??

  La configuration de routage décrite ci-dessus est bien adaptée aux
  réseaux simples où il n'y a que des chemins uniques entre les
  destinations. Lorsque vous avez un réseau plus complexe les choses
  deviennent plus compliquées.  Heureusement pour la plupart d'entre
  vous, ce ne sera pas le cas.

  Le gros problème est qu'avec le `routage manuel' ou `routage statique'
  comme décrit ci-dessus, si une machine ou un lien tombe en panne dans
  le réseau, alors la seule façon de diriger vos datagrammes vers un
  autre chemin, s'il existe, est d'intervenir manuellement et d'exécuter
  les commandes adéquates. Naturellement c'est lourd, lent, peu pratique
  et source de risques. Des techniques variées ont été développées pour
  régler automatiquement les tables de routage dans le cas d'incidents
  sur un réseau où il y a plusieurs routes possibles, toutes ces
  techniques étant regroupées 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 très souvent utilisé sur les petits ou moyens
  réseaux d'entreprise. L'OPSF est plus moderne et plus apte à gérer de
  grands réseaux et mieux adapté dans le cas où il y a un grand nombre
  de chemins possibles à travers le réseau.  Les implémentations
  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'
  décrit 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 réseau IP de classe C (masque de réseau 255.255.255.0).
  Chaque routeur a également une liaison PPP vers chacun des autres rou­
  teurs. Ce réseau 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 défaillante, alors l'entrée de routage
  montre que les hôtes sur le segment A ne peuvent pas atteindre les
  hôtes sur le segment B car leurs datagrammes seront dirigés sur le
  lien ppp0 du routeur A qui est rompu.  Ils pourront encore continuer à
  parler aux hôtes du segment C, et les hôtes 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
  problèmes que les protocoles de routage dynamique comme RIP sont en
  mesure de résoudre.  Si chacun des routeurs A, B et C utilisent un
  démon de routage (NdT: démon est une francisation familière du vocable
  informatique anglais daemon, qui signifie Disk And Extension MONitor,
  c'est à dire qui n'est pas invoqué manuellement mais attend en tâche
  de fond que quelque chose se passe, que quelque condition se produise.
  Ce terme fut introduit au départ sous CTSS (Compatible Time Sharing
  System), un ancêtre du système MULTICS, lui-même parent d'UNIX (voir
  la traduction de René Cougnenc de `Le système Linux' de M. Welsh et L.
  Kaufman chez O'Reilly International Thomson), alors leurs tables de
  routage seront automatiquement réglées pour refléter le nouvel état du
  réseau même si l'une des liaisons est défectueuse. Configurer un tel
  réseau 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 démon de routage `_r_o_u_t_e_d' trouve automatiquement tous les ports
  actifs vers le réseau quand il démarre et écoute tous les messages sur
  chacun des périphériques réseau ce qui lui permet de déterminer et de
  mettre à jour sa table de routage.

  C'était une très brève explication du routage dynamique et de son
  utilisation. Si vous voulez d'avantage d'explications reportez-vous
  aux références listées en début de document.


  Les points importants relatifs au routage dynamique sont :

  1. Vous n'avez besoin d'utiliser un démon de routage dynamique que
     quand votre machine Linux peut choisir entre plusieurs routes pour
     une destination donnée. C'est la cas par exemple lorsque vous
     envisagez d'utiliser IP masquerade.

  2. Le démon de routage dynamique modifiera automatiquement votre table
     de routage pour tenir compte des changements survenus dans votre
     réseau.

  3. RIP est adapté aux réseaux de petite et moyenne taille.




  55..88..  CCoonnffiigguurreerr vvooss sseerrvveeuurrss rréésseeaauu eett lleess sseerrvviicceess..

  Les serveurs de réseau 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
  réseau.  Les ports réseau permettent de demander un service
  particulier à un hôte particulier  et de faire la différence entre une
  connexion telnet entrante et une connexion ftp entrante. L'utilisateur
  distant établit une connexion réseau avec votre machine puis le
  programme serveur, ou démon de réseau, à l'écoute du port, accepte la
  connexion et s'exécute. Il y a deux façons d'opérer pour les démons de
  réseau.  Les deux sont couramment utilisés en pratique. Ce sont :

     aauuttoonnoommee
        le programme démon écoute le port réseau désigné et lorsqu'il y
        a une connexion, il prend lui-même la connexion en charge pour
        fournir le service.

     eessccllaavvee dduu sseerrvveeuurr _i_n_e_t_d
        le serveur _i_n_e_t_d est un programme démon spécial spécialisé dans
        la conduite des connexions réseau. Il possède un fichier de
        configuration qui indique quel programme doit être utilisé
        lorsqu'une connexion entrante est reçue. Chacun des ports
        service doit être configuré soit avec le protocole tcp, soit
        avec le protocole udp.  Les ports sont décrits dans un autre
        fichier dont nous parlerons plus tard.

  Il existe deux fichiers importants qui doivent être configurés :
  /etc/services qui assigne des noms aux numéros de port et
  /etc/inetd.conf qui sert pour la configuration du démon de réseau
  _i_n_e_t_d .



  55..88..11..  //eettcc//sseerrvviicceess

  Le fichier /etc/services est une simple base de données qui associe
  des noms compréhensibles par l'homme à des ports service
  compréhensibles par la machine. Son format est tout à fait simple. Le
  fichier est un fichier texte dont chaque ligne représente une entrée
  de la base de données. Chaque entrée comprend trois champs séparés par
  des caractères espace ou tabulation. Ces champs sont :

  nom      port/protocole        alias     # commentaire



     nnoomm
        un simple mot qui représente le service décrit.

     ppoorrtt//pprroottooccoollee
        ce champ est divisé en deux.

     ppoorrtt
        un nombre qui spécifie le numéro de port où le service désigné
        sera disponible. La plupart des services ont des numéros
        assignés. Ils sont décrits dans la RFC-1340.

     pprroottooccoollee
        c'est soit tcp soit udp.  Il est important de noter qu'une
        entrée comme 18/tcp est très différente de 18/udp et qu'il n'y a
        pas de raisons techniques que le même service existe sur les
        deux. Normalement le bon sens prévaut et c'est vraiment pour un
        service particulier disponible  à la fois sur tcp et udp que
        vous verrez une entrée pour les deux..

     aalliiaass
        autre nom qui peut être utilisé pour  désigner ce service.

  Tout texte apparaissant après le caractère `#' est ignoré et traité
  comme commentaire.



  55..88..11..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//sseerrvviicceess ..

  Toutes les distributions récentes de Linux fournissent un bon fichier
  /etc/services.  Juste au cas où vous construiriez tout depuis le
  départ, 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 numéro
  # de port à la fois pour TCP et UDP; ainsi, la plupart des ports ont deux
  # entrées même si le protocole ne supporte pas UDP.
  # Mis à jour d'après 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 spécifiques à 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'après ``Assigned Numbers'' :
  #
  #> Les Ports Enregistrés ne sont pas contrôlés par l'IANA et peuvent être
  #> utilisés sur la plupart des systèmes par des processus ordinaires
  #> ou des programmes exécutés par des utilisateurs ordinaires.
  #
  #> Les ports sont utilisés dans le TCP [45,106] pour nommer les extrémités
  #> des connexions logiques qui transportent les conversations de longue
  #> durée. Pour offrir des services à des utilisateurs non connus, un port
  #> de service pour contact a été défini. Cette liste spécifie le port utilisé
  #> par le processus serveur ainsi que son port de contact. Comme l'IANA ne peut
  #> contrôler l'usage de ces ports, on donne ici une liste d'utilisation
  #> de ces ports pour être agréable à 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 entrées 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 nécessaires (pour NetBSD)
  #
  supfilesrv      871/tcp                 # SUP server
  supfiledbg      1127/tcp                # SUP debugging
  #
  # Services protocole de délivrance 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 réalité, le fichier augmente toujours en taille au fur et à
  mesure que de nouveaux services apparaissent. Si vous craignez que
  votre copie soit incomplète, je vous suggère de copier un nouveau
  fichier /etc/services provenant d'une distribution récente.



  55..88..22..  //eettcc//iinneettdd..ccoonnff

  Le fichier /etc/inetd.conf est le fichier de configuration du serveur
  démon _i_n_e_t_d . Il sert à dire à _i_n_e_t_d ce qu'il doit faire lorsqu'il
  reçoit 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
  démon serveur de réseau doit tourner, et comment.

  Son format est aussi très simple. C'est un fichier texte dont chaque
  ligne décrit un service que vous voulez fournir. Tout texte suivant un
  `#' est ignoré et considéré comme commentaire. Chaque ligne contient
  sept champs séparés par un nombre quelconque d'espaces (espace ou
  tabulation). Le format général est comme suit :


       service  type_de_socket  protocole  drapeaux  utilisateur  chemin  arguments





     sseerrvviiccee
        est le nom de service applicable à cette configuration, pris
        dans le fichier /etc/services.

     ttyyppee__ddee__ssoocckkeett
        ce champ décrit le type de socket que cette entrée considère
        comme pertinent. Voici les valeurs qui sont autorisées : stream,
        dgram, raw, rdm, ou seqpacket.  C'est un peu technique par
        nature, mais par expérience, presque tous les services basés sur
        tcp utilisent  stream et presque tous les services basés sur udp
        utilisent dgram.  Il n'y a que quelques types de serveurs démons
        spéciaux utilisant d'autres valeurs.

     pprroottooccoollee
        le protocole considéré comme valide pour cette entrée. Il doit
        correspondre à l'entrée appropriée dans le fichier /etc/services
        et sera donc soit tcp soit udp.  Les serveurs basés sur Sun RPC
        (Remote Procedure Call) utilisent rpc/tcp ou rpc/udp.

     ddrraappeeaauuxx
        il n'y a en fait que deux valeurs pour ce champ. Celles-ci
        disent à _i_n_e_t_d si le programme serveur réseau libère le socket
        aprés démarrage, 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 démon serveur tournant déjà prenne en charge la
        nouvelle demande de connexion.  C'est encore compliqué, mais en
        pratique tous les serveurs tcp doivent avoir cette entrée
        positionnée sur nowait et la plupart des serveurs udp ont cette
        entrée positionnée sur wait.  Attention il y a quelques
        exceptions notables, laissez vous guider par l'exemple suivant
        si vous n'êtes pas sûrs.

     uuttiilliissaatteeuurr
        ce champ décrit quel compte utilisateur extrait de /etc/passwd
        sera considéré comme propriétaire du démon réseau lorsqu'il est
        lancé.  C'est très utile lorsque vous voulez vous protéger
        contre les trous de sécurité. Vous pouvez mettre nobody comme
        utilisateur pour une entrée si bien que dans le cas où le réseau
        comporte une brèche, les dommages éventuels seront minimisés.
        Cependant habituellement ce champ est réglé sur root, car de
        nombreux serveurs ont besoin des privilèges de root pour tourner
        correctement.

     cchheemmiinn__ddee__sseerrvveeuurr
        ce champ est le véritable chemin d'accès au programme.

     aarrgguummeennttss
        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.



  55..88..22..11..  EExxeemmppllee ddee ffiicchhiieerr //eettcc//iinneettdd..ccoonnff

  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 données 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'implémentation
  # habituelle du démon `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 démarrer. 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 corrigés)
  #
  #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 corrigés)
  #
  #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






  55..99..  AAuuttrreess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn aayyaanntt uunn rraappppoorrtt aavveecc llee rréésseeaauu

  Il y a de nombreux fichiers relatifs à la configuration réseau sous
  Linux et qui sont susceptibles de vous intéresser. Vous n'aurez jamais
  à modifier ces fichiers, mais il est utile de les décrire pour que
  vous sachiez ce qu'ils contiennent et quelle est leur utilité.



  55..99..11..  //eettcc//pprroottooccoollss

  Le fichier /etc/protocols est une base de données qui donne la
  relation des numéros id de protocole avec leurs noms.  Il est utilisé
  par les programmeurs pour leur permettre de spécifier 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 générale de ce fichier est :


       nom du protocole     numéro    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'après: @(#)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






  55..99..22..  //eettcc//nneettwwoorrkkss

  Le fichier /etc/networks a une fonction similaire au fichier
  /etc/hosts. Il fournit une simple base de données de noms de réseau
  avec des adresses. Son format diffère en ce qu'il n'y a que deux
  champs par ligne, et que ces champs sont codés comme ceci :



        Nom du réseau   adresse de réseau




  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 réseau, et que ce réseau a une entrée dans le fichier /etc/networks
  la commande affichera alors le nom du réseau en lieu et place de son
  adresse.
  55..1100..  SSééccuurriittéé rréésseeaauu eett ccoonnttrrôôllee dd''aaccccèèss

  Laissez-moi commencer ce paragraphe en vous avertissant que la
  sécurisation de votre machine et du réseau contre les attaques
  pernicieuses est un art complexe. Je ne me considère pas du tout comme
  un expert dans ce domaine et bien que les mécanismes que je vais
  décrire puissent vous aider, si vous êtes préoccupés par la sécurité,
  alors je vous recommande d'effectuer vous-même des recherches sur le
  sujet. Il existe un grand nombre d'excellentes références sur
  l'Internet qui traitent du sujet, y compris le Security-HOWTO

  Une importante règle pratique est : `NN''uuttiilliisseezz ppaass ddee sseerrvveeuurrss ddoonntt
  vvoouuss nn''aavveezz ppaass bbeessooiinn'.  Un grand nombre de distributions sont
  livrées avec tout un tas de services déjà configurés et démarrant
  automatiquement. Pour assurer quand même un minimum de sécurité 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 entrée 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 sécurité et de mécanismes de contrôle
  d'accès ; je vais décrire les plus élémentaires.



  55..1100..11..  //eettcc//ffttppuusseerrss

  Le fichier /etc/ftpusers est un mécanisme simple qui vous permet
  d'interdire l'accès de votre machine à certains utilisateurs de ftp.
  Il est lu par le programme démon (_f_t_p_d) lorsqu'une connexion ftp est
  reçue. 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






  55..1100..22..  //eettcc//sseeccuurreettttyy

  Le fichier /etc/securetty vous permet de spécifier sur quels fichiers
  de périphériques 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 périphériques tty
  autorisés (sur tous les autres root ne peut se connecter) :


       # /etc/securetty - consoles où root peut se connecter
       tty1
       tty2
       tty3
       tty4







  55..1100..33..  LLee mmééccaanniissmmee ddee ccoonnttrrôôllee dd''aaccccèèss ddeess hhôôtteess ttccppdd ..

  Le programme _t_c_p_d que vous avez vu dans le fichier /etc/inetd.conf
  fournit les mécanismes de contrôle d'accès et de connexion aux
  services qu'il a pour but de protéger.

  Lorsqu'il est invoqué par le programme _i_n_e_t_d, il lit deux fichiers
  contenant les règles d'accès et il autorise ou interdit l'accès au
  serveur qu'il protège.

  Il cherche dans ces deux fichiers jusqu'à ce qu'il trouve une
  correspondance. S'il n'en trouve pas il suppose que l'accès est
  autorisé. Il recherche dans l'ordre suivant : /etc/hosts.allow,
  /etc/hosts.deny. Je décrirai chacun d'eux plus tard. Pour une
  description complète référez-vous aux pages de manuel appropriées
  (hosts_access(5) est un bon point de départ).



  55..1100..33..11..  //eettcc//hhoossttss..aallllooww

  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 hôtes dont l'accès 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 très simple :


       # /etc/hosts.allow
       #
       # <liste des services>: <liste des hôtes> [: commande]





     liste des services
        c'est une liste de serveurs, séparés par des virgules, auxquels
        les règles d'accès s'appliquent.  Exemples de serveur : ftpd,
        telnetd, et fingerd.

     liste des hôtes
        c'est une liste de noms d'hôtes, séparés par des virgules (vous
        pouvez utiliser également des adresses IP).  Vous pouvez en plus
        spécifier des noms d'hôtes ou des adresses IP avec des jokers
        pour obtenir des groupes d'hôtes.  Des exemples :
        gw.vk2ktj.ampr.org pour un hôte spécifique, .uts.edu.au pour
        tous les hôtes se terminant par cette chaîne , 44. pour toutes
        les adresses IP commençant par ces chiffres.  Il y a quelques
        expressions pour simplifier la configuration, parmi lesquelles :
        ALL pour tous les hôtes, LOCAL pour tout hôte dont le nom ne
        contient pas de `.' c'est à dire appartenant au même domaine que
        votre machine, et PARANOID pour tout hôte 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 paramètre optionnel. Ce paramètre est le nom complet
        d'une commande (avec son répertoire) qui sera exécutée chaque
        fois qu'il y aura correspondance.  Ce peut être par exemple une
        commande qui essaiera d'identifier qui se connecte, ou de
        générer un message par courrier ou tout message d'alerte pour
        l'administrateur système avertissant que quelqu'un est en train
        de se connecter.  On peut y inclure des extensions, par exemple
        : %h donnera le nom de l'hôte qui se connecte ou bien son
        adresse s'il n'a pas de nom , %d le programme démon appelé.

  Un exemple :


       # /etc/hosts.allow
       #
       # Permet à tout le monde d'utiliser le courrier
       in.smtpd: ALL
       # telnet et ftp pour les hôtes 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)






  55..1100..33..22..  //eettcc//hhoossttss..ddeennyy

  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 hôtes qui _n_'_o_n_t _p_a_s
  _l_'_a_u_t_o_r_i_s_a_t_i_o_n  d'accéder à 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'entrée PARANOID est en fait redondante car l'autre entrée interdit
  tous les cas.  L'une ou l'autre entrée devrait convenir, en fonction
  de vos besoins particuliers.

  Mettre ALL: ALL par défaut dans le fichier /etc/hosts.deny puis
  autoriser certains services, en liaison avec les hôtes que vous avez
  choisis, dans le fichier /etc/hosts.allow, est la configuration la
  plus sûre.



  55..1100..44..  //eettcc//hhoossttss..eeqquuiivv

  Le fichier hosts.equiv est utilisé pour concéder à certains hôtes des
  droits d'accès leur permettant d'avoir un compte sur votre machine
  sans fournir de mot de passe. Cela est utile dans un environnement
  sécurisé où vous contrôlez toutes les machines, sinon ce peut être
  très risqué. Votre machine est aussi sûre que le moins sûr de vos
  hôtes de confiance. Pour augmenter la sécurité, n'utilisez pas cette
  possiblité et encouragez vos utilisateurs à ne pas utiliser le fichier
  .rhosts.



  55..1100..55..  CCoonnffiigguurreerr vvoottrree ddéémmoonn ffttpp  ccoorrrreecctteemmeenntt

  Un grand nombre de sites sont intéressés à avoir un serveur _f_t_p
  anonyme pour permettre aux autres de transférer et de récupérer des
  fichiers sans avoir besoin d'une identification spéciale.  Si vous
  décidez d'offrir ce service soyez certains de configurer votre démon
  _f_t_p de manière adéquate pour les accès anonymes. La plupart des pages
  de manuel dédiées à ftpd(8) décrivent tous les détails pour y arriver.
  Vous devez toujours vous assurer que vous avez bien suivi les
  instructions.  Un règle importante est de ne pas utiliser une copie de
  votre fichier /etc/passwd dans le répertoire /etc du compte anonyme.
  Soyez sûrs d'avoir éliminé tous les détails des comptes exceptés ceux
  qui sont nécessaires, autrement vous serez vulnérables vis à vis de
  ceux qui maîtrisent les techniques de mise en pièces des mots de
  passe.



  55..1100..66..  PPaarree--ffeeuu ((FFiirreewwaallll)) ssuurr llee rréésseeaauu

  Ne pas permettre aux datagrammes d'atteindre votre machine ou les
  serveurs est un excellent moyen de sécurisation. Ceci est abordé en
  profondeur dans le Firewall-HOWTO et (de manière plus concise) plus
  loin dans ce document.



  55..1100..77..  AAuuttrreess ssuuggggeessttiioonnss

  Voici d'autres suggestions, potentiellement religieuses, à prendre en
  considération :

     sseennddmmaaiill
        en dépit de sa popularité, le démon _s_e_n_d_m_a_i_l apparaît avec une
        effrayante régularité dans les mises en garde concernant la
        sécurité. Faites comme vous voulez, mais j'ai choisi de ne pas
        l'utiliser.

     NNFFSS eett aauuttrreess sseerrvviicceess SSuunn RRPPCC
        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.




  66..  IInnffoorrmmaattiioonnss ssuurr EEtthheerrnneett

  Cette section traite d'informations spécifiques sur Ethernet et la
  configuration des cartes Ethernet.


  66..11..  CCaarrtteess EEtthheerrnneett ssuuppppoorrttééeess


  66..11..11..  33CCoomm


  ·  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 ??)

  66..11..22..  AAMMDD,, AATTTT,, AAlllliieedd TTeelleessiiss,, AAnnsseell,, AApprriiccoott


  ·  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

  66..11..33..  CCaabblleettrroonn,, CCooggeenntt,, CCrryyssttaall LLaann


  ·  Cabletron E21xx

  ·  Cogent EM110

  ·  Crystal Lan CS8920, Cs8900

  66..11..44..  DDaannppeexx,, DDEECC,, DDiiggii,, DDLLiinnkk


  ·  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

  66..11..55..  FFuujjiittssuu,, HHPP,, IICCLL,, IInntteell


  ·  Fujitsu FMV-181/182/183/184

  ·  HP PCLAN (séries 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

  66..11..66..  KKTTII,, MMaaccrroommaattee,, NNCCRR NNEE22000000//11000000,, NNeettggeeaarr,, NNeeww MMeeddiiaa


  ·  KTI ET16/P-D2, ET16/P-DC ISA (fonctionne sans cavaliers et avec des
     options de configuration matérielles)

  ·  Macromate MN-220P (PnP or NE2000 mode)

  ·  NCR WaveLAN

  ·  NE2000/NE1000 (attention aux clônes)

  ·  Netgear FA-310TX (puce Tulip)

  ·  New Media Ethernet

  66..11..77..  PPuurreeDDaattaa,, SSEEEEQQ,, SSMMCC


  ·  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)

  66..11..88..  SSuunn LLaannccee,, SSuunn IInntteell,, SScchhnneeiiddeerr,, WWDD,, ZZeenniitthh,, IIBBMM,, EEnnyyxx


  ·  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 intégré Zenith Z-Note / IBM ThinkPad 300

  ·  Ensemble Znyx 312 (gestionnaire Tulip)



  66..22..  IInnffoorrmmaattiioonnss ggéénnéérraalleess ssuurr EEtthheerrnneett

  Les noms de périphériques Ethernet sont `eth0', `eth1', `eth2' etc. La
  première carte détectée par le noyau devient `eth0' et le reste est
  nommé dans l'ordre de détection.

  Une fois que vous avez compilé convenablement votre noyau pour
  supporter les cartes Ethernet, la configuration des cartes est aisée.
  Typiquement vous faites ainsi (ce que la plupart des distributions
  font automatiquement pour vous, si vous les avez configurées 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 développés par Donald
  Becker, Donald Becker



  66..33..  UUttiilliisseerr pplluussiieeuurrss ccaarrtteess EEtthheerrnneett ssuurr llaa mmêêmmee mmaacchhiinnee


  66..33..11..  SSii llee ggeessttiioonnnnaaiirree eesstt ssoouuss ffoorrmmee ddee mmoodduullee ((hhaabbiittuueelllleemmeenntt
  aavveecc lleess nnoouuvveelllleess ddiissttrriibbuuttiioonnss))

  Le module pourra normalement détecter toutes les cartes installées.

  Les informations concernant la détection sont stockées dans le fichier
  :

  _/_e_t_c_/_c_o_n_f_._m_o_d_u_l_e_s_.


  Supposons qu'un utilisateur possède 3 cartes NE2000, une à l'adresse
  0x300, l'autre à 0x240, et la dernière à 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 spécifiées. De plus cela donne l'ordre dans lequel on doit
  les trouver et quel périphérique leur est assigné.

  La plupart des modules ISA acceptent des valeurs d'E/S séparées 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 même module.

  L'option irq= sert à spécifier l'IRQ matériel et l'option io= à
  spécifier les différents ports entrée-sortie.



  Par défaut, le noyau Linux ne peut détecter qu'un seul dispositif
  Ethernet, et vous devez passer des commandes pour forcer la détection
  des autres cartes.

  Pour apprendre à faire fonctionner vos cartes ethernet sous Linux,
  voyez le Ethernet-HOWTO.

  77..  IInnffoorrmmaattiioonnss rreellaattiivveess àà ll''IIPP

  Cette section traite d'informations spécifiques à l'IP.

  77..11..  DDHHCCPP eett DDHHCCPPDD

  DHCP est l'acronyme de «Dynamic Host Configuration Protocol»
  (Protocole de configuration dynamique d'un hôte). La création de DHCP
  a rendu la configuration du réseau avec plusieurs hôtes extrêmement
  simple.  Au lieu de configurer chaque hôte séparément vous pouvez
  assigner tous les paramètres communs à l'ensemble des hôtes utilisant
  un serveur DHCP.


  Chaque fois qu'un hôte démarre il diffuse un paquet sur le réseau. Ce
  paquet est un appel vers tous les serveurs DHCP situés sur le même
  segment pour configurer l'hôte.

  DHCP est extrêmement utile pour assigner des choses comme l'adresse
  IP, le masque de réseau et la passerelle de chaque hôte.


  77..22..  RRééggllaaggee dd''uunn cclliieenntt DDHHCCPP ppoouurr lleess uuttiilliissaatteeuurrss ddee LLiinnuuxxCCoonnff

  Sous linux,  démarrez 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





  77..33..  RRééggllaaggee dd''uunn sseerrvveeuurr DDHHCCPP ssoouuss LLiinnuuxx

  RRééccuuppéérreezz DDHHCCPPDD ss''iill nn''eesstt ppaass ddééjjàà iinnssttaalllléé ssuurr vvoottrree mmaacchhiinnee..
  Télécharger 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-
  réseau local (ici, 192.5.5.223). Il en résulte une violation du
  protocole DHCP, et alors que de nombreux clients DHCP ne s'aperçoive
  pas de ce problème, d'autres (par ex, tous les clients DHCP Microsoft)
  le font.  Les clients ayant ce problème apparaîtront 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 réessayez :

  route add -host dhcp dev eth0


  77..33..11..  OOppttiioonnss ddee DDHHCCPPDD

  Maintenant vous devez configurer DHCPd. Pour cela vous devez créer ou
  éditer le fichier /etc/dhcpd.conf. Il existe une interface graphique
  pour la configuration de dhcpd sous linuxconf. On configure et règle
  ainsi DHCPD très facilement.

  Si vous voulez le configurer à la main, suivez les instructions qui
  suivent.  Je suggère 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 manière aléatoire.
  Ci-dessous un exemple de fichier de configuration montrant le type de
  réglage.















  # 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 allouée pendant 1200 secondes si le client ne
  demande pas plus. Autrement l'allocation maximum permise sera 9200
  secondes. Le serveur envoie les paramètres suivants au client :


  Utilisez 255.255.255.0 comme masque de sous-réseau
  Utilisez 192.168.1.255 comme adresse de diffusion
  Utilisez 192.168.1.254 comme passerelle par défaut
  Utilisez 192.168.1.1 et 192.168.1.2 comme serveurs DNS.



  Si vous spécifiez un serveur WINS pour vos clients Windows, vous devez
  insérer l'option suivante dans le fichier dhcpd.conf.

  option netbios-name-servers 192.168.1.1;

  Vous pouvez aussi assigner des adresses IP spécifiques basées sur une
  adresse ethernet MMAACC, 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 MMAACC de 08:00:2b:4c:59:23.


  77..33..22..  DDéémmaarrrraaggee dduu sseerrvveeuurr

  Dans la plupart des cas, l'installation de DHCP ne crée pas le fichier
  dhcpd.leases. Dès lors, avant de démarrer le serveur, vous devez créer
  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 démarrer le serveur DHCP, tapez simplement (ou bien insérez-le
  dans les scripts de démarrage)

   _/_u_s_r_/_s_b_i_n_/_d_h_c_p_d

  Cela démarre dhcpd sur le dispositif eth0. Si vous devez le démarrer
  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 démarrer
  dhcpd en mode débogage. 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

  DDéémmaarrrreezz uunn cclliieenntt et jetez un coup d'oeil sur la console du serveur.
  Vous verrez apparaître un grand nombre de messages de débogage.

  _C_'_e_s_t _f_i_n_i





  77..44..  EEQQLL -- ééggaalliisseeuurr ddee cchhaarrggee àà lliiggnneess mmuullttiipplleess

  Le nom du périphérique EQL est `eql'. Avec les sources standards du
  noyau vous ne pouvez avoir qu'un seul périphérique 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
  débit que d'avoir une ligne à haut débit.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Network device support --->
           [*] Network device support
           <*> EQL (serial line load balancing) support




  Pour supporter ce mécanisme la machine à l'autre bout de la ligne doit
  également supporter EQL.  Linux, Livingstone Portmasters et de
  nouveaux serveurs de ligne supportent des systèmes compatibles.

  Pour configurer EQL vous avez besoin des outils eql, disponibles sur :
  metalab.unc.edu.

  La configuration est plutôt directe. Vous commencez par configurer
  l'interface eql. C'est exactement comme un autre périphérique réseau.
  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 périphériques
  réseau point à point. La façon d'initialiser les connexions dépend du
  type de lien, voyez les paragraphes appropriés pour d'autres
  informations.

  Enfin vous devez associer le lien série et le dispositif EQL, cela
  s'appelle `asservissement' (enslaving) et est réalisé 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 paramètre `_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
  déterminer comment les datagrammes vont se répartir sur ce
  périphérique, aussi vous pouvez régler l'équilibrage des lignes en
  jouant avec cette valeur.

  Pour libérer une ligne d'un périphérique 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
  plutôt qu'aux périphériques séries eux-mêmes. Ainsi vous devriez
  utiliser :


       root# route add default eql




  Le gestionnaire EQL fut développé par Simon Janes, simon@ncm.com.



  77..55..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..00))

  Les possibilités d'enregistrement IP du noyau Linux vous permettent de
  recueillir et d'analyser les données d'utilisation du réseau.  Les
  données collectées comprennent le nombre de paquets et le nombre
  d'octets en cumul depuis la dernière remise à zéro.  Vous avez à votre
  disposition une grande variété de réglages pour obtenir les données
  que vous désirez. Cette option a été enlevée du 2.1.102, car l'ancien
  dispositif pare-feu basé sur ipfwadm a été remplacé par
  ``ipfwchains''.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] IP: accounting





  Après 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
  différentes possibilités pour choisir les informations à enregistrer.
  J'ai pris un exemple simplifié qui pourrait vous être utile; lisez
  plutôt la page de manuel _i_p_f_w_a_d_m pour plus d'informations.

  Scenario : Vous avez un réseau 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
  présente comme un script shell :



               #!/bin/sh
               #
               # Donne les réglages d'enregistrement
               ipfwadm -A -f
               #
               # Met en place les raccourcis
               localnet=44.136.8.96/29
               any=0/0
               # Ajoute des réglages 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
               #
               # Réglages par défaut
               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 réglages
               ipfwadm -A -l -n
               #






  Les noms ``ftp-data'' et ``www'' se réfèrent aux lignes du fichier
  /etc/services.  La dernière commande liste chacune des règles
  d'enregistrement et affiche le total.

  Il est important de noter, lorsque l'on analyse les enregistrement IP,
  que lleess ttoottaauuxx ssoonntt iinnccrréémmeennttééss àà cchhaaqquuee ffooiiss, donc pour connaitre les
  différences vous devez exécuter les opérations mathématiques
  nécessaires.  Par exemple si je veux savoir combien de données 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            * -> *
  #






  77..55..11..  EEnnrreeggiissttrreemmeenntt IIPP ((IIPP AAccccoouunnttiinngg)) ((ppoouurr LLiinnuuxx--22..22))

  On accède au nouveau code d'enregistrement par des ``chaînes IP pare-
  feu''.  Voir La page d'accueil des chaînes 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'après Documentations/Changes
  dans les sources du dernier noyau).




  77..66..  IIPP AAlliiaassiinngg

  Il y a des applications où être en mesure d'affecter plusieurs
  adresses IP à un seul périphérique réseau pourrait être utile.
  Certains fournisseurs d'accès à l'Internet utilise souvent cette
  possibilité pour fournir des offres www et ftp `à la carte' pour leurs
  clients. Vous pouvez vous référer au mini-HOWTO IP-Aliasing pour plus
  d'informations.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           ....
           [*] Network aliasing
           ....
           <*> IP: aliasing support




  Après avoir compilé et installé le noyau avec le support IP_Alias, la
  configuration est très simple. Les alias sont ajoutés aux
  périphériques réseau virtuels  associés au périphérique réseau réel.
  Une simple convention de noms s'applique pour périphériques : <nom de
  périphérique> : <numéro de périphérique virtuel>, par ex. eth0:0,
  ppp0:10 etc. Notez que le gestionnaire de périphérique ifname:number
  ne peut être configuré _q_u_'_a_p_r_è_s le réglage de l'interface principale.

  Par exemple, supposons que vous ayez un réseau Ethernet avec
  simultanément deux sous-réseaux IP et que vous vouliez que votre
  machine ait un accès 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 associées avec cet alias seront enlevées automa­
  tiquement.


  77..77..  IIPP PPaarree--ffeeuu ((FFiirreewwaallll)) ((ppoouurr LLiinnuuxx--22..00))

  Le pare-feu IP et les publications le concernant sont traités de
  manière plus approfondie dans le Firewall-HOWTO. Le pare-feu IP vous
  permet de sécuriser votre machine contre les accès réseau non-
  autorisés en filtrant, ou acceptant, des datagrammes venant de, ou
  allant vers, des adresses IP de votre choix.  Il y a différentes
  règles : le filtrage en entrée, le filtrage en sortie, et le filtrage
  en retransmission. Les règles en entrée s'appliquent aux datagrammes
  qui sont reçus par un dispositif réseau. Les règles en sortie
  s'appliquent aux datagrammes qui sont émis par un dispositif réseau.
  Les règles en retransmission s'appliquent aux datagrammes qui ne sont
  pas pour cette machine, c'est à dire les datagrammes qui seront
  reroutés.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           [*] Network firewalls
           ....
           [*] IP: forwarding/gatewaying
           ....
           [*] IP: firewalling
           [ ] IP: firewall packet logging




  La configuration du pare-feu IP est réalisée en utilisant la commande
  _i_p_f_w_a_d_m.  Comme mentionné plus haut, la sécurité n'est pas ma
  spécialité, aussi, bien que je vous présente un exemple utilisable par
  vous-même, faites des recherches et mettez au point vos propres
  règlages si la sécurité 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 protéger votre réseau local contre les
  accès extérieurs non autorisés.

  La configuration suivante est due à Arnt Gulbrandsen,
  <agulbra@troll.no>.

  L'exemple décrit une configuration de pare-feu pour une machine Linux
  /pare-feu/routeur illustrée 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 placées dans un
  fichier rc de telle sorte qu'elles seront démarrées automatiquement à
  chaque redémarrage du système. Pour une sécurité maximum, elles
  devront être effectuées après la configuration des interfaces réseau,
  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 règles de 'Forwarding'
          # Change le réglage par défaut 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, dévérouille 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 rejetés sont enregistrés. 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 réseau 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 "réponses" 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 réponses aux autres ports utilisateurs sont autorisées
          #
          /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'hôte
          # entrant de ne pas persévérer, sinon nous devrons attendre que
          # identd s'arrête.
          #
          /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 réseaux
          # 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'intérieur
          #
          /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 départ 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'extérieur pour tester votre configuration et en vérifier la
  fiabilité.



  77..77..11..  PPaarree--ffeeuu IIPP ((ppoouurr LLiinnuuxx--22..22))

  On accède au nouveau code d'enregistrement par des ``chaînes pare-feu
  IP''.  Voir La page d'accueil des chaînes 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'après 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 espérer une en 1999.




  77..88..  EEnnccaappssuullaattiioonn IIPPIIPP

  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.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] TCP/IP Networking
           [*] IP: forwarding/gatewaying
           ....
           <*> IP tunelling




  Les périphériques IP tunnel s'appellent `tunl0', `tunl1', etc..

  "Mais pourquoi ?" D'accord. D'accord. Les règles de routage classiques
  spécifient qu'un réseau IP comprend une adresse IP et un masque de
  réseau. Ceci fournit un ensemble d'adresses contiguës qui peuvent
  toutes être routées par l'intermédiaire d'une seule entrée de routage.
  Cela marche, mais signifie que vous ne pouvez utiliser une seule
  adresse uniquement lorsque vous êtes connecté à un point du réseau
  auquelle elle appartient.  Dans la plupart des cas, il n'y a pas de
  problèmes, mais si vous êtes en mouvement alors vous ne pouvez pas
  rester connecté au même endroit tout le temps. L'encapsulation  IP/IP
  ( IP tunneling) vous permet de passer outre cette contrainte en
  permettant aux paquets destinés à votre adresse d'être enveloppés et
  redirigés vers une autre adresse. Si vous savez que vous allez opérer
  depuis un autre réseau IP pour quelques temps, vous pouvez régler une
  machine qui est chez vous pour accepter des paquets destinés à votre
  adresse IP et les rediriger vers l'adresse que vous allez utiliser
  provisoirement.



  77..88..11..  UUnnee ccoonnffiigguurraattiioonn ddee rréésseeaauu aavveecc ttuunnnneelliinngg..




        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 réseau privé virtuel. Cet exemple présuppose
  que vous ayez deux machines chacune avec une seule connexion Internet.
  Chaque hôte a une seule adresse IP. Derrière chacune de ces machines
  se trouve des réseaux privés locaux configurés avec des adresses IP
  réservées. Supposez que vous vouliez permettre à chacun des hôtes du
  groupe A de se connecter à n'importe quel hôte du groupe B, comme
  s'ils étaient vraiment connectés à l'Internet via un routage réseau.
  L'encapsulation IPIP vous permettra de le faire. À noter que
  l'encapsulation ne vous permettra pas de faire en sorte que chacun des
  hôtes des réseaux 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 périphérique 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 périphérique 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 destinés à 192.168.1.0/24 dans un
  paquet d'encapsulation ayant pour adresses de destination
  aaa.bbb.ccc.ddd'.

  Notez que les configurations sont inversées à l'autre bout.  Le
  périphérique 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 `désencapsuler' les paquets IPIP,
  c'est à dire qu'elle doit aussi être configurée comme périphérique
  tunnel.


  77..88..22..  UUnnee ccoonnffiigguurraattiioonn dd''hhôôttee ppoouurr ll''eennccaappssuullaattiioonn IIPPIIPP..

  Ce n'est pas tout un réseau que vous aurez à router. Vous pouvez par
  exemple ne router qu'une seule adresse IP. Dans ce cas vous devrez
  configurer le périphérique tunl sur la machine `distante' avec sa
  propre adresse IP et à l'extrémité A n'utiliser qu'une route hôte
  (avec Proxy Arp) plutôt qu'une route réseau via le périphérique
  tunnel. Refaisons et modifions notre configuration de manière
  appropriée. Maintenant nous avons seulement l'hôte `B' qui veut agir
  comme si il était à la fois connecté à l'Internet et également au
  réseau distant supporté par l'hôte `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 (démarre le lien ppp link, règle la route par
               # défaut)
               pppd
               route add default ppp0
               #
               # configuration du périphérique de tunneling
               ifconfig tunl0 192.168.1.1 up
               route add -host 192.168.1.12 gw $remotegw tunl0
               #
               # Proxy ARP pour l'hôte distant
               arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub




  L'hôte 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 (démarre le lien ppp, règle la route par défaut)
          pppd
          route add default ppp0
          #
          # configuration du périphérique 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 hôte veut seulement se balader sur l'Internet et
  maintenir une adresse IP utilisable tout le temps. Référez-vous au
  paragraphe Mobile-IP pour avoir plus d'informations et savoir comment
  faire en pratique.



  77..99..  IIPP MMaassqquueerraaddee

  Un grand nombre de gens ont une simple connexion par téléphone pour
  aller sur l'Internet. Presque tout le monde ne se voit offrir qu'une
  seule adresse IP par le founisseur d'accès avec ce type de
  configuration. Ceci est normalement suffisant pour permettre un accès
  complet au réseau. IP Masquerade est une astuce intelligente qui vous
  permet d'avoir plusieurs machines utilisant une seule adresse IP, en
  faisant croire aux autres hôtes 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 hôtes masqués
  peuvent appeler mais ne peuvent accepter ou recevoir des connexions
  réseau de la part d'hôtes éloignés. Cela signifie que certains
  services réseau comme _t_a_l_k ne peuvent fonctionner et que d'autres,
  comme _f_t_p doivent être configurés pour fonctionner en mode passif
  (PASV). Heureusement la plupart des services réseau comme _t_e_l_n_e_t,
  World Wide Web et _i_r_c fonctionnent correctement.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 périphérique réseau configuré, par exemple une carte Ethernet,
  avec des adresses réseau réservée. Les hôtes masqués seront ceux du
  second réseau. Chacun de ces hôtes aura l'adresse IP du port Ethernet
  réglée comme passerelle ou routeur par défaut.
  Une configuration typique ressemble à ceci :


       -                                   -
        \                                  | 192.168.1.0
         \                                 |   /255.255.255.0
          \                 ---------      |
           |                | Linux | .1.1 |
       NET =================| masq  |------|
           |    PPP/slip    | router|      |  --------
          /                 ---------      |--| hôte |
         /                                 |  |      |
        /                                  |  --------
       -                                   -




  77..99..11..  MMaassqquueerraaddiinngg aavveecc IIPPFFWWAADDMM

  Les commandes adéquates pour cette configuration sont :


       # Routage réseau pour éthernet
       route add -net 192.168.1.0 netmask 255.255.255.0 eth0
       #
       # Route par défaut pour le reste de l'internet.
       route add default ppp0
       #
       # Fait en sorte que tous les hôtes du réseau 192.168.1/24  soient masqués.
       ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0





  77..99..22..  MMaassqquueerraaddiinngg aavveecc IIPPCCHHAAIINNSS

  Cela ressemble à l'utilisation avec IPFWADM mais la structure de la
  commande change:



                # Routage réseau pour ethernet
                route add -net 192.168.1.0 netmask 255.255.255.0 eth0
                #
                # Route par défaut vers le reste de l'internet.
                route add default ppp0
                #
                # Fait en sorte que tous les hôtes sur le réseau 192.168.1/24 soient
                # masqués.
               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 détaillé qui est le ``IP-Masquerade-mini-HOWTO'' (qui donne en
  plus des renseignements pour configurer d'autres systèmes
  d'exploitation pour fonctionner avec un serveur de masquage linux).




  77..1100..  IIPP TTrraannssppaarreenntt PPrrooxxyy

  IP transparent proxy est un procédé qui vous permet de rediriger des
  serveurs ou des services destinés à 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.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 réalisé 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 hôte, seront redirigées vers le
  port 2323 de ce même hôte. Si vous utilisez un service sur ce port,
  vous pouvez rediriger des connexions telnet, les enregistrer ou
  exécuter tout ce qui bon vous semble.

  Un exemple plus intéressant est la redirection de tout le trafic http
  au travers d'un cache local. Cependant, le protocole utlisé par les
  serveurs proxy diffère 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 insérant un petit serveur, appelé
  transproxy (vous pouvez le trouver sur la toile). Vous pouvez choisir
  de faire tourner transproxy sur le port 8081, et exécuter 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 après
  avoir corrigé les différences de protocole.

  77..1111..  IIPPvv66

  À peine pensez-vous avoir commencé à comprendre comment fonctionne le
  réseau IP, que les règles ont changé !  IPv6 est l'abbréviation de
  version 6 du `Protocole Internet' (version 6 de IP). Il fut développé
  initialement pour calmer les inquiétudes de la communauté Internet
  quant à la pénurie éventuelle d'adresses IP. Les adresses IPv6 sont
  codées sur 16 octets (128 bits). IPv6 inclut un certain nombre
  d'autres changements, la plupart du temps des simplifications, qui
  rendront les réseaux IPv6 plus facilement gérables que les réseaux
  IPv4.

  Linux a déjà une implémentation IPv6 qui marche, mais pas encore
  complètement, dans la série des noyaux 2.2.*.

  Si vous voulez essayer cette prochaine génération de technologie
  Internet, ou si vous voulez un renseignement, lisez le document
  IPv6-FAQ qui se trouve sur www.terra.net.



  77..1122..  IIPP MMoobbiillee

  Le terme "mobilité IP" décrit la possibilité qu'un hôte a de
  transférer sa connexion réseau d'un point de l'Internet vers un autre
  sans changer d'adresse IP ou sans perdre la connectivité. Normalement
  quand un hôte IP change de point de connexion, il change aussi
  d'adresse IP.  La mobilité IP résoud ce problème en allouant une
  adresse IP fixe à l'hôte qui se déplace et en utilisant une
  encapsulation IP (tunneling) avec routage automatique pour s'assurer
  que les datagrammes qui lui sont destinés seront routés vers l'adresse
  effectivement utilisée à 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.



  77..1133..  MMuullttiiccaasstt

  L'IP Multicast permet de router simultanément des datagrammes IP vers
  un certain nombre d'hôtes se trouvant sur des réseaux différents.  Ce
  mécanisme 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.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
               [*] TCP/IP networking
               ....
               [*] IP: multicasting




  Un ensemble d'outils et quelques modifications de la configuration
  réseau sont nécessaires.  Pour plus d'informations sur le support
  multicast pour Linux, voyez le Multicast-HOWTO.html





  77..1144..  MMiissee eenn ffoorrmmee dduu ttrraaffiicc -- CChhaannggeerr llaa bbaannddee ppaassssaannttee aalllloouuééee

  Le metteur en forme de trafic est un gestionnaire de périphérique qui
  crée de nouvelles interfaces; celles-ci sont limitées au point de vue
  trafic selon les réglages de l'utilisateur, et se connectent aux
  périphériques de réseau physiques pour la transmission réelle, et
  peuvent donc être utilisées comme route vers l'extérieur en vue de
  trafic réseau.


  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 contrôler que la bande passante
  du trafic sortant, car les paquets sont transmis par le metteur en
  forme si l'on se réfère aux tables de routage; ainsi, le
  fonctionnement suivant ``un routage par adresse de départ'' peut aider
  à limiter la bande passante totale d'hôtes spécifiques utilsant un
  routeur Linux.


  Linux-2.2 possède déjà 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 récent), sur ftp.systemy.it.



  88..  RRoouuttaaggee aavveecc LLiinnuuxx--22..22

  Le noyau 2.2 a accru les possibilités de routage de Linux de manière
  certaine.  Malheureusement la documentation pour exploiter ces
  nouvelles possibilités est presque impossible à trouver, même 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
  nécessaire pour comprendre tout ce qui a été dit.

  Dans les versions du noyau 2.0 et antérieures, 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 récents (2.1 et au-delà) vous avez une autre option.
  Cette option est autorisée et vous permet d'avoir plusieurs tables de
  routage.  Les nouvelles règles donnent beaucoup plus de souplesse sur
  la façon de manipuler les paquets. Vous pouvez choisir entre des
  routes basées non seulement sur l'adresse de destination, mais aussi
  l'adresse de départ, TOS, ou un périphérique de réception.


  88..11..  LLeess bbaasseess

  AAffffiicchheerr llaa ttaabbllee ddee rroouuttaaggee ::

  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 première ligne :

  220077..114499..4433..6622 ddeevv eetthh00 ssccooppee lliinnkk est la route vers l'interface

  La deuxième :

  220077..114499..4433..00//2244 ddeevv eetthh00 pprroottoo kkeerrnneell ssccooppee lliinnkk ssrrcc 220077..114499..4433..6622 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 troisième :

  ddeeffaauulltt vviiaa 220077..114499..4433..11 ddeevv eetthh00 est la route par défaut.


  88..11..11..  UUttiilliisseerr lleess iinnffoorrmmaattiioonnss

  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 embêtés, ne vous en faites pas -- c'est un texte confus. Il
  vous donne tout ce que les nouvelles tables de routage peuvent faire.


  88..22..  AAjjoouutteerr uunnee rroouuttee aavveecc lleess nnoouuvveeaauuxx oouuttiillss iipp

  Dans la section précédente, nous avons mentionné comment afficher la
  table de routage et comment comprendre les bases. Impeccable, la
  sortie ressemble de très près à 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 entrées et sorties sont presque
  les mêmes, sauf le _i_p _r_o_u_t_e _a_d_d au début de chaque ligne.

  NNoottee:: Je suis conscient que la documentation sur le routage avec les
  noyaux 2.2 fait cruellement défaut. Dans les faits, je pense que TOUT
  LE MONDE en est conscient. Si vous avez une petite expérience,
  contactez-nous s'il vous plaît à poet@linuxports.com nous aimerions
  obtenir les informations que vous avez pour l'inclure plus tard dans
  ce document.


  88..33..  UUttiilliisseerr NNAATT aavveecc llee nnooyyaauu 22..22


  Le système de traduction d'adresse réseau (NAT: Network Address
  Translation) ressemble plutôt au grand frère standardisé du système de
  masquage IP de Linux.  Il est décrit en détail dans la RFC-1631 sur
  votre archive RFC la plus proche.  NAT fournit des possibiltés que IP
  Masquerade ne sait pas faire, ce qui le rend plus apte à une
  utilsation de routeur pare-feu pour un réseau d'entreprise et des
  installations de plus grande dimension.

  Une implémentation alpha de NAT pour le noyau 2.0.29 de Linux a été
  développée par Michael.Hasenstein, Michael.Hasenstein@informatik.tu-
  chemnitz.de.  La documentation et l'implémentation de Michael se
  trouve sur : Linux IP Network Address Web Page L'empilement TCP/IP du
  noyau 2.2, qui a été grandement amélioré, inclut les fonctionnalités
  de NAT. Ce système semble rendre obsolète le travail de Michael
  Hasenstein (Michael@informatik.tu-chemnitz.de).


  Pour le rendre opérationnel vous devez activer dans le noyau
  CONFIG_IP_ADVANCED_ROUTER, CONFIG_IP_MULTIPLE_TABLES (pour le système
  de routage) et CONFIG_IP_ROUTE_NAT (pour un NAT rapide). De plus, si
  vous voulez utiliser un réglage plus fin de NAT, vous devez activer le
  pare-feu (CONFIG_IP_FIREWALL) et CONFIG_IP_ROUTE_FWMARK.  Pour faire
  fonctionner effectivement ces possibilités incluses dans le noyau,
  vous aurez besoin du programme «ip» de Alexey Kuznyetsov récupéré 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 extérieur) aura son champ d'adresse
  converti en "int-addr" (l'adresse de votre réseau interne, derrière
  votre passerelle ou pare-feu). Le paquet est alors routé suivant la
  table de routage locale. Vous pouvez traduire soit une adresse hôte
  unique, soit des blocs complets.  EExxeemmpplleess::




               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 première commande rend l'adresse interne 192.168.0.2 accessible en
  tant que 195.113.148.34. Le second exemple montre une réallocation du
  bloc 192.168.0.0-31 en 195.113.148.32-63.



  99..  UUttiilliissaattiioonn dduu mmaattéérriieell ccoouurraanntt ppoouurr PPCC





  99..11..  RRNNIISS

  Le Réseau Numérique à Intégration de Service (RNIS) (en anglais ISDN:
  Integrated Services Digital Network) est une série de normes donnant
  les spécifications d'un réseau de données numériques à usage général.
  Un `appel' RNIS crée un service synchrone de données point à point
  vers la destination. RNIS est généralement délivré sur une ligne à
  haut débit divisée en un certain nombre de canaux discrets.  Il y a
  deux types de canaux, les `canaux B' qui transportent effectivement
  les données utilisateurs, et un canal unique appelé `canal D' qui est
  utilisé pour envoyer les informations de contrôle 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
  divisée en 30 canaux B discrets de 64 kps et un canal D de 64 kps.
  N'importe quel nombre de canaux peuvent être utilisés en même temps et
  ceci dans toutes les combinaisons possibles.  Vous pouvez par exemple
  établir 30 appels différents de 64 kps vers 30 destinations
  différentes, ou bien 15 appels de 128 kps chacun vers 15 destinations
  différentes (2 canaux utilisés 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 sociétés de Télécommunications de fournir un seul
  service de données pouvant délivrer soit le téléphone (avec une voix
  numérisée) ou bien des services de données vers votre domicile ou
  votre bureau sans avoir à effectuer de changements pour obtenir une
  configuration spéciale.

  Il y a plusieurs façons 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 réseau que votre
  opérateur de télécommunications a installé au moment de l'obtention de
  votre service RNIS, et qui présente des interfaces séries.  L'une de
  ces interfaces est utilisée pour entrer les commandes pour établir les
  appels et la configuration, et les autres sont reliées aux
  périphériques réseau qui utiliseront les circuits de données 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 périphérique série.
  Une autre façon, 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-même.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       ISDN subsystem  --->
               <*> ISDN support
               [ ] Support synchronous PPP
               [ ] Support audio via ISDN
               < > ICN 2B and 4B support
               < > PCBIT-D support
               < > Teles/NICCY1016PC/Creatix support

  L'implémentation Linux de RNIS supporte différents types de cartes
  internes RNIS.  Il y a celles énumérées 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
     téléchargés pour les rendre opérationnelles. Il y a un utilitaire
     séparé pour le faire.

  Tous les détails pour configurer le support RNIS Linux se trouvent
  dans le répertoire /usr/src/linux/Documentation/isdn/ et un document
  FAQ dédié à _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).

  NNoottee aauu ssuujjeett ddee PPPPPP. L'ensemble des protocoles PPP peut travailler
  sur des lignes série synchrone ou asynchrone. Le démon PPP `_p_p_p_d'
  couramment distribué pour Linux ne supporte que le mode asynchrone. Si
  vous désirez utiliser les protocoles PPP avec votre service RNIS vous
  aurez besoin d'une version spéciale. Les détails pour la trouver se
  trouvent dans la documentation mentionnée ci-dessus.



  99..22..  PPLLIIPP ppoouurr LLiinnuuxx--22..00

  Les noms de périphériques PLIP sont `plip0', `plip1', `plip2'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PLIP (parallel port) support





  _P_L_I_P (Parallel Line IP) est, comme SLIP, utilisé pour fournir une
  connexion réseau _p_o_i_n_t _à _p_o_i_n_t entre deux machines, sauf qu'il est
  conçu pour utiliser les ports parallèles de votre machine au lieu des
  ports séries. Parce qu'il est possible de transmettre plus d'un bit en
  même temps avec un port parallèle, il est possible d'atteindre de plus
  hautes vitesses avec l'interface _P_L_I_P qu'avec une sortie série
  standard (un schéma de câblage est donné plus loin dans ce document).
  De plus, même le plus simple des ports parallèles, le port imprimante,
  peut être utilisé, au lieu d'acheter un UART 16550AFN relativement
  cher pour vos ports séries. PLIP utilise beaucoup de CPU en
  comparaison d'une liaison série et ce n'est sûrement pas un bon choix
  si vous avez la possibilité d'avoir des cartes éthernet pas chères,
  mais ça fonctionne lorsque rien d'autre n'est disponible, et ça
  fonctionne très bien.

  Les gestionnaires PLIP entrent en compétition avec les autres
  gestionnaires du matériel branché sur le port parallèle. 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 série des noyaux 2.0.* les gestionnaires de périphérique PLIP
  sont affectés 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 parallèles ne correspondent pas aux combinaisons
  précédentes alors vous pouvez changer les IRQ en utilisant la commande
  _i_f_c_o_n_f_i_g avec le paramètre `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 à spécifier 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 contrôlé par deux temporisations de
  dépassement de temps, dont les valeurs par défaut devraient convenir
  la plupart du temps. Vous devrez peut-être les augmenter si vous avez
  un ordinateur particulièrement lent, auquel cas les valeurs devant
  être augmentées se trouvent sur l'aauuttrree ordinateur. Il existe un
  programme appelé _p_l_i_p_c_o_n_f_i_g qui permet d'effectuer ces réglages 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 utilisées sur le câble
  PLIP. Je les mets personnellement dans la base de données /etc/host :





   # entrées plip
   192.168.3.1 localplip
   192.168.3.2 remoteplip





  Le paramètre _p_o_i_n_t_o_p_o_i_n_t a la même signification que pour  SLIP,
  c'est-à-dire qu'il spécifie 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 utilisés.

  Plus d'information sur PLIP peut être obtenu avec le document ``PLIP-
  mini-HOWTO''.



  99..22..11..  PPLLIIPP ppoouurr LLiinnuuxx--22..22

  Durant le développement des versions 2.1 du noyau, le support
  concernant les ports parallèles s'est amélioré.


  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 mêmes commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e comme dans le paragraphe
  précédent), mais l'initialisation du système est différente en raison
  du support port parallèle amélioré.


  Le ``premier'' périphérique PLIP est toujours appelé ``plip0'',
  premier signifiant celui qui est détecté en premier par le système,
  comme pour les périphériques Ethernet. Le port parallèle 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 parallèle,
  vous n'aurez qu'un seul répertoire appelé /proc/parport/0.


  Si votre noyau ne détecte pas l'IRQ utilisée par votre port parallèle,
  ``insmod plip'' échouera ; dans ce cas, vous écrivez juste le chiffre
  adéquat dans /proc/parport/0/irq et vous invoquez de nouveau _i_n_s_m_o_d.


  Une information complète sur la gestion des ports parallèles est
  disponible dans le fichier Documentation/parport.txt, qui se trouve
  dans les sources du noyau.





  99..33..  PPPPPP

  Un grand nombre de personnes ont des problèmes avec Linux et PPP, en
  raison de l'augmentation du nombre de technologies d'authentification,
  et il est devenu plus difficile de gérer les liens PPP. Bien que
  l'information qui suive soit détaillée, elle est peut-être exagérée si
  vous ne voulez que régler une simple connexion. La majorité des
  fournisseurs d'accès 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 à gérer 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 agréable. LinuxConf fonctionne avec la plupart
  des distributions et il est distribué avec RedHat. COAS est distribué
  avec Caldera et SUSE possède un programme appelé YAST. Je n'ai aucune
  expérience avec YAST, si quelqu'un pouvait m'envoyer une machine
  (grossière allusion) je chargerai SUSE avec le document YAST.

  Les noms de périphériques PPP sont `ppp0', `ppp1', etc.  Les noms sont
  attribués séquentiellement, le premier périphérique étant `0'.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           <*> PPP (point-to-point) support




  La configuration de PPP est discutée en détail dans le PPP-HOWTO. Ce
  document est vraiment vieux et j'essayerai d'avoir plus d'informations
  à partir du manuel d'installation de PPP dès que je peux.


  99..33..11..  MMaaiinntteennaannccee dd''uunnee ccoonnnneexxiioonn ppeerrmmaanneennttee aavveecc llee rréésseeaauu àà ll''aaiiddee
  ddee ppppppdd

  Si vous êtes suffisamment fortunés pour avoir une connexion semi-
  permanente avec le net et que vous vouliez que votre machine refasse
  la connexion PPP en cas de déconnexion, alors voici une astuce simple.

  Configurer PPP de sorte qu'il soit démarré par l'utilisateur root en
  lançant la commande :


       # pppd




  SSooyyeezz cceerrttaaiinnss d'avoir l'option `-detach' dans le fichier
  /etc/ppp/options. Puis, insérez la ligne suivante dans votre fichier
  /etc/inittab, avec les définitions des _g_e_t_t_y :


       pd:23:respawn:/usr/sbin/pppd


  Cela permettra au programme _i_n_i_t de démarrer et de surveiller le pro­
  gramme _p_p_p_d , et de le redémarrer automatiquement s'il meurt.




  99..44..  CClliieenntt SSLLIIPP ((AAnnttiiqquuee))

  Les fichiers de périphériques SLIP sont nommés `sl0', `sl1', etc. Le
  premier configuré étant `0' et les autres s'incrémentant au fur et à
  mesure de leur configuration.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 série, ce peut être un téléphone et un modem, ou tout
  autre ligne dédiée.  Bien sûr pour utiliser SLIP vous devez avoir
  accès à un _s_e_r_v_e_u_r _S_L_I_P dans votre entourage.  De nombreuses
  universités et de sociétés fournissent des accès SLIP de par le monde.

  SLIP utilise les ports séries de votre machine pour transporter les
  datagrammes IP. Pour cela il doit prendre le contrôle du périphérique
  série. Les noms de périphériques SLIP sont _s_l_0, _s_l_1, etc. Comment
  ceux-ci correspondent avec vos périphériques série ? Le code réseau
  utilise ce que l'on nomme un appel _i_o_c_t_l (i/o control) pour
  transformer les périphériques série en périphériques SLIP. Il y a deux
  programmes qui peuvent faire cela, ce sont _d_i_p et _s_l_a_t_t_a_c_h.




  99..44..11..  ddiipp

  _d_i_p (Dialup IP) est un programme élégant capable de régler la vitesse
  du dispositif série, de demander à votre modem d'appeler l'autre
  extrémité de la ligne, de vous connecter automatiquement au serveur
  distant, de chercher des messages qui vous ont été envoyés par le
  serveur et d'en extraire des informations telles que votre adresse IP
  et de faire le _i_o_c_t_l nécessaire pour basculer votre port série en mode
  SLIP.  _d_i_p est très flexible quant à l'utilisation de scripts et grâce
  à ceci vous pouvez automatiser vos procédures 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.



  99..44..22..  ssllaattttaacchh

  _s_l_a_t_t_a_c_h au contraire de _d_i_p est un programme très simple, très 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 périphérique série en périphérique SLIP. Il suppose
  que vous avez toutes les informations nécessaires et que la liaison
  série est établie avant de l'invoquer.  _s_l_a_t_t_a_c_h est idéal quand vous
  avez une liaison permanente avec votre serveur, comme un câble
  physique ou une ligne dédiée.



  99..44..33..  QQuuaanndd uuttiilliisseerr qquuooii ??

  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 dédiée,
  peut-être un câble, entre votre machine et le serveur et qu'il n'y a
  pas d'action spéciale nécessaire pour garder la ligne en activité.
  Voir la section `Connexion SLIP permanente' pour plus de détails.


  Configurer SLIP est analogue à la configuration d'une interface
  Ethernet (voir la section `Configurer un périphérique Ethernet' ci-
  dessus).  Cependant, il existe quelques différences.


  Tout d'abord, les liens SLIP ne sont pas des réseaux Ethernet en ce
  sens qu'il n'y a que deux hôtes sur le réseau, un à chaque extrémité
  de la liaison. À la différence de l'Ethernet qui est disponible dès
  que vous êtes câblé, avec SLIP, en fonction du type de lien que vous
  avez, vous serez amené à initialiser votre connexion réseau d'une
  manière spéciale.


  Si vous utilisez _d_i_p, alors cela ne sera pas fait au moment du
  démarrage de la machine, mais plus tard, quand vous serez prêt à
  utiliser la liaison.  Il est possible d'automatiser la procédure. 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 décrit bientôt.


  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 numéro.
  _d_i_p peut prendre en charge la connexion automatiquement.



  99..44..44..  eett DDIIPP SSeerrvveeuurr SSLLIIPP ssttaattiiqquuee aavveecc uunnee lliiggnnee ttéélléépphhoonniiqquuee

  Le serveur SLIP statique est celui qui vous fournit une adresse IP qui
  reste exclusivement la vôtre. À chaque fois que vous vous connectez à
  ce serveur, vous configurez votre port SLIP avec cette adresse. Le
  serveur SLIP statique répond à votre appel par modem, vous demande
  probablement un nom d'utilisateur et un mot de passe, et ensuite
  dirige tous les datagrammes destinés à votre adresse au travers de
  cette connexion. Si vous avez un serveur statique, alors vous mettez
  des entrées pour votre nom d'hôte 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 spéciales 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 adéquates et il configure l'interface pour vous après
  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.



  99..44..55..  SSeerrvveeuurr SSLLIIPP ddyynnaammiiqquuee aavveecc uunnee lliiggnnee ttéélléépphhoonniiqquuee eett DDIIPP

  Le serveur SLIP _d_y_n_a_m_i_q_u_e vous alloue une adresse IP de manière
  aléatoire, à partir d'un groupe d'adresses, à chaque fois que vous
  vous connectez. Cela signifie qu'il n'y a aucune garantie d'avoir la
  même adresse à chaque fois, et que celle-ci peut être utilisée par
  quelqu'un d'autre après la déconnexion. L'administrateur réseau qui a
  configuré le serveur SLIP a assigné un groupe d'adresses que le
  serveur SLIP peut utiliser quand il reçoit un appel entrant. Il prend
  alors la première adresse inutilisée, guide l'appelant au travers du
  processus de connexion et envoie un message de bienvenue contenant
  l'adresse IP qu'il a allouée 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 allouée par le serveur puis configurer le périphérique SLIP avec
  celle-ci.


  Encore une fois, _d_i_p fait le sale boulot et les nouvelles versions
  sont suffisamment élégantes 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 périphérique SLIP avec.

  Si votre serveur SLIP fonctionne ainsi, alors vous pouvez aller à la
  section `Utiliser DIP' pour savoir comment configurer _d_i_p de manière
  adéquate.



  99..44..66..  UUttiilliisseerr DDIIPP

  Comme expliqué plus haut, _d_i_p est un programme puissant qui simplifie
  et automatise le processus de composition d'un numéro vers un serveur
  SLIP, se connecte dessus, démarre la connexion et configure les
  périphériques SLIP à l'aide des commandes _i_f_c_o_n_f_i_g et _r_o_u_t_e
  appropriées.


  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 réaliser chacune des actions que vous voulez qu'il fasse.
  Voyez le fichier sample.dip fourni avec _d_i_p pour avoir une idée de la
  manière 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 périphérique SLIP avec l'adresse IP
  donnée par le serveur dynamique. L'exemple suivant est une version
  modifiée 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 départ 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:
  # Après, postionner l'adresse et le nom de l'hôte distant.
  # Ma machine s'appelle 'xs4all.hacktic.nl' (== 193.78.33.42)
  get $remote xs4all.hacktic.nl
  # Positionne le masque de réseau sur sl0 à 255.255.255.0
  netmask 255.255.255.0
  # Règle le port série et la vitesse.
  port cua02
  speed 38400

  # Reset le modem et la ligne de terminal.
  # Cela semble poser problème à certains!
  reset

  # Notez! Valeurs "standards" prédéfinies de "errlevel":
  #  0 - OK
  #  1 - CONNECT
  #  2 - ERROR
  #
  # Vous pouvez les changer en faisant un grep dans *.c avec "addchat()"...

  # On se prépare pour numéroter.
  send ATQ0V1E1X4\r
  wait OK 2
  if $errlvl != 0 goto modem_trouble
  dial 555-1234567
  if $errlvl != 1 goto modem_trouble

  # Nous sommes connectés. Nous nous enregistrons sur le système.
  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 enregistrés.
  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 grâce au serveur.
  # Ici nous supposons qu'après 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

  # réglage des paramètres 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 précédent 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'extrémité de la ligne une chaîne de caractères ressemblant
  à une adresse IP, c'est à dire des ensembles de nombres séparés par
  des caractères `.'. Cette modification fut mise en place plus
  spécialement 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 crée automatiquement une route par défaut 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 défaut,
  alors enlevez la commande _d_e_f_a_u_l_t du script.  Après 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 périphérique _s_l_0. C'est votre périphérique SLIP. Si le besoin
  s'en fait sentir, vous pouvez modifier manuellement sa configuration,
  après 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 différents 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 extrémités
  de la liaison doivent être d'accord, aussi assurez-vous que ce que
  vous avez choisi est en accord avec les réglages du serveur.

  L'exemple montré ci-dessus est plutôt robuste et devrait faire face à
  la plupart des erreurs. Référez-vous à la page de manuel de _d_i_p pour
  plus d'informations.  Naturellement, vous pouvez, par exemple,
  modifier le script pour réaliser des choses comme recomposer le numéro
  vers le serveur si la connexion n'a pas été faite au bout d'un certain
  temps, ou même essayer une série de serveurs si vous avez accès à plus
  d'un d'entre eux.



  99..44..77..  CCoonnnneexxiioonn ppeerrmmaanneennttee SSLLIIPP uuttiilliissaanntt uunnee lliiggnnee eett ssllaattttaacchh

  Si vous avez deux machines reliées par un câble, ou si vous êtes
  suffisamment riche pour avoir une ligne dédiée, ou un autre type de
  connexion permanente entre votre machine et une autre, alors vous
  n'avez pas besoin de vous casser la tête avec _d_i_p pour régler votre
  liaison série.  _s_l_a_t_t_a_c_h est un utilitaire très simple à utiliser et
  vous permet d'avoir les fonctionnalités juste nécessaires 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 périphérique série à la bonne vitesse et basculer
  votre périphérique série 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 dédiée
       #
       #  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ù :

     IIPPAA..IIPPAA..IIPPAA..IIPPAA
        représente votre adresse IP.

     IIPPRR..IIPPRR..IIPPRR..IIPPRR
        représente l'adresse IP de l'hôte distant.


  _s_l_a_t_t_a_c_h alloue le premier périphérique SLIP disponible au
  périphérique série spécifié.  _s_l_a_t_t_a_c_h démarre avec _s_l_0. Par
  conséquent la première commande _s_l_a_t_t_a_c_h relie le périphérique _s_l_0 au
  périphérique spécifé, 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
  grâce à 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 extrémités doivent être d'accord sur l'utilisation de la
  compression.




  99..44..88..  SSeerrvveeuurr SSLLIIPP

  Vous avez peut-être une machine connectée au réseau et vous aimeriez
  que d'autres personnes puissent s'y connecter pour y chercher des
  services de réseau, alors vous devez configurer votre machine comme
  serveur. Si vous voulez utiliser SLIP comme protocole de ligne série,
  vous avez trois possiblités pour configurer votre machine Linux comme
  serveur SLIP. Ma préférence est la première présentée, _s_l_i_p_l_o_g_i_n, car
  elle semble la plus facile à configurer et à comprendre, mais je
  présenterai un résumé pour chacune, ainsi vous pourrez décider par
  vous-même.



  99..44..99..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt sslliippllooggiinn

  _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 même 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 forcément la même que lors de la connexion précédente).

  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 après la connexion, _s_l_i_p_l_o_g_i_n est exécuté et cherche dans son
  fichier de configuration une entrée dont le nom correspond à celui de
  l'appelant. S'il en détecte une, il configure la ligne avec 8 bits de
  données, et utilise un appel _i_o_c_t_l pour basculer celle-ci en ligne
  SLIP.  Quand ce processus est fini, la dernière é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 adéquate, ainsi que le masque de
  réseau et positionne le routage approprié. Ce script est appelé
  habituellement /etc/slip.login, mais tout comme _g_e_t_t_y, si certains
  appelants nécessitent une initialisation spéciale, alors vous pouvez
  créer des scripts de configuration appelés /etc/slip.login.loginname
  qui seront utilisés à la place du script par défaut.

  Il y a quelques fichiers que vous devez configurer pour que _s_l_i_p_l_o_g_i_n
  travaille pour vous. Je décrirai 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 spécifique 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' après
     une déconnexion volontaire ou intempestive.



  99..44..1100..  OOùù oobbtteenniirr sslliippllooggiinn

  Votre distribution contient peut-être déjà 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 précompilés
  et une page de manuel.
  Pour s'assurer que seuls les utilisateurs autorisés pourront faire
  tourner le programme _s_l_i_p_l_o_g_i_n, vous devez ajouter une entrée 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'exécuter.
  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 répertoire /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 conséquence.




  99..44..1111..  CCoonnffiigguurreerr //eettcc//ppaasssswwdd  ppoouurr uuttiilliisseerr SSLLIIPP

  Normalement vous devez créer des noms d'utilisateurs spéciaux, 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 préfixée avec la lettre capitale `S'.  Ainsi, par exemple,
  si l'appelant s'appelle radio alors vous pouvez créer une entrée dans
  le fichier /etc/passwd ressemblant à ceci :



       Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin




  Le nom du compte n'a pas réellement d'importance, du moment qu'il ait
  une signification pour vous.

  Note : l'appelant n'a pas besoin de répertoire home spécial car il
  n'utilisera pas de shell sur la machine, dès 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.

  99..44..1122..  CCoonnffiigguurreerr //eettcc//sslliipp..hhoossttss

  Le fichier /etc/slip.hosts  est le fichier où _s_l_i_p_l_o_g_i_n cherche les
  entrées correspondant au nom de connexion pour obtenir les détails de
  configuration. C'est le fichier où sont indiqués l'adresse IP et le
  masque de réseau qui seront assignés à l'appelant et configurés pour
  leur usage. Des exemples d'entrées 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 entrées 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 attribuée à l'appelant. Si le champ vaut
     DYNAMIC alors l'adresse IP sera allouée suivant les informations
     contenues dans le fichier /etc/slip.tty décrit plus loin. NNoottee ::
     vous devez utiliser au moins la version 1.3 de sliplogin pour que
     cela fonctionne.

  4. Le masque de réseau assigné à la machine appelante, en notation
     décimale, par exemple 255.255.255.0 pour un masque de réseau de
     classe C.

  5. Un réglage du mode SLIP qui active/désactive la compression. Les
     valeurs autorisées sont "normal" et "compressed".

  6. Un paramètre de délai qui spécifie combien de temps la ligne peut
     rester inactive (aucun datagramme reçu) avant une déconnexion
     automatique. Une valeur négative désactive cette possiblité.

  7. arguments optionnels.

  Note : Vous pouvez mettre soit les noms d'hôtes soit les adresses IP
  en notation décimale pointée pour les champs 2 et3.  Si vous utilisez
  les noms d'hôtes, alors ces hôtes doivent être résolubles, c'est à
  dire que votre machine est capable de déterminer une adresse IP pour
  ces noms d'hôtes, autrement le script échouera pendant l'appel. Vous
  pouvez le tester en faisant telnet vers un nom d'hôte : 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'hôte. 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 décimale pointée ; ou bien voyez du
  côté de votre configuration de solveur de noms (voir la section
  Résolution de noms).

  Les modes les plus courants de SLIP sont :

     nnoorrmmaall
        mode SLIP normal non compressé.


     ccoommpprreesssseedd
        mode avec compression van Jacobsen des en-têtes (cSLIP)

  Bien sûr 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.



  99..44..1133..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggiinn ..

  Après que _s_l_i_p_l_o_g_i_n ait exploré le fichier /etc/slip.hosts et ait
  trouvé une entrée qui convient, il essaye d'exécuter le fichier
  /etc/slip.login pour effectivement configurer l'interface SLIP avec
  son adresse IP et son masque de réseau.

  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 générique de connexion pour une ligne SLIP. Invoqué par sliplogin
       # avec les paramètres:
       #     $1       $2       $3    $4, $5, $6 ...
       # unité SLIP vitesse    pid   arguments tirés 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 périphérique SLIP avec sa propre adresse IP,
  l'adresse IP de l'hôte distant , le masque de réseau puis crée une
  route vers l'adresse distante via le périphérique SLIP. C'est-à-dire
  la même 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 hôtes
  placés sur le même segment éthernet que la machine serveur sauront
  comment atteindre l'hôte qui s'est connecté.  Le champ <hw_addr> doit
  être l'adresse matérielle de la carte Ethernet de la machine. Si votre
  machine serveur n'est pas sur un réseau Ethernet, vous pouvez ignorer
  cette ligne.



  99..44..1144..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..llooggoouutt

  Quand la connexion s'est arrêtée, assurez-vous que le périphérique
  série 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 très simple et
  est appelé avec le même 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 à zéro' l'interface qui supprimera
  la route précédemment créée.  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
  possède pas de port Ethernet.



  99..44..1155..  CCoonnffiigguurreerr llee ffiicchhiieerr //eettcc//sslliipp..ttttyy

  Si vous utilisez une allocation d'adresse ip dynamique (tous les hôtes
  configurés 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 assignées aux ports. Vous n'aurez besoin de ce
  fichier que si vous voulez que votre serveur alloue des adresses aux
  utilisateurs de manière dynamique.

  Ce fichier est un tableau qui liste les périphériques _t_t_y supportant
  les connexions SLIP entrantes et l'adresse ip qui sera assignée 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 manière 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 nécessaires pour
  éviter du gaspillage.



  99..44..1166..  SSeerrvveeuurr SSlliipp uuttiilliissaanntt ddiipp

  Tout d'abord laissez-moi dire que certaines informations ci-dessous
  proviennent des pages de manuel de _d_i_p, où la manière de faire tourner
  Linux comme serveur SLIP est brièvement décrite. 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 possède un mode de traitement des données d'entrée qui permet de
  localiser automatiquement un utilisateur entrant et qui configure la
  ligne série comme lien SLIP suivant les informations trouvées 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
  créant des comptes spéciaux où _d_i_p_l_o_g_i_n est utilisé comme shell de
  connexion.

  La première chose à faire est de créer un lien symbolique comme suit :



       # ln -sf /usr/sbin/dip /usr/sbin/diplogin




  Ensuite vous devez ajouter des entrées à la fois dans vos fichiers
  /etc/passwd et /etc/diphosts. Les entrées que vous devez y mettre sont
  formatées comme suit :

  Pour configurer Linux comme serveur SLIP avec _d_i_p, vous devez créer
  quelques comptes SLIP spéciaux pour les utilisateurs, où _d_i_p (en mode
  d'entrée) est utilisé comme shell de connexion. Une convention
  suggérée est d'avoir tous les comptes SLIP commençant avec la lettre
  `S' majuscule, par exemple `Sfredm'.

  Un exemple d'entrée dans /etc/passwd pour un utilisateur SLIP
  ressemble à ceci :



       Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
       ^^         ^^        ^^  ^^   ^^   ^^   ^^
       |          |         |   |    |    |    \__ diplogin comme shell de connexion
       |          |         |   |    |    \_______ Répertoire personnel
       |          |         |   |    \____________ Nom complet d'utilisateur
       |          |         |   \_________________ GID
       |          |         \_____________________ UID
       |          \_______________________________ Mot de passe chiffré
       \__________________________________________ Nom de connexion Slip





  Après la connexion de l'utilisateur, le programme _l_o_g_i_n (s'il trouve
  et accepte l'utilisateur) exécute 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 démarré comme _d_i_p_l_o_g_i_n
  la première 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 première
  entrée qui corresponde soit à l'utilisateur soit au périphérique _t_t_y
  où l'appel est entré et se configure lui-même de manière appropriée.
  Par un choix judicieux : soit de donner à l'utilisateur une entrée
  dans le fichier diphosts, soit de laisser à l'utilisateur la
  configuration par défaut, vous pouvez construire votre serveur de
  telle manière que vous puissiez faire cohabiter des utilisateurs ayant
  des adresses allouées statiquement ou dynamiquement.

  _d_i_p ajoutera automatiquement une entrée `Proxy-ARP' si elle est
  invoquée en mode d'entrée, aussi vous n'avez pas à vous soucier
  d'ajouter de telles entrées manuellement.


  99..44..1177..  CCoonnffiigguurreerr //eettcc//ddiipphhoossttss

  /etc/diphosts est utilisé par _d_i_p pour examiner des configurations
  préétablies concernant des hôtes éloignés. Ceux-ci peuvent être des
  hôtes se connectant sur votre machine, ou bien des machines sur
  lesquelles vous vous connectez.

  Le format général 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 numérique soit
     nominative

  4. Adresse locale : adresse IP de cette machine, soit numérique soit
     nominative.

  5. Masque de réseau : en notation décimale pointée

  6. Commentaires : vous y mettez ce que vous voulez.

  7. protocole : Slip, CSlip, etc.

  8. MTU : nombre décimal

  Un exemple d'entrée /etc/net/diphosts pour un hôte distant peut être :



       Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296




  qui spécifie 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 spécifie une liaison compatible cSLIP avec une adresse distante de
  145.71.34.1 et un MTU de 1006.

  Dès lors, tous les utilisateurs à qui vous permettez d'avoir une
  connexion avec allocation d'adresse IP statique auront une entrée dans
  /etc/diphosts. Si vous voulez que des utilisateurs qui appellent sur
  un port particulier aient leur adresse allouée dynamiquement, vous
  devez avoir une entrée pour le périphérique tty, mais pas d'entrée
  pour l'utilisateur lui-même. Vous devez vous souvenir de configurer au
  moins une entrée pour chaque périphérique tty que vos utilisateurs
  entrants utiliseront pour être sûrs qu'une configuration adéquate soit
  disponible, indépendamment 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 spécial, il devra juste basculer
  en mode SLIP chez lui et ensuite il sera connecté et configuré avec
  les paramètres contenus dans le fichier diphosts.



  99..44..1188..  SSeerrvveeuurr SSLLIIPP uuttiilliissaanntt ll''eennsseemmbbllee ddSSLLIIPP

  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
  nécessaire pour l'un des scripts.  Il serait préférable d'avoir une
  certaine expérience de _e_x_p_e_c_t pour que ce paquetage soit utile pour
  vous, mais que cela ne vous décourage pas.

  Matt a écrit une bonne procédure d'installation dans le fichier
  README, aussi je ne me fatiguerai pas à la répéter.

  Vous pouvez récupérer le paquetage _d_S_L_I_P sur son site d'origine :

  aappoolllloo..wweesstt..ooiicc..ccoomm


       /pub/linux/dillon_src/dSLIP203.tgz




  ou bien sur :

  mmeettaallaabb..uunncc..eedduu


       /pub/Linux/system/Network/serial/dSLIP203.tgz




  Lisez le fichier README et créez les entrées /etc/passwd et /etc/group
  aavvaanntt de faire make install.



  1100..  AAuuttrreess tteecchhnnoollooggiieess rréésseeaauu

  Les paragraphes suivants traitent de sujets spécifiques concernant des
  technologies liées au réseau. Les informations qui y sont contenues ne
  s'appliquent pas forcément aux autres types de technologies réseau.
  Les sujets sont traités par ordre alphabétique.





  1100..11..  AARRCCNNeett

  Les noms de fichier périphériques de ARCNet sont `arc0e', `arc1e',
  `arc2e' ... ou bien `arc0s', `arc1s', `arc2s', etc. La première carte
  détectée par le noyau devient `arc0e' ou `arc0s' et les autres sont
  nommées en suivant dans l'ordre de leur détection.  La lettre finale
  dépend de votre choix : soit un format d'encapsulation de paquets
  Ethernet, soit un format de paquets suivant RFC1051.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 référer 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 développé par Avery Pennarun,
  apenwarr@foxnet.net.



  1100..22..  AApppplleettaallkk (( AAFF__AAPPPPLLEETTAALLKK ))

  Le support Appletalk ne possède pas de noms de périphériques
  spécifiques car il utilise les périphériques réseau existants.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       Networking options  --->
           <*> Appletalk DDP




  Le support Appletalk permet à votre machine Linux de dialoguer avec
  les réseaux 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 supplémentaire est requis, il
  s'appelle _n_e_t_a_t_a_l_k. Wesley Craig netatalk@umich.edu représente une
  équipe appelée 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 implémentant 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 récupérer 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
       précisément pour changer la valeur de la variable
        DESTDIR qui définit l'endroit où les fichiers seront
       installés plus tard.
        Le répertoire par défaut, /usr/local/atalk, semble
        très raisonnable.
       user% make
       - puis, en temps que root :
       root# make install






  1100..22..11..  CCoonnffiigguurreerr llee ssuuppppoorrtt AApppplleettaallkk..

  La première chose à faire pour que tout fonctionne est de vérifier que
  les entrées adéquates sont présentes dans le fichier /etc/services.
  Ces entrées 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 à créer les fichiers de configuration
  Appletalk dans le répertoire /usr/local/atalk/etc (ou bien à l'endroit
  où vous avez installé le paquetage).

  Le premier fichier à créer est /usr/local/atalk/etc/atalkd.conf.
  Initialement ce fichier ne nécessite qu'une ligne qui indique le
  périphérique supportant le réseau sur lequel sont vos machines Apple :



       eth0




  Le programme démon Appletalk ajoutera d'autres détails quand il
  tournera.



  1100..22..22..  EExxppoorrtteerr uunn ssyyssttèèmmee ddee ffiicchhiieerrss LLiinnuuxx aavveecc AApppplleettaallkk..

  Vous pouvez exporter des systèmes de fichiers depuis votre machine
  Linux vers le réseau 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 même format et qui décrit quels systèmes de fichiers les
  utilisateurs connectés pourront recevoir avec des privilèges
  d'invités.

  Tous les détails, qui vous diront comment configurer ces fichiers et
  avec quelles options, peuvent être trouvés dans la page de manuel de
  _a_f_p_d.

  Un simple exemple :


       /tmp Scratch
       /home/ftp/pub "Public Area"




  Ce qui exportera votre système de fichiers /tmp comme volume
  AppleShare `Scratch' et votre répertoire public ftp comme volume
  AppleShare `Public Area'.  Les noms de volume ne sont pas
  obligatoires, le programme démon pouvant les choisir pour vous, mais
  ça ne coûte rien de les spécifier quand même.



  1100..22..33..  TTeesstteerr AApppplleettaallkk..

  Pour tester si le programme fonctionne correctement, allez sur une des
  machines Apple, déroulez le menu Pomme, cliquez sur AppleShare, et
  votre boîte Linux devrait apparaître.



  1100..22..44..  AAuuttrreess iinnffoorrmmaattiioonnss

  Pour en savoir plus sur la configuration de Appletalk pour Linux,
  référez 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.



  1100..33..  AATTMM

  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.



  1100..44..  AAXX2255 (( AAFF__AAXX2255 ))

  Les noms de périphériques AX.25 sont `sl0', `sl1', etc. avec les
  noyaux 2.0.* ou `ax0', `ax1', etc. avec les noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2




  Les protocoles AX25, Netrom et Rose sont couverts par le document
  AX25-HOWTO.  Ces protocoles sont utilisés par les radio-amateurs du
  monde entier pour l'expérimentation packet-radio.

  L'essentiel du travail d'implémentation de ces protocoles a été
  réalisé par Jonathon Naylor, jsn@cs.nott.ac.uk.



  1100..55..  DDEECCNNeett

  Le support pour DECNet est en cours d'élaboration. Vous devriez le
  voir apparaitre dans l'un des prochains noyaux 2.1.*.



  1100..66..  FFDDDDII ((FFiibbeerr DDiissttrriibbuutteedd DDaattaa IInntteerrffaaccee))

  Les noms de périphériques FDDI sont `fddi0', `fddi1', `fddi2' etc. La
  première carte détectée par le noyau s'appelle `fddi0' et le reste est
  nommé dans l'ordre de détection.

  Larry Stefani, lstefani@ultranet.com, a développé un gestionnaire pour
  les cartes Digital Equipment Corporation FDDI EISA et PCI.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       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 spécifier le
  nom de l'interface FDDI appropriée dans les commandes _i_f_c_o_n_f_i_g et
  _r_o_u_t_e.



  1100..77..  RReellaaiiss ddee ttrraammeess ((FFrraammee RReellaayy))

  Les noms de périphériques de `relais de trames' sont `dlci00',
  `dlci01' etc pour les systèmes d'encapsulation DLCI et  `sdla0',
  `sdla1' etc pour les FRAD(s) (Frame Relay Access Device).

  Le relais de trames est une nouvelle technologie réseau conçue pour
  s'adapter au trafic de transmission de données `par à coups' ou de
  nature intermittente.  Vous vous connectez à un réseau de ce type en
  utilisant un dispositif d'accès par relais de trames (FRAD).  Les
  supports Linux relais de trames supportent IP par-dessus celui-ci
  comme décrit dans la RFC-1490.

  OOppttiioonnss ddee ccoommppiillaattiioonn nnooyyaauu :


       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 développé 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 systèmes FRAD et DLCI après avoir reconstruit
  votre noyau, vous aurez besoin des outils de configuration. Ils sont
  disponibles sur ftp.invlogic.com.  Compiler et installer les outils
  est très 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 différente.  Après
  l'installation vous devez créer un fichier /etc/frad/router.conf Vous
  pouvez utiliser cet exemple, qui est une version modifiée de l'un des
  fichiers donné en exemple :





























  # /etc/frad/router.conf
  # C'est un modèle de configuration pour relais de trames.
  # Tout y est inclus. Les valeurs par défaut sont fondées sur le code
  # fourni avec les gestionnaires DOS de la carte Sangoma S502A.
  #
  # Une ligne avec '#' est un commentaire
  # Les blancs sont ignorés (vous pouvez utiliser des tabulations aussi).
  # Les sections [] inconnues et les entrées inconnues sont ignorées.
  #

  [Devices]
  Count=1                 # nombre de périphériques à configurer
  Dev_1=sdla0             # nom d'un périphérique
  #Dev_2=sdla1            # nom d'un périphérique

  # Ce qui est spécifie ici s'applique à tous les périphériques, 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 défaut
  # T391=10               # valeur de T391  5 - 30, 10 par défaut
  # T392=15               # valeur de T392  5 - 30, 15 par défaut
  # N391=6                # valeur de N391  1 - 255, 6 par défaut
  # N392=3                # valeur de N392  1 - 10,  3 par défaut
  # N393=4                # valeur de N393  1 - 10,  4 par défaut

  # On spécifie ici les valeurs par défaut 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 spécifiques
  #
  #

  #
  #  Sangoma S502E
  #
  [sdla0]
  Type=Sangoma            # Type de périphérique à configurer, actuellement seul
                          # SANGOMA est reconnu
  #
  # Spécifique 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 particulière
  Mem=C8                  # Adresse de fenêtre mémoire, A0-EE, dépend de la carte
  IRQ=5                   # numéro d'IRQ, pas nécessaire pour S502A
  DLCIs=1                 # Nombre de DLCI attachés à ce périphérique
  DLCI_1=16               # numéro du premier DLCI, de 16 à 991
  # DLCI_2=17
  # DLCI_3=18
  # DLCI_4=19
  # DLCI_5=20
  #
  # Ce qui est spécifie ici s'applique au périphérique seulement,
  # et remplace les valeurs par défaut
  #
  # Access=CPE            # CPE ou NODE,  CPE par défaut
  # Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
  # Clock=Internal        # Externe ou Interne, Interne par défaut
  # Baud=128              # Débit spécifié du CSU/DSU attaché
  # MTU=2048              # Taille maximum de l'unité de transfert 4096 par défaut
  # T391=10               # valeur de T391   5 - 30, 10 par défaut
  # T392=15               # valeur de T392   5 - 30, 15 par défaut
  # N391=6                # valeur de N391   1 - 255, 6 par défaut
  # N392=3                # valeur de N392   1 - 10,  3 par défaut
  # N393=4                # valeur de N393   1 - 10,  4 par défaut

  #
  # Le second periphérique est une autre carte
  #
  # [sdla1]
  # Type=FancyCard        # Type de périphérique à configurer.
  # Board=                # Type de carte Sangoma
  # Key=Value             # valeurs spécifiques pour ce type de périphérique


  #
  # Paramètres de configuration DLCI par défaut.
  # Peuvent être écrasés par des configurations spécifiques
  #
  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 définis 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 définis 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 périphériques eux-mêmes.
  C'est un tout petit peu plus compliqué que la configuration normale
  d'un périphérique réseau; vous devez vous souvenir de monter le
  périphérique FRAD avant les périphériques 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
       #






  1100..88..  IIPPXX (( AAFF__IIPPXX ))

  Le protocole IPX est la plupart du temps utilisé dans les
  environnements réseaux locaux Novell NetWare(tm).  Linux offre un
  support pour ce protocole, et peut être configuré pour agir comme
  extrémité réseau, ou comme routeur pour les environnements réseaux
  IPX.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] The IPX protocol
           [ ] Full internal IPX network




  Le protocole IPX et le NCPFS sont traités en détail dans le document
  IPX-HOWTO.




  1100..99..  NNeettRRoomm (( AAFF__NNEETTRROOMM ))

  Les noms de périphériques NetRom sont `nr0', `nr1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           [*] Amateur Radio NET/ROM




  Les protocoles AX25, Netrom et Rose sont décrits dans le document
  AX25-HOWTO.  Ces protocoles sont utilisés par les radio-amateurs dans
  le monde entier pour l'expérimentation du packet-radio.

  L'essentiel du travail d'implémentation a été fait par Jonathon
  Naylor, jsn@cs.not.ac.uk.


  1100..1100..  PPrroottooccoollee RRoossee (( AAFF__RROOSSEE ))

  Les noms de périphériques Rose sont `rs0', `rs1', etc.  .  Rose est
  disponible dans la série des noyaux 2.1.*.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       Networking options  --->
           [*] Amateur Radio AX.25 Level 2
           <*> Amateur Radio X.25 PLP (Rose)




  Les protocoles AX25, Netrom et Rose sont expliqués dans le AX25-HOWTO.
  Ces protocoles sont utilisés par les opérateurs radio-amateur du monde
  entier pour l'expérimentation du packet-radio.

  L'essentiel du travail d'implémentation de ces protocoles a été
  réalisé par Jonathon Naylor, jsn@cs.not.ac.uk.



  1100..1111..  SSuuppppoorrtt SSAAMMBBAA -- ``NNeettBBEEUUII'',, ``NNeettBBiiooss'',, ``CCIIFFSS''..

  SAMBA est une implémentation du protocole Session Management Block.
  Samba permet aux Systèmes Microsoft et autres de monter et d'utiliser
  vos disques et imprimantes.

  SAMBA et sa configuration sont décrits en détail dans le SMB-HOWTO.



  1100..1122..  SSuuppppoorrtt SSTTRRIIPP ((SSttaarrmmooddee RRaaddiioo IIPP))

  Les noms de périphériques STRIP sont `st0', `st1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :





  Network device support  --->
          [*] Network device support
          ....
          [*] Radio network interfaces
          < > STRIP (Metricom starmode radio IP)




  STRIP est un protocole conçu spécialement 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 intéressantes à lire, même si vous n'êtes pas
  directement concerné par le projet.

  Les radios Metricom se connectent sur un port série 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 réseau habituels ne supportent pas le
  gestionnaire STRIP, vous devez donc télécharger des outils
  personnalisés à partir du serveur web MosquitoNet. Pour avoir des
  détails sur les logiciels à utiliser allez voir : MosquitoNet STRIP
  Page.

  En résumé la configuration consiste à utiliser un programme _s_l_a_t_t_a_c_h
  modifié pour régler la discipline de ligne d'un périphérique série
  pour SLIP, puis à configurer le périphérique `st[0-9]' résultant 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 entrées ARP pour chacun des hôtes de
  votre sous-réseau. Cela ne devrait pas être trop contraignant.



  1100..1133..  TTookkeenn RRiinngg

  Le noms de périphériques Token ring sont `tr0', `tr1' etc. Token Ring
  est un protocole LAN standard IBM en vue d'éviter les collisions en
  fournissant un mécanisme qui n'autorise qu'une seule station du LAN à
  transmettre à un moment donné.  Un `jeton' est détenu par une station
  à un moment donné, et celle-ci est la seule autorisée à é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).

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 périphérique réseau à configurer.





  1100..1144..  XX..2255

  X.25 est un protocole de circuit basé sur la commutation de paquets
  défini par le C.C.I.T.T. (un groupe de normalisation reconnu par les
  compagnies de télécommunications dans la plupart du monde). Une
  implémentation de X.25 et LAPB est en cours dans les noyaux récents
  2.1.*.

  Jonathon Naylor jsn@cs.nott.ac.uk dirige le développement et une liste
  de diffusion a été créée 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 dernières versions des outils de configuration peuvent être
  obtenues sur le site ftp de Jonathon à ftp.cs.nott.ac.uk.



  1100..1155..  CCaarrttee WWaavveeLLaann

  Les noms de périphériques Wavelan sont `eth0', `eth1', etc.

  OOppttiioonnss ddee ccoommppiillaattiioonn dduu nnooyyaauu :


       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 même manière.

  Vous pouvez avoir des informations sur la carte Wavelan sur
  Wavelan.com.



  1111..  CCââbblleess eett ccââbbllaaggeess

  Ceux qui sont habiles du fer à souder peuvent vouloir fabriquer leurs
  propres câbles pour relier deux machines Linux. Les schémas de câblage
  suivants pourront les y aider.


  1111..11..  CCââbbllee sséérriiee NNUULLLL MMooddeemm

  Tous les câbles NULL modem ne se ressemblent pas. Une grosse partie
  d'entre eux ne font que faire croire à votre ordinateur que tous les
  signaux appropriés sont présents et échangent les données de
  transmission et de réception. C'est bien, mais cela signifie que vous
  devez utiliser le contrôle de flux logiciel (XON/XOFF) qui est moins
  efficace que le contrôle de flux matériel. Le câble suivant donne la
  meilleure transmission de signal entre les deux machines et vous
  permet d'utiliser le contrôle de flux matériel (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





  1111..22..  CCââbbllee ppoorrtt ppaarraallllèèllee ((ccââbbllee PPLLIIPP))

  Si vous avez l'intention d'utiliser le protocole PLIP entre deux
  machines alors ce câble vous conviendra indépendamment du type de port
  parallèle 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 marquées avec un astérisque `*'.

  ·  Les masses supplémentaires sont 18,19,20,21,22,23 et 24.

  ·  Si le câble que vous utilisez possède un blindage, il doit être
     connecté à une des prises DB-25 et uunnee sseeuullee.

     AAtttteennttiioonn :: uunn ccââbbllee PPLLIIPP mmaall bbrraanncchhéé ppeeuutt ddééttrruuiirree vvoottrree ccaarrttee
     ccoonnttrrôôlleeuurr. Soyez attentifs et vérifiez chaque connexion deux fois
     pour être sûr de ne pas vous créer de travail inutile ou de gros
     ennuis.  Bien que l'on puisse utiliser des câbles PLIP sur des
     longues distances, évitez-le si possible. Les spécifications du
     câble permettent d'avoir une longueur d'environ 1 mètre. Faites
     attention si vous utilisez de grandes longueurs, car les sources de
     champs magnétiques élevés comme la foudre, les lignes de puissance
     et les émetteurs radio peuvent interférer et parfois endommager
     votre carte contrôleur. Si vous voulez vraiment connecter deux de
     vos ordinateurs sur une grande distance, utilisez plutôt des cartes
     Ethernet et un câble coaxial.
  1111..33..  CCââbbllaaggee EEtthheerrnneett 1100bbaassee22 ((ccooaaxxiiaall ffiinn))

  10base2 est un standard de câblage Ethernet spécifiant l'utilisation
  d'un câble coaxial 50 ohms avec un diamètre d'environ 5 mm. Il faut se
  souvenir d'un nombre important de règles quand on relie deux machines
  avec un câblage 10base2.  La première est que vous devez utiliser des
  terminaisons àà cchhaaqquuee eexxttrréémmiittéé du câble. Un terminateur est une
  résistance de 50 ohms qui sert à s'assurer que le signal est absorbé
  et non réfléchi à l'extrémité du câble. Sans terminaison à chaque
  extrémité 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 extrémité représentent une terminaison, les `======'
  représentent une longueur de câble coaxial avec des prises BNC en bout
  et les `T' représentent un connecteur en `T'. Gardez la longueur de
  câble entre les connecteurs en `T' et les cartes Ethernet aussi courte
  que possible, l'idéal étant que ces connecteurs soient branchés
  directement sur la carte Ethernet.



  1111..44..  CCââbbllaaggee EEtthheerrnneett àà ppaaiirreess ttoorrssaaddééeess

  Si vous n'avez que deux cartes Ethernet avec paires torsadées et que
  vous voulez les relier, vous n'avez pas besoin de répartiteur.  Vous
  pouvez câbler les deux cartes directement ensemble.  Un schéma
  montrant comment faire est inclus dans le document Ethernet-HOWTO



  1122..  GGlloossssaaiirree ddeess tteerrmmeess uuttiilliissééss ddaannss ccee ddooccuummeenntt..

  Ci-dessous une liste des termes les plus importants utilisés dans ce
  document.

     AARRPP
        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
        résolution d'adresses), permettant à une machine du réseau
        d'associer une adresse IP à une adresse matérielle.

     AATTMM
        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 réseau ATM enveloppe les données en
        blocs de taille standard pour pouvoir les convoyer efficacement
        d'un point à un autre. ATM est une technologie réseau à
        commutation de paquets.

     cclliieenntt
        C'est habituellement le morceau de logiciel d'un système du côté
        où se trouve l'utilisateur.  Il y a des exceptions, par exemple,
        dans le système de fenêtres 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'extrémité d'un système qui
        utilise le service fourni par un serveur. Dans le cas de
        systèmes _d_'_é_g_a_l _à _é_g_a_l tels que _s_l_i_p ou _p_p_p le client se trouve
        à l'extrémité qui a initialisé la connexion, l'autre extrémité,
        étant considérée comme le serveur.

     ddaattaaggrraammmmee
        Un datagramme est un paquet discret de données qui contient les
        adresses, et qui est l'unité de base de transmission sur un
        réseau IP. On peut aussi l'appeler `paquet'.

     DDLLCCII
        DLCI veut dire `Data Link Connection Identifier'(identifieur de
        connexion de liaison de données), et est utilisé pour identifier
        une liaison virtuelle unique point à point via un réseau à
        relais de trames (Frame Relay). Les DLCI sont normalement
        assignés par le fournisseur de réseau à relais de trames.

     RReellaaiiss ddee ttrraammeess
        Frame Relay (Relais de trames) est une technologie réseau idéale
        lorsque l'on a un trafic de nature cahotique ou sporadique. Les
        coûts peuvent être réduits quand on a de nombreux clients
        partageant la même capacité réseau et on compte sur le fait que
        les clients utilisent le réseau à des instants diiférents.

     AAddrreessssee mmaattéérriieellllee
        C'est un nombre qui identifie de manière unique un hôte sur un
        réseau physique au niveau de la couche accès. 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.

     IISSDDNN
        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(Réseau
        Numérique à Intégration de Services=RNIS). Il fournit des moyens
        standardisés avec lesquels les compagnies de télécommunications
        peuvent délivrer soit de la voix soit des informations vers des
        clients.  Techniquement c'est un réseau de données à commutation
        de paquets.

     IISSPP
        C'est l'acronyme de `Internet Service Provider' (fournisseur
        d'accès à l'Internet=FAI). Ce sont des organisations ou des
        sociétés qui fournissent une connexion réseau à l'Internet au
        public.

     AAddrreessssee IIPP
        C'est un nombre qui identifie de manière unique un hôte TCP/IP
        sur le réseau. Cette adresse est codée sur 4 octets et se
        présente habituellement sous la forme appelée "notation décimale
        pointée", où chaque octet est sous forme décimale, avec un point
        `.' entre chaque.

     MMSSSS
        Le Maximum Segment Size (_M_S_S) (Taille Maximum de Segment) est la
        plus grande quantité de données qui peut être transmise en une
        seule fois. Si vous voulez éviter des fragmentations MSS doit
        être égal à l'en-tête MTU-IP.

     MMTTUU
        Le Maximum Transmission Unit (_M_T_U) (taille maximum de l'unité de
        transfert) est un paramètre qui détermine le plus long
        datagramme pouvant être transmis par une interface IP sans avoir
        besoin d'être fragmenté en unités plus petites.  Le MTU doit
        être plus grand que le datagramme le plus grand que vous voulez
        transmettre sans être fragmenté. Note : ceci protège de la
        fragmentation uniquement de manière locale, d'autres liens sur
        le chemin peuvent avoir un MTU plus petit et les datagrammes
        seront fragmentés à cet endroit. Les valeurs typiques sont de
        1500 octets pour une interface Ethernet, ou de 576 octets pour
        une interface SLIP.

     rroouuttee
        La _r_o_u_t_e est le chemin que les datagrammes suivent à travers le
        réseau pour atteindre leur destination.

     sseerrvveeuurr
        C'est habituellement le morceau de logiciel ou l'extrémité d'un
        système é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 systèmes _é_g_a_l _à _é_g_a_l comme _S_L_I_P ou _P_P_P le serveur
        est considéré comme étant l'extrémité de la liaison qui est
        appelée et l'extrémité appeleante est le client.

     ffeennêêttrree
        La _f_e_n_ê_t_r_e (window) est la plus grande quantité de données que
        l'extrémité réceptrice peut accepter à un certain moment.


  1133..  CCooppyyrriigghhtt..


  _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 réseau 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 publiée
  par la Free Software Foundation ; soit avec la version 2 de la
  license, soit (à votre guise) avec une version ultérieure.

  Ce document est distribué avec l'espoir qu'il sera utile, mais SANS
  AUCUNE GARANTIE ; ni même la garantie implicite de COMMERCIALISATION
  ou D'ADAPTATION DANS UN BUT PARTICULIER. Voir la GNU General Public
  License pour plus de détails.

  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.

  1144..  NNoottee dduu ttrraadduucctteeuurr

  Voir les autres HOWTO traduits en français.  Lire également le livre
  «Administration réseau sous Linux, éditions O'Reilly».  Enfin voyez le
  site www.linux-france.com où vous trouverez de très bons articles
  décrivant en détail différents points évoqués dans ce document.








  Possibilités réseau de Linux HOWTO
  Daniel López Ridruejo, ridruejo@esi.us.es
  v0.2, 10 Juillet 1998

  Le but de ce document est de donner une vue d'ensemble des possi­
  bilités réseau du Système d'Exploitation Linux et de donner des
  adresses pour de plus amples informations.
  ______________________________________________________________________

  Table des matières
























































  1. Introduction.

  2. Linux.

     2.1 Qu'est ce que Linux ?
     2.2 Qu'est ce qui fait que Linux est différent ?

  3. Protocoles réseau

     3.1 TCP/IP
     3.2 TCP/IP version 6
     3.3 IPX/SPX
     3.4 Le protocole AppleTalk
     3.5 Réseaux WAN : X.25, Frame-relay, etc...
     3.6 ISDN
     3.7 PPP, SLIP, PLIP
     3.8 Radio Amateur
     3.9 ATM

  4. Matériel réseau 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 Accès 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. Exécution d'applications à distance

     7.1 Telnet
     7.2 Commandes exécutées à distance
     7.3 X-Window
     7.4 VNC

  8. Interconnection de réseaux

     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 Répartition de charge
     8.10 EQL
     8.11 Serveur Proxy
     8.12 Connection à la demande
     8.13 Tunnelling, IP mobile et réseaux privés virtuels

  9. Administration Réseau

     9.1 Programmes d'administration réseau
     9.2 SNMP

  10. Réseaux d'entreprises sous Linux

     10.1 Haute disponibilité
     10.2 RAID
     10.3 Redondance réseau

  11. Sources d'informations

  12. Remerciements et mise en garde



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn..


  Le but de ce document est de donner une idée des possibilités réseau
  du Système 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 manière dont les choses sont implémentées. La plupart des
  nouveaux utilisateurs de Linux, particulièrement ceux qui arrivent
  d'un environnement Windows, ne savent rien des possibilités réseau de
  Linux. Ce document a donc pour but de donner une vue d'ensemble de
  toutes ces possibilités avec une petite description pour chacune et
  des adresses pour aller chercher d'autres informations. Les
  informations ont été récoltées à partir de nombreuses sources :
  HowTos, faqs, pages web de projets et ma propre expérience. Tous les
  auteurs sont cités. Sans eux, et sans leurs programmes, ce document
  n'aurait pas été possible, ni nécessaire.


  22..  LLiinnuuxx..

  22..11..  QQuu''eesstt ccee qquuee LLiinnuuxx ??

  L'auteur principal de Linux est Linus Torvalds. Depuis la première
  version, ce système a été amélioré par un nombre impressionnant de
  personnes. C'est un clone, écrit à partir de rien, du système
  d'exploitation UNIX. Le plus intéressant à propos de Linux, c'est que
  son développement se fait simultanément tout autour du monde.

  Linux est protégé par la Licence GNU (GPL). Cette licence a été écrite
  par la Free Software Foundation (FSF), elle est faite pour empêcher
  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 reçu la copie a le droit de la redistribuer
  gratuitement. Cela dit aussi que le code source doit être disponible.
  C'est très utile pour les programmeurs. N'importe qui peut modifier
  Linux et même distribuer ses modifications, tant que le code reste
  dans le même copyright.


  22..22..  QQuu''eesstt ccee qquuii ffaaiitt qquuee LLiinnuuxx eesstt ddiifffféérreenntt ??

  Pourquoi travailler sur Linux ? Linux est généralement moins cher (ou
  du moins pas plus cher) que les autres systèmes d'exploitation, et
  crée fréquemment moins de problèmes que les systèmes commerciaux. Mais
  ce qui fait que Linux est différent n'est pas le prix (après tout,
  pourquoi voudrait-on d'un système - même s'il est gratuit - s'il n'est
  pas bien ?), mais ses étonnantes capacités :


  ·  Linux est un vrai système d'exploitation multitâche 32 bits,
     suffisamment solide et puissant pour être utilisé des universités
     jusque dans les grandes entreprises.

  ·  Il fonctionne sur un nombre impressionnant de machines, depuis les
     386 bas de gamme, jusqu'aux machines massivement parallèles des
     centres de recherches.

  ·  Il y a des versions disponibles pour les architectures
     Intel/Sparc/Alpha, et un support expérimental des Power PC et des
     systèmes tels SGI, Ultra Sparc, AP1000+, Strong ARM, MIPS
     R3000/R4000...

  ·  Finalement, quand on arrive à la partie réseau, Linux est "le"
     choix; non seulement parce que la couche réseau est profondément
     intégrée dans le système, ainsi qu'à cause du nombre impressionnant
     d'applications disponibles, mais aussi grâce à sa robustesse
     lorsque le système est très chargé, chose qui ne peut être
     accomplie dans un tel projet qu'après des années de debuggage et de
     tests.


  33..  PPrroottooccoolleess rréésseeaauu


  Linux supporte beaucoup de protocoles réseau différents :


  33..11..  TTCCPP//IIPP


  Le protocole internet (IP) a été conçu à l'origine, il y a une
  vingtaine d'années, pour le département de la défense des États Unis
  (DoD), avec pour but principal de pouvoir connecter des ordinateurs de
  différentes marques. La suite de protocoles TCP/IP a permis, grâce à
  sa structure en couches, d'isoler les applications de la couche réseau
  matérielle.

  De plus, ce modèle en couches est plus tourné vers les possibilités
  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 réseau et non pas ISO.

  TCP/IP est présent dans Linux depuis ses débuts. Son implémentation
  est partie de rien. Il fait partie des implémentations les plus
  robustes, rapides et fiables et c'est d'ailleurs un facteur clé du
  succès de Linux.

  HowTo : http://sunsite.unc.edu/mdw/HOWTO/NET-3-HOWTO.html


  33..22..  TTCCPP//IIPP vveerrssiioonn 66

  IPv6, aussi connu sous le nom de IPng (IP Next Generation) est une
  mise à jour du protocole IPv4 pour régler les problèmes liés aux
  adresses. Ces problèmes incluent : manque d'adresses IP, manque de
  mécanismes pour gérer le trafic prioritaire, manque d'une couche de
  sécurité...

  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 implémentation bêta existe déjà
  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 départ d'IPv6 :
     http://playground.sun.com/pub/ipng/html/ipng-main.html


  33..33..  IIPPXX//SSPPXX

  IPX/SPX (Internet Packet Exchange/Sequenced Packet Exchange) est un
  protocole propriétaire développé par Novell et basé sur le Xerox
  Nework System (XNS). IPX/SPX était très utilisé au début des années
  1980 en tant que partie intégrante de Novell NetWare. NetWare est par
  conséquent devenu le standard des systèmes d'exploitation réseau des
  LANs de première génération. Novell a amélioré son système avec des
  applications orientées business et des utilitaires de connections.

  Linux a une implémentation très 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
     réseaux 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 achetée à Novell Corporation. Ce
  client fournit un accès 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


  33..44..  LLee pprroottooccoollee AApppplleeTTaallkk

  Appletalk est le nom de la pile réseau 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
  simultanément en tant que client et serveur. Les logiciels et le
  matériel sont inclus dans chaque ordinateur Apple.

  Linux fournit une pile réseau Appletalk complète. Netatalk, le port
  Linux d'AppleTalk, est implémenté au niveau du noyau, et provient de
  systèmes dérivés de BSD. Il inclut le support pour router l'AppleTalk,
  partager les systèmes 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.


  33..55..  RRéésseeaauuxx WWAANN :: XX..2255,, FFrraammee--rreellaayy,, eettcc......

  Certains fournissent des produits T-1, T-3, X.25 et Frame Relay pour
  Linux. Généralement un matériel spécifique est nécessaire pour ce type
  de connections. Ceux qui vendent le matériel vendent aussi les drivers
  avec support du protocole.


  ·  Ressources WAN pour Linux:
     http://www.secretagent.com/networking/wan.html




  33..66..  IISSDDNN

  Le noyau de Linux a des capacités ISDN intégrées. Isdn4linux contrôle
  les cartes ISDN des PC et peut émuler un modem avec des commandes
  Hayes (commandes "AT"). Les possibilités vont de l'utilisation d'une
  connection type terminal via HDLC (utilisant les périphériques
  inclus), jusqu'à une connection Internet complète avec les
  possibilités PPP/Sons.


  ·  FAQ pour isdn4linux: http://tsikora.tiac.net/i4l-faq/eng-i4l-
     faq.html



  33..77..  PPPPPP,, SSLLIIPP,, PPLLIIPP

  Le noyau de Linux a un support intégré pour PPP (Point-to-Point-
  Protocol), SLIP (Serial Line IP) et PLIP (Parallel Line IP). PPP est
  la manière la plus populaire pour les utilisateurs individuels de se
  connecter à leurs FAI (Fournisseurs d'Accès Internet). PLIP permet des
  connections faciles entre deux machines. Il utilise un port parallèle
  et un câble spécial, 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 complémentaires peuvent être trouvées dans The
     Network Administrator Guide
     <http://sunsite.unc.edu/mdw/LDP/nag/nag.html>


  33..88..  RRaaddiioo AAmmaatteeuurr

  Le noyau de Linux possède un support intégré pour les protocoles de
  radio amateur.

  Un point intéressant est le support AX.25. Le protocole AX.25 offre
  des possibilités d'opérations avec ou sans connections, et est même
  utilisé par lui-même 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>


  33..99..  AATTMM

  Le support ATM de Linux en est en ce moment au stade pré-alpha. C'est
  une distribution expérimentale, 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/>


  44..  MMaattéérriieell rréésseeaauu ssuuppppoorrttéé

  Linux supporte une très grande variété de matériel réseau, certains
  même obsolètes.

  Quelques documents intéressants :

  ·  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>


  55..  PPaarrttaaggee ddee ffiicchhiieerrss eett dd''iimmpprriimmaanntteess

  Le premier but de la majorité des réseaux locaux (LAN) basés 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 apparaît comme une excellente
  solution.


  55..11..  EEnnvviirroonnnneemmeenntt AAppppllee

  Comme il a été souligné dans les sections précédentes, Linux supporte
  la famille de protocoles Appletalk. Le netatalk de Linux permet à un
  client Macintosh de voir les systèmes Linux comme des autres Macintosh
  sur le réseau, de partager les fichiers, et d'utiliser les imprimantes
  connectées 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


  55..22..  EEnnvviirroonnnneemmeenntt WWiinnddoowwss

  Samba est une suite logicielle qui permet à la majorité des Unix (et
  en particulier Linux) de s'intégrer à un réseau 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'accéder aux fichiers
  et aux imprimantes de la machine Linux. Il peut remplacer complètement
  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 systèmes de fichiers exportés par d'autres machines.

  D'après la Meta-FAQ SAMBA :



       "Beaucoup d'utilisateurs ont déclaré qu'en comparaison avec d'autres implémentations 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>


  55..33..  EEnnvviirroonnnneemmeenntt NNoovveellll

  Comme il a été dit dans les sections précédentes, Linux peut être
  configuré en tant que client ou serveur NCP, et donc, permettre
  l'accès à ses fichiers et ses imprimantes à travers un réseau Novell,
  aussi bien pour les clients Novell que pour les clients Unix.


  ·  Le HowTo IPX <http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html>


  55..44..  EEnnvviirroonnnneemmeenntt UUNNIIXX

  La façon la plus simple de partager les fichiers dans un réseau UNIX
  est d'utiliser NFS. NFS signifie Network File Sharing, c'est à dire,
  partage de fichiers en réseau; son protocole a été développé à
  l'origine par la société Sun Microsystems. C'est un moyen simple de
  partager des fichiers entre les machines comme s'ils étaient locaux.
  Un client "monte" un système de fichier "exporté" par un serveur NFS.
  Le système de fichier monté apparaîtra au client comme s'il faisait
  partie du système de fichier local.

  Il est possible de monter un système de fichier racine au démarrage,
  permettant ainsi à des clients sans disque de démarrer et d'accéder à
  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


  66..  IInntteerrnneett//IInnttrraanneett

  Linux est une très bonne plate-forme pour agir en tant que serveur
  Internet / Intranet. Le terme Intranet se réfère à 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 détaillés dans les sections suivantes.


  66..11..  MMaaiill


  66..11..11..  SSeerrvveeuurrss ddee MMaaiill

  Sendmail est de facto, le serveur de mail standard pour les plate-
  formes UNIX. Il est robuste, extensible, et proprement configuré avec
  le matériel nécessaire, 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


  66..11..22..  AAccccèèss ddiissttaanntt aauuxx mmaaiillss

  Dans une entreprise ou chez un FAI, les utilisateurs accéderont à 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 généralement utilisé pour transférer les messages du
  serveur au client. IMAP permet la manipulation des messages sur le
  serveur, création et suppression à distance de répertoires sur le
  serveur, accès à des dossiers de mails partagés, etc.


  ·  Brève 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


  66..11..33..  LLeecctteeuurrss ddee MMaaiill

  Il y a un bon nombre de lecteurs de mail sous Linux, soit en mode
  graphique, soit en mode texte. Les plus utilisés 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


  66..11..44..  LLooggiicciieellss ddee lliissttee ddee ddiiffffuussiioonn

  Il y a beaucoup de programmes de gestion de listes de diffusion
  disponibles pour UNIX en général 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/>


  66..11..55..  FFeettcchh--mmaaiill

  L'un des utilitaires très pratique pour la gestion du courrier
  électronique est fetchmail. Fetchmail est un programme de récupération
  et de reroutage de mails gratuit, robuste, complet et très 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 même IPv6 et IP-SEC.

  Fetchmail récupère les mails depuis des serveurs de mails distants et
  les reroute via SMTP, par conséquent, ils peuvent être normalement lus
  par des clients mails normaux tels mutt, elm ou BSD Mail. Il permet à
  tous les systèmes 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, récupérant les mails d'une seule boite aux
  lettres chez le FAI, et transférant le tout en se basant sur les en-
  têtes.

  Une petite entreprise peut centraliser tous ses comptes mails dans une
  seule boite, et programmer fetchmail pour récupérer tous les mails en
  partance, les envoyer sur Internet et récupérer les messages arrivant
  d'un seul coup.

  ·  La page de Fetch-mail <http://sagan.earthspace.net/~esr/fetchmail/>


  66..22..  SSeerrvveeuurrss WWeebb

  La majorité des distributions Linux incluent Apache
  <http://www.apache.org>. D'après 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 dérivés. Les avantages
  d'Apache incluent sa conception modulaire, sa stabilité, et sa
  vitesse. Avec une configuration appropriée et un matériel adéquat, il
  peut supporter les plus grosses charges : Yahoo, Altavista, GeoCities,
  Hotmail sont basés sur des versions customisées de ce serveur.

  Un support optionnel des SSL (qui permettent des transactions
  cryptées) 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/>


  66..33..  NNaavviiggaatteeuurrss WWeebb

  Un bon nombre de navigateurs WWW existent pour les plate-formes Linux.
  Netscape Navigator est l'un des choix du début, 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


  66..44..  SSeerrvveeuurrss eett cclliieennttss FFTTPP

  FTP signifie File Transfer Protocol, protocole de transfert de
  fichier. Un serveur FTP permet aux clients de se connecter et de
  récupérer 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 trouvés à :
  http://sunsite.unc.edu/pub/Linux/system/network/file-transfer/


  66..55..  SSeerrvviicceess ddee NNeewwss

  Usenet (aussi appelé news) est un énorme BBS qui couvre tous les
  sujets possibles et qui est organisé hiérarchiquement. Un réseau
  d'ordinateurs au travers d'Internet (Usenet) échange des articles
  grâce au protocole NNTP. Plusieurs implémentations existent pour
  Linux, que ce soit pour un site très 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/>


  66..66..  NNoommss ddee ddoommaaiinneess ((DDNNSS))

  Un serveur DNS a pour tâche de traduire les noms (compréhensibles par
  les humains) en adresses IP. Un serveur de DNS ne connaît 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 demandée, ou répondra qu'il ne trouve pas ce nom dans ses tables.

  Les serveurs de noms sous Unix (et majoritairement sur Internet) sont
  gérés 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>


  66..77..  DDHHCCPP,, bboooottpp

  DHCP et bootp sont des protocoles qui permettent à une machine cliente
  d'obtenir des informations sur le réseau (comme son adresse IP) depuis
  un serveur. Beaucoup d'entreprises commencent à l'utiliser car cela
  rend plus facile l'administration des réseaux, spécialement dans les
  cas de grands réseaux ou de réseaux avec beaucoup d'utilisateurs
  mobiles.

  Documents en relation :

  ·  Le HowTo DHCP <http://sunsite.unc.edu/mdw/HOWTO/mini/DHCP.html>


  66..88..  NNIISS

  NIS est l'abréviation de Service d'Information Réseau (Network
  Information Service). Il fournit un simple service de consultation
  comprenant bases de données et processus. Son objectif est de fournir
  des informations qui doivent être connues à travers le réseau par
  toutes les machines qui s'y trouvent. Les informations distribuées par
  NIS sont :


  ·  nom de login, mots de passe, répertoires parents (/etc/passwd) ;

  ·  renseignements sur le groupe d'utilisateurs (/etc/group).

  Par exemple, si votre mot de passe est enregistré dans la base de
  données NIS, vous pourrez vous loger sur n'importe quelle machine
  située sur le réseau qui possède les clients NIS.


  HowTo en relation :

  ·  NIS How-to <http://sunsite.unc.edu/mdw/HOWTO/NIS-HOWTO.html>


  66..99..  AAuutthheennttiiffiiccaattiioonn

  Il y a aussi plusieurs méthodes pour authentifier des utilisateurs
  dans un réseau hétérogène.


  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 méthode 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>


  77..  EExxééccuuttiioonn dd''aapppplliiccaattiioonnss àà ddiissttaannccee

  L'une des plus folles fonctionnalités d'UNIX (et pourtant une des plus
  méconnues pour les nouveaux utilisateurs) est le superbe support pour
  l'exécution répartie et à distance des applications.
  77..11..  TTeellnneett

  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 réelle administration à
  distance. C'est aussi un programme intéressant au niveau de
  l'utilisateur, parce qu'il permet à un utilisateur d'accéder à
  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
  différence (à part le délai) 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 sécurisés existent via SSH <http://www.cs.hut.fi/ssh/>
  permettant une administration sécurisée.


  ·  Logiciels en rapport avec Telnet
     <http://sunsite.unc.edu/pub/Linux/system/network/telnet/>


  77..22..  CCoommmmaannddeess eexxééccuuttééeess àà ddiissttaannccee

  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 manière équivalente à telnet ou rcp, qui permet de
  faire des transferts entre machines, etc. Et bien sûr la commande rsh
  (remote shell) permet d'exécuter des commandes sur une machine
  distante sans pour autant s'y loger.


  77..33..  XX--WWiinnddooww

  Le système X-Window a été développé au MIT à la fin des années 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 très polyvalent, et est porté pour une très grande
  variété de plate-formes. Tout système 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
  contrôle l'affichage directement, et gère les entrées et les sorties
  via le clavier, la souris ou l'affichage. Le client, d'un autre côté,
  n'accède pas à l'écran directement, il communique avec le serveur, qui
  gère les entrées et les sorties. C'est le client qui fait tout le
  "vrai" travail, exécution d'application ou quoi que ce soit. Le client
  communique avec le serveur, demandant au serveur d'ouvrir une ou
  plusieurs  fenêtres, et de gérer entrées et sorties pour le client.

  Pour résumer, le système X-Window permet à un utilisateur d'accéder à
  une autre machine, d'exécuter un programme (par exemple, un navigateur
  WWW) et d'avoir les sorties affichées sur sa propre machine. Parce que
  ce processus est en réalité exécuté sur le serveur, très peu de
  puissance CPU est nécessaire 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 appelés terminaux X.

  Un port gratuit du système 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>

  77..44..  VVNNCC

  VNC signifie Virtual Network Computing c'est à dire, réseau virtuel
  d'ordinateurs. C'est un système 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 très variées. Des clients et des serveurs existent
  pour Linux et bien d'autres plate-formes. Par exemple, il est possible
  d'exécuter MS-Word depuis une machine sous Windows NT ou 95 et d'avoir
  le résultat affiché sur n'importe quelle autre machine, une machine
  Linux par exemple. Le contraire est bien sûr aussi possible, ainsi que
  d'exécuter 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>


  88..  IInntteerrccoonnnneeccttiioonn ddee rréésseeaauuxx

  La couche réseau de Linux est pleine de fonctionnalités. Un ordinateur
  sous Linux peut être configuré pour agir en tant que routeur,
  passerelle, etc... Quelques unes des options disponibles sont décrites
  ci-dessous.


  88..11..  RRoouutteeuurr

  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 coût bien moins élevé qu'un routeur commercial. Les noyaux
  récents incluent des options spéciales pour les machines jouant le
  rôle 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 nécessaire sur le MBONE, un réseau à grande
     bande passante, qui diffuse du son et de la vidéo.

  ·  IP policy routing : Normalement, un routeur décide quoi faire quand
     il reçoit 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/>


  88..22..  PPoonntt

  Le noyau de Linux sait agir en tant que pont Ethernet, ce qui signifie
  que les différents segments Ethernets auxquels il est connecté
  apparaîtront comme un seul Ethernet aux participants. Plusieurs ponts
  peuvent collaborer, pour créer d'encore plus larges réseaux 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>


  88..33..  IIPP--MMaassqquueerraaddiinngg

  IP Masquerade est une fonction de développement de réseau pour Linux.
  Si une machine Linux est connectée à Internet avec IP Masquerade
  activé, les ordinateurs s'y connectant (soit sur le même réseau, soit
  se connectant par modems) peuvent accéder à Internet sans problèmes,
  même s'ils n'ont pas de réelle IP d'assignée. Ceci permet de réduire
  les coûts, puisque pas mal de personnes pourront accéder à Internet en
  utilisant une simple connection par modem. Cela permet aussi de
  réduire les risques de sécurité car d'une certaine façon, la machine
  agit en tant que firewall, puisque les adresses non officielles ne
  peuvent pas être accédées depuis l'extérieur de ce réseau.

  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


  88..44..  IIPP--AAccccoouunnttiinngg

  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 série de règles peuvent être définies pour que,
  lorsque certains paquets ont certaines caractéristiques, un compteur
  soit incrémenté, que le paquet  soit accepté ou rejeté, etc...


  88..55..  IIPP--AAlliiaassiinngg

  Cette fonctionnalité du noyau de Linux fournit la possibilité
  d'assigner plusieurs adresses réseau à la même interface (ex : deux
  adresses IP sur une carte Ethernet). Typiquement, pour être utilisé
  pour des services qui se comportent différemment selon l'adresse par
  laquelle ils sont appelés (ex : "multihosting" ou "domaines virtuel"
  ou "service d'hébergement virtuel").

  HowTo en relation :

  ·  IP Aliasing How-to <http://sunsite.unc.edu/mdw/HOWTO/mini/IP-
     Alias.html>


  88..66..  TTrraaffffiicc SShhaappiinngg

  Le traffic shaper est une interface virtuelle qui permet de limiter le
  trafic montant vers une autre interface réseau. C'est particulièrement
  utile quand on veut limiter/contrôler la bande passante utilisée 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 utilisée.




  88..77..  FFiirreewwaallll

  Un firewall est une interface qui protège un réseau prive du reste
  d'Internet. Il est conçu pour contrôler 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 différents outils de firewalls pour Linux, ainsi qu'un
  support intégré dans le noyau. D'autres firewalls sont TIX et SOCKS.
  Ces kits de firewall sont très complets, et combinés avec d'autres
  outils, permettent de bloquer/rediriger tous types de trafic et
  protocoles. Différentes règles peuvent être implémentées par le biais
  de fichiers de configuration ou grâce à 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>


  88..88..  RReerroouuttaaggee ddee ppoorrttss

  Un nombre croissant de sites WWW deviennent interactifs en ayant des
  cgi-bins ou des applets Java qui accèdent à des bases de données ou à
  d'autres services. Puisque ces accès peuvent poser des problèmes de
  sécurité, la machine contenant la base de donnée ne devrait pas être
  connectée directement à Internet.

  Le reroutage de ports peut fournir une solution presque idéale à ce
  problème d'accès. Avec un firewall, les paquets IP qui arrivent sur un
  port spécifique peuvent être réécrit et envoyés au serveur interne
  fournissant le service. Le paquet qui est reçu du serveur interne est
  réécrit pour le faire apparaître comme arrivant du firewall.

  Des informations sur le reroutage de ports peuvent être trouvées  ici
  <http://www.ox.compsoc.net/~steve/portforwarding.html>


  88..99..  RRééppaarrttiittiioonn ddee cchhaarrggee

  Lorsqu'un serveur Web, qui utilise une base de donnée, est très
  chargé, il serait utile d'avoir plusieurs serveurs identiques et de
  rediriger les requêtes vers le serveur le moins chargé. Ceci peut être
  fait avec les techniques de translation d'adresses réseau (NAT :
  Network Address Translation) dont IP-Masquerading est un sous-
  ensemble. Les administrateurs réseaux peuvent remplacer un serveur
  simple fournissant des services Web - ou n'importe quoi d'autre - par
  un groupe de serveurs partageant la même adresse IP. Les connections
  arrivantes sont redirigées vers l'un des serveurs en utilisant un
  algorithme de répartition de charge. Le serveur virtuel réécrit les
  paquets entrants et sortants pour que les clients aient un accès
  transparent au serveur, comme s'il était unique.

  Des informations sur Linux IP-NAT peuvent être trouvées là
  <http://www.csn.tu-chemnitz.de/~mha/linux-ip-nat/diplom/>


  88..1100..  EEQQLL

  EQL est intégré au noyau de Linux. Si deux connections séries existent
  vers un autre ordinateur (cela demande deux modems et deux lignes de
  téléphone) et si SLIP ou PPP (un protocole pour envoyer un trafic
  internet à travers une ligne de téléphone) sont utilisés 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 côté aussi.


  ·  Le EQL How-to <http://www.abies.com/eql-howto.mhtml>


  88..1111..  SSeerrvveeuurr PPrrooxxyy

  Le terme proxy signifie "faire quelque chose pour quelqu'un d'autre".
  En termes de réseau, un serveur proxy est un ordinateur qui agit pour
  plusieurs clients. Un proxy HTTP est une machine qui reçoit des
  requêtes à des pages Web d'autres machines (machine A). Le proxy
  récupère la page en question et retourne le résultat à la machine A.
  Le proxy peut avoir un cache contenant les pages déjà demandées, de
  façon à ce que , si une autre machine demande la même page, la copie
  du cache soit retournée à la place. Ceci permet de réduire la bande
  passante utilisée, et d'avoir un temps de réponse plus court. Comme
  effet de bord, les machines clientes n'accèdent pas directement au
  monde extérieur et cela peut rendre un réseau plus sûr. 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
  implémentation plus complète et plus robuste de proxy HTTP.


  ·  Apache <http://www.apache.org>

  ·  Squid <http://squid.nlanr.net>



  88..1122..  CCoonnnneeccttiioonn àà llaa ddeemmaannddee

  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 nécessaire, puis
  après une période d'inactivité, clot la connection.


  ·  Le Diald How-to <http://sunsite.unc.edu/mdw/HOWTO/mini/Diald.html>


  88..1133..  TTuunnnneelllliinngg,, IIPP mmoobbiillee eett rréésseeaauuxx pprriivvééss vviirrttuueellss

  Le noyau de Linux permet le tunnelling (encapsulation) de protocoles.
  Il peut faire du tunnelling IPX via IP, permettant la connection de
  deux réseaux 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 amélioration 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'hébergement, ce qui fournit des informations sur son point de
  rattachement actuel sur Internet. Le protocole permet d'enregistrer
  l'adresse de l'hébergeur avec un programme spécifique. Ce programme
  envoie les datagrammes destinés au noeud mobile via le tunnel de
  l'adresse de l'hébergeur. Après être arrivé, chaque datagramme est
  alors délivré au noeud mobile.
  Le Point-to-Point Tunneling Protocol (PPTP) est une technologie réseau
  qui permet d'utiliser Internet en tant que réseau privé virtuel (VPN :
  virtual private network). PPTP est intégré dans le serveur de services
  d'accès à 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 réseau
  comme s'ils étaient devant leur bureau. PPTP est un protocole bien
  défini, et sa sécurité a récemment été compromise. Il est fortement
  conseillé d'utiliser l'une des alternatives proposées par Linux, car
  elles s'appuient sur des standards qui ont été examinés et testés très
  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 réseaux privés virtuels :

  ·  http://sunsite.unc.edu/mdw/HOWTO/mini/VPN.html

  ·  http://sites.inka.de/sites/bigred/devel/cipe.html



  99..  AAddmmiinniissttrraattiioonn RRéésseeaauu


  99..11..  PPrrooggrraammmmeess dd''aaddmmiinniissttrraattiioonn rréésseeaauu

  Il y a une liste impressionnante d'outils qui sont dédiés à
  l'administration réseau et à l'administration à distance. Quelques
  projets intéressants 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 réseau, de
  sécurité réseau, de surveillance, de configuration, etc. Une archive
  de tous ces outils peut être trouvée à Sunsite
  <http://www.sunsite.unc.edu/pub/Linux/system/network/>


  99..22..  SSNNMMPP

  Le Simple Network Management Protocol (protocole d'administration
  réseau simple) est un protocole dédié à l'administration des services
  réseaux. Il permet l'administration et la surveillance à distance de
  routeurs, passerelles, cartes réseaux, switches, etc... Il y a un
  grand nombre de librairies, clients, daemons et programmes de
  surveillances SNMP disponibles pour Linux. Une bonne page pour
  démarrer est : http://linas.org/linux/NMS.html


  1100..  RRéésseeaauuxx dd''eennttrreepprriisseess ssoouuss LLiinnuuxx

  Dans certaines situations, il est nécessaire d'avoir une
  infrastructure réseau comprenant des mécanismes lui permettant d'être
  disponible quasiment 100% du temps. Certaines de ces techniques sont
  décrites plus loin. La majorité des documents suivants peuvent être
  trouvés 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>


  1100..11..  HHaauuttee ddiissppoonniibbiilliittéé

  La redondance est utilisée pour éviter qu'Internet dans sa globalité
  ait un point faible. Un serveur avec une seule carte réseau ou un seul
  disque SCSI a deux points faibles. L'objectif est de cacher aux
  utilisateurs les problèmes imprévus de façon à ce qu'ils puissent
  continuer à travailler rapidement. Les logiciels de haute
  disponibilité sont un groupe de scripts et d'outils qui surveillent et
  détectent les problèmes, suivent une méthode appropriée pour restaurer
  l'état normal et préviennent les administrateurs systèmes.


  1100..22..  RRAAIIDD

  RAID est l'abréviation de Redundant Array of Inexpensive Disks, c'est
  à dire Grappe redondante de disques, c'est une méthode grâce à
  laquelle les informations sont réparties 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 récupération
  après un crash disque. 6 niveaux RAID différents ont été définis. Il y
  à 3 solutions RAID possibles pour les utilisateurs de Linux : RAID
  logiciel, boîtiers DASD externes, et contrôleurs de disques RAID.


  ·  RAID Logiciel : Implémentation RAID purement logicielle, permet
     l'utilisation des différents niveaux RAID dans le code de gestion
     des disques du noyau (les bloc devices)

  ·  Boîtiers DASD externes : les DASD (Direct Access Storage Device, c-
     a-d périphérique de stockage à accès direct) sont des boîtiers
     séparés ayant leur propre alimentation électrique, fournissent un
     châssis pour ranger les disques, et sont considérés par Linux comme
     un périphérique SCSI comme un autre. D'une façon générale, c'est la
     solution RAID la plus fiable.

  ·  Contrôleurs de disques RAID : Les contrôleurs de disques sont des
     cartes qui se mettent dans les bus ISA/EISA/PCI. Un câble les
     rattache aux disques, comme pour les contrôleurs normaux. Mais
     contrairement aux contrôleurs normaux, les contrôleurs RAID
     implémentent le RAID sur la carte elle-même, avec tout ce qu'il
     faut pour fournir les différents 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





  1100..33..  RReeddoonnddaannccee rréésseeaauu

  Le takeover d'adresse IP (IPAT) :

  Quand une interface réseau tombe en panne, son adresse IP devrait être
  prise par une carte en état de marche sur le même noeud du réseau, 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 réseau mettent à jour les caches de leurs tables ARP
  (les correspondances entre adresses IP et les adresses MAC).

  Pour plus de détails, référez vous au : HowTo High-Availability
  <http://sunsite.unc.edu/pub/Linux/ALPHA/linux-ha/High-Availability-
  HOWTO.html>


  1111..  SSoouurrcceess dd''iinnffoorrmmaattiioonnss

  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 dernières nouveautés des logiciels Linux.
     http://www.freshmeat.net

  ·  Liens sur Linux : http://www.linuxlinks.com/Networking/


  1122..  RReemmeerrcciieemmeennttss eett mmiissee eenn ggaarrddee

  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 systèmes d'exploitation basé réseau. Tous les
  crédits leurs reviennent. Beaucoup de travail a été fait pour que ce
  document soit clair, ainsi qu'exact et complet, mais sans être
  excessivement long. Néanmoins, l'auteur décline toute responsabilité
  en cas de mauvaise utilisation des informations contenues dans ce
  document. N'hésitez pas à m'envoyer vos suggestions, corrections, ou
  commentaires généraux pour que je puisse l'améliorer. Ce HowTo
  grandira certainement avec le temps, par exemple avec radius, les
  outils pour dupliquer un web/ftp grâce à wget, des analyseurs de
  trafic, CORBA... Et tout ce qui me sera suggéré et qui me paraîtra
  intéressant. Vous pouvez me joindre ici <mailto:ridruejo@esi.us.es>
  (et là <mailto:arn@mygale.org> pour la traduction française)

  Daniel López Ridruejo 9 Mai 1998













  News-Howto
  Vince Shakan, vince@halcyon.com;
  Version Française par Arnaud Launay, asl@launay.org
  v1.4, 29 Novembre 1995

  Ce document décrit 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 ppaass à lire ce
  document si vous ne pensez pas distribuer les News USENET sur votre
  système.
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 Nouvelles Versions de ce Document
     1.2 Echos, Réactions
     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. Matériel nécessaire

  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 modérés ?
     7.2 Pourquoi semble-t-il y avoir des problèmes 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 ?


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  L'intention de ce document est de répondre à quelques unes des
  questions et commentaires qui semblent correspondre à la définition de
  "Frequently Asked Questions" à propos des logiciels de News sous Linux
  en général, 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é précédemment
  postée à comp.os.linux.announce .


  11..11..  NNoouuvveelllleess VVeerrssiioonnss ddee ccee DDooccuummeenntt

  Les nouvelles versions de ce document seront régulièrement postées sur
  comp.os.linux.announce, comp.answers, et news.answers .  Elles seront
  également ajoutées 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 française.)

  De plus, vous devriez généralement trouver ce document sur la "Linux
  WorldWideWeb home page" à http://sunsite.unc.edu/mdw/linux.html.


  11..22..  EEcchhooss,, RRééaaccttiioonnss

  Je suis interessé par tout commentaire, positif ou négatif, à propos
  du contenu de ce document via e-mail. Contactez moi précisément si
  vous trouvez des erreurs ou des omissions.

  Je lis, mais ne répond pas nécessairement, à tous les e-mails que je
  reçois. Les demandes d'ajouts seront considérées et effectuées
  uniquement lorsque la combinaison journalière du temps libre, du
  mérite de la demande, et de la pression sanguine du jour seront
  réunies :-)

  Les flames iront tranquillement dans /dev/null, donc ne vous en
  inquiétez pas.

  En particulier, le système 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 utilisés dans les distributions ou distribution de Linux
  pour connaître les différents chemins utilisés.

  Les réactions concernant le format actuel de ce document doivent être
  adressées au coordinateur des HOWTOs - Greg Hankins
  (greg@sunsite.unc.edu).


  11..33..  IInnffoorrmmaattiioonnss ssuurr llee CCooppyyrriigghhtt

  Le News-HOWTO est (c) 1994, Vince Shakan.

  Une copie exacte peut être reproduite ou distribuée 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 utilisées sans le consentement
  préalable de l'auteur.
  Les travaux dérivés et les distributions partielles du News-HOWTO
  doivent être accompagnées soit d'une copie texto de ce fichier, soit
  d'un pointeur vers une copie identique.


  Les redistributions commerciales sont autorisées et encouragées;
  cependant, l'auteur (NdT: et le traducteur s'il s'agit de la
  traduction) apprécierait d'être prévenu d'une telle distribution (en
  tant que courtoisie).

  En bref, nous désirons promouvoir la dissémination de ces informations
  sur le maximum de canaux. Cependant, nous désirons conserver le
  Copyright des documents HOWTO.

  Nous espérons que TOUTES les informations présentées dans les HOWTOs
  seront diffusées. Si vous avez des questions, contactez Greg Hankins,
  le coordinateur des Linux Howtos, à gregh@sunsite.unc.edu.


  11..44..  RReessppoonnssaabbiilliittéé ssttaannddaarrdd

  Bien entendu, je désavoue tout risque potentiel du contenu du
  document. L'utilisation des concepts, exemples, et/ou du reste du
  document est à votre entière responsabilité.


  11..55..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  11..55..11..  UUSSEENNEETT


  ·  news.admin.misc : Questions générales sur l'administration d'un
     réseau de news

  ·  news.admin.policy : Politique d'USENET

  ·  news.admin.technical : Maintenance d'un réseau de news (modéré)

  ·  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 utilisés pour lire les news

  ·  news.sysadmin : Commentaires orientés vers les administrateurs
     systèmes

  ·  news.announce.newusers : Messages d'explications pour les nouveaux
     utilisateurs (modéré)

  ·  news.newusers.questions : Questions et réponses pour les nouveaux
     utilisateurs d'Usenet


  11..55..22..  LLiivvrreess

  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 utilisés 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 agréable sur la sécurisation d'UUCP en général;
  ·  "The Internet Complete Reference" d'Osborne est une référence
     précieuse 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 réseau sous Unix.


  11..66..  OOùù nnee PPAASS cchheerrcchheerr ddee ll''aaiiddee

  Il n'y a rien de très spécial sur la configuration et le lancement de
  news USENET sous Linux (pas plus). Par conséquence, vous n'aurez
  certainement *PAS* à poster des questions génériques relatives aux
  news sur les newsgroups comp.os.linux.* .

  A moins que votre envoi ne soit vraiment spécifique à Linux (càd "svp
  dites moi quels patches sont nécessaires pour utiliser INN avec bash
  1.12 sous SLS v1.03"), vous devrez poster vos questions dans les
  newsgroups mentionnés ci-dessus.

  Laissez moi répéter cela.

  Il n'y a virtuellement aucune raison de poster quoi que ce soit de
  relatif aux news dans la hiérarchie comp.os.linux. Il existe des
  newsgroups dans la hiérarchie news.* pour répondre à *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.


  22..  MMaattéérriieell nnéécceessssaaiirree

  Il n'y a pas de matériel spécifiquement nécessaire 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 données de discussion, et la quantité de news que vous désirez
  conserver sur le serveur. Il faut un minimum de 10 Méga pour le début.


  33..  OObbtteenniirr lleess llooggiicciieellss ddee NNeewwss UUSSEENNEETT

  Tous les logiciels référencés dans ce "HOWTO" sont disponibles sur les
  sites ftp anonymes classiques.

  Regarder dans /networking/news sur ftp.uu.net est généralement un bon
  moyen de débuter.

  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 généralement être trouvé sur sunsite.unc.edu,
  dans le répertoire /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.

  44..  LLooggiicciieellss ddee ttrraannssppoorrtt ddee NNeewwss

  Il y a deux principaux jeux de logiciels de "transport" de News de nos
  jours, Cnews et INN. Les anciennes "BNews" ont été officiellement
  déclarées abandonnées et non supportées par leurs auteurs.

  Le "transport" de News est défini ici comme étant le logiciel qui
  travail en sous-main pour poster et propager les articles des news
  tout en rendant ces mêmes articles disponibles à l'accès par les
  lecteurs de news.

  Vous pouvez définir n'importe quoi comme chemin, tant que UUCP a le
  chemin général vers rnews dans le fichier des Permissions et tant que
  vos lecteurs de news sont configurés de façon à 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 prévus d'être
  utilisés de concert.


  44..11..  CCnneewwss CClleeaannuupp RReelleeaassee

  Le standard courant en tant que logiciel de News est Cnews. Il existe
  depuis un certain nombre d'années, je l'ai vu pour la première fois en
  1988. La version courante lors de l'écriture de ce Howto est appellée
  "Cnews CleanUp Release, avec le patch CR.G".

  Le point fort de Cnews est sa maturité. Il tourne sur tout système
  *nix que vous pouvez trouver et il y a littéralement des milliers de
  système tournant dessous de par le monde.

  Son principal désavantage est qu'il semble être conçu 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.

  Néanmoins, l'administrateur Usenet débutant devra probablement
  commencer par lancer Cnews car il est très stable, bien documenté, et
  dispose de plusieurs milliers d'administrateurs expérimentés qui
  peuvent répondre aux questions.

  La 'CleanUp Release' déclare que "le support de vue globale a été
  pleinement intégré et est plus rapide qu'il ne l'était autrefois". Le
  résultat est que vous pouvez par exemple utiliser le support Cnews NOV
  plutôt que de lancer des générateurs de listes pour lecteurs de News
  tels nn, tin, et trn.

  Je n'ai pas encore cherché comment implémenter cette partie, car j'ai
  depuis longtemps opté pour INN à la maison. Si quelqu'un attend de moi
  de compléter 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 nécessaires pour faire un "doexplode" pour
  se jouer de certains problèmes sous bash 1.12.

  Basiquement, vous lancerez le nouveau script "quiz" et utiliserez les
  défauts. Vous devrez vous référez à votre arbre /usr/include pour
  répondre à un certain nombre de questions, mais ceci est plutôt
  contraignant.




  44..11..11..  IInnssttaalllleerr CCnneewwss

  L'installation de la Cleanup Release de Cnews est absolument un projet
  "rtfm". Prenez simplement les sources, décompactez les et suivez les
  instructions.

  Le quiz.def du newspak est généré en lançant "quiz" la première fois,
  et pour répondre aux questions vous n'aurez qu'à regarder les fichiers
  du /usr/include.

  Vous devrez avoir une version récente de bash pour que Cnews passe ses
  tests. Essayez 'bash -version' pour savoir quelle version vous avez.
  La version 1.14.2 est définitivement 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 déterminé que la récente 'cleanup release'
  de Cnews a trouvé un bug dans le join du shellutils 1.9 de GNU. Il y a
  quelques patchs nécessaires pour que "join" puisse néanmoins
  fonctionner. Si je me rappelle bien, Steve les a placé sur sunsite.


  44..11..22..  CCoonnffiigguurreerr CCnneewwss

  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 paramètres de lancement
         explist            - contrôle de l'expiration des articles
         mailname           - nom dans l'entête pour les retours par mail
         mailpaths          - path où envoyer les articles pour groupes modérés
         organization       - votre "org"
         sys                - controlez ce que vous prenez et enregistrez
         whoami             - votre hostname pour la ligne Path:
       ______________________________________________________________________





  44..11..33..  MMaaiinntteenniirr uunn ssiittee CCnneewwss

  Tout d'abord, il ne faut pas modifier à la main les fichiers qui
  possèdent 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:














  ______________________________________________________________________
            # Récupère les batchs compressés provenant d'autres systèmes
            # 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 nécessaire
            10 5       * * * /usenet/sw/news/bin/newsdaily
            00 5       * * * /usenet/sw/new/bin/newswatch

            # Arrête l'arrivée 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
  ______________________________________________________________________





  44..22..  IInntteerrNNeettNNeewwss ((IINNNN))

  INN est le nouveau-venu de la scène, mais il gagne en popularité en
  mûrissant. Son principal intérêt est sa rapidité et le fait qu'il
  contient un paquage nntp intégré. Son principal défaut est qu'il est
  nouveau et son installation et exécution sur l'un des nombreux "*nix
  standard" peut être périlleuse. De plus, il opère par un daemon (innd)
  toujours présent et un daemon supplémentaire pour réaliser
  l'indentation. Le marché semble donc être la mémoire contre la
  vitesse.

  J'ai fait tourner l'arrivée 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 problème.

  Les nouveaux administrateurs Usenet ne devraient probablement pas
  essayer INN jusqu'à ce qu'ils aient de l'expérience avec B-News ou
  Cnews. Puisqu'il est rapide et sûr sous Linux, il est sous-documenté
  pour l'administrateur news débutant (cependant en pratique il est
  simple à faire tourner dès que vous avez compris).

  INN est très particulier avec les permissions. Ne vous en inquiétez
  pas.

  INN est également très particulier sur la "qualité" du TCP/IP avec
  lequel il doit marcher. Linux n'est pas forcément présent à ce moment
  là, il est donc recommandé que vous preniez une distribution
  spécifique à Linux à partir de l'un des sites archive Linux classique.


  44..22..11..  IInnssttaalllleerr IINNNN

  ( 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 trouvés sur:
  ftp.win.tue.nl:/pub/linux/ports/inn-1.4-linux.tar.gz.

  INN dépend fortement d'un bon substitut pour /bin/sh . J'utilise une
  version bêta de bash 1.13 qui est dorénavant accessible pour Linux
  dans les sites classiques. bash 1.12 a quelques problèmes avec les
  newsgroups qui ne sont pas proprement récupérés (il y a peut-être
  d'autres problèmes, je ne me rappelle plus).


  44..22..22..  CCoonnffiigguurreerr IINNNN

  Suivez les indications d'Arjan et vous devriez réussir. Voici le
  résumé de ce qu'il y a à faire:

  ·  Dans le fichier config.data, vérifiez que vous avez
     "HAVE_UNIX_DOMAIN DONT";

  ·  Ajoutez le hostname du système sur lequel tourne innd à hosts.nntp
     . Pour un site basé uniquement sur uucp, il s'agit du nom de votre
     site;

  ·  Vérifiez que vous n'avez PAS de ligne pour nntp dans
     /etc/inetd.conf;

  ·  Vérifiez que vous avez une variable pour le shell de inn qui donne
     "HAVE_UUSTAT DO" plutôt que le "DONT" de cet exemple, si vous avez
     installé uustat du paquetage Taylor UUCP. Si vous avez mal défini
     cela, il en résultera que les news ne seront pas envoyées
     automatiquement;

  ·  Si vous utilisez INN, définissez définitivement le syslogd
     recommandé car c'est très, très utile !

  Il y a une FAQ spectaculaire (!!!!) sur INN qui est postée
  mensuellement. Regardez sur rtfm.mit.edu:/pub/usenet-by-
  hierarchy/news. Vous en serez heureux.

  44..22..33..  MMaaiinntteenniirr uunn ssiittee IINNNN

  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 données
                 # 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
  nécessaire)


  44..33..  AAuuttrreess oouuttiillss ddee ttrraannssppoorrtt ddee NNeewwss

  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


  55..  LLeecctteeuurrss ddee NNeewwss

  Il n'y a pas de "vrai lecteur de news". En conséquence, il y a de
  nombreux lecteurs de news très connus qui peuvent être facilement
  portés 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 désirez
  principalement quelque chose de facile à utiliser, très configurable
  par l'utilisateur, avec indentation et fichiers de suppression (pour
  sélectionner les articles intéressants et faire disparaître 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 réponses aux articles.

  Cette section traitera brièvement de quelques uns des plus populaires.
  Avant que vous ne posiez la question, j'utilise "nn" pour beaucoup de
  raisons :-)


  55..11..  TTiinn

  Tin est un lecteur de news indenté généralement décrit 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
  défaut 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" défini. Il en résultera un fichier nommé "tin" pour la
  lecture locale et un fichier nommé "rtin" pour la lecture via NNTP.
  "tin -r" donnera aussi le même effet que "rtin".

  Iain Lea recommande l'entrée suivante dans la crontab et ajoute que
  vous devrez faire un "make daemon" pour compiler "tind".


       ______________________________________________________________________
                 # indexe la base de données
                 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 système comprenant tous les
  newsgroups, vous deviendrez extrêmement vieux en attendant le
  chargement du fichier "active".


  55..22..  TTrrnn//MMtthhrreeaaddss

  "Trn" est un dérivé en index du lecteur "rn". Trn 3.2 et plus récents
  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 défaut. Vous devrez avoir au moins la libc 4.4.1 et bash
  1.1.13 pour lancer sans problèmes Configure.

  La distribution newspak sur sunsite contient des fichiers de
  configuration effectifs pour trn sous linux.

  Il est probablement indésirable 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
  préférences. 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 départ, vous serez très tranquille.

  Pour compiler pour une lecture par NNTP, il suffit de répondre "yes"
  lorsque Configure vous demande si vous désirez cette option (en
  supposant que Configure tourne sur votre système). 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 système comprenant tous les
  newsgroups, vous deviendrez extrêmement 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 détails. J'utilise un
  truc sympa pour configurer toutes les options facilement:

  ·  Créer 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
  sélectionnable par l'utilisateur. Ainsi, je recommande de compiler le
  logiciel avec les deux sortes d'indentation (c'est une question dans
  Configure). Pour en sélectionner un au lancement, essayez "trn -Zo"
  pour NOV et "trn -Zt" pour mthreads.

  Pour construire la base de données mthreads, essayez quelque chose
  comme ceci dans le "news" crontab:


       ______________________________________________________________________
                 # indexe la base de donnees trn
                 35 * * * * /usenet/bin/mthreads all
       ______________________________________________________________________





  55..33..  NNNN

  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 terminée, vous devrez faire ceci:

  ·  lancer le programme "inst" pour tout installer

  ·  initialiser la base de données

  ·  rendre actif nnmaster

  Voyez la doc de nn pour les détails. Compiler, configurer, et faire
  tourner nn sous Linux n'est pas différent de le lancer sous un autre
  *nix, avec l'exception que vous devrez lancer nnmaster en tant
  qu'entrée cron plutôt qu'en tant que daemon. Si vous le lancez en tant
  que daemon sous linux, il peut agir imparfaitement (l'effet réseau est
  de toutes façons le même en le lançant par cron).

  Le support de nnnn se fait par l'entrée suivante dans la crontab:


       ______________________________________________________________________
                 # lance nnmaster pour récupérer le travail d'nn
                 # (inutile si vous utilisez NOV d'INN de nn-6.5beta3)
                 25 * * * * /usenet/sw/nn/lib/nnmaster

                 # Rend obsolète la base de données de nn
                 # (inutile si vous utilisez NOV d'INN de nn-6.5beta3)
                 0  4       * * * /usenet/sw/nn/bin/nnadmin =EYW

                 # prépare 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
  précisément le fichier config.h . Voyez les commentaires dans le
  fichier pour avoir des détails. Lorsque vous lancez nn en tant que
  lecteur NNTP, celui-ci lance une copie locale de nnmaster pour
  conserver l'index sur le système local, en sorte que la sélection des
  articles est très 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 données
  NOV d'INN qui rendent inutile le lancement d'nnmaster pour vous. Cette
  configuration est très recommandée, puisqu'en résultat vous n'aurez
  pas à utiliser de temps processeur pour lancer nnmaster, et vous
  n'aurez pas de base de donnée et d'articles news hors d'atteinte.


  55..44..  AAuuttrreess lleecctteeuurrss ddee nneewwss

  Ce qui suit est une liste incomplète de lecteurs de news dit pouvoir
  être installés et lancés sous Linux:

  ·  tass

  ·  xrn

  ·  gnus


  ·  (NdT: on peut rajouter Netscape)


  66..  RReemmeerrcciieemmeennttss

  Les personnes suivantes m'ont aidé à rassembler les informations (et
  l'expérience) 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.


  77..  FFAAQQ ssuurr UUSSEENNEETT ((dduu mmooiinnss ssuurr cc..oo..ll..** ))

  77..11..  PPoouurrqquuooii nnee ppuuiiss--jjee ppaass ppoosstteerr ddaannss lleess ggrroouuppeess mmooddéérrééss ??

  Probablement parce que le lecteur de news essaye d'appeler /bin/mail
  pour envoyer le mail et il n'apprécie pas. Remplacez le /bin/mail des
  vieilles versions de SLS avec le port de mailx-5.5 d'une slackware
  récente et utilisez l'outil pkgtool pour installer le kit et tout sera
  configuré.

  Une autre possibilité est que vous auriez un groupe modéré configuré
  comme un groupe non-modéré et quelque chose supprime tranquillement
  l'article du flux. Vérifiez en lançant un cchheecckkggrroouuppss dès maintenant
  et que les articles des news passent en news.admin pour quelques
  semaines.


  77..22..  PPoouurrqquuooii sseemmbbllee--tt--iill yy aavvooiirr ddeess pprroobbllèèmmeess ddee ppeerrmmiissssiioonnss ??

  Parce qu'il y en a :-)

  Vérifiez 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.


  77..33..  nn''aappppaarraaiisssseenntt ppaass oouu ddiissppaarraaiisssseenntt ddaannss lleess fflluuxx ??  PPoouurrqquuooii
  ppuuiiss--jjee ppoosstteerr ddeess aarrttiicclleess llooccaalleemmeenntt,, mmaaiiss qquu''iillss

  Probablement parce que vous n'appelez pas newsrun par cron.  Peut-être
  parce que vous avez mal édité le fichier système. 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 tâches et nécessitent
  'newsrun' lancé par la crontab pour récupérer les news d'autres sites
  et pour les voir localement.

  Ne créez pas de newsgroups en éditant les fichiers active ou sys.
  Utilisez les outils de /usr/local/lib/news/bin/maint pour le faire.





  77..44..  PPoouurrqquuooii mmaa ddiissttrriibbuuttiioonn bbiinnaaiirree nnee ddiissppoossee ppaass ddee nnnnttpp ??

  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 déjà 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 localisées qui ne sont pas
  rouvrables au lancement via un fichier de config.


  77..55..  aalloorrss qquu''iill yy aa bbeeaauuccoouupp ddee ppllaaccee ??  PPoouurrqquuooii ddooeexxppiirree ((oouu
  rreellaayynneewwss oouu....)) mmee ddiitt ""sseevveerree ssppaaccee sshhoorrttaaggee""

  Parce qu'il ne peut lire /etc/mtab. Mettez le en mode 644. Ceci arrive
  quand vous 'umount'-ez un système de fichiers monté par
  l'administrateur avec un umask ne permettant pas la lecture par toute
  personne de fichiers possédés par l'administrateur.


  77..66..  PPoouurrqquuooii,, aalloorrss qquuee ttoouutt sseemmbbllee nnoorrmmaall,, ll''eennvvooii nnee ssee ffaaiitt ppaass ??

  Les vieilles versions de Linux ont un sed "cassé" qui rendait Cnews
  étrange. En particulier, si vous avez installé une vieille SLS,
  vérifiez dans /bin et /usr/bin que vous avez seulement une copie de
  sed et que celle-ci est récente.

  A cause de la 'Performance Release' aux alentours de février 1993,
  vous devrez avoir newsrun lancé périodiquement par cron pour que les
  choses se déroulent normalement. C'est un état qui surprend
  apparemment beaucoup de monde.


  77..77..  PPuuiiss--jjee uuttiilliisseerr llee NNeeww NNeewwss OOvveerrvviieeww ((NNOOVV)) ddee ttiinn//ttrrnn//nnnn ppoouurr
  rreemmppllaacceerr lleess ddiivveerrsseess bbaasseess ??

  Oui. trn , tin, et la bêta de nn le supportent maintenant.

  Vous pouvez utiliser celle des Releases 'CleanUp' et 'Performance' de
  Cnews, ainsi que celle d'autres lecteurs.


  77..88..  PPoouurrqquuooii nnee ppeeuutt--oonn aavvooiirr ddee ddiissttrriibbuuttiioonn bbiinnaaiirree ddee NNNNTTPP ??

  Car certaines informations sont uniquement locales et sont inclues
  dans la compilation, et ne peuvent être déterminées "magiquement" au
  lancement.




















  un compte) Méthode 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 Quéau ThierryLeQueau@wanadoo.fr
  v1.3.2, 7 February 1998

  Utilisez votre système 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 même
  que vos utilisateurs recoivent leur courrier dans leur boîte à lettre
  Linux; au lieu de payer un service de diffusion multi-utilisateur à
  votre fournisseur d'accès, vous pouvez utiliser ce système pour redis­
  tribuer aux différents comptes utilisateur le courrier en utilisant
  une seule adresse e-mail. Vous pouvez y avoir accès 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 matières














































  1. Préface.

     1.1 D'un point de vue légal.
     1.2 Copyrights
     1.3 Réactions.
     1.4 Distribution.
     1.5 Corrections.
     1.6 Qu'est-ce que j'utilise ?
     1.7 Remerciements à ...

  2. Preliminaires.

     2.1 Préface & Description
     2.2 L'intérêt d'une telle chose ...
     2.3 Les choses à connaître.
     2.4 Il y a deux voies différentes...

  3. Vos besoins.

     3.1 Une machine sous Linux
     3.2 Un compte supplémentaire 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 Création du fichier .fetchmailrc
     4.2 Création 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 Vérification du courrier
        4.4.2 crontab
     4.5 Chez votre fournisseur d'accès.
        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 Créez 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 boîte à 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 méthode ?
     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 différent des autres ?
     6.18 Localement mon domaine fonctionne, mais semble rien recevoir de l'extérieur.
     6.19 Mon chien est mort

  7. The End



  ______________________________________________________________________

  11..  PPrrééffaaccee..

  Dans ce chapitre je veux juste me mettre à l'abri de tous dommages et
  de retour de flamme - même 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 concernée plus loin ...

  Nota : tous les noms et types de fichier sont repertoriés ainsi :


       (*** < file > *** text ***)     .procmailrc


  Il s'agit donc d'un fichier .procmailrc contenant du texte. La
  variable texte peut aussi être codée. Cela pour définir 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 résident dans
  le répertoire de l'utilisateur comme /home/mailer).


  11..11..  DD''uunn ppooiinntt ddee vvuuee llééggaall..

  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 résulter 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 expérience, mais je peux encore
  faire des erreurs dans les informations ou les exemples. Chaque marque
  commerciale est la propriété de son détenteur 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 déclaration). Si votre
  chat meurt sous la charge de ce document, je n'en suis pas plus
  responsable ...


  11..22..  CCooppyyrriigghhttss

  Ce document et son contenu sont copyright (c)1997-98 de Gunther Voet.
  Toute reproduction non autorisée sous toute forme que ce soit est
  explicitement autorisée et même chaudement encouragée 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 régits 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 créer un système basé sur ce HowTo, pensez à
  mon copyright :) heh... - je ne suis pas méchant :)).  Bien sûr en
  tant qu'addon - PAS pour le programme de mail lui-même - bien que ce
  soit agréable d'y être inclus :))Je peux toujours avoir une adresse
  supplémentaire pour être encore plus critiqué :)) (je plaisante).


  11..33..  RRééaaccttiioonnss..

  J'espère que ce HowTo vous sera utile ainsi qu'à tous ceux qui le
  voudront.  Si vous avez des suggestions, commentaires ou corrections (
  exceptés les injures  :) ) - svp expédiez les moi à freaker@tuc.ml.org
  et j'en ferai la mise à jour pour la prochaîne version. Si vous
  publiez ce document dans un but commercial, une copie supplémentaire
  sera appréciée - vous pouvez me l'envoyer à mon adresse postale. Pour
  les critiques - vous pouvez me les expédier, mais elle finirons dans
  le répertoire /dev/null ...  aussi - ce n'est pas la peine encombrer
  la bande passante avec ! En plus je peux empêcher 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.


  11..44..  DDiissttrriibbuuttiioonn..

  La dernière version de ce document peut être téléchargée à 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)



  11..55..  CCoorrrreeccttiioonnss..


   v1.0.0        - Première version, test interne, nous l'avons essayé avant de
                   vous le donner :) ..  depuis il devient opérationnel 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 système YAY !
                 - La version japonaise arrivera bientôt, je vous signalerais
                    son emplacement dès que je le connaîtrai ...
                    (merci à Tetsu Isaji)




  11..66..  QQuu''eesstt--ccee qquuee jj''uuttiilliissee ??

  J'utilise Linux 2.0.30, un Pentium 166, carte ATI pci-mach64, Metro-X
  et une connexion internet par mon fournisseur d'accès (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 dès qu'il sort un patch
  :) croyez moi:) ça vous épargnera beaucoup de temps et de recherche
  d'erreur en le faisant :).


  11..77..  RReemmeerrcciieemmeennttss àà ......


  ·  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 système de lodus.net pour la maintenance de ce
     projet.


  22..  PPrreelliimmiinnaaiirreess..

  Bon, comment fonctionne ce système? 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 réponse.



  22..11..  PPrrééffaaccee && DDeessccrriippttiioonn

  Ce HowTo est dédié à 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 accès direct 24/24 ou un compte pour chaque utilisateur.... Ou vous
  avez un réseau interne - avec un serveur camouflé et vous voulez  que
  tous les utilisateurs aient une adresse e-mail, vous pouvez utiliser
  cette méthode pour le faire. Personnellement je l'utilise pour fournir
  aux utilisateurs et membres de mon groupe de démo 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
  accès e-mail permanent - et différentes adresses IP.  Tous ont une
  adresse e-mail, même s'ils n'ont pas accès à internet. Le seul à avoir
  un accès internet peut recevoir leur courrier à leur adresse
  personnelle - via le système décrit ci-dessous.  Vos utilisateurs
  peuvent expédier leur courrier comme ils ont l'habitude de le faire,
  et votre système gèrera les différentes 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'entête suivant la méthode
  choisie.


  22..22..  LL''iinnttéérrêêtt dd''uunnee tteellllee cchhoossee ......


  ·  Permettre de contacter tous les membres d'une organisation par
     adresse e-mail si nécessaire.

  ·  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 dépenser de l'argent pour ça (eh eh) - et qui veut
     quand même fournir une adresse e-mail à chacun de ses membres.

  ·  Un réseau 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'accès, pour les +200 comptes e-mail que vous pouvez créer sur
     votre serveur.

  ·  J'utilise la méthode B avec plus de 300 comptes e-mail avec un
     serveur perso à base de 486DX4-100 et le tout fonctionne en une
     minute.


  22..33..  LLeess cchhoosseess àà ccoonnnnaaîîttrree..


  ·  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 réseau 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 méthode à besoin d'un administrateur pour gérer 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
     même).

  ·  Une bonne bande passante et un espace virtuel conséquent chez votre
     fournisseur d'accès est indispensable quand vous avez plusieurs
     utilisateurs ... et soyez sûr d'y avoir assez de place quand vous
     expédiez les fichiers.

  ·  Tout le courrier sera transféré en une seule fois - aussi - le
     dernier message que vous recevrez sur votre serveur sera aussi le
     dernier que vous aurez expédier. "Premier entré -  premier sorti".

  ·  Dans la première méthode (to : ) il n'y a pas de problème avec les
     noms des différents utilisateurs - mais dans la seconde méthode -
     vous ne pouvez pas donner de sujet puisqu'il sera utilisé pour la
     délivrance à son destinataire. Beaucoup d'utilisateurs oublient
     d'utiliser le sujet du message... - ou ils ont besoin de le savoir
     clairement.

  ·  Si vous vérifiez 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 régulier.

  ·  Vous POUVEZ l'utiliser également lorsque vous avez un accès
     permanent :) et lui faire vérifier 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).



  22..44..  IIll yy aa ddeeuuxx vvooiieess ddiifffféérreenntteess......


  1. methode 'A' - que nous appellerons "(m(A))".

     Le système de courrier vérifie le destinataire du message d'après
     le "to:".  C'est la meilleure méthode puisque c'est l'adresse e-
     mail réelle . Vous avez besoin d'un autre compte sur un serveur ET
     avez besoin'une entrée DNS (MX) (votre propre domaine en
     l'occurrence). Si l'administrateur système veux bien vous aider,
     alors il n'y aura aucun problème ! Il redirigera TOUS les messages
     envoyés au nom de votre domaine sur votre compte ! Cela lui prendra
     du temps pour le faire :) aussi soyez sympa avec lui :)) Merci à
     mon administrateur système (Fred) j'ai  obtenu un nom de domaine et
     le service utilisateur pour mon groupe de démo. Il se peut qu'une
     entrée DNS vous coûte 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 transfère 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 entrée DNS ou
     vous n'avez pas besoin d'être gentil avec votre administrateur
     système pour qu'il vous arrange votre adresse e-mail :). J'ai
     utilisé cette méthode la première fois pendant près d'un an... je
     sais que c'est un peu truander, mais je ne vous ai pas dit que vous
     deviez utiliser cette méthode, aussi ne me tirez pas dessus -
     alors que je suis juste en train de vous fournir des solutions pour
     vos problèmes de messagerie :) - vous pouvez utiliser la méthode A
     qui est elle réglo !


  33..  VVooss bbeessooiinnss..

  Bon, vous avez besoin (bien sûr) d'une bécane 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 téléphonique -
  ou n'importe quel moyen de vous connecter à votre fournisseur d'accès.
  Vous avez besoin aussi de quelque software comme Fetchmail, Procmail,
  un compte supplémentaire, et votre compte e-mail ou d'une entrée  DNS
  avec un compte e-mail.


  33..11..  UUnnee mmaacchhiinnee ssoouuss LLiinnuuxx

  Ca peut-être n'importe quelle bécane... même un 8086... - mais il est
  préférable -  puisqu'il y aura quelques chargements à effectuer -  de
  posséder au moins un 386 :) plus votre babasse ira vite, plus votre
  logiciel sera rapide (pas vrai ?) :).


  33..22..  UUnn ccoommppttee ssuupppplléémmeennttaaiirree ssuurr vvoottrree mmaacchhiinnee ssoouuss LLiinnuuxx..

  Vous avez besoin de créer un compte supplémentaire sur votre système.
  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 différents
  destinataires de votre système, ou les envoyer vers l'extérieur :)).
  Créez-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 sûr !


  33..33..  FFeettcchhmmaaiill

  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 préférez 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 sûr qu'il fonctionne bien
  :).


  33..44..  PPrrooccmmaaiill

  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 gère
  merveilleusement et est bien mieux que l'agent par défaut puisqu'il
  délivre les messages utilisateur par utilisateur !  Pour
  l'installation je vous donne les mêmes conseils que pour Fetchmail.


  33..55..  UUnn ccoommppttee ee--mmaaiill..

  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
  différents 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 méthode B (adresse dans le
  corps du sujet) vous n'avez besoin de rien d'autre -  par contre la
  méthode A (adresse dans le champ "to ") en demande un peu plus -
  suivez le guide !


  33..55..11..  UUnn eennrreeggiissttrreemmeenntt DDNNSS ((MMXX))..

  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 contactés et qui
  pourraient interférer avec vos utilisateurs.  Et vos entêtes de
  messages doivent être filtrées sur ce domaine. Ce qui vous donne un
  domaine autonome pointant sur SON domaine. Par contre ça vous coûtera
  un peu plus cher, ou vous pouvez demander à votre administrateur
  système de rajouter une adresse impersonnelle pointant sur son
  serveur, cependant ça doit être un autre domaine que le sien !


  33..55..22..  FFaaiirree ssuuiivvrree llee ccoouurrrriieerr ddee ccoommppttee àà ccoommppttee ::))

  Bien, l'administrateur sytème a besoin de faire suivre tous les
  messages destinés à votre domaine sur votre compte... c'est une tâche
  relativement aisée pour lui s'il sait le faire :) ..sinon il devra
  lire le manuel du sendmail :) ( ou qmail ). Vous récupérez votre
  courrier sur votre compte et voilà ! Tous les messages seront
  redistribués sur votre propre domaine.


  44..  BBoonn,, jj''aaii ttoouutt ccee qquu''iill mmee ffaauutt,, eett mmaaiinntteennaanntt ??

  Vous avez créé votre compte supplémentaire, récupéré votre adresse e-
  mail et/ou l'entrée DNS pour rerouter sur votre compte... Procmail et
  Fetchmail sont installés, ok on peut balancer la sauce ! :) on y va !
  1. Vous devez créer un fichier .procmailrc qui contiendra les infos de
     routage vers vos utilisateurs.

  2. Vous avez besoin également de créer un fichier «nosuchuserfile»
     pour que l'expéditeur sache que son message n'as pas été délivré.

  3. Pour un boulot au top :) vous pouvez utiliser crontab pour vérifier
     le courrier. C'est le moyen le plus facile pour vérifier toutes les
     XX minutes si vous avez du courrier lorsque vous êtes connecté.


  44..11..  CCrrééaattiioonn dduu ffiicchhiieerr ..ffeettcchhmmaaiillrrcc

  Vous avez besoin de créer 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 gérer votre courrier. Testez-le en
  utilisant fetchmail (fetchmail -vv) et voyez si votre courrier est
  bien transféré ... Il devrait y avoir quelques erreurs puisque le
  fichier de contrôle procmail n'a pas encore été installé. Vous pouvez
  attendre de créer le fichier .procmailrc avant d'effectuer le test
  mais je vous préviens SI il y a erreur :) ça PEUT provenir de ce
  fichier :). Ce fichier doit être accessible au propriétaire du compte
  (dans mon exemple : mailservice) et doit être lisible par
  l'utilisateur mais PAS lisible par le groupe/extérieur puisqu'il
  contient le mot de passe principal :) (vous devrez changer les droits
  du fichier .fetchmailrc en 600)


  44..22..  CCrrééaattiioonn dduu ffiicchhiieerr ..pprrooccmmaaiillrrcc

  Ce fichier de contrôle distribuera le courrier vers son destinataire.
  Il y a deux manières de le faire comme nous l'avons vu précédemment :
  par le destinataire (to: ) et par le corps du sujet (moins réglo).  Ce
  fichier contiendra les différents destinataires des messages. Tous les
  commentaires précédés d'un # ne sont pas obligatoires - ils sont là
  uniquement pour vous permettre de suivre ma démarche... Vous pouvez
  aussi changer les droits de ce fichier en 600 - le reste du monde et
  le groupe nont pas besoin de connaître ces adresses privées :)...
  L'utilisateur doit aussi en être le propriétaire (comme mailservice)
  :). Le fichier "nosuchuserfile" renvoie un e-mail à l'expéditeur si le
  destinataire n'est pas trouvé dans le fichier procmail (le courrier
  n'est pas distribué) - aussi l'expéditeur sait que son adresse n'est
  pas valide.


  44..22..11..  PPoouurr llaa ddiissttrriibbuuttiioonn ppaarr llee ddeessttiinnaattaaiirree ((mm((AA))))::


       (*** < file > *** text ***)     .procmailrc




       ______________________________________________________________________
       # Cette ligne sert uniquement au débogage ! Il peut-être enlever dans un but
       # de confidentialité puisque vous aurez accès à toute la messagerie transitant
       # par votre domaine... Tous les messages seront copiés dans le fichier
       # "passtrough" avant d'être distribués aux destinataires... ici vous pouvez
       # voir ce qui ne va pas ...
       :0 c
               passtrough

       # l'e-mail avec l'entête "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 privée !

       :0 c
       * ^To:.*barbara@mydom.com
       ! barbara@her.private.one

       :0
       * ^To:.*barbara@mydom.com
       ! barbara

       # Ce script renvoie un e-mail vers l'expéditeur s'il n'a pas trouvé le
       # destinataire dans son fichier... il enverra le fichier "nosuchuser" dans le
       # corps du message comme réponse... attention ! vous avez absolument besoin
       # d'un tel fichier ! - le mien signale : " La personne que vous essayez de
       # joindre n'est pas abonnée à ce serveur, essayez à nouveau svp, il se pourrait
       # qu'elle ne soit plus présente".
       :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
       ______________________________________________________________________


  44..22..22..  PPoouurr llaa ddiissttrriibbuuttiioonn aavveecc ccoommmmee ""ssuujjeett:: ttoouusseerr"" ((mm((BB))))


       (*** < file > *** text ***)     .procmailrc






























































  ______________________________________________________________________
  # Cette ligne sert uniquement au deboggage ! Il peut-être enlever dans un but
  # de confidentialité puisque vous aurez accès à toute la messagerie transitant
  # par votre domaine... Tous les messages seront copiés dans le fichier
  # "passtrough" avant d'être distribués aux destinataires... ici vous pouvez
  # voir ce qui ne va pas...
  :0 c
          passtrough

  # l'e-mail avec l'entête "to: freaker@mydom.com" me sera directement dirigé,
  # les autres continuerons leur chemin... si vous avez un compte dédié pour
  # recevoir votre "mailservice" vous n'avez pas besoin de cette ligne :)
  :0
  * ^To:.*freaker@ibm.net
  ! freaker

  #  l'e-mail avec l'entête root@mydom.com sera dirigé vers le root !
  :0
  * ^Subject:.root
  ! root

  # l'e-mail avec l'entête barbara@mydom.com sera distribué à barbara...
  :0
  * ^Subject:.barbara
  ! barbara

  # l'e-mail avec l'entête peul sera transmis vers son adresse privée.
  :0
  * ^Subject:.paul
  ! paul@his.personal.emailaddress

  # Tout e-mail avec l'entête john sera transmis à son compte et une copie vers
  # son adresse e-mail privée...
  :0 c
  * ^Subject:.john
  ! john@his.personal.emailaddress

  :0
  * ^Subject:.john
  ! john

  # Tous e-mail d'ibm, avec les infos de mise à jour, seront envoyés à 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 expédie des "newsletters" etc... cette ligne est
  # obligatoire.
  :0
  * ^From:.*newsletter@ibm.net
  ! freaker

  # Tous les messages que le démon 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'expéditeur s'il n'a pas trouvé de
  # destinataire dans son fichier... il enverra le fichier "nosuchuser" dans le
  # corps du message comme réponse... 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 concernée, 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'accès - il a besoin de
  # connaître votre adresse exacte!
  # Sinon vous pouvez créer une boucle sans fin qui envoie un e-mail du style
  # "Ne dépensez 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
  ______________________________________________________________________






  44..33..  IIll nn''yy aa ppaass dd''aabboonnnnéé ...... ((ffiicchhiieerr nnoossuucchhuusseerr))


       (*** < file > *** text ***)     nosuchuser




       ______________________________________________________________________

       La personne que vous désirez contacter n'est pas abonnée à cette adresse.

       S'il vous plaît, utilisez la ligne réservée au sujet pour y écrire le nom de
       votre correspondant - exemple: "subject: freaker" enverra un mail à freaker à
       cette adresse"
       ______________________________________________________________________






  44..44..  FFiicchhiieerr ""ccrroonnttaabb""..

  Si vous ne savez pas comment crontab fonctionne :) il vaut mieux que
  vous lisiez le manuel :)...  Vous avez besoin de créer un fichier pour
  contrôle le courrier "checkmail" - celui-ci vérifiera si la connection
  est valide, de la même manière que cron...  - j'utilise le protocole
  ppp :) - aussi l'exemple suivant vérifiera la connection - ainsi que
  la messagerie toutes les 10 minutes en utilisant cron.  Ca paraît un
  peu louche - mais ça ne l'est pas !



  44..44..11..  VVéérriiffiiccaattiioonn dduu ccoouurrrriieerr

  Le fichier "checkformail" sera appelé (il doit être exécutable pour
  celà) - et il vérifiera la connection.  Si elle est valide alors il
  ira récupérer le courrier. Crontab utilisera ce fichier quand vous
  utilisez l'entrée 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
  ______________________________________________________________________





  44..44..22..  ccrroonnttaabb

  Cette entrée cron doit être chargée 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 répertoire /dev/null.


       (*** < file > *** text ***)     cronentry




       ______________________________________________________________________
       0,10,20,30,40,50 * * * *  /home/mailservice/.checkformail 1> /dev/null 2>
       /dev/null
       ______________________________________________________________________






  44..55..  CChheezz vvoottrree ffoouurrnniisssseeuurr dd''aaccccèèss..

  Ce qui suit doit être fait si vous utilisez la méthode 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 nécessaire ni chez vous ni chez votre
  administrateur système si celui-ci utilise une autre méthode.

  Si vous utilisez une nouvelle version de sendmail, l'ancienne version
  ne fonctionnera sans doute pas, aussi référez vous au manuel
  d'utilisation  pour que le routage d'e-mail ait lieu.


  44..55..11..  sseennddmmaaiill..ccff ((AAnncciieennnnee vveerrssiioonn ddee sseennddmmaaiill)) aajjoouutteezz lleess lliiggnneess
  ssuuiivvaanntteess aauu ffiicchhiieerr

  Ajoutez les lignes suivantes au fichier /etc/sendmail.cf, ainsi le
  fichier du domaine sera lu. SVP il est à noter que la règle 98 est
  ajoutée ci-dessous, ceci pour récupérer les erreurs :) c'est l'enfer
  pour les enlever ! (et je sait de quoi je parle :) DuH).


       (*** < file > *** add ***)    /etc/sendmail.cf





  ______________________________________________________________________
  # Base de données du domaine maintenu

  Kmaildomains btree /etc/maildomains.db

  # ajoutez ces lignes "dans" la règle 98 ! (sous la règle 98)

  R$+ < @ $+  . >         $: $1 < @ $2 > .
  R$+ < @ $+ > $*         $: $(maildomains $1@$2 $: $1 < @ $2 > $3 $)
  R$+ < @ $+ > $*         $: $(maildomains $2 $: $1 < # $2 > $3 $)
  R$+ < @ $* > .          $: $1 < @ $2 . >
  ______________________________________________________________________






  44..55..22..  ((NNoouuvveellllee vveerrssiioonn ddee sseennddmmaaiill)) AAjjoouutteezz cceess lliiggnneess aauu ffiicchhiieerr
  sseennddmmaaiill..ccff

  Avec la nouvelle version de sendmail (testé avec la version 8.8.7 et
  8.8.8), ignorez la méthode A, et ajoutez les lignes suivantes :


       (*** < file > *** add ***)    /etc/sendmail.cf




       ______________________________________________________________________
       # Base de données du domaine maintenu

       Fw/etc/sendmail.cw
       Kvirtuser btree /etc/maildomains.db

       *OR*

       Fw/yourhomedir/sendmail.cw
       Kvirtuser btree /yourhomedir/maildomains.db
       ______________________________________________________________________






  44..55..33..  ((NNoouuvveellllee vveerrssiioonn ddee sseennddmmaaiill)) EEddiitteezz llee ffiicchhiieerr //eettcc//sseenndd­­
  mmaaiill..ccww

  Editez le fichier /etc/sendmail.cw (ou /votrerépertoire/sendmail.cw si
  vous n'utilisez pas le même emplacement).  Un point positif à
  l'utilisation de votre répertoire: vous n'avez pas besoin d'être
  loguer root pour activer votre domaine. Bien que vous pouvez avoir des
  risques de sécurité si vous n'êtes pas rigoureux !

  Ce fichier peut déjà exister, ou a besoin d'être créé. S'il existe
  déjà soyez sûr de ne pas écraser les anciennes données - ou je vous
  rappelerai ma déclaration :)

  En premier lieu créez un fichier /etc/sendmail.cw, qui sera utilisé
  entre le domaine et l'utilisateur... (comme je vous l'ai déjà dit, le
  nom "mailservice" est à votre convenance - ça peut même être votre
  login (le mien est freaker)).  Exemple :


       (*** < file > *** text ***) /etc/sendmail.cw




       ______________________________________________________________________
       mydomain.dom            mailservice
       ______________________________________________________________________






  44..55..44..  CCrrééeezz uunn ffiicchhiieerr //eettcc//mmaaiillddoommaaiinnss ffiillee

  En premier lieu créez un fichier /etc/maildomains, qui sera utilisé
  entre le domaine et l'utilisateur... (comme je vous l'ai déjà dit, le
  nom "mailservice" est à votre convenance - ça peut même être votre
  login (le mien est freaker)).  (Vous pouvez avoir ce fichier dans
  votre répertoire, 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
       ______________________________________________________________________






  44..55..55..  AAuu ttrraavvaaiill !!

  Avec l'ancienne et la nouvelle version de sendmail vous avez besoin de
  créer les fichiers btree (base de données), suivez le guide :


  cd /etc    (or /yourhomedir)
  makemap btree maildomains < maildomains




  après celà, tuez le démon sendmail et redémarrez le. Maintenant ça
  devrait marcher ! Bonne chance :)



  55..  AAuuttoommaattiissaattiioonn

  OK, tout ce que nous avons vu fonctionne... (sinon ne pensez même 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 tête pour ajouter un utilisateur à votre fichier procmail...
  L'exemple suivant s'adresse à des utilisateurs plus expérimentés -
  parce que certaines choses ont besoin d'être changées. J'ai décidé
  d'utiliser la M(B) parce qu'elle est plus utilisée que la M(A) (moins
  chère). Mon exemple peut très bien être adapté à la M(A).


  55..11..  LLaa ssttrruuccttuurree..

  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.



  55..11..11..  LLee ffiicchhiieerr ddee pprree--rroouuttiinnee ""..pprrooccmmaaiillrrcc--hheeaaddeerr""

  Ce fichier servira à la fois au fichier de pre-routine et au fichier
  principal puisqu'ici seront rajoutés ou supprimés les différents
  utilisateurs. C'est un fichier très important, une copie de sauvegarde
  sera la meilleure chose à faire avant l'ajout d'un utilisateur, il
  PEUT y avoir des problèmes ... 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
  ______________________________________________________________________






  55..11..22..  LLee ffiicchhiieerr ddee ppoosstt--rroouuttiinnee ""..pprrooccmmaaiillrrcc--ffooootteerr""

  Comme mentionné ci-dessus, ce fichier doit être la post-routine
  puisqu'il ne sera pas utilisé pour délivrer les données - ce fichier
  contient le code de "rejet" pour retourner le message à l'expéditeur
  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
  ______________________________________________________________________






  55..22..  SSccrriipptt dd''aajjoouutt ddee bbooîîttee àà lleettttrree

  Ce script ajoutera un utilisateur au fichier de pre-routine, et mettra
  à jour le ".procmailrc" d'après le ".procmailrc-header" pour clôturer
  le tout. Les commentaires (précédés 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 préinstallé ...


  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 sûr 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 précédent
  sera supprimé du fichier .procmailrc. Pour effectuer une suppresion
  immédiate, il vous faut le supprimer à la fois dans le fichier
  .procmailrc et .procmailrc-header.
  Je vous crois assez compétent pour modifier le script pour que l'ajout
  d'un utilisateur à votre compte se fasse automatiquement et ce pour
  les deux méthodes.


  66..  AA ll''aaiiddee !! ((SSiicc))

  Bon, vous avez besoin d'un peu d'aide, non :) je pourrais être
  sarcastique et seulement vous dire: "vous feriez mieux de tout
  réinstaller, parce que vu d'ici c'est un peu le bordel"... ou  je peux
  vous aider ... - j'ai décris ici quelques problèmes courants.  Si vous
  avez des problèmes qui ne sont pas répertoriés 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, vérifiez que vous n'oubliez
  rien et si vous voulez que je vous aide expédiez 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.



  66..11..  LLee ssccrriipptt dd''aauuttoommaattiissaattiioonn nnee ffoonnccttiioonnnnee ppaass::


  ·  est-il executable ?

  ·  est-ce que votre emplacement par défaut est /bin/sh ?

  66..22..  QQuu''eesstt--ccee qquuee vvoouuss eenntteennddeezz ppaarr sseerrvveeuurr ddee mmaaiill aannoonnyymmee ??


  ·  Vous pouvez créer un compte comme "anon0001@votredomaine.dom" et le
     faire suivre vers une autre adresse e-mail... personne n'ayant
     accès au fichier .procmailrc, VOUS SEUL connaissez l'identité de
     vos utilisateurs !

  66..33..  MMoonn cchhaatt eesstt mmoorrtt


  ·  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 !

  66..44..  MMoonn cchhiieenn eesstt mmoorrtt


  ·  Hmmm... je ne peux rien faire pour vous, pourquoi vous me posez
     cette question ? ... Enterrez le...

  66..55..  LLiinnuuxx??


  ·  Un UNIX libre de droit - compatible Posix - créé par Linus Torvalds
     ...  Pourquoi êtes-vous en train de lire celà si vous ne connaissez
     même pas Linux ?

  66..66..  PPoouuvveezz vvoouuss mm''aaiiddeerr àà ttrroouuvveerr uunn ccoommppttee ??


  ·  Non! C'est un HowTo pour une utilisation personnelle, je me
     contrefous de votre fournisseur d'accès ainsi que de votre adresse
     e-mail.

  66..77..  PPoouurrqquuooii aavvooiirr eennlleevvéé "" ppeeuutt--êêttrree qquuee pplluuss ttaarrdd jjee rraajjoouutteerraaiiss
  qquueellqquueess ccoommmmeennttaaiirreess ......"" ??


  ·  Lisez le point 5.5 avec attention :) et verrez pourquoi... c'est
     parce que j'avais besoin de le rajouter sur demande générale :)


  66..88..  CCoommmmeenntt ppuuiiss--jjee oobbtteenniirr uunn ""ddoommaaiinnee"" ??


  ·  Demandez à votre fournisseur d'accès, il vous y aidera. Ca peut
     prendre des jours voire des semaines pour le demander à Internic -
     votre fournisseur d'accès peut aider.

  66..99..  PPoouurrqquuooii êêtteess--vvoouuss uunn eenncc...... eenn uuttiilliissaanntt cceettttee mméétthhooddee ??


  ·  Parce que je ne veux pas dépenser de l'argent et parce que j'aime
     bien être un enc... en l'utilisant - JE l'utilise - pourquoi ça
     vous ennuie ?

  66..1100..  LLee ffiicchhiieerr ""nnoossuucchhuusseerrffiillee"" ??


  ·  Vous pouvez y mettre ce que vous voulez - pourvu que l'expéditeur
     sache pourquoi son message a été refusé.

  66..1111..  EEsstt--ccee qquuee mmeess uuttiilliissaatteeuurrss ppeeuuvveenntt ééccrriirree eett eennvvooyyeerr dduu ccoouurr­­
  rriieerr ??


  ·  Ce n'est pas le but de ce système, lisez le manuel du sendmail...
     je vous explique ici comment RECEVOIR   du courrier et avoir
     toujours une adresse valide.

  66..1122..  EEsstt--ccee qquuee cchhaaqquuee uuttiilliissaatteeuurr aa bbeessooiinn dd''uunn ccoommppttee sshheellll ssuurr
  mmoonn sseerrvveeuurr ??


  ·  Nan... Mais ! Ce sera difficile pour les utilisateurs qui n'ont pas
     accès à internet :) vous pourriez avoir un réseau camouflé (et
     utiliser un ordinateur qui y soit connecté) pour que les
     utilisateurs puissent lire leur courrier de cette façon, ou bien
     vous pourriez créer un lien entre un BBS et le courrier
     électronique, vous pourriez même le transmettre vers une passerelle
     Fidonet :) Autant de circonstances qui permettraient d'éviter de
     donner un compte shell.

  66..1133..  ssaannss oobbjjeett


  ·  A priori un jeu de mot entre Skeletion et Skeleton

  66..1144..  ll''aajjoouutt ddee ccoouurrrriieerr ??


  ·  Pas de question - pour l'automatisation - vous feriez mieux d'être
     sûr 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 à interprêter et en plus j'y ai ajouté des commentaires.  Si
     vous avez l'intention de distribuer ce script, svp pensez à mon
     copyright !  merci ;)

  66..1155..  PPoouurrqquuooii êêtteess--vvoouuss ssii ccrruueell ??


  ·  Je ne suis pas cruel :) je suis gentil :) je suis le plus gentil
     garçon de la Terre, de l'univers ! MAINTENANT DEHORS ! ( je veux
     juste m'en tenir à mon HowTo et pas TROP dériver de mon point de
     départ - aussi :) that's all folks ! ).

  66..1166..  AAvveezz vvoouuss eeuu ddeess ppllaaiinntteess àà pprrooppooss ddee llaannggaaggee eexxcceessssiiff ??


  ·  Pas encore, mais, il se pourrait que je filtre toute chose
     contenant "excessif" et "langage" :) je ne sais pas :))

  66..1177..  PPoouurrqquuooii ccee HHoowwTToo eesstt--iill ssii ddiifffféérreenntt ddeess aauuttrreess ??


  ·  Parce que le fait de lire beaucoup de HowTo peut devenir barbant...
     j'ai voulu y ajouter autre chose...

  66..1188..  LLooccaalleemmeenntt mmoonn ddoommaaiinnee ffoonnccttiioonnnnee,, mmaaiiss sseemmbbllee rriieenn rreecceevvooiirr ddee
  ll''eexxttéérriieeuurr..


  ·  Vérifiez votre fichier "sendmail.cw, le nom de domaine a BESOIN de
     s'y trouver !

  66..1199..  MMoonn cchhiieenn eesstt mmoorrtt


  ·  Les règles ne fonctionnent pas, je ne peux recevoir d'e-mail, ou
     sendmail plante, référez 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.


  77..  TThhee EEnndd

  Il faut une fin à tout... si vous trouvez des bugs non repertoriés (ou
  des particularités), alors laissez de côté vos critiques... envoyez
  moi vos commentaires et suggestions :) Si vous êtes encore en colère
  après 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 sûr, 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 réservoir d'informa­
  tions utiles dans la résolution des problèmes sous Linux.
  ______________________________________________________________________

  Table des matières


  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 fenêtres
     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 détaillé pour les PC (Personal Computers)
     10.7 L'encyclopédie de Gary (Gary's Encyclopedia)

  11. Commentaires de conclusion

  12. Traduction



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  L'approche traditionnelle dans la résolution des problèmes liés 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 dernière
  technique. Malheureusement, c'est la norme dans la sphère des produits
  commerciaux propriétaires.

  A contradistinguo (NdT : adaptation libre du néologisme
  "contradistinction" utilisé par l'auteur), Linux, et les
  distributions, les utilitaires et les applications associés, ont
  largement été développés suivant le modèle Open Source
  <http://www.opensource.org>, dans lequel les développeurs utilisent la
  communication électronique via Internet --  classiquement sous forme
  de listes de diffusion publiques -- pour collaborer avec leurs pairs à
  l'amélioration 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 grâce aux forums Usenet et aux autres groupes de
  discussion, et les messages envoyés sont immédiatement disponibles
  sous forme d'archives consultables. Ces forums consacrés à Linux sont
  réputés pour le haut niveau de participation des utilisateurs. Pour
  une bonne partie, Linux peut être considéré comme un produit de
  l'Internet.

  Prises dans leur ensemble, ces ressources ouvrent un accès à une large
  base d'informations en perpétuelle évolution, et mon objectif est
  d'encourager et de diriger le lecteur dans l'utilisation de ces
  données lorsqu'il doit faire face à un problème non prévu 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 coût dérisoire ; la situation évolue
  partout peu à peu dans ce sens). Les gourous Linux qui assistent les
  nouveaux arrivants via Usenet deviennent rapidement conscients de la
  fréquence avec laquelle certaines questions techniques sont
  régulièrement postées -- questions dont les réponses sont déjà
  disponibles dans une ou plus des mines d'informations en ligne. Alors,
  pour diminuer la probabilité d'être insulté en réponse à la question
  que vous avez posée sur Usenet ou sur l'IRC, lisez ce qui suit !

  Equipés d'un butineur, les utilisateurs de Linux peuvent rapidement
  devenir des adeptes de la résolution de problèmes sur leurs systèmes.
  La clé étant de savoir comment et où chercher. Mon objectif est de
  guider l'utilisateur -- en particulier le débutant (newbie) sous
  Linux -- dans cette quête.


  11..11..  MMiisseess àà jjoouurr dduu ddooccuummeenntt

  La dernière version de ce document est toujours disponible sur
  <http://www.newbielinux.com>, mon site pour les débutants Linux.
  (NdT : la dernière version traduite en français est disponible sur
  <ftp://ftp.traduc.org>)


  11..22..  CCooppyyrriigghhtt eett LLiicceennccee

  Copyright (c) 1999, by Howard Mann.

  Ce document est régi par la Licence du LDP, dont les termes sont
  détaillés ici : <http://www.linuxdoc.org/copyright.html>


  11..33..  RReettoouurr eett CCoorrrreeccttiioonnss

  J'apprécie toujours d'avoir un retour et des critiques constructives.
  En particulier, je souhaiterais être averti des erreurs présentes dans
  ce document ainsi que des ressources absentes et qui mériteraient
  d'être citées.  D'avance, merci.

  22..  HHOOWWTTOO eett mmiinnii--HHOOWWTTOO

  Ces documents sont associés 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 différentes
  langues ; en particulier, pour les versions françaises, voir
  <http://www.traduc.org>)

  Ces HOWTO sont écrits (NdT : et traduits) par des utilisateurs de
  Linux et sont régulièrement mis à jour par leur(s) auteur(s). La
  plupart des auteurs fournissent la dernière version sur leur site web
  personnel, et un lien hypertexte vers la dernière version est
  habituellement fourni dans le document. Cette version peut être plus
  récente que celle disponible sur le site du LLDDPP.  Le document peut
  être publié en ligne avant son inclusion dans la base de données du
  LLDDPP. (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 envoyés au LLDDPP. Il est donc bien intéressant d'essayer de
  les chercher en utilisant un moteur de recherche comme je le décris
  dans une section suivante.

  Ces documents sont particulièrement utiles lorsque vous décidez
  d'accéder à un nouveau service ou d'en fournir un avec votre système
  Linux, ou lorsque vous vous lancez dans un projet techniquement
  complexe. Par exemple, vous pouvez avoir la possibilité d'accèder au
  Net avec des services AADDSSLL ou MMooddeemm ppoouurr ccaabbllee ; d'excellents guides
  sont disponibles sous la forme de HOWTO.

  De plus, les auteurs incluent souvent des références et des liens vers
  des sites qu'ils ont trouvés utiles. Vous pouvez trouver l'information
  dont vous avez besoin sur l'un des sites cités plutôt que dans le
  HOWTO lui-même.  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 réseaux, dans le EEtthheerrnneett HHOOWWTTOO.


  33..  FFooiirree AAuuxx QQuueessttiioonnss ((FFAAQQ))

  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) développeur(s) du produit en question, et les
  utilisateurs entreprenants hébergent parfois aussi une FAQ 'non
  officielle'. Cherchez la dernière version avec un moteur de recherche
  sur Internet.

  La FAQ est le premier document à utiliser pour régler des problèmes
  avec une application. De plus, des FAQ existent pour les distributions
  Linux, les gestionnaires de fenêtres, et les environnements de bureau
  (KDE et Gnome).

  Pour les débutants sous Linux, je fournis des liens vers trois FAQ qui
  ensemble traitent de llaa pplluuppaarrtt des questions posées 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/>


  44..  LLeess sseeccttiioonnss dduu ssuuppppoorrtt eenn lliiggnnee

  Ces sections se trouvent typiquement sur les sites web des
  distributions Linux, et contiennent souvent une variété de documents
  utiles avec les informations qui ne peuvent être traitées 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

  ·  Spécifications

  ·  Guides techniques

  ·  Guide du matériel ou Liste de compatibilité

  ·  Information sur la sécurité

  Certains sites web fournissent un moteur de recherche qui facilite
  votre quête de solution.

  Si vous avez un problème avec une distribution fraîchement installée,
  cherchez d'abord là car les rapports de bogues et les correctifs sont
  généralement postés ici.  Vous pouvez trouver un guide détaillé qui
  vous aidera à accomplir une tâche telle que mettre à jour votre noyau
  ou la dernière version de XFree86 X - Système de fenêtres que vous
  utilisez.

  Je vous recommande de passer un certain temps sur le site pour vous
  familiariser avec ce qui est disponible.



  55..  LLeess aarrcchhiivveess ddeess ffoorruummss UUsseenneett

  La capacité de rechercher et de retrouver l'information dans les
  messages publiés sur les groupes de discussion (Usenet) liés à Linux
  répresente un puissant outil dans la résolution de problèmes sous
  Linux.

  Les moteurs de recherche permettent à chacun de chercher dans les
  archives en indiquant le forum, des mots-clés, des auteurs, des dates,
  une langue et des combinaisons des précédents. En raison du nombre
  important de forums de discussion liés à Linux, les chances de trouver
  des informations utiles sont grandes.

  Je voudrais vous raconter une petite anecdote pour démontrer
  l'efficacité de cette approche. La première 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 idée de ce que aass8866 était, mais j'ai entré ce mot-
  clé dans l'utilitaire Power Search de ddeejjaa..ccoomm (voir plus bas), et
  j'ai obtenu un grand nombre de messages de gens qui avaient rencontré
  le même problème. Ceux qui ont répondu ont fourni la cause et la
  solution : je n'avais pas l'assembleur/lieur nécessaire pour créer le
  code machine, et le paquetage bbiinn8866 le contient. J'ai téléchargé et
  installé le paquetage RPM de la dernière version et tout était résolu.
  La démarche dans son ensemble a pris environ 10 minutes (j'ai une
  connexion ADSL au Net !).

  Il y a deux sites web qui fournissent un accès aux archives Usenet via
  un moteur de recherche, comme il est indiqué dans les sections
  suivantes.


  55..11..  PPoowweerr SSeeaarrcchh ssuurr ddeejjaa..ccoomm

  C'est le site principal pour tout ce qui concerne Usenet, et l'outil
  PPoowweerr SSeeaarrcchh est disponible ici : <http://www.deja.com/home_ps.shtml>.
  Passez un peu de temps sur le site à apprendre à utiliser réellement
  le moteur de recherche, sans oublier les nuances du Search Language
  <http://www.deja.com/help/help_lang.shtml>.  En particulier, notez
  l'intérêt d'utiliser le symbole joker (wwiillddccaarrdd).  Vous serez
  récompensé 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 agréable pour l'outil PPoowweerr SSeeaarrcchh sur :
  <http://www.exit109.com/~jeremy/news/deja.html>. Accommodez à votre
  goût cette page (j'aime l'option "DejaClassic"), et ensuite choisissez
  "Save Settings".

  Vous pouvez aussi trouver intéressant d'utiliser l'outil DDeejjaaSSeeaarrcchh,
  disponible sur :  <http://homemade.hypermart.net/dejasearch/>, qui
  sortira tous les messages trouvés 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.


  55..22..  SSeeaarrcchhlliinnuuxx..ccoomm ((CCNNEETT LLiinnuuxx HHeellpp))

  Il s'agit d'un site relativement nouveau qui offre la plupart des
  fonctionnalités de deja.com. Il dispose d'options de recherche de base
  ("basic") et avancée ("advanced"). La dernière n'offre pas autant
  d'options que l'outil PPoowweerr SSeeaarrcchh de deja.com. Il offre une option
  sympathique 'un seul click' pour voir un de ces propres messages et
  les réponses associées. Il se trouve sur :
  <http://www.searchlinux.com>.

  66..  LLeess mmootteeuurrss ddee rreecchheerrcchhee ssuurr IInntteerrnneett

  J'utilise fréquemment un moteur de recherche pour trouver des
  informations utiles ou nécessaires sur le Net. Ces moteurs cataloguent
  les pages des sites web commerciaux, personnels et scolaires, ainsi
  que les listes de diffusion et autres.

  Bien sûr, il y a un grand nombre de moteurs de recherche disponibles,
  et je vous suggère d'en utiliser plusieurs avant d'arrêter votre
  recherche particulière. 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 détails 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 GGooooggllee..ccoomm, et j'ai vais en discuter plus en détails.


  66..11..  GGooooggllee..ccoomm

  Ce moteur possède plusieurs fonctionnalités originales qui sont
  décrites 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 première page listée contenait
  l'information dont j'avais besoin.  Comme il stocke ('cache') les
  pages web, il est relativement rapide pour afficher les éléments
  demandés. Il existe aussi un outil appelé GGoooogglleeSSccoouutt ((TTMM)) qui fournit
  d'autres liens intéressant pour chaque élément trouvé.

  En plus, il dispose d'un moteur de recherche spécialisé 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 données
  des pages relatives à Linux sur GGooooggllee..ccoomm améliorant ainsi
  l'efficacité de la recherche. Essayez-le - je suis sûr que vous allez
  le mettre dans vos favoris immédiatement.


  77..  LLeess aarrcchhiivveess ddeess lliisstteess ddee ddiiffffuussiioonn

  Comme vous pouvez vous y attendre, il existe un très grand nombre de
  listes de diffusion relatives à Linux qui permettent aux développeurs
  et aux utilisateurs de communiquer et de collaborer sur des projets.
  Ces listes couvrent tous les aspects possibles de Linux, des arcanes
  techniques du développement du noyau aux discussions relativement
  vagues sur les problèmes des débutants. Les inscrits sur une liste
  donnée sont généralement bien informés sur le sujet de la liste, et
  des informations détaillées et utiles sont souvent récupérables. 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 archivées lorsque vous
  rechercherez avec un moteur de recherche sur Internet.

  Toutes les listes de diffusion ne sont pas associées à une archive en
  ligne, mais c'est de plus en plus le cas. De la même façon, toutes les
  archives ne sont pas associées à un moteur de recherche.

  D'abord, essayez de trouver l'archive de la liste de diffusion qui
  vous intéresse en tapant un ou plusieurs mots-clés et "mailing list
  archive" (NdT : parfois "liste diffusion archive" pour des listes en
  français) dans un moteur de recherche sur Internet.

  Pour obtenir une liste des listes de diffusion relatives à Linux,
  examiner des sites web tels que LLiinnuuxx RReessoouurrccee EExxcchhaannggee sur :
  <http://www.linuxrx.com/Lists/Lists.perl> et LLiinnuuxx OOnnlliinnee MMaaiilliinngg
  LLiissttss 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 fenêtres et/ou de
     l'environnement de bureau que vous utilisez,

  3. le site web dédié à l'application ou au projet en question,

  4. TThhee MMaaiill AArrcchhiivvee sur :  <http://www.mail-archive.com/list s.html>

  5. MMaaiilliinngg LLiisstt AArrcchhiivveess sur :
     <http://www.uwsg.indiana.edu/hypermail/>

  6. LLiinnuuxx MMaaiilliinngg LLiisstt AArrcchhiivveess sur :
     <http://kernelnotes.org/lnxlists/>

  7. TTuuxx MMaaiilliinngg LLiisstt AArrcchhiivveess sur : <http://www.tux.org/hypermail/>

  Ce n'est pas une liste complète 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.


  88..  LLeess mmaannuueellss dd''uuttiilliissaattiioonn eenn lliiggnnee

  Certaines des distributions majeures Linux et certains des
  gestionnaires de fenêtre/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 GGiimmpp (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 généralement
  disponible en ligne.


  99..  LLeess ttuuttoorriieellss UUnniixx eenn lliiggnnee

  Comme Linux est un système d'exploitation 'à la Unix', être familier
  avec les concepts fondamentaux d'Unix comme l'arborescence des
  répertoires 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
  connaître pour utiliser Unix. Je vous suggère de placer dans vos
  favoris les liens suivant comme une bibliothèque de références en
  ligne :


  1. Une référence vaste et bien organisée 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>


  1100..  RReessssoouurrcceess ddiivveerrsseess

  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 à portée de main.
  1100..11..  NNootteess ddee vveerrssiioonn eett llaa ddooccuummeennttaattiioonn ddiissppoonniibbllee rreellaattiivvee àà
  XXFFrreeee8866 -- SSeerrvveeuurr ddee ffeennêêttrreess

  Cette documentation accompagne chaque version de XFree86, et est
  disponible sur :  <http://www.xfree86.org/>. Chaque fois que vous avez
  un problème avec votre environnement X, parcourez les notes relatives
  à votre carte vidéo/puce graphique. Celles-ci procurent spécifiquement
  les détails concernant la configuration du système X-Window relatif à
  votre carte, et énumérera toutes les options que vous devez inclure
  dans le fichier XF86Config qui gouverne X.


  1100..22..  LLeess ppaaggeess GGNNUU TTeexxiinnffoo

  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 :


  ·  BBaasshh    - Le shell Bourne-again

  ·  CCoonnffiigguurree    - utilisé lors de la compilation de sources

  ·  GG++++    - le compilateur GNU C++

  ·  GGcccc  - le compilateur C

  ·  LLiibbcc  - la bibliothèque GNU C

  ·  MMaakkee  - 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 général, il s'agit de
  documents techniques détaillés d'un intérêt particulier pour les
  développeurs. Néanmoins, 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.


  1100..33..  LLeess llooggiicciieellss eett mmaannuueellss GGNNUU

  Beaucoup de programmes importants qui sont fréquemment utilisés par
  l'utilisateur Linux sont des utilitaires GNU -- par exemple, les
  programmes ttaarr (archive) et ggzziipp (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 généralement un peu plus d'informations que ce
  qui se trouve dans la page mmaann correspondante sur votre système. Par
  exemple, comparez la page mmaann et le manuel en ligne de l'utilitaire
  ttaarr .


  1100..44..  LLee gglloossssaaiirree ddeess tteerrmmeess rreellaattiiffss àà LLiinnuuxx

  Ce guide en ligne sur  <http://www.firstlinux.com/guide/> possède une
  jolie collection de termes et de définitions, classés par ordre
  alphabétique.  Allez là-bas si vous rencontrez un terme que vous
  n'avez jamais vu avant ou que vous ne comprenez pas.




  1100..55..  LLee ddiiccttiioonnnnaaiirree eenn lliiggnnee ddeess tteerrmmeess iinnffoorrmmaattiiqquueess eett tteecchh­­
  nnoollooggiiqquueess

  Le site WWeebbooppeeddiiaa 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
  présentent chaque élément avec plus de détails. Par exemple, j'ai
  utilisé ce site pour apprendre les différences entre les bus IISSAA et
  PPCCII.


  1100..66..  UUnn gguuiiddee ddééttaaiilllléé ppoouurr lleess PPCC ((PPeerrssoonnaall CCoommppuutteerrss))

  L'index par sujet de ce volumineux guide du matériel, disponible sur
  <http://www.PCguide.com/topic.html>, vous donnera une bonne idée du
  contenu de ce site. Je l'ai utilisé fréquemment lorsque j'ai installé
  Linux et configuré le système X-Window pour la première fois. J'ai
  appris beaucoup à propos des cartes vidéo et des écrans, y compris les
  concepts de résolution de l'écran, de profondeur des couleurs etc,
  utiles pour régler les problèmes d'affichage sous X.


  1100..77..  LL''eennccyyccllooppééddiiee ddee GGaarryy ((GGaarryy''ss EEnnccyyccllooppeeddiiaa))

  Le site de Gary Momarison sur
  <http://members.aa.net/~swear/pedia/index.html> contient un très grand
  nombre de liens classés relatifs à Linux. Vous pouvez utiliser la
  fonction "rechercher" de votre butineur pour trouver des liens dans
  une catégorie donnée.  Visitez ce site pour apprécier ce qu'il offre.


  1111..  CCoommmmeennttaaiirreess ddee ccoonncclluussiioonn

  Si vous êtes débutant sous Linux, il peut vous être utile de créer un
  répertoire RRééssoolluuttiioonn ddeess pprroobbllèèmmeess 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 fenêtres/environnement de
  bureau que vous utilisez.

  En utilisant ces liens, vous deviendrez rapidement un adepte de la
  résolution des problèmes en ligne.

  Mes amitiés et bonne recherche !


  1122..  TTrraadduuccttiioonn

  Ce document a été traduit par Benoît Sibaud. Merci de m'envoyer vos
  remarques et corrections à  <mailto:benoit.sibaud@wanadoo.fr>.  J'en
  profite aussi pour faire un peu de réclame : 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 décrit 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 matières


  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 Caractéristiques intéressantes :
        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 supplémentaires de configuration par Jeff Rooze

  4. Principe de fonctionnement de la technique magnéto-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 février 1998
        5.1.2 Échange avec Zed le lundi 16 février 1998 :


  ______________________________________________________________________


  11..  AAvveerrttiisssseemmeenntt


  Les personnes impliquées dans la rédaction, la distribution et la
  traduction du présent document déclinent toute responsabilité quant
  aux dommages qui pourraient découler de son utilisation.


  22..  CCooppyyrriigghhtt

  Les noms "Optical Disk-HOWTO" et "LF1000 mini-HOWTO" sont protégés.


  22..11..  LLFF11000000 mmiinnii--HHOOWWTTOO

  Copyright (c) 1996,1997 by Skip Rye, abr@brspc_0064.msd.ray.com

  22..22..  OOppttiiccaall DDiisskk--HHOOWWTTOO

  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 définis à l'adresse :
  sunsite.unc.edu/LDP/COPYRIGHT.html.



  33..  TTeecchhnnoollooggiiee dduu cchhaannggeemmeenntt ddee pphhaassee ooppttiiqquuee


  33..11..  IInnttrroodduuccttiioonn

  La technologie du changement de phase permet de stocker l'information
  binaire via l'état de phase d'un matériau particulier. Le périphérique
  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
  complètement amorphe. Le support ne réfléchira pas les émissions laser
  de la même façon selon qu'il se présente cristallisé ou non. Il est
  ainsi possible de stocker des données sur le disque.


  La spécificité du disque optique réside en ce que le formatage du
  disque repose sur une succession de pistes concentriques chacune
  divisée en secteurs, à l'instar des disques magnéto-optiques. La
  proximité des pistes autorise le stockage d'une quantité de données
  importante. A la différence d'un cédérom, cela confère à l'ensemble
  l'aspect d'un disque magnétique.  Les cédéroms sont eux dotés d'une
  piste en spirale à l'image de celle des CD audios La différence 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 données, opération couteuse
  avec un système magnéto-optique. Le support possède en outre la
  propriété intéressante de ne PAS être sensible aux champs magnétiques
  ou aux décharges électriques. Cela lui confère une durée de vie
  particulièrement élevée.


  33..22..  LLFF11000000 PPaannaassoonniicc


  33..22..11..  CCaarraaccttéérriissttiiqquueess iinnttéérreessssaanntteess ::


  ·  Lecture/écriture des disques optiques.

  ·  Lecture des cédéroms en quadruple vitesse.

  ·  Lecture des CD Kodak (stockage des photos).

  ·  Le support a une durée de vie de 15 ans.

  ·  Interface de type SCSI-2.

  ·  Formatage en pistes et secteurs.

  ·  Temps d'accès de 165 ms (bien meilleur qu'une bande de sauvegarde).

  ·  650 Mb de données par disque.

  ·  Les disques coûtent dans les 50 $ pièce.


  33..22..22..  CCee qquu''iill ffaauutt ssaavvooiirr


  ·  Le format du disque optique n'est pas compatible avec un autre
     lecteur.

  ·  Le support Unix semble inexistant. Le produit cible plutôt les
     utilisateurs de DOS/Windows et de Macintosh.

  ·  N'achetez pas le lecteur PD qui utilise le port parallèle. A ma
     connaissance, aucun pilote de périphériques sous Linux ne le gère.


  33..22..33..  IInnssttaallllaattiioonn

  Le LF1000 est un périphérique 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 contrôleur SCSI Adaptec 1542C.
  La prise en charge et l'insertion dans l'arborescence du disque ont
  suivi les étapes ci-dessous :


  33..22..44..  PPhhaasseess ddee ll''iinnssttaallllaattiioonn


  ·  Mettez en place le lecteur et configurez son numéro de périphérique
     sur la chaîne SCSI de façon qu'il n'interfère pas avec les autres
     éléments de la chaîne. Rebranchez les câbles.

  ·  Démarrez l'ordinateur. Le contrôleur SCSI devrait remarquer la
     présence du lecteur.

  ·  Au cours du lancement du noyau Linux, vous apercevrez normalement
     un nouveau périphérique SCSI. Comme je disposais déjà d'un lecteur
     magnéto-optique sur la chaîne SCSI, le périphérique 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 accès en lecture (pas d'écriture).

  ·  mount -t ext2 -o defaults /dev/sdb /pd -- accès en
     lecture/écriture.

  _P_r_ê_t_s _p_o_u_r _l_e _d_é_c_o_l_l_a_g_e _?


  33..22..55..  CCoonnsseeiillss dd''uuttiilliissaattiioonn


  ·  Le support physique est sensé être ré-inscriptible environ 500000
     fois.  Il n'est donc pas recommandé d'installer un système
     d'exploitation à usage permanent tel Linux sur un disque optique à
     changement de phase. De tels systèmes d'exploitation usent souvent
     du disque à des fins de cache mémoire. Au fil du temps, l'espérance
     de vie du support à changement de phase risque d'être atteinte.


  ·  Montez autant que possible le disque en lecture seule.

  ·  Pour les accès au disque en écriture, privilégiez les transferts de
     grandes quantités de données. Vous diminuerez ainsi la dispersion
     des fichiers, source de nombreux déplacements.

  ·  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 récupération 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 remplacés par les fichiers
     correspondants. Note du traducteur : cp -arp y remédie.]

  ·  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 désenclencher la protection en écriture du
     disque.


  33..33..  NNootteess ssuupppplléémmeennttaaiirreess ddee ccoonnffiigguurraattiioonn ppaarr JJeeffff RRoooozzee

  Bonjour,

  J'ai lu votre article traitant de la configuration du Panasonic
  LF-1000 sous Linux. Sur mon système, le disque optique et le cédérom
  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 démarre Linux. Enfin, j'utilise sur les disques
  optiques un système de fichiers de type ext2.

  J'ai rencontré quelques problèmes.


  Tout d'abord, mon disque dur occupait l'ID SCSI 6 et mon lecteur à
  changement de phase l'ID 4. Je désirais une priorité plus élevée pour
  mon disque dur que pour le lecteur à changement de phase. Sous Linux,
  le pilote SCSI recherche les périphériques en partant de l'ID SCSI la
  plus basse. Par conséquent, le nommage des périphériques dépendait du
  contenu du disque optique. Difficile de vivre avec une racine attachée
  à un périphérique dont le nom change sans arrêt ! J'ai résolu le
  problème en modifiant l'ordre de recherche des périphériques 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
  cédérom 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
  périphérique.  Le cavalier #2 doit être en position basse. S'il est en
  position haute, l'identité du périphérique dépend 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 périphérique se manifeste comme un lecteur de
  cédéroms.  J'utilise une carte SCSI 16-xx de Future Domain en guise
  d'adaptateur.  Le pilote correspondant dans le noyau linux reconnaît
  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 façon que tous les LUNS soient examinés par les
  gestionnaires SCSI au démarrage (option "scan all LUNS"). Le noyau
  affecte un nom différent à chaque périphérique. Ce qui suit provient
  d'un enregistrement des messages de démarrage. Vous remarquerez la
  présence d'une série d'erreurs, due à l'absence de disque dans le
  lecteur tandis que celui-ci tentait d'accéder à la table des
  partitions pour obtenir la taille des blocs. Par défaut, la taille des
  blocs est fixée à 512 octets. Je pense modifier prochainement ce
  comportement, pour le gestionnaire SCSI Future Domain, lorsqu'un
  périphérique optique est détecté.
       >  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 décrivant les arborescences
  disponibles sur ma machine (/etc/fstab) pour que chaque périphérique y
  soit présent.  Je n'ai pas tenté le montage automatique au démarrage.
  Ci-suit un extrait de mon /etc/fstab. Les options les plus importantes
  sont noauto, rw (resp. ro) et les indicateurs de vérification.

  Afin de créer un système de fichier sur le disque à changement de
  phase, j'ai utilisé la commande suivante : "mkfs.ext2 -i 2048
  /dev/sdb".



       # fstab - Liste des systèmes 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





  Après ces changements, je n'ai pas eu de problèmes au montage de
  quelque périphérique que ce soit. Il me suffit d'insérer un disque et
  de taper "mount /optd" ou "mount /dist". Le système se charge du
  reste.

  J'espère 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 arrière. Après avoir
     déterminé quelle était la position ouverte de l'interrupteur, je
     l'ai notée "DOS". L'autre correspond bien sûr à Linux. Avant le
     démarrage de mon système, j'agis sur l'interrupteur en conséquence.
     Il semblerait que la position Linux soit la plus fréquemment
     employée.

  ·  Redémarrage de la machine. On doit voir apparaître 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 cédéroms que de disques à changement de
     phase.

  ·  Utilisation de la commande mount adéquate.

  ·  Un ``df'' pour vérifier que tout va bien.

  Ma tentative de passage à 6 de l'identité SCSI de mon disque primaire
  a révélé certains problèmes. Je ne me souviens plus exactement mais
  cela semblait provenir du fait que mon contrôleur Adaptec 1542 et le
  SCSI Corel exigent un disque amorçable 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.


  44..  PPrriinncciippee ddee ffoonnccttiioonnnneemmeenntt ddee llaa tteecchhnniiqquuee mmaaggnnééttoo--ooppttiiqquuee


  44..11..  IInnttrroodduuccttiioonn

  Les disques magnéto-optiques ont recours à un champ magnétique dit
  ``lointain'' et à un faisceau laser pour modifier la polarisation d'un
  milieu magnétique. Le support est tel qu'il doit être chauffé pour
  qu'un changement de polarisation soit possible, d'où la présence du
  laser. Un laser de puissance provoque un échauffement de la surface du
  disque jusqu'à une température suffisante pour que le champ
  ``lointain'' soit capable de polariser la surface magnétique. Peu
  après, le disque refroidit et fixe la polarisation.  Je crois qu'un
  laser de faible puissance sert pour la lecture, le champ magnétique dû
  à la polarisation du disque interagissant avec les composantes de son
  champ électromagnétique. J'espère que c'est à peu près ça mais rien
  n'est moins sûr. A corriger peut-être.

  La précision apportée par le laser pour le changement de polarisation
  autorise une densité de pistes et de bits plus élevée que celle des
  techniques magnétiques conventionnelles. Le champ ``lointain'' élimine
  les dégâts parfois occasionnés par les têtes magnétiques, du moins si
  l'étiquette de votre disque ne se relève pas subitement et s'il n'y a
  pas une saloperie du même genre sur la cartouche du disque. La plupart
  des supports autorisent le stockage de 650 Mo de données par face et
  sur certains modèles les deux faces sont employées, portant la
  capacité à 1,3 Go. Il faudra cependant retourner le disque pour passer
  d'une tranche de 650 Mo à l'autre.


  44..22..  OOllyymmppuuss,, EEppssoonn,, MMiittssuubbiisshhii MMKK223300LLKK33 -- SStteepphhaann SShhuuiicchhii HHaauupptt

  Stephan Shuichi Haupt <stephan@bios.t.u-tokyo.ac.jp>

















































  Bonjour,

    j'ai remarqué que le HOWTO ne parle guère des disques magnéto-optiques,
  peut-être en raison de leur manque de popularité. Au Japon, ils sont
  cependant fort répandus, plus particulièrement les modèles trois pouces
  et demi qui supportent des disques de 128, 230 et dernièrement 640 Mo.
  J'imagine que les informations en japonais concernant ces lecteurs ne
  manquent pas. Certaines personnes ne s'en estiment néanmoins guère plus
  avancées pour autant :o). Les disques magnéto-optiques s'emploient comme
  n'importe quel autre support amovible et s'avèrent adaptés aux petites
  sauvegardes compte tenu de leur faible coût (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 employés : plusieurs (Olympus, Epson et en ce moment un MK230LK3
  de Mitsubishi), pas de problèmes particuliers. Les lecteurs présentent
  parfois des cavaliers aux configurations exotiques (``Mode Mac'' et
  autres). Désactivez-les. Si vous souhaitez vous équiper d'un disque,
  faites attention à la taille du cache : elle peut améliorer notablement
  le taux de transfert, qui restera bien sûr inférieur à ceux des disques
  durs.
  Contrôleurs SCSI : cartes à base de NCR53C810 (Asus SC-200), Adaptec
  APA-1460A, Adaptec AHA2940.
  Installez le lecteur comme vous le feriez avec un disque SCSI
  supplémentaire. Il apparaîtra de la même façon. Aucun disque n'est
  requis dans le lecteur au démarrage.

  Il y a deux façons de formater les disques :
  - à la mode disquette. Lancez directement mkfs sur le périphérique associé,
  à savoir quelque chose comme sdb ou sdc. Je déconseille cette méthode (cf.
  ci-dessous) ;
  - comme un disque dur. Utilisez fdisk pour partitionner le périphérique et
  appliquez ensuite mkfs aux partitions concernées (quelque chose du style
  sdc0, je n'ai pour ma part jamais défini plus d'une partition sur un disque
  magnéto-optique).
  Je n'ai pour l'instant pas encore essayé de démarrer depuis un disque
  magnéto-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 prévus pour dos ou windows, une fois formatés à la
  mode ``disquette'', risquent de s'avérer inutilisables avec l'un quelconque
  de ces systèmes 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 : prêtez-y donc attention (cf. la page de manuel de fdisk).
  La taille des secteurs n'est pas positionnée automatiquement par mkdosfs.
  Invoquez ``mkdosfs -s 8''. Cette information a été pêchée dans un site ouaibe, courant
  1995 (merci à Ken Kawabata pour l'avoir trouvée et déchiffrée). Un système
  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 magnétiques bien sûr,
  mais également aux contraintes mécaniques. Certains formats paraissent
  plus fragiles, le Mac semblant le pire : des pertes de données ont eu
  lieu lors de retraits de disques avec de faibles trafics réseau.

  Ces informations n'aideront personne à retrouver son chemin au fin fond
  de la jungle, mais elles peuvent quand même s'avérer 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 décembre 1998 mise à jour de Steve -------------------

  Bon, certains problèmes vont parfois se manifester avec les disques
  magnéto-optiques. La meilleure façon de les éviter consiste à ne pas
  employer les disques tels quels au sortir du magasin. Le montage
  risque même de provoquer des plantages du noyau. J'ai
  malencontreusement essayé de monter un disque de 640Mo, prétendument
  formaté sous Windows 95, peut être en FAT32, en tant que système de
  fichier vfat : à éviter...
  De plus, les noyaux 2.0.x ne gèrent pas les blocs de 2 ko (ainsi que les
  disques de 640 Mo). Un patch adéquat semble se promener quelque part
  au Japon mais je n'ai pas encore mis la main dessus. Le lien suivant
  en fournira sûrement la description :
  http://elektra.e-technik.uni-ulm.de/~mbuck/linux/patches.html.
  Sinon, allez fouiller du côté de u-tokyo.ac.jp. La page des développeurs
  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 dès que
  j'aurai un peu de temps (et quelques disques).

  Tout ce qui précède a été réalisé 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: --





  44..33..  FFuujjiittssuu DDyynnaaMMOO 664400 -- PPhhiill GGaarrcciiaa

  pgarcia@execpc.com

    Vous avez sûrement déjà reçu de nombreux messages concernant le Dynamo
  640 de Fujitsu. Je dispose de la version interne, le 640SZI. Numéro de
  version donné par le gestionnaire SCSI : M2513-MCC3064SS. J'ai
  dernièrement 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 gèrent pas les noyaux 2.0.x mais
  qu'admettent les noyaux de développement. Un patch pour les noyaux
  2.0.x est disponible via :
  http://wwwcip.informatik.uni-erlangen.de/~orschaer/mo/.
  Le même site vous fournira une version adaptée de fdisk.

  Autrement, l'installation du périphérique ne diffère pas de celle d'un disque
  dur SCSI. Il fonctionne bien et j'en suis très content.

  Phil Garcia




  44..44..  PPaannaassoonniicc LLFF--77001100 -- PPhhiilliipp KKeerrrr

  philip_kerr_at_wmc__brsf2@wmcmail.wmc.ac.uk































































       Cher Skip

    Vous avez demandé dans votre HOWTO aux utilisateurs de relater leurs
  expériences des disques optiques sous Linux. Vous trouverez ci-dessous les
  détails 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.
    Amitiés
      Philip Kerr <philip.kerr@wmc.ac.uk>

    PS : j'essaie à présent 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'entrée adéquate 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
  Réinitialisation...
  Montage du disque...
  J'ai encore ajouté une entrée à la fstab :
       /dev/sdb           /mnt/dostical          msdos   noauto,rw,user 0 0
  A présent, je peux accéder à des disques optiques formatés aussi bien en
  ext2 qu'en msdos en utilisant au choix le point d'ancrage optical ou
  dostical.




  55..  LLeess jjuukkee--bbooxx ooppttiiqquueess

  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 périphérique. La commande de
  montage prenait le périphérique adéquat 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
  véritable corvée jusqu'à ce que je découvre 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
  sûr, on reste cantonné à de la lecture pour un système dans lequel on
  espère qu'il n'y aura pas trop de processus à accéder simultanément au
  juke-box. Le disque s'arrête, le support le charge, se déplace, le
  range, se déplace 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 vérité !


  55..11..  MMaaxxooppttiixx 552200 -- ZZeedd SShhaaww

  shawz@imap1.asu.edu

  55..11..11..  MMeessssaaggee oorriiggiinnaall ddee ZZeedd -- 1133 fféévvrriieerr 11999988















  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'accès aux lecteurs me pose de sérieux problèmes. Pour
  l'instant, je ne vois que deux lecteurs et quelque chose qui répond au doux
  nom de MAXLYB. Je pense qu'il s'agit d'un vague contrôleur.
  Je me demandais si votre juke-box était du même 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 accès à 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




  55..11..22..  ÉÉcchhaannggee aavveecc ZZeedd llee lluunnddii 1166 fféévvrriieerr 11999988 ::










































  > Il semblerait que votre Maxoptix 520 soit un juke-box à deux lecteurs.
  Oui, celui-là même.

  >
  > Tous les juke-box sont munis d'un contrôleur de platine. Il s'agit
  > probablement du périphérique MAXLYB.
  > ...

  J'ai découvert que l'on ne s'inquiétait 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 société pareille
  peut vivre. Je vais encore les harceler, vous avez raison, l'engin
  a besoin d'un pilote qui gère sa platine. Du côté des bonnes nouvelles,
  on signale que le MX520 (il s'agit du numéro de série du juke-box) émule
  pas mal de contrôleurs différents. Peut-être un de ceux-ci est-il géré ?
  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 spécifications de programmation du contrôleur de platine et
  > peut-être pourrons-nous en écrire un !
  >

  Pour sûr, si je n'arrive pas à obtenir le moindre pilote et que j'arrive à
  convaincre les gens de Maxoptix de me fournir les spécifications, 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-même. Connaissez-vous quelqu'un d'autre
  dont nous pourrions tirer quelque chose ?

  >
  > Transmettez-moi les informations que vous obtiendrez afin que je les
  > intègre, ainsi que les remerciements, dans le HOWTO.
  >

  Naturellement. Je vais commencer par glaner quelques informations. Pour
  l'instant ça reste léger.

  > > Je me demandais si votre juke-box était du même 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 accès à
  > > 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'avère assez lent. Je préférerais l'avoir sous la main.

  Je ne dispose pas de cet engin chez moi : les 30000 dollars que mon employeur
  a dépensé pour l'obtenir me font défaut. Néanmoins, il n'en a rien tiré et
  a dû le laisser ramasser la poussière depuis un an. Il me laisse donc
  m'amuser avec et essayer de lui trouver un usage.

  Je reprendrai contact dès que j'aurai des informations supplémentaires,
  sûrement 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 française par Stéphane Lee Chip Hing, slee@ile-
  maurice.com
  v1.2, 04 août 1998

  Un guide pour installer et configurer le Serveur de Base de Données
  Oracle sur un système Linux.
  ______________________________________________________________________

  Table des matières























































  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 Préparation du Serveur
        2.1.1 Création d'un Utilisateur Oracle
     2.2 Installation depuis le CDROM
     2.3 Tâches de Post Installation
        2.3.1 Tâches pour Root
        2.3.2 Tâches pour Oracle
        2.3.3 Ceux que vous pouvez enlever

  3. Création d'une base de données

     3.1 Créer le fichier d'Initialisation
     3.2 Création du script pour l'installation de la base de données
     3.3 Exécuter le script pour l'installation de la base de données
     3.4 Démarrer la base de données
     3.5 Arrêter la base de données
     3.6 Créer un Utilisateur par défaut

  4. Configurer SQL*Net sur le Serveur

     4.1 (TT
     4.2 (TT
     4.3 (TT
     4.4 Lancer et Arrêter les Ecouteurs.

  5. Configuration du Client

     5.1 Clients Windows
     5.2 Clients Unix

  6. Lancement et Arrêt Automatique

     6.1 (TT
     6.2 (TT

  7. Autres trucs

     7.1 Agent Intelligent

  8. Dépannage

     8.1 Je ne peux pas créer une base de données en utilisant Oracle 7.2.x.
     8.2 J'obtiens les défauts de segmentation dans le

  9. Crédits



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  HHiissttoorriiqquuee ddeess VVeerrssiioonnss



  ·  v0.1 - 21 fév. 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 Dépannage ajoutée et
     rangement général

  ·  v1.2 - 04 août 1998 - Paul Haigh - Nouvelles d'Oracle Corp ajoutée
     et section sur les Améloirations Futures supprimée.


  11..22..  CCooppyyrriigghhtt

  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 autorisée et encouragée. 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 précisant celui ou celle qui a traduit ce document.


  11..33..  MMiissee eenn ggaarrddee

  Bien que j'ai essayé d'inclure les informations les plus correctes et
  les plus récentes a ma disposition, je ne peux garantir que leur
  utilisation ne va pas occasionner des pertes de données ou de
  matériel.  Je ne fournis AUCUNE GARANTIE sur les informations dans ce
  HOWTO et je ne suis responsable d'aucune conséquence résultant de
  l'utilisation des informations de ce document.


  11..44..  BBuutt ddee ccee HHOOWWTTOO

  Dans ce HOWTO, je vais essayer de couvrir l'installation et
  l'administration basique d'une base de données Oracle tournant sur une
  machine Linux. Je vais couvrir particulièrement 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 données Oracle. Si c'est cela que vous
  recherchez, il y a de bons livres sur ces sujets publiés par O'Reilly
  et autres.


  Je ne vais pas non plus couvrir le développement des programmes Oracle
  sous UNIX. Si cela vous est absolument nécessaire, je vous
  recommanderais d'acheter le système de développement de SCO (avec
  OpenServer 5.x) , dont on m'a dit qu'il pouvait être obtenu pour un
  prix très raisonnable US $19, à SCO <http://www.sco.com>

  11..55..  PPrréé--RReeqquuiiss

  Je suppose acquises un certain nombre de notions pour comprendre la
  suite du HOWTO.


  ·  LLee CCDD SSeerrvveeuurr OOrraaccllee ppoouurr SSCCOO OOppeennSSeerrvveerr ((VVeerrssiioonn 77..33..33..00..00..))

        Ceci  ddooiitt être une copie légale.  N'oubliez pas qu'Oracle est
        une société commerciale et vend ses produits. Si vous voulez une
        base de données 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
        téléchargeable sur le site web d'Oracle. Je ne l'ai pas
        personnellement essayé et ce n'est pas vérifié.



  ·  UUnn SSeerrvveeuurr LLiinnuuxx


        Vous n'auriez pas lu ceci sans un... N'est-ce pas?



  ·  NNooyyaauu 22..00..3300++


        Je ne peux garantir que les instructions seront fiables pour les
        autres noyaux. (ni pour le 2.0.30, d'ailleurs...)



  ·  iiBBCCSS


        Il est très important que ceci soit installé et tourne avec la
        version la plus récente possible pour votre plate-forme.
        (J'utilise iBCS-2.0-10.i386.rpm de RedHat Linux).



  ·  BBeeaauuccoouupp dd''eessppaaccee ddiissqquuee


        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. Néanmoins, je vais
        essayer de souligner les endroits où l'on peut libérer de
        l'espace.



  ·  3322MMbb++ RRaamm


        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 réserves 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é.


  ·  LLiicceenncceess ddee OOrraaccllee


        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 illégal.




  11..66..  NNoouuvveelllleess dd''OOrraaccllee CCoorrppoorraattiioonn

  Oracle a cédé sous la pression de la communauté Linux. Oracle
  Corporation a décidé de supporter ooffffiicciieelllleemmeenntt Oracle 8 sur la
  plate-forme Linux (i386). Elle doit être lancé en décembre 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.

  Références:

  ·  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


  22..  IInnssttaallllaattiioonn dduu llooggiicciieell OOrraaccllee

  22..11..  PPrrééppaarraattiioonn dduu SSeerrvveeuurr

  22..11..11..  CCrrééaattiioonn dd''uunn UUttiilliissaatteeuurr OOrraaccllee

  Nous avons évidemment besoin d'un utilisateur pour maintenir la base
  de données 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 défaut d'Oracle. Il inclut
  l'utilisateur ORACLE et le groupe DBA.


  1. Se connecter comme root


  2. Créer l'utilisateur oracle et le groupe dba.


       ______________________________________________________________________
       $ groupadd dba
       $ useradd  oracle
       ______________________________________________________________________




  3. S'assurer que le répertoire 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
       ______________________________________________________________________





  22..22..  IInnssttaallllaattiioonn ddeeppuuiiss llee CCDDRROOMM

  Malheureusement, l'Installateur Oracle sur le CD SCO ne marchera pas.
  Beaucoup de problèmes peut être rencontrés, des core dumps aux
  blocages. On doit donc copier les fichiers du CDROM manuellement et
  les décompresser:

  (S'assurer que le CDROM est monté sur le système).

  1. Se connecter comme utilisateur Oracle

  2. Changer de répertoire pour /home/oracle/7.3.3.0.0.

  3. Copier les fichiers d'installation du CDROM


       ______________________________________________________________________
       $ cp -a /mnt/cdrom/* .
       ______________________________________________________________________




  4. Décompresser les fichiers Oracle du CDROM.


       ______________________________________________________________________
       $ find . -name *_ -exec ~/7.3.3.0.0/orainst/oiuncomp {} \;
       ______________________________________________________________________





  22..33..  TTââcchheess ddee PPoosstt IInnssttaallllaattiioonn

  22..33..11..  TTââcchheess ppoouurr RRoooott

  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 propriétaire 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
       ______________________________________________________________________

  22..33..22..  TTââcchheess ppoouurr OOrraaccllee

  Changer les permissions pour les fichiers Oracle pour s'assurer de
  leur bonne exécution.


       ______________________________________________________________________
       $ chmod +x $ORACLE_HOME/bin/*
       $ chmod u+s $ORACLE_HOME/bin/oracle
       ______________________________________________________________________





  Les outils Oracle demandent que les messages soient dans le répertoire
  $ORACLE_HOME/tool_name/mesg.  Donc, déplacez les fichiers  msb  des
  répertoires  msg_ship aux répertoires 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/.
       ______________________________________________________________________




  Créer les répertoires suivants, s'ils n'existent pas:


       ______________________________________________________________________
       $ mkdir $ORACLE_HOME/rdbms/log
       $ mkdir $ORACLE_HOME/rdbms/audit
       $ mkdir $ORACLE_HOME/network/log
       ______________________________________________________________________




  22..33..33..  CCeeuuxx qquuee vvoouuss ppoouuvveezz eennlleevveerr

  Les répertoires suivants peuvent être enlevés sans problème:

  ·  $ORACLE_HOME/guicommon2/

  ·  $ORACLE_HOME/ctx/

  ·  $ORACLE_HOME/md/

  ·  $ORACLE_HOME/mlx/

  ·  $RACLE_HOME/precomp/

  ·  $ORACLE_HOME/slax/

  33..  CCrrééaattiioonn dd''uunnee bbaassee ddee ddoonnnnééeess

  Maintenant que le serveur Oracle est installé, nous devons créer une
  base de données pour tester l'installation.  Si vous utilisez Oracle
  7.2.x ou une version anterieure, veuillez lire la section Dépannage
  ci-dessous.



  33..11..  CCrrééeerr llee ffiicchhiieerr dd''IInniittiiaalliissaattiioonn

  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
       ______________________________________________________________________






  33..22..  CCrrééaattiioonn dduu ssccrriipptt ppoouurr ll''iinnssttaallllaattiioonn ddee llaa bbaassee ddee ddoonnnnééeess

  Créer un fichier script nommé makedb.sql dans le répertoire
  $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
       ______________________________________________________________________

  33..33..  EExxééccuutteerr llee ssccrriipptt ppoouurr ll''iinnssttaallllaattiioonn ddee llaa bbaassee ddee ddoonnnnééeess

  Démarrer svrmgrl et exécuter 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.
       ______________________________________________________________________




  33..44..  DDéémmaarrrreerr llaa bbaassee ddee ddoonnnnééeess

  Premièrement, nous devons lancer la base de données manuellement (nous
  l'automatiserons plus tard). Pour démarrer une base de données 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.
       ______________________________________________________________________

  33..55..  AArrrrêêtteerr llaa bbaassee ddee ddoonnnnééeess

  Il est important de mentionner ici que redémarrer un serveur Linux
  sans fermer auparavant la base de données Oracle risque fort de
  corrompre la base de données.

  Donc, avant d'émettre la commande Linux shutdown, il est sage de
  fermer le base de données:


       ______________________________________________________________________
       $ 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.
       ______________________________________________________________________




  33..66..  CCrrééeerr uunn UUttiilliissaatteeuurr ppaarr ddééffaauutt

  La base de données, telle qu'elle a été créée, a deux utilisateurs
  spéciaux qui sont créés automatiquement. Ce sont;


       ______________________________________________________________________
       Username                Password

       SYSTEM                  MANAGER
       SYS                     change_on_install
       ______________________________________________________________________





  Ces utilisateurs sont typiquement utilisés pour maintenir les
  informations sur le dictionnaire standard de données pour la base de
  données. C'est une bonne idée de changer les mots de passe par défaut
  aussitôt 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 créer un utilisateur avec moins de
  pouvoir à causer des dégats possibles (rappelez-vous de lancer la base
  de données avant d'essayer de créer un utilisateur).

  Se connecter à SQL*Plus et créer 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 système, vous
  pouvez jouer avec. Pour se connecter sur la base de données Oracle:


       ______________________________________________________________________
       $ sqlplus <user>/<password>
       ______________________________________________________________________




  Si ceci s'exécute sans messages d'erreur, vous avez donc une base de
  données 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 réseau du logiciel pour que vous puissiez vous connecter depuis
  d'autres machine, continuez votre lecture.



  44..  CCoonnffiigguurreerr SSQQLL**NNeett ssuurr llee SSeerrvveeuurr

  Tous ces fichiers configurent la partie réseau d'Oracle (SQL*Net ou
  Net8 pour Oracle8). Ces fichiers doivent être créés sur le serveur
  dans le répertoire $ORACLE_HOME/network/admin.

  44..11..  ttnnssnnaammeess..oorraa

  Le fichier TNSNAMES.ORA identifie les services disponibles depuis la
  machine. Dans notre cas, nous décrirons toutes les bases de données
  que le serveur a monté. Pour chaque base de données 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)
           )
         )
       ______________________________________________________________________




  44..22..  lliisstteenneerr..oorraa

  Le fichier listener.ora contient la description des services auxquels
  d'autres machines sont autorisées à se connecter et toutes les
  configurations nécessaires pour l'écouteur du serveur.
  Il contient les sections pour le nom de l'écouteur, son adresse, les
  bases de données desservies par l'écouteur et les paramètres 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 désservis par l'écouteur
       SID_LIST_LISTENER=
               (SID_LIST=
                       (SID_DESC=
                               (SID_NAME=orcl)
                               (ORACLE_HOME=/home/oracle/7.3.3.0.0)
                       )
               )

       # Début des paramètres de configuration
       TRACE_LEVEL_LISTENER=OFF
       TRACE_FILE_LISTENER = "listener"
       LOG_FILE_LISTENER = "listener"
       CONNECT_TIMEOUT_LISTENER = 10
       STOP_LISTENER = YES
       DBA_GROUP = dba
       ______________________________________________________________________




  44..33..  ssqqllnneett..oorraa

  Le fichier sqlnet.ora contient la configuration pour le noeud du
  réseau. Ceci est indépendant du nombre de bases de données 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 vérifie chaque processus entrant à la
  base de données et assure que le côté client répond toujours. Si le
  client (de tout type) ne répond pas, le processus en tâche de fond du
  serveur Oracle sera tué.

  Ceci est très utile si vous avez plusieurs clients qui accèdent à la
  base de données, surtout pendant la phase de développement où ces
  clients ne réussiront certainement pas à sortir proprement de la base
  de données 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 vérifications des clients.
       names.default_domain = world
       name.default_zone = world
       ______________________________________________________________________





  44..44..  LLaanncceerr eett AArrrrêêtteerr lleess EEccoouutteeuurrss..

  Maintenant que la configuration des écouteurs et de SQL*Net est finie,
  nous pouvons essayer de connecter la base de données en utilisant la
  partie réseau. (Avant nous utilisions l'accès direct à la base de
  données, 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 arrêter 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'arrêt de l'écouteur
  prendront donc in certain temps. (2-3 mins. dépendant de la variable
  timeout du DNS). Si c'est le cas , ne vous inquiétez pas. Soyez
  patient.



  55..  CCoonnffiigguurraattiioonn dduu CClliieenntt

  55..11..  CClliieennttss WWiinnddoowwss

  La configuration SQL*Net sur un PC avec les versions récentes du
  logiciel Client Oracle est très facile. La meilleure façon (et la plus
  facile) pour réussir l'installation d'un client qui marche
  entièrement, 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.

  Sélectionnez "Add Database Alias" et entrez le nom pour l'alias
  demandé.  Cet alias est le nom par lequel vous allez vous référer à
  l'instance de la base de données, et doit donc être le même que celui
  de l'instance (orcl dans ce cas).

  Sélectionnez TCP/IP comme protocole, le nom logique de la machine
  hébergeant la base de données et le nom de l'instance de la base de
  données.

  C'est tout.

  Cependant, si vous n'avez pas l'outil SQL*Net Easy Configuration Tool,
  ne vous inquietez pas. Vous pouvez simplement créer les fichiers
  tnsnames.ora et sqlnet.ora dans le répertoire
  $ORACLE_HOME/network/admin sur le client, exactement comme sur le
  serveur.  Il fournira comme alias le même que sur le serveur (toujours
  une bonne idée de toute façon).

  55..22..  CClliieennttss UUnniixx

  Les clients UNIX ne sont pas très différents des clients Windows. Si
  vous avez Network Manager d'Oracle, alors utilisez-le de la même façon
  que ci-dessus, sinon vous pouvez utiliser juste les mêmes fichiers de
  configuration que sur le serveur dans le répertoire
  $ORACLE_HOME/network/admin.

  66..  LLaanncceemmeenntt eett AArrrrêêtt AAuuttoommaattiiqquuee

  66..11..  ddbbssttaarrtt  eett ddbbssttoopp

  Le démarrage et l'arrêt automatique de la base de données Oracle
  peuvent être effectués (avec la version 7.3.3.0.0) avec les fichiers
  dbstart et dbshut, tous deux fournis par Oracle. Ces fichiers
  dépendent sur l'existence du fichier /etc/oratab pour fonctionner
  (bien qu'en modifiant les fichiers dbshut et dbstart il puissent être
  déplacés).

  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
       ______________________________________________________________________




  66..22..  iinniitt..dd  eett rrcc..dd

  Pour démarrer et arrêter la base de données quand la machine se lance
  ou s'éteint, il faut modifier les routines de démarrage pour la
  machine Linux. Ceci est très 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)


  Premièrement, nous devons créer le script qui exécutera  dbshut et
  dbstart dans le répertoire  /etc/rc.d/init.d . Créez 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 vérifier si le fichier arrête et démarre vraiment
  correctement les bases de données pour le système.  Vérifiez le
  fichier de log, /var/log/oracle, pour les messages d'erreur.

  Une fois que le script marche, nous devons créer les liens symboliques
  de start et kill dans les répertoires appropriés de niveau d'exécution
  (runlevel) /etc/rc.d/rcX.d.

  Les commandes suivantes assureront que les bases de données vont
  démarrer dans les niveaux d'exécution 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 arrêter les bases de données avant un réamorçage ou arrêt, 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
       ______________________________________________________________________




  77..  AAuuttrreess ttrruuccss

  77..11..  AAggeenntt IInntteelllliiggeenntt

  Si vous avez besoin d'un Agent Intelligent Oracle, vous pouvez
  l'exécuter sans changement de la configuration.

  Pour démarrer le AI, essayez:


       ______________________________________________________________________
       $ lsnrctl dbsnmp_start
       ______________________________________________________________________




  Pour arrêter l'AI, essayez:


       ______________________________________________________________________
       $ lsnrctl dbsnmp_stop
       ______________________________________________________________________




  Il ne semble pas y avoir de message indiquant le lancement avec succès
  ou non de l'agent intelligent.  Cependant, l'AI répond au gestionnaire
  _E_n_t_e_r_p_r_i_s_e sur le côté client. Donc, je ne peux que supposer qu'il
  marche.


  88..  DDééppaannnnaaggee

  Voir ci-dessous les différents conseils de dépannage.

  88..11..  JJee nnee ppeeuuxx ppaass ccrrééeerr uunnee bbaassee ddee ddoonnnnééeess eenn uuttiilliissaanntt OOrraaccllee
  77..22..xx..

  Les fichiers expédiés par Oracle dans les versions 7.2.x sont
  incorrects en supposant que vous voulez installer une configuration
  parallèle de serveur. Le fichier init.ora contient la ligne suivante:


       ______________________________________________________________________
       # define parallel server (multi-instance) parameters
       ifile = ora_system:initps.ora
       ______________________________________________________________________




  Pour fixer le problème, mettez la en commentaire:


       ______________________________________________________________________
       # define parallel server (multi-instance) parameters
       #ifile = ora_system:initps.ora
       ______________________________________________________________________




  88..22..  JJ''oobbttiieennss lleess ddééffaauuttss ddee sseeggmmeennttaattiioonn ddaannss llee  ssvvrrmmggrrll  ddee llaa
  vveerrssiioonn 77..33..44..xx..

  Ce problème m'a été signalé par un certain nombre de personnes.
  Gerald Weber gerald_weber@master.co.at l'a résolu:






























  ______________________________________________________________________
  Bonjour Paul,

  D'abord merci pour votre aide, mais aucun des problèmes possubles que vous pensez n'était responsable de mon problème.
  Le problème esy l'émulateur iBCS lui-même.
  Il semble que Oracle exécute les appels sysconf qui ne sont pas supportés 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;
  ______________________________________________________________________





  99..  CCrrééddiittss

  Ce document est basé sur un document écrit par Bob Withers. Des
  informations supplémentaires sont extraites des documents écrits par
  Georg Rehfeld et David Mansfield.

  Relectures supplémentaires faites par Bob Withers, Mark Watling, Peter
  Sodhi et Greg Hankins.

  Mes remerciements vont au support immense de la part des gens
  impliqués dans ce document et aux recherches qu'ils ont effectuées.
  Remerciements particuliers à Bob Withers et Mark Watling pour leurs
  commentaires additionnels et l'aide qu'ils m'ont apportée.







  Linux PCI-HOWTO
  par Michael Will, Michael.Will@student.uni-tuebingen.de
  version 0.5h, 15 Novembre 1995

  Linux et les cartes-meres PCI

  11..  IInnttrroodduuccttiioonn

  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".

  22..  PPCCII ...... ppoouurrqquuooii ??

  22..11..  AAppeerrccuu ggeenneerraall

  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).

     IISSAA
        Peu onereux, lent (le plus souvent 8Mhz),  standard,  nombre  de
        cartes d'extension disponibles tres eleve

     EEIISSAA
        Onereux,  rapide, relativement peu de cartes specifiques (seules
        capables d'exploiter au mieux ses possibilites)

     MMCCAA
        Concu et cautionne par IBM. Rapide mais peu repandu

     VVEESSAA--BBuuss llooccaall
        Base sur l'ISA (qu'il epaule), peu onereux, rapide, relativement
        peu de cartes specifiques.

     PPCCII--BBuuss llooccaall
        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).

  22..22..  PPeerrffoorrmmaanncceess

  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.

  22..33..  LLee cciirrccuuiitt ""ccoonnttrroolleeuurr"" SSCCSSII--22 eemmbbaarrqquuee ((iinntteeggrree ssuurr ccaarrttee--mmeerree))
  NNCCRR5533cc881100

  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. :-)

  22..44..  DDrreeww EEcckkhhaarrddtt aa pprrooppooss ddee PPCCII--SSCCSSII ::

  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.

  22..55..  NNoouuvveellllee vveerrssiioonn AAllpphhaa dduu ppiilloottee NNCCRR

  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

  22..66..  LLee ppiilloottee EEAATTAA--DDMMAA eett lleess ccoonnttrroolleeuurrss PPCCII SSCCSSII ddee DDPPTT

  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

  22..77..  FFuuttuurree DDoommaaiinn TTMMCC--33226600 PPCCII SSCCSSII

  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.)

  22..88..  RReefflleexxiioonnss ddiivveerrsseess ssuurr llee SSCCSSII

  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.--)

  33..  CCaarrttee--mmeerree ddee mmaarrqquuee AASSUUSS

  33..11..  AASSUUSS eett NNMMII ((PPaarriittee)) ---- iimmppaacctt ssuurr llaa  GGrraavviiss--UUllttrraassoouunndd

  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.

  33..22..  DDiiffffeerreennttss ttyyppeess ddee ccaarrtteess mmeerreess AASSUUSS

  33..22..11..  AASSUUSS SSPP33 aa cchhiippsseett SSaattuurrnn II ((rreevv.. 22)) ppoouurr 448866

  +o  2 x rs232 with 16550

  +o  NCR53c810 onboard,

  +o  chipset Saturn I (rev. 2) legerement bugge.

  33..22..22..  AASSUUSS SSPP33GG aa cchhiippsseett SSaattuurrnn IIII ((rreevv.. 44)) ppoouurr 448866

  comme la SP3, mais le chipset Saturn est moins bugge.

  33..22..33..  AASSUUSS SSPP33 aa cchhiippsseett SSiiSS ppoouurr 448866

  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.

  33..22..44..  AASSUUSS AAPP44,, ppoouurr 448866,, aa bbuuss PPCCII//IISSAA//VVeessaaLLooccaallbbuuss

  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.

  33..22..55..  AASSUUSS SSPP44--SSiiSS,, ppoouurr PPeennttiiuumm9900,, PPCCII//IISSAA

  Identique a la SP3-SiS, mais pour Pentium90/100.

  33..22..66..   AASSUUSS  TTPP44XXEE aa cchhiippsseett TTrriittoonn eett pprriissee eenn cchhaarrggee ddee llaa SSRRAAMM oouu
  EEDDOORRAAMM

  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.

  33..33..  TTeessttss ddee rraappiiddiittee ssuurr ddeess ccaarrtteess mmeerreess AASSUUSS

  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 ?

  33..33..11..  AASSUUSS SSPP33 aavveecc ll''aammdd448866DDXX44--110000

  +o  Temps pour 500000 passes Dhrystone = 7 soit 63559 dhrystones/second

  +o  Temps pour 1000 passes Whetstone = 5 soit 200.000 Whetstones/second

  33..33..22..  AASSUUSS SSPP33 aavveecc ll''aammdd448866DDXX44--112200

  +o  Temps pour 500000 passes Dhrystone = 8 soit 58074 dhrystones/second

  +o  Temps pour 1000 passes Whetstone = 4 soit 250.000 Whetstones/second

  33..33..33..  AASSUUSS SSPP33 aavveecc ll''iinntteell448866DDXX22--6666

  +o  Temps pour 500000 passes Dhrystone = 9 soit 50761 dhrystones/second

  +o  Temps   pour   1000   passes   Whetstone   =   7   soit    142.8571
     Whetstones/second

  33..33..44..  AASSUUSS TTPP44//XXEE aavveecc ll''iinntteell558866--9900

  +o  Temps    pour   500000   passes   Dhrystone   =   4   soit   101010
     dhrystones/second

  +o  Temps   pour   1000   passes   Whetstone   =   3   soit    333.3333
     Whetstones/second

  33..33..55..  AASSUUSS TTPP44//XXEE aavveecc ll''iinntteell558866--110000

  +o  Temps    pour   500000   passes   Dhrystone   =   4   soit   102040
     dhrystones/second

  +o  Temps   pour   1000   passes   Whetstone   =   2    soit   500.0000
     Whetstones/second

  33..44..   ddeettaaiilllleeeess  ::  CCaarrttee--mmeerree  AASSUUSS PPCCII--II--SSPP33 :: hheeiinnrriicchh@@zzssvv..ggmmdd..ddee
  ffoouurrnniitt ddeess iinnffoorrmmaattiioonnss

  +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.

  33..55..   PPaatt  DDoowwlleerr  ((ddoowwlleerr@@pptt11BB11110066..FFSSHH..UUVViicc..CCAA)) nnoouuss ppaarrllee ddee ll''AASSUUSS
  SSPP33GG

  +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.)

  44..  CCoonnffuussiioonn aa pprrooppooss ddeess cchhiippsseettss SSaattuurrnn

  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).

  55..  CCaarrtteess vviiddeeooss

  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.

  66..  CCaarrtteess EEtthheerrnneett

  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 ?)

  66..11..  33CCoomm--33cc559900--ttppoo

  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".

  66..22..  DDEECC443355 PPCCII NNIICC

  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 ?

  77..  CCaarrtteess mmeerreess

  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 :

  77..11..  AASSUUSS

  +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

  77..22..  MMiiccrroonniiccss PP5544ii--9900

  +o  root@intellibase.gte.com - fonctionne.

  +o  bill.foster@mccaw.com - fonctionne.

  +o  karpens@ncssm-server.ncssm.edu - fonctionne.

  77..33..  SSAA448866PP AAIIOO--IIII

  ah@doc.ic.ac.uk fonctionne.

  77..44..  SSiirriiuuss SSPPAACCEE

  hi86@rz.uni-karlsruhe.de - fonctionne.

  77..55..  GGaatteewwaayy--22000000

  +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.

  77..66..  IInntteell--PPrreemmiieerr

  grif@cs.ucr.edu   - fonctionne.  jeromem@amiserv.xnet.com - fonctionne
  demarest@rerf.or.jp - fonctionne (Premier-II)

  77..77..  DDEELLLL PPoowweerreeddggee SSPP44110000

  gbelow@pmail.sams.ch - fonctionne

  77..88..  CCoommttrraaddee BBeesstt BBuuyy PPCCII // PPCCII4488XX MMoo RReevv 11..00

  tldraben@eos.ncsu.edu - Fonctionne. Probablement equipee de l'ensemble
  de circuits ("chipset") deficient Intel "Saturn".

  77..99..  IIDDeeaall PPCCII // PPCCII4488XX MMoo RReevv 11..00

  tldraben@eos.ncsu.edu - Ne fonctionne pas.

  77..1100..  CCMMDD TTeecchh.. PPCCII IIDDEE // CCSSAA--66440000CC

  tldraben@eos.ncsu.edu - Fonctionne.

  77..1111..  GGAA--448866iiSS ((GGiiggaabbyyttee))

  Stefan.Dalibor@informatik.uni-erlangen.de - Fonctionne.

  77..1122..  GGAA--558866--IIDD ((GGiiggaabbyyttee)) 9900 MMhhzz PPeennttiiuumm PPCCII//EEIISSAA

  kkeyte@esoc.bitnet - fonctionne

  77..1133..  EESSCCOOMM 448866ddxx22//6666 -- TTyyppee ddee ccaarrttee nnoonn pprreecciissee

  Seul le streamer (floppy tape de marque Archive) ne fonctionne pas.

  77..1144..  JJ--BBoonndd aavveecc ii448866ddxx22//6666

  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.

  77..1155..  SSuuppeerr mmiiccrroo 001111889955 0033::5500 SSUUPPEERR PP5544CCII--PPCCII rreevv 11..33 ((OOppttii))

  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

  88..  RRaappppoorrttss ddeettaaiilllleess

  88..11..  MMiiccrroonniiccss PP5544ii--9900 ((rroooott@@iinntteelllliibbaassee..ggttee..ccoomm))

  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.

  88..22..  AAIIOO--IIII :: AAnnggeelloo HHaarriittssiiss ((aahh@@ddoocc..iicc..aacc..uukk)) aa pprrooppooss ddee llaa SSAA448866PP

  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.

  88..33..  bbiillll..ffoosstteerr@@mmccccaaww..ccoomm ppaarrllee ddee ssaa MMiiccrroonniiccss MM55PPii

  +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.

  88..44..   SSiimmoonn  KKaarrppeenn  ((kkaarrppeennss@@nnccssssmm--sseerrvveerr..nnccssssmm..eedduu))  aa pprrooppooss ddee llaa
  MMiiccrroonniiccss MM5544ppii

  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.

  88..55..   GGooeerrgg  vvoonn  BBeellooww  ((ggbbeellooww@@ppmmaaiill..ssaammss..cchh)) aa pprrooppooss dduu DDEELLLL PPooww--
  eerreeddggee

  +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 ...

  88..66..  zzeennoonn@@rreessoonneexx..ccoomm aa pprrooppooss dduu GGaatteewwaayy22000000 PP--6666

  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.

  88..77..  JJaammeess DD.. LLeevviinnee ((jjddll@@nneettccoomm..ccoomm)) uuttiilliissee uunn GGaatteewwaayy 22000000

  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).

  88..88..  hhii8866@@rrzz..uunnii--kkaarrllssrruuhhee..ddee :: ccaarrttee SSPPAACCEE

  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.

  88..99..  ggrriiff@@ccss..uuccrr..eedduu :: ccaarrttee IINNTTEELL

  17 machines 60MHz Pentium (carte Intel "Premier").

  88..1100..  JJeerroommee MMeeyyeerrss ((jjeerroommeemm@@xxnneett..ccoomm)) eett IInntteell PPrreemmiieerr

  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.

  88..1111..   TTiimmootthhyy  DDeemmaarreesstt  ((ddeemmaarreesstt@@rreerrff..oorr..jjpp)) eett ll''IInntteell PPllaattoo PPrree--
  mmiieerree IIII

  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 :

  88..1111..11..  MMiisseess aa jjoouurr dduu FFllaasshh BBiiooss

  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.

  88..1111..22..  CCaarrttee PPCCII SSCCSSII NNCCRR 5533cc881100 ssaannss BBIIOOSS

  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).

  88..1111..33..  AA ppaarrtt ccaa,, cc''eesstt dduu ""pplluugg aanndd ppllaayy"" !!

  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" !

  88..1122..  hheeiinnrriicchh@@zzssvv..ggmmdd..ddee :: ccaarrttee AASSUUSS

  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.

  88..1133..  CCAARRSSTTEENN@@AAWWOORRLLDD..aawwoorrlldd..ddee :: ccaarrttee AASSUUSS

  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.

  88..1144..  LLaarrss HHeeiinneemmaannnn ((llaarrss@@uunnii--ppaaddeerrbboorrnn..ddee)) :: AASSUUSS

  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 !

  88..1155..  RRuueeddiiggeerr..FFuunncckk@@PPhhyyssiikk..TTUU--MMuueenncchheenn..DDEE :: ccaarrttee AASSUUSS

  +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

  88..1166..  rroobbeerrtt llooggaann ((rrll@@ddee--mmoonnttffoorrtt..aacc..uukk)) :: GGWW//22000000

  +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.--)

  88..1177..  aarrcchhiiee@@CCSS..BBeerrkkeelleeyy..EEDDUU :: AASSUUSS ((ddeeuuxx mmaacchhiinneess))

  +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."

  88..1188..  MMiicchhaaeell WWiillll :: AASSUUSS--SSPP33 448866 ((pprreemmiieerree ggeenneerraattiioonn))

  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
  !

  88..1199..  MMiikkee FFrriisscchh ((mmffrriisscchh@@ssaattuurrnn..ttlluugg..oorrgg)) :: GGiiggaa--BByyttee 448866IIMM

  +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).

  88..2200..  KKaarrll KKeeyyttee ((kkkkeeyyttee@@eessoocc..bbiittnneett)) GGiiggaabbyyttee GGAA558866 PPeennttiiuumm

  +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.

  88..2211..  kkeennff@@ccllaarrkk..nneett :: GG//WW 22000000

  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.

  88..2222..  JJooeerrgg WWeeddeecckk ((jjww@@ppeeaannuuttss..iinnffoorrmmaattiikk..uunnii--ttuueebbiinnggeenn..ddee)) // EESSCCOOMM

  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".

  88..2233..  uutt@@iinnffoorrmmaattiikk..uunnii--kkiieell..dd440000..ddee // AASSUUSS

  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.

  99..  PPrroobblleemmeess rreennccoonnttrreess

  99..11..  hhsscchhmmaall@@iinnffoorrmmaattiikk..uunnii--rroossttoocckk..ddee :: SSCCSSII--PPCCII--SSCC220000

  Linux refuse de demarrer lorsque la  carte  SCSI-PCI-SC200  se  trouve
  dans le systeme.

  99..22..  ddmmaarrpplleess@@ccoommmmss..eeeeee..ssttrraatthhccllyyddee..aacc..uukk GG//WW 22000000

  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.

  99..33..  cciipp557744@@wwppaaxx0011..pphhyyssiikk..uunnii--wwuueerrzzbbuurrgg..ddee ((FFrraannkk HHooffmmaannnn)) // AASSUUSS

  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.

  99..44..  aaxxeell@@aavvaallaanncchhee..ccss..ttuu--bbeerrlliinn..ddee ((AAxxeell MMaahhlleerr)) // AASSUUSS

  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.

  99..55..  FFrraannkk SSttrraauussss ((ssttrraauussss@@ddaaggoobbaa..eessccaappee..ddee)) // AASSUUSS

  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.

  99..66..  eeggoooocchh@@mmcc..ccoomm // AASSUUSS

  +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.

  99..77..  SStteeffaann..DDaalliibboorr@@iinnffoorrmmaattiikk..uunnii--eerrllaannggeenn..ddee // GGiiggaaBByyttee

  +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.

  99..88..  TToomm DDrraabbeennssttootttt ((ttllddrraabbeenn@@eeooss..nnccssuu..eedduu)) :: CCoommttrraaddee // PPCCII4488IIXX

  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.

  1100..  CChhooiixx dd''uunnee ccaarrttee--mmeerree PPCCII :: ccoonnsseeiillss eett oobbsseerrvvaattiioonnss ddiivveerrsseess

  Angelo Haritsis (ah@doc.ic.ac.uk) a rassemble les  elements  de  cette
  section.

  1100..11..  AATTTTEENNTTIIOONN

  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 !

  1100..22..  CCoonnnneecctteeuurr ddee ccoommppoossaannttss ddee RRAAMM

  Opter  pour  une  carte  a  connecteurs 72 points (velocite maximale).
  Toutes les cartes Intel offrent cela.

  1100..33..  CCaarrttee--mmeerree PPCCII pplleebbiisscciitteeee

  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.

  1100..44..  LLiiggnneess dd''IIRRQQ ((IInntteerrrruupptt RReeQQuueesstt))

  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.

  1100..55..  LLaa ffaammiillllee ddeess cciirrccuuiittss ccoonnttrroolleeuurrss SSCCSSII ddee NNCCRR ""88xxxx""

  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).

  1100..55..11..  5533CC881100

  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.

  1100..55..22..  5533CC881155

  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.

  1100..55..33..  5533CC882255

  16   bits   Fast   SCSI-2   (20   Mo/s).    Terminaisons  passives  ou
  differentielles.  Interface pour BIOS externe.  160 broches QFP.

  1100..66..  LLee ffuuttuurr ddeess 5533cc88xxxx

  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.

  1100..77..  PPeerrffoorrmmaanncceess ddeess cciirrccuuiittss SSCCSSII NNCCRR

  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.

  1100..88..  DDeess nnoouuvveelllleess dduu ssuuppppoorrtt NNCCRR5533cc882255

  Ca fonctionne. point.

  1100..99..  FFrreeddeerriicc PPOOTTTTEERR ((FFrreeddeerriicc..PPootttteerr@@mmaassii..iibbpp..ffrr)) aa pprrooppooss ddee  PPeenn--
  ttiiuumm++NNCCRR++SSttrraapp__bbuugg

  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.

  1100..1100..  LLaa ddeetteeccttiioonn ddeess  ppeerriipphheerriiqquueess  PPCCII  ddaannss  lleess  nnooyyaauuxx  LLiinnuuxx
  rreecceennttss ppaarr FFrreeddeerriicc PPootttteerr

  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.

  1100..1111..  AAuuttrreess ppeerriipphheerriiqquueess PPCCII

  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 :

  1100..1111..11..  CCyyccllaaddeess:: ccaarrttee mmuullttiippoorrtt PPCCII RRIISSCC aa 1166 ppoorrttss

  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.

  1111..  CCoonncclluussiioonn

  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.

  1122..  RReemmeerrcciieemmeennttss

  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

  1133..  IInnffoorrmmaattiioonnss ddiivveerrsseess ((sseeccttiioonn aajjoouutteeee ppaarr NNaatt))

  ---------------------------------------

  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.

  1144..  NNoottee dduu ttrraadduucctteeuurr

  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

  1155..  CCooppyyrriigghhtt//aavveerrttiisssseemmeenntt lleeggaall

  (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.

  CCooppyyrriigghhtt

  Ce document est distribue sous les contraintes de la GPL  (GNU  Public
  Licence).

  DDiissttrriibbuuttiioonn

  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/.

  RReemmeerrcciieemmeennttss

  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.

  TTrraadduuccttiioonn FFrraannccaaiissee ddee ccee ddooccuummeenntt

  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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  CClliieennttss eett SSeerrvveeuurrss

  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 sseerrvveeuurr et cclliieenntt.

  Quand  vous  appelez un site pour etablir une connexion PPP, vous etes
  un cclliieenntt. La machine sur laquelle vous-vous connectez est le sseerrvveeuurr.

  Quand  vous configurez une machine Linux pour repondre aux appels pour
  les connexion PPP, vous configurez un sseerrvveeuurr 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 CCLLIIEENNTT, 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 SSEERRVVEEUURR.

  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 sseerrvveeuurr PPPPPP 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).

  11..22..  DDiiffffeerreenncceess eennttrree lleess ddiissttrriibbuuttiioonnss LLiinnuuxx

  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 ll''iinniittiiaalliissaattiioonn BBSSDD  et ll''iinniittiiaalliissaattiioonn SSyyssVV  ssyysstteemm.  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.

  11..33..  OOuuttiillss ddee ccoonnffiigguurraattiioonn ssppeecciiffiiqquueess aauuxx ddiissttrriibbuuttiioonnss

  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.

  22..  AAddrreessssee IIPP

  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,  VVOOUUSS
  DDEEVVEEZZ  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  NNEE  DDEEVVEEZZ  PPAASS  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 nn''aavveezz ppaass 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 jjaammaaiiss 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
  iippffwwaaddmm,  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 ddyynnaammiiqquuee 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 nn''aavveezz ppaass 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.

  33..  BBuuttss ddee ccee ddooccuummeenntt

  33..11..  MMeettttrree eenn ppllaaccee uunn cclliieenntt PPPPPP

  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).

  33..22..  RReelliieerr ddeeuuxx RReesseeaauuxx llooccaauuxx oouu uunn rreesseeaauu llooccaall aa IInntteerrnneett ggrraaccee aa
  PPPPPP

  Ce document donne des informations (de base) pour relier deux  reseaux
  locaux entre eux ou un reseau local a Internet grace a PPP.

  33..33..  CCoonnffiigguurreerr uunn sseerrvveeuurr PPPPPP

  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.

  33..44..  UUttiilliisseerr PPPPPP aavveecc uunnee ccoonnnneexxiioonn NNuullll--MMooddeemm ddiirreeccttee

  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.

  33..55..  PPoouurr llee mmoommeenntt ccee ddooccuummeenntt nnee ccoouuvvrree ppaass......

  +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.

  44..  VVeerrssiioonnss ddeess llooggiicciieellss ttrraaiitteess

  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.

  VVoouuss ddeevveezz eeggaalleemmeenntt eettrree ppaarrttiiccuulliieerreemmeenntt vviiggiillaanntt eett nnee ppaass uuttiilliisseerr
  llee pprrooggrraammmmee PPPPPP 22..11..22 aavveecc uunn nnooyyaauu LLiinnuuxx 22..00..XX..

  Veuillez remarquer que ce document nnee ttrraaiittee ppaass 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/..).

  PPuuiissqquuee ccee ddooccuummeenntt eesstt ddeessttiinnee aa aaiiddeerr lleess nnoouuvveeaauuxx uuttiilliissaatteeuurrss,,  iill
  eesstt  ffoorrtteemmeenntt  rreeccoommmmaannddee  dd''uuttiilliisseerr  uunnee  nnoouuvveellllee vveerrssiioonn dduu nnooyyaauu
  LLiinnuuxx eett llaa vveerrssiioonn aapppprroopprriieeee ddee PPPPPP qquuii ssoonntt ccoonnnnuuss ppoouurr ffoonnccttiioonnnneerr
  eennsseemmbbllee..

  55..  DD''aauuttrreess ddooccuummeennttss uuttiilleess//iimmppoorrttaannttss

  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,  ccoouurreezz
     (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 !

  55..11..  LLeess MMaaiilliinngg LLiisstteess uuttiilleess

  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.

  RReemmaarrqquueess ddee bboonn sseennss: 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>

  66..   PPrreesseennttaattiioonn  ddee ccee qquuii ddooiitt eettrree ffaaiitt ppoouurr ffaaiirree ffoonnccttiioonnnneerr PPPPPP
  ccoommmmee cclliieenntt

  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.

  66..11..  OObbtteenniirr//iinnssttaalllleerr lleess pprrooggrraammmmeess

  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 ddoonncc ccee HHOOWWTTOO nn''eenn ppaarrlleerraa ppaass. !

  66..22..  CCoommppiilleerr llee ssuuppppoorrtt PPPPPP ddaannss llee nnooyyaauu

  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>

  66..33..  OObbtteenniirr lleess iinnffoorrmmaattiioonnss ppoouurr vvoottrree ffoouurrnniisssseeuurr dd''aacccceess aa IInntteerr--
  nneett

  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.

  66..44..  CCoonnffiigguurreerr vvoottrree mmooddeemm eett vvoottrree ppoorrtt sseerriiee

  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.

  66..55..  MMeettttrree eenn ppllaaccee llaa rreessoolluuttiioonn ddee nnoommss ((DDNNSS))

  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 nn''aavveezz ppaass bbeessooiinn 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).

  66..66..  PPPPPP eett lleess pprriivviilleeggeess rroooott

  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 rroooott.

  Pour des details la-dessus, voir la  section  ``Utiliser  PPP  et  les
  privileges root''.

  66..77..   VVeerriiffiieerr  lleess  ffiicchhiieerrss ddee vvoottrree ddiissttrriibbuuttiioonn PPPPPP eett ccoonnffiigguurreerr
  lleess ooppttiioonnss ddee PPPPPP

  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''.

  66..88..  SSii vvoottrree sseerrvveeuurr PPPPPP uuttiilliissee PPAAPP ((PPaasssswwoorrdd AAuutthheennttiiccaattiioonn PPrroottoo--
  ccooll))

  De  nombreux  fournisseurs  d'acces  et serveurs PPP utilisent PAP. Si
  votre serveur nn''aa ppaass 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.

  66..99..  SSee ccoonnnneecctteerr aauu sseerrvveeuurr PPPPPP aa llaa mmaaiinn

  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.

  66..1100..  AAuuttoommaattiisseerr vvoottrree ccoonnnneexxiioonn PPPPPP

  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.

  66..1111..  TTeerrmmiinneerr llaa ccoonnnneexxiioonn

  Une  fois  que  votre  connexion est activee et fonctionne, vous devez
  pouvoir desactiver la liaison.

  Consultez la section ``Terminer une connexion PPP''.

  66..1122..  SSii vvoouuss aavveezz ddeess pprroobblleemmeess

  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 nn''eesstt ttoouutteeffooiiss ppaass destinee a offrir plus que  les  informations
  de  base.  Al  Longyear  maintient  la  PPP-FAQ qui contient bien plus
  d'informations a ce sujet !

  66..1133..  UUnnee ffooiiss qquuee llaa ccoonnnneexxiioonn eesstt llaanncceeee

  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.

  66..1144..   PPrroobblleemmeess  aavveecc  lleess  sseerrvviicceess  IIPP  ssttaannddaarrddss  eett ll''aaddrreessssee IIPP
  ddyynnaammiiqquuee ddee llaa lliiaaiissoonn PPPPPP..

  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.

  77..  CCoonnffiigguurreerr vvoottrree nnooyyaauu LLiinnuuxx

  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.

  77..11..  IInnssttaalllleerr lleess ssoouurrcceess dduu nnooyyaauu

  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.
     RReemmaarrqquuee: 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).

  77..22..  CCoonnnnaaiittrree vvoottrree mmaatteerriieell

  Vous DDEEVVEEZZ 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).

  77..33..  CCoommppiillaattiioonn dduu nnooyyaauu -- llee nnooyyaauu LLiinnuuxx 11..22..1133

  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.

  77..44..  CCoommppiillaattiioonn dduu nnooyyaauu LLiinnuuxx 11..33..xx eett 22..00..xx

  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  MM,  sinon  pour  le  compiler
  directement dans le noyau, repondre YY.

  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.

  77..55..  RReemmaarrqquuee ssuurr PPPPPP--22..22 eett //pprroocc//nneett//ddeevv

  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
  ______________________________________________________________________

  77..66..  CCoonnssiiddeerraattiioonnss ggeenneerraalleess ssuurr llaa ccoonnffiigguurraattiioonn dduu nnooyyaauu ppoouurr PPPPPP

  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 DDEEVVEEZZ 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.

  88..   FFoouurrnniirr lleess iinnffoorrmmaattiioonnss ddoonntt vvoouuss aavveezz bbeessooiinn ppoouurr vvoottrree sseerrvveeuurr
  PPPPPP

  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 ddeevveezz 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  ddeevveezz  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.

     RReemmaarrqquuee: 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 !

  99..  CCoonnffiigguurreerr vvoottrree mmooddeemm eett vvoottrree ppoorrtt sseerriiee

  Vous devez vous assurer que votre modem est correctement configure  et
  que vous savez sur quel port serie il est branche.

  SSee ssoouuvveenniirr qquuee :

  +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.

  99..11..  RReemmaarrqquuee aauu ssuujjeett ddeess ppoorrttss sseerriieess eett ddeess ccaappaacciittee ddee vviitteessssee

  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.

  99..22..  NNoommss ddeess ppoorrttss sseerriiee

  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.

  99..33..  CCoonnffiigguurraattiioonn ddee vvoottrree mmooddeemm

  Vous devez configurer votre modem correctement pour PPP -  pour  cela,
  LLIISSEEZZ  LLEE  MMAANNUUEELL  DDEE  VVOOTTRREE  MMOODDEEMM  !  La  plupart des modems ont uunnee
  ccoonnffiigguurraattiioonn ppaarr ddeeffaauutt eenn uussiinnee 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).

  99..44..  RReemmaarrqquuee ssuurr llee ccoonnttrroollee ddee fflluuxx sseerriiee

  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.

  99..55..  TTeesstteerr vvoottrree mmooddeemm ppoouurr ccoommppoosseerr uunn nnuummeerroo

  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 nn''eessssaayyeerroonnss ppaass d'etablir la  connexion
  PPP  -  mais  juste  d'etre sur que nous pouvons composer un numero et
  ainsi trouver eexxaacctteemmeenntt  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)  eexxaacctteemmeenntt  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  EEnnttrreeee
  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.

  1100..  CCoonnffiigguurreerr llaa rreessoolluuttiioonn ddee nnoomm vveerrss ll''aaddrreessssee ((DDNNSS))

  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 aarrcchheennllaanndd et se trouve dans  le
  domaine  iinntteerrwweefftt..ccoomm..aauu.  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 vvoouuss ppoouurrrreezz uuttiilliisseerr llee nnoomm ddeess
  mmaacchhiinneess  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.

  1100..11..  LLee ffiicchhiieerr //eettcc//rreessoollvv..ccoonnff

  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  iinnssiisstteerr  (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.

  1100..22..  LLee ffiicchhiieerr //eettcc//hhoossttss..ccoonnff

  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.

  1111..  UUttiilliisseerr PPPPPP eett lleess pprriivviilleeggeess rroooott

  Puisque  PPP a besoin de configurer les peripheriques reseau, modifier
  les tables de routage entre autres, il a besoin des privileges rroooott.

  Si des utilisateurs autres que rroooott doivent lancer des connexions PPP,
  le programme pppd doit avoir l'uid rroooott :

       -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 eenn eettaanntt rroooott
  taper la commande :

       chmod u+s /usr/sbin/pppd

  Cela permet a pppd de fonctionner avec les privileges root mmeemmee  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  rroooott  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 rroooott et le
     groupe PPPPPP

  +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 rroooott. 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.

  1122..  CCoonnffiigguurreerr lleess ffiicchhiieerrss ddee ccoonnnneexxiioonn ddee PPPPPP

  Maintenant, vous devez etre connecte en tant que rroooott 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 pppppp :

       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 ooppttiioonnss..ttppll. 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).

  1122..11..  LLee ffiicchhiieerr ooppttiioonnss..ttppll ffoouurrnnii

  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
  ______________________________________________________________________

  1122..22..  QQuueelllleess ooppttiioonnss ddooiiss--jjee uuttiilliisseerr ?? ((SSaannss PPAAPP//CCHHAAPP))

  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) eett les pages de manuel de pppd  eett  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)
  ______________________________________________________________________

  1133..  SSii vvoottrree sseerrvveeuurr PPPPPP uuttiilliissee PPAAPP ((PPaasssswwoorrdd AAuutthheennttiiffiiccaattiioonn  PPrroo--
  ttooccooll))

  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
  ______________________________________________________________________

  1133..11..  UUttiilliisseerr MMSSCCHHAAPP

  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 aauutthh cchhaapp 8800.

  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.

  1133..22..  LLee ffiicchhiieerr ddee sseeccrreettss ddee PPAAPP//CCHHAAPP

  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  rroooott,  le  groupe  rroooott  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 lleess oorrddiinnaatteeuurrss mais pas lleess uuttiilliissaatteeuurrss

  "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,  nn''iimmppoorrttee  qquueell  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 DDOOIITT) demander une authentification bbiiddiirreeccttiioonnnneellllee
  -  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 oorrddiinnaatteeuurrss, 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 !

  1133..33..  LLee ffiicchhiieerr ddee sseeccrreettss ddee PPAAPP

  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 nn''iimmppoorrttee  qquueell  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.

  1133..44..  LLee ffiicchhiieerr ddee sseeccrreettss ddee CCHHAAPP

  Cette methode necessite une methode authentification mutuelle -  c'est
  a  dire  que  vous  devez  permettre a votre machine d'authentifier le
  serveur distant EETT 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 EETT la
  machine distante d'authentifier elle-meme la machine locale.

  1133..55..  SSuuppppoorrtteerr pplluussiieeuurrss ccoonnnneexxiioonnss aauutthheennttiiffiieeeess aavveecc PPAAPP

  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 rreemmootteennaammee 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.

  1144..  CCoonnffiigguurreerr uunnee ccoonnnneexxiioonn PPPPPP aa llaa mmaaiinn

  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 rroooott.

  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 EEnnttrreeee 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 rroooott) 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 DDOOIITT etre remplacee par une route reseau specifique :
  VVOOUUSS NNEE PPOOUUVVEEZZ AAVVOOIIRR QQUU''UUNNEE SSEEUULLEE RROOUUTTEE PPAARR DDEEFFAAUUTT !!!!!!

  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
  ______________________________________________________________________

  1155..  AAuuttoommaattiisseerr vvoottrree ccoonnnneexxiioonn -- CCrreeeerr lleess ssccrriippttss ddee ccoonnnneexxiioonn

  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 rroooott
  ou membre du groupe PPP) pour lancer votre connexion.

  1155..11..  SSccrriippttss  ddee  ccoonnnneexxiioonn  ppoouurr  ll''aauutthheennttiiffiiccaattiioonn  nnoomm  uuttiilliissaa--
  tteeuurr//mmoott ddee ppaassssee

  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.

  1155..22..  LLee ssccrriipptt pppppp--oonn

  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
  ______________________________________________________________________

  1155..33..  EEddiitteerr lleess ssccrriippttss ddee ddeemmaarrrraaggee ddee PPPPPP ffoouurrnniiss

  Puisque  les  nouveaux  scripts  sont en deux parties, nous allons les
  editer chacun leur tour.

  1155..33..11..  LLee ssccrriipptt pppppp--oonn

  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 !

  1155..33..22..  LLee ssccrriipptt pppppp--oonn--ddiiaalleerr

  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 !

  1155..44..  CCee qquuee ssccrriipptt CChhaatt ssiiggnniiffiiee......

  Un  script  chat est une sequence de paires de "chaines d'attentes" et
  de "chaines d'envoi ". En particulier, remarquez  que  nous  attendons
  TTOOUUJJOOUURRSS quelque chose avant d'envoyer quoi que ce soit.

  Si nous envoyons quelque chose SSAANNSS 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).

  1155..44..11..  DDeemmaarrrreerr PPPPPP ssuurr llee sseerrvveeuurr ffiinnaall

  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 aatttteennttee
  eennvvooii  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.

  1155..55..  UUnn ssccrriipptt cchhaatt ppoouurr lleess ccoonnnneeccttiioonnss aauutthheennttiiffiieeeess aavveecc PPAAPP//CCHHAAPP

  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         ''                              \
  ______________________________________________________________________

  1155..66..  LLeess ooppttiioonnss ddeebbuugg 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 \
  ______________________________________________________________________

  1166..  TTeesstteezz vvoottrree ssccrriipptt ddee ccoonnnneexxiioonn

  Ouvrez un nouveau Xterm rroooott (si vous  etes  sous  X)  ou  ouvrez  une
  nouvelle console virtuelle et connectez vous comme rroooott.

  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 !

  1177..  TTeerrmmiinneerr uunnee ccoonnnneexxiioonn PPPPPP

  Quand vous en avez termine avec la liaison PPP, utilisez  la  commande
  standard  ppp-off  pour  la terminer (rappel - vous devez etre rroooott 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.

  1188..  RReessoouuddrree lleess pprroobblleemmeess

  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.

  1188..11..  JJ''aaii ccoommppiillee llee ssuuppppoorrtt PPPPPP ddaannss llee nnooyyaauu,, mmaaiiss......

  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.

  1188..11..11..  BBooootteezz--vvoouuss aavveecc llee bboonn nnooyyaauu ??

  Meme  si  vous aavveezz 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.

  1188..11..22..  AAvveezz--vvoouuss ccoommppiillee llee ssuuppppoorrtt nnooyyaauu ddee pppppp ccoommmmee uunn mmoodduullee ??

  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.

  1188..11..33..  UUttiilliisseezz--vvoouuss uunnee bboonnnnee vveerrssiioonn ddee PPPPPP ppoouurr vvoottrree nnooyyaauu ??

  Vous ddeevveezz 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.

  1188..11..44..  LLaanncceezz vvoouuss ppppppdd eenn eettaanntt rroooott ??

  Si vous ne lancez pas pppd en etant l'utilisateur rroooott  (et  que  pppd
  n'est pas suid vers rroooott), vous pourrez recevoir ce message.

  1188..22..  MMoonn mmooddeemm ssee ccoonnnneeccttee mmaaiiss PPPPPP nnee ddeemmaarrrree jjaammaaiiss

  Il   y   a   d'innombrables   possibilites   avec  ca  (regardez  dans
  comp.os.linux....).

  Une erreur EEXXTTRREEMMEEMMEENNTT 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 !

  1188..33..  LLee ssyysslloogg ccoonnttiieenntt ""sseerriiaall lliinnee iiss nnoott 88 bbiitt cclleeaann..."

  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.

  1188..33..11..  VVoouuss nn''eetteess ppaass ccoorrrreecctteemmeenntt ccoonnnneeccttee ssuurr llee sseerrvveeuurr

  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).

  1188..33..22..  VVoouuss nn''aavveezz ppaass llaannccee PPPPPP ssuurr llee sseerrvveeuurr

  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).

  1188..44..  LLee pprroocceessssuuss PPPPPP ddiissttaanntt eesstt lloonngg aa ddeemmaarrrreerr

  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 pprreemmiieerr 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).

  1188..55..  LLaa rroouuttee ppaarr ddeeffaauutt nn''eesstt ppaass ccoonnffiigguurreeee

  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).

  1188..66..  AAuuttrreess pprroobblleemmeess

  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 !

  1199..  OObbtteenniirr ddee ll''aaiiddee qquuaanndd oonn eesstt ttoottaalleemmeenntt ppeerrdduu

  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  -  NNEE  PPOOSSTTEEZZ PPAASS DDEESS PPAAGGEESS EETT DDEESS PPAAGGEESS DDEE SSOORRTTIIEE DDEE
  DDEEBBUUGGGGAAGGEE DDAANNSS LLEESS NNEEWWSS GGRROOUUPPSS NNII MMEEMMEE AA MMOOII PPAARR  EEMMAAIILL  -  c'est  une
  enorme  perte  de  bande  passante,  et  la  majorite sera envoye dans
  /dev/null (a moins qu'elle ne soit expressement demande).

  2200..  PPrroobblleemmeess ccllaassssiiqquueess lloorrssqquuee llaa lliiaaiissoonn ffoonnccttiioonnnnee

  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 ! )

  2200..11..  JJee nn''aarrrriivvee ppaass aa vvooiirr aapprreess llee sseerrvveeuurr PPPPPP oouu jjee ssuuiiss ccoonnnneeccttee

  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
  ppoouuvveezz 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.

  2200..22..  JJee ppeeuuxx eennvvooyyeerr dduu ccoouurrrriieerr mmaaiiss ppaass eenn rreecceevvooiirr

  Si vous avez une adresse IP dynamique, c'est tout a fait normal.  Voir
  "Configurer les services" plus bas.

  2200..33..   aavveecc  mmaa  mmaacchhiinnee ??  PPoouurrqquuooii lleess ggeennss nnee ppeeuuvveenntt ppaass ffaaiirree ddee
  ffiinnggeerr,, WWWWWW,, ggoopphheerr,, ttaallkk eettcc

  La  aussi, si vous utilisez une adresse IP dynamique c'est tout a fait
  normal.  voir "Configurer les services" plus bas.

  2211..  UUttiilliisseerr lleess sseerrvviicceess IInntteerrnneett aavveecc ddeess aaddrreesssseess IIPP ddyynnaammiiqquueess

  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...

  2211..11..  CCoonnffiigguurreerr llee ccoouurrrriieerr eelleeccttrroonniiqquuee ((eemmaaiill))

  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   DDSS  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).

  2211..22..  CCoonnffiigguurreerr uunn sseerrvveeuurr ddee nnoommss llooccaall

  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.

  2222..  RReelliieerr ddeeuuxx rreesseeaauuxx llooccaauuxx aavveecc PPPPPP

  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
  rreevveerrssiibbllee.

  Cependant, vous devez RREEEELLLLEEMMEENNTT  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 ddeevveezz 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.

  2222..11..  CCoonnffiigguurreerr lleess aaddrreesssseess IIPP

  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.

  2222..22..  CCoonnffiigguurreerr llee rroouuttaaggee..

  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  rroouuttee  rreesseeaauu  ssppeecciiffiiqquuee  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).

  2222..33..  SSeeccuurriittee rreesseeaauu

  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
  AAVVAANNTT 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 !

  2233..  UUnnee ffooiiss qquuee llaa ccoonnnneexxiioonn ffoonnccttiioonnnnee -- llee ssccrriipptt //eettcc//pppppp//iipp--uupp

  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.

  2233..11..  RRoouuttaaggeess ssppeecciiaauuxx

  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 !

  2233..22..  SSuuppppoorrtt dduu ccoouurrrriieerr eelleeccttrroonniiqquuee eenn aatttteennttee

  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).

  2233..33..  UUnn eexxeemmppllee ddee ssccrriipptt //eettcc//pppppp//iipp--uupp

  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
  ______________________________________________________________________

  2233..44..  SSuuppppoorrtt dduu ccoouurrrriieerr eelleeccttrroonniiqquuee

  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.

  2244..  UUttiilliisseerr //eettcc//pppppp//iipp--ddoowwnn

  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.

  2255..  PPoossssiibbiilliittee ddee rroouuttaaggee ssuurr uunn rreesseeaauu llooccaall

  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.

  2255..11..  RReemmaarrqquueess ssuurr llaa sseeccuurriittee

  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 !

  2266..  CCoonnffiigguurreerr uunn sseerrvveeuurr PPPPPP

  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.

  2266..11..  CCoommppiilleerr llee nnooyyaauu

  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 DDEEVVEEZZ 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 !

  2266..22..  PPrreesseennttaattiioonn dduu ssyysstteemmee ddee sseerrvveeuurr

  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.

  2266..33..  FFaaiirree mmaarrcchheerr lleess pprrooggrraammmmeess ttoouuss eennsseemmbbllee

  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.

  CCee  hhoowwttoo nnee ccoouuvvrree ppaass ssaa ccoonnffiigguurraattiioonn.. RReeggaarrddeezz llaa ddooccuummeennttaattiioonn ddee
  ggeettttyy ddee vvoottrree cchhooiixx oouu llee sseerriiaall HHOOWWTTOO ppoouurr pplluuss  dd''iinnffoorrmmaattiioonnss  ssuurr
  llee ssuujjeett..

  2266..44..  CCoonnffiigguurreerr lleess ffiicchhiieerrss dd''ooppttiioonnss

  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 vveennaanntt du client ppp vers votre reseau local  ou  Internet
  et  de  router  les  paquets  vveerrss 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) !

  2266..55..  CCoonnffiigguurreerr ppppppdd ppoouurr ppeerrmmeettttrree aauuxx uuttiilliissaatteeuurrss ddee llee llaanncceerr

  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.

  2266..66..  CCrreeeerr uunn aalliiaass gglloobbaall ppoouurr ppppppdd

  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 !

  2277..  UUttiilliisseerr PPPPPP aavveecc uunnee ccoonnnneexxiioonn nnuullll mmooddeemm

  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.

  RRoobbeerrtt HHaarrtt
  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 système Linux. Bien que les documents HOWTO concernent
  le travail avec le système d'exploitation Linux, celui-ci ne dépend
  pas de la version d'Unix utilisée.
  ______________________________________________________________________

  Table des matières


  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 générales

     2.1 Installation du matériel

  3. Partage de données 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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Palm Computing Devices a successivement proposé plusieurs modèles 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
  numériques (Personal Digital Assistants ou PDA), parfois appelés
  ordinateurs de paume (palm-top computers). Ils sont vendus comme un
  équivalent électronique à la fois du carnet d'adresses, du répertoire
  téléphonique et du bloc-notes, alors qu'il s'agit en fait
  d'ordinateurs à part entière capables de faire fonctionner des
  applications de tous genres. Reste à trouver les applications Palm OS
  correspondant à vos besoins et à être capable de partager vos données
  avec votre système Linux. Les appareils Palm OS contiennent un
  logiciel permettant de synchroniser leurs données avec des programmes
  fonctionnant sur une autre machine. L'appareil est généralement fourni
  avec ce type de logiciel pour Windows 95. Une version MacOS existe
  aussi. Si l'autre machine fonctionne sous un autre système
  d'exploitation, vous devez trouver auprès d'autres sources des
  logiciels pouvant travailler avec votre appareil Palm OS. Ce document
  décrit de tels logiciels disponibles pour les systèmes Linux ou Unix.


  11..11..  AA pprrooppooss ddee ccee ddooccuummeenntt


  La version anglaise la plus récente 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 précédente version, appelée le Pilot HOWTO.
  Reportez-vous à  <http://metalab.unc.edu/LDP/> (ou
  <http://www.freenix.fr/linux/HOWTO/> pour les versions françaises)
  pour plus d'informations sur les autres documents HOWTO.

  Si vous trouvez quoi que ce soit dans ce document qui nécessite une
  correction ou une explication approfondie, merci de m'envoyer un
  courrier électronique à l'adresse indiquée ci-dessus en précisant à
  quelle version du document vous faites référence.

  Ce document est Copyright © 1997, 1998 par David H. Silber. Il est
  disponible selon les termes de la licence du document LDP HOWTO-INDEX.


  11..22..  AA vvooiirr aauussssii


  Le document  <http://www.orbits.com/Palm/PalmDevelompent-HOWTO.html>
  explique comment utiliser un environnement de développement à base de
  gcc pour écrire des applications Palm OS.

  Le document  <http://www.orbits.com/Palm/PalmConduit-HOWTO.html>
  explique comment utiliser les bibliothèques pilot-link pour écrire des
  programmes de transfert pour Linux fonctionnant avec des appareils
  Palm OS.


  11..33..  LLiissttee ddee ddiiffffuussiioonn


  La liste de diffusion pilot-unix est maintenue par Matthew Cravit
  pilot-unix-owner@lists.best.com. Son but est décrit ci-dessous :


       La liste de diffusion pilot-unix est là pour permettre aux
       personnes intéressées par l'utilisation de PDA US Robotics
       Pilot avec des systèmes Unix de discuter et partager des
       idées. Cela comprend les personnes souhaitant participer au
       développement d'outils permettant au Pilot de travailler
       avec Unix, et éventuellement au développement d'un SDK pour
       le Pilot sous Unix.


  Pour plus d'informations, y compris sur la manière 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.


  11..44..  AArrcchhiivveess ddee llaa lliissttee ddee ddiiffffuussiioonn


  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.
  11..55..  SSiittee FFTTPP


  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.


  22..  IInnffoorrmmaattiioonnss ggéénnéérraalleess



  22..11..  IInnssttaallllaattiioonn dduu mmaattéérriieell


  Les appareils Palm OS sont fournis avec un "berceau" (station
  d'accueil) pour échanger les données avec l'ordinateur de bureau. Ce
  périphérique est en fait un câble série avec support adapté à
  l'appareil Palm OS ainsi qu'un bouton "HotSync" intégré. Branchez
  votre berceau sur un port série libre de votre machine. Quand vous
  lancez l'un des programmes indépendants, 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, créez un périphérique /dev/pilot comme nom
  supplémentaire pour le port série 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é.


  33..  PPaarrttaaggee ddee ddoonnnnééeess eennttrree ll''aappppaarreeiill PPaallmm OOSS eett LLiinnuuxx



  33..11..  LLee llooggiicciieell ppiilloott--lliinnkk


  L'ensemble des outils logiciels pilot-link vous permet de charger des
  programmes sur votre appareil Palm OS et de transférer des données
  pour les différents programmes intégrés à celui-ci vers ou depuis
  votre système 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 même de transférer des données dans les deux
  sens. En général, chaque programme individuel du paquetage pilot-link
  gère un type de données.


  33..11..11..  IInnssttaallllaattiioonn dduu llooggiicciieell ppiilloott--lliinnkk


  Les versions déjà empaquetées ont inévitablement un léger retard avec
  la distribution principale, mais sont plus faciles à installer et ne
  nécessitent pas de configuration supplémentaire. La distribution
  principale peut s'avérer plus intéressante dans les rares cas où vous
  attendez une fonctionnalité ou une correction particulière.


  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 récente dans le même
  répertoire. Si ce n'est pas le cas ou si vous cherchez une version
  plus récente que celle empaquetée pour Debian, vous pouvez installer
  la distribution générique, comme décrit ci-dessous. Installez ce
  fichier de la manière 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 récente dans le même répertoire. Si ce
  n'est pas le cas ou si vous cherchez une version plus récente que
  celle empaquetée pour RedHat, vous pouvez installer la distribution
  générique, comme décrit ci-dessous. Installez ce fichier de la manière
  normale, et passez à la section ``Utilisation du logiciel pilot-
  link''.

  Pour d'autres versions de Linux ou Unix, ou si vous cherchez la toute
  dernière version, récupérez la version 0.9.0 de pilot-link sur
  <ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-link.0.9.0.tar.gz>.  Le
  numéro de version aura probablement changé, mais les nouvelles
  versions se trouveront probablement au même endroit avec un nom
  similaire.

  Une fois que vous avec le logiciel, décompressez-le avec :

          tar -xvzf pilot-link.0.9.0.tar.gz



  Si votre version de tar ne supporte pas l'option -z, décompressez
  l'archive avec gunzip, comme suit :

          gunzip pilot-link.0.9.0.tar.gz | tar -xvf -



  Cela va créer un répertoire (pilot-link-0.9.0) contenant les sources.

  Entrez dans ce répertoire.

  Lancez ./configure. Cela va chercher sur votre système les
  informations nécessaires à la compilation du logiciel. configure
  prépare pour une installation dans /usr/local par défaut. Si vous
  souhaitez changer le répertoire d'installation, lancez ./configure
  --prefix=REP, où REP est le nom du répertoire 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 fonctionnalités que vous utilisez marchent toujours.
  En général, il n'y a pas de problème.)

  En tant qu'utilisateur root, lancez make install. Cela va copier le
  logiciel dans des répertoires situés sous /usr/local (ou tout autre
  répertoire 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 répertoire sur lequel vous avez des droits
  d'écriture.

  N'oubliez pas de rajouter les nouveaux répertoires contenant les
  exécutables à votre chemin de recherche.
  33..11..22..  UUttiilliissaattiioonn dduu llooggiicciieell ppiilloott--lliinnkk


  La plupart des programmes de l'ensemble pilot-link font office de
  "conduits", c'est-à-dire qu'ils transfèrent des données 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 côté 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 présentation appelée pilot-link. Par exemple,
  pour le programme pilot-xfer, vous pouvez taper man pilot-xfer à
  l'invite de votre shell Unix.


  33..11..22..11..  ppiilloott--xxffeerr


  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 données de votre appareil Palm OS (y
  compris les programmes) dans un répertoire appelé "rep-sauvegarde", le
  créant s'il n'existait pas déjà.

  Pour remettre en place des données sauvegardées sur l'appareil Palm OS
  :

          pilot-xfer /dev/pilot -r rep-sauvegarde



  En général, vous n'aurez à faire cela que si votre appareil perd son
  alimentation ou si vous avez dû faire une remise à zéro complète.

  Pour obtenir la liste des programmes présents sur votre appareil :

          pilot-xfer /dev/pilot -l




  33..11..22..22..  iinnssttaallll--mmeemmoo


  Il installe un fichier Linux sur votre appareil Palm OS en tant que
  mémo.
  Pour installer un mémo dans la catégorie projet (qui doit déjà
  exister) :

          install-memo /dev/pilot -c projet projet.memo



  Le nom du fichier sera inséré dans le mémo à la première ligne et
  apparaîtra dans le répertoire de mémos de votre appareil.


  33..11..22..33..  mmeemmooss


  Ce programme récupère chaque mémo sur l'appareil Palm OS et l'affiche
  au format mailbox standard.

  Pour voir vos mémos :

          memos /dev/pilot




  33..11..22..44..  ppiilloott--aaddddrreesssseess


  Transférez votre base de données 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




  33..22..  MMaakkeeDDoocc


  Un des défauts du programme de mémos intégré des appareils Palm OS est
  son incapacité à gérer correctement les gros documents. Pour y
  remédier, 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 grâce à MakeDoc, de Pat Beirne
  <mailto:pat.beirne@sympatico.ca>.


  33..22..11..  IInnssttaallllaattiioonn ddee MMaakkeeDDoocc


  MakeDoc peut être récupéré sur
  <http://www.concentric.net/~rbram/makedoc7.cpp>. Compilez-le avec
  votre compilateur C++ et installez l'exécutable généré en tant que
  "makedoc" dans un répertoire 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 après le dernier caractère affiché à
  l'utilisateur. Cela ne semble pas être gênant pour le document généré,
  mais c'est ennuyeux.

  Un nouvelle version existe, mais elle nécessite Java. Jetez un oeil à
  la page web MakeDoc de Pat Beirne sur
  <http://cpu563.adsl.sympatico.ca/MakeDocJ.htm>.


  33..22..22..  UUttiilliissaattiioonn ddee MMaakkeeDDoocc


  Lancez MakeDoc de la manière suivante :

          makedoc data.txt data.prc "Données à afficher avec Doc"



  Cela créera un fichier data.prc, qui peut être alors installé sur
  votre appareil Palm OS à l'aide de pilot-xfer. Le texte "Données à
  afficher avec Doc" sera affiché dans le répertoire des documents gérés
  par Doc.

  MakeDoc a les syntaxes suivantes :

          makedoc [-n] [-b] <fichier-texte> <fichier-prc> <nom>


  ou

          makedoc -d [-b] <fichier-prc> <fichier-texte>





     <<ffiicchhiieerr--tteexxttee>>
        Le fichier que vous voulez convertir.


     <<ffiicchhiieerr--pprrcc>>
        Le nom du fichier généré. (Mettez .prc à la fin du nom.)


     <<nnoomm>>
        Le nom que vous voulez voir apparaître dans le répertoire de
        documents de Doc ou Jdoc.


  Il y a aussi des options pour décoder le fichier .prc généré et
  utiliser différentes options de compression.


  DD..  PPeerrssoonnnneess


  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> gère la liste
  de diffusion pilot-unix.


  Jeff Dionne  <mailto:jeff@ryeham.ee.ryerson.ca> est le premier auteur
  des outils pilot-link. Il gère le site FTP pour le projet de
  développement 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.


  EE..  HHiissttoorriiqquuee ddeess aappppaarreeiillss PPaallmm OOSS


  Il existe deux versions du Pilot : les 1000 et 5000 qui ont
  respectivement 128 et 512 Ko de mémoire vive. Ils sont fournis avec
  Palm OS 1.0 en mémoire 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 mémoire vive. Ils ont aussi l'écran à cristaux liquides
  rétro-éclairé et la version 2.0 du système d'exploitation. La version
  Professional a aussi une pile TPC/IP et quelques programmes
  supplémentaires intégrés.

  (IBM a sorti sa propre version du PalmPilot Professional qu'ils
  appellent un WorkPad.)

  On trouve maintenant le Palm III, dont le boîtier a été redessiné et
  qui est équipé d'un port infrarouge, sans oublier les 2 Mo de mémoire
  vive et Palm OS 3.0.

  Il est possible de mettre à jour n'importe quel Pilot en changeant la
  carte mémoire, qui contient à la fois la mémoire vive et la mémoire
  morte. Bien sûr, cela ne vous rajoute pas le rétro-éclairage sur les
  premiers modèles 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 compréhension des périphériques Plug-and-
  Play.  Comment rendre votre système Linux apte à gérer le Plug-and-
  Play.
  ______________________________________________________________________

  Table des matières
























































  1. Introduction

     1.1 Copyright, Marques déposées, Limitation de garantie & Crédits
        1.1.1 Copyright
        1.1.2 Marques déposées
        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 périphériques (et inversement)
     2.3 Adresses d'E/S etc.
     2.4 Les IRQ, vue d'ensemble
     2.5 Les canaux DMA
     2.6 Espace mémoire
     2.7 Les "ressources" pour le périphérique et son pilote
     2.8 Le  problème
     2.9 Le

  3. La solution

     3.1 Introduction au
     3.2 Comment cela fonctionne-t-il ? (explication simplifiée)
     3.3 Démarrage 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 système d'exploitation PnP ?
        4.1.1 Cohabitation avec Windows9x
     4.2 Comment doivent être contrôlées les ressources du bus ?
     4.3 Réinitialiser la configuration ?

  5. Comment agir avec les cartes PnP

     5.1 Introduction
     5.2 Désactiver 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 données ESCD du BIOS
        5.3.3 Utilisation de Windows pour paramétrer l'ESCD
        5.3.4 Ajout d'un nouveau périphérique (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 périphériques
     5.9 Logiciels et documents

  6. Communication de la configuration au pilote

     6.1 Introduction
     6.2 Pilote du port série : 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 périphériques sont-ils configurés ?
     7.2 Comment mes périphériques sont-ils configurés ?

  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 Vérification des champs d'adresses (Test des conflits d'adresses E/S ISA)
        8.1.5 Communication directe via la mémoire.
     8.2 Les interruptions - Description détaillée.
     8.3 Interruptions PCI
     8.4 Isolation


  ______________________________________________________________________

  Adaptation française : Albert-Paul Bouillot apb@club-internet.fr

  DDééffiinniittiioonn :: _P_l_u_g_-_a_n_d_-_P_l_a_y (Installez-et-Utilisez),PPnnPP.  C'est du
  jargon. C'est un matériel ou un logiciel, qui, après avoir été
  installé ("plugged in"), peut être utilisé immédiatement ("played
  with"), par opposition au matériel ou au logiciel qui nécessite d'être
  configuré.


  11..  IInnttrroodduuccttiioonn

  11..11..  CCooppyyrriigghhtt,, MMaarrqquueess ddééppoossééeess,, LLiimmiittaattiioonn ddee ggaarraannttiiee && CCrrééddiittss

  11..11..11..  CCooppyyrriigghhtt

  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 réaliser des travaux dérivés et les distribuer à condition
  de :


  1. Envoyer le travail dérivé (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 dernière url
     indiquée 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. Reconnaître les mérites 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.


  11..11..22..  MMaarrqquueess ddééppoossééeess

  Si certains mots sont des marques déposées, le contexte doit en mettre
  l'appartenance en évidence.  Par exemple "MS Windows" (ou simplement
  "Windows") implique que "Windows" appartient à Microsoft.


  11..11..33..  LLiimmiittaattiioonn ddee ggaarraannttiiee

  Une grande partie des informations contenues dans cet HOWTO ont été
  obtenues d'Internet, de livres qui peuvent être erronés ou obsolètes
  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 précédents (ni le traducteur ;-) ) ne pourront être tenus
  pour légalement responsables des erreurs éventuelles.


  11..22..  PPoouurr llee ffuuttuurr :: VVoouuss ppoouuvveezz ccoonnttrriibbuueerr

  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, vérifiez que le document ne
  soit pas trop ancien et que vous possédez la dernière version.  Merci
  de m'envoyer toutes les infos que vous pensez devoir concerner ce
  document.

  Je n'ai pas étudié en détail ni les outils "isapnptools" ni les
  correctifs du noyau de David Howells (mais j'envisage de le faire). De
  même, je ne comprends pas totalement comment le BIOS configure le PnP
  (cela dépend de la version du BIOS) ni comment Windows9x met à jour
  l'ESCD.  Donc, cet HOWTO est encore incomplet et peut se révéler
  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 réponse.


  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee cceett HHOOWWTTOO

  Les nouvelles versions du Plug-and-Play-HOWTO devraient être
  disponibles à peu près tous les mois pour consultation et/ou
  télé-chargement sur les sites miroirs du LDP.  Pour obtenir une liste
  de ces sites, consultez : <http://metalab.unc.edu/LDP/mirrors.html>.
  Différents formats sont disponibles. Si vous voulez rapidement
  vérifier la date de la dernière version, regardez à :
  <http://metalab.unc.edu/LDP/HOWTO/Plug-and-Play-HOWTO.html>.


  22..  QQuuee ddeevvrraaiitt ffaaiirree llee PPnnPP :: AAlllloouueerr lleess ""RReessssoouurrcceess dduu bbuuss""

  22..11..  EEnn qquuooii ccoonnssiissttee llee PPlluugg--aanndd--PPllaayy  ((PPnnPP)) ??

  En simplifiant beaucoup, le _P_l_u_g_-_a_n_d_-_P_l_a_y est une méthode pour
  indiquer automatiquement au logiciel (pilotes de périphériques) où
  trouver différents éléments matériels (périphériques) tels que modems,
  cartes réseau, cartes son etc. La tâche du _P_l_u_g_-_a_n_d_-_P_l_a_y consiste à
  mettre en correspondance les périphériques physiques et les logiciels
  (pilotes de périphériques) qui les font fonctionner et à établir un
  canal de communication entre chaque périphérique et son pilote. Pour
  ce faire, le PnP alloue les "ressources bus" suivantes à la fois aux
  pilotes et au matériel : adresses d'E/S, IRQ, canaux DMA (uniquement
  pour le bus ISA), régions mémoire. Si vous ne comprenez pas ce que
  signifient ces quatre notions, lisez les paragraphes suivants.  Après
  que ces ressources du bus ont été assignées (et si les pilotes
  adéquats sont installés), les noms des unités périphériques dans le
  répertoire /dev sont prêts à être utilisés.

  Cette méthode d'affectation de certaines ressources du bus est
  quelquefois désignée par le terme "configuration", mais c'est
  uniquement d'une configuration de bas niveau qu'il s'agit. Même
  lorsque le _P_n_P est utilisé au maximum, une bonne partie de la
  configuration des périphériques est réalisée par autre chose que le
  _P_n_P. Par exemple, pour la configuration du modem, une "chaîne de
  caractères d'initialisation" est envoyée au modem à travers le "canal"
  adresse d'E/S. Cette "chaîne de caractères d'initialisation" n'a rien
  à voir avec le PnP bien que le "canal" utilisé pour l'envoyer ait été
  alloué par le PnP. Le réglage de la vitesse (et de beaucoup d'autres
  paramètres) d'un port série est réalisé en envoyant, de programmes
  exécutés par l'utilisateur (souvent automatiquement, au démarrage),
  des messages au pilote de périphérique. Et cette configuration n'a
  rien à voir avec le _P_n_P. Donc, quand on parle de la configuration
  effectuée 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.


  22..22..  CCoommmmeenntt uunn oorrddiinnaatteeuurr ttrroouuvvee--tt--iill lleess ppéérriipphhéérriiqquueess ((eett iinnvveerrssee­­
  mmeenntt))

  Un ordinateur est constitué d'un CPU/processeur qui effectue les
  traitements, et de mémoire pour stocker les programmes et les données.
  De plus, il y a un certain nombre de périphériques tels que différents
  types d'unité de disques, une carte vidéo, un clavier, des cartes
  réseau, des cartes modem, des cartes son, des ports série et parallèle
  etc.  Il y a également une alimentation pour fournir l'énergie
  nécessaire, différents bus sur une carte mère pour connecter les
  périphériques au CPU, ainsi qu'un boîtier pour contenir le tout.

  Dans les temps anciens, la plupart des périphériques avaient leur
  propre carte d'interface (circuits imprimés). Aujourd'hui, en plus des
  cartes d'interface, beaucoup de "périphériques" sont de petits
  circuits montés de façon permanente sur une carte unique appelée
  "carte mère". Les cartes qui se connectent sur la carte mère peuvent
  contenir plus d'un périphérique.  Les circuits mémoire sont
  quelquefois également considérés comme des périphériques mais ne sont
  pas _p_l_u_g_-_a_n_d_-_p_l_a_y au sens de cet HOWTO.

  Pour qu'un système informatique fonctionne correctement, chaque unité
  périphérique doit être sous le contrôle de son "pilote de
  périphérique" Ce logiciel fait partie du système d'exploitation (ou
  d'un module) et tourne sur le CPU. Les pilotes de périphériques sont
  associés à des "fichiers spéciaux" dans le répertoire /dev, bien que
  ce ne soient pas vraiment des fichiers. Ils ont des noms tels que hda1
  (première partition sur le disque dur a), ttyS0 (premier port série),
  eth1 (deuxième carte Ethernet) etc. Pour rendre les choses plus
  compliquées, le pilote de périphérique sélectionné, disons pour eth1,
  dépendra 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 gérer un périphérique, le CPU (sous le contrôle du pilote de
  périphérique), envoie des commandes (et des données) vers les
  différents périphériques et en lit les infos. Pour cela, chaque pilote
  de périphérique doit connaître l'adresse utilisée pour le périphérique
  qu'il gère.  Connaître une telle adresse correspond à mettre en oeuvre
  un canal de communication, même si le "canal" physique est en réalité
  un bus de données dans le PC qui est partagé avec pratiquement tout le
  reste.

  Le canal de communication est en réalité un peu plus compliqué que la
  description qui en est faite ci-dessus. Une "adresse" est en réalité
  un ensemble d'adresses et il y a un canal inverse (les interruptions)
  qui permet aux périphériques d'envoyer, en urgence, une requête de
  "demande d'aide" au pilote de périphérique.


  22..33..  AAddrreesssseess dd''EE//SS eettcc..

  Les PC utilisent trois espaces d'adresses : mémoire principale, E/S,
  et configuration (uniquement dans le cas du bus PCI). Les trois types
  d'adresses partagent le même bus à l'intérieur du PC. Mais la tension
  sur certains fils spécialisés indique à tous les périphériques à quel
  "espace" une adresse appartient : E/S, mémoire centrale, ou
  configuration.  Consultez ``Adresses'' pour plus de détails. Les
  périphériques sont normalement situés dans l'espace d'adressage E/S
  bien que, maintenant ils utilisent l'espace d'adressage mémoire
  centrale. Une adresse E/S (Entrée/Sortie) (ou I/0, pour Input/Output)
  est quelquefois appelée 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 problème de
  la recherche du numéro de la maison de quelqu'un dans une rue. Vous
  devez obtenir (et noter) le numéro de la maison et quelqu'un doit
  avoir apposé le numéro sur la maison afin qu'on puisse le trouver.
  Dans les ordinateurs, le pilote de périphérique doit obtenir
  l'adresse, et le matériel du périphérique doit installer la même
  adresse dans l'un de ses registres. Ces deux opérations doivent être
  réalisées, mais certains font l'erreur de ne réaliser que l'une de ces
  deux étapes et se demandent ensuite pourquoi l'ordinateur ne peut pas
  trouver le périphérique. Par exemple, ils utiliseront "setserial" pour
  attribuer une adresse à un port série, sans penser que cela indique
  seulement au pilote quelle est cette adresse. Cela ne sélectionne pas
  l'adresse physique du port série lui-même. Si le port série a, en
  réalité, une adresse différente (ou pas d'adresse du tout)et que vous
  indiquiez une adresse erronée a setserial, vous avez des problèmes.

  Une autre obligation, évidente, consiste a avoir paramétré l'adresse
  d'E/S sur la carte avant que le pilote de périphérique n'essaie
  d'utiliser cette adresse. Comme les pilotes de périphériques démarrent
  souvent dès la mise en route de l'ordinateur, ils essaient quelquefois
  d'accéder à une carte (pour tester sa présence etc. ) avant que
  l'adresse ait été paramétrée 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 présente (mais son
  adresse n'a pas encore été attribuée).

  Ce qui vient d'être dit dans les deux derniers paragraphes concernant
  les adresses d'E/S s'applique avec la même force aux autres
  ressources : ``Les IRQ --Vue d'ensemble'', ``Canaux DMA'',et ``Espace
  mémoire''.  C'est ce que nous allons expliquer dans les trois
  paragraphes suivants.


  22..44..  LLeess IIRRQQ,, vvuuee dd''eennsseemmbbllee

  Après avoir lu ce paragraphe, il faut lire ``Interruptions --Détails''
  pour avoir quelques détails complémentaires.  Ce qui suit est
  volontairement très simplifié : en plus de l'adresse, il faut
  également prendre en compte un numéro d'interruption (tel que IRQ5),
  que l'on appelle également numéro d'IRQ (IRQ = Interrupt ReQuest,
  demande d'interruption). Nous avons déjà mentionné plus haut que le
  pilote de périphérique doit connaître l'adresse de la carte de façon à
  pouvoir communiquer avec elle. Mais comment se fait la communication
  dans l'autre sens ? Supposons que le périphérique ait besoin de dire
  quelque chose à son pilote immédiatement.  Par exemple, le
  périphérique peut venir de recevoir une rafale d'octets destinés à
  aller en mémoire centrale et que le périphérique ait besoin de
  demander à son pilote de venir les récupérer immédiatement de sa
  mémoire tampon pratiquement pleine pour les transférer en mémoire
  centrale.

  Comment le périphérique peut-il appeler son pilote à l'aide ? Il ne
  peut pas utiliser le bus de données principal puisque celui-ci est
  déjà 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 périphérique.
  Chaque ligne possède un numéro d'interruption (IRQ) unique (IRQ =
  Interrupt ReQuest). Le périphérique doit envoyer son interruption sur
  la bonne ligne et le pilote de périphérique doit attendre
  l'interruption sur cette ligne. Le numéro d'IRQ stocké dans le
  périphérique détermine quelle est la ligne concernée. Ce même numéro
  d'IRQ doit être connu du pilote de périphérique de manière que celui-
  ci sache quelle ligne d'IRQ le concerne.

  Lorsqu'un pilote de périphérique reçoit une interruption (un appel à
  l'aide) il doit se renseigner sur la cause de l'émission de cette
  interruption et effectuer les actions appropriées pour y répondre. Sur
  un bus ISA chaque périphérique a besoin d'un numéro d'interruption
  unique (sauf que deux ports série ou plus peuvent partager la même
  interruption depuis le noyau 2.2). Sur un bus PCI, le partage des
  interruptions est permis.


  22..55..  LLeess ccaannaauuxx DDMMAA

  Les canaux DMA ne concernent que le bus ISA.  DMA signifie "Accès
  Direct Mémoire" (Direct Memory Access). Dans ce cas, le périphérique
  est autorisé à prendre le pas sur le CPU pour le contrôle du bus et à
  transférer les octets directement en mémoire centrale. Normalement le
  CPU effectuerait un tel transfert en deux étapes :

  1. Lecture de l'espace mémoire E/S du périphérique et stockage de ces
     octets dans le CPU lui-même

  2. écriture de ces octets du CPU dans la mémoire centrale.

     Avec le DMA le processus de transfert des octets du périphérique
     vers la mémoire centrale se déroule normalement en une seule étape.
     Les périphériques doivent avoir cette capacité intégrée dans le
     matériel, et donc tous les périphériques ne fonctionnent pas en
     DMA. Pendant que le transfert DMA est en cours d'exécution, 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 plutôt quelque chose de
  mieux : le "contrôle du bus" (bus mastering). Cela fonctionne un peu
  comme le DMA et on l'appelle quelquefois DMA (par exemple, les unités
  de disques durs se nomment "UltraDMA"). Cette technique permet aux
  périphériques de prendre temporairement le contrôle du bus et de
  transférer des octets exactement comme le fait le CPU lorsqu'il a le
  contrôle du bus. On n'utilise pas de numéros de canaux car le bus PCI
  est constitué de telle manière que le matériel sait quel est le
  contrôleur du bus actuel et quel est le périphérique qui demande à le
  devenir. Il n'y a donc pas d'allocation de canaux DMA dans le cas d'un
  bus PCI.

  Quand un périphérique, sur un bus ISA, désire effectuer un transfert
  DMA, il génère une requête de DMA en utilisant une ligne spécialisée
  comme pour une demande d'interruption. Le DMA aurait pu être réalisé
  en utilisant les interruptions mais cela aurait introduit des retards,
  donc il est plus rapide d'utiliser un type d'interruption spécial
  connu sous le nom de requête DMA. Comme les interruptions, les
  requêtes DMA sont numérotées de façon à identifier le périphérique qui
  a envoyé cette requête. Ce numéro 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 même canal, mais le numéro de "canal DMA" sert à identifier
  qui est en train d'utiliser le "canal". Des registres existent sur la
  carte mère pour stocker l'état courant de chaque "canal". Donc, pour
  émettre une requête DMA, le périphérique doit connaître son numéro de
  canal DMA qui doit être stocké dans un registre sur le périphérique
  physique.


  22..66..  EEssppaaccee mméémmooiirree

  Certains périphériques se voient assigner des adresses dans l'espace
  de la mémoire principale. On parle souvent de "mémoire partagée" ou
  "d'E/S en zone mémoire". Quelquefois, il s'agit de mémoire morte (ROM)
  sur le périphérique. A propos de ressources _P_n_P, on parle simplement
  de "mémoire". Un tel périphérique peut également utiliser l'espace
  d'adressage E/S.

  Lorsque vous branchez une telle carte, en réalité vous connectez un
  module mémoire pour la mémoire principale. Cette mémoire peut être
  soit de la mémoire morte (ROM = Read Only Memory) soit de la mémoire
  partagée. La mémoire partagée est partagée entre le périphérique et
  l'Unité Centrale (CPU qui exécute le pilote de périphérique). Cette
  mémoire peut servir de moyen de "transfert" direct des données entre
  le périphérique et la mémoire principale. En réalité, ce n'est pas un
  transfert à proprement parler puisque le périphérique met ses données
  dans sa propre mémoire qui se trouve être également la mémoire
  centrale. À la fois la carte et le pilote de périphérique doivent
  savoir où cela se passe.  Il faut utiliser des adresses mémoires
  hautes de façon à éviter tout conflit avec les circuits mémoires des
  adresses basses (de la mémoire centrale) de votre ordinateur.

  Pour la ROM, c'est différent. C'est comme un programme (peut-être le
  pilote de périphérique) qui serait utilisé avec le périphérique.
  Heureusement, il peut tourner avec Linux et pas seulement avec Windows
  ?? Il peut être nécessaire de le dupliquer en mémoire centrale pour le
  faire tourner plus vite. Une fois dupliqué, il n'est plus "en lecture
  seule".


  22..77..  LLeess ""rreessssoouurrcceess"" ppoouurr llee ppéérriipphhéérriiqquuee eett ssoonn ppiilloottee

  Donc, les pilotes de périphériques doivent être "attachés" d'une façon
  quelconque au matériel qu'ils contrôlent. Cela est réalisé en
  fournissant des "ressources" (E/S, Mémoire, IRQ, DMA) à la fois au
  périphérique physique et au logiciel de pilotage. Par exemple, un port
  série 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 périphérique et au périphérique physique. On donne alors
  un nom (tel que ttyS1) au pilote (et à l'unité périphérique
  correspondante) dans le répertoire /dev.  L'adresse et le numéro d'IRQ
  sont stockés dans un registre sur la carte du périphérique physique
  (ou dans un circuit sur la carte mère). Si l'on utilise de cavaliers,
  cette information est toujours stockée dans la partie "matériel" du
  périphérique (sur la carte etc.). Mais dans le cas du _P_n_P, la donnée
  enregistrée est généralement perdue lors de l'arrêt du PC (mise hors
  tension) de sorte que cette donnée doit être fournie à chaque fois que
  le PC est remis en fonction.





  22..88..  LLee  pprroobbllèèmmee

  L'architecture du PC fournit seulement un nombre limité d'IRQ, de
  canaux DMA, d'adresses d'E/S et de régions mémoire.  S'il n'y avait
  que quelques périphériques et qu'ils aient des ressources
  standardisées (comme des adresses d'E/S et des numéros d'IRQ uniques)
  il n'y aurait aucun problème pour attacher des pilotes de
  périphériques aux unités périphériques. Chaque unité aurait des
  ressources fixes qui n'entreraient en conflit avec aucune autre unité
  périphérique de l'ordinateur. Deux périphériques n'auraient pas la
  même adresse d'E/S, la même IRQ etc. Chaque pilote pourrait être
  programmé avec l'adresse d'E/S, l'IRQ etc. codées en dur dans le
  programme. La vie serait simple.

  Mais ce n'est pas le cas. Non seulement il existe tellement de
  périphériques différents aujourd'hui que les conflits sont fréquents,
  mais, de plus, on a souvent besoin d'avoir plus d'un périphérique d'un
  type donné. Par exemple, on peut vouloir disposer de plusieurs unités
  de disques différentes, de plusieurs ports série etc. Pour ces
  raisons, les périphériques doivent être paramètrables afin que l'on
  puisse leur attribuer les adresses, IRQ etc.  que l'on désire pour
  éviter les conflits. Mais quelques IRQ et adresses sont tout à fait
  standard comme celles de l'horloge et du clavier. Elles ne nécessitent
  pas une telle adaptabilité.

  En dehors du problème de conflit d'allocation des ressources, il y a
  le problème de l'erreur en communiquant la nature des ressources au
  pilote de périphérique. Par exemple, supposons que vous ayez entré IRQ
  4 dans un fichier de configuration alors que le périphérique utilise,
  en réalité, 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 réalisée,
  établit des canaux de communication entre les périphériques physiques
  et leurs pilotes. Par exemple, si une certaine gamme d'adresses d'E/S
  (ressource) est allouée à la fois à un pilote de périphérique et à un
  matériel, alors on a établi un canal de communication à sens unique
  entre eux. Le pilote peut envoyer des commandes et des informations au
  périphérique. C'est, en réalité, un peu plus qu'un canal à sens unique
  puisque le pilote peut obtenir des informations du périphérique en
  consultant ses registres. Mais le périphérique ne peut pas prendre
  l'initiative d'une communication de cette façon. L'allocation d'une
  IRQ est nécessaire pour créer un canal de communication bi-
  directionnel, où à la fois le pilote et le périphérique peuvent
  prendre l'initiative d'une communication.


  22..99..  LLee PPnnPP  ddéétteeccttee lleess ppéérriipphhéérriiqquueess ccoonnnneeccttééss aauuxx ppoorrttss sséérriiee

  Les périphériques externes qui se connectent au port série par un
  câble (comme les modems externes) peuvent également être appelés _P_l_u_g_-
  _a_n_d_-_P_l_a_y Puisque seul le port série lui-même nécessite des ressources
  (une IRQ et une adresse d'E/S), il n'y a pas de ressources à allouer à
  un périphérique qui se connecte à un tel port. Donc, le _P_n_P n'a pas
  vraiment de raison d'être pour ces périphériques. Cela, même s'il y a
  des spécifications _P_n_P pour de tels périphériques série.

  Un système d'exploitation _P_n_P les détectera et saura lire leur numéro
  de modèle etc. Il sera donc alors capable de trouver un pilote de
  périphérique 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'intermédiaire d'un fichier de configuration etc.) sur quel port
  série votre périphérique est connecté (et éventuellement le modèle
  dont il s'agit) vous n'avez pas réellement besoin de cette
  fonctionnalité "port série" du _P_n_P.
  33..  LLaa ssoolluuttiioonn PPlluugg--aanndd--PPllaayy  ((PPnnPP))

  33..11..  IInnttrroodduuccttiioonn aauu PPnnPP

  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 périphérique et que celui-ci se configure par lui-même.
  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 périphérique. Dans un sens plus étroit
  c'est simplement le paramètrage des ressources des périphériques.
  Cela peut aussi concerner les spécifications qui, (entre autres
  choses) indiquent comment les données PnP de la ressource doivent être
  lues ou écrites dans les périphériques (souvent des cartes) sur le bus
  ISA. Les spécifications du standard PCI (et non PnP) sont de même
  nature pour le bus PCI.

  Le _P_l_u_g_-_a_n_d___P_l_a_y _(_P_n_P_) met en relation les périphériques et leurs
  pilotes et spécifie leurs "canaux" de communication. Sur le bus ISA,
  avant le _P_l_u_g_-_a_n_d_-_P_l_a_y, les ressources étaient configurées sur le
  matériel par des cavaliers et les pilotes de périphériques étaient
  assignés aux ressources par des fichiers de configuration (ou quelque
  chose du même style) ou par des tests des périphériques à des adresses
  où ils étaient supposés se trouver.  Le bus PCI a été compatible PnP
  dès le début et il a été trivial d'implémenter le PnP pour ce bus.
  Mais comme les spécifications 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 matériel que l'on appelle aujourd'hui PnP).


  33..22..  CCoommmmeenntt cceellaa ffoonnccttiioonnnnee--tt--iill ?? ((eexxpplliiccaattiioonn ssiimmpplliiffiiééee))

  Voici une explication très simple de la façon dont fonctionne le _P_n_P.
  Le programme de configuration _P_n_P (éventuellement un programme du
  BIOS) recherche tous les périphériques _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 sûr, s'il y a des
  ressources du bus réservées par des périphériques (anciens) non _P_n_P
  (dont il a connaissance), il ne les attribue pas. Puis il utilise un
  certain critère (non précisé dans les spécifications _P_n_P) pour
  attribuer les ressources de façon à ce qu'elles n'entrent pas en
  conflit et que tous les périphériques obtiennent ce dont ils ont
  besoin.  Il indique alors à chaque périphérique physique quelles
  ressources du bus lui ont été affectées et chacun se configure alors
  pour n'utiliser que les seules ressources du bus qui lui ont été
  affectées.

  Par exemple, supposons qu'une carte carte ait besoin d'une
  interruption (d'un numéro d'interruption) et de 1 MB de mémoire
  partagée. Le programme _P_n_P lit cette requête dans la carte. Il
  attribue alors le numéro d'interruption 5 (IRQ 5) et un méga-octet
  d'espace mémoire à partir de l'adresse 0xe9000000. Ce n'est pas
  toujours aussi simple car la carte peut utiliser uniquement certains
  numéros d'interruption (seulement pour ISA) ou n'accepter qu'un
  certain domaine d'adressage. Les détails sont différents 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 manière dont il a assigné les
  ressources du bus lors de la dernière configuration (lors de la
  dernière utilisation de l'ordinateur) et la réutiliser. 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 mémoire non volatile de
  votre PC (connu sou le nom d' ESCD; voir ``La Base de données ESCD du
  BIOS'').
  Sous Linux, c'est le règne du "chaque périphérique pour lui-même" et
  il n'existe aucun registre centralisé des affectations de ressources.
  Certains pilotes de périphériques enregistrent la dernière
  configuration qu'ils ont utilisé et la réutilisent à la prochaine
  remise en route de l'ordinateur. Implicitement, ils considèrent que le
  reste du matériel n'aura pas besoin d'utiliser ses ressources du bus.

  Si les périphériques se souvenaient de leur configuration précédente,
  il n'y aurait aucun matériel pour les reconfigurer au prochain
  démarrage, mais ils semblent oublier leur configuration lorsque l'on
  stoppe l'alimentation. Certains périphériques ont une configuration
  par défaut (mais pas nécessairement la dernière utilisée). Le
  programme de configuration _P_n_P doit être exécuté à chaque mise sous
  tension du PC. De même, si l'on ajoute un nouveau périphérique, celui-
  ci a besoin d'être configuré.  L'allocation de ressources du bus à ce
  nouveau périphérique peut nécessiter d'en enlever à un périphérique
  existant et de donner à celui-ci des ressources du bus différentes
  qu'il pourra utiliser à la place.


  33..33..  DDéémmaarrrraaggee dduu PPCC

  Lors de la mise sous tension initiale du PC le circuit BIOS exécute
  son programme pour démarrer l'ordinateur (la première étape consistant
  à tester le matériel). Si le système 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
  méthode PnP pour le trouver. Donc, pour permettre à l'utilisateur de
  configurer manuellement la mémoire CMOS du BIOS et de réagir aux
  messages d'erreur apparaissant au démarrage de l'ordinateur, un écran
  (une carte vidéo) et un clavier sont également nécessaires.  Donc, le
  BIOS doit configurer, selon la procédure PnP, ces périphériques lui-
  même.

  Une fois que le BIOS a identifié le disque dur, la carte vidéo et le
  clavier il est prêt à entamer le processus de démarrage (chargement du
  système d'exploitation du disque dur vers la mémoire centrale). Si
  vous avez indiqué à votre BIOS que vous aviez un système
  d'exploitation _P_n_P (SE PnP ou PnP OS), il devrait commencer à démarrer
  le PC de la manière indiquée ci-dessus et laisser le soin de terminer
  la configuration _P_n_P au système d'exploitation. Autrement, un BIOS-PnP
  essaiera de réaliser le reste de la configuration _P_n_P des
  périphériques avant le chargement du système d'exploitation (mais ne
  chargera pas leurs pilotes).


  33..44..  LLeess bbuuss

  Le bus ISA est le vieux bus du vieil IBM PC alors que le bus PCI est
  un bus plus récent et plus rapide de Intel. Le bus PCI a été conçu
  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é
  assignées aux périphériques.  Pour voir comment cela s'est passé
  consulter le "fichier" /proc/pci (/proc/bus/pnp/devices pour les
  noyaux 2.2+), les messages de démarrage sur votre écran (utilisez
  shift-PageUp pour revenir en arrière), ou utilisez les utilitaires PCI
  (pour les noyaux 2.2+).

  Pour ce qui concerne le bus ISA, il y a un vrai problème pour
  implémenter 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 périphériques
  physiques. Il en résulte que la manière dont le _P_n_P a été implanté sur
  le bus ISA est très compliquée. Un livre entier a été rédigé à ce
  sujet. Voir ``Le livre du PnP''. Entre autres choses, le programme _P_n_P
  doit attribuer à chaque périphérique _P_n_P un "identificateur"
  provisoire de façon à pouvoir l'adresser pour la configuration _P_n_P.
  L'assignation de ces "identificateurs" provisoires est appelée
  "isolation". Voir ``Isolation'' pour de plus amples détails.

  Finalement, le bus ISA finira par disparaître. Ce jour là, le _P_n_P
  deviendra plus simple puisqu'il sera facile de voir comment le BIOS a
  configuré le matériel. Il restera cependant nécessaire de mettre en
  correspondance les périphériques et leurs pilotes ainsi que de
  configurer les périphériques ajoutés alors que le PC est en
  fonctionnement. Ces besoins seraient satisfaits si Linux était un
  système d'exploitation _P_n_P.


  33..55..  LLiinnuuxx ddooiitt mmiieeuuxx pprreennddrree eenn ccoommppttee llee PPnnPP

  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 prévaudra de sorte que
  nous aurons alors un _P_n_P facile à implanter. Mais, que l'on veuille ou
  pas, la plupart des nouveaux matériels ISA aujourd'hui sont _P_n_P et
  Linux ne peut pas faire autrement que de gérer efficacement le _P_n_P.
  Cependant le Linux standard (celui du début 1999) rend la gestion du
  _P_n_P compliquée (spécialement pour le bus ISA) alors que le but du _P_n_P
  était de rendre les choses faciles.

  D'une certaine façon, Linux est un peu _P_n_P pour le bus PCI.  Quand le
  PC démarre vous pouvez noter, en lisant les messages sur la console,
  que certains pilotes de périphériques Linux trouvent leurs
  périphériques (et les ressources du bus que le BIOS leur a attribué).
  Mais il y a des situations où un système d'exploitation _P_n_P pourrait
  prendre les choses en compte de manière plus satisfaisante :

  1. En cas de pénurie de ressources du bus;

  2. S'il y a plus d'un pilote pour un périphérique physique;

  3. Si un pilote de périphérique activé ne peut pas trouver le
     périphérique physique;

  4. Installation à chaud d'un périphérique.

     Les utilisateurs de Linux ne devraient pas avoir à plonger dans les
     détails du _P_n_P pour configurer leurs périphériques _P_n_P ISA comme
     ils doivent le faire. Une solution pourrait consister à avoir une
     version standardisée 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 gèrent pas. Il ne fait pas
     partie du Linux standard.  Voir ``Correctif noyau''.


  44..  CCoonnffiigguurraattiioonn dd''uunn BBIIOOSS PPnnPP

  À la mise sous tension de l'ordinateur, le BIOS s'exécute avant que le
  système d'exploitation ne soit chargé. Les nouveaux BIOS sont PnP et
  configurent quelques-uns ou la totalité des périphériques PnP. Il
  n'est pas possible de désactiver 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 système d'exploitation PnP ?''

  ·  ``Comment doivent être contrôlées les ressources du bus ?''

  ·  ``Réinitialiser la configuration ?''

  44..11..  AAvveezz--vvoouuss uunn ssyyssttèèmmee dd''eexxppllooiittaattiioonn PPnnPP ??

  Si vous répondez oui, alors le BIOS PnP commencera à configurer le
  disque dur, la carte vidéo et le clavier pour permettre le démarrage
  du système.  Mais il laissera le soin de terminer la configuration au
  système d'exploitation. Il peut faire une ``isolation'' sur le bus ISA
  en laissant les périphériques désactivés, mais prêts à être configurés
  par le système d'exploitation. Pour Linux, vous devrez probablement
  indiquer que votre système d'exploitation n'est pas _P_n_P. Si vous ne le
  faites pas, le BIOS risque de laisser vos périphériques ISA, qu'il n'a
  pas configurés,en état désactivé ?? Et les périphériques PCI peuvent
  également ne pas être configurés ?

  Si vous répondez non, alors le BIOS fera la configuration lui-même. Il
  utilisera la configuration précédente, sauvegardée dans la mémoire non
  volatile (ESCD), à moins que vous n'ayez ajouté de nouveaux
  périphériques PnP.  Voir ``La base de données ESCD du BIOS'' Si votre
  dernière 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 dernière 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 périphérique ancien.  Voir ``Utilisation de
  Windows pour paramétrer l'ESCD''.  Si vous utilisez le(s) programme(s)
  utilitaire(s) isapnp ou PCI pour réaliser la configuration, ils
  s'exécuteront après le BIOS et modifieront les choses de la façon que
  vous leur aurez indiqué.


  44..11..11..  CCoohhaabbiittaattiioonn aavveecc WWiinnddoowwss99xx

  Si vous faites tourner Windows sur le même PC, comment répondre à la
  question du BIOS : Avez-vous un Système d'Exploitation (SE) _P_n_P ?
  Normalement (et avec confiance) vous devriez dire non pour Linux
  standard et oui pour Windows9x. Mais il est particulièrement pénible
  d'avoir à paramétrer le menu CMOS manuellement à chaque fois que vous
  changez de SE.  Une solution consiste à paramétrer la CMOS pour un SE
  non _P_n_P, même si vous démarrez sous Windows. On peut espérer que
  Windows sera capable de prendre en compte cette situation où tout le
  matériel a été entièrement configuré par le BIOS. De plus, on peut
  penser que même si Windows ne s'aperçoit pas que le matériel a déjà
  été configuré, il fera la configuration lui-même 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 périphériques que ce qui
  est enregistré dans les registres Windows.  Mais, la configuration
  matérielle réelle (effectuée par le BIOS) est celle qui est
  enregistrée dans l'ESCD et elle peut être différente de celle des
  registres => donc ennuis.

  Une solution pour essayer d'avoir les mêmes infos dans les registres
  et dans l'ESCD consiste à installer (ou réinstaller) Windows après que
  le BIOS ait été configuré pour un "SE non _P_n_P".  Cela devrait
  permettre de présenter à Windows un système 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 dernière version de cet HOWTO),
  faites-le moi savoir car je n'ai eu qu'une seule indication me disant
  que cela marchait.

  Une autre méthode consiste à "enlever" les périphériques qui causent
  des problèmes à Windows en cliquant sur "enlever" dans le gestionnaire
  de périphériques. Ensuite, redémarrez le PC avec "SE non _P_n_P"
  (paramétré dans la CMOS au moment du redémarrage°. Windows
  réinstallera alors les périphériques, en utilisant, on l'espère, le
  paramètrage des ressources du bus tel que configuré par le BIOS.
  Pensez que Windows peut vous demander d'insérer le CD d'installation
  de Windows dans le lecteur car, quelquefois, il ne trouve pas les
  fichiers de pilotes (et autres) même s'ils sont déjà présents. Pour le
  vérifier, j'ai "enlevé" la carte NIC (carte interface réseau) qui
  avait un pilote compatible Novell. Au redémarrage, Windows l'a
  réinstallée pour un réseau Microsoft au lieu de Novell. Ce qui
  signifie que le client Novell a dû être réinstallé. Indiquez moi vos
  problèmes lors de l'utilisation de cette méthode (uniquement pour la
  dernière version de cet HOWTO).


  44..22..  CCoommmmeenntt ddooiivveenntt êêttrree ccoonnttrrôôllééeess lleess rreessssoouurrcceess dduu bbuuss ??

  cela peut simplement signifier de décider comment allouer les
  ressources du bus pour les IRQ et le DMA.  Sur "auto", le bios se
  chargera de l'allocation. Sur manuel, vous réserverez manuellement
  certaines IRQ à utiliser pour des cartes anciennes (cartes non-pnp).
  Maintenant le BIOS peut, ou non, reconnaître vos vieilles cartes. Le
  BIOS ne reconnaîtra vos cartes anciennes que si vous faites tourner
  ICU (ou quelque chose comme cela) sous Windows pour les faire
  reconnaître par le BIOS. S'il les reconnaît, alors essayez l'option
  "auto". S'il ne les reconnaît pas, alors réservez manuellement les IRQ
  nécessaires pour les cartes ISA anciennes et laissez BIOS PnP allouer
  le reste.


  44..33..  RRééiinniittiiaalliisseerr llaa ccoonnffiigguurraattiioonn ??

  Cette opération effacera de la base de données ESCD du BIOS la manière
  dont les périphériques PnP doivent être configurés ainsi que la liste
  de configuration des périphériques anciens (non-PnP). Ne jamais faire
  cela à moins d'être convaincu que cette base de données est erronée 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 démarrer. Si le
  BIOS perd les données sur les périphériques anciens, alors vous devrez
  faire tourner à nouveau ICA sous Windows pour retrouver ces données.


  55..  CCoommmmeenntt aaggiirr aavveecc lleess ccaarrtteess PPnnPP

  55..11..  IInnttrroodduuccttiioonn

  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 gérer
  le _P_n_P ils ne sont pas toujours d'utilisation facile.  Il y a 6
  méthodes différentes, dont la liste suit, pour s'occuper du _P_n_P (mais
  certaines peuvent ne pas être utilisables dans notre situation).
  Celle(s) à utiliser dépend(ent) de nos objectifs. Ce qui semble être
  le plus efficace dans l'immédiat peut se révéler ne pas être le plus
  facile et le meilleur dans le long terme. Une méthode qui paraît
  simple consiste à ne rien faire et à laisser le BIOS-PnP effectuer la
  configuration, mais vous devrez faire quelques investigations pour
  découvrir ce qu'a fait le BIOS. Il faudrait que quelqu'un qui a tester
  toutes les méthodes en fasse une comparaison et l'écrive. Vous pouvez
  avoir à utiliser plus d'une méthode pour arriver à vos fins.


  ·  ``Désactiver le PnP''  par cavaliers (mais ce n'est pas possible
     pour de nombreuses cartes) ou par un logiciel spécial

  ·  ``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 périphériques 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 système
     d'exploitation PnP.

  ·  ``Configuration par le pilote de  périphérique'', mais peu le font.

  Chacune des solutions ci-dessus configurera les ressources du bus dans
  le matériel. Seule les deux dernières solutions devraient informer le
  pilote du périphérique de ce qui a été fait. Mais seule la dernière le
  fait sûrement (puisque c'est le pilote lui-même qui le fait). La façon
  dont le pilote se trouve informé dépend de lui et vous pouvez avoir à
  faire quelque chose pour le renseigner. Voir  ``Indiquer la
  configuration au pilote''


  55..22..  DDééssaaccttiivveerr llee PPnnPP  ??

  De nombreux périphériques sont uniquement PnP, sans option pour le
  désactiver. Mais, pour certains, vous pouvez désactiver le _P_n_P avec
  des cavaliers ou en utilisant un programme sous Windows qui est fourni
  avec le périphérique (configuration sans cavaliers). Cela évite la
  tâche souvent compliquée de configuration _P_n_P. N'oubliez d'indiquer au
  BIOS que ces ressources du bus sont réservées. Il y a aussi plusieurs
  raisons pour lesquelles vous pouvez ne pas vouloir désactiver le _P_n_P :


  1. Si vous avez MS Windows sur la même machine, vous voulez permettre
     au PnP sous MS Windows de configurer les périphériques de façon
     différente que sous Linux.

  2. Le champ des possibilités de choix des numéros d'IRQ (ou des
     adresses de ports) etc. peut être particulièrement restreint si
     l'on n'utilise pas le PnP.

  3. Vous avez un pilote de périphérique sous Linux qui utilise les
     méthodes _P_n_P pour chercher le périphérique qu'il contrôle.

  4. Si vous avez à changer la configuration dans le futur, cela peut
     être plus facile en utilisant le _P_n_P (pas de cavaliers à déplacer
     ou de programme Dos/Windows à faire tourner).

  5. Vous pouvez avoir (ou aurez) d'autres périphériques _P_n_P qui auront
     besoin d'être configurés et vous voulez donc le prévoir (ou
     l'étudier) de toute façon.

     Une fois qu'ils sont configurés comme des périphériques non-PnP,
     ils ne peuvent plus être configurés par un logiciel PnP ou par le
     BIOS (à moins que vous ne déplaciez les cavaliers et/ou n'utilisiez
     à nouveau le logiciel de configuration Dos/Windows).


  55..33..  LLee BBIIOOSS ccoonnffiigguurree llee PPnnPP

  55..33..11..  IInnttrroodduuccttiioonn àà ll''uuttiilliissaattiioonn dduu BBIIOOSS ppoouurr ccoonnffiigguurreerr llee PPnnPP

  Si vous avez un BIOS PnP, il peut configurer le matériel. Cela
  signifie que votre BIOS lit les besoins en ressources de tous les
  périphériques et les configure (leur alloue les ressources du bus).
  C'est un substitut de SE _P_n_P à l'exception près que le BIOS ne fait
  pas le lien entre les périphériques 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
  mémoire non volatile (ESCD). S'il trouve un nouveau périphérique ou en
  présence d'un conflit, le BIOS devrait effectuer les modifications
  nécessaires 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 manière
  incomplète.  Un avantage de l'utilisation du BIOS réside dans sa
  simplicité puisque, dans la plupart des cas, il n'y a rien à
  paramétrer (sauf à indiquer dans le menu CMOS du BIOS que le SE n'est
  pas PnP). Alors que quelques pilotes de périphériques peuvent être
  capables de détecter 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
  démarre et donc que toutes les ressources du bus sont prêtes à être
  utilisées (et trouvées) par les pilotes de périphériques qui démarrent
  plus tard.

  Selon MS le fait qu'un BIOS PNP soit capable de configurer au sens PnP
  les périphériques (sans l'aide de MS Windows) est optionnel (pas
  obligatoire).  Mais il semble que la plupart de ceux créés après 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 données.  Les détails
  que vous aimeriez connaître concernant votre BIOS peuvent être
  difficiles à trouver (ou pas disponibles). Quelques BIOS ont des
  fonctionnalités _P_n_P minimales et essaient de se décharger de la partie
  difficile de la tâche de configuration sur des utilitaires Windows. Si
  cela arrive, soit vous devrez trouver une autre méthode (comme les
  outils isapnp) soit vous devrez essayer de paramétrer la base de
  données ESCD si le BIOS en possède une. Consulter le paragraphe
  suivant.


  55..33..22..  LLaa bbaassee ddee ddoonnnnééeess EESSCCDD dduu BBIIOOSS

  Le BIOS entretient une base de données 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 possède. L'ESCD
  non seulement stocke la configuration des ressources des périphériques
  _P_n_P mais aussi stocke les informations de configuration des
  périphériques non-PnP (et les repère comme étant non-PnP) pour éviter
  les conflits. Les données ESCD sont habituellement sauvegardées dans
  un circuit qui conserve ces données quand on arrête l'alimentation,
  mais quelquefois elles sont stockées sur un disque dur ??

  L'objectif de l'ESCD est de garder la dernière configuration utilisée,
  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 façon à 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 paramètrer l'ESCD''.

  Pour utiliser ce qui a été paramétré dans l'ESCD assurez-vous de
  choisir "SE non-PnP" équivalent dans la CMOS du BIOS. Ensuite, chaque
  fois que le BIOS démarre (avant le chargement du SE Linux) il doit
  configurer les choses de cette façon. Si le BIOS détecte 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 même
  avoir à modifier les ressources du bus déjà assignées à des cartes _P_n_P
  existantes et modifier l'ESCD en conséquence.

  Si chaque périphérique a enregistré sa dernière configuration, il ne
  devrait pas être nécessaire de les reconfigurer à chaque redémarrage
  de votre PC. Mais cela ne fonctionne pas comme cela. Donc toutes les
  données 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 possèdent une
  sorte de mémoire non volatile pour stocker les informations concernant
  les ressources du bus qui ont été réservées par les cartes non-PnP. De
  nombreux BIOS possèdent les deux.


  55..33..33..  UUttiilliissaattiioonn ddee WWiinnddoowwss ppoouurr ppaarraammééttrreerr ll''EESSCCDD

  Si le BIOS ne paramètre pas l'ESCD de la façon que vous le voulez (ou
  de la façon dont il faudrait), il serait intéressant d'avoir un
  utilitaire Linux qui le fasse. Au début 1999, il n'y en avait pas. Il
  faut donc essayer d'utiliser Windows pour le faire (si vous l'avez sur
  le même PC).

  Il y a trois manières d'utiliser Windows pour essayer de
  paramétrer/modifier l'ESCD. L'une consiste à utiliser l'utilitaire ICU
  conçu pour DOS ou Windows 3.x. Cela devrait aussi fonctionner
  correctement pour Windows 9x/2k ??  Une autre méthode consiste à
  initialiser les périphériques manuellement ("forcée") sous Windows
  9x/2k de sorte que Windows mette cette information dans l'ESCD
  lorsqu'on stoppe Windows normalement.  La troisième méthode est
  destinée aux périphériques anciens qui ne sont pas _p_l_u_g_-_a_n_d_-_p_l_a_y.  Si
  Windows les reconnaît et sait quelles ressources du bus ils utilisent,
  alors Windows devrait mettre cette info dans l'ESCD.

  Si les périphériques _P_n_P sont configurés automatiquement par Windows
  sans que l'utilisateur ne le "force" à changer les paramètres, alors
  ceux-ci ne seront probablement inscrit dans l'ESCD. Naturellement
  Windows peut décider de lui-même de les configurer en utilisant des
  paramètres identiques à ceux qui sont dans l'ESCD mais ce n'est qu'une
  coïncidence.

  Les systèmes d'exploitation Windows 9x sont _P_n_P et configurent, au
  sens _P_n_P les périphériques. Ils entretiennent leur propre base de
  données _P_n_P au plus profond des Registres (stockés 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 mémoire et une autre (peut-être à peu près la même)
  stockée sur le disque dur. Pour la consulter (celle qui est en mémoire
   ?)indirectement dans Windows98 ou pour y forcer des modifications
  vous utilisez le gestionnaire de périphériques.

  Dans Windows98, il y a 2 manières d'invoquer le gestionnaire de
  périphériques :

  1. Poste de travail --> Panneau de configuration --> Système -->
     Gestionnaire de périphériques.

  2. (cliquer sur le bouton droit de la souris) Poste de travail -->
     Propriétés --> Gestionnaire de périphériques.

     Puis dans le gestionnaire de périphériques vous sélectionnez un
     périphérique (quelquefois en plusieurs étapes s'il y plusieurs
     périphériques de la même classe). Puis cliquez sur Propriétés puis
     sur Ressources. Pour essayer de modifier la configuration de la
     ressource manuellement, désélectionnez "utiliser les paramètres
     automatiques" puis cliquez sur "Modification des paramètres".
     Maintenant essayer de modifier les paramètres, 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 paramètrage existant de Windows mais
     que vous vouliez le "forcer", alors, vous devrez forcer une
     modification quelconque puis forcer à nouveau les paramètres
     originaux.

  Pour voir ce qui a été "forcé" sous Windows98 regardez dans la liste
  du "matériel forcé" : Démarrer --> Programmes --> Accessoires -->
  Outils système -- Information système --> Ressources matérielles -->
  Matériel 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 fenêtre "Information système" vous pouvez également contrôler
  comment les IRQ et les ports d'E/S ont été alloués sous Windows.

  Même 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 manière différente de l'ESCD. Dans
  les rares cas où tous les périphériques sous Windows sont soit des
  périphériques anciens soit des périphériques "forcés", il faut que les
  configurations Windows et ESCD soient identiques.


  55..33..44..  AAjjoouutt dd''uunn nnoouuvveeaauu ppéérriipphhéérriiqquuee ((ssoouuss LLiinnuuxx oouu ssoouuss WWiinnddoowwss))

  Si vous ajoutez un nouveau périphérique _P_n_P et que vous ayez paramétré
  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 périphérique _n_o_n _P_n_P ancien (ou d'un périphérique
  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'intermédiaire des menus de configuration de la CMOS) que certaines
  ressources du bus qu'il utilise sont réservées et ne doivent pas être
  allouées par le _P_n_P. Cette information n'est pas sauvegardée dans
  l'ESCD.  Mais, en cas de conflit, il peut y avoir une option du menu
  BIOS permettant de rendre prépondérant ou non, sur le contenu de
  l'ESCD, les choix faits au niveau de la CMOS. Une autre méthode
  consiste à faire tourner ICU sous DOS/Windows. Encore une autre
  consiste à installer manuellement le périphérique sous Windows 9x/2k
  et de s'assurer que cette configuration a été "forcée" (voir le
  paragraphe précédent). Si elle a été "forcée" Windows devrait avoir
  mis à jour l'ESCD lors de l'arrêt du PC.


  55..44..  IIssaappnnpp

  Une bonne partie de la documentation concernant isapnp est difficile à
  comprendre si l'on ne connaît pas les bases du _P_n_P. Cet HOWTO devrait
  aider à la comprendre ainsi que les FAQ (Questions fréquemment posées)
  qui l'accompagne.  isapnp ne concerne que les périphériques PnP sur le
  bus ISA (non PCI).  En lançant le programme Linux "isapnp" au
  démarrage, on configure ces périphériques avec les valeurs indiquées
  dans /etc/isapnp.conf. Il est possible de créer ce fichier de
  configuration automatiquement mais vous devrez l'éditer manuellement
  pour faire des choix entre différentes options.  Avec isapnp, un
  pilote de périphérique, faisant partie du noyau, peut être lancé
  prématurément, avant que isapnp ait paramétré l'adresse, etc.  dans le
  matériel. Ce qui entraîne que le pilote de périphérique ne sera pas
  capable de trouver le périphérique correspondant. Le pilote utilise la
  bonne adresse alors que celle-ci n'a pas encore été paramétrée dans le
  matériel.

  Si votre distribution Linux installe automatiquement isapnptools,
  isapnp peut déjà être lancé au démarrage. 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 décisions sur la manière de configurer
  à mesure que vous éditez le fichier de configuration.  Vous pouvez
  utiliser le programme  "pnpdump" pour vous aider à créer 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
  paramétrerez) que vous n'avez pas de SE _P_n_P puisque vous voudrez
  toujours que que le BIOS configure les périphériques PCI. Alors que le
  BIOS peut également configurer les périphériques ISA, isapnp le
  refera.


  55..55..  UUttiilliittaaiirreess PPCCII

  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" paramètre les allocations de ressources dans le matériel.


  55..66..  CCoorrrriiggeerr llee nnooyyaauu ppoouurr rreennddrree LLiinnuuxx ccoommppaattiibbllee PPnnPP

  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 matérielle". Cette adaptation peut ne
  pas correspondre au noyau le plus récent. Le noyau résultant est
  réputé stable mais cependant des bogues ont été signalés.  Une
  documentation est incluse comme serial.txt, pour montrer comment faire
  pour un port série. 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
  personnalisée.  Un problème vient de ce que de nombreux pilotes de
  périphériques 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>



  55..77..  CCoonnffiigguurraattiioonn ppaarr WWiinnddoowwss

  Si vous avez Windows9x (ou 2k) sur le même PC, démarrer 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
  effaçait les IRQ des registres des périphériques PCI. Dans ce cas,
  Linux signale qu'il a trouvé une IRQ à zéro. Dans ce cas, vous ne
  pouvez pas utiliser cette méthode.


  55..88..  CCoonnffiigguurraattiioonn ppaarr lleess ppiillootteess ddee ppéérriipphhéérriiqquueess

  Quelques pilotes de périphériques utilisent les méthodes _P_n_P pour
  paramétrer les ressources du bus au point de vue matériel et seulement
  pour les périphériques qu'ils contrôlent. Dans ce cas, puisque le
  pilote a effectué la configuration, il connaît évidemment la
  configuration et il n'y a aucun besoin de lui fournir ces
  informations.

  Le problème ici porte sur deux points. Il est difficile de mettre dans
  le pilote tout ce qui est nécessaire et le pilote peut accaparer des
  ressources du bus qui seraient nécessaires pour d'autres
  périphériques. 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>''



  55..99..  LLooggiicciieellss eett ddooccuummeennttss PPnnPP


  ·  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>

  ·  Spécifications <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 fonctionnalités style PnP pour le bus
     PCI bus.

  ·  Le livre : Architecture système _P_l_u_g _a_n_d _P_l_a_y, de Tom Shanley, Mind
     Share 1995. Détaille le _P_n_P sur le bus ISA.  Uniquement un survol
     concis du _P_n_P sur le bus PCI.



  66..  CCoommmmuunniiccaattiioonn ddee llaa ccoonnffiigguurraattiioonn aauu ppiilloottee

  66..11..  IInnttrroodduuccttiioonn

  La manière exacte dont cela s'effectue dépend du pilote. Certains
  pilotes disposent de plus d'une méthode pour détecter la configuration
  du périphérique physique. À l'extrême, on trouve le cas où il faut
  paramétrer "en dur" les ressources du bus dans le noyau et recompiler
  celui-ci. À l'autre extrême, le pilote fait tout automatiquement et
  vous n'avez rien à faire. Il peut même paramétrer les ressources du
  bus dans le matériel en utilisant les méthodes _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
  périphériques à des adresses ou il pense trouver le périphérique. Il
  peut alors essayer de tester différentes IRQ pour voir laquelle
  fonctionne (IRQ = Interrupt ReQuest / ReQuête d'Interruption). Ce
  qu'il peut faire automatiquement ou non. Dans d'autres cas, le pilote
  utilise des méthodes _P_n_P pour trouver le périphérique et la façon dont
  les ressources du bus ont été affectées, mais ne pas les paramétrer
  lui-même. Il peut aussi regarder certains fichiers du répertoire
  /proc.

  On peut avoir besoin d'indiquer les ressources du bus comme paramètre
  au noyau pour un module chargeable. Voir
  /usr/lib/modules_help/descr.gz pour avoir une liste des paramètres
  possibles. Le modules à charger est indiqué dans /etc/modules avec ses
  paramètres. Dans certains autres cas les ressources du bus peuvent
  être indiquées au noyau par des paramètres.  Ceux-ci sont mis dans le
  fichier lilo.conf sous la forme append="...".  Dans ce cas le
  programme lilo doit être exécuté pour enregistrer ces données dans le
  code de démarrage du noyau.

  Alors qu'il y a une grande diversité dans la manière dont les pilotes
  peuvent trouver les ressources du bus, le but final est le même. Il y
  a tellement de périphériques différents et de pilotes de périphériques
  pour les gérer que vous pouvez avoir besoin de consulter la
  documentation de votre pilote particulier pour trouver comment celui-
  ci gère 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 brèves
  indications sur un petit nombre de pilotes de périphériques sont
  données dans les paragraphes suivants.


  66..22..  PPiilloottee dduu ppoorrtt sséérriiee :: sseettsseerriiaall

  Pour le pilote de port série 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 démarrage. Dans
  les versions les plus récentes, on trouve un fichier  /etc/serial.conf
  que vous pouvez "éditer" en utilisant simplement la commande setserial
  de la manière habituelle et ce que vous paramétrez en utilisant
  setserial est sauvegardé dans le fichier serial.conf. Le fichier
  serial.conf devrait être consulté lors de l'exécution de la commande
  setserial lancée par un fichier de démarrage. Votre distribution peut
  le faire ou ne pas le faire pour vous.

  Il y a deux manières différentes d'utiliser setserial selon les
  options que vous choisissez. Une méthode consiste à indiquer la
  configuration manuellement au pilote. L'autre méthode consiste à
  tester une adresse donnée et à voir s'il y a un port série à cette
  adresse. On peut aussi tester cette adresses et essayer de détecter si
  une interruption est utilisée pour ce port. Le pilote exécute quelque
  chose comme setserial au démarrage, mais ne teste pas les
  interruptions, il affecte simplement l'interruption "standard" ce qui
  peut ne pas correspondre à la réalité. Il teste uniquement l'existence
  d'un port. Consulter le Serial-HOWTO pour avoir des détails
  complémentaires.


  66..33..  PPiillootteess ddee ccaarrtteess ssoonn

  66..33..11..  OOSSSS--LLiittee

  Vous devez passer IO, IRQ, et DMA en tant que paramètres à un module
  ou les compiler dans le noyau. Mais quelques cartes PCI seront
  détectées automatiquement (par exemple en prenant les infos dans
  /proc/pci ou quelque chose d'équivalent).  RedHat fournit un programme
  "sndconfig" qui détecte les cartes ISA PnP et paramètre
  automatiquement les modules pour les charger avec les ressources de
  bus trouvées.


  66..33..22..  OOSSSS ((OOppeenn SSoouunndd SSyysstteemm)) eett AALLSSAA

  Ils détecteront les cartes par les méthodes _P_n_P puis choisiront le
  pilote approprié et le chargeront. Ils paramètreront également les
  ressources du bus sur une carte ISA-PnP. Vous pouvez avoir à
  intervenir manuellement pour résoudre les problèmes 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.


  77..  QQuueellllee eesstt mmaa ccoonnffiigguurraattiioonn aaccttuueellllee??

  Ici "configuration" concerne l'attribution des ressources _P_n_P du bus
  (adresses, IRQ, et DMA). C'est une question à deux volets pour chaque
  périphérique, et chacun d'eux doit avoir le même réponse.

  1. Quelle est la configuration du logiciel du pilote de périphérique ?
     Autrement dit : comment le pilote pense-t-il que le matériel est
     configuré ?

  2. Quelle est la configuration (s'il y a lieu) du  matériel
     périphérique ?

  Naturellement la configuration matérielle du périphérique et celle de
  son pilote doivent être les mêmes (et normalement, c'est le cas).
  Mais, si les choses ne se passent pas bien, c'est qu'il y a peut-être
  une différence. Cela signifie que le pilote a des données incorrectes
  concernant la configuration réelle du matériel, 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 matérielle
  des périphériques et celle des pilotes correspondants. Alors que les
  pilotes de périphériques de Linux devraient "tout nous dire", il y a
  des cas où il n'est pas facile de déterminer comment le matériel a été
  configuré.

  Un autre problème 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 périphérique, le
  périphérique lui-même ou les deux. Si le pilote de périphérique s'est
  vu attribué une configuration et qu'ils teste le matériel pour
  vérifier qu'il est configuré de la même manière, alors la
  configuration indiquée par le pilote devrait être à la fois celle du
  pilote et du matériel.

  Mais certains pilotes ne se comportent pas comme cela et peuvent
  accepter une configuration qui ne puisse pas se vérifier. Par exemple,
  "setserial" acceptera une configuration qui ne se vérifie pas (même 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 matériel.

  Quelques infos concernant la configuration peuvent être obtenues en
  lisant les messages du BIOS et de Linux qui apparaissent à l'écran au
  démarrage initial de l'ordinateur. Souvent, ces messages défilent trop
  rapidement pour pouvoir être lus, mais lorsque leur défilement
  s'arrête, tapez plusieurs fois sur la touche "Majuscule + défilement
  arrière" (Shift-PageUp) pour les visualiser. Pour visualiser la suite,
  taper sur la touche "Majuscule + défilement 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 périphérique, et ces
  informations peuvent parfois provenir d'un fichier de configuration
  incorrect.

  Les messages du BIOS affichent la configuration réelle du matériel à
  cet instant donné, mais un SE _P_n_P, isapnp ou les utilitaires PCI
  peuvent la modifier ultérieurement. Les messages du BIOS sont affichés
  avant ceux de Linux. Comme alternative au rappel des messages par les
  touches "majuscule + défilement arrière", 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 à
  apparaître, c'est trop tard pour utiliser la touche "Pause"
  puisqu'alors, les messages de Linux ne sont pas gelés.


  77..11..  CCoommmmeenntt mmeess ppiillootteess ddee ppéérriipphhéérriiqquueess ssoonntt--iillss ccoonnffiigguurrééss ??

  Il y a des programmes que l'on peut lancer de la ligne de commande
  (tel que "setserial" pour les ports série) pour le déterminer.
  L'arborescence du répertoire /proc est utile.  /proc/ioports indique
  les adresses d'E/S utilisées par les pilotes (ou essaye si c'est
  faux). Ils peuvent ne pas être configurés de cette façon dans le
  matériel.

  /proc/interrupts n'indique que les interruptions utilisées
  actuellement et beaucoup de celles qui ont été allouées aux pilotes ne
  sont pas affichées car elles ne sont pas actuellement utilisées. Par
  exemple, même s'il y a une disquette dans l'unité et qu'elle est prête
  à être utilisée, l'interruption la concernant ne sera pas affichée, à
  moins qu'elle ne soit effectivement en cours d'utilisation. De plus,
  une interruption indiquée ici  ne signifie pas qu'elle existe dans le
  matériel. Un indice du fait qu'elle n'existe pas dans le matériel
  consiste à vérifier que le nombre d'interruptions générées est 0. Et
  encore, même si l'on voit que quelques interruptions ont été générées,
  cela peut signifier que cette interruption n'existe pas pour ce
  périphérique mais par un autre périphérique qui n'est pas en cours
  d'utilisation mais qui a pu générer une interruption ou deux.  Dans le
  noyau 2.2 l'arborescence /proc a été modifiée.


  77..22..  CCoommmmeenntt mmeess ppéérriipphhéérriiqquueess ssoonntt--iillss ccoonnffiigguurrééss ??

  C'est facile de trouver quelles ressources du bus ont été attribuées à
  des périphériques 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 méthode sûre. Les
  résultats peuvent être difficile à décoder. 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 périphérique trouvé. Ce ne
  sont pas les mêmes.

  Les messages en provenance du BIOS, lors du démarrage, indique la
  configuration matérielle au moment du démarrage. 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 vérifier la présence du matériel (et
  éventuellement des essais sur les IRQ et le DMA).  Naturellement, si
  le périphérique fonctionne correctement, alors il doit être configuré
  comme son pilote.



  88..  AAppppeennddiiccee

  88..11..  AAddrreesssseess

  Il y a trois types d'adresses : les adresses mémoire centrale, les
  adresses d'E/S et les adresses de configuration. Pour le bus PCI, les
  adresses de configuration constituent un espace d'adressage séparé,
  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-données dans le cas du PCI) soit ou
  non une adresse mémoire, une adresse d'E/S ou une adresse de
  configuration dépend uniquement des tensions sur d'autres fils
  (pistes) du bus.


  88..11..11..  AAddrreesssseess ddee ccoonnffiigguurraattiioonn ssuurr llee bbuuss IISSAA ((PPoorrtt ddee lleeccttuurree
  eettcc..))

  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 méthode
  spéciale d'accès aux registres de configuration sur les cartes PnP.
  Trois adresses d'E/S sont réservées à cet usage. Ces 3 adresses ne
  sont pas différentes pour chaque carte, mais sont partagées par toutes
  les cartes.

  Les trois adresses sont appelées port de lecture, port d'écriture et
  port d'adresse. Ces ports ont la taille d'un octet. Chaque carte PnP
  possède un certain nombre de registres car ces trois adresses seules
  ne sont pas suffisantes pour une simple carte. Pour communiquer avec
  une carte, le numéro de la carte (handle) est envoyé à toutes les
  cartes sur le port d'écriture. Une seule carte reconnaît son numéro et
  se met à l'écoute.  Alors l'adresse du registre concerné est envoyée
  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 déterminé et est
  initialisé par le logiciel de configuration à une adresse qui est
  supposée 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 "programmée". Donc, si vous utilisez disons, isapnp, pour
  initialiser ou tester des données de configuration, vous aurez besoin
  de connaître l'adresse du port de lecture.


  88..11..22..  CChhaammppss dd''aaddrreesssseess

  Le terme "adresse" est quelquefois utilisé dans ce document pour
  parler d'une série d'adresses contiguës. Comme les adresses sont
  données en octets, une simple adresses contient uniquement un octet
  mais les adresses E/S (et mémoire 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 mémoire centrale
  allouées à un périphérique est beaucoup plus grand. Pour un port série
  (périphérique d'E/S), il suffit de donner l'adresse de départ du
  périphérique (par exemple 3F8) puisqu'il est bien connu que le champ
  d'adresses de ce type de périphérique est seulement de 8 octets.
  Cette adresse de départ est connue sous le nom "d'adresse de base".


  88..11..33..  EEssppaaccee dd''aaddrreesssseess

  En ce qui concerne l'ISA, pour accéder à la fois aux "espaces"
  d'adresses E/S et mémoire (centrale) on utilise le même bus d'adresses
  (les fils utilisés pour les adresses sont partagés). Comment le
  périphérique reconnaît-il si une adresse qui apparaît sur le bus
  d'adresses est une adresse mémoire ou une adresse E/S ?  Eh bien, il y
  a quatre lignes spécialisées du bus qui véhiculent 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 mémoire centrale ne tient
  pas compte de l'adresse présente sur les fils d'adresses du bus. Les
  trois autres fils sont utilisés à des fins identiques. En résumé : il
  existe des lignes de lecture et d'écriture pour les adresses mémoire
  centrale et pour celles d'E/S (4 fils en tout).

  Pour le bus PCI, l'idée de base est identique et on utilise également
  4 fils, mais c'est réalisé de façon légèrement différente. Au lieu
  d'avoir uniquement l'un des quatre fils alimenté, on code un nombre
  binaire sur ces fils (16 possibilités différentes). On peut donc
  véhiculer plus d'informations. Quatre de ces 16 valeurs sont utilisées
  pour les espaces mémoire et E/S comme dans le paragraphe ci-dessus. En
  plus, on trouve l'espace des adresses de configuration qui utilise
  deux valeurs supplémentaires. Les dix possibilités restantes sont
  réservées pour d'autres utilisations.






  88..11..44..  VVéérriiffiiccaattiioonn ddeess cchhaammppss dd''aaddrreesssseess ((TTeesstt ddeess ccoonnfflliittss
  dd''aaddrreesssseess EE//SS IISSAA))

  Pour le bus ISA, il existe un système implanté sur chaque carte PnP
  pour vérifier que d'autres cartes n'utilisent pas la même adresse.  Si
  deux cartes ou plus utilisent les mêmes 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,
  même dans ce cas, une carte ancienne pourrait se cacher quelque part
  avec la même adresse.

  Le test consiste, pour la carte, à donner, sur le bus, comme numéros
  de test ses propres registres d'E/S. Le logiciel _P_n_P les lit et
  vérifie qu'il lit les mêmes numéros. Si tel n'est pas le cas, quelque
  chose ne va pas (comme, par exemple, une autre carte à la même
  adresse). Il répète alors le test avec un autre numéro de test.
  Puisqu'en réalité il teste le champ des adresses d'E/S assigné à cette
  carte, on l'appelle " test des champs d'adresses". On devrait plutôt
  l'appeler "test des conflits d'adresses".  S'il y a un conflit
  d'adresses, on obtient un message d'erreur qu'il faut résoudre par ses
  propres moyens.


  88..11..55..  CCoommmmuunniiccaattiioonn ddiirreeccttee vviiaa llaa mméémmooiirree..

  Traditionnellement, la plupart des périphériques d'E/S utilisaient les
  E/S mémoire pour communiquer avec le CPU. Par exemple, le port série
  fonctionne de cette façon. Le pilote de périphérique, qui tourne sur
  le CPU lit et écrit les données de/vers l'espace des adresses d'E/S et
  la mémoire centrale.  Une méthode plus rapide consisterait à faire
  mettre les données directement en mémoire centrale par le
  périphérique. Une manière de le réaliser est d'utiliser l'accès direct
  mémoire (``Canaux DMA'').  Une autre méthode consiste à affecter un
  espace de la mémoire centrale au périphérique. Comme cela, le
  périphérique lit et écrit directement en mémoire centrale sans avoir à
  se préoccuper de l'accès direct mémoire (DMA).  De tels périphériques
  possèdent normalement des adresses d'E/S et des adresses mémoire.


  88..22..  LLeess iinntteerrrruuppttiioonnss -- DDeessccrriippttiioonn ddééttaaiillllééee..

  Le système d'interruption véhicule un paquet d'informations, mais
  seulement de façon indirecte. Le signal d'interruption (une tension
  sur un fil) indique simplement à un circuit appelé contrôleur
  d'interruptions qu'un certain périphérique a besoin que l'on s'occupe
  de lui. Le contrôleur d'interruption le signale alors au CPU. Le CPU
  va chercher le pilote de ce périphérique et en exécute une partie que
  l'on désigne 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 transférer des octets du (ou vers le) périphérique. Ce
  programme (cette routine) peut facilement analyser ce qui s'est passé
  puisqu'il connaît les adresses des registres (à condition que les
  numéros d'interruption (IRQ) et que les adresses d'E/S aient été
  correctement renseignées). Ces registres contiennent les informations
  concernant l'état du périphérique. Le logiciel lit le contenu de ces
  registres et, en examinant ce contenu, voit ce qui s'est passé et
  entreprend l'action appropriée.

  Donc, chaque pilote de périphérique a besoin de savoir quel est le
  numéro d'interruption (IRQ) qui le concerne. Sur le bus PCI (et pour
  les ports série sur un bus ISA depuis la version du noyau 2.2) il est
  possible que deux périphériques ou plus se partagent le même IRQ
  (numéro d'interruption).  Cela est rendu possible en faisant exécuter
  par le CPU toutes les routines de service d'interruption de tous les
  périphériques qui utilisent cette interruption. La première chose que
  réalise une telle routine de service consiste à tester si
  l'interruption concerne son périphérique. Si tel n'est pas le cas
  (fausse alarme), elle se termine et le traitement continue avec la
  routine de service suivante etc.



  88..33..  IInntteerrrruuppttiioonnss PPCCII

  Les interruptions PCI sont différentes, mais comme elles correspondent
  normalement aux IRQ, elles se comportent à peu près de la même façon.
  Le fait que les interruptions PCI puissent être partagées constitue
  une différence majeure. Par exemple l'IRQ5 peut être partagée entre
  deux périphériques PCI. Cette possibilité de partage est automatique :
  il n'est pas nécessaire de disposer d'un matériel ou d'un logiciel
  spécial.  On a entendu parler de situations où un tel partage ne
  fonctionne pas, mais la cause réside certainement dans le logiciel du
  pilote de périphérique.  Tous les pilotes de périphérique PCI sont
  supposés fonctionner avec partage des interruptions. Il faut cependant
  noter que le partage d'une même interruption entre un bus ISA et PCI
  n'est pas possible. Mais un partage illégal d'interruption
  fonctionnera à condition que les périphériques en conflit ne soient
  pas utilisés en même temps. "En même temps" signifie ici qu'un
  programme en cours d'exécution "ouvre" le périphérique dans le
  programme C.

  Vous pouvez avoir besoin de connaître quelques-uns des détails du
  système d'interruption PCI de façon à pouvoir paramétrer la mémoire
  CMOS du BIOS ou pour positionner les cavaliers sur de vieilles cartes
  PCI. Le bus PCI possède quatre lignes d'interruptions de INTA# à INTD#
  (A, B, C et D).  Pour un système à 7 connecteurs, d'après les
  spécifications, on aurait la possibilité de disposer de 7 x 4 = 28
  lignes d'interruptions différentes.  Mais ces spécifications ne
  permettent qu'un nombre inférieur 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 désigne l'interruption B de l'emplacement numéro 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 réalise
  physiquement en connectant le fil W aux fils 1A, 2B etc... De même, le
  fil X pourrait être connecté aux fils 1B, 2C, 3D, 4A, 5B, 6C, 7D. Au
  démarrage, le BIOS fait correspondre X, W, Y, Z aux interruptions.
  Ensuite il écrit dans un registre physique de chaque périphérique
  quelle interruption lui a été affectée de sorte que le périphérique
  (et tout ce qui interroge le périphérique) sache quelle IRQ il
  utilise.

  Les fils X, W, Y et Z mentionnés ci-dessus sont désignés dans les
  spécifications PCI par les noms INTA#, INTB#, INTC# et INTD#. Cette
  dénomination 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 reliée à l'INTA# (X) du bus PCI. C'est une
  notation confuse.

  Il y a également une autre obligation. Un connecteur PCI doit utiliser
  les premières 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 périphériques peuvent être connectés à une carte à un
  emplacement donné, mais ils ne peuvent disposer que de 4 interruptions
  PCI. Cela ne pose pas de problème puisque les interruptions peuvent
  être partagées et donc, chacun des 8 périphériques (s'ils sont
  présents) pourra disposer d'une interruption. La lettre d'interruption
  PCI d'un périphérique est souvent fixe et câblée dans le périphérique.
  Le BIOS affecte les IRQ(demandes d'interruptions) de façon à éviter
  les conflits avec les IRQ qu'il connaît 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 à zéro tous les
  numéros d'interruption dans les cartes PCI après que l'affectation des
  numéros 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 paramétrées à zéro.

  Vous pourriez penser que l'utilisation par le PCI des IRQ (bus ISA)
  peut être lent etc. Pas vraiment. Le(s) circuit(s) contrôleur(s)
  d'interruptions ISA possède(nt) un fil d'interruption directement
  relié au CPU afin que celui-ci puisse réagir immédiatement. Alors que
  les signaux sur les bus d'adresse et de données ISA doivent cheminer à
  travers le bus PCI pour atteindre le CPU, les signaux d'interruption
  IRQ lui parviennent pratiquement directement.



  88..44..  IIssoollaattiioonn


  C'est uniquement valable pour le bus ISA. L'isolation est une méthode
  complexe d'assignation d'un identificateur temporaire (id number =
  numéro d'identification ou Card Select Number (CSN) = numéro de
  sélection de carte) à chaque périphérique _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 méthode simpliste. On
  n'utilise qu'une seule adresse d'écriture pour toutes les écritures
  sur tous les périphériques _P_n_P connectés. Cette adresse est utilisée
  pour envoyer (assigner) un identificateur unique à chaque périphérique
  _P_n_P. L'attribution de cet identificateur impose qu'un seul
  périphérique soit à l'écoute lorsque cet identificateur est envoyé
  (écrit) à cette adresse commune. Tous les périphériques _P_n_P ont un
  numéro de série unique qu'ils utilisent dans le processus d'isolation.
  La réalisation de l'isolation ressemble à un jeu. Elle est réalisée en
  utilisant l'équivalent d'un bus à un seul fil reliant tous les
  périphériques _P_n_P et du programme d'isolation.

  Lors de la première manche de ce "jeu", tous les périphériques _P_n_P
  sont à l'écoute sur ce fil et envoient simultanément une séquence de
  bits sur le fil. Les valeurs permises sont soit des 1 (tension
  positive) soit des "0 ouverts" sans tension (circuit ouvert ou
  troisième état). Chaque périphérique _P_n_P commence à envoyer
  séquentiellement son numéro de série, bit par bit, en commençant par
  le bit de poids fort, sur le fil.  Si l'un des périphériques envoie un
  1 sur le fil, un 1 sera reçu par tous les autres. Si tous les
  périphériques envoient un "0 ouvert", on n'entendra rien sur le fil.
  L'objectif est d'éliminer (à la fin de cette première manche) tout le
  monde sauf le périphérique ayant le numéro de série le plus élevé. Par
  "éliminer", on entend cesser d'écouter plus avant l'adresse d'écriture
  que tous les périphériques encore dans la course continuent d'écouter.
  On appelle également cela "se retirer". (Il faut noter que tous les
  numéros de série sont de même longueur).

  En premier lieu, ne prenons en considération que le bit de poids le
  plus élevé du numéro de série mis sur le fil par tous les
  périphériques n'ayant pas encore d'identificateur. Si l'un des
  périphériques _P_n_P envoie un 0 (0 ouvert) mais reçoit un 1, cela
  signifie qu'un autre périphérique _P_n_P possède un numéro de série
  supérieur 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 numéro de série le plus élevé).  Alors, les périphériques encore de
  la partie possèdent tous le bit de poids fort (un 1), donc, nous
  pouvons supprimer ce bit et prendre en compte uniquement le "numéro de
  série tronqué" résultant pour continuer à participer à cette manche.
  Retournez au début de ce paragraphe et répétez le processus jusqu'à ce
  que le numéro de série complet ait été traité pour chacun des
  périphériques (voir ci-dessous comment est traité le cas où il n'y a
  que des 0).

  Il est donc clair que le numéro de série le plus élevé ne sera pas
  éliminé de la partie. Mais qu'en est-il si les chiffres de tête (du
  numéro de série é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 zéros en tête, alors les 0 sont éliminés
  exactement comme les 1 au paragraphe ci-dessus. La partie continue et
  les chiffres suivants (du numéro de série) sont envoyés.

  À la fin de la manche (lorsque le bit de poids faible du numéro de
  série du concurrent restant a été émis), seul le périphérique _P_n_P
  ayant le numéro de série le plus élevé est présent. On lui donne alors
  un identificateur et il quitte la partie définitivement. Ensuite, tous
  les éliminés de la dernière 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
  périphériques _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é attribués,ils sont
  utilisés pour s'adresser à chacun des périphériques _P_n_P pour les
  configurer et lire leur configuration. On notera que ces
  identificateurs ne sont utilisés que pour la configuration _P_n_P et ne
  sont pas utilisés pour les communications normales avec le
  périphérique _P_n_P. Au démarrage 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 française 28 Octobre 1999)

  Ce document est un "guide pratique" pour la mise en place rapide d'un
  moteur de Base de Données SQL et des outils frontaux sur un système
  Unix. Il traite également du langage standard International ANSI/ISO
  SQL et passe en revue les mérites/avantages d'un moteur de Base de
  Données développé dans le cadre mondial de l'environnement de
  développement ouvert d'internet.  Ce document explique COMMENT mettre
  en place une Base de Données Relationnelle SQL Objet de la nouvelle
  génération "PostgreSQL" sur votre système unix qui pourra être
  utilisée comme Base de Données Serveur d'Application ou Serveur Web.
  PostgreSQL implémente 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 données tels que interfaces
  utilisateur graphiques (GUI), outils RAD (Développement Rapide
  d'Application ), interfaçage des langages de programmation ("C",
  "C++", Java, Perl), pilotes ODBC, JDBC ainsi que sur les outils et
  programmes interfaçage d'une Base de Données Web . L'information
  donnée ici est valable pour toutes autres plates-formes unix et autres
  Bases de Données. Cette information sera très utile aux nouveaux util­
  isateurs des Bases de Données, de PostgreSQL et du langage SQL.  Ce
  document comporte aussi un didacticiel SQL et les spécifications de la
  syntaxe SQL qui devrait être très utile aux débutants. Les gens
  expérimentés trouveront dans ce document un guide de référence très
  pratique. Pour les étudiants, l'information donnée ici leur permettra
  d'obtenir le code source du Système de Gestion de Base de Données
  Relationnel (SGBDR) PostgreSQL à partir duquel ils pourront étudier
  comment un moteur de SGBDR SQL est écrit.
  ______________________________________________________________________

  Table des matières

































  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 définis 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 Vérification

  7. PostgreSQL Supporte des Base de Données extrêmement 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 Données 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 Spécifications DBI
        11.2.6 Problèmes 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 < insérez 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'exécution en parallèle avec DBI?
        11.2.15 Comment puis-je invoquer des procédures enregistrées avec DBI?
        11.2.16 Comment puis-je récupérer les valeurs de retour de procédures enregistrées avec DBI?
        11.2.17 Comment puis-je créer ou supprimer une base de données 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 méthodes 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 génération de requête pour PostgreSQL
     12.3 Outil interactif de génération de requête pour PostgreSQL - ISQL
     12.4 MPMGR - Un outil de gestion de Base de Données 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 données web - Le système de développement AppGEN
     14.2 WWW Web interface pour PostgresSQL - DBENGINE

  15. Module Apache Webserver pour PostgreSQL - NeoSoft NeoWebScript

     15.1 HEITML, extension, côté serveur de HTML et langage 4GL pour PostgreSQL
     15.2 Serveur Web America On-line AOL pour PostgreSQL
     15.3 Outil Système de suivi de Problème/Projet pour PostgreSQL
     15.4 Conversion de fichiers dbase dbf en fichiers PostgreSQL

  16. Outil de Conception/Implémentation 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 côté serveur, avec HTML intégré, pour PostgreSQL

     17.1 Fonctionnalités principales
     17.2 Crédits
     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 résider sur le même hôte?

  20. Interfaces au langage "C", "C++", ESQL/C et Opérateurs sur les bits pour PostgreSQL

     20.1 Interface "C"
     20.2 "C++" interface
     20.3 ESQL/C
     20.4 Opérateurs 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 Référence: Ouvrages de référence utiles :
     24.4 Documents de Spécifications 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 débutants
     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 Mémorisés Persistants ISO/ANSI SQL
     24.14 Partie 5 - ISO/ANSI SQL/Liens
     24.15 Partie 6 - Interface de Spécialisation (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 - AGRÉGATS
        24.16.7 RÉSUMÉ
     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 Données

  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 débutants

     33.1 Didacticiel pour PostgreSQL
     33.2 Pointeurs URL Internet

  34. Appendix C - Instructions pour une installation rapide de Linux



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Le but de ce document est de fournir une liste de pointeurs/URL
  détaillée de façon à mettre rapidement en oeuvre PostgreSQL et de
  mettre en avant l'intérêt des systèmes à Code Source Ouvert tel que
  PostgreSQL, Linux.

  Tout système informatique au monde a besoin d'une base de données pour
  stocker/retrouver les informations. La première raison pour laquelle
  on utilise un ordinateur est de stocker, retrouver et traiter
  l'information et de faire cela très rapidement, et donc, de faire
  économiser du temps.  En même temps, le système doit être simple,
  robuste, rapide, fiable, économique et d'utilisation aisée.  La Base
  de Données constitue une PPAARRTTIIEE VVIITTAALLEE DDUU SSYYSSTTÈÈMMEE des plus importantes
  car elle contient les données indispensables de toute compagnie au
  monde.  Les systèmes de gestion de base de données les plus courants
  sont basés sur les spécifications ISO (International Standard
  Organisation) SQL lesquelles sont également basées sur les normes
  américaines ANSI SQL. Les spécifications les plus courantes
  généralement utilisées sont l'ISO/ANSI SQL 1992. La prochaine norme,
  encore en cours de développement est la SQL 1998/99 aussi appelée
  SQL-3. Les systèmes de gestion de bases de données les plus répandus
  tels que Oracle, Sybase et Informix s'appuient sur ces standards ou
  essaient de les implémenter.

  Il y a plus de 20 variétés, commerciales/internet,  de systèmes de
  gestion de base de données actuellement utilisés dans le monde et
  beaucoup plus dans un futur proche. En l'absence d'une norme telle que
  l'ANSI/ISO SQL, il serait très difficile pour l'utilisateur de
  développer une application une fois pour toutes et de l'utiliser avec
  tous les systèmes de gestion de bases de données. L'utilisateur veut
  développer son application une fois pour toutes en utilisant les
  normes ISO SQL, ODBC, JDBC afin qu'elle puisse être déployée sur une
  grande variété de systèmes de gestion de base de données a travers le
  monde.

  PostgreSQL est la Base de Donnée LIBRE la plus populaire au monde qui
  implémente la plupart des normes ISO SQL, ANSI SQL/98, SQL/92 et ANSI
  SQL/89 RDBMS. PostgreSQL est une base de données relationnelle Objet
  de la nouvelle génération et les futures normes ANSI SQL tels que le
  SQL 1998 (SQL-3) et au-delà traiteront de manière croissante de bases
  de données Objet et de types de données Objet. PostgreSQL est le seul
  SGBD (RDBMS - Relational Data Base Management System) au monde qui
  supporte les bases de données Objet et SQL. Ce document vous explique
  comment installer le système de gestion de base de données, comment
  mettre en place la base de données Web, la base de données application
  , les frontaux GUIs et les programmes interfaçage. On ne saurait trop
  RECOMMANDER d'écrire vos applications bases de données 100 %
  compatibles avec les normes ISO/ANSI SQL, ODBC, JDBC ceci rendant
  votre application portable sur de multiples SGBD (Systèmes de gestion
  de Bases de Données) tels que PostgreSQL, Oracle, Sybase, Informix
  etc.

  La haute qualité, et un large ensemble de possibilités de PostgreSQL
  viennent du fait que ce système est développé suivant le principe du
  «Modèle de développement à Code Source Ouvert». Les modèles à Code
  Source Ouvert sont ceux ou la totalité du code source est fournie et
  ou le développement se fait à travers l'internet par une très vaste
  communauté de cerveaux humains en réseau. La tendance future des
  développement logiciels réside dans ce que l'on appelle les "super
  autoroutes de l'information" qui s'étendent à travers le monde entier.
  Dans les années à 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 données.

  Par l'application des principes de la statistique, des mathématiques
  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 interconnectés par les super-autoroutes de
  l'information. Plus le nombre de cerveaux au travail sera grand,
  meilleure sera la qualité du logiciel produit. Le modèle "à Code
  Source Ouvert" évite aussi de RRÉÉIINNVVEENNTTEERR LLAA RROOUUEE, supprime LLAA
  DDUUPPLLIICCAATTIIOONN DDUU TTRRAAVVAAIILLtout en étant particulièrement économique, en
  diminuant les délais de distribution et en suivant les lois
  économiques modernes d'optimisation des ressources nationales et
  globales.  Une fois qu'un logiciel a été réalisé par d'autres, vous
  NN''AAVVEEZZ PPAASS à recommencer le travail. Vous ne perdrez pas un temps
  précieux sur quelque chose qui a déjà été CCOORRRREECCTTEEMMEENNTT réalisé.  Votre
  temps est extrêmement précieux et il faut l'utiliser de manière
  efficace, car vous ne disposez que de 8 heures par jour pour
  travailler!!.  Dans un futur proche, à l'aube du 21-ième siècle, la
  manière de se procurer un logiciel va changer. Les utilisateurs
  accorderont en premier lieu leur préférence aux logiciels ouverts tel
  PostgreSQL, Linux etc...

  En achetant des binaires vous n'obtenez pas la véritable propriété du
  logiciel et ce n'est pas juste. Acheter un logiciel _p_e_u_t devenir une
  attitude archaïque. On a seulement besoin d'acheter un bon matériel,
  il vaut mieux dépenser de l'argent en matériel et trouver le logiciel
  sur internet.  Le point important, c'est que llee ggrrooss dduu ttrraavvaaiill est
  effectué par le matériel. Le matériel est le cheval de bataille et le
  logiciel est là pour le piloter.  Le matériel est tellement plus
  compliqué que seulement 6 pays sur 180 au monde ont démontré leur
  capacité à concevoir et à fabriquer les composants d'ordinateurs. La
  conception et la fabrication de composants d'ordinateurs est une
  technologie avancée. C'est un processus très complexe, requérant de
  très larges investissements en usine et en machines de production
  maîtrisant la technologie des 0.18 micron. Des milliards de
  transistors/circuits sont implantés sur une petite puce de silicium.
  Des compagnies telles que Applied Material, AMD, Intel, Cyrix,
  Hitachi, Ibm et autres ont dépensé d'importantes quantités d'hommes-
  ans de travail pour maîtriser des hautes technologies telles que la
  Micro-électronique et la Nano-électronique (Micro signifie millionième
  de mètre et Nano signifie milliardième de mètre).  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 même la nano-électronique sera
  utilisées pour les circuits intégrés d'ordinateurs.  Les conducteurs
  en aluminium seront détrônés par ceux en cuivre sur les puces
  d'ordinateurs, car le cuivre est meilleur conducteur d'électrons.  En
  photo-lithographie, l'extrême ultraviolet, les rayons X ou les
  techniques de faisceau d'electrons seront utilisées pour graver des
  circuits de taille inférieure à 0.15 microns.  Dans environ 20 ans,
  les circuits en silicium seront remplacées par des ordinateurs
  moléculaires et des circuits biologiques qui seront des millions de
  fois plus rapides que les circuits en silicium.  Les molécules sont
  des groupes d'atomes, et les atomes sont de minuscules particules
  constituant la matière première première de tout ce qui nous entoure.
  Les ordinateurs moléculaires utiliseront les molécules 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'algèbre binaire (nombres 0 et 1).  Le tableau ci-dessous montre les
  progrès et les tendances futures des puces d'ordinateurs.


















                  Progrès dans les capacités des puces dans le futur
                  **************************************************
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | Item/Année                     | 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 dissipée maximum     | 70     | 90     | 110    | 130    | 175   |  600    |
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | fréquence de fonct. puce  (MHz)| 750    | 1250   | 1500   | 2100   | 10000 | > 50 000|
  +--------------------------------+--------+--------+--------+--------+-------+---------+
  | Capacité mémoire DRAM          | 256 MB | 1 GB   | 2 GB   | 4 GB   | 256 GB| > 1000GB|
  +--------------------------------+--------+--------+--------+--------+-------+---------+




  Comme on peut le voir c'est le matériel qui est important et de haute
  technologie, le logiciel est une technologie moins difficile à
  maîtriser. Donc la fabrication de matériel est vitale pour l'économie
  nationale!. Des compagnies comme Compaq, Dell, Sun Microsystems, HP,
  IBM qui fabriquent des ordinateurs contribuent de façon importante à
  l'économie U.S. aujourd'hui et dans le futur!!

  D'un autre côté, chaque pays au monde développe/produit du logiciel.
  En fait, n'importe qui dans le monde, avec un petit PC économique,
  peut créer un système serveur de base de données Oracle.  Mais cela
  lui prendra environ 10 ans (Le serveur de base de données Oracle
  correspond à plus de 10 hommes-ans de travail). Un homme-an correspond
  au travail d'un homme à temps plein pendant une année. 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 créés 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é effectuée sur PostgreSQL
  au cours des 14 dernières années, cela n'aurait aucun sens de recréer
  ex-nihilo un autre système de gestion de base de données satisfaisant
  aux normes ANSI/ISO SQL. Il est bien plus intéressant de prendre le
  code existant de PostgreSQL, de commencer à l'utiliser, de l'améliorer
  et d'y ajouter les fonctionnalités manquantes.

  PostgreSQL n'est pas seulement un SGBD libre mais aussi un "Produit
  Internet" de bonne qualité.

  On peut prédire que la demande de produits "Fabriqué sur Internet" va
  croître exponentiellement. Ces produits étant de haute qualité, de
  faible coût et ayant une base d'utilisateurs et de développeurs
  extrêmement large.  Les pays qui n'utilisent pas  les produits
  "Fabriqué sur Internet" seront les oubliés de "la Révolution mondiale
  Internet" et resteront loin derrière les autres pays. La raison
  provient de ce "qu'Internet" lui-même est la PPLLUUSS GGRRAANNDDEE compagnie de
  logiciels!

  22..  AAuuttrreess FFoorrmmaattss ddee ccee DDooccuummeenntt

  Ce document est publié en 10 formats différents 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 Français,
     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 rédigé à 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 générer un fichier html)

  ·  sgml2rtf  databasehowto.sgml     (pour générer un fichier RTF)

  ·  sgml2latex databasehowto.sgml    (pour générer 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 réseau) à <http://sunsite.unc.edu/LDP/hmirrors.html>
     choisissez un site et allez dans le répertoire
     /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
  contrôle | 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 Flèches, Page précédente ,Page suivante. Vous pouvez aussi
  utiliser les lettres 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' pour vous
  déplacer vers le haut, vers le bas, au centre, vers la page
  précédente, Pour désactiver 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
  contrôle | 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




  AATTTTEENNTTIIOONN:: ce document est volumineux, le nombre total de pages
  (postscript) imprimées 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.

  33..  LLeess llooiiss ddee llaa PPhhyyssiiqquuee ss''aapppplliiqquueenntt aauu llooggiicciieell !!

  Dans ce chapitre, on montrera comment la science joue un rôle
  important dans la création de nombreux objets comme le logiciel, cet
  univers, la masse, les atomes, les énergies et même vous-même !.  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 planètes, le soleil, la lune, les étoiles, les
  super-amas, les humains etc... sont des objets créés par la science.
  Ce chapitre montre également comment les lois de la science et les
  statistiques témoignent en faveur de systèmes à 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
  systèmes à code source ouvert gagnent rapidement de l'audience.  Et,
  si les règles de la statistique et les lois de la physique sont
  correctes, les systèmes à code source fermés sont appelés à
  DISPARAÎTRE de cette planète.

  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 développement 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 corrélation
  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 même 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.  Différentes branches des sciences, telles que la physique,
  la chimie, etc... se rejoignent toutes dans un vaste ensemble, les
  mathématiques (également nommées Reine des Sciences).

  Et tout, dans ce monde, a des racines profondes dans les
  mathématiques, y compris PostgreSQL.  PostgreSQL utilise «L'algèbre
  moderne» qui constitue une petite branche des mathématiques. L'algèbre
  moderne concerne la «Théorie des ensembles », «l'algèbre
  relationnelle», la science des Groupes, des Anneaux, les Collections,
  Ensembles, Unions, Intersections, Exclusions,Domaines, Listes, etc...


  Un logiciel tel que PostgreSQL existe aujourd'hui grâce à 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 MMÊÊMMEE entité!.  Il y a 100 ans, le fait que la masse et l'énergie
  soient la même chose n'était pas connu des gens !

  Les cellules des cerveaux humains consomment de l'énergie en
  travaillant (à la création d'un logiciel), transformant de l'énergie
  chimique en chaleur.  Même pendant la lecture de ce paragraphe, les
  cellules de votre cerveau consomment du carburant et utilisent de
  l'énergie. Donc INTERROMPEZ IMMÉDIATEMENT VOTRE LECTURE!


  L'énergie résultant de l'activité des neurones (cellules du cerveau)
  peut être mesurée en laboratoire. Par exemple, il y a de nombreux
  instruments comme le "détecteur de mensonge" et autres instruments
  médicaux 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 conséquent, la
  thermodynamique a des effets indirects sur les logiciels comme
  PostgreSQL.

  Suivant la science, il est impossible de construire tout système ou
  théorie (y compris un système logiciel de gestion de base de données)
  qui soit parfait à 100 % et sans erreur.  C'est comme poursuivre un
  mirage, nous ne pourrons JJAAMMAAIISS atteindre l'objectif d'obtenir la
  perfection dans un système ou une théorie.  Les équations/discussions
  mathématiques détaillées pour prouver qu'un "système parfait" (de même
  pour prouver qu'un "système imparfait") est impossible sont des sujets
  avancés et hors sujet dans ce document. Et une telle étude
  mathématique 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 mathématiques peuvent
  facilement en explorer beaucoup d'autres.  Les autres dimensions sont
  ""iinnffiinniimmeenntt pplluuss ppeettiitteess"" que les atomes, et les atomes eux-mêmes 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
  mathématiques constituent un outil très puissant.  Notre univers, si
  vous le regardez à partir d'un autre univers possède pratiquement une
  ttaaiillllee nnuullllee 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 !  Théoriquement, il est possible de sortir de notre univers et
  de voyager sur des distances immenses (milliard d'années lumière) en
  un temps nul et de rentrer en un point différent de l'espace-temps !.
  La distance entre notre univers et les autres univers est en réalité
  nulle !.

  Bien qu'il y ait un nombre infini de dimensions, celles-ci peuvent
  être déduites/générées à 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
  détruites.  Les mathématiciens 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 BBIIGG BBAANNGG, causé par
  les interactions de particules atomiques d'autres dimensions, qui
  s'est produit il y a des milliards d'années (environ 20 milliards
  d'années).  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-même
  n'existait PAS là et les atomes, les étoiles, les planètes et les
  galaxies n'existaient PAS! Les atomes qui sont à l'intérieur de notre
  corps n'existaient PAS !!.  Tellement de choses se sont passées AVANT
  qu le temps n'existe !

  Le big bang et donc la naissance de notre univers résulte de quelques
  atomes de dimensions primaires. QQUUEELLQQUU''UUNN, (quelque chose ?), a causé
  le fracassement de quelques atomes minuscules d'autres dimensions pour
  créer notre univers, et de nouvelles dimensions de temps, de longueur,
  de largeur et de hauteur étaient nées !. Nous voyons l'effet d'une
  quelconque main dans se processus.  Ce processus nn''eesstt ppaass
  ppaarrffaaiitteemmeenntt ccoommpprriiss par les hommes. Ceux-ci essaient de générer un
  autre univers en laboratoire en simulant le big bang (Un accélérateur
  très puissant est en construction en Europe, un autre, en cours de
  construction à Dallas, aux USA, a été arrêté par le congrès US pour
  cause de coupes budgétaires). Il y a des atomes dans d'autres
  dimensions exactement comme nous avons des atomes dans notre univers.
  Théoriquement, on peut créer/générer un nombre infini d'univers !. Ce
  processus est réversible, ce qui veut dire que notre univers peut
  complètement s'effondrer sur lui-même et disparaître en quelques
  atomes d'autres dimensions !. C'est une analogie similaire à la façon
  dont VOUS êtes nés à partir de de deux cellules minuscules qui se sont
  FRACASSÉES l'une contre l'autre pour créer une cellule unique. Cette
  toute petite cellule s'est divisée et multipliée en 6 billions de
  cellules pour devenir cet être humain de 1.80 mètre (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 nôtre sont nés 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 très dynamique.  Cet univers continuera son expansion jusqu'à ce
  que quelque chose interfère pour entraîner son effondrement par
  l'application de pressions ayant des dimensions externes qui
  l'annihileront !!. Il y a deux possibilités  : 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 très peu d'univers
  peuvent être bâtis à partir des dimensions primaires.  Vous n'êtes pas
  constitués 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 entièrement transformés
  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'ENTRÉE/SORTIE pour
  d'autres univers. Ces portes d'entrée/sortie peuvent s'ouvrir
  n'importe où, même à l'intérieur de votre corps !

  Il peut y avoir un nombre infini de couleurs, de langages
  informatiques, d'architectures de circuits d'ordinateurs et de
  théories, mais il NE PEUT PAS y avoir LA PERFECTION pour UN(E) SEUL(E)
  couleur, langage informatique, architecture ou système !  Vous ne
  pouvez obtenir qu'une couleur (longueur d'onde, qu'un système, qu'une
  base de données ou une théorie PRESQUE PARFAITE !  La nature est comme
  un kaléidoscope.

  En combinant les énergies de millions de personnes à travers le monde
  via internet il est possible d'obtenir un système PPRREESSQQUUEE PPAARRFFAAIITT (y
  compris un système logiciel de gestion de base de données). Prise
  individuellement, l'énergie de chacun est microscopique, mais en
  mettant en réseau un très grand nombre de personnes, l'énergie totale
  sera énorme, et elle peut être canalisée pour créer un système presque
  parfait.  Les êtres humains sont des créatures à l'énergie et aux
  ressources finies, portés à faire des erreurs allant de la plus
  triviale à la plus profonde. Puisque notre propension à faire des
  erreurs varie largement en fonction de qualifications particulières,
  d'expérience particulière et des humeurs du moment, la découverte et
  l'élimination des erreurs logicielles dues à des erreur humaines
  ordinaires peut être largement facilitée en concentrant un grand
  nombre d'esprits humains à ce problème.

  Il est très clair qu'internet peut mettre en réseau un grand nombre de
  personnes, ce qui implique qu'internet possède beaucoup d'énergie et
  de temps qui peuvent créer des produits logiciels de bien meilleure
  qualité, en un temps plus court, que des compagnies commerciales. Même
  de grandes compagnies comme Microsoft, IBM ne peuvent pas s'affranchir
  des lois de la physique mais finalement SSEE PPLLIIEERR aux lois de la
  science !

  Aujourd'hui, il y a beaucoup trop de systèmes de base de données
  relationnelles SQL RDBMS dans le monde se référant à une spécification
  ANSI/ISO SQL unique.  LL''hhuummaanniittéé nnee ddooiitt ppaass ppeerrddrree ssoonn tteemmppss àà ccrrééeerr
  ddee ttrroopp nnoommbbrreeuuxx ppaaqquueettaaggeess llooggiicciieellss SSIIMMIILLAAIIRREESS OOUU IIDDEENNTTIIQQUUEESS  alors
  qu'il y a trop d'autres sujets en sciences qui mériteraient
  l'attention.

  En conclusion, à cause des lois de la science, les systèmes à "code
  source ouvert" comme PostgreSQL, Linux seront toujours meilleurs que
  les systèmes à "code source fermé", et il est possible de prouver
  cette affirmation scientifiquement.

  44..  QQuu''eesstt--ccee qquuee PPoossttggrreeSSQQLL ??

  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 matérielles sous différents
  Systèmes d'Exploitation.


               Quelquefois des corrections urgentes d'erreurs sont diffusées après la diffusion
               d'une révision 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
  numéro UN mondial des systèmes de gestion de Base de Données ouverts
  génériques. PostgreSQL guidera, conduira, contrôlera, suivra et
  dictera le futur de l'ANSI/ISO SQL.  C'est-à-dire, l'implémentation et
  les idées apparaîtront en premier dans PostgreSQL puis, plus tard,
  seront incorporés dans l'ANSI/ISO SQL. PostgreSQL représente "l'état
  de l'art" de la technologie des bases de données.

  Le serveur Informix Universal (diffusé en 1997) est basé sur une
  version précédente de PostgreSQL car Informix a acheté Illustra Inc.
  et l'a intégrée à Informix. La base de données Illustra était
  complètement basée sur Postgres (version précédente de PostgreSQL).
  PostgreSQL est une amélioration du SGBD POSTGRES, prototype de
  recherche de SGBD de la prochaine génération. PostgreSQL, tout en
  conservant le puissant modèle de données et la richesse des types de
  données de POSTGRES, remplace le langage de requête PostQuel par un
  sous-ensemble étendu de SQL.

  Le développement de PostgreSQL est réalisé par une équipe de
  développeurs Internet qui sont tous inscrits à la liste de diffusion
  "PostgreSQL développement mailing list".  Son coordinateur actuel est
  Marc G. Fournier

  ·  scrappy@postgreSQL.org

     Cette équipe est maintenant responsable des développements actuels
     et futurs de PostgreSQL. Naturellement, l'utilisateur de la base de
     données est lui-même développeur de PostgreSQL!. La charge de
     développement est répartie au sein d'un grand nombre d'utilisateurs
     finaux de bases de données 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'amélioration du code. Le code original Postgres, duquel
  PostgreSQL est issu, est le résultat de l'effort de nombreux étudiants
  de troisième cycle, de deuxième 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 fonctionnalités 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 installés comme
  serveurs, serveurs Web et serveurs d'application. Ce SGBD est très
  avancé, c'est un SGBD Relationnel-Objet (ORDBMS).

  PostgreSQL peut stocker plus de types de données que les types
  traditionnels entier, caractères, etc. - L'utilisateur peut créer des
  types, des fonctions, de l'héritage 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 réalisation.

  ·  Titre :           PostgreSQL SQL RDBMS Database (Système de Gestion
     de Base de Données Relationnelle Objet)

  ·  Version actuelle : 6.5.2

  ·  Age :           PostgreSQL a 14 ans. En développement depuis 1985

  ·  Auteurs :         Développé par des millions
     d'universités/compagnies sur internet au cours de ces 14 dernières
     ANNÉES

     PostgreSQL et les éléments qui s'y rapportent dans ce document sont
     couverts par le COPYRIGHT de l'Université de Californie, Berkeley.

  55..  OOùù llee ttrroouuvveerr??

  On peut acheter le CDROM Linux Redhat 5.0, le CDROM Linux Debian ou le
  CDROM Linux Slackware qui contiennent déjà 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 systèmes
  d'exploitation Unix, ainsi que la documentation complète.

  ·  CDROM PostgreSQL au site Web principal à :
     <http://www.postgresql.org> 30 (U.S. dollars)

  Distributions uniquement en binaire de PostgreSQL :

  ·  On peut exécuter PostgreSQL sans compiler le source. Récupérer 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 : récupérer 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 indiqués 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>

  66..  PPoossttggrreeSSQQLL àà ggrraannddss ppaass

  Ce chapitre est destiné à vous aider à installer et à faire tourner la
  base de données très rapidement, en moins de 10 minutes.

  66..11..  IInnssttaallllaattiioonn eett tteessttss

  Étapes rapides pour installer, tester, vérifier 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 répertoire  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 effectuée dans un "répertoire
  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 démarrage, 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 créer une base de données de nom  :
                   (pour lire la documentation 'man createdb')
  bash$ psql mydatabase   (pour lire la documentation 'man psql')
  ..... dans psql utilisez les flèches haut/bas ou \s pour visualiser l'historique
  bash$ export DISPLAY=<hostname>:0.0; pgaccess mydatabase; (consulter 'man
  pgaccess')
  ______________________________________________________________________


  Dès 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 complémentaires concernant PostgreSQL,
  consultez  <http://www.postgresql.org>

  66..22..  MMaaxxiimmuumm RRPPMM

  Téléchargez 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
  ______________________________________________________________________



  66..33..  TTeesstt ddee PPyyGGrreeSSQQLL -- IInntteerrffaaccee PPyytthhoonn


  ______________________________________________________________________
  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
  ______________________________________________________________________



  66..44..  TTeesstt ddee PPeerrll -- IInntteerrffaaccee PPeerrll


  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.2/examples/perl5
  ______________________________________________________________________


  Note: La variable globale @INC doit inclure le module Pg.pm dans le
  répertoire 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 accède à la base de
  données PostgreSQL!!

  Prenez connaissance des fichiers d'exemples pour l'utilisation de
  l'interface perl.
  66..55..  TTeesstt ddeess iinntteerrffaacceess lliibbppqq,, lliibbppqq++++


  ______________________________________________________________________
  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 données PostgreSQL!!

  66..66..  TTeesstt ddeess iinntteerrffaacceess JJaavvaa

  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 données PostgreSQL!!

  66..77..  TTeesstt ddeess iinntteerrffaacceess eeccppgg







  ______________________________________________________________________
  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 données
  PostgreSQL" intégré!!

  66..88..  TTeesstt ddeess eexxeemmpplleess SSQQLL -- TTyyppeess aanndd ffoonnccttiioonnss ddééffiinniiss ppaarr ll''uuttiill­­
  iissaatteeuurr


  ______________________________________________________________________
  bash$ cd /usr/doc/postgresql-6.5.2/examples/sql
  Under-development..
  ______________________________________________________________________



  66..99..  TTeesstt ddeess iinntteerrffaacceess TTccll//TTkk

  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
  ______________________________________________________________________



  66..1100..  TTeesstt ddeess iinntteerrffaacceess OODDBBCC

  1. Procurez-vous le pilote win32 pgsql odbc à
  <http://www.insightdist.com/psqlodbc/> 2. Voir également
  /usr/lib/libpsqlodbc.a

  66..1111..  TTeesstt ddeess iinntteerrffaacceess ddee llaa ffeeuuiillllee ddee ttrraavvaaiill MMoottiiff MMPPSSQQLL

  Procurez-vous les RPMs auprès de  <http://www.mutinybaysoftware.com>

  66..1122..  VVéérriiffiiccaattiioonn

  Pour vérifier le parfait fonctionnement de PostgreSQL, faites tourner
  le paquetage de test de Régression :- 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 préparer le paquetage)

  Le test de régression a besoin des Makefiles et de quelques fichiers en-tête
  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 réussie, tous les "makefiles" et tous les fichiers en-tête (headers) ont été créés.
  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
  ______________________________________________________________________




  77..  PPoossttggrreeSSQQLL SSuuppppoorrttee ddeess BBaassee ddee DDoonnnnééeess eexxttrrêêmmeemmeenntt ggrraannddeess >> 220000
  GGiiggaass

  Les performances des machines à cpu 32-bit décroissent rapidement
  quand la taille de la base de données dépasse 5 GigaBytes. Vous pouvez
  faire tourner des bases de données de 30 gigas avec un cpu 32-bit cpu
  mais cela ne sera pas très performant. Les machines à CPU 32 bits
  imposent une limitation de 2 GB de mémoire RAM, de 2 GB pour le
  système de fichier et d'autres limitations dues au système
  d'exploitation.

  Si vous avez besoin d'utiliser des bases de données extrêmement
  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 Données et de grosses requêtes.
  Les performances de PostgreSQL pour des interrogations sur de grandes
  tables et de grandes bases de données 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
  mémoire et que le système d'exploitation peut gérer de très grands
  systèmes de fichiers. Cela permet des meilleures performances avec de
  grandes bases de données, plus de mémoire centrale (RAM), plus de
  possibilités etc...

  88..  PPoossttggrreeSSQQLL eesstt--iill ffiiaabbllee??

  Le paquetage de "Test de Régression" permet de s'assurer de son bon
  fonctionnement.  Il est inclus (src/test/regress) dans la distribution
  et permet à l'ordinateur d'effectuer la vérification des opérations
  SQL standard ainsi que des capacités de PostgreSQL.  Le paquetage de
  test contient déjà 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 très
  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 plutôt
  celle de l'esprit humain.

  Si c'est nécessaire, 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
  Régression permet d'asseoir la confiance des utilisateurs en
  PostgreSQL et facilite le déploiement rapide de PostgreSQL sur des
  systèmes en production sans inquiétude majeure.

  Le paquetage "Test de Régression" peut être considéré comme un
  document technique ""TTRRÈÈSS SSOOLLIIDDEE"" reconnu mutuellement par les
  développeurs et par les utilisateurs finaux.  Les développeurs de
  PostgreSQL utilisent de façon intensive ce paquetage durant la période
  de développement et également avant de mettre le logiciel à la
  disposition des utilisateurs pour en assurer la parfaite qualité.

  99..  OOuuttiill GGUUII ffrroonnttaall ppoouurr PPoossttggrreeSSQQLL ((IInntteerrffaaccee UUttiilliissaatteeuurr
  GGrraapphhiiqquuee))

  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 côté 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 préférence 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++ Omniprésent avec QtEZ, QT, Lesstiff ou Motif.

  4. Java mais les programmes obtenus sont très lents.

  D'autres outils sont disponibles  : PostgreSQL possède une
  bibliothèque d'interface Tcl/Tk dans la distribution nommée 'pgTcl'.
  Il existe un Environnement de Développement Intégré (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 orientée objet de Tcl appelée 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.

  1100..  PPiillootteess dd''iinntteerrffaaccee ppoouurr PPoossttggrreeSSQQLL


  1100..11..  OODDBBCC PPiillootteess ppoouurr PPoossttggrreeSSQQLL

  ODBC signifie 'Open DataBase Connectivity'. C'est une norme répandue
  pour accéder aux informations des bases de données de différents
  vendeurs. Le fonctionnement des applications écrites en utilisant les
  pilotes ODBC est garanti quelle que soient les bases de données
  utilisées PostgreSQL, Oracle, Sybase, Informix etc..


  ·  PostODBC <http://www.insightdist.com/psqlodbc> est déjà 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 données.
     Open Link dispose aussi d'ODBC gratuits (quantité limitée) vérifier
     auprès 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.

  1100..22..  PPiillootteess UUDDBBCC ppoouurr PPoossttggrreeSSQQLL

  UDBC est une version statique de pilote de gestionnaire et de DLL
  d'ODBC indépendant, pour intégrer le support de la connectivité base
  de données 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é limitée) vérifier auprès d'eux.

  1100..33..  PPiillootteess JJDDBBCC ppoouurr PPoossttggrreeSSQQLL

  JDBC signifie 'Java DataBase Connectivity'. Java est un langage de
  développement indépendant de la plate-forme d'utilisation développé
  par Sun Microsystems. Les programmeurs Java sont encouragés à écrire
  leurs applications en utilisant JDBC pour faciliter la portabilité
  entre différentes 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é limitée) vérifier auprès 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 situés à -

  ·  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>

  1100..44..  JJaavvaa ppoouurr PPoossttggrreeSSQQLL

  Ces classes pour PostgreSQL seront très utiles au programmeur JAVA.

  ·  <ftp://ftp.redhat.com/pub/contrib/i386> et regardez postgresql-
     jdbc-*.rpm

  ·  <http://www.blackdown.org>

  1111..  PPiilloottee dd''iinntteerrffaaccee ddee SSGGBBDD PPeerrll ((DDaattaabbaassee IInntteerrffaaccee  DDBBII)) ppoouurr
  PPoossttggrreeSSQQLL


  1111..11..  iinntteerrffaaccee PPeerrll 55 ppoouurr PPoossttggrreeSSQQLL

  PERL est l'acronyme de 'Practical Extraction and Report Language'.
  Perl est disponible pour tous les systèmes d'exploitation et toutes
  les plates-formes matérielles au monde. Vous pouvez utiliser Perl sous
  Windows95/NT, Apple Macintosh iMac, toutes les variétés 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 MMÊÊMMEE sur de nombreux matériels et systèmes d'exploitations
  peu courants/généralement inconnus!!  Aussi, ne soyez pas surpris si
  vous voyez perl tourner sur un système d'exploitation très rarement
  utilisé.

  Cette interface est incluse dans la distribution de PostgreSQL. On la
  trouve dans le répertoire 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 Données 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.*




  1111..22..  DDBBII IInntteerrffaaccee ddee BBaassee ddee DDoonnnnééeess PPeerrll

  1111..22..11..  QQuu''eesstt--ccee qquuee DDBBII ??

  L'interface de SGBD Perl (Perl Database Interface - DBI) est une
  interface logicielle d'accès à un SGBD (Application Programming
  Interface - API) pour le langage PERL. Les spécifications de l'API DBI
  perl définissent un ensemble de fonctions, de variables et de
  conventions d'accès à un SGBD cohérent et indépendant 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

  1111..22..22..  PPiilloottee DDBBII ppoouurr PPoossttggrreeSSQQLL DDBBDD--PPgg--00..8899

  Vous pouvez obtenir DBD-Pg-0.89.tar.gz de l'un des sites indiqués 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 Données 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)

  1111..22..33..  SSuuppppoorrtt tteecchhnniiqquuee ssuurr DDBBII

  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.


  1111..22..44..  QQuu''eesstt--ccee qquuee cc''eesstt qquuee DDBBII,, DDBBppeerrll,, OOrraappeerrll aanndd **ppeerrll??

  Pour citer Tim Bunce, l'architecte et l'auteur de DBI :

  ``DBI est une interface logicielle d'accès aux bases de données
  (Application Programming Interface  -API) pour le langage Perl. Les
  spécifications DBI API définissent un ensemble de fonctions, de
  variables et de conventions cohérents d'interfaçage à une base de
  données indépendant de la base de données utilisée.''

  En langage simple, l'interface DBI permet aux utilisateurs d'accéder
  de manière transparente à de multiples base de données. Ainsi, Si vous
  vous connectez à une base de données Oracle, Informix, mSQL, Sybase ou
  n'importe quelle autre, vous n'avez pas besoin de connaître les
  mécanismes sous-jacents de la couche 3GL. L'API définie par DBI
  fonctionnera sur tous ces types de bases de données.

  On obtient un bénéfice du même ordre en ayant la possibilité de se
  connecter à deux bases de données de différents fournisseurs à l'aide
  du même script perl, i.e., je veux lire des données d'une base de
  données Oracle et les insérer dans une Informix à partir du même
  programme. La couche logicielle DBI permet de le réaliser simplement
  et efficacement.

  DBperl est le nom ancien des spécifications de l'interface. Il est
  utilisé maintenant pour désigner les modules perl4 d'interfaçage des
  bases de données tels que oraperl, isqlperl, ingperl et autres. Ces
  interfaces n'ont pas d'API standard et ne sont généralement pas
  supportés.

  Voici une liste des modules DBperl, de leur équivalent DBI
  correspondants et du support d'information. Notez que les auteurs
  cités ici ne maintiennent généralement pas le module DBI de la base de
  données. Les adresses E-mail n'ont pas été vérifiées et ne doivent
  être utilisées que pour les questions concernant les modules perl4
  listés ci-dessous. Les questions sur les pilotes DBI doivent être
  directement adressées 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 possèdent des couches logicielles
  d'émulation. Ainsi DBD::Oracle est livré avec une couche d'émulation
  Oraperl, ce qui permet d'exécuter d'anciens scripts oraperl sans modi­
  fication. La couche logicielle d'émulation traduit les appels oraperl
  API en appels DBI et les exécute.

  Voici une table des  couches d'émulation :


           Module        Couche d'émulation     État
           ------          ---------------     ------
           DBD::Oracle     Oraperl             Complète
           DBD::Informix   Isqlperl            En cours de  développement
           DBD::Sybase     Sybperl             Fonctionnelle? ( Nécessite une
                                               vérification)
           DBD::mSQL       Msqlperl            En version expérimentale avec
                                               DBD::mSQL-0.61




  L'émulation Msqlperl est un cas particulier. Msqlperl est un pilote
  perl5 pour les bases de données mSQL , mais il ne se conforme pas aux
  spécifications DBI. On désapprouve son utilisation en faveur de
  DBD::mSQL. On peut télé-charger Msqlperl à partir du site CPAN via :

  ·  <http://www.perl.com/cgi-bin/cpan_mod?module=Msqlperl>

  1111..22..55..  SSppéécciiffiiccaattiioonnss DDBBII


  Il existe quelques sources d'information sur  DBI.  Spécifications DBI

  ·  <http://www.hermetica.com/technologia/perl/DBI/doc/dbispec>

     On trouve deux spécifications disponibles à cette adresse: la
     nouvelle spécification Draft (édition provisoire) DBI qui est un
     document en évolution rapide à mesure que l'équipe de développement
     s'approche d'une version stable de l'interface, et l'ancienne
     spécification historique DBperl à partir de laquelle l'interface
     DBI actuelle a évolué.

  Il faut considérer ce dernier document comme ne présentant qu'un
  intérêt historique et ne pas l'utiliser en tant que manuel de
  programmation ou document de référence. Il demeure cependant une
  source d'informations très utile.

  Documentation POD (Plain Old Documentation) Les PODs sont des morceaux
  de documentation généralement noyés à l'intérieur des programmes perl
  qui documentent le code "sur place".  Ce sont des ressources très
  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 Spécification DBI Les PODs pour la spécification 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 manière 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
  entièrement listée et décrite.

  DBD::mSQL Les utilisateurs du module DBD::mSQL peuvent lire des
  informations sur quelques fonctions privées 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 système en tapant :

  perldoc DBI::FAQ

  Ceci peut être plus pratique pour ceux qui ne sont pas connectés à
  l'Internet ou le sont d'une manière peu pratique.

  Les POD en général On peut lire des informations sur la manière
  d'écrire des PODs, ainsi que sur la philosophie des PODs en général en
  tapant :

  perldoc perlpod

  Les utilisateurs ayant le module Tk installé seront peut-être
  intéressés d'apprendre qu'il existe un lecteur de POD basé sur Tk
  nommé tkpod. Il formate les POD de manière pratique et lisible.

  Discussions, Cancans et Observations

  ·  <http://www.hermetica.com/technologia/perl/DBI/tidbits>

  Il y a , de temps en temps, une série 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 numéro 5 de ``The Perl Journal''.  Il est extrêmement
  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 référence est celle d'un livre
  à écrire par Alligator Descartes publié par O'Reilly et Associés.

  Listes de diffusion Il y a trois listes de diffusion pour DBI gérées
  par Ted Lemon.  On peut s'inscrire à toutes et résilier cette
  inscription à travers le World Wide Web à :

  ·  Listes de diffusion  <http://www.fugue.com/dbi>

  Les listes où les utilisateurs peuvent participer sont:

  ddbbii--aannnnoouunnccee Cette liste de diffusion est réservée uniquement aux
  annonces.  Si vous n'arrivez pas à utiliser le formulaire sur la page
  WWW indiquée ci-dessus, inscrivez-vous à cette liste de la manière
  suivante :

  ·  Email: dbi-announce-request@fugue.com

     avec le mot 'subscribe' dans le corps du message.

  ddbbii--ddeevv Cette liste de diffusion est à l'usage des développeurs pour
  discuter des idées et des concepts de l'interface DBI, API et des
  mécanismes des pilotes. Seulement utiles pour les développeurs et les
  personnes intéressées. Trafic faible.  Si vous n'arrivez pas à
  utiliser le formulaire sur la page WWW indiquée ci-dessus, inscrivez-
  vous à cette liste de la manière suivante :

  ·  Email: dbi-dev-request@fugue.com

     avec 'subscribe' dans le corps du message.

  ddbbii--uusseerrss Cette liste de diffusion est un lieu de discussion générale
  utilisée pour les rapports d'erreurs, la discussion sur différents
  problèmes et des demandes de renseignement d'intérêt général. Si vous
  n'arrivez pas à utiliser le formulaire sur la page WWW indiquée ci-
  dessus, inscrivez-vous à cette liste de la manière 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 Européennes  <http://www.rosat.mpe-
     garching.mpg.de/mailing-lists/PerlDB-Interest>

  1111..22..66..  PPrroobbllèèmmeess ddee ccoommppiillaattiioonn oouu ""IIll éécchhoouuee aauuxx tteessttss""

  Si vous avez un vidage mémoire, essayez le module Devel::CoreStack
  pour générer une trace de la pile du vidage mémoire. 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 système d'exploitation et toutes
  autres informations pertinentes.  Plus vous fournirez d'informations
  plus vite les développeurs pourront résoudre les problèmes. Si vous ne
  nous envoyez rien, n'attendez rien en retour.

  1111..22..77..  DDBBII eesstt--iill ssuuppppoorrttéé ssuurr lleess ppllaatteess--ffoorrmmeess WWiinnddoowwss 9955 // NNTT ??

  Les portages de DBI et de DBD::Oracle pour Win32 ports font maintenant
  partie intégrante de DBI, donc, la récupération d'une version de DBI
  supérieure à 0.81 doit donner satisfaction.  Vous pouvez accéder aux
  bases de données Microsoft Access et SQL-Server à partir de DBI via
  ODBC.  Une "couche d'émulation" DBI expérimentale 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>

  1111..22..88..  QQuu''eesstt--ccee qquuee DDBBMM?? EEtt ppoouurrqquuooii ddooiiss--jjee uuttiilliisseerr DDBBII àà ssaa
  ppllaaccee??

  A l'origine UNIX était bienheureux avec sa "Base de Données" rustique
  reposant sur des fichiers, nommée système dbm. Avec dbm vous
  enregistrez les données dans des fichiers et les retrouvez rapidement.
  Cependant, il souffre de sérieux inconvénients.

  Verrouillage des fichiers

  Les systèmes dbm ne permettent par un verrouillage particulièrement
  robuste des fichiers, de même qu'il n'y a pas de possibilité de
  corriger les problèmes survenants lors d'écritures [ dans la base de
  données ] simultanées.

  Structures de Données Arbitraires

  Les systèmes dbm permettent seulement une simple structure de données
  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 systèmes dbm.

  Cependant, les systèmes dbm continuent d'offrir des fonctions utiles
  pour les utilisateurs ayant des ensembles de données simples et des
  ressources limitées, puisqu'ils sont rapides, robustes et extrêmement
  bien testés. Les modules Perl pour accéder aux systèmes dbm font
  maintenant partie intégrante de la distribution Perl via le module
  AnyDBM_File.''

  Pour résumer, DBM est une solution parfaitement satisfaisante pour les
  bases de données essentiellement en lecture seule, ou pour des
  ensembles de données simples et réduits. Toutefois, pour des ensembles
  de données plus importants, sans mentionner un verrouillage des
  transactions robuste, on recommandera aux utilisateurs de préférer
  DBI.

  1111..22..99..  EEsstt--ccee qquuee << iinnsséérreezz uunnee ffoonnccttiioonnnnaalliittéé iiccii >> eesstt ssuuppppoorrttéé
  ppaarr DDBBII??

  Si l'on suppose que la fonctionnalité en question n'est pas, en
  standard, spécifique d'un SGBD, alors la réponse sera non.

  DBI représente un API qui doit fonctionner avec la plupart des SGBD,
  et n'a pas de fonctionnalité spécifique à un SGDB particulier.

  Cependant, les auteurs d'un pilote peuvent, s'ils le désirent, ajouter
  une fonctionnalité spécifique à un SGBD à travers les méthodes func
  définies dans l'API DBI. Les développeurs de Scripts doivent noter que
  l'utilisation de cette fonctionnalité au travers de ces méthodes func
  a de bonnes chances d'en sacrifier la portabilité entre les différents
  SGBD.

  1111..22..1100..  EEsstt--ccee qquuee DDBBII eesstt dd''uunnee qquueellccoonnqquuee uuttiilliittéé ppoouurr llaa pprrooggrraamm­­
  mmaattiioonn CCGGII??

  En un mot, oui! DBI est extrêmement utile pour la programmation CGI!
  En fait, la programmation CGI est une des deux principales utilisation
  de DBI.

  DBI confère aux programmeurs CGI la possibilité d'offrir des base de
  données WWW à leurs utilisateurs, ce qui donne à ces utilisateurs la
  possibilité d'utiliser de grandes quantités de données bien
  organisées. DBI donne aussi la possibilité , si un site reçoit un
  trafic trop important pour les performances du serveur, d'améliorer ce
  serveur de base de données de façon transparente, sans modifier les
  scripts CGI.

  1111..22..1111..  CCoommmmeenntt ppuuiiss--jjee oobbtteenniirr uunn tteemmppss ddee ccoonnnneexxiioonn pplluuss rraappiiddee
  aavveecc DDBBDD::::OOrraaccllee eett CCGGII CCGGII??

  Le serveur httpd Apache maintient un ensemble de processus fils httpd
  pour servir les requêtes clients.

  En utilisant le module mod_perl Apache de Doug MacEachern,
  l'interpréteur perl est inclus dans le processus fils httpd. Les
  modules CGI, DBI, et vos autres modules favoris peuvent être chargés
  au lancement de chaque processus fils. Ces modules ne seront pas
  rechargés à moins d'être modifiés 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>

  1111..22..1122..  CCoommmmeenntt ppuuiiss--jjee oobbtteenniirr uunnee ccoonnnneexxiioonn ppeerrssiissttaannttee aavveecc DDBBII
  eett CCGGII??

  En utilisant le module Apache::DBI de Edmund Mergl, les connexions à
  la base de données sont enregistrées dans une table avec chacun des
  processus httpd fils. Si votre application utilise une base de données
  simple utilisateur, cette connexion peut être lancée avec chaque
  processus fils. Actuellement, les connexions à la base de données ne
  peuvent pas être partagées entre processus httpd fils.  Apache::DBI
  peut être télé-chargé de CPAN via :

  ·  <http://www.perl.com/cgi-bin/cpan_mod?module=Apache::DBI>

  1111..22..1133..  ""QQuuaanndd jjee llaannccee uunn ssccrriipptt ppeerrll ddee llaa lliiggnnee ddee ccoommmmaannddee,, ççaa
  mmaarrcchhee,, mmaaiiss,, qquuaanndd jjee llee llaannccee ssoouuss hhttttppdd,, ççaa éécchhoouuee!!"" PPoouurrqquuooii??


  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'exécute
  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'exécuter dans ces circonstances
  échoueront.  Pour résoudre ce problème, initialisez l'environnement de
  votre base de données dans un bloc BEGIN ( ) en tête de votre script.
  Ceci devrait résoudre votre problème.  De même, 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 complémentaires. Il
  est peu probable que ce problème concerne DBI.  Lisez ces DEUX
  documents très soigneusement !

  ·  Idiot's Guide to Solving Perl / CGI problems
     <http://www.perl.com/perl/faq/index.html>

  1111..22..1144..  PPuuiiss--jjee ffaaiirree ddee ll''eexxééccuuttiioonn eenn ppaarraallllèèllee aavveecc DDBBII??

  A la date de ce document, non. perl ne permet pas l'exécution en
  parallèle. Cependant, l'exécution en parallèle doit faire partie de la
  distribution perl de base à compter de la version 5.005, ce qui sous-
  entend que le support de l'exécution en parallèle pour DBI devrait
  suivre rapidement.  Pour quelques exemples de code OCI pour Oracle
  ayant des instructions SELECT avec exécution en parallèle, voir :

  ·  <http://www.hermetica.com/technologia/oracle/oci/orathreads.tar.gz>


  1111..22..1155..  CCoommmmeenntt ppuuiiss--jjee iinnvvooqquueerr ddeess pprrooccéédduurreess eennrreeggiissttrrééeess aavveecc
  DDBBII??

  En supposant que vous avez créé une procédure enregistrée à
  l'intérieur de la base de données cible, e.g., une base de données
  Oracle, vous pouvez utiliser $ dbh-> do pour exécuter immédiatement
  cette procédure. Par exemple,


  $ dbh-> do( "BEGIN someProcedure END" );

  1111..22..1166..  CCoommmmeenntt ppuuiiss--jjee rrééccuuppéérreerr lleess vvaalleeuurrss ddee rreettoouurr ddee
  pprrooccéédduurreess eennrreeggiissttrrééeess aavveecc DDBBII??

  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;




  1111..22..1177..  CCoommmmeenntt ppuuiiss--jjee ccrrééeerr oouu ssuupppprriimmeerr uunnee bbaassee ddee ddoonnnnééeess aavveecc
  DDBBII??

  La création et la suppression de bases de données sont des concepts
  qui sont beaucoup trop abstraits pour être supportés par DBI. Par
  exemple, Oracle ne supporte pas le concept de détruire une base de
  données du tout ! Ainsi, dans Oracle, le serveur de base de données
  est essentiellement la base de données elle-même alors que dans mSQL,
  le processus serveur s'exécute tranquillement sans aucune base de
  données créée. C'est un problème trop hétérogène pour s'y attaquer.
  Quelques pilotes, cependant, supportent la création et la suppression
  de bases de données à travers des méthodes func privées. Il vous faut
  regarder dans la documentation des pilotes que vous utilisez pour
  vérifier s'ils supportent de tels mécanismes.

  1111..22..1188..  CCoommmmeenntt lleess vvaalleeuurrss NNUULLLL ssoonntt--eelllleess pprriisseess eenn ccoommppttee ppaarr
  DDBBII??

  Les valeurs NULL dans DBI sont traitées comme la valeur undef. Des
  NULLs peuvent être insérés dans les bases de données en tant que NULL,
  par exemple :


           $rv =
               $dbh->do( "INSERT INTO table VALUES( NULL )" );




  mais lors d'une interrogation, les NULLs devront être testés comme des
  undef.  C'est une norme pour tous les pilotes.

  1111..22..1199..  QQuu''eesstt--ccee qquuee cc''eesstt qquuee cceess hhiissttooiirreess ddee mméétthhooddeess ffuunncc??

  Une méthode func est définie à l'intérieur de DBI comme étant un point
  d'entrée pour une fonctionnalité d'une base de données spécifique, eg,
  la possibilité de créer ou supprimer des bases de données.
  L'invocation de ces méthodes spécifiques aux pilotes est simple. Par
  exemple, pour invoquer une méthode createDatabase qui n'a qu'un seul
  argument, on écrira :


           $rv = $dbh->func( 'argument', 'createDatabase' );




  Les développeurs de logiciels doivent cependant noter que ces méthodes
  func ne sont pas portables entre SGBD.
  1111..22..2200..  AAssssiissttaannccee eett ffoorrmmaattiioonn ppaayyaannttee

  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.

  PPEERRLL CCLLIINNIICC :: La société "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>

  1122..  OOuuttiillss ddee GGeessttiioonn PPoossttggrreeSSQQLL


  1122..11..  PPGGAACCCCEESSSS -- UUnn GGUUII ppoouurr llaa ggeessttiioonn ddee PPoossttggrreeSSQQLL

  PgAccess est une interface Tcl/Tk à PostgreSQL.  Il est déjà inclus
  dans la distribution de PostgreSQL.  Pour une copie plus récente, vous
  pouvez accéder au site web :

  ·  <http://www.flex.ro/pgaccess>

  ·  Si vous avez des commentaires, des suggestions pour des
     améliorations, n'hésitez pas à envoyer un courrier électronique à :
     teo@flex.ro

  Fonctionnalités de PgAccess

  Fenêtres de PgAccess : Fenêtre principale, créateur de tables, vue de
  table (interrogation), créateur visuel d'interrogation .

  Tables


  ·  - Ouverture de tables pour la visualisation, 200 enregistrements
     maximum ( modifiable dans le menu des préférences )

  ·  - re-dimensionnement d'une colonne en tirant la ligne verticale de
     la grille ( plus pratique à réaliser à l'intérieur même de la table
     que dans l'en-tête)

  ·  - texte encadré dans les cellules - disposition enregistrée pour
     chacune des tables)

  ·  - importation/exportation vers des fichiers externes (SDF,CSV)

  ·  - possibilité de filtres (filtre de saisie, tel que (prix>3.14)

  ·  - possibilités de tri (saisie manuelle de(s) champ(s) à trier)

  ·  - édition en ligne

  ·  - assistant générateur de table amélioré

  ·  - édition de champ améliorée

  Requêtes

  ·  - définition, édition et enregistrement de "requêtes définies par
     l'utilisateur"


  ·  - enregistrement de requêtes en tant que vues

  ·  - exécution des requêtes

  ·  - visualisation des résultats de requêtes de type select

  ·  - suppression et changement de nom de requête

  ·  - créateur visuel de requêtes avec possibilités de
     "glisser/déposer".  Pour tous ceux d'entre vous qui ont l'extension
     pour Netscape Navigator de Tcl/Tk installée, vous pouvez le voir au
     travail en cliquant ici

  Séquences

  ·  - définition de séquences, ainsi que leurs suppression et
     inspection Fonctions

  ·  - définition, inspection et suppression de fonctions en langage SQL

  Les futures implémentations disposeront

  ·  - de la conception des tables (ajout de nouveaux champs, changement
     de nom, etc.)

  ·  - de la définition de fonction

  ·  - d'un générateur de rapport

  ·  - d'un langage de script de base


  Si vous avez des commentaires, ou des suggestions d'amélioration,
  envoyez un courrier électronique à :

  ·  teo@flex.ro

  Informations concernant libgtcl

  Vous aurez également besoin de la bibliothèque d'interface de
  PostgreSQL à Tcl, disponible comme module Tcl/Tk chargeable. Son nom
  est libpgtcl et le source est situé dans le répertoire PostgreSQL
  /src/interfaces/libpgtcl.  Précisément, vous aurez besoin d'une
  bibliothèque libpgtcl qui soit "chargeable" à partir de Tcl/Tk.  Ce
  qui est techniquement différent d'un fichier objet chargeable
  PostgreSQL ordinaire, car libpgtcl est constituée d'un ensemble de
  fichiers objets. Sous Linux, on l'appelle libpgtcl.so. Vous pouvez
  télé-charger à partir d'ici une version déjà compilée pour les
  systèmes Linux i386. La seule chose à faire est de copier libpgtcl.so
  dans le répertoire bibliothèque système (/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 bibliothèque
  libpgtcl.

  1122..22..  OOuuttiill WWiinnddoowwss iinntteerraaccttiiff ddee ggéénnéérraattiioonn ddee rreeqquuêêttee ppoouurr PPoosstt­­
  ggrreeSSQQLL

  ("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 requête SQL de
  Microsoft WISQL! Il dispose d'un GUI agréable et d'un historique des
  commandes. Vous pouvez utiliser le coupé/collé ainsi que d'autres
  fonctionnalités sympathiques pour accroître 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

  1122..33..  OOuuttiill iinntteerraaccttiiff ddee ggéénnéérraattiioonn ddee rreeqquuêêttee ppoouurr PPoossttggrreeSSQQLL --
  IISSQQLL

  ISQL est destiné aux terminaux fonctionnants en mode ligne de
  commande.  C'est inclus dans la distribution et nommé PSQL. Il est
  très similaire à  Sybase ISQL, et à Oracle SQLplus. A l'invite unix
  tapez la commande 'psql' qui en retour vous affichera le caractère
  d'attente de commande: psql> .


       Tapez /h pour obtenir de l'aide sur les commandes utilisables.




  C'est très convivial et d'utilisation facile.  C'est aussi très utile
  pour écrire des scripts pour les interpréteurs de commandes.

  1122..44..  MMPPMMGGRR -- UUnn oouuttiill ddee ggeessttiioonn ddee BBaassee ddee DDoonnnnééeess ppoouurr PPoossttggrreessSSQQLL

  MPMGR fournira un outil graphique de gestion de Base de Données 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

  1133..  MMiissee eenn ppllaaccee ddee pplluussiieeuurrss mmaacchhiinneess PPoossttggrreeSSQQLL aavveecc uunn sseeuull mmoonnii­­
  tteeuurr

  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 particulière. 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 (développement, test, production), serveurs Web, serveurs
  ftp, serveurs Intranet, serveur de Courrier, serveurs de Nouvelles,
  sur une étagère.  Le boîtier commutateur peut être également utilisé
  pour contrôler 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 matériels informatique <http://www.warehouse.com> Un
     commutateur manuel 4-ports KVM (PS/2) vaut environ $89.99.
     Référence 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 vidéo

  ·  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 matériels
     d'ordinateur  <http://www.warehouse.com>

  ·  Better Box Communications Ltd.
     <http://www.betterbox.com/info.html>

  ·  Allez chez votre marchand de matériel 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 particulièrement économique). Les vendeurs locaux vendent
  uniquement du matériel SSAANNSS 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 données 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 matériel que vous achetez est supporté par le
     Linux Redhat. Vérifiez sur le site ftp de Redhat le matériel
     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 contrôler de nombreux systèmes à
  l'aide de seulement un clavier et un moniteur!

  On trouvera ci-dessous un eexxttrraaiitt dduu ccaattaalloogguuee ddee nneettwwoorrkktteecchhnniicc IInncc

  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 présence constante du clavier, de l'écran et du mulot pour chacun
  des PC's connectés.

  Fonctionnalités et Applications


  ·  Clavier, face avant ou commande à distance

  ·  utilisation de connecteurs de mulots 9 broches D Série ou 6 broches
     miniDIN

  ·  utilisation de connecteurs de clavier 5 broches DIN ou 6 broches
     miniDIN

  ·  résolution vidéo 1600x1200 sans dégradation

  ·  Utilisation de câbles standards

  ·  Boîtier pour bureau ou pour montage en rack

  Spécifications - Clavier


  ·  Tous les connecteurs dont femelles

  ·  5 broches DIN ou 6 broches miniDIN

  ·  Permettent un Re-démarrage (boot) matériel ou logiciel de tous les
     PC's à chaque instant

  Contrôles - 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 entraîne le
     fonctionnement dans les modes SCAN, BROADCAST ou COMMAND

  ·  Les LEDs en face avant indiquent le mode d'opération du clavier

  ·  L'appui sur CTRL+* entraîne le fonctionnement en mode COMMAND

  ·  Les modes SCAN, BROADCAST ou COMMAND sont disponibles

  Mulot

  * 9 broches D série

  ·  o Le commutateur NTI émule le mulot Microsoft série pour tous les
     PC's


  ·  o 9 broches D mâle 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 câble, à distance

  ·  Optionnel--doit être acquis séparément

  ·  Fonctionnement identique à celui "Boutons en face avant"

  Moniteur (écran) - VGA

  ·  Bande passante 150 MHz

  ·  Résolution 1600X1200 sans dégradation

  ·  Tous les connecteurs sont des connecteurs femelles

  1144..  OOuuttiillss eett AApppplliiccaattiioonnss ppoouurr PPoossttggrreeSSQQLL

  1144..11..  LLee ssyyssttèèmmee ddee ddéévveellooppppeemmeenntt AAppppGGEENN PPoossttggrreeSSQQLL 44GGLL ppoouurr lleess
  aapppplliiccaattiioonnss ddee bbaasseess ddee ddoonnnnééeess wweebb --

  AppGEN peut être télé-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 quatrième génération
     ainsi qu'un générateur d'application pour produire des applications
     destinées au World Wide Web (WWW). Ces applications sont
     typiquement utilisées à travers l'internet ou dans le cadre d'un
     réseau intranet d'entreprise. Les applications AppGEN sont
     implantées 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, système de gestion de base de données relationnel

  Un serveur web compatible CGI tel que HTTPD du NCSA

  D'un compilateur ANSI C tel que GCC

  AppGEN est constitué des exécutables Unix (Linux) suivants :-


  ·  defgen, qui produit une application cadre, de base, à partir de la
     structure logique des données. Ces applications sont capables
     d'ajouter, de mettre à jour, de supprimer et de rechercher les
     enregistrements d'une base de données tout en conservant
     automatiquement l'intégrité référentielle de cette base.


  ·  appgen, le compilateur AppGEN qui compile le code source appgen en
     code source C CGI exécutable et en documents formatés HTML prêts
     pour leur déploiement sur un serveur web.


  ·  dbf2sql, un utilitaire de conversion de fichiers .dbf compatibles
     dBase III en scripts SQL exécutables. Ce qui permet de migrer les
     données stockées dans la plupart des bases de données 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 utilisés, à l'exécution,
     par le système. 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

  1144..22..  WWWWWW WWeebb iinntteerrffaaccee ppoouurr PPoossttggrreessSSQQLL -- DDBBEENNGGIINNEE

  dbengine est une interface Web "plug 'n play" pour Postgres95 créée
  par Ingo Ciechowski. Il est à :

  ·  <http://www.cis-computer.com/dbengine/ >

     AA pprrooppooss ddee DDBBEENNGGIINNEE :: dbengine est une interface entre le WWW et
     Postgres95 qui permet un accès simple à n'importe quelle base de
     données 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 nécessite la création d'un
  fichier de configuration pour chacune de vos bases de données -- c'est
  un peu comme si vous deviez apprendre un nouveau méta-langage avant de
  pouvoir commencer à travailler.

  A la différence 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 à créer de
  fichier de configuration pour chaque base de données, et vous n'avez
  donc pas besoin de vous familiariser avec sa structure.  Cependant -
  au cas où vous voudriez profiter de toutes les possibilités de
  dbengine, ce serait une bonne idée de connaître le langage Perl.

  Le système tout entier peut être configuré à l'aide de simples
  manipulations d'une base de données complémentaire qui contient les
  informations de détail sur la manière de visualiser vos accès à la
  base de données. Vous pouvez même spécifier des Champs Virtuels qui
  sont calculés en temps réel avant d'être affichés à l'écran.

  LLiicceennccee ::

  dbengine est un logiciel libre selon les mêmes conditions que Perl.
  Lisez sa licence si vous n'êtes pas sûr de ce que vous pouvez ou ne
  pouvez pas faire.  La dernière ligne indique que c'est une version
  plus gentille et plus modérée 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!


  1155..  MMoodduullee AAppaacchhee WWeebbsseerrvveerr ppoouurr PPoossttggrreeSSQQLL -- NNeeooSSoofftt NNeeooWWeebbSSccrriipptt

  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 compliqués dans des fichiers HTML.

  Quand une page HTML contenant un script NeoWebScript est appelée, le
  serveur Web ayant le NeoWebScript activé, exécute le(s) script(s)
  inclus, produisant une page Web dont le contenu, personnalisé, a été
  créé par le programme.

  NeoWebScript est un moyen rapide, sûre, facile à apprendre de créer
  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 aisés, même pour un programmeur débutant. Regardez
  comment NeoWebScript se défend 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 "Théorie de fonctionnement" explique comment NeoWebScript
  fonctionne, celui d'Installation est un guide pas à pas des opérations
  à effectuer. Le guide de Gestion traite de la manière de configurer et
  de faire fonctionner le serveur, celui de Tests permet de vérifier le
  fonctionnement correct de NeoWebScript, enfin, celui de Maintenance
  traite des problèmes 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 complète quand vous vous enregistrerez pour
  télé-charger le logiciel, mais il en coûte $ 99 si vous désirez
  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 rédacteurs
  techniques.

  Le serveur Apache est le serveur web le plus populaire au monde,
  totalisant 68 % des sites interrogés.

  Tcl/Tk est un langage de script puissant, libre et multi-plateformes
  développé par le Dr. John Ousterhout. Selon ses propres termes :

  "Tcl/Tk permet aux développeurs de logiciels de réaliser un travail
  dix fois plus rapidement qu'avec des outils basés sur C ou C++. C'est
  aussi un grand langage de synthèse permettant de faire travailler
  ensemble des applications existantes en les rendant plus graphiques et
  orientées Internet."

  Karl Lehenbauer, Fondateur et Directeur Technique de NeoSoft, a
  participé au développement de Tcl/Tk dès le tout début. 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

  1155..11..  HHEEIITTMMLL,, eexxtteennssiioonn,, ccôôttéé sseerrvveeuurr ddee HHTTMMLL eett llaannggaaggee 44GGLL ppoouurr
  PPoossttggrreeSSQQLL

  Heitml est un autre outil d'interfaçage de postgres avec le monde du
  world wide web.  Pour plus de détails 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, côté serveur, de HTML et un
  langage de la quatrième génération (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 quatrième génération complet permettant aux Applications utilisant
  le web d'interagir avec des données stockées dans des bases de données
  SQL, sans mériter l'écriture de scripts CGI complexes.

  heitml étend HTML côté serveur, convertissant de manière dynamique les
  fichiers ".hei" au format HTML et ainsi, les rendant compatibles avec
  n'importe quel butineur web. Il englobe la syntaxe simple et familière
  de HTML et apporte un large assortiment de Balises et de Bibliothèques
  pré-développées pour prendre en charge les tâches qui auparavant
  nécessitaient CGI. De même que XML, heitml permet l'utilisation de
  balises définies par l'utilisateur. Avec heitml les marqueurs définis
  par l'utilisateur peuvent être traduits en HTML et envoyés à 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 accès aux bases de
  données SQL ou créer des applications web complètes. On peut créer des
  Compteurs, des bases de données d'inscriptions, des formulaires de
  recherche, des formulaires de courrier électronique ou des menus
  hiérarchisés en utilisant simplement des Balises de style HTML
  pré-développées que l'on trouve dans les nombreuses Bibliothèques de
  Composants.

  Pour les programmeurs, heitml inclut un langage de quatrième
  génération complet en HTML


                 (e.g. <if>, <while>, et <let> Balises),




  plus un évaluateur d'expression puissant pour les types de données
  entiers, réels, booléens chaîne de caractères et tuple. Les tuples ont
  une référence sémantique comme dans les langages orientés objets mod­
  ernes et sont stockés sur un tas. Les variables heitml y compris
  toutes les structures de données complexes stockées sur le tas conser­
  vent leur valeur de page en page par l'utilisation du Mode Session. Il
  vous est possible de définir vos propres balises ou vos balises
  d'environnement et même de redéfinir les balises HTML.

  Avec heitml il devient possible de

  - - - développer des Sites Web de manière structurée et modulaire,
  tout en réduisant de façon drastique la surcharge due à la
  maintenance.

  - - - développer des Sites Web intelligents et interactifs, dont le
  contenu s'adapte dynamiquement aux besoins de l'utilisateur.

  - - - de visualiser le contenu de bases de données SQL sans autre
  programmation que l'utilisation de notre bibliothèque de Balises
  pré-définies "dba".

  - - - de développer des applications de bases de données 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 particulièrement 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 données yard sont
  supportés. heitml tourne sous Linux, BSDi, Solaris et SunOS, de même
  que sous Windows NT avec CGI, ISAPI et ODBC et Windows 95.

  heitml (sous linux) est libre pour la recherche, et pour une
  utilisation privée et non commerciale. Les Sites Web commerciaux
  doivent payer une licence. La version totalement opérationnelle de
  heitml est disponible pour une période d'essai et peut être
  télé-chargé librement. (Notez, cependant, que chaque page Web ".hei"
  que vous développerez affichera un message indiquant qu'il s'agit
  d'une version à usage non commerciale. Après enregistrement, vous
  recevrez une clé pour effacer ce message sans avoir à réinstaller le
  programme.)

  Les nouvelles fonctionnalités de la version 1.2 sont

  - - - Bibliothèque de Composants pour des Formulaires de Recherche
  dans un Base de Données, menus hiérarchisés d'ouverture et de
  fermeture, formulaires de courrier électronique

  - - - Le Mode Session a été re-conçu et amélioré pour conserver toutes
  les variables (y compris le tas tout entier) au travers des
  différentes pages. Cela signifie que les données, de n'importe quelle
  taille sont conservées à l'intérieur d'une session. Ceci offre
  l'opportunité d'un champ plus large pour créer de nouvelles
  applications, e.g. stockage complet des résultats d'une interrogation
  dans la mémoire de la session.

  - - - Les instructions d'installation, la documentation et les
  bibliothèques d'exemples ont été augmentées de manière significative,
  un cours d'auto-formation a été ajouté

  - - - Des balises pour exécuter des commandes shell et pour envoyer
  des courriers électronique ont été ajoutées

  - - - 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 façon intuitive. En cas d'erreur à l'exécution,
  toutes les structures de données internes sont affichées dans le
  butineur en indiquant et préservant leurs positions dans le code
  source original.

  - - - Diverses nouvelles variables serveur et fonctions intégrées ont
  été ajoutées

  - - - En mode production, heitml collecte maintenant des informations
  complètes sur les erreurs survenues lors de l'accès, par des
  utilisateurs, à votre site.


  Voici ce que dit la page d'accueil de heitml -

  heitml (prononcer "H-ail"-TML) étend et augmente de façon
  significative les fonctionnalités de HTML grâce aux balises
  définissables et aux possibilités complètes de programmation. Ce qui
  permet de créer simplement des applications au contenu dynamique et
  orientées bases de données 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 côté, comme
  utilisateur avancé ou comme programmeur vous pouvez créer et
  programmer de puissantes bibliothèques 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 génère dynamiquement du HTML, aussi heitml est
  compatible avec les normes internet et avec n'importe quel butineur
  web. Il permet un accès total aux bases de données tout en évitant à
  l'utilisateur toute la complexité inutile de CGI. heitml a été
  développé selon les plus récents critères en matière de construction
  de compilateurs et de systèmes transactionnels.

  Les pages heitml sont développées exactement de la même façon que les
  pages  HTML, à l'aide d'un éditeur de texte ou d'un éditeur HTML, et
  placées comme d'habitude sur le serveur web. Cependant, maintenant,
  les pages peuvent contenir des balises heitml dynamiques et des accès
  à des bibliothèques de balises. Vous pouvez utiliser ces balises pour
  accéder à une base de données, pour créer un contenu dynamique, pour
  envoyer des courriers électronique, et même pour créer de puissantes
  applications telles que les bases de données d'inscriptions ou de
  systèmes d'achats.

  Les nouveaux venus à HTML et les programmeurs professionnels seront
  stupéfaits de la vitesse et de la facilités avec lesquelles il peuvent
  concevoir des applications passionnantes telle que notre Livre d'Or
  Interactif sans nécessiter la complexité et l'apprentissage difficiles
  des scripts CGI, simplement en utilisant les outils fournis dans notre
  bibliothèque dba.

  heitml est accompagné d'un large éventail de bibliothèques de balises,
  pour créer des livres d'or, des applications de maintenance de bases
  de données, des formulaires puissants de courrier électronique ou de
  structuration de votre site web à l'aide de menus hiérarchiques. Ces
  outils sont prêts à être utilisés, il suffit simplement d'ajouter les
  balises correspondantes à votre site web.

  En tant que programmeur expérimenté, 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, procédures récursives et capacités de passage
  de paramètres étendues, mais il apporte aussi des possibilités de
  tuples persistants dynamiques pour conserver automatiquement des
  données de session de n'importe quelle taille.

  1155..22..  SSeerrvveeuurr WWeebb AAmmeerriiccaa OOnn--lliinnee AAOOLL ppoouurr PPoossttggrreeSSQQLL

  Le serveur web commercial gratuit, AOLserver version 2.3 supporte des
  connexions à la base de données PostgreSQL version 6.2.1 et
  ultérieure.  Pour des informations complémentaires consultez

  ·  AOL Web Server  <http://www.aolserver.com>





  1155..33..  OOuuttiill SSyyssttèèmmee ddee ssuuiivvii ddee PPrroobbllèèmmee//PPrroojjeett ppoouurr PPoossttggrreeSSQQLL

  Se trouve à l'url :

  ·  <http://www.homeport.org/~shevett/pts/>

  1155..44..  CCoonnvveerrssiioonn ddee ffiicchhiieerrss ddbbaassee ddbbff eenn ffiicchhiieerrss PPoossttggrreeSSQQLL

  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 méthode python pour lire des
  fichiers dbf et les charger dans une base de données postgres.

  ·  Voir  <http://www.python.org>

  1166..  OOuuttiill ddee CCoonncceeppttiioonn//IImmpplléémmeennttaattiioonn ppoouurr SSGGBBDD WWeebb ppoouurr PPoossttggrreeSSQQLL
  -- EEAARRPPWW


  ·  <http://www.oswego.edu/Earp>

  ·  <ftp://ftp.oswego.edu> in the directory 'pub/unix/earp'.

  1166..11..  EEAARRPP,, cc''eesstt qquuooii ??

  Le "Programme de Réponse Facilement Ajustable" ("Easily Adjustable
  Response Program" - EARP) créé par David Dougherty.  EARP est un outil
  de Conception/Implémentation pour Base De Données Web, réalisé au-
  dessus du système de gestion de base de données PostgresSQL. Ses
  fonctionnalités comprennent:


  ·  Un système de conception visuel.

  ·  Une interface d'envoi de courrier électronique. (pouvant prendre en
     charge le courrier entrant et sortant)

  ·  Un Mécanisme de Sécurité amélioré.

  ·  Un pilote cgi.

  1166..22..  IImmppllaannttaattiioonn


  L'implantation principale de EARP consiste en un binaire CGI qui
  s'exécute sous le démon http pour fournir l'accès au serveur de base
  de données. Tous les outils de conception sont intégrés dans le
  pilote, aucune conception ne se fait sur le web. Les outils eux-mêmes
  requièrent un navigateur graphique, la compatibilité des objets conçus
  avec ces outils est indépendante de l'implantation, elle ne dépend
  uniquement que des préférences de conception individuelles.




  1166..33..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn ppoouurr ffaaiirree ffoonnccttiioonnnneerr EEAARRPP


  EARP est sensé fonctionner sur une grande variété 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é conçue au-dessus de la
     version de libpq livrée avec PostgreSQL v1.01/1.02.  Si vous
     utilisez une version plus récente de Postgres, vous devez vous
     attendre à ce que le programme nécessite quelques modifications
     pour fonctionner correctement. Dans la version de développement
     (Earp 2.0), la prise en charge de libpq est en cours de prise en
     compte en tant que module.

  1166..44..  CCoommmmeenntt ffoonnccttiioonnnnee--tt--iill??


  Une des fonctionnalités principales de EARP est d'utiliser une
  approche orientée objet pour produire des pages html qui s'interfacent
  à la base de données. La plupart des pages sont constituées de
  plusieurs objets. Chaque objet est produit par une sorte d'outil et
  reçoit un nom, les objets sont alors liés ensembles et appelés en
  séquence par l'outil de gestion de pages.  Les objets sont également
  réutilisables à l'intérieur de plusieurs pages. Il existe des outils
  de base pour HTML, pour les Requêtes, pour la saisie dans des
  formulaires, le formatage variable des requêtes et des objets en
  entrée, ainsi que pour lier des objets pour en former de nouveaux.  On
  trouve également des outils plus avancés tels que l'outil de courrier
  électronique et l'outil de création de requêtes en parallèle.

  La gestion perfectionnée de la sécurité est une des autres
  fonctionnalités de EARP.  L'accès aux différentes zones du système
  EARP peut être limité par une grande variété de moyens. Pour faciliter
  cette sécurité perfectionnée, EARP effectue des contrôles à chaque
  connexion au système, et détermine à quels "ids" et "groups"
  appartient l'agent qui se connecte. Les accès aux zones sont définis
  séparément, et la combinaison des deux permet de décider si l'accès à
  une certaine zone de Earp est autorisé. De plus , tout ce qui est
  requis pour réaliser les fonctionnalités de sécurité se trouve dans un
  serveur http qui effectue une authentification de l'utilisateur
  minimale (ou meilleure).



  1166..55..  OOùù ppuuiiss--jjee llee ttrroouuvveerr??


  EARP est disponible via un ftp anonyme à :

  ·  <ftp://ftp.oswego.edu> in the directory 'pub/unix/earp'.

  1177..  PPHHPP PPrréé--pprroocceesssseeuurr HHyyppeerrtteexxttee -- LLaannggaaggee ddee ssccrriipptt ccôôttéé sseerrvveeuurr,,
  aavveecc HHTTMMLL iinnttééggrréé,, ppoouurr PPoossttggrreeSSQQLL

  L'outil d'interfaçage WWW se trouve à :

  ·  <http://www.php.net>

  ·  <http://www.vex.net/php>

     PHP possède également un compilateur appelé Zend qui améliore
     grandement les performances.  En premier lieu, pendant le
     développement, les tests et la mise au point, vous écrivez votre
     application en utilisant le langage de script PHP.  Une fois que le
     projet est prêt à être déployé, vous utilisez le compilateur Zend
     pour compiler le script PHP et créer un exécutable qui tournera
     très 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 côté serveur, avec langage HTML
     intégré.  Il vous permet d'écrire des scripts simples directement
     dans vos fichiers .HTML à la manière JavaScript, sauf que, à la
     différence de JavaScript, PHP 3 n'est pas dépendant du butineur
     utilisé. JavaScript est un langage, côté client, avec HTML intégré
     alors que PHP 3 est un langage côté 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 systèmes d'exploitation supportés, et vous jetterez
     probablement un oeil sur LiveWire Pro. Si vous préférez un logiciel
     libre, évoluant rapidement, qui est disponible avec la totalité de
     son code source, vous apprécierez probablement PHP 3.

  1177..11..  FFoonnccttiioonnnnaalliittééss pprriinncciippaalleess

  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 apportés par ce mécanisme. Comme module Apache, PHP 3
  devient une alternative extrêmement puissante et brillante à la
  programmation CGI.


  ·  Enregistrement des accès Avec les possibilités d'enregistrement des
     accès de PHP 3, les utilisateurs peuvent entretenir leur propre
     compteur d'accès et l'enregistrer. Il n'utilise en aucune façon les
     fichiers de d'enregistrement des connexions du système central, et
     il permet un suivi des accès en temps réel. Le Script du
     Visualisateur de Connexions fournit un résumé rapide des accès à un
     ensemble de pages possédées par un utilisateur individuel. De plus,
     le paquetage peut être configuré pour générer un pied de page, sur
     chaque page, qui montre l'information sur les accès. Regardez au
     bas de cette page pour en avoir un exemple.

  ·  Contrôle d'accès Un écran de configuration intégré, basé sur le
     web, permet la configuration du contrôle des accès. Il est possible
     de créer des règles d'accès pour toutes ou quelques unes des pages
     web possédées par une certaine personne qui met diverses
     restrictions sur qui peut voir ces pages et comment elles seront
     vues.  Les pages peuvent être protégées par un mot de passe,
     complètement interdites, à connexion désactivée et l'accès basé sur
     le domaine du client, le butineur, l'adresse de courrier
     électronique ou même le document auquel on se réfère.

  ·  Support de Postgres Postgres est un SGBDR (RDBMS) avancé libre. PHP
     3 supporte les requêtes Postgres95 et PostgreSQL SQL incluses
     directement dans les fichiers .html.


  ·  RFC-1867 Support du télé-chargement de fichier Le télé-chargement
     de fichier est une nouvelle fonctionnalité de Netscape 2.0.  Il
     permet aux utilisateurs de télé-charger des fichiers vers le
     serveur web.  PHP 3 réalise le décodage Mime réel pour faire ce
     travail et fournit aussi le cadre additionnel pour faire quelque
     chose d'utile avec le fichier télé-chargé une fois que celui-ci a
     été reçu.

  ·  Contrôle d'authentification basé sur HTTP PHP 3 peut être utilisé
     pour créer des mécanismes d'authentification personnalisés basés
     sur HTTP pour le serveur web Apache.

  ·  Variables, Tableaux, Tableaux associatifs PHP 3 supporte des
     variables typées, des tableaux et même des tableaux associatifs à
     la Perl. Ils peuvent être passés d'une page web à l'autre en
     utilisant les méthodes GET ou POST.

  ·  Conditions, Boucles Tant que (While) PHP 3 possède un langage de
     script aux fonctionnalités complètes 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
     contrôler l'ordre logique et la manière dont les pages html doivent
     être affichées.

  ·  Expressions Régulières étendues Les expressions régulières sont
     très utilisées pour le filtrage, le remplacement de séquences et
     les manipulations générales de chaînes de caractères. PHP 3
     supporte toutes les opérations communes sur les expressions
     régulières.

  ·  Contrôle de l'En-tête HTTP brute La possibilité d'envoyer à partir
     de pages web des en-têtes HTTP brutes personnalisées en fonction
     d'une condition est essentielle pour créer un site web de haut
     niveau. Un usage fréquent est l'envoi d'un emplacement: en-tête URL
     pour Rediriger le client appelant vers une autre URL.  Il peut
     aussi être utilisé pour stopper le stockage ou manipuler la
     dernière mise à jour de l'en-tête de pages.

  ·  Création d'images KIF à la volée PHP 3 prend en compte la
     bibliothèque d'image GD de Thomas Boutell ce qui offre la
     possibilité de générer des images GIF à la volée.

  ·  Prise en charge du mode sécurité ("Safe Mode") ISP PHP 3 prend en
     charge un "Mode de Sécurité" exceptionnel qui permet d'avoir de
     multiples utilisateurs exécutant des scripts PHP en toute sécurité
     sur le même serveur.

  ·  C'est Libre!  Pour finir, et c'est un point essentiel. Le paquetage
     est entièrement 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 détaillés.

  1177..22..  CCrrééddiittss


  * De grandes parties de ce code ont été développées à et pour
  l'université de Toronto. De grands Mercis à Lee Oattes du Département
  de Développement des Réseaux à 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.

  1177..33..  PPHHPP 33 -- BBrreeff HHiissttoorriiqquuee


  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é
  envisagée. 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 requêtes SQL dans des pages web a
  été écrit. C'était fondamentalement un autre petit programme enveloppe
  CGI qui analysait les requêtes SQL et facilitait la création de
  formulaires et de tables basés sur ces requêtes. Cet outil fut appelé
  FI "Interpréteur de Formulaire" (Form Interpreter).

  La version 2.0 PHP/FI est une réécriture complète de ces deux
  paquetages combinés pour former un simple programme. il a maintenant
  évolué au point de devenir un simple langage de programmation intégré
  dans les fichiers HTML.  L'acronyme original, PHP, lui est resté. Il
  n'est plus réellement 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'insérer de simples scripts directement dans vos fichiers HTML.  Ceci
  améliore les performances globales de vos pages web puisque la
  surcharge due au lancement de processus Perl successifs a été
  éliminée. La gestion de larges sites web a également été facilitée en
  plaçant tous les composants d'une page web dans un fichier html
  unique. En incluant le support de différentes bases de données, il
  devient trivial de développer des pages web mettant en oeuvre des
  bases de données. Nombreux sont ceux qui trouvent que cette
  intégration est plus facile à gérer que d'essayer de créer des
  fichiers HTML et CGI séparés.

  Tout au long de cette documentation, toute référence à PHP, FI ou
  PHP/FI traite de la même chose. La différence entre PHP et FI est
  seulement conceptuelle. Les deux sont construits à partir de la même
  distribution du code source. Maintenant, PHP/FI a été renommé PHP 3.

  1177..44..  BBoonn,, qquuee ppuuiiss--jjee ffaaiirree aavveecc PPHHPP//FFII??


  La première chose que vous allez noter, si vous faites tourner une
  page par l'intermédiaire de PHP/FI, c'est qu'il ajoute un pied de page
  vous informant du nombre d'accès à votre page (si vous incluez le
  support des connexions d'accès dans votre binaire). C'est seulement un
  tout petit exemple de ce que PHP/FI peut faire pour vous. Il joue
  également le rôle très important d'interpréteur de formulaire cgi,
  d'où la partie FI de son nom. Par exemple si vous créez un formulaire
  dans l'une de vos pages web, vous avez besoin de quelque chose pour
  traiter l'information contenue dans ce formulaire. Même si vous
  désirez 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 données du formulaire
  pour en faire quelque chose.

  1177..55..  UUnn ssiimmppllee eexxeemmppllee


  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 crée 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, après avoir vu comment utiliser ces variables, est
  de commencer à jouer avec quelques balises de gestion du déroulement
  logique de vos pages. Par exemple, si vous voulez afficher différents
  messages dépendants de des informations entrées par l'utilisateur,
  vous pouvez utiliser la logique si/alors (if/else). Dans notre exemple
  ci-dessus, on peut afficher différentes choses dépendant 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 très vieux!<p>";
           else;
               echo "Hi $name.";
           endif;
       >


  PHP/FI fournit un langage de script très 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
  complémentaires.

  Vous pouvez également utiliser PHP/FI pour configurer qui a le droit
  d'accéder à vos pages. Ceci est effectué en utilisant l'écran de
  configuration inclus.  Par son intermédiaire , vous pourrez, par
  exemple, spécifier que seulement les gens appartenant à un certain
  domaine seront autorisés à voir vos pages, vous pouvez également créer
  une règle protégeant certaines pages par un mot de passe. Voir la
  section Contrôle d'Accès pour plus de détails.

  PHP/FI est également capable de recevoir des fichiers télé-chargés par
  n'importe quel butineur conforme à la norme RFC-1867. Cette
  fonctionnalité permet aux gens de télé-charger également des fichiers
  de texte ou binaire.  Avec le contrôle de PHP/FI et les fonctions
  logiques, vous disposez d'un contrôle total sur qui est autorisé à
  télé-charger un fichier et sur ce que l'on peut faire de ce fichier
  une fois télé-chargé. Voir la section Télé-chargement de fichier pour
  de plus amples détails.

  PHP/FI supporte le paquetage Postgres95. Il supporte les requêtes 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
  requêtes SQL incluses dans vos fichiers .HTML. Consultez la section
  Support mysql pour plus d'informations.

  1177..66..  RReeddiirreeccttiioonn CCGGII


  1177..66..11..  NNootteess AAppaacchhee 11..00..xx

  Une bonne manière 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 développé 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 extrêmement similaires. Ils diffèrent très
     légèrement dans leur utilisation. Les deux ont été testés et
     fonctionnent avec PHP/FI.

  Regardez dans la documentation Apache la manière d'ajouter un module.
  En général 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 créer 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 apprêtez à 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 apprêtez à 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 même 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 spécifier 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 répertoire sera automatiquement filtrée
  par php si vous appelez votre fichier index index.phtml.

  1177..66..22..  HHTTTTPPDD NNeettssccaappee

  Vous pouvez rediriger automatiquement les requêtes pour des fichiers
  ayant une extension donnée de façon à 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.

  1177..66..33..  HHTTTTPPDD NNCCSSAA

  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.




  1177..77..  LLaanncceerr PPHHPP//FFII àà ppaarrttiirr ddee llaa lliiggnnee ddee ccoommmmaannddee


  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 créer des scripts PHP/FI autonomes en
  faisant ressembler la première ligne de votre script à quelque chose
  comme :



           #!/usr/local/bin/php.cgi -q




  L'option "-q" supprime l'impression des en-têtes HTTP. Vous pouvez
  vous passer de cette option si vous le désirez.

  1188..  IInntteerrffaaccee PPyytthhoonn ppoouurr PPoossttggrreeSSQQLL

  Python est un langage de script, interprété et orienté objet.  Il est
  simple à utiliser (syntaxe légère, instructions simples et sans
  détours ). Il possède de nombreuses extensions pour bâtir des
  interfaces utilisateurs ( GUI ), pour s'interfacer au WWW, etc. Un
  butineur de web intelligent ( à la HotJava ), est actuellement en
  cours de développement (novembre 1995), et cela devrait ouvrir de
  nombreuses portes aux programmeurs.  Le copyrightde Python est détenu
  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 bibliothèques système, à l'aide de code C est aisé, rendant
  Python facile à utiliser en cas de personnalisation. Python est un
  langage de script de très haut niveau possédant 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'interfaçage à l'ensemble de widgets Tix pour Tk.

  PyGresSQL est un module Python qui s'interface à une base de données
  PostgreSQL. Il intègre la bibliothèque de requêtes de PostgreSQL pour
  permettre l'utilisation aisée des possibilités 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



  1188..11..  OOùù llee ttrroouuvveerr PPyyGGrreess ??


  Les sites d'accueil des différents 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 répertoires
     contrib des sites Python et PostgresSQL.

  1188..22..  IInnffoorrmmaattiioonn eett ssuuppppoorrtt


  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 remplaçant "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, idées, remarques

  1199..  PPaasssseerreellllee eennttrree PPoossttggrreeSSQQLL eett WWWWWW -- WWDDBB--PP9955

  WDB-P95 - Une interface Web interface aux bases de données PostgresSQL
  a été créée 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 modifiée de wdb-1.3a2 qui fournit une passerelle
     WWW à PostgresSQL. Cette version nécessite également un Butineur
     capable de prendre en compte les Tables HTML pour avoir une sortie
     tabulée. Ceci n'est pas requis pour le  wdb original et on peut
     facilement y revenir.

  Vous pouvez essayer ma Bande CASI et ma Requête d'Image. Vous pouvez
  jeter un coup d'oeil au Fichier de Définition de Formulaire (FDF) qui
  est utilisé pour créer la Bande CASI et également la Requête d'Image,
  qui comprends une jointure (JOIN) de 2 tables.

  Cette version contient tous les fichiers nécessaires pour installer et
  faire tourner WDB-P95 en tant qu'interface à vos bases de données
  PostgresSQL. Le portage de ce système pour une autre base de données
  devrait être relativement facile - à condition qu'elle supporte le SQL
  standard et possède une interface Perl.

  1199..11..  LLee sseerrvveeuurr PPoossttggrreessSSQQLL,, ppggppeerrll,, eett hhttttppdd ddooiivveenntt--iillss rrééssiiddeerr
  ssuurr llee mmêêmmee hhôôttee??

  Non - Le serveur PostgresSQL n'a pas à être sur le même hôte. Comme
  WDB-P95 est appelé par le démon http, ils doivent résider sur le même
  hôte. - Et comme WDB-P95 a été écrit pour utiliser Pg.pm - pgperl doit
  être sur le même hôte également. Pgperl a été écrit en utilisant la
  bibliothèque libpq, donc, il sera capable d'accéder à n'importe quel
  serveur Postgres95 n'importe où sur le réseau, 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 parenthèses () représentent les machines.


  Chaque machine peut être d'un type différent : NT, SUN, HP, ... mais
  il faut que vous ayez la bibliothèque d'interface libpq pour le type
  de machine sur lequel  vous envisagez d'utiliser WDB-P95, puisqu'il
  vous faut compiler pgperl.  (Le système a été conçu pour utiliser les
  tables HTML donc un client WWW récent est meilleur)


  2200..  IInntteerrffaacceess aauu llaannggaaggee ""CC"",, ""CC++++"",, EESSQQLL//CC eett OOppéérraatteeuurrss ssuurr lleess
  bbiittss ppoouurr PPoossttggrreeSSQQLL


  2200..11..  IInntteerrffaaccee ""CC""

  Elle est incluse dans la distribution et s'appelle 'libpq'. Elle est
  similaire aux bibliothèques OCI Oracle, DB-lib Sybase, ou CLI
  Informix.


  2200..22..  ""CC++++"" iinntteerrffaaccee

  Elle est incluse dans la distribution et est nommée 'libpq++'.


  2200..33..  EESSQQLL//CC

  C'est un pré-compilateur C intégré 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 créer des applications personnalisées avec des
  possibilités de gestion de base de données. ESQL/C pour PostgreSQL
  vous permet d'utiliser un langage de troisième génération avec lequel
  vous êtes familiarisé tout en profitant des avantages d'un Langage de
  Requêtes Structuré (SQL).

  ESQL/C est composé des éléments logiciels suivants:

  ·  Les bibliothèques ESQL/C de fonctions C fournissent les accès au
     serveur de base de données.

  ·  Les fichiers d'en-tête ESQL/C apportent les définitions des
     structures de données, 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
     exécutable.

     Il se trouve à :

  ·  ESQL/C pour PostgreSQL est déjà inclus dans la distribution.

  ·  Site principal  <ftp://ftp.lysator.liu.se/pub/linus>

  ·  Email : linus@epact.se


  2200..44..  OOppéérraatteeuurrss ssuurr lleess bbiittss ppoouurr PPoossttggrreeSSQQLL

  Les opérateurs sur les bits ont été écrits par Nicolas Moldavsky

  ·  nico@overnet.com.ar

  Ce sont des fonctions "C" qui implantent les opérateurs bit-par-bit
  (AND, OR, XOR, bit complement) dans pgsql. Si quelqu'un désire les
  utiliser, il peut les récupérer par ftp anonyme de


  ·  <ftp://ftp.overnet.com.ar/pub/utils/linux/bitpgsql.tgz>

  De plus, il y a un "Makefile" pour Linux.

  2211..  LLeess CCooddeess KKaannjjii JJaappoonnaaiiss ppoouurr PPoossttggrreeSSQQLL

  Sont très utiles pour les Japonais.  On les trouvera au site suivant :

  ·  <ftp://ftp.sra.co.jp/pub/cmd/postgres/>

  2222..  PPoorrttaaggee ddee PPoossttggrreeSSQQLL ppoouurr WWiinnddoowwss 9955//WWiinnddoowwss NNTT

  Un portage pour Windows 95/Windows NT est en cours de réalisation.  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>

     Récupérez-y le fichier cdk.exe (fichier auto-extractible pour gnu-
     win32)

  Le portage peut également être réalisé en utilisant  l'outil
  "Emulateur Unix sous NT" (Unix-Emulator on NT) suivant de

  ·  <http://www.softway.com>

  2233..  MMaaiilliinngg LLiissttss


  2233..11..  OObbtteenniirr uunn ccoommppttee ee--mmaaiill GGrraattuuiitt

  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é complémentaire de création d'un classeur
     séparé pour les courriers électroniques PostgreSQL e-mails, ainsi
     votre e-mail habituel ne sera pas pollué. Sélectionnez le menu
     Email- > Options- > Filters et prenez un classeur séparé pour e-
     mail.  Avec ce compte e-mail vous pouvez accéder au courrier de
     n'importe où dans le monde à partir du moment où vous avez accès à
     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 séparé. De cette façon, vous éviterez de voir votre
  courrier pollué.

  2233..22..  LLiissttee ddee DDiiffffuussiioonn AAnnggllaaiissee

  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

  ·  Développeurs pgsql-hackers@postgresql.org

  ·  Questions spécifiques à un portage pgsql-ports@postgresql.org

  ·  Questions concernant la documentation pgsql-docs@postgresql.org

     Vous recevrez une réponse, par courrier électronique, dans la
     journée 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

  2233..33..  AArrcchhiivvee ddeess lliisstteess ddee ddiiffffuussiioonn

  Il y a aussi des listes de diffusion qui sont archivées 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 répertoire /pub/majordomo


  2233..44..  LLiissttee ddee DDiiffffuussiioonn EEssppaaggnnoollee

  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

  2244..  LLiivvrreess eett DDooccuummeennttaattiioonnss


  2244..11..  GGuuiiddeess uuttiilliissaatteeuurr eett MMaannuueellss

  On trouve dans la distribution PostgreSQL aux formats postscript, HTML
  et pages de manuel unix les documents suivants. Si vous avez accès à
  l'internet, vous pouvez trouver les documents indiqués ci-dessous à
  <http://www.postgresql.org/docs>


  ·  Le 'Guide Utilisateur' pour PostgreSQL,

  ·  Le 'Guide de Réalisation' détaillant 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.

  2244..22..  DDooccuummeennttaattiioonn eenn lliiggnnee


  ·  Liste et description des types de données et des opérateurs par
     défaut


       Fait partie des commandes PSQL de la version 6.5.2.




  ·  Liste des mots-clés SQL supportés


       Il y a un script dans le répertoire /tools qui fait cela




  ·  Liste des instructions supportées -


       Utilisez la commande psql \h




  ·  Concepts de base des bases de données relationnelles sous
     PostgreSQL (en implémentation) et des tonnes d'exemples en ligne
     (requêtes) -


       Consultez les tests de régression dans src/test. Là, vous y trouver les
       répertoires regress/sql et suite/*.sql.





  ·  Didacticiel pour PostgreSQL.



       Les scripts du didacticiel SQL sont dans le répertoire src/tutorial





  Voir également "Didacticiel SQL pour les débutants" dans l'appendice B
  de ce document ``''

  2244..33..  DDooccuummeennttss ddee RRééfféérreennccee:: OOuuvvrraaggeess ddee rrééfféérreennccee uuttiilleess ::


  ·  "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. Très
       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, (Référence Immédiate 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 Systèmes de Bases de Données) (6th Edition), Addison-Wesley,
     1995, ISBN 0-201-82458-2


       Ce livre est la Bible des Systèmes de Gestion de Bases de Données.
       Le livre détaille la normalisation, SQL, la récupération, la concurrence,
       la sécurité, l'intégrité, les extensions au modèle relationnel original,
       des sujets actuels tels que  les systèmes client/serveur et le(s) modèle(s)
       Orienté(s) Objet. De nombreuses références sont données pour des lectures
       complémentaires. Recommandé pour la plupart des utilisateurs.





  ·  Stefan Stanczyk, "Theory and Practice of Relational Databases",
     (Théorie et pratique des bases de Données Relationnelles) UCL Press
     Ltd, 1990, ISBN 1-857-28232-9


       Ce livre détaille la théorie des bases de données relationnelles, l'algèbre
       relationnelle, le calcul et la normalisation. Mais il ne couvre pas les sujets
       du mode réel 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 Systèmes de Bases de Données), Morgan Kaufmann, 1988, ISBN
     0-934613-65-6


       Ce livre est un recueil de papiers, sur les bases de données, qui ont été
       publiés sur plusieurs années. Il n'est pas pour l'utilisateur occasionnel
       mais, c'est réellement une référence pour les étudiants en classes supérieures
       (troisième cycle) ou pour les développeurs de systèmes de bases de données.





  ·  C.J.Date, "Relational Database - Selected Readings" (Bases de
     Données Relationnelles - Morceaux choisis), Addison-Wesley, 1986,
     ISBN 0-201-14196-5


       Ce livre est un recueil de papiers, sur les bases de données, qui ont été
       publiés sur plusieurs années. Il n'est pas pour l'utilisateur occasionnel
       mais c'est réellement une référence pour les étudiants en classes
       supérieures (troisième cycle) ou pour les développeurs de systèmes de
       bases de données.


  ·  Nick Ryan and Dan Smith, "Database Systems Engineering",
     (Ingénierie de Systèmes de Bases de Données), International Thomson
     Computer Press, 1995, ISBN 1-85032-115-9


       Ce livre traite des détails des méthodes d'accès, et des technique de stockage.





  ·  Bipin C. Desai, "An introduction to Database Systems", (Une
     introduction aux systèmes de bases de données) West Publishing Co.,
     1990, ISBN 0-314-66771-7


       Il n'est pas pour l'utilisateur occasionnel mais c'est réellement une
       référence pour les étudiants en classes supérieures (troisième cycle)
       ou pour les développeurs de systèmes de bases de données.





  ·  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" (Systèmes de Gestion de Bases de Données :
     comprendre et appliquer les bases de données)


       Technology
       QED and John Wiley
       1991





  ·  Michael Gorman "Enterprise Database for a Client/Server
     Environment" (Base de Données d'Entreprise pour un Environnement
     Client/Serveur) QED and John Wiley


       Présente les exigences de construction d'applications de base de données
       client/server par l'intermédiaire de méta-modèles d'entrepôt et l'utilisation
       de la norme SQL ANSI 1993





  Des centaines d'autres titres concernant SQL sont disponibles!
  Vérifiez-le dans une librairie.


  2244..44..  DDooccuummeennttss ddee SSppéécciiffiiccaattiioonnss AANNSSII//IISSOO SSQQLL -- SSQQLL 11999922,, SSQQLL 11999988

  Les documents de Spécifications ANSI/ISO SQL sont situés à 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

  ·  Spécifications ANSI/ISO SQL
     <http://www.contrib.andrew.cmu.edu/~shadow/sql.html> Vous trouverez
     la Référence SQL ici.

  2244..55..  SSyynnttaaxxee ddee ll''AANNSSII//IISSOO SSQQLL 11999922

  Voir l'Appendice A de ce document ``''

  2244..66..  SSyynnttaaxxee ddee ll''AANNSSII//IISSOO SSQQLL 11999988

  Les spécifications de SQL 1998 (SQL 3) sont encore en cours de
  développement.  Voir le paragraphe 'Electronic Access to the SQL3
  Working Draft' de ce document document à ``''

  2244..77..  DDiiddaaccttiicciieell SSQQLL ppoouurr lleess ddéébbuuttaannttss

  Voir l'Appendice B de ce document ``''

  2244..88..  EExxtteennssiioonn TTeemmppoorreellllee àà SSQQLL9922


  ·  Document pour l'Extension Temporelle à SQL-92
     <ftp://FTP.cs.arizona.edu/tsql/tsql2/>

  ·  Spécification SQL-3 Temporelle
     <ftp://FTP.cs.arizona.edu/tsql/tsql2/sql3/>

  Ce répertoire contient les spécifications pour une extension
  temporelle au langage SQL-92 standard. Ce nouveau langage est appelé
  TSQL2.

  Les spécifications du langage présentées ici correspondent à la
  version finale du langage.

  La correspondance doit être adressée 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 trouvées, dans
     un chapitre séparé, à la fin des spécifications du langage.

  Le contenu du répertoire est le suivant :

  spec.dvi,.ps    Spécifications du langage TSQL2, publié en Septembre,
  1994

  bookspec.ps     Spécifications 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 comités ANSI et
  ISO SQL3.

  Un ensemble de commentaires, associés aux spécifications du langage,
  parle des décisions de conception, fournit des exemples, et traite de
  la façon 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 différent: fournir des
  exemples de syntaxe, expliquer les nombreuses décisions prises durant
  la conception du langage, et comparer TSQL2 aux nombreuses autres
  propositions de langage faites au cours des quinze dernières années.
  Il faut insister sur le fait que ces commentaires ne font pas partie
  intégrante des spécifications du langage TSQL2 en lui-même, mais
  plutôt qu'elles le complètent et constituent un apport. Le mot de la
  fin est donné par les spécifications de TSQL2 proprement dit.

  Les commentaires, ainsi que les spécifications du langage, plusieurs
  index, et d'autres éléments de support ont été publiés dans un livre :

  Snodgrass, R.T., éditeur, The TSQL2 Temporal Query Language, (Le
  Langage de  Requêtes Temporel TSQL2) Kluwer Academic Publishers, 1995,
  674+xxiv pages.

  Les commentaires d'évaluation sont donnés sous forme abrégée dans le
  livre; La totalité des commentaires est fournie dans le fichier
  eval.ps situé dans ce répertoire

  Le fichier tl2tsql2.pl est un programme prolog qui traduit la logique
  temporelle autorisée en TSQL2. Ce programme a été écrit par Michael
  Boehlen

  ·  boehlen@iesd.auc.dk

     On peut le contacter pour obtenir un papier qui décrit 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).

  2244..99..  PPaarrttiiee 00 -- AAccqquuiissiittiioonn ddeess DDooccuummeennttss IISSOO//AANNSSII SSQQLL

  Ce document vous explique comment acquérir (légalement) une copie de
  la norme SQL-92 et comment acquérir une copie du Brouillon de Travail
  du SQL3 "actuel".

  La norme ANSI est protégée 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-
  tête 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 rédaction, mais il
  devrait l'être entre fin Mars et début Mai, 1993). Il devrait coûter
  US$ 225.00.

  Si vous achetez l'un ou l'autre document à l'ANSI, il y aura un
  supplément de 7% pour le traitement (soit environ US$ 9.10). Les frais
  d'envoi à l'étranger accroîtront sans doute le coût. ANSI exige des
  sociétés un document de commande écrit pour chaque commande; d'un
  autre côté, vous pouvez envoyer un chèque tiré sur une banque US en
  dollars US, qu'ils encaisseront avant d'expédier 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
  représentations nationales locales (entités 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 représentations nationales,
  avec leurs adresses, sont disponibles de l'ANSI ou d'autres entités
  nationales.  Ils sont aussi disponibles à l'ISO :


            International Organization for Standardization
            Central Secretariat
            1, rue de Varembi
            CH-1211 Genève 20
            Switzerland




  Si vous préférez commander la norme d'une façon plus facile et plus
  rapide, il vous faudra payer pour ce privilège. Vous pouvez commander
  le ISO/IEC 9075:1992, Information Technology - Database Languages -
  SQL, à :


            Global Engineering Documents
            2805 McGaw Ave
            Irvine, CA 92714 (USA)
            USA
            Téléphone (accessible de partout): +1.714.261.1455
            Téléphone (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
  supplément.  Ils peuvent vous envoyer un document très rapidement et
  acceptent même les "plus grandes cartes de crédit". Global n'a pas
  encore la version ANSI pas plus qu'un prix ou qu'une date prévisible
  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
  secrétariat de l'ANSI X3, CBEMA (Computer and Business Equipment
  Manufacturers Association). Leur objectif est d'avoir la "plus
  récente" 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 contactée par téléphone au +1.202.626.5738
  pour une demande de copie, bien qu'un courrier soit probablement plus
  courtois.

  Accès Électronique au Document de Travail SQL3

  La plus récente version (à la date de rédaction) 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 répertoire , il y a de nombreux fichiers.  Ce sont des
  fichiers PostScript et "texte ordinaire" (pas très bien formatés, mais
  lisibles sur un écran sans logiciel spécifique).

  En général, 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
  répertoire par FTP, nous avons ajouté un fichier ayant pour nom :


            ls




  dans le même répertoire.  Ce fichier (surprise!) contient une liste du
  répertoire.

  Récupérer les Fichiers Directement par Ftp

  Voici un exemple sur la façon d'utiliser FTP. Spécifiquement, il
  montre comment se connecter à gatekeeper.dec.com, aller au répertoire
  où le document de base est gardé et à transférer ce document sur votre
  machine. Notez que votre machine doit pouvoir accéder à 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 utilisée pour s'assurer qu'aucuns bits ne
  seront supprimés du (des) fichier(s) reçu(s). La commande 'get'
  récupère un fichier à la fois.  Les commentaires dans le script ci-
  dessous sont placés 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 répertoire sous le nom x3h2-93-082.txt>




  Récupération de Fichiers Sans Faire un ftp Direct

  Digital Equipment Corporation, comme plusieurs autres compagnies,
  fournit un service de ftp par courrier électronique. La réponse peut
  prendre plusieurs jours, mais cela fournit un service équivalent à ftp
  pour ceux qui n'ont pas un accès direct au ftp par Internet.
  L'adresse du serveur est:

  ftpmail@decwrl.dec.com

  Le script suivant récupérera la dernière version PostScript du
  document SQL3 :


            reply joe.programmer@imaginary-corp.com
            connect gatekeeper.dec.com anonymous
            binary
            compress




  Le script suivant récupérera la dernière 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 première ligne du script commande au serveur de vous retourner les
  fichiers demandés; 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 séparés,
  "compressés" et "uuencodés". Si votre environnement ne dispose pas des
  outils pour reconstruire de tels fichiers, alors, il vous faudra
  récupérer 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 récupérer un fichier particulier, autre que x3h2-93-091.ps,
  remplacez simplement "x3h2-93-091.ps" par le nom du fichier désiré.
  Pour obtenir la liste de tous les fichiers disponibles dans un
  répertoire, remplacez "get x3h2-93-091.ps" par "dir".




  2244..1100..  PPaarrttiiee 11 -- EEttaatt AAccttuueell ddee ll''IISSOO//AANNSSII SSQQLL

  Ce chapitre constitue une source d'information à propos du processus
  de normalisation de SQL et de son état actuel.

  État Actuel

  Le développement pour améliorer SQL afin d'en faire un langage complet
  pour la définition et la gestion d'objets persistants et complexes.
  Ceci comprend : les hiérarchies de généralisation et de
  spécialisation, l'héritage multiple, les types de données définies par
  l'utilisateur, les déclencheurs et les assertions, le support des
  systèmes à base de connaissances, les requêtes récursives, et des
  outils complémentaires d'administration de données. Cela inclue
  également la spécification des types de données abstraits (ADTs), des
  identificateurs d'objets, des méthodes, de l'héritage, du
  polymorphisme, de l'encapsulation et de tous les autres moyens
  normalement associés à 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 prévu) avec environ 900 commentaires. Fin
  Janvier, un comité de rédaction traita un grand nombre de solutions
  aux problèmes qui furent soit incluses avec les commentaires du vote
  ou soumises en tant que documents séparés. Depuis le comité de
  rédaction DBL n'a pas pu traiter tous les commentaires et sa durée a
  été augmentée. La fin du comité de rédaction est prévue pour la fin
  Juillet 1997, à Londres.


  A la suite du comité de rédaction 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 rédaction du DBL, après
  lesquels il y aura un vote IS et un très rapide vote IS.

  Les procédures ISO ont changé depuis SQL/92, et les comités SQL
  travaillent encore selon les règles du processus.

  Si tout va bien, ces parties du SQL3 deviendront une norme officielle
  ISO/IEC en fin 1998, mais le programme est très serré.

  En 1993, les comités de développement ANSI et ISO ont décidé de
  d'éclater le développement futur de SQL en une norme multi-parties.
  Ces parties sont :


  ·  Partie 1: Structure Description non technique de la manière dont le
     document doit être structuré.

  ·  Partie 2: Base Spécifications de base, incluant toutes les
     nouvelles fonctionnalités ADT.

  ·  Partie 3: SQL/CLI Interface du niveau appel (Call Level Interface).

  ·  Partie 4: SQL/PSM Spécifications des procédures enregistrées

  ·  Partie 5: SQL/Bindings SQL Dynamique et SQL Embedded SQL liens
     venant de SQL-92.

  ·  Partie 6: SQL/XA Une spécialisation de l'interface populaire XA
     développée par X/Open

  ·  Partie 7:SQL/Temporal Ajoute les capacités liées 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 traités
  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 définir une norme multi-media
     utilisant les possibilités de SQL3 ADT.

  ·  Accès aux données à distance (RDA)

  Comités et Processus de Standardisation

  Il y a effectivement de nombreux comités 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 comités qui se
  consacrent à SQL. Ces pays (habituellement) envoient des représentants
  aux réunions ISO/IEC JTC1/SC 21/WG3 DBL. Les pays qui participent
  activement au processus de normalisation ISO SQL sont :


  ·  Australie

  ·  Brésil

  ·  Canada

  ·  France

  ·  Allemagne

  ·  Japon

  ·  Corée

  ·  Pays-Bas

  ·  Angleterre

  ·  États-Unis

  Validation NIST

  Les implémentations SQL sont validées (aux États-Unis) par le National
  Institute of Standards and Testing (NIST). Le NIST possède une suite
  de tests de validation pour le niveau de base SQL-92. Les détails
  exacts des exigences de la validation NIST sont définis comme un
  Federal Information Processing Standard (FIPS). Les exigences
  actuelles pour SQL sont définies dans le document FIPS 127-2. Les
  versions Postscript et Texte de ce document peuvent être obtenues au
  NIST. La Liste des Produits Validés à 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 références aux autres normes. Les deux versions sont
  disponibles au :


            American National Standards Institute
            1430 Broadway
            New York, NY 10018
            USA
            Téléphone (ventes): +1.212.642.4900




  En supplément à 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 supplément à 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 donnée par le norme elle-même.

  Standards connexes

  Un certain nombre d'autres normes présentent de l'intérêt pour la
  communauté SQL. Cette section contient des pointeurs donnant des
  informations sur ces efforts. Ces pointeurs seront plus nombreux à
  mesure que des informations complémentaires seront disponibles sur le
  web.


  ·  SQL Environnements (FIPS 193) - (Environnements SQL)

  ·  Next Generation Repository Systems (X3H4) - (Systèmes Dépositaires
     de la Prochaine Génération) Une version des Nouvelles appelant à
     une participation au "Développement des Standards pour les Systèmes
     Dépositaires de la Prochaine Génération."

  2244..1111..  PPaarrttiiee 22 -- FFoonnddeemmeennttss IISSOO//AANNSSII SSQQLL

  Une partie importante de l'effort pour SQL3 réside dans le document de
  base SQL :


  ·  Capacités de Base SQL/PSM (venant de SQL/PSM-92)

  ·  Nouveaux types de données

  ·  Déclencheurs

  ·  Sous-tables

  ·  Types de Données Abstraits (ADT)

  ·  Capacités Orientées Objets

  Il y a plusieurs pré-requis pour les capacités orientées objets :


  ·  Capacité de pouvoir définir des opérations complexes

  ·  Stockage des opérations complexes dans la base de données

  ·  Appels de Procédures Externes ­ Quelques opérations peuvent ne pas
     exister dans SQL ou peuvent nécessiter des interactions externes

  Ces capacités sont définies comme faisant partie de SQL/PSM

  Une grande quantité de travail est en cours de réalisation pour
  affiner le modèle objet SQL-3 et l'aligner sur le modèle objet proposé
  par l'ODMG. Cet effort est décrit dans les papiers X3H2 et ISO DBL :
  Accommoder SQL3 et ODMG. Une mise à jour récente 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 années.


  ·  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 génère de nombreux commentaires

  ·  Un second vote sera probablement nécessaire

  ·  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.

  2244..1122..  PPaarrttiiee 33 -- IInntteerrffaaccee dd''AAppppeell SSQQLL IISSOO//AANNSSII

  SQL/CLI est une interface de programmation d'appel pour les bases de
  données SQL.  Il est conçu pour accéder aux bases de données à partir
  d'applications fermées.  CLI a, à l'origine, été créé par un sous-
  comité du groupe SQL Access (SAG).  Les spécifications de SAG/CLI ont
  été publiées, en 1992, en tant que spécifications Microsoft Open
  DataBase Connectivity (ODBC) en 1992. En 1993, le SAG a soumis le CLI
  aux comités 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 dépendant de l'implémentation pour accéder aux bases de
     données SQL

  ·  Des outils Client-serveur pour accéder facilement à une base de
     données au moyen de Bibliothèques 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 fonctionnalités SQL3 à
     SQL/CLI

  2244..1133..  PPaarrttiiee 44 -- MMoodduulleess MMéémmoorriissééss PPeerrssiissttaannttss IISSOO//AANNSSII SSQQLL

  SQL/PSM étend SQL en ajoutant :


  ·  Des extensions de langage procédural

  ·  Des procédures mémorisées multi-instructions

  ·  Des appels de procédures et de fonctions externes

  SQL/PSM apporte, en plus du fait d'être un bon outil de développement
  d'application, une base pour des fonctionnalités orientées objet dans
  SQL3.

  Procédures mémorisées et multi-instructions

  Multi-instructions et procédures mémorisées offrent une grande variété
  d'avantages dans un environnement client/serveur :


  ·  Performance - Puisqu'une procédure mémorisée peut effectuer de
     multiples instructions SQL, les interactions sur le réseau, avec le
     client, sont réduites.

  ·  Sécurité - On peut donner à un utilisateur le droit d'appeler une
     procédure mémorisée 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 procédure mémorisée n'a pas à être
     réécrit ni re-testé pour chaque outil d'un client qui accède à la
     base de données.

  ·  Contrôle - Fournit un point unique de définition et de contrôle
     dans la logique de l'application.

  Extensions de Langage Procédural

  Le langage procédural ajoute la puissance d'un langage de
  programmation traditionnel à SQL grâce à des instructions de contrôle
  de flot et à d'autres constructions utilisées en programmation.

  Instructions de contrôle 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 procédural comprennent d'autres
  constructions des langages de programmation :


  ·  Déclaration 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 procédures multi-instructions.

  Appels de Fonctions et de Procédures externes

  Une fonctionnalité souvent mentionnée dans la liste des souhaits pour
  de nombreuses base de données et produits et qui est implémentée dans
  quelques-uns, est la capacité de pouvoir augmenter les fonctionnalités
  du logiciel de base de données d'origine par des appels à des
  procédures externes écrites par les utilisateurs.


  ·  Cela permet à un site ou a une application en particulier d'ajouter
     leurs propres fonctions base de données

  ·  Peuvent être utilisées tout au long des applications bases de
     données

  Le bénéfice de cette capacité est de donner accès, pour la base de
  données (et, par là, aux applications base de données), à un riche
  ensemble de procédures et de fonctions trop nombreuses pour être
  définies 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 réunion de travail en mai 1996 n'a pas apporté de solution à
     tous les commentaires

  ·  La poursuite de la réunion de travail du PSM est programmée 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 désignation 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 fonctionnalités de SQL3 est
     en bonne voie.



  2244..1144..  PPaarrttiiee 55 -- IISSOO//AANNSSII SSQQLL//LLiieennss

  Pour en faciliter l'accès, la description des liens avec le langage de
  programmation a été mise dans un document séparé. La version actuelle
  consiste simplement en un extrait concernant les liens dynamiques et
  intégrés 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 données de SQL-92. Cependant, des
  transformations doivent être définis entre les objets SQL et les
  variables des langages de programmation.

  Pour les langages orientés objets, la transformation doit être définie
  pour les types de données courants SQL et entre le modèle objet SQL et
  le modèle objet du langage orienté objet.

  Le modèle objet doit se stabiliser avant de résoudre ces problèmes.

  Les liens avec le langage feront partie intégrante de SQL3.

  2244..1155..  PPaarrttiiee 66 -- IInntteerrffaaccee ddee SSppéécciiaalliissaattiioonn ((SSQQLL//XXAA)) IISSOO//AANNSSII SSQQLL
  XXAA))

  Cette spécification 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 sémantique 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 dérivé d'une publication de l'X/Open, avec sa permission,
  qui spécifie explicitement les paramètres d'entrée, de sortie et la
  sémantique, en termes de types de données 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 spécifications XA de l'X/Open.
  Ce processus de suivi, au plus près, consiste à adopter les
  spécifications de l'industrie sans changements. Le vote pour l'XA à
  l'ISO SC21, JTC 1 a débuté le 27 avril 1995 et se termine le 27
  octobre 1995. Si les spécifications XA sont approuvées 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.

  2244..1166..  PPaarrttiiee 77 -- IISSOO//AANNSSII SSQQLL TTeemmppoorreell

  Le SQL Temporel traite des données en relation avec le temps.
  Conceptuellement, cela consiste à dire qu'il est utile d'aller
  chercher des données pour découvrir l'allure qu'elles avaient à un
  certain moment. L'origine du SQL Temporel réside dans un papier de
  décembre 1994 de Rick Snodgrass qui en décrivait 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 (Président du comité TSQL2)
       31-Dec-1994


  Plusieurs personnes se sont posé la question de la nécessité 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 données temporelles). Le sentiment est que les
  types de données abstraits (ADT) sont suffisants pour gérer les ques­
  tions de temps. Dans ce papier, je démontre, par des exemples con­
  crets, que l'utilisation de colonnes typées, avec des types de données
  abstraits, est inadaptée pour des requêtes temporelles.  En partic­
  ulier, beaucoup de requêtes temporelles courantes sont soit difficiles
  à simuler en SQL, soit nécessitent d'intégrer SQL dans un langage
  procédural. Des solutions alternatives sont exposées dans TSQL2, une
  extension temporelle à SQL-92.

  2244..1166..11..  IINNTTRROODDUUCCTTIIOONN

  La prise en charge d'un instant de validité va au-delà de celle de
  types de données temporels abstraits (ADT temporel). Avec ce dernier,
  on spécifie qu'une colonne sera celle consacrée au domaine temporel,
  tel que la DATE ou un INTERVALLE (je donnerai des exemples bientôt).
  Avec un instant de validité, les lignes d'une table varient en
  fonction du temps, reflétant les modifications de la réalité. Le
  timbre dateur associé à une ligne d'une table à instant de validité
  est interprété 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 requêtes de manière
  simple et intuitive.

  2244..1166..22..  ÉÉTTUUDDEE DDEE CCAASS -- EENNRREEGGIISSTTRREEMMEENNTT DDEE LL''IINNFFOORRMMAATTIIOONN CCOOUURRAANNTTEE

  Le bureau du personnel (BP) salarié de l'université de l'Arizona
  possède un certain nombre d'informations, dans une base de données,
  dont le nom de chaque employé, son salaire actuel ainsi que son titre.
  On peut représenter cela dans une simple table.


               Employee(Name, Salary, Title)




  Étant donné cette table, retrouver le salaire d'un employé est une
  opération aisée.


               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 schéma 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'




  2244..1166..33..  ÉÉTTUUDDEE DDEE CCAASS -- EENNRREEGGIISSTTRREEMMEENNTT DDEE LL''IINNFFOORRMMAATTIIOONN HHIISSTTOORRIIQQUUEE

  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 modèle de données, ces nouvelles colonnes sont identiques à la
  date de naissance. Cependant, leur présence à des conséquences à
  grande échelle.

  2244..1166..44..  ÉÉTTUUDDEE DDEE CCAASS -- PPRROOJJEECCTTIIOONN

  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 requête est plus compliquée que la précédente. 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, spécifiquement, il est nécessaire de déterminer 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 résultat 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 déterminer quand
  son salaire a changé. Cette alternative n'est ni très attirante ni
  très réaliste. Une seconde alternative est d'utiliser SQL autant que
  possible.


       CREATE TABLE Temp(Salary, Start, Stop)
       AS      SELECT Salary, Start, Stop
               FROM Employee;




  répéter


               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 fusionnés. La boucle est exécutée log N fois
  dans le pire des cas, où N est le nombre de lignes dans une chaîne de
  lignes de valeur équivalente qui se chevauchent ou sont adjacentes. Le
  lecteur peut simuler cette requête sur la table de l'exemple pour se
  convaincre de sa vérité.

  Une troisième alternative consiste à utiliser SQL uniquement pour
  ouvrir un curseur sur la table. Une liste chaînée de périodes est
  entretenue, chacune avec un salaire. La liste chaînée doit être
  initialisée 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-données est retourné alors aller à fin;
               trouver la position dans la liste chaînée pour insérer cette information;
               aller à boucle;
       fin:
       CLOSE emp_cursor;



  Répéter tout au long de la liste chaînée, édition des dates et des
  salaires

  La liste chaînée peut ne pas être nécessaire au cas où le curseur est
  ORDER BY Start.

  Dans tous les cas, la requête, tout ce qu'il y a de naturelle, est
  tout à fait difficile à exprimer en utilisant les possibilités
  offertes par SQL-92. La requête est triviale en TSQL2.


               SELECT Salary
               FROM Employee




  2244..1166..55..  ÉÉTTUUDDEE DDEE CCAASS -- JJOOIINNTTUURREE

  Une approche plus drastique consiste à éviter le problème d'extraction
  de l'historique du salaire en réorganisant le schéma pour séparer 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 calculée 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 entièrement SQL.
  Malheureusement, cette requête doit faire une étude de cas sur la
  manière 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 façon correcte, tous les cas constitue une
  tâche qui relève du challenge. En TSQL2, réaliser une jointure tem­
  porelle correspond simplement à ce que l'on peut espérer.


               SELECT Employee1.Name, Salary, Dept
               FROM Employee1, Employee2
               WHERE Employee1.Name = Employee2.Name




  2244..1166..66..  ÉÉTTUUDDEE DDEE CCAASS -- AAGGRRÉÉGGAATTSS

  Maintenant, on demande au BP quel est le salaire maximum ? Avant
  d'ajouter les données 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 problème est que, naturellement, SQL ne fournit pas
  d'agrégats temporels. Le moyen simple de réaliser cela consiste à
  éditer l'information, et à chercher, à la main, le maximum. Une alter­
  native consiste à être plus astucieux et à convertir l'instantané de
  la requête agrégée en une requête non agrégée, puis à convertir le
  résultat en requête temporelle. La requête non agrégée 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 requête en une requête 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 crée une table auxiliaire. Nous ajoutons à cette table
  la période inférieure soustraite d'une période et la partie supérieure
  soustraite d'une période. Nous supprimons alors toutes les périodes
  qui se chevauchent avec une ligne définie dans la sous-requête, de ce
  fait réalisant le NOT EXISTS(n'existe pas). Finalement nous générons à
  partir de la table auxiliaire les périodes maximales, de la même façon
  que l'information de salaire avait été calculée ci-dessus. Comme on
  peut l'imaginer, un tel code SQLest extrêmement inefficace à
  l'exécution, compte tenu des requêtes complexes imbriquées contenant
  des prédicats d'inégalité.

  Une troisième alternative consiste à utiliser le moins possible SQL,
  et plutôt de calculer le maximum désiré dans un langage hôte en
  utilisant des curseurs.

  La requête en TSQL2 est de nouveau simple et intuitive.


               SELECT MAX(Salary)
               FROM Employee







  2244..1166..77..  RRÉÉSSUUMMÉÉ

  Dans la plupart des applications de base de données on manipule des
  données qui changent en fonction du temps. La prise en compte de
  l'instant de validité est absente de SQL. Beaucoup de requêtes
  temporelles ordinaires sont difficiles à simuler en SQL, ou requièrent
  du SQL intégré dans un langage procédural, ceci étant dû au manque de
  support des tables avec instant de validité dans son modèle de données
  et dans la structure des requêtes.

  Ailleurs, nous avons montré que l'ajout du support de l'instant de
  validité ne requiert que peu de modifications dans l'implémentation
  des SGDB, peut radicalement simplifier un certain nombre de requêtes
  et en permettre d'autres, et peut, plus tard, permettre des
  optimisations dans les structures de mémoires, les méthodes
  d'indexation et les stratégies d'optimisation qui peuvent entraîner
  des améliorations notables dans les performances.

  Avec une nouvelle partie de SQL3 supportant les informations qui
  varient avec le temps, permettant une meilleure gestion des données
  temporelles par SQL3, nous pouvons commencer à apporter une réponse à
  de telles application.


       ----------------------------------------------------------------------------
                  Comité de Normalisation Accrédité* 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 Accrédité 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
  réalisé au sein du Comité Technique X3H2, Bases de Données.  Cette
  proposition de norme concerne un nouvelle partie de la norme naissante
  SQL3, e.g., Partie 7, SQL Temporel, et spécifie les extensions au lan­
  gage SQL pour gérer le stockage, l'extraction et la manipulation des
  données temporelles dans un environnement de base de données SQL.

  La prochaine réunion du comité X3H2 est planifié pour la période du 11
  au 14 Mars 1996 dans le Kansas.

  Les questions concernant ce projet doivent être envoyées au président
  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 plaît, les informations à ce propos au secrétariat de X3 à :


               X3 Secretariat
               1250 Eye Street
               NW, Suite 200,
               Washington DC  20005.
               Email: x3sec@itic.nw.dc.us
               FAX:  (202)638-4922.




  2244..1177..  PPaarrttiiee 88 -- SSQQLL MMUULLTTIIMMEEDDIIAA IISSOO//AANNSSII ((SSQQLL//MMMM))

  Un nouveau projet international de normalisation ISO/IEC pour le
  développement d'une bibliothèque de classe SQL pour les applications
  multi-media a été approuvé début 1993. Cette nouvelle activité de
  normalisation, appelée SQL Multi-media (SQL/MM), spécifiera les
  paquetages de définition de types de données abstraites SQL (ADT) en
  utilisant les fonctions fournies dans les spécifications SQL3
  naissantes pour ADT.  SQL/MM a pour objectif de normaliser des
  bibliothèques de classes pour la science et l'ingénierie, le
  traitement des textes et des documents, ainsi que des méthodes pour la
  gestion d'objets multi-media tels que les images, les sons, les
  animations, la musique et la vidéo. Il fournira vraisemblablement un
  lien entre le langage SQL et les objets multi-media définis par les
  autres entités de normalisation du JTC1 (e.g. SC18 pour les documents,
  SC24 pour les images, et SC29 pour les photographies et les images
  animées).

  Le Plan du Projet pour SQL/MM prévoit que ce sera une norme multi-
  parties dont le nombre de parties pourra évoluer. La partie 1
  consistera en un cadre spécifiant comment les autres parties doivent
  être architecturé.  Chacune de ces autres parties sera consacrée à un
  paquetage d'application SQL spécifique. En août 1994, la structure
  existante était la suivante :


  ·  Partie 1: Cadre - Description non technique de la manière dont le
     document est structuré.

  ·  Partie 2: Méthodes pour le Texte et ADT (types de données
     abstraits) pour le traitement des textes. Environ 45 pages.

  ·  Partie 3: Méthodes Spatiales et ADT pour la gestion des données
     spatiales Environ 200 pages avec l'active contribution d'experts en
     Données Spatiales de 3 entités nationales.

  ·  Partie 4: Méthode à Usage Général et ADT pour les nombres
     complexes, et des fonctionnalités incluant la trigonométrie 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 Géographiques :


  ·  ANSI X3L1 - Systèmes d'Information Géographique.  Mark Ashworth de
     Unisys est chargé de la liaison entre X3L1 et ANSI X3H2. Il est
     également le rédacteur des parties 1, 3, and 4 du brouillon de
     SQL/MM.


  ·  ISO TC 211 - Information géographique/Géomatique.

  2255..  SSuuppppoorrtt TTeecchhnniiqquuee ppoouurr PPoossttggrreeSSQQLL

  Si vous avez des questions techniques ou si vous rencontrez des
  problèmes vous pouvez envoyer un courrier électronique à :

  ·  pgsql-questions@postgresql.org

     et vous recevrez par courrier électronique une réponse dans la
     journée qui suit.  Comme le nombre de produits internet est très
     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 téléphone car on peut
     récupérer 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 à créer une
  documentation imprimée, des guides, des livres pour aider les clients.
  Les profits seront également utilisés à construire des
  immeubles/salles de classe et à offrir des cours techniques sur
  l'administration et la gestion des bases de données et à organiser des
  conférences annuelles pour les utilisateurs.  Ceci devrait aider
  l'organisation PostgreSQL à se débrouiller toute seule.

  Vous pouvez aussi vous faire aider par des sociétés de conseil
  professionnelles telles que Anderson, WGS (Work Group Solutions). Pour
  de l'aide, puisqu'ils ont une très 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>

  2266..  AAssppeeccttss ÉÉccoonnoommiiqquueess eett CCoommmmeerrcciiaauuxx

  Les bases de données commerciales paient de nombreuses taxes telles
  que des taxes fédérales, d'état, sur les ventes, sur les salariés, la
  sécurité sociale, les taxes pour les soins médicaux, des indemnités
  pour les employés, des coûts de marketing et de publicité. Tous ces
  coûts ne sont pas destinés directement au développement de la base de
  donnée. Quand vous achetez une base de données commerciale une partie
  du montant est destiné aux taxes, aux dépenses de recherche et
  développement ( R&D ). Donc la valeur réelle pour la base de données
  est beaucoup plus faible.

  De plus les bases de données commerciales doivent payer pour leurs
  immeubles/biens et pour l'achat de machines Unix, leur installation et
  leur maintenance. Tous ces coûts sont répercutés sur les clients.

  PostgreSQL possède l'avantage, sur les bases de données commerciales,
  de ne pas supporter de taxes puisque développée sur l'internet. Un
  très grand nombre de personnes contribuent à son développement. Par
  exemple, cas hypothétique, 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
   GGRRAANNDDEE MMAAGGIIEE  du développement sur internet.

  Actuellement, le code source de PostgreSQL est constitué d'environ 200
  000 lignes de code "C" et "C++". Si le coût de chaque ligne de code
  "C" est évalué à $ 10, alors le coût total de PostgreSQL, tel qu'il
  est aujourd'hui est de $ 2 000 000 (deux millions de dollars!!).

  De nombreuses compagnies ont déjà développé de grandes quantités de
  code "C", "C++" maison. Donc, en prenant le code source de PostgreSQL
  et en collaborant avec les autres compagnies sur internet, cela leur
  bénéficierait beaucoup en leur faisant économiser du temps et des
  efforts.

  2277..  LLiissttee ddeess aauuttrree BBaasseess ddee DDoonnnnééeess

  On trouvera ci-dessous la liste des autres bases de données 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 Données <http://linas.org/linux/db.html>

  ·  Liste des Bases de Données 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 Orientés 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 Données Publics  de l'ACM SIGMOD
     <http://bunny.cs.uiuc.edu/sigmod/databaseSoftware/>

  2288..  IInnddiiccaattiioonnss ppoouurr llaa rreecchheerrcchhee ssuurr llee WWoorrlldd WWiiddee WWeebb IInntteerrnneett

  Internet est immense, recèle un très grand nombre de logiciels et un
  océan d'informations. Il s'accroît à 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
  critères de recherche. La méthode de recherche par défaut consiste en
  une "recherche intelligente" qui est plus générale et donne toutes les
  possibilités. Cliquez sur "Options" et sélectionnez la recherche par
  "EXACT phrase" , par "AND" , par "OR" , etc... De cette manière 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.

  2299..  CCoonncclluussiioonn

  Après avoir cherché toutes les bases de données 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 très attractif
  en ce que beaucoup de travail a déjà été effectué et qu'il possède des
  pilotes ODBC et JDBC permettant d'écrire des applications
  indépendantes des bases de données. Les applications écrites en
  PostgreSQL qui utilisent les pilotes ODBC, JDBC sont facilement
  portables sur d'autres systèmes tels que Oracle, Sybase et Informix et
  vice versa.

  Vous pouvez vous demander "Mais pourquoi PostgreSQL ?" La réponse à
  cela est que puisqu'il faut pas mal de temps pour développer un
  système de gestion de base de données ex nihilo, il est plus
  raisonnable d'en utiliser un qui satisfasse aux conditions suivantes -

  Un système de gestion de base de données

  ·  Dont le code source soit disponible, ce doit être un système à
     "code source ouvert"

  ·  Qui ne nécessite pas de licence, qui n'a pas de doits de propriété

  ·  Qui puisse être distribué sur internet

  ·  Qui a nécessité plusieurs années de développement.

  ·  Qui satisfasse des standards tels que ISO/ANSI SQL 92 (and SQL 89)

  ·  Qui puisse répondre aux besoins futurs telles que SQL 3 (SQL 98)

  ·  Qui possède des fonctionnalités avancées

     Et, justement, il appert que c'est 'PostgreSQL' qui répond à tous
     ces critères et que c'est un logiciel approprié dans ce cas.

  3300..  FFAAQQ -- QQuueessttiioonnss ssuurr PPoossttggrreeSSQQLL

  Veuillez vous référer à la dernière version de la FAQ pour les
  questions générales, celles concernant Linux et Irix à :

  ·  <http://www.postgresql.org/docs/faq-english.shtml>

  3311..  NNoottiiccee ddee CCooppyyrriigghhtt

  Copyright (c) 1997 Al Dev (Alavoor Vasudevan). Tous droits réservés.

  AUCUNE RESPONSABILITÉ NE SAURAIT ÊTRE RETENUE POUR DES DOMMAGES
  CONSÉCUTIFS 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, spécial, fortuit,
  consécutif, blessures directes ou indirectes pour les personnes,
  pertes financières dues au manque à gagner, à l'interruption
  d'activité, pertes d'informations commerciales  ou toutes autres
  pertes financières) résultant de l'utilisation de ce document.

  L'auteur et le traducteur n'offrent aucunes garanties sur
  l'adéquation, l'utilité ou la valeur marchande de ce document. Les
  marques, les compagnies et les noms de produits mentionnés dans ce
  document sont des marques de fabrique ou des marques déposées de leurs
  propriétaires respectifs. Veuillez vous référer aux notices de
  copyright individuelles des marques, compagnies et produits mentionnés
  dans ce document. Il est de votre responsabilité de lire et de
  comprendre les notices de copyright des
  organisations/compagnies/produits/auteurs mentionnés dans ce document
  avant d'utiliser leurs informations respectives.

  AAFF..  AAppppeennddiiccee AA -- SSyynnttaaxxee ddee ll'' AANNSSII//IISSOO SSQQLL 11999922




  Ce fichier contient la grammaire en BNF du langage, arborescence
  explorée d'abord en profondeur, réalisée le 27-AOÛT-1992 11:03:41.64.
  La version spécifique de BNF donnée 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>




  AAGG..  AAppppeennddiiccee BB -- TTuuttoorriieell SSQQLL àà ll''uussaaggee ddeess ddéébbuuttaannttss


  AAGG..11..  DDiiddaaccttiicciieell ppoouurr PPoossttggrreeSSQQLL

  Le didacticiel SQL est inclus dans la distribution de PostgreSQL.  Les
  scripts du didacticiel SQL se trouvent dans le répertoire src/tutorial

  AAGG..22..  PPooiinntteeuurrss UURRLL IInntteerrnneett

  On peut trouver le didacticiel SQL pour débutants à

  ·  <http://w3.one.net/~jhoffman/sqltut.htm>

     Pour les commentaires ou suggestions, envoyer un courrier
     électronique à

  ·  jhoffman@one.net

     John Hoffman suggère de visiter les sites suivants :

  ·  Référence 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

  ·  Ingrédients 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 données SQL
     <http://chaos.mur.csu.edu.au/itc125/cgi/sqldb.html>
  ·  Page de conception de la base de donnée RIT
     <http://www.it.rit.edu/~wjs/IT/199602/icsa720/icsa720postings.html>

  ·  Site de renvoi sur les Bases de Données
     <http://www.pcslink.com/~ej/dbweb.html>

  ·  Didacticiels de programmation sur le Web
     <http://www.eng.uc.edu/~jtilley/tutorial.html>

  ·  Ressources de développement
     <http://www.ndev.com/ndc2/support/resources.htp>

  ·  Liste de requête  <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>

  AAHH..  AAppppeennddiixx CC -- IInnssttrruuccttiioonnss ppoouurr uunnee iinnssttaallllaattiioonn rraappiiddee ddee LLiinnuuxx

  Si vous envisagez d'utiliser PostgreSQL sous Linux, et avez besoin
  d'aide dans l'installation de Linux, consultez les pointeurs donnés
  dans cette annexe.  Ils couvrent les sujets suivants :

  ·  Fonctionnalités saillantes de Linux - Pourquoi Linux constitue un
     meilleur serveur de données 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

  11..  IInnttrroodduuccttiioonn

  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)

  11..11..  HHiissttoorriiqquuee

  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.

  11..22..  CCooppyyrriigghhtt

  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>.

  22..  QQuu''eesstt--ccee qquuee ll''iimmpprreessssiioonn ssoouuss UUNNIIXX ??

  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 ffiillee.  On  dit  que   les
  travaux  sont   dans     la ffiillee  dd''iimmpprreessssiioonn.      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.

  33..  CCoommmmeenntt IImmpprriimmeerr

  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.

  33..11..  LLeess ppeerriipphheerriiqquueess dd''iimmpprriimmaanntteess ddaannss llee ssyysstteemmee

  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.

  33..22..  LLee ppeerriipphheerriiqquuee llpp

  33..22..11..  NNooyyaauuxx aanntteerriieeuurrss aa 22..11..3322

  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.

  33..22..22..  ppaarrppoorrtt..  NNooyyaauuxx  ppoosstteerriieeuurrss   aa 22..11..3322:: llee ppeerriipphheerriiqquuee

  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

  33..33..  LLeess ppeerriipphheerriiqquueess sseerriiee

  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.

  44..  LLeess iimmpprriimmaanntteess ssuuppppoorrtteeeess

  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

  55..  QQuueell ddeemmoonn dd''iimmpprreessssiioonn ??

  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/.

  66..  LL''iimmpprreessssiioonn,, ccoommmmeenntt ccaa mmaarrcchhee

  Nous  considerons  ici  que  vous utilisez la suite logicielle lpd que
  nous decrirons  d'ailleurs. Elle est  la plus repandue  et  fonctionne
  tres bien.

  66..11..  IImmpprreessssiioonn llooccaallee eett iimmpprreessssiioonn ddiissttaannttee

  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.

  66..22..  DDee qquuooii aavveezz vvoouuss bbeessooiinn

  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 :-)).

  66..33..  LLeess pprrooggrraammmmeess iimmppoorrttaannttss

  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 ?)
            ...

  66..33..11..  LLee cclliieenntt eett llee sseerrvveeuurr

  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.

  66..33..22..  LLeess ffiicchhiieerrss ssoouummiiss ppaarr llee cclliieenntt

  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.

  66..33..33..  LLaa ccoommmmaannddee llpprr

  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.

  66..33..44..  LLaa ccoommmmaannddee llppqq

  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).

  66..33..55..  LLaa ccoommmmaannddee llpprrmm

  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).

  66..33..66..  LLaa ccoommmmaannddee llppcc

  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).

  66..44..  LLeess rreeppeerrttooiirreess iimmppoorrttaannttss

  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.

  66..55..  LLeess ffiicchhiieerrss iimmppoorrttaannttss

  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.

  77..  CCoonnffiigguurreerr lleess sseerrvviicceess dd''iimmpprreessssiioonn

  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.

  77..11..  LLee ffiicchhiieerr //eettcc//pprriinnttccaapp

  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)

  77..11..11..  DDeettaaiillss ssuurr llee cchhaammpp llpp

  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.

  77..11..22..  DDeettaaiillss ssuurr llee cchhaammpp llff

  Tout     fichier  specifie   ici   doit  exister,   sinon  le  rapport
  d'erreurs ne se ferait pas.

  77..11..33..  DDeettaaiillss ssuurr llee cchhaammpp iiff

  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.

  77..11..44..  DDeettaaiillss ssuurr lleess cchhaammppss rrmm eett rrpp

  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.

  77..11..55..  DDeettaaiillss ssuurr lleess cchhaammppss sshh eett ssff

  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.

  77..11..66..  DDeettaaiill ssuurr llee cchhaammpp mmxx

  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.

  88..  LLeess ffiillttrreess

  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.

  99..  LLeess ffiicchhiieerrss,, lleeuurr eemmppllaacceemmeenntt eett lleess ddrrooiittss dd''aacccceess

  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.

  1100..  OOuu ttrroouuvveerr ddeess ffiillttrreess dd''iimmpprreessssiioonn ??

  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.

  1100..11..  LLeess ffiillttrreess mmaaggiiqquueess

  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

  1100..22..  LLeess ffiillttrreess AAPPSS

       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.

  1100..33..  LLeess ffiillttrreess EEZZ--mmaaggiicc

  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.

  1111..  LLeess llooggiicciieellss dd''iimmpprreessssiioonn

  Les    logiciels   d'impression  sont    disponibles   en  France  par
  exemple sur ftp://ftp.lip6.fr/pub/linux/sunsite/system/Printing.

  1111..11..  GGhhoossttSSccrriipptt

  _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.

  1111..11..11..  UUttiilliisseerr GGhhoossttSSccrriipptt

  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

  1111..11..22..  RReeggllaaggeess

  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)

  1111..11..33..  GGaammmmaa,, ttaaiilllleess ddee ppooiinnttss,, ......

  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).

  1122..  LL''iimmpprreessssiioonn aa ddiissttaannccee

  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.
  1122..11..  VVeerrss uunn hhoottee UUnniixx//llppdd

  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.

  1122..11..11..  AAvveecc llppdd

  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.

  1122..11..22..  AAvveecc rrllpprr

  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.

  1122..22..  LLaannMMaannaaggeerr oouu SSaammbbaa..  IImmpprriimmeerr vveerrss  uunnee  iimmpprriimmaannttee   aattttaacchheeee
  aa   WWiinnddoowwss  9955,, NNTT,,

  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.

  1122..33..  VVeerrss uunnee iimmpprriimmaannttee NNeettWWaarree

  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 NNEE fonctionne   PPAASS  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 -

  1122..44..  VVeerrss uunnee iimmpprriimmaannttee EEtthheerrTTaallkk

  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.

  1122..55..  VVeerrss uunnee iimmpprriimmaannttee HHPP oouu aauuttrree iimmpprriimmaannttee EEtthheerrnneett

  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.

  1122..66..  VVeerrss dd''aanncciieennnneess HHPP

  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;
       }

  1122..77..  LLeess ffiillttrreess dd''eennttrreeee ppoouurr ddeess iimmpprriimmaanntteess ddiissttaanntteess

  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.

  1122..88..  IImmpprriimmeerr ddeeppuuiiss WWiinnddoowwss

  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.

  1122..99..  DDeeppuuiiss NNeettwwaarree

  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.

  1122..1100..  DDeeppuuiiss uunn AAppppllee

  Netatalk permet d'imprimer depuis une  station  Apple  sur  EtherTalk.
  Voir le Netatalk   HOWTO (http://thehamptons.com/anders/netatalk) pour
  de plus amples renseignements.

  1122..1111..  IImmpprriimmeerr vveerrss uunn ffaaxx

  1122..1111..11..  UUttiilliisseerr uunn mmooddeemm//ffaaxx

  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)

  1122..1111..22..  UUttiilliisseerr llee sseerrvviiccee dd''iimmpprreessssiioonn ddiissttaanntt

  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/).

  1133..  LLeess llooggiicciieellss qquuii ppeerrmmeetttteenntt ddee rreeaalliisseerr ddee bbeelllleess iimmpprreessssiioonnss

  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:

  1133..11..  LLeess llaannggaaggeess aa bbaalliisseess

  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.

  1133..11..11..  nnrrooffff

  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.

  1133..11..22..  TTeeXX

  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.

  1133..11..33..  SSGGMMLL

  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.

  1133..11..44..  HHTTMMLL

  Bien connu, il permet d'ecrire des documents simples.

  1133..22..  TTrraaiitteemmeennttss ddee tteexxtteess WWYYSSIIWWYYGG

  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.

  1133..22..11..  SSttaarrOOffffiiccee

  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.

  1133..22..22..  LLyyXX

  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.

  1133..22..33..  LL''iinntteerrffaaccee uuttiilliissaatteeuurr ''AAnnddrreeww''

  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).

  1133..22..44..  OOffffrreess ccoommmmeerrcciiaalleess

  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.

  1144..  LLooggiicciieellss ddee pprree--vviissuuaalliissaattiioonn

  Tout ce que vous imprimez peut etre  egalement  visualise  a  l'ecran.
  Ceci permet  dans bien des cas d'economiser du papier.

  1144..11..  PPoossttSSccrriipptt

  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.

  1144..22..  TTeeXX ddvvii

  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.

  1144..33..  AAddoobbee PPDDFF

  _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.

  1155..  LLeess iimmpprriimmaanntteess sseerriiee

  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.

  1155..11..  IImmpprriimmaanntteess aanncciieennnneess eett ccaarraacctteerreess ppeerrdduuss

  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).

  1166..  CCoommpplleemmeennttss eett rreeggllaaggeess

  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.

  1177..  RReessuummee

  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

  1188..  PPrroobblleemmeess aavveecc llaa LLaasseerrJJeett 55MM

  1188..11..  PPoossttSSccrriipptt

  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

  1188..22..  RReeccttoo--vveerrssoo

  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

  1199..  IInnffoorrmmaattiioonnss ccoonncceerrnnaanntt ccee ddooccuummeenntt

  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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  HHiissttoorriiqquuee dduu PPrriinnttiinngg HHOOWWTTOO

  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.

  11..22..  HHiissttoorriiqquuee ddeess vveerrssiioonnss

  +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

  11..33..  CCooppyyrriigghhttss eett MMaarrqquueess ddeeppoosseeeess

  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.

  11..44..  TTeelleecchhaarrggeerr lleess HHOOWWTTOOss LLiinnuuxx ssuurr ll''iimmpprreessssiioonn

  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).

  11..55..  CCoommmmeenntt nnoouuss ccoonnttaacctteerr

  Les questions, commentaires ou corrections concernant ce HOWTO peuvent
  etre envoyes a  markk@auratek.com.
  11..66..  RReemmeerrcciieemmeennttss

  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.

  22..  IImmpprriimmeerr ssoouuss LLiinnuuxx

  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.

  22..11..  HHiissttoorriiqquuee ddee ll''iimmpprreessssiioonn ssoouuss LLiinnuuxx

  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.

  22..22..  IImmpprriimmeerr uunn ffiicchhiieerr eenn uuttiilliissaanntt llpprr

  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).

  22..33..  VVooiirr llaa ffiillee dd''iimmpprreessssiioonn aavveecc llppqq

  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
       ______________________________________________________________________

  22..44..  AAnnnnuulleerr uunn ttrraavvaaiill dd''iimmpprreessssiioonn eenn uuttiilliissaanntt llpprrmm

  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.

  22..55..  CCoonnttrroolleerr llee pprrooggrraammmmee llppdd aavveecc llppcc..

  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

  22..66..  LLee pprrooggrraammmmee pprriinnttttooooll ssoouuss RReeddHHaatt..

  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.

  33..  IImmpprriimmeerr ddeess ffiicchhiieerrss

  Cette section de l'impression des types de  fichiers  que  vous  allez
  rencontrer dans une configuration Linux.

  33..11..  IImmpprreessssiioonn ddeess ffiicchhiieerrss ggrraapphhiiqquueess

  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.

  33..22..  IImmpprreessssiioonn ddeess ffiicchhiieerrss PPoossttSSccrriipptt

  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.

  33..33..  IImmpprreessssiioonn ddeess ffiicchhiieerrss PPDDFF

  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.

  33..44..  IImmpprreessssiioonn ddeess ffiicchhiieerrss TTeeXX

  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.

  33..55..  IImmpprreessssiioonn ddeess ffiicchhiieerrss ffoorrmmaatteess aapprreess ttrrooffff

       ______________________________________________________________________
       $ 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.

  33..66..  IImmpprreessssiioonn ddeess ppaaggeess mmaann

       ______________________________________________________________________
       $ 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.

  44..  DDiivveerrss

  Cette section couvre les sujets qui n'avaient pas leur place ailleurs.

  44..11..  FFoorrmmaattaaggee aavvaanntt iimmpprreessssiioonn

  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.

  44..22..  LLeess vvaarriiaabblleess dd''eennvviirroonnnneemmeenntt PPRRIINNTTEERR

  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.

  55..  FFooiirree AAuuxx QQuueessttiioonnss

  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.

  66..  DDeeppaannnnaaggee

  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.

  77..  RReeffeerreenncceess

  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 Française : Eric MAISONOBE
  viret@nat.fr
  v1.0.1.14, 30 Août 1998

  Ce document explique comment installer, exécuter et régler les
  problèmes liés à Quake, QuakeWorld et Quake II sur un système Linux
  Intel.
  ______________________________________________________________________

  Table des matières























































  1. Introduction

     1.1 Retour d'informations, Commentaires, Corrections
     1.2 Remerciements **
     1.3 Autres Sources d'Information
        1.3.1 Informations Spécifiques à Quake Linux **
        1.3.2 Information Générales 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 Téléchargement des fichiers nécessaires
        2.2.2 Création du répertoire 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 spécifiques à Linux
     2.9 QuakeWorld **
        2.9.1 Installation des paquetages RPM ++
        2.9.2 Installation des paquetages tar.gz ++
        2.9.3 Exécution 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 Prérequis
     3.2 Installation de Quake II
        3.2.1 Téléchargement des Fichiers nécessaires
        3.2.2 Création du répertoire 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 démonstration **
     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 interpréteurs X
     3.6 L'interpréteur SVGAlib
     3.7 L'interpréteur OpenGL
        3.7.1 SVGAlib
        3.7.2 Glide
        3.7.3 Mesa
        3.7.4 lib3dfxgl.so
     3.8 L'interpréteur GLX
     3.9 Commandes d'options en ligne spécifiques à Linux
     3.10 Serveurs Quake II
        3.10.1 Serveurs d'accueil
        3.10.2 Serveurs dédiés
        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 apparentés

     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. Problèmes/FAQs

     5.1 Général
        5.1.1 Considérations sur différents OS
        5.1.2 Considérations relatives à Glibc, RedHat 5.x et Debian 2
        5.1.3 Ma souris ne fonctionne pas ou semble répondre aléatoirement.
        5.1.4 Ma souris Microsoft Intellimouse ou Logitech MouseMan+ ne fonctionne pas correctement.
        5.1.5 Ma souris se traîne et semble beaucoup plus lente que sous Windows.
        5.1.6 Je possède une carte Voodoo2 et, lorsque je tente une mise en route avec l'interpréteur gl, il m'affirme que je n'ai pas de carte Voodoo installée.
        5.1.7 Lorsque je joue à l'un des jeux Quake sous SVGAlib ou GL et que je presse CTRL-C, le jeu s'arrête et quelquefois me laisse la console dans un état inutilisable.
        5.1.8 Quelquefois lorsque Quake/Quake II se termine de façon anormale, il me laisse la console dans un état inutilisable.
        5.1.9 squake/quake2 refuse de démarrer et avertit "
        5.1.10 Quelquefois, après avoir joué à l'un des jeux Quake sous X, la répétition 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'exécutent plus lentement sous Linux que sous Windows. **
        5.1.13 Comment puis-je démarrer un serveur et me déconnecter, puis y revenir ultérieurement? **
     5.2 Quake/QuakeWorld
        5.2.1 Quake meurt au démarrage avec une "segmentation fault".
        5.2.2 Quelle est la différence entre
        5.2.3 Quand je lance
     5.3 Quake II
        5.3.1 Quand j'essaie de lancer Quake II avec l'interpréteur 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'interpréteur 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 présents dans le menu Vidéo de Quake II? **

  6. Trucs et Astuces

     6.1 Exécution de jeux X et GL sans setuid
     6.2 Lancement des jeux SVGA et GL depuis X
     6.3 Conserver la souris à l'intérieur de la fenêtre sous X
     6.4 Le paramétrage "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 révisions


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Quake, QuakeWorld et Quake II sont de formidables jeux d'action 3D
  développés par id Software.

  Si vous n'êtes pas familier avec les jeux Quake, il existe de
  meilleurs documents que ce HOWTO pour en appréhender les bases.
  Reportez-vous à la section ``Autres Sources d'Information'' ci-dessous
  pour en obtenir une liste.

  Ce document présuppose que vous avez Linux installé et éventuellement
  également le système X Window. X n'est pas nécessaire 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 références qui y font appel.

  Les sections de ce document qui ont été modifiées lors de la dernière
  mise à jour ont un ** après l'entête de la section. De la même
  manière, les sections modifiées lors de mises à jour antérieures sont
  reconnaissables par ++.


  11..11..  RReettoouurr dd''iinnffoorrmmaattiioonnss,, CCoommmmeennttaaiirreess,, CCoorrrreeccttiioonnss


  Ce document ne contient certainement ppaass tout ce qu'il y a à connaître
  de Quake Linux.  Avec votre aide, cependant, nous pourrons nous en
  rapprocher.  Nous voulons que ce document soit aussi complet et précis
  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.



  11..22..  RReemmeerrcciieemmeennttss ****

  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 réécrit 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 célèbres 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-bête -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 sécurité.

  ·  Michael Dwyer (michael_dwyer@mwiworks.com) pour ses idées sur les
     considérations relatives à d'autres l'OS.

  ·  Derek Simkowiak (dereks@kd-dev.com) pour la procédure
     d'installation de Quake I.

  ·  sunstorm (sunstorm@glasscity.net) pour les informations sur le 2ème
     pack de Missions Quake.

  ·  Neil Marshall (marshall@pssnet.com) pour les écrans d'information.


  11..33..  AAuuttrreess SSoouurrcceess dd''IInnffoorrmmaattiioonn



  11..33..11..  IInnffoorrmmaattiioonnss SSppéécciiffiiqquueess àà QQuuaakkee LLiinnuuxx ****


  ·  LQ:Linux Quake & Utilites http://www.linuxquake.com/.

  ·  Linux Quake Page http://captured.com/threewave/linux/

  ·  QuakeWorld.net http://www.quakeworld.net


  11..33..22..  IInnffoorrmmaattiioonn GGéénnéérraalleess ssuurr QQuuaakkee


  ·  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.*




  11..33..33..  IInnffoorrmmaattiioonnss ssuurr lleess JJeeuuxx LLiinnuuxx


  ·  LinuxGames http://www.linuxgames.com/

  ·  The Linux Game Tome
     http://www.cs.washington.edu/homes/tlau/tome/linux-game.html


  22..  QQuuaakkee//QQuuaakkeewwoorrlldd

  Pour installer Quake sur votre système 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
  détaillant favori ou la version shareware téléchargée sur Internet
  (reportez-vous ``ci-dessous'' pour plus de détails sur la manière
  d'acquérir la version shareware).

  Ou bien, si vous avez déjà Quake installé sur une machine DOS/Windows,
  vous pouvez utiliser les fichiers provenant de cette installation.


  22..11..  CCoonnffiigguurraattiioonn MMiinniimmaallee

  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 oouu la version shareware (quake106.zip)

  ·  Un noyau Linux version 2.0.24 ou supérieure

  ·  libc 5.2.18 ou supérieure

  ·  Au choix :

  ·  X11R5 ou supérieur (pour xquake)

  ·  SVGAlib 1.2.0 ou supérieure (pour squake et glquake)

  ·  30-80 megabytes d'espace disque libre (dépend de votre
     installation)

  ·  L'accès root sur la machine devant recevoir l'installation


  En Option:

  ·  Une carte son supportée

  ·  Une carte accélératrice 3Dfx VooDoo Graphics ou VooDoo2

  ·  Mesa 2.6 ou supérieur (pour glquake)


  22..22..  IInnssttaallllaattiioonn ddee QQuuaakkee



  22..22..11..  TTéélléécchhaarrggeemmeenntt ddeess ffiicchhiieerrss nnéécceessssaaiirreess****

  Tous les fichiers nécessaires pour Quake Linux sont disponibles sur le
  site ftp d'id Software, ftp.idsoftware.com. Ce site pouvant être très
  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 mentionnés 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 mentionnés:

  ·  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



  22..22..22..  CCrrééaattiioonn dduu rrééppeerrttooiirree dd''iinnssttaallllaattiioonn ++++

  La première chose que vous avez à faire est de décider où vous
  souhaitez installer Quake.  Beaucoup l'installent dans
  /usr/games/quake.  L'administrateur système que je suis a choisi
  d'installer tout ce qui n'est pas partie intégrante 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é.


  RReemmaarrqquuee aauuxx uuttiilliissaatteeuurrss ddee RReeddhhaatt:: 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 répertoire par défaut.

  Bien! Maintenant, créons le répertoire dans lequel nous allons
  installer Quake, et déplaçons-nous dedans (les instructions suivantes
  partent du principe que c'est notre répertoire courant).




       mkdir /usr/local/games/quake
       cd /usr/local/games/quake





  22..22..33..  IInnssttaallllaattiioonn ddee QQuuaakkee ddeeppuuiiss uunn CCDD ++++

  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 possédez la version
  1.01 si vous avez des fichiers appelés quake101.1 et quake101.2. Si
  vous trouvez un fichier appelé resource.1, vous avez la version la
  plus récente.  Montez votre CD Quake et déterminez quelle version vous
  possédez. Dans l'exemple ci-dessous, remplacez /dev/cdrom et
  /mnt/cdrom par le fichier et le point de montage appropriés à votre
  système:


  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
     télécharger le paquetage shareware Quake pour mettre à jour les
     fichiers .pak après l'installation. Le dernier point de cette
     section détaille cela.


  ·  Concaténons 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
     référence à /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 déjà installé sur
     votre système, 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 répertoire Quake contiendra bon nombre
  de fichiers nouveaux.  Un répertoire appelé id1/ aura également été
  créé. Les fichiers de ce répertoire sont les seuls importants pour
  Quake Linux, aussi vous pouvez sans crainte supprimer tout les autres.
  Si vous êtes totalement nouveau dans Quake, ou même si vous ne l'êtes
  pas, vous pouvez souhaiter conserver les fichiers *.txt. Sur mon
  système, je rassemble tous les "readme" dans un répertoire 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 décrit dans ``Installation de la Version Shareware'', en
     effectuant cette installation dans un répertoire temporaire afin de
     ne pas écraser vos fichiers CD. Lorsque vous avez extrait tous les
     fichiers shareware, copiez le fichier id1/pak0.pak du répertoire
     temporaire shareware dans votre répertoire
     /usr/local/games/quake/id1. Après 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''.


  22..22..44..  IInnssttaallllaattiioonn ssoouuss LLiinnuuxx ddeeppuuiiss DDOOSS//WWiinnddoowwss

  Si vous avez Quake installé sous Windows ou DOS sur une machine
  différente, vous pouvez transférer les fichiers dans quake\id1\ sur
  votre système 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 après le transfert. Notez également qu'il peut être ensuite
  nécessaire de supprimer votre installation sous DOS/Win afin de rester
  en règle avec les termes de la licence consentie par ID SOFTWARE. Ce
  ne sera pas ma faute si vous faites quelque chose d'illégal.

  Si vos systèmes DOS/Win et Linux sont sur la même machine, vous avez
  deux possibilités: copier les fichiers de votre partition DOS/Windows
  sur votre partition Linux, ou créer des liens sur les fichiers
  nécessaires sous Linux. Les deux options fonctionnent aussi bien. Vous
  économisez simplement à peu près 50 megaoctets d'espace disque quand
  vous créez des liens au lieu de copier.

  Quoi que vous choisissiez de faire, commencez par vous déplacer dans
  votre répertoire Quake et créez un nouveau répertoire appelé id1:



       cd /usr/local/games/quake
       mkdir id1





  ·  Si vous préférez copier les fichiers de votre partition
     DOS/Windows, faites quelque chose de ce genre:



       cp /win95/games/quake/id1/*.pak id1





  ·  Pour créer 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 répertoire d'installation Quake.

  Les fichiers de données Quake sont maintenant installés. Passez à
  l'``Installation des Binaires Linux''.




  22..22..55..  IInnssttaallllaattiioonn ddee llaa VVeerrssiioonn SShhaarreewwaarree

  L'unique épisode de la version shareware de Quake est gratuitement
  disponible au téléchargement sur le site ftp de ID SOFTWARE. Il a
  toutes les fonctionnalités de la version complète, 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 très
  différente de l'installation à partir du CD.


  Voyez la section ``Téléchargement des fichiers nécessaires'' pour
  trouver les références de la distribution shareware.  Téléchargez-la
  et décompressez-la dans votre répertoire 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 llhhaa((11))
  pour l'extraction.

  Si lha n'est pas déjà installé sur votre système, 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 répertoire Quake contiendra bon nombre
  de fichiers nouveaux. Un répertoire appelé id1/ aura également été
  créé.  Les fichiers de ce répertoire sont les seuls importants pour
  Quake Linux, aussi vous pouvez sans crainte supprimer tous les autres.
  Si vous êtes totalement nouveau dans Quake, ou même si vous ne l'êtes
  pas, vous pouvez souhaiter conserver les fichiers*.txt. Sur mon
  système, je rassemble tous les "readme" dans une répertoire doc/. Pour
  ce faire :



       cd /usr/local/games/quake
       mkdir doc
       mv *.txt doc
       rm -f *


  Maintenant vous êtes prêt à installer les binaires Linux.




  22..33..  AAjjoouutt ddeess BBiinnaaiirreess LLiinnuuxx

  Décidez lequel des trois composants de Quake vous souhaitez installer:


  ·  X11 Quake vous permet d'exécuter Quake dans une fenêtre de votre
     bureau X.  C'est le client le moins excitant, mais c'est une bonne
     et sûre manière de tester votre installation.

  ·  Squake est le client Quake SVGAlib. Il s'exécute en plein écran sur
     votre console.

  ·  GLQuake est le client Quake OpenGL, la Seule Vraie Manière de jouer
     à Quake si vous possédez une carte accélératrice 3Dfx.

  Téléchargez les paquetages que vous souhaitez (reportez-vous à la
  section``Téléchargement des fichiers Nécessaires'') et extrayez-les
  dans votre répertoire Quake de ce façon:



       cd /usr/local/games/quake
       tar -xzf XXXX-i386-unknown-linux2.0.tar.gz





  22..44..  MMiissee eenn ppllaaccee ddeess PPeerrmmiissssiioonnss

  Les serveurs de Quake et QuakeWorld peuvent être exécutés par
  n'importe quel utilisateur. Les clients Quake, de toute façon, ont
  besoin d'accéder à vos cartes son et graphique, ce qui requiert des
  privilèges que les utilisateurs normaux n'ont pas. Une (mauvaise)
  façon de contourner le problème est de toujours lancer Quake en tant
  que root. Tout Administrateur Système 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'exécution par des
  joueurs n'étant pas root).  Quake peut alors être exécuté par un
  utilisateur normal et a toujours les privilèges nécessaires aux accès
  son et graphique.  Setuid présente cependant un risque de sécurité. Un
  utilisateur astucieux peut exploiter un bug ou un trou de sécurité
  dans Quake pour parvenir à un accès root sur votre système. Bien sûr,
  si vous n'exécutez pas de session multi-utilisateur, cela peut ne pas
  être une grosse préoccupation..

  squake est le seul client Quake qui _d_o_i_t être exécuté avec les
  permissions root. Avec un peu de travail, vous pouvez exécuter les
  clients X et GL sans setuid. ``Exécuter les jeux X et GL sans
  setuid'', dans la section Trucs et Astuces, vous expliquera comment
  faire.

  Si vous projetez de d'exécuter squake, rendez-le setuid root avec les
  commandes suivantes :



       chown root squake
       chmod 4755 squake

  Si vous décidez d'exécuter quake.x11 et glquake setuid root sur votre
  système, vous pouvez répéter ces commandes sur ces binaires.



  22..55..  XX1111 QQuuaakkee

  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 prêt à s'exécuter.



       cd /usr/local/games/quake
       ./quake.x11




  Si tout fonctionne, une petite fenêtre Quake doit apparaître avec la
  première démo 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 ``Problèmes''.


  22..66..  QQuuaakkee SSVVGGAAlliibb

  Squake et glquake nécessitent SVGAlib pour s'exécuter. (glquake
  utilise SVGAlib pour traiter les entrées clavier et souris, si cela
  vous surprend). SVGAlib est fournie avec les distributions de Linux
  les plus modernes et ddooiitt être correctement configurée pour que squake
  ou glquake fonctionnent convenablement.

  libvga.config est le fichier de configuration de SVGAlib. Sur la
  plupart des systèmes, vous le trouverez dans /etc ou /etc/vga.  Soyez
  certain que les paramètrages de la souris, du moniteur et de la carte
  vidéo contenus dans ce fichier sont corrects pour votre système.
  Reportez-vous à la documentation de SVGAlib pour plus de détails.

  Si vous n'avez pas encore SVGAlib installé, téléchargez le depuis le
  site mentionné dans la ``Section fichiers'' ci-dessous.  Si vous
  possédez une Redhat 5.x, ou une autre distribution basée sur la glibc,
  référez-vous à ``Considérations relatives à Glibc, RedHat 5.x et
  Debian 2'', dans la section Problèmes/FAQs, pour d'importantes
  recommandations sur la compilation des librairies à utiliser avec
  Quake. Une librairie binaire "libc5 SVGAlib" précompilée 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.


  22..77..  GGLLQQuuaakkee

  L'utilisation de tout matériel accélérateur ouvre la Voie Royale de
  Quake.  Rien ne peut le remplacer, et l'essayer c'est l'adopter.

  Pour exécuter glquake, vous avez besoin d'une carte graphique 3D avec
  chipset Voodoo, Voodoo2 ou Voodoo Rush. Il y a des points particuliers
  à respecter pour déclarer une carte Voodoo Rush, et je ne peux les
  développer 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'intégrer ses explications).

  Les librairies SVGAlib, Glide, et Mesa doivent être correctement
  installées et configurées pour que glquake fonctionne. Les sections
  suivantes vous expliqueront brièvement 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 complète.

  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.


  22..77..11..  SSVVGGAAlliibb

  glquake utilise SVGAlib pour gérer la souris et le clavier, aussi vous
  devrez le configurer comme il est précisé dans la section `` Quake
  SVGAlib''.


  22..77..22..  GGlliiddee

  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 dernière
  version de glide peut être trouvée sur
  http://glide.xxedgexx.com/3DfxRPMS.html. Choisissez le(s) paquetage(s)
  approprié(s) à votre système, et installez-le(s) en vous reportant aux
  instructions de la page web.

  Notez bien que tant que vous n'aurez pas téléchargé 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é, exécutez le programme de test fourni.
  Souvenez-vous que ce programme est une bonne solution pour
  réinitialiser votre affichage si une application glide plante et
  éteint votre écran. NNOOTTAA:: llaanncceezz ccee tteesstt dd''uunnee ccoonnssoollee vviirrttuueellllee,, _p_a_s
  ddeeppuuiiss XX!! Il est possible que cette application test perde le contrôle
  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 pressée, vous retournerez au prompt.
  3dfx.glide.linux sur le serveur de news 3dfx (news.3dfx.com) est une
  bonne source d'information pour les problèmes spécifiques à glide sous
  Linux.


  22..77..33..  MMeessaa

  Une fois glide installé, vous aurez besoin d'installer Mesa, l'OpenGL
  libre réalisé 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 récente de Mesa (Mesa 3.0 est lors
  de la rédaction de ce document la plus récente) visitez le site
  ftp://iris.ssec.wisc.edu/pub/Mesa.  Si vous avez une distribution
  RedHat 5.x ou une autre distribution basée sur glibc, reportez-vous
  aux ``Considérations relatives à Glibc, RedHat 5.x et Debian 2'', dans
  la section Problèmes/FAQs, pour d'importantes recommandations sur la
  compilation des librairies à utiliser avec Quake.

  Après une compilation conforme à ces instructions, vous avez deux
  choses à faire:


  ·  Supprimer votre ancienne installation Mesa. Si vous avez
     préalablement installé libMesaGL.so.2.6 comme décrit 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 numéro majeur de version supérieur à 2,
     vous devrez créer 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 lançons
  glquake.

       cd /usr/local/games/quake
       ./glquake





  22..88..  CCoommmmaannddeess dd''ooppttiioonnss eenn lliiggnnee ssppéécciiffiiqquueess àà LLiinnuuxx

  Cette section rassemble les commandes en ligne qui sont spécifiques
  aux versions Linux de Quake. Il existe beaucoup d'autres options, mais
  elles dépassent le cadre de cet HOWTO. Recherchez ce genre
  d'information sur les sites listés dans la section ``Informations
  Générales sur Quake''.


     --mmeemm _n_u_m
        Spécifie la mémoire à allouer en megaoctets (par défaut 8Mo, ce
        qui doit être suffisant dans la plupart des cas).


     --nnoossttddoouutt
        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.


     --mmddeevv _d_e_v_i_c_e
        Le fichier système de la souris, par défaut /dev/mouse


     --mmrraattee _s_p_e_e_d
        La fréquence, en bauds, de la souris, par défaut 1200.


     --ccddddeevv _d_e_v_i_c_e
        Le fichier système du CD, par défaut /dev/cdrom.


     --mmooddee _n_u_m
        Utilise le mode vidéo indiqué (squake uniquement).


     --nnookkddbb
        N'initialise pas le clavier.


     --ssnnddbbiittss _8 _o_r _1_6
        Définit la taille de l'échantillon sonore en bits. La valeur par
        défaut est 16 si cela est supporté.


     --ssnnddssppeeeedd _s_p_e_e_d
        Définit la fréquence sonore. Les valeur usuelles sont 8000,
        11025, 22051 ou 44100. La valeur par défaut est 11025.


     --ssnnddmmoonnoo
        Positionne le mode son en mono.


     --ssnnddsstteerreeoo
        Positionne le mode son en stéréo (par défaut s'il est supporté).



  22..99..  QQuuaakkeeWWoorrlldd ****

  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
       symptômes comme un retard excessif (des actions réalisées
       bien après qu'elles aient été initiées), des pertes de
       paquets (le jeu se bloquait et repartait quelques secondes
       plus tard), et diverses autres difficultés harcelaient les
       utilisateurs. Après 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 décida de créer une version de Quake
       optimisée pour le modem moyen d'un joueur internaute. Cette
       version Internet spécifique ne fait qu'une chose, exécuter
       au mieux le jeu sur un réseau 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 spécial.


  Vous avez besoin de la version complète, déclarée ou achetée, 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 rassemblés dans un seul paquetage,
  aussi vous n'avez à télécharger 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 mêmes
  fichiers, ils sont simplement liés à des librairies différentes. Les
  utilisateurs de Redhat 5.x choisiront le paquetage rpm glibc. Les
  utilisateurs de systèmes basés sur glibc sans support rpm choisiront
  le paquetage glibc tar. Le rpm libc5 est réservé au distributions
  Redhat antérieures à 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 ``Téléchargement des Fichiers Nécessaires'' pour
  trouver l'adresse des fichiers Quakeworld pour Linux.

  Les prérequis et la méthode de configuration de ces binaires sont les
  mêmes que ceux de Quake, aussi référez-vous aux section précédentes
  détaillant la configuration de SVGAlib ou de glide/Mesa.



  22..99..11..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess RRPPMM ++++

  L'installation des paquetages rpm est aussi simple que ceci:




  su root
  rpm -Uvh qwcl-xxxxx.i386.rpm




  qwcl, glqwcl et glqwcl.glx seront installés setuid root pour pouvoir
  accéder aux périphériques graphiques de votre système.  Les clients X
  et GL peuvent être lancés sans les privilèges root si vous suivez les
  instructions ``Exécuter des jeux X et GL sans setuid'' ci-dessous.

  Rpm peut se plaindre de ne pas trouver libglide2x.so. La librairie
  Glide est uniquement nécessaire si vous possédez une carte 3Dfx et
  souhaitez lancer QuakeWorld en mode GL (glqwcl). Si vous ne prévoyez
  pas d'utiliser le mode GL, vous pouvez passer outre les dépendances de
  glide avec l'option --nodeps:



       su root
       rpm -Uvh qwcl-xxxxx.i386.rpm --nodeps





  22..99..22..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess ttaarr..ggzz ++++

  Il suffit de "détarer" le fichier dans votre répertoire Quake.
  Effectuez cette opération en tant que root, et les permissions
  convenables seront conservées:



       cd /usr/local/games/quake
       su root
       tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz




  qwcl, glqwcl et glqwcl.glx seront installés setuid root et pourront
  donc accéder aux périphériques graphiques de votre système.  Les
  clients X et GL peuvent être lancés sans les privilèges root si vous
  suivez les instructions ``Exécuter des jeux X et GL sans setuid'' ci-
  dessous.


  22..99..33..  EExxééccuuttiioonn ddee QQuuaakkeeWWoorrlldd ++++

  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 apparentés'' pour trouver de
  l'information sur quelques formidables interfaces pour QuakeWorld qui
  rendent facile la localisation de serveurs.



  ·  lliibb33ddffxxggll..ssoo  **

     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 rafraîchissement légèrement meilleur que
     celui de Mesa. Il s'agit du portage d'un driver que 3Dfx a
     développé pour Quake sous Windows, et apparemment toutes ses
     possibilités ne fonctionnent pas correctement. Nous comptons bien
     que ses performances s'amélioreront avec le temps.

     Comme Mesa, lib3dfxgl.so nécessite Glide pour accéder à votre carte
     3Dfx. Le paquetage QuakeWorld est fourni avec un script,
     glqwcl.3dfxgl permettant de lancer Quakeworld avec sa librairie sur
     les systèmes glibc. Le paragraphe suivant explique comment lancer
     Quakeworld avec lib3dfxgl.so sur un système libc5. Sur un système
     glibc, pour que ce script fonctionne, l'exécutable glqwcl nnee ddooiitt
     ppaass êêttrree sseettuuiidd, et vous ne devez pas le lancer en tant que root.
     glqwcl chargera silencieusement Mesa au lieu de lib3dfxgl.so si il
     est exécuté avec les permissions root. Cette non-nécessité d'être
     root suppose que vous ayez le driver /dev/3dfx installé.

     Sur un système libc5, vous devrez créer un lien symbolique sur
     lib3dfxgl.so appelé libMesaGL.so.2 de cette façon:



       cd /usr/local/games/quake
       ln -sf lib3dfxgl.so libMesaGL.so.2




  Puis lancez Quakeworld depuis un script assignant le répertoire
  courant à $LD_LIBRARY_PATH :


  ______________________________________________________________________
  #!/bin/sh

     LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./glqwcl $*

  ______________________________________________________________________



  Vous pouvez vérifier quel driver est chargé en attendant sur votre
  console un message de ce genre au démarrage 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.


  ·  ggllqqwwccll..ggllxx **


     glqwcl.glx est lié aux librairies standard OpenGL à la place de
     Mesa.  Cela permet à Quakeworld de s'exécuter sur d'autres
     matériels 3D supportés par d'autres implémentations d'OpenGL. A ce
     jour, je ne connais pas d'autres implémentations d'OpenGL qui
     supportent un matériel différent de 3Dfx, mais ce fournisseur
     assure qu'à leur apparition, ces matériels permettront de jouer à
     Quake.

     C'est une application GLX, qui de ce fait doit être lancée sous X.

     Vous pouvez utiliser ce client avec Mesa/3Dfx si vous installez
     Mesa et Glide comme détaillé dans la section précédente. Définissez
     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. Même si l'affichage se
  fait en plein écran, Quakeworld s'exécute encore dans une fenêtre. Ce
  qui signifie que si vous n'êtes pas _t_r_è_s prudent, vous pouvez déplacer
  le pointeur de la souris en dehors de la fenêtre de Quakeworld, et
  Quakeworld s'arrêtera subitement de répondre à la souris et au
  clavier. +_windowed_mouse 1 contourne le problème en demandant à
  glqwcl.glx de conserver la souris dans la fenêtre.


  22..1100..  SSeerrvveeuurrss

  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.


  22..1111..  MMooddeess eett AAjjoouuttss

  Un des aspects les plus sympathiques des jeux Quake réside dans le
  fait que les auteurs les ont rendus facilement enrichissables. Les
  utilisateurs peuvent créer leurs propres niveaux, ajouter de nouvelles
  armes, de nouveaux monstres ou même changer totalement les règles du
  jeu.


  22..1111..11..  CCaappttuurree dduu DDrraappeeaauu

  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 même méritant, n'exagérons pas!), CTF (Ndt : Capture The
  Flag en anglais) est une variante plus stratégique, basée sur un jeu
  par équipe.  Dave 'Zoid' Kirsch, qui est également le mainteneur du
  portage de Quake sous Linux, en est le créateur.

  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, créez simplement
  un répertoire appelé ctf dans votre répertoire Quake et 'unzippez' le
  fichier 3wctfc.zip à cet endroit. Le fichier readme.txt regorge
  d'informations très 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 mentionnées ci-dessus.


  22..1111..22..  MMiissssiioonn PPaacckkss ****

  Activision a réalisé deux "add-on packs" de niveaux supplémentaires
  pour Quake, SSccoouurrggee ooff AArrmmaaggoonn et DDiissssoolluuttiioonn ooff EEtteerrnniittyy.


  ·  MMiissssiioonn PPaacckk 11:: TThhee SSccoouurrggee ooff AArrmmaaggoonn 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





  ·  MMiissssiioonn PPaacckk 22:: DDiissssoolluuttiioonn ooff EEtteerrnniittyy L'installation de ce second
     pack se fait selon une procédure très 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 deuxième pack.



  22..1111..33..  LLeess OOuuttiillss QQuuaakkee

  Quelqu'un voudra-t-il contribuer à ce HOWTO en m'envoyant quelques
  informations sur qcc, bsp et tout cela ?



  33..  QQuuaakkee IIII

  Pour installer QuakeII sur votre système 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
  détaillant favori ou la version de démonstration téléchargée sur
  Internet (reportez-vous ``Téléchargement des fichiers nécessaires''
  pour les détails sur la manière d'acquérir la version de
  démonstration).

  Ou bien, si vous avez déjà Quake installé sur une machine Windows,
  vous pouvez utiliser les fichiers provenant de cette installation.



  33..11..  PPrréérreeqquuiiss

  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 oouu la version de démonstration (q2-314-demo-
     x86.exe)

  ·  Un noyau Linux version 2.0.24 ou supérieure

  ·  libc 5.2.18 ou supérieure

  ·  Au choix :

  ·  Un serveur X11 qui supporte l'extension mémoire partagée MITSM. Les
     affichages sur 8 et 16 bits sont supportés pour les interpréteurs X

  ·  SVGAlib 1.2.0 ou supérieure (pour les interpréteurs SVGA et GL)

  ·  25-400 megaoctets d'espace disque libre (dépend de votre
     installation)

  ·  L'accès root sur la machine devant recevoir l'installation


  En Option:

  ·  Une carte son supportée

  ·  Une carte accélératrice 3Dfx VooDoo Graphics ou VooDoo2 ou Voodoo
     Rush 3D

  ·  Les librairies glide 3Dfx installées (pour les interpréteurs GL)

  ·  Mesa 2.6 ou supérieure (pour les interpréteurs GL)





  33..22..  IInnssttaallllaattiioonn ddee QQuuaakkee IIII



  33..22..11..  TTéélléécchhaarrggeemmeenntt ddeess FFiicchhiieerrss nnéécceessssaaiirreess****

  Tous les fichiers nécessaires à Quake II pour Linux sont disponibles
  sur le site ftp de ID Software, ftp.idsoftware.com.

  Ce site pouvant être très 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 (Haïfa, Israel)

  Les fichiers de Quake II mentionnés 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 démonstration 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 mentionnés:

  ·  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 décompression unzip
     http://sunsite.unc.edu/pub/Linux/utils/compress/unzip-5.31.tar.gz
  33..22..22..  CCrrééaattiioonn dduu rrééppeerrttooiirree dd''iinnssttaallllaattiioonn

  La première chose que vous avez à faire est de décider où vous allez
  installer Quake II. Beaucoup l'installent dans /usr/games/quake.
  L'administrateur système que je suis a choisi d'installer tout ce qui
  n'est pas partie intégrante 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, créons le répertoire dans lequel nous allons
  installer Quake II, et déplaçons-nous dedans (les instructions
  suivantes partent du principe que c'est notre répertoire courant).



       mkdir /usr/local/games/quake2
       cd /usr/local/games/quake2





  33..22..33..  IInnssttaallllaattiioonn ddeeppuuiiss uunn CCDD

  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.


  ·  IInnssttaallllaattiioonn ccoommppllèèttee La méthode d'installation la plus simple est
     l'installation complète qui consiste à copier l'intégralité de
     votre CD sur votre disque dur. Cela nécessite environ 350 Mo, et se
     réalise 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



  ·  IInnssttaallllaattiioonn iinntteerrmmééddiiaaiirree Si vous pensez que 450 Mo représente un
     peu trop d'espace à allouer à Quake II, vous pouvez éviter la copie
     des scènes vidéo, et créer à la place des liens sur le CD-ROM. Cela
     réduira d'environ 200 Mo l'espace nécessaire:



       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
  vidéos, il ne les affichera pas.


  33..22..44..  IInnssttaallllaattiioonn ssuurr LLiinnuuxx ddeeppuuiiss WWiinnddoowwss

  Si vous avez Quake II installé sous Windows sur une machine
  différente, vous pouvez transférer les fichiers dans quake2\baseq2\
  sur votre système Linux via FTP ou quelque chose de similaire. Gardez
  à l'esprit que les noms des fichiers sur votre système Linux doivent
  être en minuscules pour que Quake II puisse les trouver, aussi vous
  pouvez avoir à les renommer après le transfert.  Notez également qu'il
  peut être ensuite nécessaire de supprimer votre installation sous
  Windows afin de rester en règle avec les termes de la licence
  consentie par ID SOFTWARE. Ce ne sera pas ma faute si vous faites
  quelque chose d'illégal.

  Si vos systèmes DOS/Win et Linux sont sur la même machine, vous avez
  deux possibilités: copier les fichiers de votre partition Windows sur
  votre partition Linux, ou créer des liens sur les fichiers nécessaires
  sous Linux. Les deux options fonctionnent aussi bien. Vous économisez
  simplement beaucoup d'espace disque quand vous créez 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 répertoire 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 créer des liens sur vos fichiers Quake II,
     tapez:



       cd /usr/local/games/quake2
       ln -s /win95/games/quake2/baseq2 .


  Cette seconde méthode nécessite que chaque utilisateur puisse écrire
  sur la partition Windows que vous liez, ce qui peut ne pas être appro­
  prié à tous les systèmes. En rendant votre partition Windows
  inscriptible, vous donnez à tous les utilisateurs la possibilité de
  détruire l'intégralité 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
  représente le numéro du groupe des utilisateurs. Cherchez cette infor­
  mation dans /etc/group. Lorsque fstab est modifié, démontez et remon­
  tez la partition Windows, et vous êtes prêt.

  Vous venez d'installer les fichiers de données de Quake II. Reportez-
  vous ci-dessus pour l'``Installation des binaires Linux''.



  33..22..55..  IInnssttaallllaattiioonn ddee llaa vveerrssiioonn ddee ddéémmoonnssttrraattiioonn ****

  ID Software propose une version de démonstration gratuite sur son site
  ftp. Elle représente 40 megaoctets à télécharger. La démonstration
  inclue toutes les fonctionnalités de la version complète, y compris le
  mode multi-joueurs, mais ne dispose que de trois niveaux de jeu, aussi
  il peut être difficile de trouver un serveur adéquat.

  Vous trouverez l'adresse de la version de démonstration de Quake II
  dans la section ``Téléchargement des Fichiers Nécessaires''.
  Téléchargez-la et placer la dans votre répertoire Quake II.

  La distribution de la démonstration est sous forme d'un fichier zip
  auto-extractible (auto-extractible sous d'autres OS). Vous pouvez le
  décompresser avec la commande uunnzziipp((11)) qui doit être inclue dans la
  plupart des distributions modernes. Si vous n'avez pas unzip, vous
  pouvez le télécharger depuis le site répertorié dans la section
  ``Téléchargement des Fichiers Nécessaires''.

  Placez-vous dans votre répertoire Quake II et décompressez l'archive:



       cd /usr/local/games/quake2
       unzip q2-314-demo-x86.exe




  Nous devons maintenant effacer plusieurs choses et en déplacer
  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 démonstration de Quake II est maintenant installée. Vous n'avez
  plus qu'à ajouter les binaires de Linux.


  33..33..  AAjjoouutt ddeess bbiinnaaiirreess ddee LLiinnuuxx****

  Il y a quatre paquetages Quake II pour Linux disponibles au
  téléchargement:
  ·  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 mêmes
  fichiers, ils sont simplement liés à des librairies différentes. Les
  utilisateurs de Redhat 5.x devront choisir le paquetage rpm glibc. Les
  utilisateurs de systèmes basés sur glibc sans support rpm devront
  utiliser le paquetage glibc tar. Le rpm libc5 est réservé aux
  distributions Redhat antérieures à 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 ``Téléchargement des Fichiers Nécessaires'' pour
  localiser les adresses des fichiers Quake II pour Linux.


  33..33..11..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess RRPPMM****

  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 nécessaire si vous possédez 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 dépendances de glide avec
  l'option --nodeps:



       su root
       rpm -Uvh quake2-xxxxx.i386.rpm --nodeps





  33..33..22..  IInnssttaallllaattiioonn ddeess ppaaqquueettaaggeess ttaarr..ggzz ****

  Pour les installer, "détarez" simplement le fichier dans votre
  répertoire Quake II. Faites cette opération en tant que root pour que
  les permissions correctes soient conservées:



       cd /usr/local/games/quake
       su root
       tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz







  33..44..  CCoonnffiigguurraattiioonn ddeess PPeerrmmiissssiioonnss ****

  Si vous avez lancé rpm ou tar en tant que root lors de l'installation
  du paquetage Quake II sur votre système, les permissions correctes
  doivent être mises en place. L'exécutable quake2 a été installé setuid
  root pour qu'il puisse accéder aux périphériques graphiques de votre
  système. Pour des raisons de sécurité, les librairies d'interprétation
  ref_*.so sont la propriété 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'exécuter.

  Si vous envisagez d'exécuter uniquement Quake II avec les
  interpréteurs GL ou X, votre quake2 n'a pas besoin d'être setuid root.
  Voyez ``Exécution 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.


  33..44..11..  QQuuaakkee22..ccoonnff ****


  Pour des raisons de sécurité, il existe un fichier quake2.conf, qui
  indique à Quake II où trouver les librairies interprétatives 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 créer de cette façon:



       su root
       cd /usr/local/games/quake2
       pwd > /etc/quake2.conf
       chmod 644 /etc/quake2.conf





  33..55..  LLeess iinntteerrpprréétteeuurrss XX

  Quake II doit être maintenant prêt à s'exécuter sous X. Faites un
  essai:



       cd /usr/local/games/quake2
       ./quake2 +set vid_ref softx





  Si tout va bien, après une courte attente, une petite fenêtre Quake II
  apparaîtra avec la première démonstration 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
  ``Problèmes'' pour trouver de l'aide.


  33..66..  LL''iinntteerrpprréétteeuurr SSVVGGAAlliibb

  Vous avez besoin de SVGAlib installée et configurée, que vous
  souhaitiez utiliser comme interpréteur ref_soft ou ref_gl. (Quake II
  utilise SVGAlib pour gérer les entrées clavier et souris, au cas ou
  vous vous demanderiez pourquoi vous en avez besoin pour l'interpréteur
  GL). SVGAlib est présente dans les distributions les plus récentes et
  ddooiitt être correctement configurée pour que Quake II fonctionne
  correctement sans X.  libvga.config est un fichier de configuration de
  SVGAlib. Sur la plupart des systèmes, vous le trouverez soit sous /etc
  soit sous /etc/vga.  Soyez certain que la souris, l'écran et la carte
  vidéo mentionnés dans ce fichier sont corrects pour votre système.
  Voyez la documentation de SVGAlib pour de plus amples détails.

  Si vous n'avez pas encore SVGAlib sur votre système, téléchargez-le
  depuis l'emplacement mentionné dans la ``Section des fichiers'' ci-
  dessus. Si vous avez une RedHat 5.x ou une autre distribution Linux
  basée sur glibc, voyez ``Considérations relatives à Glibc, RedHat 5.x
  et Debian 2'' dans la section Problèmes/FAQs, pour d'importantes
  recommandations sur la compilation des librairies à utiliser avec
  Quake. Une librairie binaire libc5 SVGAlib précompilée 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'interpréteur ref_soft ou ref_gl. Il ne s'exécutera 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




  ``Exécuter 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.



  33..77..  LL''iinntteerrpprréétteeuurr OOppeennGGLL

  L'utilisation de tout matériel accélérateur OpenGl pour Quake ouvre la
  Voie Royale de Quake.  Rien ne peut le remplacer, et l'essayer c'est
  l'adopter.

  Pour exécuter 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 déclarer une carte Voodoo Rush,
  et je ne peux les développer 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'intégrer ses explications).

  Les librairies SVGAlib, Glide, et Mesa doivent être correctement
  installées et configurées pour que quake2 fonctionne. Les sections
  suivantes expliqueront brièvement 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 complète.

  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.



  33..77..11..  SSVVGGAAlliibb


  Quake II utilise SVGAlib pour gérer la souris et le clavier, aussi
  vous devrez le configurer comme il est précisé dans la section
  ``Interpréteur SVGAlib''.


  33..77..22..  GGlliiddee

  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 dernière version de glide peut être trouvée sur
  http://glide.xxedgexx.com/3DfxRPMS.html. Choisissez le(s) paquetage(s)
  approprié(s) à votre système, et installez-le(s) en vous reportant aux
  instructions de la page web.

  Notez bien que tant que vous n'aurez pas téléchargé 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é, exécutez le programme de test fourni.
  Souvenez-vous que ce programme est une bonne solution pour
  réinitialiser votre affichage si une application glide plante et
  éteint votre écran. NNOOTTAA:: llaanncceezz ccee tteesstt dd''uunnee ccoonnssoollee vviirrttuueellllee,, _p_a_s
  ddeeppuuiiss XX!! Il est possible que cette application test perde le contrôle
  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 pressée, vous retournerez au prompt.
  3dfx.glide.linux sur le serveur de news 3dfx (news.3dfx.com) est une
  bonne source d'information pour les problèmes spécifiques à glide sous
  Linux.


  33..77..33..  MMeessaa

  Une fois glide installé, vous aurez besoin d'installer Mesa, l'OpenGL
  libre réalisé 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 récente de Mesa (Mesa 3.0 est lors
  de la rédaction de ce document la plus récente) visitez le site
  ftp://iris.ssec.wisc.edu/pub/Mesa.  Si vous avez une distribution
  RedHat 5.x ou une autre distribution basée sur glibc, reportez-vous
  aux ``Considérations relatives à Glibc, RedHat 5.x et Debian 2'' dans
  la section Problèmes/FAQs, pour d'importantes recommandations sur la
  compilation des librairies à utiliser avec Quake.

  Après une compilation conforme à ces instructions, vous avez deux
  choses à faire:


  ·  Supprimer votre ancienne installation Mesa. Si vous avez
     préalablement installé libMesaGL.so.2.6 comme décrit 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 numéro majeur de version supérieur à 2,
     vous devrez créer 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 lançons
  Quake II:



          cd /usr/local/games/quake2
          ./quake2 +set vid_ref gl






  33..77..44..  lliibb33ddffxxggll..ssoo ****

  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 rafraîchissement légèrement supérieur à celui de Mesa.
  Il s'agit du portage d'un driver que 3Dfx a développé pour Quake sous
  Windows, et apparemment toutes ses possibilités ne fonctionnent pas
  correctement. Nous comptons bien que ses performances s'amélioreront
  avec le temps.

  Comme Mesa, lib3dfxgl.so nécessite Glide pour accéder à votre carte
  3Dfx. Le paquetage QuakeWorld est fourni avec un script, quake2.3dfxgl
  permettant de lancer Quake II avec sa librairie sur les systèmes
  glibc. Le paragraphe suivant explique comment lancer Quake II avec
  lib3dfxgl.so sur un système libc5. Sur un système glibc, pour que ce
  script fonctionne, l'exécutable glqwcl nnee ddooiitt ppaass êêttrree sseettuuiidd, et
  vous ne devez pas le lancer en tant que root. glqwcl chargera
  silencieusement Mesa au lieu de lib3dfxgl.so si il est exécuté avec
  les permissions root. Cette non nécessité d'être root suppose que vous
  avez le driver /dev/3dfx installé.

  Sur un système libc5, vous devrez créer un lien symbolique sur
  lib3dfxgl.so appelé libMesaGL.so.2 de cette façon:



          cd /usr/local/games/quake2
          ln -sf lib3dfxgl.so libMesaGL.so.2





  Puis lancez Quakeworld depuis un script assignant le répertoire
  courant à $LD_LIBRARY_PATH :


  ______________________________________________________________________
     #!/bin/sh

     LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ./quake2 +set vid_ref gl $*

  ______________________________________________________________________




  Vous pouvez vérifier quel driver est chargé en visualisant sur votre
  console un message de ce genre au démarrage 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.


  33..88..  LL''iinntteerrpprréétteeuurr GGLLXX ****


  ref_glx.so est lié aux librairies standard OpenGL à la place de Mesa.
  Cela permet à Quake II de s'exécuter sur d'autres matériels 3D
  supportés par d'autres implémentations d'OpenGL. A ce jour, je ne
  connais pas d'autres implémentations d'OpenGL qui supportent un
  matériel différent de 3Dfx, mais ce fournisseur assure qu'à leur
  apparition, ces nouveaux matériels permettront de jouer à Quake.

  C'est une application GLX, et de ce fait elle doit être lancée sous X.

  Vous pouvez utiliser ce client avec Mesa/3Dfx si vous installez Mesa
  et Glide comme détaillé dans la section précédente; définissez 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. Même si l'affichage se
  fait en plein écran, Quake II s'exécute encore dans une fenêtre. Ce
  qui signifie que si vous n'êtes pas _t_r_è_s prudent, vous pouvez déplacer
  le pointeur de la souris en dehors de la fenêtre de Quakeworld, et
  Quakeworld s'arrêtera subitement de répondre à la souris et au
  clavier. +_windowed_mouse 1 contourne le problème en demandant à
  glqwcl.glx de conserver la souris dans la fenêtre.


  33..99..  CCoommmmaannddeess dd''ooppttiioonnss eenn lliiggnnee ssppéécciiffiiqquueess àà LLiinnuuxx

  Cette section rassemble les commandes en ligne qui sont spécifiques
  aux versions Linux de Quake II. Il existe beaucoup d'autres options,
  mais elles dépassent le cadre de cet HOWTO. Recherchez ce genre
  d'information sur les sites listés dans la section ``Informations
  Générales sur Quake''. Ce sont en réalité des cvars (variables client)
  que vous pouvez définir dans la console Q2, mais il paraît plus
  raisonnable de les définir sur la ligne de commande. Définissez-les
  avec +set sur la ligne de commande, comme:



       ./quake2 +set cd_dev /dev/hdc





     ccdd__ddeevv _d_e_v_i_c_e
        Nom du fichier périphérique du CD-ROM.


     nnooccddaauuddiioo _v_a_l_u_e
        Désactive le CD audio si _v_a_l_u_e est différent de zéro


     ssnnddbbiittss _n_u_m
        Définit la taille de l'échantillon sonore en bits. La valeur par
        défaut est 16.


     ssnnddssppeeeedd _n_u_m
        Définit la fréquence sonore. Les valeur usuelles sont 8000,
        11025, 22051 ou 44100. Si la valeur est zéro, le driver son
        testera les vitesses en ordre croissant: 11025, 22051, 44100,
        8000.


     ssnnddcchhaannnneellss _n_u_m
        Indique un son mono ou stéréo. Par défaut 2 (stéréo). Utiliser 1
        pour mono.
     nnoossttddoouutt _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.


  33..1100..  SSeerrvveeuurrss QQuuaakkee IIII

  La puissance de Linux en tant que serveur internet en fait une
  plateforme parfaite pour ouvrir un serveur Quake II. Cette section
  décrira les aspects de base spécifiques à Linux de la mise en place
  d'un serveur Quake II. De plus amples informations sur la manière
  d'ouvrir un serveur Quake sont disponibles par ailleurs (reportez-vous
  à la section ``Autres Sources d'Information'' plus haut dans ce
  document).


  33..1100..11..  SSeerrvveeuurrss dd''aaccccuueeiill

  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'héberger une partie et d'y
  participer dans le même temps.

  Pour lancer un serveur d'accueil, lancez Quake II, appelez le menu de
  Quake II par la touche ESC, et sélectionnez _M_u_l_t_i_j_o_u_e_u_r. Quake est
  ensuite très explicite.



  33..1100..22..  SSeerrvveeuurrss ddééddiiééss

  Transposer la procédure de mise en place d'un serveur d'accueil à
  l'ouverture d'un serveur dédié à Quake II qui ne nécessite pas une
  attention constante, n'est pas cohérent. Quake II propose un mode
  Serveur Dédié qui répond à ce type d'utilisation. Un serveur dédié est
  lancé depuis la ligne de commande et utilise moins de ressources
  système qu'un serveur d'accueil car il n'exécute aucun client
  graphique.

  Pour mettre en route un serveur dédié, utilisez l'option +set
  dedicated 1 sur la ligne de commande. Pour pouvez définir des
  paramètres supplémentaires 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 répertoire baseq2.

  Un petit nombre d'options communes pour serveur sont listées ci-
  dessous. Pour intégrer ces options à la ligne de commande, faites +set
  fraglimit 30.  Le principe est le même si vous optez pour un fichier
  de configuration; ôtez simplement le + précédant set. Appelez votre
  fichier de configuration de la façon suivante: +exec server.cfg.


     ffrraagglliimmiitt
        Nombre de personnes à tuer avant de changer de tableau

     ttiimmeelliimmiitt
        Temps en minutes devant s'écouler avant de changer de tableau

     hhoossttnnaammee
        Le nom de votre serveur Quake II. C'est une chaîne arbitraire
        qui n'a rien à voir avec le nom DNS de votre hôte.

     mmaaxxcclliieennttss
        Le nombre maximum de joueur pouvant se connecter au serveur en
        même temps.
  Pour trouver plus d'informations que vous ne pouvez l'espérer,
  consultez Farenheit 176 (http://www.planetquake.com/f176).


  33..1100..33..  AAuuttrreess SSoouurrcceess dd''iinnffoorrmmaattiioonn ssuurr lleess sseerrvveeuurrss


  ·  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 démarrage sur
     http://www.atomicage.com:80/quake/server/server_cfg/.


  33..1111..  MMooddeess && AAjjoouuttss

  Les modifications de Quake II telles que Capture du drapeau (Ndt :
  Capture the Flag), Jailbreak, et Lithium II sont des extensions très
  populaires du jeux original. Quelques modes résident entièrement sur
  le serveur (Lithium), et d'autres nécessitent des modifications du
  client (CTF). Pour les modes sur serveur, connectez vous normalement
  et jouez. Les modes clients requièrent préalablement l'installation de
  fichiers supplémentaires dans votre répertoire quake2.


  33..1111..11..  LLeess mmooddeess CClliieenntt

  En général, l'installation d'un mode client réside simplement dans le
  téléchargement du paquetage ad hoc et son désarchivage dans le
  répertoire de Quake II, mais reportez-vous à la documentation propre à
  chaque mode pour de plus amples détails. Il peut être nécessaire de
  télécharger un paquetage supplémentaire spécifique à 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 généralement un nouveau
  fichier gamei386.so et un ou plusieurs fichiers .pak. D'autres
  fichiers supplémentaires peuvent également exister. Ces nouveaux
  fichiers seront installés dans un sous-répertoire dépendant de votre
  répertoire principal Quake II. Utilisez l'option +set game _m_o_d_-_d_i_r sur
  la ligne de commande pour exécuter ce mode. Rocket Arena 2 sera
  installé, par exemple, dans un répertoire appelé arena. Pour jouer à
  RA2, vous devrez lancer votre client de cette manière:


       ./quake2 +set game arena





  33..1111..11..11..  CCaappttuurree dduu ddrraappeeaauu

  Etant donné que cette variation multi-joueurs de Quake II est de loin
  la plus populaire, j'ai inclus les instructions spécifiques à
  l'installation de ce mode.  Capture du Drapeau pour Quake II et
  disponible sur le site ftp de ID.  Téléchargez le, puis installez le
  ainsi:





  cd /usr/local/games/quake2
  mkdir ctf
  cd ctf
  unzip -L /wherever/you/put/it/q2ctf102.zip




  Exécutez Quake II avec +set game ctf pour jouer à CTF (Ndt: Capture
  the Flag).


  33..1111..22..  LLeess mmooddeess sseerrvveeuurr

  Lancer Quake II en mode serveur n'est pas très différent du lancement
  en mode client. Généralement vous devrez installer les fichiers
  gamei386.so et server.cfg dans un nouveau sous-répertoire et lancer
  votre serveur de cette façon:


       ./quake2 +set game XXXX +set dedicated 1 +exec server.cfg




  où XXXX représente le nom du sous-répertoire créé. La procédure exacte
  peut bien sûr varier d'un mode à l'autre. Reportez-vous à la documen­
  tation jointe à votre mode pour des détails spécifiques.


  33..1111..33..  SSoouurrccee dduu JJeeuu

  Le jeu complet, hormis le moteur lui-même, se trouve dans une
  librairie partagée, gamei386.so. Les modes de Quake II sont créés en
  changeant le contenu de ce fichier. Le code source en C est librement
  disponible (section ``Téléchargement des fichiers nécessaires'' ci-
  dessus) pour quiconque souhaite le télécharger et le modifier.

  Après avoir téléchargé le code source, voici comment le "préparer":



       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
  répondre 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 récemment compilée 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.


  33..1111..44..  MMiissssiioonn PPaacckkss ****


  ·  MMiissssiioonn PPaacckk 11:: TThhee RReecckkoonniinngg "The Reckoning" nécessite une version
     version 3.15 ou supérieure de Quake II pour s'exécuter. Vous aurez
     besoin d'au moins 95 Mo pour une installation minimale. 90 Mo de
     plus sont nécessaires si vous voulez également installer les
     séquences vidéo. 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 séquences vidéo:



       cp -r /mnt/cdrom/Data/max/xatrix/video xatrix





  Lancez "The Reckoning" de cette façon :


       cd /usr/local/games/quake2
       ./quake2 +set game xatrix





  ·  MMiissssiioonn PPaacckk 22:: GGrroouunndd ZZeerroo Ce pack nécessite une version 3.17 ou
     supérieure de Quake II. Vous aurez besoin d'au moins 120 Mo pour
     une installation minimale. 115 Mo supplémentaires sont à prévoir si
     vous voulez installer les séquences vidéo. 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 séquences vidéo:



       cp -r /mnt/cdrom/Data/max/rogue/video rogue

  Lancez "Ground Zero" de cette manière:


       cd /usr/local/games/quake2
       ./quake2 +set game rogue







  44..  LLooggiicciieellss aappppaarreennttééss ++++



  44..11..  QQSSttaatt

  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 aperçu 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 règles des serveurs

  ·  Sortie formatée pour une génération HTML automatique

  ·  Mode de sortie non formatée pour une intégration par les
     générateurs de pages HTML

  ·  Cache du nom de l'hôte intégré

  ·  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 réseau. Un grand nombre de d'interfaces pour qstat ont été
  également écrites.  Quelques unes d'entre elles sont recensées dans
  cette section.

  Vous pouvez obtenir la dernière version de qstat depuis sa page
  d'accueil (http://www.activesw.com/people/steve/qstat.html.


  44..22..  XXQQFF

  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
  révisions à 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.

  44..33..  QQuuiicckkSSppyy

  QuickSpy est un navigateur texte de serveurs QuakeWorld. C'est une
  autre interface pour QStat qui fonctionne aussi bien. Si vous
  n'exécutez pas X et que vous n'avez pas Quake II, c'est une option
  décente. Attention cependant, il n'est plus en développement.

  Vous pouvez obtenir QuickSpy à
  http://diana.ecs.soton.ac.uk/~rht96r/quake/quickspy/.


  44..44..  QQPPlluugg ppoouurr LLiinnuuxx

  Qplug est un plugin de Netscape qui récupère 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 zéro 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.


  44..55..  qqkkHHaacckklliibb

  David Bucciarelli (tech.hmw@plus.it), auteur du driver 3Dfx pour Mesa,
  a écrit une librairie appelée qkHack, qui tente d'émuler toutes les
  fonctions SVGAlib/fxMesa utilisées par Quake et Quake II. Cela devrait
  suppléer le besoin de SVGAlib lorsque glquake ou Quake II sont
  exécutés avec ref_gl.

  Autres caractéristiques extraites du fichier README de qkHacklib:


  ·  Vous pouvez dynamiquement passer du mode Plein écran au mode
     fenêtré 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 problème

  ·  Vous pouvez activer/désactiver 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 redémarrer
     par un double clic sur l'icône "****"

  ·  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
     récupérer la sortie du matériel accélérateur sur une machine SGI
     (Soit, c'est un peu exotique et théorique 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 système.
  Néanmoins, dans Quake II, les réponses de la souris deviennent
  _v_r_a_i_m_e_n_t lentes.  D'autres rapportent un complet succès, 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.
  44..66..  GGiiMMdd22VViieewweerr

  GiMd2Viewer est un visualiseur de modèles Quake II écrit pour Gtk et
  OpenGL par Lionel Ulmer (bbrox@mygale.org).  Il charge modèles et
  textures depuis des fichiers ordinaires ou des fichiers .PAK. Il
  animera également les modèles (par interpolation d'image).

  Ce programme est toujours en développement et je ne l'ai pas encore
  essayé, mais il semble vraiment formidable. Récupérez-le sur
  http://www.mygale.org/~bbrox/GiMd2Viewer/.


  44..77..  QQIIPPXX

  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'avérer utile si vous jouez
  à netquake sur un LAN. QIPX est disponible sur
  http://www.geocities.com/SiliconValley/Park/6083/qipx.html.


  44..88..  IIccee

  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 développement.  La page d'accueil
  de Ice se trouve sur http://styx.phy.vanderbilt.edu/~ice/.


  44..99..  QQ22ggeettttyy

  Q2getty est une "bidouille" de mingetty par Mike Gleason
  (mgleason@ncftp.com) qui vous permet d'exécuter 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.


  44..1100..  rrccoonn

  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.


  44..1111..  qqlloogg ++++

  Qlog est un serveur d'analyse de log pour QuakeWorld/Quake II basé sur
  GPL qui génère des statistiques détaillées 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/.


  44..1122..  CChheeaappoo ****

  Cheapo est un proxy qui peut être utilisé pour router le trafic du
  réseau QuakeWorld. De plus, le proxy peut modifier les données et
  dispose de fonctionnalités permettant d'améliorer 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 gérer le trafic Quake, donc cette machine
  derrière le firewall peut être utilisée pour jouer. La page d'accueil
  de Cheapo est à l'adresse http://www.saunalahti.fi/~softech/.

  44..1133..  qqggrraapphh ****

  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 données en temps
  réel de la partie se déroulant sur le serveur. La page d'accueil de
  QGraph est à l'adresse http://www.frag.com/qgraph.



  55..  PPrroobbllèèmmeess//FFAAQQss




  55..11..  GGéénnéérraall



  55..11..11..  CCoonnssiiddéérraattiioonnss ssuurr ddiifffféérreennttss OOSS


  ·  SSeennssiibbiilliittéé àà llaa CCaassssee  - 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 différents. Cela peut poser problème avec des
     modèles de joueurs et des "skin files" s'ils sont installés avec
     des noms en majuscules ou mitigés 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 répertoire 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
     ___________________________________________________________________



  ·  DDéélliimmiitteeuurrss ddee cchheemmiinn ((""PPaatthh"")) - DOS et Windows utilisent le
     caractère "anti-slash" \" pour séparer les éléments d'un chemin
     d'accès. Si vous utilisez des chemin d'accès dans vos fichiers de
     configuration (ou n'importe quoi d'autre), soyez certain d'utiliser
     "/" et non "\".

  ·  CCaarraaccttèèrreess ddee ffiinn ddee lliiggnnee - 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
     formatés DOS/Win sous Unix peut avoir pour conséquence toute sorte
     de problèmes mystérieux 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 problème 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






  55..11..22..  CCoonnssiiddéérraattiioonnss rreellaattiivveess àà GGlliibbcc,, RReeddHHaatt 55..xx eett DDeebbiiaann 22****

  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 exécutables Quake ont été compilés avec libc5. Les distributions
  Linux les plus récentes, comme RedHat 5.1 et Debian 2.0 utilisent
  l'incompatible glibc comme librairie par défaut. Si vous exécutez
  Quake sur un sytème glibc, vous devez vérifier plusieurs choses:


  ·  RedHat 5 et Debian 2 ont les paquetages de compatibilité libc5 qui
     vous permettent de lancer des applications basées sur libc5. Soyez
     certain que vous avez ces paquetages installés. Les deux
     distributions placent les librairies libc5 sous /usr/i486-linux-
     libc5/lib.

  ·  Soyez certain que Quake utilise les librairies correctes. Créez un
     script similaire à celui-ci qui fait pointer $LD_LIBRARY_PATH sur
     votre répertoire 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 compilée avec libc5.
     Construire simplement une nouvelle librairie en suivant les
     instructions d'installation inclues conduira à créer une librairie
     liée à votre librairie par défaut, glibc. Vous devez vous assurer
     que votre nouvelle librairie est liée uniquement à libc5 et aux
     librairies basées 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 défaut.



  55..11..33..  MMaa ssoouurriiss nnee ffoonnccttiioonnnnee ppaass oouu sseemmbbllee rrééppoonnddrree aallééaattooiirreemmeenntt..


  ·  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 défaut. Cela peut interférer avec
     Quake. Vérifiez 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 interfère avec Quake. gpm -k (en tant que root)
  devrait arrêter gpm. Si ce n'est pas le cas, (gpm -k ne marche pas
  toujours sur mon système), tuez gpm avec la commande killall gpm.

  Si vous n'utilisez jamais gpm, vous pouvez vouloir arrêter son lance­
  ment au démarrage. Voyez la documentation de votre distribution pour
  savoir comment faire.


  ·  Est-ce que votre souris est correctement définie 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 système, c'est la première option du fichier. Assurez-vous que
  le type de la souris est approprié à votre matériel.



  55..11..44..  ccoorrrreecctteemmeenntt..  MMaa ssoouurriiss MMiiccrroossoofftt IInntteelllliimmoouussee oouu LLooggiitteecchh
  MMoouusseeMMaann++ nnee ffoonnccttiioonnnnee ppaass

  SVGAlib, dans les versions antérieures à la 1.3.0, qui gère la souris
  pour Quake/QW/Q2 sous SVGA et GL, ne supporte pas directement
  l'Intellimouse. Si vous avez une version de SVGAlib antérieure à la
  1.3.0, vous devrez la mettre à jour pour pouvoir utiliser une souris
  de type IntelliMouse (pour les souris série) ou IMPS2 (pour les souris
  PS/2) dans votre fichier de configurationlibvga.config.


  55..11..55..  MMaa ssoouurriiss ssee ttrraaîînnee eett sseemmbbllee bbeeaauuccoouupp pplluuss lleennttee qquuee ssoouuss
  WWiinnddoowwss..


  ·  Pour beaucoup de personnes, le simple fait d'augmenter la valeur de
     la sensibilité dans le jeu solutionne le problème. Ce réglage 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 réglage du menu Options. sensitivity 15, par
     exemple.

  ·  Extrait de la mise à jour Zoid du 1/7/98:

       Si vous constatez un retard de la vidéo sous l'interpréteur
       GL (le rafraîchissement semble traîner derrière les mouve­
       ments de votre souris) tapez "gl_finish 1" sur la console.
       Cela force le rafraîchissement sur la base d'une image.




  ·  La dernière version de SVGAlib (1.3.0) intègre un grand nombre de
     paramètres dans libvga.config que vous pouvez utiliser pour
     personnaliser le comportement de votre souris. Avec un paramètrage
     correct, il devrait être possible de faire réagir votre souris
     exactement comme vous le souhaitez. Sur mon système, le simple fait
     de définir mouse_accel_type en normal (la valeur par défaut étant
     power) me donne les résultats attendus. Je n'ai pas testé les
     autres paramètres, je ne m'avancerai donc pas sur le bénéfice
     qu'ils apportent.

  ·  Le petit "slider"


  55..11..66..  ll''iinntteerrpprréétteeuurr ggll,, iill mm''aaffffiirrmmee qquuee jjee nn''aaii ppaass ddee ccaarrttee
  VVooooddoooo iinnssttaallllééee..  JJee ppoossssèèddee uunnee ccaarrttee VVooooddoooo22 eett,, lloorrssqquuee jjee tteennttee
  uunnee mmiissee eenn rroouuttee aavveecc

  Il y a différentes versions de Glide pour cartes Voodoo et Voodoo 2.
  Soyez certain que vous téléchargez celle qui correspond à votre
  système.



  55..11..77..  CCTTRRLL--CC,, llee jjeeuu ss''aarrrrêêttee eett qquueellqquueeffooiiss mmee llaaiissssee llaa ccoonnssoollee
  ddaannss uunn ééttaatt iinnuuttiilliissaabbllee..  LLoorrssqquuee jjee jjoouuee àà ll''uunn ddeess jjeeuuxx QQuuaakkee ssoouuss
  SSVVGGAAlliibb oouu GGLL eett qquuee jjee pprreessssee

  55..11..88..  llaaiissssee llaa ccoonnssoollee ddaannss uunn ééttaatt iinnuuttiilliissaabbllee..  QQuueellqquueeffooiiss
  lloorrssqquuee QQuuaakkee//QQuuaakkee IIII ssee tteerrmmiinnee ddee ffaaççoonn aannoorrmmaallee,, iill mmee

  Oui. Cela agace. SVGAlib intercepte le CTRL-C et décide ce qu'il y a à
  faire plutôt que de laisser cette responsabilité à Quake. Je ne
  connais pas de moyen de contourner ce problème.

  Si vous lancez un jeu Quake depuis un script qui réinitialise 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
  sûr.


  ______________________________________________________________________
     #!/bin/sh
     ./quake2 $*
     kbd_mode -a
     reset

  ______________________________________________________________________




  55..11..99..  ppeerrmmiissssiioonnss"" ssqquuaakkee//qquuaakkee22 rreeffuussee ddee ddéémmaarrrreerr eett aavveerrttiitt ""
  ssvvggaalliibb:: ccaannnnoott ggeett II//OO

  Les exécutables Quake doivent s'exécuter 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
  détails.


  55..11..1100..  ddee ttoouucchheess nnee ffoonnccttiioonnnnee pplluuss..  QQuueellqquueeffooiiss,, aapprrèèss aavvooiirr jjoouuéé
  àà ll''uunn ddeess jjeeuuxx QQuuaakkee ssoouuss XX,, llaa rrééppééttiittiioonn

  Pour plusieurs raisons, les versions X11 de Quake désactivent les
  touches de répétition pendant leur exécution. Si le programme se
  termine anormalement pour une raison ou une autre, la répétition des
  touches ne sera pas réactivée.  Faites:


          xset r on





  pour la rétablir.


  55..11..1111..  QQuuaakkee//QQuuaakkee IIII aavveerrttiitt ""//ddeevv//ddsspp :: ddeevviiccee nnoott ccoonnffiigguurreedd""

  Votre matériel son n'est pas correctement configuré. Vous pouvez avoir
  simplement à faire un insmod sound, ou il peut être nécessaire de
  recompiler votre noyau. Les utilisateurs de RedHat peuvent appeler
  l'utilitaire ssnnddccoonnffiigg((88)).  Reportez-vous à la documentation de votre
  distribution Linux et/ou au SOUND-HOWTO Linux pour toute information
  sur la configuration de votre matériel son.


  55..11..1122..  **** GGLL QQuuaakkee//QQuuaakkee IIII ss''eexxééccuutteenntt pplluuss lleenntteemmeenntt ssoouuss LLiinnuuxx
  qquuee ssoouuss WWiinnddoowwss..

  Le miniport 3Dfx GL de Windows est largement optimisé pour les besoins
  de Quake II. Mesa, d'autre part, est plus général et moins optimisé.
  Il en résulte que Quake II Linux s'exécute plus lentement que sous
  Windows. Ce n'est pas lié à une limitation de Linux, mais à une
  limitation des drivers actuels.

  Avec les plus récentes 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 supplémentaire dans cette direction.

  De plus, pour les possesseurs de Pentium Pro et Pentium II, quelques
  gains peuvent être réalisés avec la mémoire cache - le dernier fichier
  de périphérique /dev/3dfx a un support intégrant un paramétrage
  automatique. De l'activation de MTRRs peut résulter une augmentation
  _s_i_g_n_i_f_i_c_a_t_i_v_e (10 fps sur mon système) de la vitesse de Quake GL.
  Reportez-vous à http://glide.xxedgexx.com/MTRR.html pour de plus
  amples informations.


  55..11..1133..  uullttéérriieeuurreemmeenntt?? **** CCoommmmeenntt ppuuiiss--jjee ddéémmaarrrreerr uunn sseerrvveeuurr eett mmee
  ddééccoonnnneecctteerr,, ppuuiiss yy rreevveenniirr

  ssccrreeeenn((11)) est un remarquable utilitaire pour ce genre de chose. Il
  vous permet de créer 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 télécharger sur
  ftp://prep.ai.mit.edu/pub/gnu ou n'importe quel miroir GNU.

  Lancez screen en tapant la commande screen, puis créez une nouvelle
  fenêtre 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 fenêtre é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 détacher du programme screen.
  Screen et vos serveurs sont toujours en route, mais ne sont plus
  visibles dans la fenêtre de votre terminal. Vous pouvez maintenant
  vous déconnecter et vos processus continueront à s'exécuter
  normalement.

  Utilisez screen -r pour vous rattacher à votre précédent processus
  screen et accéder de nouveau à vos serveurs.

  C'est tout ce qu'il y a à faire. Reportez-vous à la page d'aide de
  ssccrreeeenn((11)) pour des informations plus détaillées.



  55..22..  QQuuaakkee//QQuuaakkeeWWoorrlldd


  55..22..11..  QQuuaakkee mmeeuurrtt aauu ddéémmaarrrraaggee aavveecc uunnee ""sseeggmmeennttaattiioonn ffaauulltt""..

  Ce signifie généralement que votre réseau n'est pas conforme. Essayez
  de lancer quake avec l'option -noudp et voyez si l'erreur se
  reproduit. Si cela résout le problème, inspectez votre fichier
  /etc/hosts et vérifiez qu'il comporte une entrée pour votre machine.
  Utilisez 127.0.0.1 pour votre adresse IP si vous avez une adresse IP
  assignée différente à chaque fois que vous vous connectez.


  55..22..22..  eett ggllqqwwccll..ggllxx ?? ++++ QQuueellllee eesstt llaa ddiifffféérreennccee eennttrree ggllqqwwccll ,,
  ggllqqwwccll..33ddffxxggll ,,


  ·  glqwcl est le client standard Quakeworld GL que vous avez vu dans
     la version précédente. Il est lié à libMesaGL.so.2.

  ·  glqwcl.3dfxgl est un script qui lance glqwcl après avoir préchargé
     la librairie du miniport 3Dfx GL, lib3dfxgl.so.  Le préchargement
     de la librairie du miniport a pour conséquence l'utilisation des
     fonctions GL au lieu des fonctions Mesa. Depuis que le miniport GL
     est optimisé pour Quake, c'est préférable.

  ·  glqwcl.glx est lié à la librairie standard OpenGL au lieu de Mesa.
     Cela permet à glquake de s'exécuter sur d'autres matériels 3D
     supportés par d'autres implémentations OpenGL. C'est une
     application X et elle doit donc être lancée depuis X.


  55..22..33..  ppaass uuttiilliisseerr mmaa ssoouurriiss oouu mmoonn ccllaavviieerr.. ++++ QQuuaanndd jjee llaannccee
  ggllqqwwccll..ggllxx  eenn pplleeiinn ééccrraann ddeeppuuiiss XX,, jjee nnee ppeeuuxx


  Lancez glqwcl.glx avec l'option +_windowed_mouse 1. Quakeworld GLX
  s'exécute dans une fenêtre, même s'il semble être en plein écran. Si
  vous déplacez la souris pendant que WM est en mode "focus-follows-
  mouse", cela revient à placer votre pointeur en dehors de cette
  fenêtre, et Quake arrêtera de répondre aux sollicitations du clavier
  et de la souris. +_windowed_mouse 1 oblige Quakeworld à capturer la
  souris pour son propre et unique usage.


  55..33..  QQuuaakkee IIII


  55..33..11..  ppaass eett iill ss''aaffffiicchhee ""LLooaaddLLiibbrraarryy((""rreeff__ggll..ssoo"")) ffaaiilleedd:: UUnnaabbllee
  ttoo rreessoollvvee ssyymmbbooll"" QQuuaanndd jj''eessssaaiiee ddee llaanncceerr QQuuaakkee IIII aavveecc
  ll''iinntteerrpprréétteeuurr GGLL,, cceellaa nnee mmaarrcchhee

  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'interpréteur GL'' de la section d'installation de Quake II
  pour toute information sur l'installation de Mesa et glide.


  55..33..22..  ffaaiilleedd:: NNoo ssuucchh ffiillee oorr ddiirreeccttoorryy QQuuaakkee IIII nnee ssee llaannccee ppaass
  aavveecc llee mmeessssaaggee LLooaaddLLiibbrraarryy((""rreeff__XXXXXX..ssoo""))


  ·  /etc/quake2.conf ne mentionne pas le chemin correct de votre
     répertoire Quake II. Ce fichier doit contenir une ligne
     correspondant au répertoire 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 recréer manuellement. Quelques
     versions de Quake II pour Linux intègrent un fichier quake2.conf
     incorrectement formaté.

  ·  Avez-vous SVGAlib installée? Recherchez dans /lib, /usr/lib et
     /usr/local/lib un fichier appelé libvga.so.1.X.X, où les X peuvent
     être différents nombres. Si vous ne trouvez rien, vous devrez
     récupérer et installer SVGAlib pour exécuter Quake II hors de X.

  ·  Si l'interpréteur en question est ref_gl.so, Mesa peut ne pas être
     correctement installé. Avez-vous copié libMesaGL.so.2.6 dans le
     répertoire de la librairie comme le préconisent les instructions
     d'installation?

  ·  Si l'interpréteur en question est ref_gl.so, avez-vous installé les
     librairies glide?



  55..33..33..  GGLL,, eett qquuee jjee pprreessssee ""aappppllyy,,"" rriieenn nnee ssee ppaassssee!!  LLoorrssqquuee jjee
  mmooddiiffiiee llee ccoonnttrraassttee ppeennddaanntt ll''uuttiilliissaattiioonn ddee ll''iinntteerrpprréétteeuurr


  Tapez vid_restart sur la console pour que les changements prennent
  effet.



  55..33..44..  NNoottee ssuurr llaa ddiissttrriibbuuttiioonn 33..1177


  Au jour de la réalisation de ce document, la plus récente 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 enregistrés avec le format des fichiers
  texte MS-DOS CR/LF au lieu du format Unix LF. Ce qui signifie qu'il y
  a un caractère "retour chariot" supplémentaire à la fin de chaque
  ligne de ces fichiers et qu'ils ne seront pas exploitables tant qu'il
  vous ne les aurez pas corrigés.

  Nous utiliserons ttrr((11)) 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






  55..33..55..  ddeeppuuiiss XX,, jjee nnee ppeeuuxx ppaass uuttiilliisseerr mmaa ssoouurriiss oouu mmoonn ccllaavviieerr.. ++++
  QQuuaanndd jjee llaannccee QQuuaakkee IIII eenn pplleeiinn ééccrraann aavveecc ++sseett vviidd__rreeff ggllxx


  Lancez quake2 GLX avec l'option +set _windowed_mouse 1. Quake2 GLX
  s'exécute dans une fenêtre, même s'il semble être en plein écran. Si
  vous déplacez la souris pendant que WM est en mode "focus-follows-
  mouse", cela revient à placer votre pointeur en dehors de cette
  fenêtre, et Quake II arrêtera de répondre aux sollicitations du
  clavier et de la souris. +set _windowed_mouse 1 oblige Quakeworld à
  capturer la souris pour son propre et unique usage.



  55..33..66..  mmeennuu VViiddééoo ddee QQuuaakkee IIII?? **** PPoouurrqquuooii nnee ppuuiiss--jjee ppaass uuttiilliisseerr
  cceerrttaaiinnss mmooddeess SSVVGGAA pprréésseennttss ddaannss llee

  SVGAlib ne sait sans doute pas comment créer les modes sur votre
  carte. Lorsque Quake II s'exécute avec un interpréteur 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 succès
  depuis le menu Video. Si par exemple 512x384 n'est pas dans la liste,
  la sélection de ce mode depuis le menu Vidéo ne sera pas possible.

  SVGAlib vous permet de définir de nouveau modes video pour d'autres
  "chipsets" dans libvga.config, vous pouvez donc créer votre propre
  mode vidéo de cette façon. Reportez-vous à la documentation de SVGAlib
  pour plus de détails sur ce sujet.



  66..  TTrruuccss eett AAssttuucceess




  66..11..  EExxééccuuttiioonn ddee jjeeuuxx XX eett GGLL ssaannss sseettuuiidd

  Si vous exécutez 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 accès à /dev/dsp, le fichier
  périphérique son. les versions GL ont de plus besoin d'avoir accès à
  la carte 3Dfx par /dev/dsp.

  /dev/dsp doit être lisible et modifiable par Quake. La plupart des
  distributions définissent les permissions à 662 (rw-rw--w-) par
  défaut.  La solution la plus simple est de faire un chmod 666
  /dev/dsp. Sur la plupart des systèmes, la possibilité de lire depuis
  un fichier périphérique son ne pose pas de problème de sécurité
  majeur. Si cette approche n'est pas acceptable pour votre système,
  créez un groupe propriétaire 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.
  Téléchargez le paquetage Device3Dfx.xxx.rpm et installez-le en suivant
  les instructions de la page web. Après l'installation du driver,
  vérifiez que les permissions de /dev/3dfx sont à 666 (chmod 666
  /dev/3dfx).

  Lorsque /dev/dsp et /dev/3dfx seront correctement paramétrés, vous
  pourrez retirer le bit setuid de vos exécutables Quake/QW/Q2. Faites
  simplement (en tant que root) chmod 0755 XXXXX, où XXXXX représente
  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 propriétaire de ces fichiers avant de
  jouer en tant que simple utilisateur.


  66..22..  LLaanncceemmeenntt ddeess jjeeuuxx SSVVGGAA eett GGLL ddeeppuuiiss XX****

  Les clients Quakeworld et Quake II GLX sont des applications natives
  X, mais depuis qu'elles utilisent Mesa plutôt que le mini-driver 3Dfx,
  elles sont plus lentes que les versions lib3dfxgl.so. Pour cette
  raison, vous pouvez préférer encore lancer ces jeux depuis X plutôt
  que d'utiliser les clients GLX.

  Ce qui suit est tiré de la Gazette LINUX n°20, "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'exécuter 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 réponse. 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 arrêt
  soit normal ou non.

  Nota: lorsque je précise "Quake" dans le texte ci-dessus, je veux en
  fait dire "quake, glquake squake, qwcl, glqwcl, qwcl.x11 ou quake2".

  ·  Premièrement, vous aurez besoin du paquetage ooppeenn((11)) de Jon Tombs.
     C'est un lot de très petits programmes qui vous permettent de
     passer d'une console virtuelle à l'autre et de lancer des
     programmes sur chacune d'elles. Téléchargez 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 achevée, vous
     devrez rendre open et switchto exécutables "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 numéro de la CV courante sur la sortie standard.
          * Une grande partie de ce code a été inspirée 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 créons 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 exécutable et mettez-le quelque part dans votre $PATH:


          chmod 755 runvc
          mv runvc /usr/local/bin






  Maintenant vous pouvez utiliser la commande runvc pour exécuter Quake.
  Continuez à utiliser la ligne de commande qui vous sert habituellement
  pour lancer votre partie, mais insérez runvc au début:


          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!



  66..33..  CCoonnsseerrvveerr llaa ssoouurriiss àà ll''iinnttéérriieeuurr ddee llaa ffeennêêttrree ssoouuss XX

  Extrait du fichier readme.linux Quake II:

       Par défaut, la souris ne sera pas confinée dans la fenêtre
       de Quake2.  Pour obliger Quake2 à capturer la souris, sélec­
       tionnez 'Windowed Mouse' sur le menu vidéo, ou tapez '_win­
       dowed_mouse 0' sur la console. Faites l'inverse pour la
       relâcher. Vous pouvez définir des raccourcis clavier pour
       capturer et relâcher la souris dans la console, de cette
       façon: bind i "_windowed_mouse 1" bind o "_windowed_mouse 0"
       Alors "i" activera la capture de la souris et "o" la
       relâchera.



  66..44..  LLee ppaarraammééttrraaggee ""ggoonnffllaanntt"" 33DDffxx ffoonnccttiioonnnnee ééggaalleemmeenntt ssoouuss LLiinnuuxx

  Vous pouvez avoir vu ou entendu parler de certain moyens de "gonfler"
  les performances d'OpenGL pour Quake par un paramètrage spécial des
  variables d'environnement. Ces variables sont également valides sous
  Linux. Vous les définissez simplement de façon légèrement différente.
  Si un guide "gonflant" pour Windows/DOS vous indique de faire:




     SET SST_GRXCLK=59





  Sous Linux, réalisez-le de cette manière:


          export SST_GRXCLK=59






  66..55..  LLee nnaavviiggaatteeuurr ddee sseerrvveeuurr dduu ppaauuvvrree

  Joe S. (jszabo@eden.rutgers.edu) suggère:


       Une astuce que j'utilise avec qstat:
       Je créer un fichier de mes serveurs favoris, puis je fais:
       qstat -f /C/quake2/file.txt | less




  Je presse Ctrl z pour arrêter, puis je copie l'adresse IP ou le nom de
  l'hôte 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 ultérieurement...


  66..66..  UUttiilliissaattiioonn ddee lliibb33ddffxxggll..ssoo  ppoouurr QQuuaakkee II****

  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 mêmes restrictions sur l'exécution en
  tant que root s'appliquent ici, de même que les différences entre une
  exécution sous glibc et libc5.Voyez les section ``Quakeworld'' ou
  ``Quake II'' pour de plus amples informations sur lib3dfxgl.so.


  77..  AAddmmiinniissttrraattiioonn



  77..11..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document seront périodiquement postées
  sur comp.os.linux.answers et rec.games.computer.quake.misc.  Elles
  pourront également être téléchargées sur de nombreux sites WWW et FTP,
  y compris la Page d'accueil LDP.
  Les nouvelles versions de ce document seront périodiquement postées
  sur rec.games.computer.quake.misc et comp.os.linux.misc.

  La dernière version du HOWTO Quake Linux peut toujours être trouvée
  sur les sites suivants:


  ·  http://www.linuxquake.com/

  ·  http://webpages.mr.net/bobz/

  ·  http://www.linuxgames.com/quake


  77..22..  AAuuttrreess ffoorrmmaattss ddee ccee DDooccuummeenntt

  Ce document est disponible dans une grande variété de formats
  différents.  Beaucoup plus que nécessaire, 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 français sur votre miroir
  national préféré :-)).

  ·  ASCII text

  ·  ASCII text with backspace-overstrikes approprié pour une
     visualisation par mmaann((11))

  ·  HTML tout zippé et prêt à être inséré 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!)


  77..33..  PPoolliittiiqquuee ddee DDiissttrriibbuuttiioonn


  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 même 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, même 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 détails.


  77..44..  HHiissttoorriiqquuee ddeess rréévviissiioonnss

  Les différentes parties de ce document qui ont été modifiées dans la
  dernière révision ont un ** derrière le titre de la section. Les
  parties modifiées dans une révision antérieure à la dernière en date
  sont identifiables par un ++.
  Vous trouverez ci-dessous l'historique complet des révisions de ce
  document. Non pas dans le but d'être utile à tous, mais aux auteurs de
  ce document (Ndt: en conséquence 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 français par Sebastien Bricout, sbricout@francemel.com
  <mailto:sbricout@francemel.com> Traduit le 3 juillet 1999
  ______________________________________________________________________

  Table des matières


  1. Introduction

  2. Overview

  3. Information générale

     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-tête
     6.4 Prep
     6.5 Compiler
     6.6 Installation
     6.7 Scripts d'installation/désinstallation optionnels
     6.8 Fichiers
     6.9 Le compiler
        6.9.1 L'arborescence du répertoire des sources
        6.9.2 Test de la compilation
        6.9.3 Générer 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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  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 système 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 installés et suivis et les
  sources recompilées simplement. Il maintient aussi une base de donées
  de tous les paquetages et de leurs fichiers qui peut être utilisée
  pour vérifer 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'intéresser à RPM et à l'utiliser pour leur
  propre distribution. RPM est complètement flexible et simple
  d'utilisation, bien qu'il fournisse la base d'un système très
  puissant. Il est aussi complètement ouvert et disponible, bien que
  nous appréciions les rapports de bugs et les correctifs. La permission
  d'utiliser et distribuer RPM gratuitement est admise conformément à la
  GPL.

  Une documentation plus complète est disponible sur RPM dans le livre
  d'Ed Bailey, Maximum RPM. Ce livre est disponible pour le
  téléchargement ou l'achat sur www.redhat.com http://www.redhat.com/
  <http://www.redhat.com/>.



  22..  OOvveerrvviieeww

  Premièrement, laissez-moi décrire la philosophie de RPM. Un but de
  l'étude était de permettre l'utilisation des sources "de base". Avec
  RPP (notre ancien système de paquetages duquel rien de RPM n'est
  dérivé), nos paquetages sources étaient des sources "bidouillées" à
  partir desquelles nous compilions.  Théoriquement, quelqu'un peut
  installer un RPP source puis le compiler sans prblèmes. Mais les
  sources n'étaient pas les originales, et il n'y avait pas de référence
  comme quels changements avsions nous fait pour que les sources
  compilent. Il devait télécharger les sources de base séparément. 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 nécessairement 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 défaut de compilation sont facilement visibles par ce moyen.

  RPM est aussi conçu pour avoir de puissantes options de reqûete. Vous
  pouvez chercher à travers la base de données entière 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-mêmes sont des archives compressées, mais vous pouvez
  interroger des paquetages individuels simplement et rapidement grâce à
  un en-tête binaire spécial ajouté au paquetage avec tout ce dont vous
  pouvez avoir besoin de savoir sur le contenu sous forme non-
  compressée. Cela permet des requêtes plus rapides.

  Une autre fonctionnalité puissante est la capacité de vérifier des
  paquetages. Si vous avez peur d'avoir effacé un fichier important pour
  un paquetage, vérifiez-le simplement. Vous serez avertis des
  anomalies. A ce stade, vous pouvez réinstaller le paquetage so
  nécessaire. Les fichiers de configuration que vous aviez sont bien sûr
  préservés.

  Nous aimerions remercier les gens de la distribution BOGUS pour
  beaucoup de leurs idées et concepts qui sont inclus dans RPM. Quoique
  RPM ait été complètement écrit par RedHat Software, ses fonctions sont
  basées sur le code écrit par BOGUS (PM et PMS).






  33..  IInnffoorrmmaattiioonn ggéénnéérraallee



  33..11..  SSee pprrooccuurreerr RRPPMM

  Le meilleur moyen de se procurer RPM est d'installer RedHat Linux. Si
  vous ne le voulez pas, vous pouvez tout de même 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>.



  33..22..  CCee qquuee RRPPMM rreeqquuiieerrtt

  Ce qui est principalement requis pour faire tourner RPM est cpio 2.4.2
  ou supérieur. Quoique ce système soit conçu pour être utilisé avec
  Linux, il peut très bien être porté sur d'autres systèmes Unix. Il a,
  en fait, été compilé sur SunOS, Solaris, AIX, Irix, AmigaOS, et
  d'autres. Faites attention, les paquetages binaires générés sur un
  système Unix de type différent 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.



  44..  UUttiilliisseerr RRPPMM

  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 désinstallation d'un paque­
  tage:



                       rpm -e foobar




  Une des plus complexes mais très utile des commandes vous permet
  d'installer des paquetages via FTP. Si vous êtes connectés à internet
  et voulez installer un nouveau paquetage, tout ce que vous avez besoin
  de faire est de spécifier 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 façons 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 détails sur ce que font ces options dans
  la page de man de RPM.


  55..  QQuuee ppuuiiss--jjee vvrraaiimmeenntt ffaaiirree aavveecc RRPPMM ??

  Rpm est un utilitaire très 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/désinstallation plus haut, alors voici plus d'exemples :


  ·  Imaginez que vous ayez effacé des fichiers par accident, mais que
     vous ne soyez pas sûr que vous les avez effacé. Si vous ne voulez
     pas vérifier votre système 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 créatifs peuvent être proches
  de ce que vous pouvez vraiment faire en étant familier de RPM.



  66..  CCoommppiilleerr ddeess RRPPMMss

  Compiler ses RPMs est très simple, spécialement si vous pouvez obtenir
  du logiciel que vous essayez qu'il se compile tout seul.

  La procédure de base pour compiler un RPM est la suivante :


  ·  Assurez-vous que votre fichier /etc/rpmrc est paramétré pour votre
     système.

  ·  Récupérez les sources donc vous compilez le RPM pour la compilation
     sur votre système.

  ·  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.



  66..11..  LLee ffiicchhiieerr rrppmmrrcc

  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-tête du fichier spec
  lui-même. Pour désactiver 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 définir cela
  ici ou plus tard, dans l'en-tête du fichier spec. Quand vous compilez
  pour une distribution particulière, il est conseillé de s'assurer que
  cette ligne est correcte, bien que ça ne soit pas requis. La ligne
  vendor fonctionne selon le même principe, mais peut être n'importe
  quoi (ex: Joe's Software and Rock Music Emporium).

  RPM supporte aussi maintenant la création de paquetages sur des
  architectures multiples. Le fichier rpmrc peut conserver une variable
  "optflags" pour compiler ce qui requiert des options spécifiques à
  l'architecture durant la compilation. Voir plus loin les paragraphes
  concernant l'utilisation de cette option.

  En supplément des macros ci-dessus, il y en a beaucoup plus. Vous
  pouvez utiliser :



               rpm --showrc




  pour savoir comment vos options sont définies et quels sont les
  options disponibles.



  66..22..  LLee ffiicchhiieerr SSppeecc

  Nous avons commencé à parler du fichier spec. Les fichiers spec sont
  requis pour construire un paquetage. Le fichier spec est une
  description du logiciel accompagnée des instructions concernant sa
  compilation, ainsi qu'une liste des fichiers pour tous les binaires
  qui seront installés.

  Il est recommandé nommer votre fichier spec conformément à une
  convention standard, c'est à dire nom_du_paquetage-numéro_de_version-
  numéro 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
       ______________________________________________________________________






  66..33..  LL''eenn--ttêêttee

  L'en-tête comporte des champs standard que vous devez remplir. Il y a
  quelques restrictions bien sûr. 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 numéro de release pour un paquetage d'une même
     version (par exemple si vous construisez un paquetage et que vous
     le trouvez qu'il est légèrement râté et que vous souhaitez le
     reconstruire, le paquetage suivant aura le numéro de release 2).


  ·  Icon: c'est le nom du fichier icône 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 répertoire SOURCES.

  ·  Source: Cette ligne pointe sur l'emplacement d'origine des sources
     de base. Il est utilisé si vous voulez réobtenir les sources ou
     regarder si il existe une version plus récente. Restriction: le nom
     du fichier dans cette ligne doit concorder avec le nom du fichier
     que vous avez sur votre propre système (c'est à dire ne pas
     télécharger les sources et changer le nom du fichier). Vous pouvez
     aussi spécifier 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 répertoire SOURCES (la structure des
  répertoires est abordée dans un autre paragraphe, "L'arborescence du
  répertoire des sources".)


  ·  Patch: C'est l'emplacement où vous pouvez trouvez le patch si vous
     voulez le retélécharger. 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
     même façon 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 répertoire SOURCES.


  ·  Copyright: Cette ligne indique la façon dont le package est protégé
     légalement. Vous pouvez utiliser quelque chose comme GPL, BSD, MIT,
     public domain, Distributable, ou commercial.

  ·  Buildroot: Cette ligne vous permet de spécifier un répertoire 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 utilisée pour donner aux programmes
     d'installation de haut niveau l'emplacement de ce paquetage dans
     leur structure hiérarchique. La arborescence des groupes ressemble
     actuellement à :



  ______________________________________________________________________
  Applications
          Communications
          Editeurs
                  Emacs
          Ingéniérie
          Tableurs
          Bases de données
          Graphiques
          Réseau
          Mail
          News
          Publication
                  TeX
  Base
          Noyau
  Utilitaires
          Archive
          Console
          Fichiers
          Système
          Terminal
          Texte
  Démons
  Documentation
  X11
          XFree86
                  Serveurs
          Applications
                  Graphiques
                  Réseau
          Jeux
                  Stratégie
                  Vidéo
          Amusements
          Utilitaires
          Librairies
          Gestionnaires de fenêtres
  Librairies
  Réseaux
          Admin
          Démons
          News
          Utilitaires
  Développement
          Débuggeurs
          Librairies
                  Libc
          Langages
                  Fortran
                  Tcl
          Construction
          Contrôle de version
          Utilitaires
  Shells
  Jeux
  ______________________________________________________________________





  ·  %description Ce n'est pas pas vraiment un champ de l'en-tête, mais
     doit être décrit 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.



  66..44..  PPrreepp

  C'est la seconde section du fichier spec. Il est utilisé pour préparer
  les sources à la compilation. Vous mettez ce que vous avez besoin de
  faire pour patcher les sources et paramétrer, comme ce que vous
  mettriez pour compiler les sources.

  Une chose importante: chacune de ces sections est simplement un
  emplacement pour exécuter des scripts shell. Vous pourriez simplement
  faire un script sh et le mettre après le tag %prep pour décompresser
  et patcher vos sources. Nous avons conçu des macros pour aider à cela,
  toutefois.

  La première de ces macros est %setup. Dans sa forme la plus simple
  (pas d'options de ligne de commande), elle décompresse simplement les
  sources et se rend dans le répertoire des sources. Elle prend aussi
  les options suivantes :


  ·  -n nom va définir le nom du répertoire de compilation. La valeur
     par défaut est $NAME-$VERSION. D'autres possibilités, parmi
     lesquelles $NAME, ${NAME}${VERSION}, ou n'importe quoi utilisé par
     le fichier tar principal. (Notez que ces variables "$" ne sont pas
     des variables réelles disponibles à l'intérieur du fichier spec .
     En réalité, elles sont juste utilisées ici à la place du nom de
     l'exemple. Il est nécessaire d'utiliser les vrais noms et versions
     dans votre paquetage, et non une variable.)


  ·  -c va créer et se rendre dans le répertoire donné avant de
     détarrer.


  ·  -b # va détarrer Source# avant de se rendre dans le répertoire (et
     cela n'a aucun sens avec -c donc ne les associez pas). C'est utile
     seulement avec de multiples fichiers source.


  ·  -a # va détarrer Source# après s'être rendu dans le répertoire.


  ·  -T Cette option supplante l'action par défaut de détarrer le Source
     et requiert un -b 0 ou -a 0 pour détarrer le fichier source
     principal. Vous en aurez besoin quand il y a des sources
     secondaires.


  ·  -D N'efface pas le répertoire avant la décompression. C'est
     seulement utilse où vous avez plus d'un macro setup Cela doit être
     utilisé uniquement dans les macros setup après la première (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, listées ici :


  ·  # va appliquer Patch# comme fichier patch


  ·  -p # spécifie le nombre de répertoires à éliminer pour la commande
     patch(1) (NdT: option -p).
  ·  -P L'action par défaut est d'appliquer Patch (ou Patch0). Ce
     paramètre inhibe ce comportement par défaut et requierrera un 0
     pour détarrer le fichier. Cette option est très utile en seconde
     (ou plus) macro %patch qui requiert un numéro différent de la
     première macro.


  ·  Vous pouvez aussi faire %patch# au lieu de faire la commande
     réelle: %patch # -P

  Ce sont toutes les macros dont vous avez besoin. Après que vous les
  ayez faites, vous pouvez également faire un autre réglage dont vous
  avez besoin via un script sh. Tout ce que vous incluez jusqu'à de la
  macro %build (évoquée dans la section suivante) est exécuté par sh.
  Regardez l'exemple plus haut afin de vous donner une idée du genre de
  choses que vous pouvez faire ici.


  66..55..  CCoommppiilleerr

  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 détarré les sources, patchées celles-ci, et
  vous être rendu dans le répertoire. C'est juste un autre ensemble de
  commandes passées à sh, donc n'importe quelle commande acceptée par sh
  peut être placée ici (y compris des commentaires). Votre répertoire de
  travail courant est rétabli dans ces sections au répertoire racine des
  cources, gardez cela en mémoire. Vous devez changer de répertoire pour
  atteindre les sous-répertoires si nécessaire.



  66..66..  IInnssttaallllaattiioonn

  De même, 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. Considérez que votre répertoire courant est
  le répertoire racine de vos sources.


  66..77..  SSccrriippttss dd''iinnssttaallllaattiioonn//ddééssiinnssttaallllaattiioonn ooppttiioonnnneellss

  Vous pouvez mettre des scripts qui seront exécutés avant et après
  l'installation et la désinstallation de paquetages binaires. Une des
  principales raison pour ça est la nécessité de lancer /sbin/ldconfig
  après l'installation ou la suppression de paquetages contenant des
  librairies partagées. 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é-désinstallation.


  ·  %postrun est la macro qui fait les scripts de post-désinstallation.

  Le contenu de ces sections doit ressembler à un script sh, sauf que
  vous n'avez pas besoin de #!/bin/sh.
  66..88..  FFiicchhiieerrss

  C'est la section où vous devez lister les fichiers pour le paquetage
  binaire. RPM n'a aucun moyen de connaitre quels fichiers sont
  installés par le "make install". Il n'y a PAS de moyen de le savoir.
  Certains ont suggéré de faire un "find" avant et après l'installation.
  Avec un système multiutilisateur, c'est inacceptable car d'autres
  fichiers qui n'ont rien à voir peuvent être crées pendant le processus
  d'installation.

  Il y a plusieurs macros disponibles pour faire des choses spéciales.
  Elles sont listées et décrites ici:


  ·  %doc est utiliser pour marquer la documentation dans le paquetage
     source que vous voulez installer dans un paquetage binaire. Les
     documents seront installés dans /usr/doc/$NAME-$VERSION-$RELEASE.
     Vous pouvez lister plusieurs documents sur la ligne de commande
     avec cette macro, ou les lister séparément 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 déinstallez par la suite un paquetage contenant des
     fichiers de configuration, les fichiers non modifiés seront
     supprimés et les fichiers modifiés seront conservés avec
     l'extension .rpmsave. Vous pouvez bien sûr mettre plusieurs
     fichiers avec cette macro.


  ·  %files -f nomfichier va vous permettre de lister vos fichiers dans
     un fichier arbitraire à l'intérieur du répertoire 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 spécifiquement.

  Le plus gros inconvénient dans le liste de fichier est la liste des
  répertoire. Si vous listez /usr/bin par accident, votre paquetage va
  contenir tous les fichiers de /usr/bin sur votre système.



  66..99..  LLee ccoommppiilleerr



  66..99..11..  LL''aarrbboorreesscceennccee dduu rrééppeerrttooiirree ddeess ssoouurrcceess

  La première chose dont vous avez besoin est une arborescence de
  compilation bien configurée. C'est configurable dans /etc/rpmrc. La
  plupart des gens utiliseront simplement /usr/src.

  Vous aurez probablement besoin de créer les répertoires suivants pour
  construire l'arborescence de compilation:


  ·  BUILD est le répertoire 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 répertoire où vous mettrez le fichier source tarré
     original et vos patches. C'est là que RPM regarde par défaut.

  ·  SPECS est le répertoire où tous les fichiers spec vont.


  ·  RPMS is le répertoire où RPM va mettre tous ses binaires RPMs
     compilés.



  66..99..22..  TTeesstt ddee llaa ccoommppiillaattiioonn

  La premireè chose que vous voudrez probablement faire est de compiler
  proprement la source sans utiliser RPM. Pour faire cela, décompressez
  les sources, et changez le nom du répertoire en $NAME.orig. Ensuite
  re-décompressez les sources. Utilisez ces sources pour compiler. Allez
  à l'intérieur de celui-ci et suivez les instructions de compilation
  pour le compiler. Si vous devez éditer des choses, vous aurez besoin
  d'un patch. Dès que vous réuississez à le compiler, nettoyez le
  répertoire des sources. Effacez les fichiers qui ont été obtenus par
  le script configure. Ensuite, remontez au répertoire parent. Vous
  ferez ensuite quelque chose comme :



                      diff -uNr dirname.orig dirname > ../SOURCES/dirname-linux.patch




  Cela créera 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 sûrement utiliser quelque
  chose de plus descriptif comme "config" ou "bugs" pour décrire
  pourquoi vous avez dû faire un patch. De plus il est recommandé de
  vérifier dans le fichier patch que vous avez créé que vous n'avez pas
  inclus de binaires par accident avant de l'utiliser.



  66..99..33..  GGéénnéérreerr llaa lliissttee ddeess ffiicchhiieerrss

  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 séquence 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 parallèle avec
  toutes ces étapes. Vous pouvez créer celui de base et remplir ses
  parties les plus simples, et ensuite remplir les autre étapes au fur
  et à mesure.



  66..99..44..  CCoommppiilleerr llee ppaacckkaaggee aavveecc RRPPMM

  Dès que vous avez un fichier spec, vous êtes prêt à essayer et à
  compiler votre paquetage. Le voie la plus utilisée 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 paramètre -b :

  ·  p signifie d'éxécuter simplement la section prep du fichier spec.


  ·  l est un vérificateur de liste qui fait des contrôles sur %files.


  ·  c fait le prep et compile. C'est utile quand vous n'êtes pas sûr du
     tout de la source que vous compilez. Cela semble peu utile parce
     que vous travaillerez avec les sources elles-mêmes jusqu'à ce
     qu'elles compilent et commencerez seulement à travailler avec RPM,
     mais dès 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é crées dans /tmp en utilisant l'option -v.


  ·  --test n'exécute aucune des étapes réelles, mais conserve les
     fichiers temporaires.



  66..1100..  LLee tteesstteerr

  Dès 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 différente de celle
  sur laquelle vous avez construit le paquetage. Après 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 déçu 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
  désinstallé. Vous réinstallerez alors le paquetage binaire et votre
  système 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 installés par eux-
  mêmes.






  66..1111..  QQuuee ffaaiirree aavveecc vvooss nnoouuvveeaauuxx RRPPMMss

  Dès que vous avez construit votre propre rpm de quelque chose (si il
  n'a pas déjà é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/>



  66..1122..  QQuuee ffaaiirree mmaaiinntteennaanntt ??

  Regardez les sections précédentes 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 bénéficie.
  De même, assurez-vous que vous uploadez uniquement des logiciels
  librement redistribuables. Les logiciels commerciaux et les sharewares
  ne doivent pas être uploadés à moins que le copyright le permette
  explicitement. Cela inclut Netscape, ssh, pgp, etc.



  77..  CCoonnssttrruuiirree ddeess RRPPMM ppoouurr pplluussiieeuurrss aarrcchhiitteeccttuurreess

  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 première de
  celles-ci est la directive "optflags" dans /etc/rpmrc. Elle peut être
  utilisée pour positionner des options utilisés durant la compilation
  concernant des valeurs spécifiques à l'architecture. Elles peuvent
  être utilisées pour faire différentes choses qui dépend de
  l'architecture sur laquelle vous compilez. Une fonctionnalité est la
  directive "Exclude" dans le header.



  77..11..  EExxeemmppllee ddee ffiicchhiieerr ssppeecc

  La partie qui suit est extraite du fichier spec pour le paquetage
  fileutils. Il est paramétré 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*
  ______________________________________________________________________






  77..22..  OOppttffllaaggss

  Dans cet exemple, vous pouvez voir comment la directive "optflags" est
  utilisée dans le /etc/rpmrc. Selon l'architecture sur laquelle vous
  compilez, la valeur est donnée à 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 décompression de
  celui-ci et l'examen du Makefile. Ensuite regardez au patch pour le
  Makefile et voyez les changements à faire.



  77..33..  MMaaccrrooss

  la macro %ifarch est très important pour tout cela. LA plupart du
  temps vous autre besoin de faire un patch ou deux qui sera spécifique
  à 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.



  77..44..  EExxcclluurree ddeess aarrcchhiitteeccttuurreess ddeess ppaaqquueettaaggeess

  Comme vous pouvez maintenir les RPMs sources dans un répertoire pour
  toutes les plateformes, nous avons implémenté la capacité d'exclure
  des paquetages d'être compilées 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 compilés. 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-tête 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.



  77..55..  PPoouurr ffiinniirr

  Utilisez RPM pour construire des paquetages multi-architectures est
  habituellement plus simple à faire que d'obtenir du paquetage lui-même
  qu'il compile sur des architectures différentes. 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 problème est de regarder un paquetage source similaire.



  88..  NNoottee ddee CCooppyyrriigghhtt

  Ce document et son contenu sont protégés.  La redistribution de ce
  document est permise tant que le contenu demeure complètement intact
  et inchangé. En d'autres mots, vous pouvez changer le format et le
  réimprimer ou redistribuer seulement.





  Une Bibliographie Linux (The Linux Reading List HOWTO)
  Eric S. Raymond
  Traduction Thierry Le Quéau, thierry.lequeau@wanadoo.fr
  1.2, 29 Novembre 1997

  Ce document donne la liste des livres de référence que je considère
  essentiels pour débuter et programmer sous UNIX (et spécialement sous
  Linux).
  ______________________________________________________________________

  Table des matières


  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 utilisées dans ce document

  2. Approche générale, histoire et pratique.

  3. Livres sur les généralités UNIX/LINUX

     3.1 Installation et administration de Linux
     3.2 Utiliser Unix & Linux
     3.3 Sécurité du système

  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 systèmes en C

  7. Livres sur le réseau

  8. Livres sur l'implémentation du noyau sous Unix

     8.1 Ancêtres de Linux
     8.2 Linux
     8.3 Relatifs à Linux

  9. Livres sur l'architecture et la programmation des processeurs Intel

  10. Livres sur le matériel PC

  11. Aspects administratifs

     11.1 Conditions d'utilisations
     11.2 Historique


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn





  11..11..  BBuutt ddee ccee ddooccuummeenntt

  Ce document donne la liste des livres de référence que je considère
  essentiels pour débuter et programmer sous UNIX (et spécialement sous
  Linux).



  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  De nouvelles versions de ce document seront postées régulièrement 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 française est disponible sur
  <http://www.freenix.fr/linux/HOWTO>.

  Vous pouvez aussi voir la dernière version à l'adresse
  <http://sunsite.unc.edu/LDP/HOWTO/Reading-List-HOWTO.html>.


  11..33..  JJooiinnddrree ll''aauutteeuurr :: ccoommmmeennttaaiirreess eett ccoorrrreeccttiioonnss

  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.



  11..44..  AAuuttrreess rreessssoouurrcceess

  Pour les HOWTOs en ligne, magazines et autres supports voyez à
  l'adresse du Linux Documentation Project
  <http://sunsite.unc.edu/LDP/HOWTO>.  En français :
  <http://www.freenix.fr/linux/HOWTO>.

  Il y a quelques années j'ai écrit une bibliographie sur UNIX, moins
  axée sur LINUX, qui présente encore quelque intérêt et peut prêter à
  sourire. Vous pouvez trouver la "Loginataka" à l'adresse
  <http://www.ccil.org/~esr/faqs/loginataka.html>.


  11..55..  CCoonnvveennttiioonnss uuttiilliissééeess ddaannss ccee ddooccuummeenntt

  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
  prédécesseur).  Les commentaires envoyés par d'autres personnes sont
  entre guillemets, précédés du nom de leur auteur. (JH = Jim Haynes).

  Les URLs "voir" apparaissant à côté des informations sur la
  publication renvoient au catalogue en ligne de la maison d'édition et
  pointent généralement sur une page contenant une vue de la couverture,
  une brève description et un formulaire de commande. Certains ouvrages
  ne l'on pas, parce que le site web utilise des cadres rendant
  impossible l'accès direct à la page concernée.Pour les livres édités
  par Addison-Wesley, l'url vous amène sur la page de garde, le chemin
  amenant jusqu'au livre semblant poser problème aux sgml-tools.

  Les différents sujets sont d'abord traités de manière générale.  Les
  sections suivantes aprofondiront le sujet. (dans l'ordre :
  généralités, programmation au niveau utilisateur, programmation du
  noyau, enfin le matériel.)  J'ai essayé de présenter 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 coïncidence
  embarrassante ! (Toute suggestion pour une meilleure organisation
  acceptée avec plaisir).  NdT: Vous pouvez trouver les Editions
  O'Reilly en français à l'adresse suivante : O'Reilly France
  <http://www.ora.com/www/international/france/index.html>


  22..  AApppprroocchhee ggéénnéérraallee,, hhiissttooiirree eett pprraattiiqquuee..


     TThhee NNeeww HHaacckkeerr''ss DDiiccttiioonnaarryy ((TThhiirrdd EEddiittiioonn))
        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
        Française : "Le Cyberlexis, dictionnaire du jargon
        informatique", 1997,Edition Masson, 345FF


     AA QQuuaarrtteerr CCeennttuurryy ooff UUnniixx
        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).


     TThhee MMyytthhiiccaall MMaann MMoonntthh ((AAnnnniivveerrssaarryy EEddiittiioonn))
        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 réalisme et le bon sens des
        projets proposés." 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 française : "Le
        Mythe du mois-homme" 1996, Edition Inter. Thomson, 240FF.


     BBeellll SSyysstteemm TTeecchhnniiccaall JJoouurrnnaall,, JJuullyy--AAuugguusstt 11997788,, VVooll.. 5577,, NNoo.. 66,,
        ppaarrtt 22
        AT&T; 416 pp.

        Plusieurs articles sur les débuts d'Unix, notamment : Ritchie &
        Thompson, "The UNIX Time Sharing System"; Thompson, "UNIX
        Implementation"; Richie, "A Retrospective"; Bourne, "The UNIX
        Shell"...


  33..  LLiivvrreess ssuurr lleess ggéénnéérraalliittééss UUNNIIXX//LLIINNUUXX



  33..11..  IInnssttaallllaattiioonn eett aaddmmiinniissttrraattiioonn ddee LLiinnuuxx


     LLiinnuuxx IInnssttaallllaattiioonn aanndd GGeettttiinngg SSttaarrtteedd
        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 système.


     LLiinnuuxx SSyysstteemm AAddmmiinniissttrraattoorr''ss GGuuiiddee
        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 débuter. On y trouve comment entretenir
        et administrer un système Linux.


     EEsssseennttiiaall SSyysstteemm AAddmmiinniissttrraattiioonn ((SSeeccoonndd EEddiittiioonn))
        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 tâches normales
        d'administration système. Ce n'est pas un livre exclusivement
        sur Linux mais il contient des infos sur le matériel.
        Version française de ce livre : Les bases de l'administration
        système.  ISBN : 2-84177-008-7; 768 pages, 320 francs.



  33..22..  UUttiilliisseerr UUnniixx && LLiinnuuxx


     LLiinnuuxx iinn aa NNuuttsshheellll
        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'après "The Desktop Reference for Linux" de O'Reilly.  Pour les
        utilisateurs de Linux, cet ouvrage rend obsolète l'édition "Unix
        in a Nutshell" qui était orientée stations SVR4/Solaris.


     RRuunnnniinngg LLiinnuuxx ((SSeeccoonndd EEddiittiioonn))
        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 système Linux. Excellent livre pour débutants.
        Version française : "Linux mode d'emploi" 1996, Edition Sybex,
        436p, 79FF.



  33..33..  SSééccuurriittéé dduu ssyyssttèèmmee


     PPrraaccttiiccaall UUnniixx SSeeccuurriittyy
        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 sécurité, et
        spécialement pour ceux qui veulent créer un serveur sous Linux
        accessible par de multiples utilisateurs via le net."


     FFiirreewwaallllss && IInntteerrnneett SSeeccuurriittyy
        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 sécurité sur Internet" en français mais qui n'a rien à voir
        avec l'édition anglaise.
  44..  LLiivvrreess ssuurr lleess sshheellll,, lleess llaannggaaggeess ddee ccoommmmaannddeess,, llaa pprrooggrraammmmaattiioonn
  WWeebb


     PPrrooggrraammmmiinngg PPeerrll ((SSeeccoonndd EEddiittiioonn))
        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 archaïque), Vive
        Perl !  C'est la seconde édition du livre sur Perl, bien mieux
        organisée que la première et elle intègre Perl 5.
        Version française : "Programmation en Perl 2e édition" ISBN :
        2-84177-004-4, 710 pages, 280 francs.


     PPrrooggrraammmmiinngg PPyytthhoonn
        Lutz, Mark; O'Reilly; 1997; ISBN 0-56592-197-6; 880pp.
        Voir  <http://www.ora.com/catalog/python/noframes.html>.

        Etape suivante après Perl. Belle présentation de Python, avec
        une meilleure intégration de C, il est plus adapté aux projets
        d'envergure.


     HHTTMMLL :: TThhee DDeeffiinniittiivvee GGuuiiddee ((22nndd EEddiittiioonn))
        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 référence que je connaisse, et le seul
        livre sur le HTML dont vous ayez besoin à moins de vouloir
        utiliser le CGI (Common Gateway Interface).


     TThhee UUnniixx PPrrooggrraammmmiinngg EEnnvviirroonnmmeenntt
        Kernighan, Brian, and Pike, Rob; Prentice-Hall; 1984; ISBN
        0-13-937681-X; 1984.

        Un pur classic, sans doute la meilleure présentation en un seul
        volume de la philosophie UNIX.
        Version française : "L'environnement de programmation UNIX"
        1986, International Edition, 376p, 259FF.


  55..  LLiivvrreess ssuurr lleess ééddiitteeuurrss ddee tteexxttee


  55..11..  TTeeXX eett LLaaTTeeXX



     TThhee LLaaTTeeXX CCoommppaanniioonn
        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 à créer les plus beaux documents sans devenir un
        expert, alors ce guide est pour vous (tiré de la préface).
        Bruce Thompson ajoute : "Un très 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."

     LLaaTTeeXX:: AA DDooccuummeenntt PPrreeppaarraattiioonn SSyysstteemm ((SSeeccoonndd EEddiittiioonn))
        Lamport, Leslie; Addison-Wesley; 1994; ISBN 0-201-52983-1;
        256pp.
        Voir  <http://cseng.aw.com/>.

        Bruce Thompson : "Le top des références sur LaTeX 2.09 par son
        auteur. Une nouvelle édition couvrant LaTeX2e est en préparation
        (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 préparation de document et les différents outils pour les
        produire avec une qualité professionnelle.  De nombreux
        exemples."



     TThhee TTeeXXbbooookk,, VVoolluummee AA ooff CCoommppuutteerrss aanndd TTyyppeesseettttiinngg
        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 référence). Vous n'en aurez
        probablement jamais besoin pour utiliser TeX de manière normale,
        mais il reste toutefois un livre fascinant." Je rajouterais que
        ce livre ne s'adresse pas aux néophytes, à réserver aux experts
        de TeX.


     TThhee MMEETTAAFFOONNTT bbooookk,, VVoolluummee CC ooff CCoommppuutteerrss aanndd TTyyppeesseettttiinngg
        Knuth, Donald A.; Addison-Wesley; 1986; 0-201-13444-6, 1986;
        384pp.
        Voir  <http://cseng.aw.com/>

        Bruce Thompson : "Le guide définitif et complet sur METAFONT,
        une extension de TeX pour la création de polices de caractères.
        Un excellent ouvrage si vous projetez de créer 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 néophytes, pro only !



  66..  LLiivvrreess ssuurr llaa pprrooggrraammmmaattiioonn eenn CC eett CC++++


  66..11..  CC eett CC++++


     TThhee CC PPrrooggrraammmmiinngg LLaanngguuaaggee ((SSeeccoonndd EEddiittiioonn))
        Kernighan, Brian W.; Ritchie, Dennis M; Prentice-Hall; 1988;
        ISBN 0-13-110362-8, 272pp.

        Une seconde édition améliorée et inspirée du livre édité par le
        créateur du C "K & R", incluant ANSI C. Toujours le meilleur !
        Version française : "Le langage C norme ANSI" seconde édition,
        1997, Edition Masson, 296p, 195FF.


     WWhhoo''ss AAffrraaiidd ooff CC++++ ??
        Heller, Steve; Academic Press; 1996; ISBN 0-12-339097; 508pp.

        Le meilleur livre d'initiation sur la programmation en C++ que
        je connaisse.



  66..22..  LL''iinntteerrffaaccee ddeess aappppeellss ssyyssttèèmmeess eenn CC


     PPOOSSIIXX PPrrooggrraammmmeerr''ss GGuuiiddee :: WWrriittiinngg PPoorrttaabbllee UUnniixx PPrrooggrraammss
        Lewine, Donald; O'Reilly; 1992; ISBN 0-937175-73-0; 607pp.
        Voir  <http://www.ora.com/catalog/posix/noframes.html>.

        Une excellente référence pour tout programmeur sous POSIX.1.  Je
        préfère ce titre à celui choisi par JH.


     TThhee PPoossiixx..11 SSttaannddaarrdd :: AA PPrrooggrraammmmeerr''ss GGuuiiddee
        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 aussitôt dit de me procurer un
        livre sur POSIX, qui reflétait 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."


  77..  LLiivvrreess ssuurr llee rréésseeaauu



     UUnniixx NNeettwwoorrkk PPrrooggrraammmmiinngg
        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 même sûrement au
        delà (vraiment, XNS!?). Bien qu'il soit antérieur au web, il
        constitue une référence pour ses bases.


     LLiinnuuxx NNeettwwoorrkk AAddmmiinniissttrraattoorr''ss GGuuiiddee
        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
        associés 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 française : "Administration réseaux sous Linux" 1995,
        Edition O'Reilly, 336p, 220FF.


     TTCCPP//IIPP NNeettwwoorrkk AAddmmiinniissttrraattiioonn
        Hunt, Craig; O'Reilly Associates, ISBN 0-937175-82-X; 1992;
        472pp.
        Voir  <http://www.ora.com/catalog/tcp2/noframes.html>.

        Moins spécifique à Linux que le livre de Kirch. Développe le
        TCP/IP en profondeur, incluant le routage et BGP.  Version
        française : "Administration de réseaux" 1995, Edition Eddison
        Wesley, 576p, 348FF.


     DDNNSS aanndd BBIINNDD ((SSeeccoonndd EEddiittiioonn))
        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 sophistiquées en réseau relié au
        net. Couvre aussi la programmation des librairies BIND.


     SSeennddmmaaiill ((SSeeccoonndd EEddiittiioonn))
        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 défaut sur
        UNIX et LINUX.


  88..  LLiivvrreess ssuurr ll''iimmpplléémmeennttaattiioonn dduu nnooyyaauu ssoouuss UUnniixx


  88..11..  AAnnccêêttrreess ddee LLiinnuuxx


     TThhee DDeessiiggnn ooff tthhee UUnniixx OOppeerraattiinngg SSyysstteemm
        Bach, Maurice J.; Prentice-Hall; ISBN 0-13-201799-7; 470pp.; $60
        (USA).

        Le livre qui a permis à Linus de débuter.
        Version française : "Conception du système UNIX" 1989, Edition
        Masson, 512p, 459FF.


     OOppeerraattiinngg SSyysstteemmss,, DDeessiiggnn aanndd IImmpplleemmeennttaattiioonn;;
        Tanenbaum, Andrew S.; Prentice-Hall; 1987.

        Un livre apprécié d'Alan Cox (un des concepteurs du noyau).
        Tanenbaum a conçu Minix que Linus a remodelé pour en faire
        Linux.
        Version française : "Système d'exploitation, systèmes
        centralisés, systèmes distribués" 1994, International Edition,
        848p, 357FF.


  88..22..  LLiinnuuxx


     LLiinnuuxx KKeerrnneell HHaacckkeerrss'' GGuuiiddee
        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>.


     LLIINNUUXX KKeerrnneell IInntteerrnnaallss
        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,
        légèrement périmé.


  88..33..  RReellaattiiffss àà LLiinnuuxx


     TThhee DDeessiiggnn aanndd IImmpplleemmeennttaattiioonn ooff tthhee 44..44BBSSDD UUnniixx OOppeerraattiinngg SSyysstteemm
        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'implémentation du noyau de BSD
        4.3, qui a influencé le concept de Linux (spécialement pour les
        sockets et travail sur internet).  Ce livre couvre les bases de
        BSD 4.4 pour BSD/OS, FreeBSD et NetBSD.


     PPoorrttiinngg UUnniixx ttoo tthhee 338866
        Jolitz, William F., and Jolitz, Lynne G.; Dr. Dobb's Journal;
        Jan 1991-July 1992.


  99..  LLiivvrreess ssuurr ll''aarrcchhiitteeccttuurree eett llaa pprrooggrraammmmaattiioonn ddeess pprroocceesssseeuurrss
  IInntteell


     8800338866 PPrrooggrraammmmeerr''ss RReeffeerreennccee MMaannuuaall
        Intel Corp.; ISBN 1-55512-022-9; 1986.

        1ère partie : Programmation des applications, les types de
        données, Les modèles d'adressage, mode d'emploi.  2ème partie :
        Programmation des systèmes, architecture, gestion de la mémoire,
        protection, multi-taches, Entrée/Sortie, exceptions et
        interruptions, initialisation, co-processeur et multi-
        processeur.  3ème partie : Compatibilité avec les machines plus
        anciennes x86.  4ème partie : Manuel des instructions.


     8800338866 SSyysstteemm SSooffttwwaarree WWrriitteerr''ss GGuuiiddee
        Intel Corp.; ISBN 1-55512-023-7; 1987.

        Ce livre explique les caractéristiques du 386 pour les
        programmeurs de système d'exploitation.  Il contient un chapitre
        sur l'implémentation d'Unix. Beaucoup d'architectures basées sur
        le 80386 semblent avoir été prévues avec Multics, les
        caractéristiques ne sont pas compatibles avec DOS et UNIX.


     PPrrooggrraammmmiinngg tthhee 8800338866
        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.


     PPeennttiiuumm PPrroocceessssoorr UUsseerr''ss MMaannuuaall :: VVoolluummee 33,, AArrcchhiitteeccttuurree aanndd PPrroo­­
        ggrraammmmiinngg
        Manual" Intel Corp.; 1993; ISBN 1-55512-195-0;

        A peu de choses près la version Pentium du manuel de référence
        listé ci-dessus.


  1100..  LLiivvrreess ssuurr llee mmaattéérriieell PPCC

  Note : ces livres ont quatre ou cinq ans et sont probablement
  dépassés. Le matériel n'est pas ma tasse de thé...


     8800338866 HHaarrddwwaarree RReeffeerreennccee MMaannuuaall
        Intel Corp.; 1986; ISBN 1-55512-024-5;

        Connections des pin, synchronisation, type d'ondulation,
        diagrammes de bloc, voltages, toutes ces sortes de choses.
     TThhee IInnddiissppeennssaabbllee PPCC HHaarrddwwaarree BBooookk
        Messmer, Hans-Peter; Addison-Wesley; 1993; ISBN 0-201-62424-9;
        1000 pp.

        JH : "Couvre les plus récentes technologies comme les bus EIDE
        et PCI."


  1111..  AAssppeeccttss aaddmmiinniissttrraattiiffss


  1111..11..  CCoonnddiittiioonnss dd''uuttiilliissaattiioonnss

  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 numéro de version et la date.

  ·  Ne supprimiez ou modifiez pas le lien vers la version actuelle sur
     le Web.

  ·  Marquiez clairement toute version condensée ou altérée comme telle.

  Ces restrictions visent à protéger les lecteurs potentiels de versions
  dépassées ou déformées. Si vous pensez avoir un motif justifiant une
  exception, contactez-moi.


  1111..22..  HHiissttoorriiqquuee

  Ceci était à l'origine un mini-HOWTO géré par Jim Haynes. J'en ai
  changé un peu la teneur, essayant d'en faire un document plus autonome
  et moins dépendant des divers articles bibliographiques de USENET. Les
  minicommentaires non attribués sont plutôt les miens que les siens.
  Les rajouts pour la version française 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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  OOuu ttrroouuvveerr uunnee ccooppiiee aa jjoouurr ddee ccee ddooccuummeenntt..

  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/>

  11..22..  BBoogguueess

  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 cckkrraaiidd sur le peripherique mmdd
  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 rreeeell 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
  OOKK, 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
  ffiinnaallrrdd similaire a iinniittrrdd, et un mmddrroooottssttoopp qui  ecrit  les  drapeaux
  cclleeaann  (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 !

  11..33..  RReemmeerrcciieemmeennttss

  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  RREECCEETTTTEESS 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 iinniittrrdd..mmdd  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  RRAAIIDD  mmoonnttee  ssuurr  llaa  rraacciinnee  _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.

  11..44..  NNoottee ddee ccooppyyrriigghhtt

  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.

  22..  CCee ddoonntt vvoouuss aavveezz bbeessooiinn AAVVAANNTT DDEE CCOOMMMMEENNCCEERR

  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.

  22..11..  PPaaqquueettaaggeess nneecceessssaaiirreess

  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/>

  22..22..  AAuuttrreess iimmpplleemmeennttaattiioonnss ssiimmiillaaiirreess..

  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    iinniittrrdd..mmdd..ttaarr..ggzz   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>

  22..33..  DDooccuummeennttaattiioonn ---- lleeccttuurreess rreeccoommmmaannddeeeess

  VVeeuuiilllleezz lliirree ::

       //uussrr//ssrrcc//lliinnuuxx//DDooccuummeennttaattiioonn//iinniittrrdd..ttxxtt

  ainsi  que  la  documentation  et les pages de manuel qui accompagnent
  l'ensemble raidtools. En particulier, lisez mmaann  mmddaadddd  ainsi  que  le
  document QQuuiicckkSSttaarrtt..RRAAIIDD inclus dans le paquetage raidtools.

  22..44..  RReessssoouurrcceess ssuurr RRAAIIDD

  +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 ssuubbssccrriibbee rraaiiddddeevv

     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 ssuubbssccrriibbee lliinnuuxx--rraaiidd

     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_)

  33..  _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.

  33..11..  RRaappppeell ddee sseeccuurriittee

  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 !

  33..22..  CCoonnssttrruuccttiioonn dduu nnooyyaauu eett ddeess oouuttiillss RRAAIIDD

  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 rraaiiddttoooollss et revus en details
  plus loin dans ce document.

  33..33..  ddeemmaarrrraaggee CCoonnssttrruuccttiioonn dduu ssyysstteemmee ddee ffiicchhiieerr _i_n_i_t_r_d  de  secours
  et de

  J'ai utilise la distribution SSllaacckkwwaarree--33..44 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 iiddeennttiiqquuee 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.

  33..44..  DDeebbuutt ddeess iinnssttrruuccttiioonnss ppaass aa ppaass

  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

  33..55..  IInnssttaallllaattiioonn ddee llaa ddiissttrriibbuuttiioonn -- ssppeecciiffiiqquuee aa SSllaacckkwwaarree

  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  (''ttaarrggeett'').  La source est celle a partir de laquelle
  vous faites l'installation habituellement. Selectionnez les paquetages
  que  vous desirez installer et continuez mais NNEE LLAANNCCEEZZ PPAASS 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.

  33..66..  IInnssttaallllaattiioonn ddee LLiinnuuxx pptthhrreeaaddss

  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

  33..77..  IInnssttaallllaattiioonn ddeess oouuttiillss ppoouurr llee RRAAIIDD

  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

  33..88..  nnoouuvveeaauu  ssyysstteemmee  ddee  ffiicchhiieerrss  EEffffaacceemmeenntt  ddeess  rreeppeerrttooiirreess  eett
  ffiicchhiieerrss nnoonn nneecceessssaaiirreess ddaannss llee

  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

  33..99..  CCrreeaattiioonn ddee //ddeevv//mmdd_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

  33..1100..  CCrreeaattiioonn dd''uunn ssyysstteemmee ddee ffiicchhiieerrss nnuu ccoonnvveennaanntt aa _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

  33..1100..11..  CCrreeaattiioonn dduu ssyysstteemmee ddee ffiicchhiieerrss iinniittrrdd 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 !

  33..1100..22..  FFaaiirree qquu''_i_n_i_t_r_d demarre le peripherique RAID - lliinnuuxxrrcc

  Pour  que  la  disquette  de  demarrage  de secours puisse demarrer le
  peripherique RAID, vous n'avez besoin que de copier le fichier  script
  executable :

       lliinnuuxxrrcc

  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

  33..1111..  MMooddiiffiiccaattiioonn ddeess ssccrriippttss rrcc ppoouurr ll''eexxttiinnccttiioonn

  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  mmdd00,  les  partitions  DOS  sont  utilisees  pour
  stocker  l'etat  rraaiiddOOKK  eenn  lleeccttuurree  sseeuullee.  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 rraaiiddssttaatt..rroo.

  Copiez le fichier rc sur votre nouvelle matrice RAID,  le  systeme  de
  fichiers  de secours qui est encore monte sur //rroooott//rraaiiddbboooott//mmnntt et le
  systeme de developpement s'il est sur la meme machine.

  Modifiez le eettcc//ffssttaabb de secours si necessaire et assurez-vous que  le
  mmddttaabb 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 lliinnuuxx..bbaatt
  dans ce qui suit.

  33..1122..   MMiissee  eenn ppllaaccee dduu ddeemmaarrrraaggee aavveecc llooaaddlliinn ppoouurr llee sseeccoouurrss eett llee
  RRAAIIDD

  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').

  44..  CCoonnffiigguurraattiioonn dduu ssyysstteemmee ddee pprroodduuccttiioonn eenn RRAAIIDD

  44..11..  SSppeecciiffiiccaattiioonnss dduu ssyysstteemmee

  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'

  44..22..  PPaarrttiittiioonnnneemmeenntt ddeess ddiissqquueess dduurrss

  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.

  55..  CCoonnssttrruuccttiioonn dduu ssyysstteemmee ddee ffiicchhiieerrss RRAAIIDD

  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

  55..11..   PPrroocceedduurreess  ppaass  aa  ppaass  ppoouurr  llaa  ccoonnssttrruuccttiioonn dd''uunn ssyysstteemmee ddee
  ffiicchhiieerrss RRAAIIDD ddee pprroodduuccttiioonn

  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

  66..  UUnnee ddeerrnniieerree ppeennsseeee

  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>

  77..  AAnnnneexxee AA.. -- eexxttiinnccttiioonn ddee mmdd00 cchheezz BBoohhuummiill CChhaalluuppaa

  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 -----------------

  88..  AAnnnneexxee BB.. -- ffiicchhiieerr rrcc..00 -- rrcc..66 ccoommpplleett

  #! /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

  11..  IInnttrroodduuccttiioonn

  CCooppyyrriigghhtt

  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 pplluuss ssuuppppoorrtteeeess 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.

  22..  LLeess pprroobblleemmeess ccoouurraannttss

  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.

  22..11..  DDyyssffoonnccttiioonnnneemmeenntt ggeenneerraalliissee

  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  eexxttrreemmeemmeenntt  sensibles  et  peuvent  ne  plus  fonctionner  avec
  certains cordons qui ne perturberaient pas d'autres cartes.

  Je le repete donc : certaines cartes sont ttrreess 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.

  22..22..  LLaa lliiggnnee ddee ccoommmmaannddee dduu nnooyyaauu

  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,  lliissttee__ddee__vvaalleeuurrss  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"

  22..33..  UUnn ppeerriipphheerriiqquuee aappppaarraaiitt aa ttoouutteess lleess aaddrreesssseess SSCCSSII

  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.

  22..44..  LLee mmeemmee ppeerriipphheerriiqquuee eesstt rreeccoonnnnuu aa cchhaaqquuee uunniittee llooggiiqquuee

  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  bbllaacckklliisstt  et   se   trouve   dans   le   fichier
  drivers/scsi/scsi.c.   Envoyez  ensuite  le  patch  a  Linus  Torvalds
  <Linus.Torvalds@cs.Helsinki.FI>.

  22..55..  VVoouuss aavveezz ddeess ''sseennssee eerrrroorrss'' aalloorrss  qquuee  vvoouuss  ssaavveezz  qquuee  vvoottrree
  mmaatteerriieell nn''aa ppaass dd''eerrrreeuurrss

  Cela est parfois du a un mauvais  cordon  ou  a  une  terminaison  mal
  adaptee.

  Referez-vous au chapitre ``Dysfonctionnement generalise''.

  22..66..  UUnn nnooyyaauu ccoonnffiigguurree aavveecc ssuuppppoorrtt rreesseeaauu nnee mmaarrcchhee ppaass

  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.

  22..77..  DDeess ppeerriipphheerriiqquueess ssoonntt ddeetteecctteess,,  mmaaiiss  iill  eesstt  iimmppoossssiibbllee  dd''yy
  aacccceeddeerr

  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 mmkknnoodd.

  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

  22..88..  LLee SSCCSSII ssee bbllooqquuee

  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.

  22..99..  CCoonnffiigguurreerr eett rreeggeenneerreerr llee nnooyyaauu

  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  (//ssbbiinn//lliilloo).  Vous pouvez egalement construire une disquette de
  demarrage :

       make zdisk

  22..1100..  LLeess uunniitteess llooggiiqquueess aauuttrreess qquuee llaa pprreemmiieerree nnee ffoonnccttiioonnnneenntt ppaass

  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;

  33..  SSiiggnnaalleerr uunnee aannoommaalliiee

  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.

  33..11..  CCaappttuurree ddeess mmeessssaaggeess SSCCSSII

  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  ccaatt  //pprroocc//kkmmssgg  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
  ddmmeessgg.

  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.

  33..22..  LLooccaalliissaattiioonn ddee ll''oorriiggiinnee dd''uunn ppaanniicc(())

  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  (//ssbbiinn//lliilloo).  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.

  44..  LLeess mmoodduulleess

  Ce chapitre fournit des details specifiques sur le support des modules
  chargeables  et  sur la maniere dont ces modules sont utilises avec le
  SCSI.

  44..11..  IInnffoorrmmaattiioonnss ggeenneerraalleess

  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.

  44..22..  LLee ssuuppppoorrtt ddeess mmoodduulleess ddaannss lleess nnooyyaauuxx 11..22..NN

  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
  rrmmmmoodd), 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.

  44..33..  LLee ssuuppppoorrtt ddeess mmoodduulleess ddaannss lleess nnooyyaauuxx 11..33..NN

  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  CCOONNFFIIGG__SSCCSSII  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).

  55..  CCaarrtteess dd''iinntteerrffaaccee

  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.

  55..11..  MMaatteerriieell ssuuppppoorrttee eett nnoonn ssuuppppoorrttee

  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),

  55..11..11..  CCaarrtteess ccoonnttrroolleeuurr mmuullttiipplleess

  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.

  55..22..  PPrroobblleemmeess hhaabbiittuueellss

  55..22..11..  TTiimmeeoouuttss SSCCSSII

  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.

  55..22..22..  EEcchheecc ddee ll''aauuttoo--ddeetteeccttiioonn ddeess ccaarrtteess  qquuii  ss''aappppuuiieenntt  ssuurr  llee
  BBIIOOSS

  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''.

  55..22..33..  PPaannnneess ddee ccoonnttrroolleeuurrss uuttiilliissaanntt ddeess EE//SS mmaappppeeeess eenn mmeemmooiirree

  (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.

  55..22..44..  kkeerrnneell ppaanniicc :: ccaannnnoott mmoouunntt rroooott ddeevviiccee"" aauu ddeemmaarrrraaggee aavveecc uunnee
  ddiissqquueettttee ddee ddeemmaarrrraaggee ccoommppoorrttaanntt uunn ppiilloottee AALLPPHHAA

  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  dddd ou rraawwrriittee. 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.

  55..22..55..  IInnssttaallllaattiioonn dd''uunn ppiilloottee nnoonn iinncclluuss ddaannss llee nnooyyaauu ddee  llaa  ddiiss--
  ttrriibbuuttiioonn

  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''.

  55..22..66..  IInnssttaallllaattiioonn dd''uunn ppiilloottee qquuii nn''aa ppaass ddee ppaattcchheess

  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''.

  55..22..77..  PPaannnnee dd''uunnee ccaarrttee PPCCII ddaannss uunn ssyysstteemmee CCoommppaaqq

  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.

  55..22..88..  UUnn ssyysstteemmee SSCCSSII aavveecc ddeess ccoonnttrroolleeuurrss PPCCII ssee  bbllooqquuee  aapprreess  llee
  mmeessssaaggee %%dd HHoossttss

  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;
   }

  55..33..  AAddaapptteecc 115522xx,, 115511xx,, 11550055,, 228822xx,, SSoouunndd BBllaasstteerr 1166 SSCCSSII,, SSCCSSII PPrroo,,
  GGiiggaabbyyttee eett aauuttrreess pprroodduuiittss bbaasseess ssuurr ll''AAIICC 66226600//66336600 ((ssttaannddaarrdd))

  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

  55..44..  AAddaapptteecc 115544xx,, AAMMII FFaassttDDiisskk VVLLBB,, DDTTCC 332299xx ((ssttaannddaarrdd))

  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  AAHHAA11554422__SSCCAATTTTEERR 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 AAHHAA11554422__MMAAIILLBBOOXX 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.

  55..55..  AAddaapptteecc 117744xx

  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.

  55..66..  AAddaapptteecc 227744xx,, 228844xx ((ssttaannddaarrdd)) 229944xx ((AALLPPHHAA))

  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.

  55..77..  AAllwwaayyss IINN22000000 ((ssttaannddaarrdd))

  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).

  55..88..  CCaarrtteess ccoonnttrroolleeuurrss mmuullttii--mmaaiittrreess BBuussLLooggiicc

  (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.

  55..99..  LLeess ccoonnttrroolleeuurrss BBuussLLooggiicc FFllaasshhPPooiinntt

  (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>

  55..1100..   SSmmaarrttCCaacchhee  IIVV  eett  SSmmaarrttRRAAIIDD ((ssttaannddaarrdd)) EEAATTAA:: DDPPTT SSmmaarrttCCaacchhee,,
  SSmmaarrttCCaacchhee PPlluuss,, SSmmaarrttCCaacchhee IIIIII,,

  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 :

  eecchhoo ""eeaattaa__ddmmaa llaatteennccyy"" >>//pprroocc//ssccssii//eeaattaa__ddmmaa//<<nnoo__ddrriivveerr>>

  Pour ensuite desactiver les statistiques, faites :

  eecchhoo ""eeaattaa__ddmmaa nnoollaatteennccyy"" >>//pprroocc//ssccssii//eeaattaa__ddmmaa//<<nnoo__ddrriivveerr>>

  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. CCOONNFFIIGG__PPCCII doit etre positionnee si vous utilisez une carte PCI.

  55..1111..  FFuuttuurree DDoommaaiinn 1166xx00 wwiitthh TTMMCC--11880000,, TTMMCC--1188CC3300,, TTMMCC--1188CC5500 oouu  ccoomm--
  ppoossaanntt TTMMCC--3366CC7700

  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.

  55..1122..  NNCCRR55338800 ggeenneerriiqquuee // TT113300BB ((ssttaannddaarrdd))

  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.

  55..1133..  NNCCRR5533cc88xxxx ((ssttaannddaarrdd))

  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. CCOONNFFIIGG__PPCCII doit etre positionnee

  55..1144..  SSeeaaggaattee SSTT00xx//FFuuttuurree DDoommaaiinn TTMMCC--88xxxx//TTMMCC--99xxxx ((ssttaannddaarrdd))

  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  SSTTAATT__MMSSGG
     et  SSTTAATT__CCDD  puis  recompilez  le noyau avec la variable CCOONNTTRROOLLLLEERR
     definie a SSEEAAGGAATTEE et les variables  IIRRQQ  et  OOVVEERRRRIIDDEE  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.

  55..1155..  PPAASS1166 SSCCSSII ((ssttaannddaarrdd))

  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.

  55..1166..  TTrraannttoorr TT112288//TT112288FF//TT222288 ((ssttaannddaarrdd))

  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    ##ddeeffiinnee    PPSSEEUUDDOO__DDMMAA    du    fichier
     drivers/scsi/pas16.c en ##uunnddeeff PPSSEEUUDDOO__DDMMAA.

     Remarquez que cette solution doit  etre  consideree  uniquement  en
     dernier recours, car elle penalise gravement les performances.

  55..1177..  UUllttrraassttoorr 1144ff ((IISSAA)),, 2244ff ((EEIISSAA)),, 3344ff ((VVLLBB)) ((ssttaannddaarrdd))

  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.

  55..1188..  WWeesstteerrnn DDiiggiittaall 77000000 ((ssttaannddaarrdd))

  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''.

  55..1199..  AAMM5533//7799CC997744 ((AALLPPHHAA))

  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)

  55..2200..  qqllooggiicc ((ssttaannddaarrdd))

  He, Drew, ou est ce chapitre (I (D.F.). Je ne  l'ai  vu  que  dans  la
  table des matieres ;-) ?

  66..  DDiissqquueess

  Les informations contenues dans ce chapitre concernent les disques.

  66..11..  MMaatteerriieell ssuuppppoorrttee eett nnoonn ssuuppppoorrttee

  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.

  66..22..  PPrroobblleemmeess ffrreeqquueennttss

  66..22..11..  MMeessssaaggee ''CCyylliinnddrree ssuuppeerriieeuurr aa 11002244''

  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.

  66..22..22..  VVoouuss eetteess iinnccaappaabbllee ddee ppaarrttiittiioonnnneerr ""//ddeevv//hhdd**""

  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.

  66..22..33..  IImmppoossssiibbiilliittee dd''eejjeecctteerr llee mmeeddiiaa dd''uunn ppeerriipphheerriiqquuee aammoovviibbllee

  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.

  66..22..44..   IImmppoossssiibbiilliittee  ddee ddeemmaarrrreerr ddeeppuuiiss uunn ddiissqquuee SSCCSSII eenn uuttiilliissaanntt
  LLIILLOO

  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.

  66..22..55..  FFddiisskk rreeppoonndd ppaarr

       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''.

  66..22..66..  UUnn sseeuull ppeerriipphheerriiqquuee eesstt ddeetteeccttee ssuurr uunnee  ccaarrttee  ppoonntt  ((bbrriiddggee
  bbooaarrdd)) aavveecc pplluussiieeuurrss ppeerriipphheerriiqquueess

  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.

  66..22..77..  LLee ssyysstteemmee ssee ffiiggee eenn sswwaappppaanntt

  La  version 1.1.38 devrait avoir corrige le probleme. Essayez de faire
  une mise a jour de votre pilote.

  66..22..88..  LLeess ddiissqquueess CCoonnnneerr CCFFPP11006600SS ssoonntt eennddoommmmaaggeess

  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

  66..33..  FFiicchhiieerrss ssppeecciiaauuxx

  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.

  66..44..  PPaarrttiittiioonnnneemmeenntt

  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.

  66..55..  GGeeoommeettrriiee

  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.

  77..  LLeess lleecctteeuurrss ddee CCDDRROOMM

  Ce chapitre contient des  informations  specifiques  aux  lecteurs  de
  CDROM.

  77..11..  MMaatteerriieell ssuuppppoorrttee eett nnoonn ssuuppppoorrttee

  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.

  77..22..  PPrroobblleemmeess ffrreeqquueennttss

  77..22..11..  IImmppoossssiibbiilliittee ddee mmoonntteerr llee CCDDRROOMM

  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)).

  77..22..22..  IImmppoossssiibbiilliittee dd''eejjeecctteerr llee CCDDRROOMM

  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.

  77..22..33..  IImmppoossssiibbiilliittee dd''eeccoouutteerr ddeess CCDD aauuddiioo

  Essayez donc workman ou xcdplayer.

  77..22..44..  WWoorrkkmmaann oouu xxccddppllaayyeerr nnee mmaarrcchheenntt ppaass

  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.

  77..22..55..  LLeess ddiissqquueess ssuupppplleemmeennttaaiirreess ssuurr lleess cchhaarrggeeuurrss SSCCSSII nnee mmaarrcchheenntt
  ppaass

  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''.

  77..33..  FFiicchhiieerrss ssppeecciiaauuxx

  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

  88..  LLeess lleecctteeuurrss ddee bbaannddeess

  Les informations de ce chapitre concernent les lecteurs de bandes.

  88..11..  MMaatteerriieell ssuuppppoorrttee eett nnoonn ssuuppppoorrttee

  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 mmtt) ; 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

  88..22..  PPrroobblleemmeess ffrreeqquueennttss

  88..22..11..  LLee lleecctteeuurr ddee bbaannddee nn''eesstt ppaass rreeccoonnnnuu aauu ddeemmaarrrraaggee

  Essayez de demarrer avec une bande dans le lecteur.

  88..22..22..  IImmppoossssiibbiilliittee  ddee  lliirree  ccoorrrreecctteemmeenntt  ddeess  bbaannddeess  ccoommppoorrttaanntt
  pplluussiieeuurrss ffiicchhiieerrss

  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  mmtt sur le fichier special attaquant le lecteur en mode 'non-
  rembobinage' (no-rewind) pour avancer jusqu'au fichier suivant.

  88..22..33..  LLaa ddeeccoommpprreessssiioonn eecchhoouuee

  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

  88..22..44..  PPrroobblleemmeess ddee lleeccttuurree ddee bbaannddeess ffaaiitteess ssuurr dd''aauuttrreess ssyysstteemmeess

  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 mmtt :

       mt setblk <taille>

  ou

       mt setblk 0

  pour indiquer au pilote d'utiliser une taille de bloc variable.

  Notez que ces options de mmtt 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

  SSTT__BBUUFFFFEERR__BBLLOOCCKKSS         (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.

  88..22..55..  MMeessssaaggee dd''eerrrreeuurr ""NNoo ssuucchh ddeevviiccee""

  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''.

  88..22..66..   LLeess  lleeccttuurreess ddee bbaannddeess aa uunnee cceerrttaaiinnee ddeennssiittee mmaarrcchheenntt,, mmaaiiss
  lleess eeccrriittuurreess eecchhoouueenntt

  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.

  88..22..77..  LLee rreeppoossiittiioonnnneemmeenntt ddee llaa bbaannddee bbllooqquuee llee bbuuss SSCCSSII

  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 mmtt. 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.

  88..33..  FFiicchhiieerrss ssppeecciiaauuxx

  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  mmkknnoodd
  //ddeevv//sstt00  cc 99 00), le deuxieme lecteur etant /dev/st1 (mmkknnoodd //ddeevv//sstt11 cc
  99 11), 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 :
  mmkknnoodd //ddeevv//nnsstt00 cc 99 112288.

  La convention standard de nommage est

  /dev/nst{chiffre} pour les operations sans rembobinage
  /dev/st{chiffre}  pour les operations avec rembobinage

  99..  PPiilloottee ggeenneerriiqquuee

  Les informations contenues dans ce chapitre sont specifiques au pilote
  SCSI generique.

  99..11..  MMaatteerriieell ssuuppppoorrttee

  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.

  99..22..  PPrroobblleemmeess ffrreeqquueennttss

  Aucun :-)

  99..33..  FFiicchhiieerrss ssppeecciiaauuxx

  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.

  1100..  GGuuiiddee ddee ll''aacchheetteeuurr

  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.

  1100..11..  TTyyppeess ddee ttrraannssffeerrtt

  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.

     TTyyppee ddee ttrraannssffeerrtt
        Description / Performance / Recommandations

     SSccrruuttaattiioonn ppuurree ((PPuurree PPoolllleedd))
        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.

     SSccrruuttaattiioonn iinntteerr--vveerrrroouuiilllleeee ((IInntteerrlloocckkeedd PPoolllleedd))
        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.

     SSccrruuttaattiioonn ppaarr FFIIFFOO ((FFIIFFOO PPoolllleedd))
        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.

     DDMMAA eessccllaavvee
        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.

     DDMMAA aa ccoonnttrroollee ddee bbuuss ((BBuussmmaasstteerriinngg DDMMAA))
        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.

  1100..22..  DDeeccoouuppaaggee//RReeaasssseemmbbllaaggee ((SSccaatttteerr//ggaatthheerr))

  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.

  1100..33..  BBAALL ccoonnttrree nnoonn--BBAALL ((MMaaiillbbooxx vvss.. nnoonn--mmaaiillbbooxx))

  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.

  1100..44..  LLeess ttyyppeess ddee bbuuss

  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.

     BBuuss
        Debit maximum / description,

     IISSAA
        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.

     VVEESSAA
        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.

     EEIISSAA
        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.

     PPCCII
        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.

  1100..55..  PPeerriipphheerriiqquueess mmuullttiipplleess

  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.

  1100..66..  LLeess ooppttiioonnss SSCCSSII--II,, SSCCSSII--IIII,, SSCCSSII--IIIIII FFAASSTT eett WWIIDDEE,, eettcc..

  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.

  1100..77..  CCoommppaarraaiissoonn ddeess ppiillootteess

  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).

  1100..88..  CCoommppaarraaiissoonn ddeess ccoonnttrroolleeuurrss

  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).

  1100..99..  PPoouurr rreessuummeerr

  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.

  1111..  AAffffeeccttaattiioonn ddeess nnuummeerrooss ddee mmiinneeuurr

  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.

  11..  LLeess nnoouuvveeaauutteess

  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.

  22..  IInnttrroodduuccttiioonn

  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 ``'').

  33..  QQuu''eesstt--ccee qquuee ll''iinntteerrffaaccee SSCCSSII ggeenneerriiqquuee ??

  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.

  44..  QQuuee ffaauutt--iill ppoouurr ll''uuttiilliisseerr ??

  44..11..  CCoonnffiigguurraattiioonn dduu nnooyyaauu

  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.

  44..22..  FFiicchhiieerrss ssppeecciiaauuxx

  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.

  44..33..  OOrrggaanniissaattiioonn ddeess ppeerriipphheerriiqquueess

  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.

  44..33..11..  IInnsseerrttiioonn eett rreettrraaiitt ddyynnaammiiqquueess ddee ppeerriipphheerriiqquueess SSCCSSII

  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.

  55..  LLee gguuiiddee dduu pprrooggrraammmmeeuurr

  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'').

  66..  VVuuee dd''eennsseemmbbllee ddee llaa pprrooggrraammmmaattiioonn ddeess ppeerriipphheerriiqquueess

  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.

  77..  OOuuvveerrttuurree dduu ppeerriipphheerriiqquuee

  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).

  88..  LLaa ssttrruuccttuurree dd''eenn--tteettee

  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.

     iinntt ppaacckk__lleenn
        definit la taille du bloc envoye au  pilote.  Cette  valeur  est
        definie dans le noyau pour une utilisation interne.

     iinntt rreeppllyy__lleenn
        definit  la  taille du bloc accepte en reponse. Cette valeur est
        definie du cote application.

     iinntt ppaacckk__iidd
        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).

     iinntt rreessuulltt
        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).

     uunnssiiggnneedd iinntt ttwweellvvee__bbyyttee::11
        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.

     uunnssiiggnneedd cchhaarr sseennssee__bbuuffffeerr[[1166]]
        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

  99..  EExxeemmppllee ddee ccoommmmaannddee ddee rreeqquueettee

  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).

  1100..  LLee ""ttaammppoonn SSCCSSII""

  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.

  1111..  EExxeemmppllee dd''uuttiilliissaattiioonn dduu ttaammppoonn SSCCSSII

  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.

  1122..  FFoonnccttiioonnss iiooccttll

  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).

  1133..  VVaalleeuurrss ppaarr ddeeffaauutt dduu ppiilloottee

  1133..11..  TTaaiilllleess ddee ttrraannssffeerrtt

  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.

  1133..22..  TTiimmeeoouutt eett vvaalleeuurrss ddee rreeeessssaaiiss

  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.

  1144..  CCoommmmeenntt oobbtteenniirr lleess ssppeecciiffiiccaattiioonnss SSCCSSII ??

  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

  1155..  DD''aauuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  1155..11..  HHOOWWTTOOss eett FFAAQQss

  Le  SSCCSSII--HHOOWWTTOO  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).

  1155..22..  LLaa lliissttee ddee mmeessssaaggeerriiee

  Il  existe une lliissttee ddee mmeessssaaggeerriiee 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.

  1155..33..  EExxeemmpplleess ddee ccooddee

     ssuunnssiittee..uunncc..eedduu:: aappppss//ggrraapphhiiccss//hhppssccaannppbbmm--00..33aa..ttaarr..ggzz
        Ce  paquetage gere un scanner HP scanjet a l'aide de l'interface
        generique.

     ttssxx--1111..mmiitt..eedduu:: BBEETTAA//ccddrroomm//pprriivvaattee//mmkkiissooffss//ccddwwrriittee--11..33..ttaarr..ggzz
        Le paquetage cdwrite utilise l'interface generique  pour  ecrire
        une image de CD sur un graveur.

     ssuunnssiittee..uunncc..eedduu:: aappppss//ssoouunndd//ccddss//ccddddaa22wwaavv**..ssrrcc..ttaarr..ggzz
        Un composant pour mes propres applications, qui copie des pistes
        audio de CD sous forme de fichiers wav.

  1166..  AAuuttrreess cchhoosseess uuttiilleess

  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.

  1166..11..  AAiiddeess aa ll''eeccrriittuurree ddee ppiillootteess ddee ppeerriipphheerriiqquueess

  Ces  documents  peuvent  etre  trouves   sur   le   serveur   ftp   de
  sunsite.unc.edu et sur ses miroirs.

     //ppuubb//LLiinnuuxx//ddooccss//kkeerrnneell//kkeerrnneell--hhaacckkeerrss--gguuiiddee
        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.

     //ppuubb//LLiinnuuxx//ddooccss//kkeerrnneell//ddrriivveerrss..ddoocc..zz
        Ce document traite de l'ecriture de pilotes caracteres.

     //ppuubb//LLiinnuuxx//ddooccss//kkeerrnneell//ttuuttoorriiaall..ddoocc..zz
        Tutoriel  sur  l'ecriture  d'un pilote de peripherique caractere
        avec le code.

     //ppuubb//LLiinnuuxx//ddooccss//kkeerrnneell//ssccssii..ppaappeerr..ttaarr..ggzz
        Un document Latex decrivant comment ecrire un pilote SCSI.

     //ppuubb//LLiinnuuxx//ddooccss//hhaarrddwwaarree//DDEEVVIICCEESS
        Une liste des numeros majeurs et mineurs utilises par Linux.

  1166..22..  UUttiilliittaaiirreess

     ttssxx--1111..mmiitt..eedduu:: AALLPPHHAA//ssccssii//ssccssiiiinnffoo**..ttaarr..ggzz
        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.

     ttssxx--1111..mmiitt..eedduu:: AALLPPHHAA//kkddeebbuugg
        Une extension a pour le deverminage du noyau.

  1177..  AAuuttrreess iinntteerrffaacceess dd''aacccceess aauu SSCCSSII

  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).

  1188..  CCoommmmeennttaaiirreess ffiinnaallss

  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...

  1199..  RReemmeerrcciieemmeennttss

  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.

  TT..  AAnnnneexxee

  UU..  TTrraaiitteemmeenntt dd''eerrrreeuurrss

  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.

  UU..11..  DDeeccooddaaggee ddee ll''eettaatt dd''eerrrreeuurr

  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

  UU..22..  CCooddeess dd''eettaatt

  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 ddeeccaallaaggee ddrrooiitt.
  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 :

     GGOOOODD..
        Cet  etat  indique  que  la  cible  a  correctement  execute  la
        commande.

     CCHHEECCKK CCOONNDDIITTIIOONN..
        Cet  etat  indique qu'une condition de contention s'est produite
        (cf. 6.6).

     CCOONNDDIITTIIOONN MMEETT..
        Cet etat, ou INTERMEDIATE-CONDITION MET est renvoye lorsque  les
        conditions   de   l'operation  demandee  sont  satisfaites  (cf.
        commandes SEARCH DATA et PRE-FETCH).

     BBUUSSYY..
        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.

     IINNTTEERRMMEEDDIIAATTEE..
        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.

     IINNTTEERRMMEEDDIIAATTEE--CCOONNDDIITTIIOONN MMEETT..
        Cet etat est la combinaison de CONDITION MET et de INTERMEDIATE.

     RREESSEERRVVAATTIIOONN CCOONNFFLLIICCTT..
        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.

     CCOOMMMMAANNDD TTEERRMMIINNAATTEEDD..
        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).

     QQUUEEUUEE FFUULLLL..
        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.

  UU..33..  CClleeffss dduu bbuuffffeerr SSCCSSII

  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.                                                          |
  +=============================================================================+

  UU..44..  CCooddeess hhoottee

  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

  UU..55..  CCooddeess dduu ppiilloottee

  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

  VV..  CCooddeess eett qquuaalliiffiiccaatteeuurrss dduu bbuuffffeerr SSCCSSII aaddddiittiioonnnneellss

  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).

  VV..11..  AASSCC eett AASSCCQQ ddaannss ll''oorrddrree nnuummeerriiqquuee

  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              |
  +=============================================================================+

  WW..  RReeffeerreennccee rraappiiddee ddeess ccoommmmaannddeess SSCCSSII

  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                                                                   |
  +=============================================================================+

  XX..  PPrrooggrraammmmeess dd''eexxeemmppllee

  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 Août 1996

  Voici le SMB-HOWTO, décrivant comment utiliser sous Linux le protocole
  SMB (« Session Message Block ») également appelé le protocole NetBIOS
  ou LanManager.
  ______________________________________________________________________

  Table des matières


  1. Introduction

  2. Pour plus d'informations

  3. Installation

  4. Lancer les daemons

  5. Configuration générale (/etc/smb.conf)

  6. Partager un lecteur Linux avec des machines Windows

  7. Partager un répertoire 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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Voici le SMB-HOWTO, décrivant 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 systèmes Unix (Linux inclus) peuvent également
  partager des disques et des imprimantes avec des hôtes Windows.

  Vous pouvez faire quatre choses avec Samba :


  1. Partager un disque Linux pour des machines Windows ;

  2. Accéder à disque Windows depuis une machine Linux ;

  3. Partager une imprimante Linux pour des machines Windows ;

  4. Utiliser une imprimante Windows à partir d'un hôte Linux.


  Tous ces points sont abordés dans ce document.

  Mise en garde : Les procédures décrites et les scripts présentés
  fonctionnent pour l'auteur ou les personnes qui les ont écrits. Les
  informations données dans ce document peuvent ne pas fonctionner sur
  une configuration différente. Si vous rencontrez un problème, écrivez
  un mail à l'auteur avec vos suggestions pour l'amélioration de ce
  document, mais l'auteur ne garantit rien. Qu'attendiez-vous ? Après
  tout, l'auteur n'est qu'un consultant...


  22..  PPoouurr pplluuss dd''iinnffoorrmmaattiioonnss

  Cet HOWTO tente d'expliquer comment configurer de manière basique les
  services SMB de partage de fichier et d'imprimantes sous Linux. Samba
  est un ensemble de programme très complet, et très complexe également.
  Cela ne servirait à rien de recopier la documentation de Samba dans ce
  document.

  Pour de plus amples informations, veuillez vous référer 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/>
     récupérer les sources de Samba sur ftp.ibp.fr

  ·  Le Printing-HOWTO.

  ·  Le Print2Win Mini-HOWTO.



  33..  IInnssttaallllaattiioonn

  Les sources de la dernière 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 nécessaires pour Samba. Ils sont
  généralement installé dans le répertoire /usr/sbin et sont lancés soit
  au démarrage soit par inetd. Des scripts d'exemple sont présentés dans
  la section ``Lancer les daemons''.


     ssmmbbdd
        Le daemon SMB ;


     nnmmbbdd
        Propose le support du serveur de nom NetBIOS aux clients.

  En général, les binaires Samba suivant sont installés dans /usr/bin,
  bien que leur emplacement soit variable.


     ssmmbbcclliieenntt
        Un client SMB pour machines Unix ;
     ssmmbbpprriinntt
        Un script pour imprimer sur l'imprimante d'un hôte SMB ;


     ssmmbbpprriinntt..ssyyssvv
        Comme ci-dessus, mais pour des Unix SVR4 ;


     ssmmbbssttaattuuss
        Liste les connexions SMB présentes sur localhost ;


     ssmmbbrruunn
        Un script pour faciliter le lancement d'applications sur des
        hôtes 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 récupérer les
  sources depuis les sites mentionnés 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û spécifier dans
  le Makefile l'emplacement du fichier de configuration, smb.conf. Il se
  trouve généralement dans /etc, mais vous pouvez le placer où bon vous
  semble. Dans la suite du document, nous considérerons 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 répertoire 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
  répertoire dans lequel vous avez compilé Samba. Consultez le fichier
  README dans le répertoire examples/simple. Copiez le fichier smb.conf
  de ce répertoire vers /etc. ATTENTION !  Si vous utilisez une
  distribution Linux et que vous avez déjà installé Samba, il doit déjà
  exister un fichier smb.conf dans /etc. Vous devriez sans doute
  commencer avec celui-là.

  Si vous ne désirez pas placer votre fichier de configuration dans
  /etc, mettez le dans le répertoire que de votre choix, et faites un
  lien symbolique dans /etc :



       ln -s /path/vers/smb.conf /etc/smb.conf





  44..  LLaanncceerr lleess ddaaeemmoonnss

  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 indépendants. Si vous êtes en train de configurer un serveur
  de fichier, ils devraient être lancés depuis l'inetd afin de pouvoir
  être redémarrez s'ils sont tués. Si vous comptez simplement utiliser
  les services SMB occasionnellement, vous pouvez démarrer les démons
  depuis un script /etc/rc.d/init.d ou même 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 démarrage, copier le
  script suivant sous le nom /etc/rc.d/init.d/smb et faites des liens
  depuis les fichiers spécifiés dans les commentaire sur ce script :









































  #!/bin/sh

  #
  # /etc/rc.d/init.d/smb - démarre 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  (Démarre les services SMB en mode
  #                             multi-utilisateur)
  #    /etc/rc.d/rc6.d/K35smb  (Kille les services SMB au redémarrage)

  # Charge la librairie de fonctions
  . /etc/rc.d/init.d/functions

  # Charge la configuration réseau
  . /etc/sysconfig/network

  # Vérifie que le réseau 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






  55..  CCoonnffiigguurraattiioonn ggéénnéérraallee ((//eettcc//ssmmbb..ccoonnff))

  La configuration de Samba sur une machine Linux (ou sur un autre Unix)
  est contrôlée par un seul fichier, /etc/smb.conf. Ce fichier indique
  quelle ressources système vous désirez partager avec le monde
  extérieur, 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 présenté
  dans ce chapitre est aussi simple que possible, en guise
  d'introduction.

  Ne vous inquiétez pas pour les détails, en tout cas pas encore. Les
  chapitres suivants vont présenter les concepts fondamentaux.

  Chaque partie du fichier commence par une entête, comme par exemple
  [global], [homes], [printers], etc...

  La section [global] définit quelques variables communes pour le
  partage de toutes les ressources.
  La section [homes] permet à un utilisateur distant d'accéder à son
  répertoire d'accueil (et uniquement aux sien) sur la machine Linux
  locale. C'est-à-dire que si un utilisateur Windows essaye de se
  connecter à ce répertoire partagé depuis sa machine Windows, il sera
  connecté sur sa répertoire d'accueil personnel. Notez que pour cela,
  il doit posséder un compte sur l'hôte Linux.

  Le fichier smb.conf suivant donné en exemple permet à des utilisateurs
  distants d'accéder à leur répertoire _h_o_m_e sur la machine local et
  d'écrire dans un répertoire temporaire. Pour qu'un utilisateur Windows
  puisse voir ces partages, il faut que l'hôte Linux soit sur le réseau
  local. Ainsi l'utilisateur connecte un lecteur réseau depuis le
  gestionnaire de fichiers Windows ou l'Explorateur.

  Veuillez noter que dans les chapitres suivants, des champs seront
  ajoutés à ce fichier pour permettre à plus de ressources d'être
  partagées.



       ; /etc/smb.conf
       ;
       ; Assurez vous de relancer le serveur après avoir fait des changement , dans
       ; ce fichier. Par exemple~:
       ; /etc/rc.d/init.d/smb stop
       ; /etc/rc.d/init.d/smb start

       [global]
       ; décommentez cette ligne si vous désirez autoriser les invités (comptes
       ; "guest") à se connecter
       ; guest account = nobody
          log file = /var/log/samba-log.%m
          lock directory = /var/lock/samba
          share modes = yes

       [homes]
          comment = Répertoire homes
          browseable = no
          read only = no
          create mode = 0750

       [tmp]
          comment = Espace disque temporaire
          path = /tmp
          read only = no
          public = yes






  66..  PPaarrttaaggeerr uunn lleecctteeuurr LLiinnuuxx aavveecc ddeess mmaacchhiinneess WWiinnddoowwss

  Comme vous pouvez le constater avec le fichier smb.conf ci-dessus,
  partager des disques Linux avec des utilisateurs est simple.
  Néanmoins, comme pour tout avec Samba, vous pouvez tout contrôler
  finement. Voici quelques exemples :

  Pour partager un répertoire public, créez 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 répertoire ci-dessus soit en lecture pour tout le monde
  mais uniquement en écriture pour les personnes du groupe staff,
  modifiez l'entrée 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 répertoires,
  conférez vous à la documentation de Samba ou aux pages de manuel.


  77..  PPaarrttaaggeerr uunn rrééppeerrttooiirree WWiinnddoowwss ppoouurr ddeess mmaacchhiinneess LLiinnuuxx

  Un client SMB pour un hôte 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 transférer des
  fichiers entre un « serveur » Windows et un client Linux.

  Pour voir ce que partage une machine donnée, utilisez :


  /usr/sbin/smbclient -L hôte



  où « hôte » 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 répertoires 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 réseau.

  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'accéder à un répertoire en accès public sur une machine
  appelée zimmerman, le service sera nommé \\zimmerman\public.
  Néanmoins, à cause des restrictions de l'interpréteur 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.



  88..  PPaarrttaaggeerr uunnee iimmpprriimmaannttee LLiinnuuxx ppoouurr ddeess ssttaattiioonnss WWiinnddoowwss

  Pour partager une imprimante Linux pour des stations Windows, vous
  devez être sûr que votre imprimante est configurée 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 référer au Printing HOWTO pour la configuration de
  l'imprimante.

  Puisque l'auteur utilise une imprimante connectée à une machine sous
  Windows NT, cette section ne doit pas être prise à la lettre, mais
  simplement comme une suggestion. Quiconque ayant des détails sur ce
  point est invité à les envoyer à dwood@plugged.net.au afin que ce
  chapitre puisse être complété.

  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'intérieur de la
  section [ljet]) corresponde au répertoire de _s_p_o_o_l défini dans
  /etc/printcap !

  NB : On constate quelques problèmes pour le partage d'imprimante sur
  des des serveurs Unix, utilisant Samba, pour des clients sous Windows
  NT. Un des problèmes est que NT ne voit pas l'imprimante partagée
  correctement. Pour résoudre ce problème, lisez les remarques dans le
  fichier docs/WinNT.txt de la distribution de Samba. Un autre problème
  existe avec les mots de passe. Voyez également dans ce fichier comment
  résoudre le problème.


  99..  PPaarrttaaggeerr uunnee iimmpprriimmaannttee WWiinnddoowwss ppoouurr ddeess cclliieennttss LLiinnuuxx

  Pour partager une imprimante sur une machine Windows, vous devez
  suivre les points suivants :


  1. Vous devez avoir les entrées correspondantes à l'imprimante dans
     /etc/printcap et elles doivent correspondre à la structure locale
     des répertoires (pour le répertoire 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 légèrement modifiée de ce script est
     présentée 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 généralement 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 gérer l'ASCII ou le PostScript est présenté ci-dessous.


  L'entrée dans /etc/printcap est pour une imprimante HP 5 MP sur une
  machine utilisant Windows NT. Les entrées sont comme suit :


  cm - commentaire
  lp - nom du périphérique à ouvrir en écriture
  sd - le répertoire de spool de l'imprimante (sur la machine locale)
  af - le fichier d'accounting
  mx - la taille maximum de fichier (zéro pour aucune limite)
  if - le nom du filtre en entrée (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 répertoire 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 sélectionné le bon fichier de périphérique (le fichier
  spécial dans /dev).

  Vient ensuite le script smbprint. Il est généralement mis dans le
  répertoire /usr/bin et a été créé par Andre Tridgell, le créateur 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 avérées être utiles.



















  #!/bin/sh -x

  # Ce script est un filtre d'entrée sur l'impression avec printcap sur une
  # machine Linux. Il utilise le programme smbclient pour imprimer le fichier au
  # serveur et service spécifié.
  # Par exemple, vous pouvez avoir une entrée printcap comme celle-ci~:
  #
  # smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
  #
  # qui créerai une imprimante Unix appelée "smb" qui imprimerait par
  # l'intermédiaire de ce script. Vous devrez créer le répertoire de spool,
  # /usr/spool/smb avec les permissions qui conviennent et le bon propriétaire,
  # pour votre système.

  # 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 appelée "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'entrée 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 paramètre 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 débogage, 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 paramètre n'est donné, print tente de
         deviner le type de fichier et imprime en conséquence.



  smbprint a tendance à tronquer les longues lignes lors de l'impression
  de fichiers ASCII. Ce script coupe les longues lignes sur les espaces
  (plutôt qu'au milieu d'un mot), si possible.

  Le formatage en code source est réalisé par nenscript.Il prend en
  entrée un fichier ASCII et le formatte sur deux colonnes avec une
  entête (date, nom du fichier, etc...). Il numérote également les
  lignes. En prenant ce script comme exemple, on peut faire d'autres
  types de formatage.

  Les documents sont déjà correctement formatés, 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 connectée sur
  # zimmerman.
  # But:      Prendre différentes sortes de fichier en argument et les
  #  traiter pour les injecter dans le script d'impression de Samba.
  #
  # Types de fichier supportés pour l'instant~:
  #
  # ASCII      - vérifie que les lignes plus longues que $line_length
  #              caractères sont coupés 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'accès 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);

  # Débug
  print "filetype is $filetype\n";

  if ($filetype eq "ASCII") {
          &wrap($line_length);
  } elsif ($filetype eq "code") {
          &codeformat;
  } elsif ($filetype eq "ps") {
          &createarray;
  } else {
          print "Désolé, 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 supplémentaire si jamais le fichier a sa
  # dernière ligne incomplète
  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, détermine le type de fichier

          # $arg et $file sont respectivement les arguments (s'ils
          # existent) et le nom de fichier
          if ($#_ < 0) {
                  &usage;
          }
          # Débug
  #       foreach $element (@_) {
  #               print "*$element* \n";
  #       }

          $arg = shift(@_);
          if ($arg =~ /\-./) {
                  $cmd = $arg;
          # Débug
  #       print "\$cmd trouvé.\n";

                  $file = shift(@_);
          } else {
                  $file = $arg;
          }

          # Définition 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 décrit 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 paramètre n'est donné, print tente de
         deviner le type de fichier et imprime en conséquence.\n
  ";
          exit(0);
  }

  sub wrap {
          # Crée un table contenant les lignes du fichier, avec chaque
          # ligne ayant une longueur < au nombre de caractères
          # spécifiés, et coupée uniquement sur un espace.

          # Récupère la longueur maximum d'une ligne
          $limit = pop(@_);

          # Débug
          #print "Entrée dans la procédure 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 = $_;

                  # Débug
                  #print "La ligne est~:\n$line\n";

                  # Coupe la ligne si celle-ci dépasse la limite
                  while ( length($line) > $limit ) {

                          # Débug
                          #print "Je coupe...";

                          # Prend les premiers $limit +1 caractères.
                          $part = substr($line,0,$limit +1);

                          # Débug
                          #print "La ligne partielle est~:\n$part\n";

                          # Vérifie si le dernier caractère est un
                          # espace
                          $last_char = substr($part,-1, 1);
                          if ( " " eq $last_char ) {
                              # Oui, on imprime le reste

                              # Débug
                              #print "Le dernier caractère é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

                              # Débug
                              #print "Le dernier caractère n'était pas un espace\n";

                              # Supprime le caractère après $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 procédure wrap et filtre par nenscript
          &wrap($line_length);

          # Envoie le résultat à nenscript pour créer un fichier
          # Postscript qui respecte un format décent d'impression pour
          # du code source (orientation paysage, font Courier,
          # numérotation 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 {
          # Crée le tableau pour un fichier postscript
          open(FILE, "<$file") || die "Can't open $file: $!\n";
          while(<FILE>) {
                  push(@newlines,$_);
          }
          close(FILE);
  }






  1100..  CCooppyyrriigghhtt

  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.


  1111..  RReemmeerrcciieemmeennttss

  Dès 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 problèmes et leurs solutions
  liés la configuration et à l'emploi d'un système SMP sous Linux.
  ______________________________________________________________________

  Table des matières

























































  1. Introduction

  2. Questions indépendantes de l'architecture.

     2.1 Côté noyau
     2.2 Côté utilisateur
     2.3 Programmation SMP
        2.3.1 Méthodes de parallélisation
        2.3.2 La librairie C
        2.3.3 Langages, compilateurs et débogueurs
        2.3.4 Autres librairies
        2.3.5 Autres points concernant la programmation SMP

  3. Questions spécifiques à l'architecture x86

     3.1 Pourquoi cela ne marche-t-il pas avec ma machine ?
     3.2 Causes possibles de plantages
     3.3 Informations spécifiques aux cartes mères
        3.3.1 Cartes mères avec des problèmes 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 systèmes double Celeron ?
        3.4.3 Les processeurs Celeron sont réputés pour être facilement surcadençable. Qu'en est-il des systèmes doubles Celeron ?
        3.4.4 Et un système quadruple Celeron ?
        3.4.5 Pourquoi ne pas mélanger Celeron et Pentium II ?

  4. Questions spécifiques à l'architecture Sparc

     4.1 Quellles sont les machines Sparc supportées ?
     4.2 Problèmes spécifiques au support SMP Sparc
     4.3 Limites SMP spécifiques au noyau courant (2.2)

  5. Questions spécifiques à l'architecture PowerPC

     5.1 Quellles sont les machines PPC supportées ?
     5.2 Problèmes spécifiques concernant le support SMP PPC

  6. Questions spécifiques à l'architecture Alpha

     6.1 Quelles sont les machines Alpha supportées ?
     6.2 Problèmes spécifiques au support SMP Alpha

  7. Pointeurs utiles

     7.1 Divers
     7.2 Programmes et librairies multithread
     7.3 Patches spécifiques SMP
     7.4 Compilateurs parallèliseurs/optimiseurs pour les machines 586/686 (

  8. Glossary

  9. Quoi de neuf ?

  10. Liste des contributeurs



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  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 amélioré depuis. La gestion est beaucoup plus fine dans la
  série 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 dernière
  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 préfère 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
  apprécié.  Si vous m'envoyez un e-mail à propos de ce document,
  insérez s'il vous plaît 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 réponse plus rapide ;)).


  Ce HOWTO reprend et enrichit first draft <http://www.ihoc.net/linux-
  smp-faq-draft.html> écrit par CChhrriiss PPiirriihh.


  Toutes les informations contenues dans ce HOWTO sont fournies "tel
  que".  Toute garantie explicite, implicite ou légale, concernant
  l'exactitude de l'information, de la convenance à quelque usage
  particulier est par la présente spécifiquement déclinée. 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 résultant de
  l'utilisation des informations contenues dans ce document.


  22..  QQuueessttiioonnss iinnddééppeennddaanntteess ddee ll''aarrcchhiitteeccttuurree..



  22..11..  CCôôttéé nnooyyaauu



  1. LLiinnuuxx ssuuppppoorrttee--tt--iill lleess tthhrreeaaddss mmuullttiipplleess ??  SSii jjee llaannccee ddeeuuxx oouu
     pplluussiieeuurrss pprroocceessssuuss,, sseerroonntt--iillss rrééppaarrttiiss eennttrree lleess ddiifffféérreennttss
     pprroocceesssseeuurrss ddiissppoonniibblleess ??

     Oui. Les processus et les threads du noyau sont répartis entre les
     processeurs. Ceux de l'espace utilisateur ne le sont pas.


  2. QQuueelllleess ssoonntt lleess aarrcchhiitteeccttuurreess SSMMPP ssuuppppoorrttééeess ??


     DD''aapprrèèss AAllaann CCooxx :
        Les versions 2.0 du noyau supportent les systèmes SMP de type
        hypersparc (SS20, etc...) et Intel 486, Pentium ou machines
        supérieurs compatible avec la norme Intel MP1.1/1.4.  RRiicchhaarrdd
        JJeelliinneekk ajoute : jusqu'à présent, seul des systèmes ne
        comprenant pas plus de 4 processeurs ont été testés. La
        spécification MP (et donc Linux) autorise théoriquement jusqu'à
        16 processeurs.

        Le support SMP pour les architectures UltraSparc, SparcServer,
        Alpha et PowerPC est disponible dans le 2.2.x.


     DDee RRaallff BBääcchhllee :
        MIPS, m68k et ARM ne gèrent pas le SMP; les deux derniers ne le
        supporteront probablement jamais.
        Ceci étant, je ferai un hack pour MIPS-SMP dès que j'aurais une
        machine SMP...


  3. CCoommmmeenntt ccoonnssttrruuiirree uunn nnooyyaauu LLiinnuuxx ggéérraanntt llee SSMMPP ??

     La plupart des distributions ne fournissent pas un noyau adapté au
     SMP.  Vous devrez donc en faire un vous même. Si vous n'avez encore
     jamais compilé de noyau, voila une excellente occasion d'apprendre.
     Expliquer comment compiler un nouveau noyau dépasse le cadre de ce
     document; préférez-vous au Linux Kernel Howto pour de plus amples
     informations (CC.. PPoolliisshheerr).  Dans la série 2.0 jusqu'à la version
     2.1.132 exclue du noyau, décommentez la ligne SMP=1 dans le
     Makefile principal (/usr/src/linux/Makefile).


     Dans la version 2.2, configurez le noyau et répondez "oui" à la
     question "Symetric multi-processing support" (MMiicchhaaeell EElliizzaabbeetthh
     CChhaassttaaiinn).


     Autorisez l'horloge temps réel en cochant l'option "RTC support"
     (RRoobbeerrtt GG..  BBrroowwnn). Notez qu'inclure le support RTC, en réalité,
     pour autant que je sache, n'empêche pas le problème connu de la
     dérive de l'horloge avec le SMP : activer cette fonctionnalité
     avertit en cas de lecture de l'horloge au démarrage.  Une note de
     RRiicchhaarrdd JJeelliinneekk signale aussi qu'activer "Enhandced RTC" est
     nécessaire pour activer le deuxième processeur (identification) sur
     certaines cartes mère Intel exotiques.


     Enfin, sur plate-forme Intel, N'ACTIVEZ PAS l'option APM (Advanced
     Power Management)! APM et SMP sont incompatibles et votre système
     plantera certainement (ou du moins probablement ;)) au démarrage si
     APM est activé (JJaakkoobb OOeesstteerrggaaaarrdd).  AAllaann CCooxx le confirme :
     désactivez APM pour les machines SMP en 2.1.x. En gros le
     comportement APM est indéfini en présence de systèmes SMP et tout
     peut arriver.  Toujours sur plate-forme Intel, activez "MTRR
     (Memory Type Range Register) support". Certains BIOS sont
     défectueux et n'activent pas la mémoire cache du second processeur.
     Le support MTRR contient le code pour y remédier.


     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 (AAllaann CCooxx).


     Si vous obtenez des erreurs au chargement des modules, vous n'avez
     probablement pas réinstallé vos modules. Néanmoins, avec quelques
     noyaux 2.2.x, certains ont rapporté des problèmes lors de la
     recompilation d'un noyau SMP en noyau UP (Uni-Processeur). Afin de
     résoudre 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...)  (WWaaddee HHaammppttoonn).  N'oubliez pas de relancer lilo
     après avoir recopié votre nouveau noyau.


     Récapitulation :







     ___________________________________________________________________
     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. CCoommmmeenntt ccoommppiillee--tt--oonn uunn nnooyyaauu LLiinnuuxx nnoonn-SMP ?

     Dans la série 2.0, ccoommmmeenntteezz la ligne SMP=1 dans le Makefile
     principal (/usr/src/linux/Makefile).

     Pour la série 2.2, configurez le noyau et répondez "no" à la
     question "Symmetric multi-processing support" (MMiicchhaaeell EElliizzaabbeetthh
     CChhaassttaaiinn).


     Vous devez absolument recompiler votre noyau et ses modules pour
     activer ou désactiver le mode SMP. N'oubliez pas de faire make
     modules, make modules_install et de relancer lilo. Voyez les notes
     plus haut sur les problèmes de configuration possibles.


  5. SSaavvooiirr ssii ççaa mmaarrcchhee


      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. SSttaattuutt ddee llaa mmiiggrraattiioonn dduu nnooyyaauu vveerrss uunn vveerrrroouuiillllaaggee ffiinn eett llee
     mmuullttiitthhrreeaaddiinngg ??

     La version 2.2 du noyau possède 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 ordonnancés simultanément.


     Les noyaux 2.3 (futur 2.4) possèdent vraiment des verrous noyaux
     fins. Dans la série des noyaux 2.3 l'usage des gros blocages noyau
     a tout simplement disparu.  Tous les sous-systèmes majeurs du noyau
     Linux sont complètement codés avec des threads : réseau, VFS, VM,
     ES, block/pages de cache, ordonnancement, interruptions, signaux,
     etc... (IInnggoo MMoollnnaarr)


  7. LLiinnuuxx SSMMPP ssuuppppoorrttee--tt--iill lleess aaffffiinniittééss pprroocceesssseeuurr ??



     NNooyyaauuxx ssttaannddaarrdd
        Oui et non. Il n'est pas possible de forcer l'assignation d'un
        processus à un processeur spécifique mais l'ordonnanceur Linux
        possède un parti-pris pour chaque processus qui tend à conserver
        les processus attachés à un processeur spécifique.


     NNooyyaauu ppaattcchhéé
        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 fonctionnalités de pset (tel que défini
          par SGI - partiellement retiré de leur noyau 6.4 IRIX)
          pour Linux. Cela autorise les utilisateurs à déterminer
          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 sécurité (un processeur dédié à
          `root') et sûrement davantage encore.


     Nous nous sommes attachés à concentrer toutes les fonctionnalités
     autour de l'appel système sysmp(). Cette routine accepte un certain
     nombre de paramètres qui déterminent la fonctionnalité requise.
     Ces fonctions comprennent:

     ·  affecter un processus/thread à un processeur spécifique;

     ·  interdire un processeur d'exécuter certains processus;

     ·  empêcher strictement l'utilisation d'un processeur;

     ·  assigner à un processeur un _unique_ processus (et ses fils);

     ·  information sur l'état du processeur;

     ·  créer/supprimer un ensemble de processeurs, sur lesquels les
        processus peuvent être limités



  8. AA qquuii rraappppoorrtteerr lleess bboogguueess SSMMPP ??

     Signalez s'il vous plaît les bogues à linux-smp@vger.rutgers.edu.


  9. AA pprrooppooss ddeess ppeerrffoorrmmaanncceess SSMMPP

     Si vous voulez mesurer les performances de votre système SMP, vous
     pouvez essayer les tests de Cameron MacKinnon, disponibles à
     http://www.phy.duke.edu/brahma/benchmarks.smp.




  22..22..  CCôôttéé uuttiilliissaatteeuurr


  1. AAii--jjee vvrraaiimmeenntt bbeessooiinn ddee SSMMPP ??


     Si vous vous le demandez, vous n'en avez probablement pas besoin.
     :) En général les systèmes multiprocesseurs offrent de meilleurs
     performances que les systèmes monoprocesseurs, mais pour obtenir un
     gain quelconque vous devez considérer bien d'autres facteurs que le
     seul nombre de processeurs. Par exemple, sur un système donné, si
     le processeur est en général inactif, la plupart du temps à cause
     d'un disque dur lent, alors le système est bloqué au niveau des
     entrées/sorties ("input/output bound"); il ne bénéficiera
     probablement pas de la puissance d'un processeur supplémentaire.
     Si, d'un autre coté, un système doit exécuter beaucoup de processus
     simultanément et que l'utilisation processeur est très forte, alors
     vous êtes susceptible d'améliorer les performances de votre
     système. Les disques dur SCSI peuvent être très efficaces en
     utilisation avec plusieurs processeurs. Ils peuvent gérer plusieurs
     commandes simultanément sans immobiliser le processeur (CC..
     PPoolliisshheerr).


  2. OObbttiieenntt--oonn lleess mmêêmmeess ppeerrffoorrmmaanncceess aavveecc uunn bbiipprroocceesssseeuurr 330000 MMHHzz
     qquu''aavveecc uunn pprroocceesssseeuurr 660000 MMHHzz ??

     Tout dépend de l'application, mais généralement non. Le SMP
     implique quelques "frais de gestion" absents d'une machine
     monoprocesseur.  (WWaaddee HHaammppttoonn).  :)


  3. CCoommmmeenntt aaffffiicchheerr lleess ppeerrffoorrmmaanncceess ddee pplluussiieeuurrss pprroocceesssseeuurrss ??

     Grâce à SSaammuueell SS.. CChheessssmmaann, se ici trouvent quelques utilitaires
     pratiques :

     CChhaarraacctteerr bbaasseedd::
        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, GGrreeggoorryy RR.. WWaarrnneess a rendu disponible un patch à
        http://queenbee.fhcrc.org/~warnes/procps


     GGrraapphhiiqquuee::
        xosview-1.5.1 supporte le SMP, les noyaux supérieurs au 2.1.85
        (inclus) et l'entrée 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 patchée par KKuummssuupp LLeeee pour les
        noyaux 2.2.p :
        http://www.ima.umn.edu/~klee/linux/xosview-1.6.1-5a1.tgz

        Les différents patches noyau de Forissier sont disponibles à :
        http://www-isia.cma.fr/~forissie/smp_kernel_patch/

     Néanmoins, vous ne pouvez pas contrôler l'ordonnancement de façon
     précise avec xosview car ce dernier le perturbe (HH.. PPeetteerr AAnnvviinn).


  4. CCoommmmeenntt aauuttoorriisseerr pplluuss dd''uunn pprroocceessssuuss lloorrss ddee llaa ccoommppiillaattiioonn dduu
     nnooyyaauu ??

     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, référez vous au fichier
  /usr/src/linux/Documentation/smp.txt pour des instructions précises.

  Par exemple, comme lancer de multiples compilateurs autorise une
  machine avec suffisamment de mémoire à utiliser le temps processeur
  autrement perdu durant les délais causés par les E/S, make MAKE="make
  -j 2" -j 2 aide réellement même sur les machines monoprocesseurs.  (de
  RRaallff BBääcchhllee).


  5. PPoouurrqquuooii llee tteemmppss ddoonnnnéé ppaarr llaa ccoommmmaannddee time est-il erroné ?  (de
     JJooeell MMaarrcchhaanndd)

     Dans la série des 2.0, le résultat de la commande time est faux.
     La somme utilisateur+système est juste *mais* 'l'étendue' entre le
     temps utilisateur et le temps système est faux.

     Plus précisément : "tout le temps passé sur un processeur autre que
     celui de démarrage est comptabilisé comme temps système. Si vous
     chronométrez un programme, ajoutez le temps utilisateur et le temps
     système. Votre mesure sera alors correcte, à ceci près qu'elle
     inclura aussi le temps système qui restera à décompter" (JJaakkoobb
     ØØsstteerrggaaaarrdd).

     Ce bogue est corrigé dans les versions 2.2.



  22..33..  PPrrooggrraammmmaattiioonn SSMMPP

  Section par JJaakkoobb ØØsstteerrggaaaarrdd.

  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.


  22..33..11..  MMéétthhooddeess ddee ppaarraalllléélliissaattiioonn


  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 généralement la
  mémoire, mais communiquent au moyen d'IPC ou d'une API de messagerie,
  ils ne seront pas décrits davantage dans cette section. Ils ne sont
  pas vraiment spécifiques à SMP, puisqu'ils sont tout autant employés -
  sinon plus - avec des ordinateurs monoprocesseurs et des clusters.


  Seuls les threads POSIX fournissent des threads multiples partageant
  certaines ressources telles la mémoire. Cette propriété des machines
  SMP autorise plusieurs processeurs à partager leur mémoire. Pour
  employer deux (ou plus ;) ) processeurs avec un système 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
  intégrée avec la glibc2 (aka libc6). Les distributions Linux récentes
  intègrent toutes cette librairie par défaut. Vous n'avez donc pas à
  obtenir un paquetage séparé 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. Néanmoins, elles sont bonnes pour beaucoup
  d'applications et ont tendance à être plus rapides que les threads du
  noyau sur des systèmes 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
  problèmes d'incompatibilités et de non-adaptation aux thread des
  librairies, compilateurs et débogueurs.  GNU/Linux n'y fait pas
  exception. Espérons que les sections qui suivent apporteront quelques
  lumières sur ce qui est possible et sur ce qui ne l'est pas.


  22..33..22..  LLaa lliibbrraaiirriiee CC

  Les vieilles librairies ne sont pas sûres au niveau des threads. Il
  est très important que vous utilisiez la GNU libc (gglliibbcc), aussi
  connue sous le nom de lliibbcc66. Vous pouvez évidemment utiliser des
  versions antérieurs, mais cela vous causera plus de problèmes que
  mettre à jour votre système. Enfin, probablement :)

  Si vous voulez utiliser GDB pour déboguer vos programmes, voyez plus
  bas.


  22..33..33..  LLaannggaaggeess,, ccoommppiillaatteeuurrss eett ddéébboogguueeuurrss

  Il existe de nombreux langages de programmation disponibles pour
  GNU/Linux et beaucoup d'entre eux utilisent les threads d'une manière
  ou d'une autre. Certains langages comme Ada et Java incluent même les
  threads dans les primitives du langage.

  Cette section, pour l'instant, ne décrira que le C et le C++.  Si vous
  avez une expérience 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 (gglliibbcc). Il y a
  néanmoins quelques problèmes :


  1. Quand vous compilez en C ou C++, incluez --DD__RREEEENNTTRRAANNTT dans la ligne
     de commande du compilateur. Il est nécessaire 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
     simultanément, le programme retournera une erreur de segmentation.
     Le compilateur génère un code d'exception inadapté aux threads. Une
     manière de contourner le problème consiste à mettre un
     pthread_mutex_lock(&global_exception_lock) dans le(s)
     constructeur(s) de chaque classe que vous throw() et à insérer le
     pthread_mutex_unlock(...)  correspondant dans le destructeur. Ce
     n'est pas très beau mais ça marche.  Cette solution a été fournie
     par MMaarrkkuuss FFeerrcchh.

  Le débogueur GNU GGDDBB, à partir de la version 4.18, devrait prendre en
  charge les threads correctement. La plupart des distributions Linux
  comprennent une version patchée de gdb qui gère les threads.

  Il n'est pas nécessaire de patcher la gglliibbcc pour qu'elle fonctionne
  avec des threads. Si vous n'avez pas besoin de déboguer le logiciel
  (cela peut-être vrai pour toutes les machines qui ne sont pas dédiées
  au développement), il n'y a pas besoin de patcher la gglliibbcc.

  Notez que les core-dumps ne sont d'aucune utilité quand vous utilisez
  des threads. D'une manière ou d'une autre, le core dump est attaché au
  thread courant et non au programme tout entier. Aussi, pour déboguer
  quoi que ce soit, faites le depuis le débogueur.

  AAssttuuccee :: si vous avez un thread qui perd la tête, se met à utiliser
  100% du temps CPU et que vous ne voyez pas pourquoi, voici une méthode
  élégante de trouver ce qui se passe : lancez le programme depuis la
  ligne de commande, sans GDB. Faites dérailler votre thread.  Utilisez
  ttoopp pour obtenir le PID du processus. Lancez GDB tel que ggddbb pprrooggrraamm
  ppiidd. GDB s'attachera lui-même au processus dont vous avez spécifié le
  PID et arrêtera le thread. Vous disposez maintenant d'une session GDB
  avec le thread incriminé et vous pouvez utiliser bbtt ou d'autres
  commandes pour suivre ce qui se passe.


  22..33..44..  AAuuttrreess lliibbrraaiirriieess

  EElleeccttrriiccFFeennccee :: cette librairie n'est pas sûre du point de vue SMP.
  Il devrait néanmoins être possible de la faire fonctionner dans un
  environnement threadé en insérant des verrous dans son code source.


  22..33..55..  AAuuttrreess ppooiinnttss ccoonncceerrnnaanntt llaa pprrooggrraammmmaattiioonn SSMMPP


  1. OOùù ppuuiiss--jjee ttrroouuvveerr pplluuss dd''iinnffoorrmmaattiioonnss ssuurr llaa pprrooggrraammmmaattiioonn
     ppaarraallllèèllee ??

     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. EExxiissttee--tt--iill ddeess pprrooggrraammmmeess oouu ddeess lliibbrraaiirriieess uuttiilliissaanntt lleess tthhrreeaaddss
     ??

     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 :


     OOppeennGGLL MMeessaa lliibbrraarryy
        Grâce à DDaavviidd BBuuccccaarreellllii, aannddrreeaass SScchhiifffflleerr et EEmmiill BBrriiggggss, 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 expérimentale. Pour plus
        d'information, voyez Mesa library
        <http://www.ssec.wisc.edu/~brianp/Mesa.html>


     BBLLAASS
        BLAS et FFTs optimisés 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 prévue pour
        1998-05-27, voir Blas News
        <http://www.cs.utk.edu/~ghenry/distrib/blasnews> pour plus de
        détails.


     TThhee GGIIMMPP
        EEmmiill BBrriiggggss, la même personne qui est impliquée 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.






  33..  QQuueessttiioonnss ssppéécciiffiiqquueess àà ll''aarrcchhiitteeccttuurree xx8866


  33..11..  PPoouurrqquuooii cceellaa nnee mmaarrcchhee--tt--iill ppaass aavveecc mmaa mmaacchhiinnee ??


  1. PPuuiiss--jjee uuttiilliisseerr llee mmooddee SSMMPP aavveecc uunn CCPPUU CCyyrriixx//AAMMDD//nnoonn--IInntteell ??

     RRééppoonnssee ccoouurrttee:: non.


     RRééppoonnssee lloonngguuee Intel révendique la propriété 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 adhèrent au standard non-propriétaire
     OpenPIC SMP mais actuellement il n'existe pas de carte mère
     l'utilisant.


  2. PPoouurrqquuooii mmoonn vviieeuuxx CCoommppaaqq nnee ffoonnccttiioonnnnee--tt--iill ppaass ??

     Mettez le en mode compatibilité MP1.1/1.4.

     Vérifiez "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 (DDaanniieell RRooeesseenn).

     AAddrriiaann PPoorrtteellllii :

     a. Pressez F10 quand le serveur démarre afin d'entrer dans
        l'utilitaire de configuration système (System Configuration
        Utility)

     b. Pressez Entrée pour effacer l'écran de démarrage

     c. Pressez immédiatement CTRL+A

     d. Un message apparaîtra vous informant que vous êtes maintenant en
        "Advanced Mode"

     e. Sélectionnez ensuite "Configure Hardware" -> "View / Edit
        details"

     f. Vous verrez alors les réglages avancés (mélangés avec les
        réglages ordinaires)

     g. Descendez jusqu'au "APIC Mode" et sélectionnez alors "Fully
        Mapped"

     h. Sauvegardez les changements et redémarrez


  3. PPoouurrqquuooii mmoonn AALLRR nnee ffoonnccttiioonnnnee--tt--iill ppaass ??

     De RRoobbeerrtt HHyyaatttt: ALR Revolution quad-6 semble à peu près sûre,
     alors que quelques machines Revolution quad plus vieilles sans
     processeurs P6 ne semble pas "fiables"...


  4. PPoouurrqquuooii mmaa mmaacchhiinnee SSMMPP eesstt--eellllee ssii lleennttee ?? ou PPoouurrqquuooii uunn
     pprroocceesssseeuurr mmoonnttrree--tt--iill uunnee vvaalleeuurr bbooggoommiippss bbaassssee eett ppaass ll''aauuttrree ??

     De AAllaann CCooxx: si un de vos processeurs rapporte une valeur bogomips
     très 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 mère chez un fournisseur compétent.

     Un noyau 2.0 (> 2.0.36) contient un patch MTRR qui devrait résoudre
     ce problème (sélectionnez l'option "handle buggy SMP BIOSes with
     bad MTRR setup" dans le menu "General setup").

     Je pense que les BIOS SMP bogués sont pris en charge
     automatiquement dans les derniers noyaux 2.2.


  5. JJ''aaii eenntteenndduu ddiirree qquuee ddeess mmaacchhiinneess IIBBMM aavvaaiieenntt ddeess pprroobbllèèmmeess


     Certaines machines IBM possèdent 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 basée sur des 486SLC. Linux/SMP
     requiert un support FPU matériel.


  6. LLeess ssppéécciiffiiccaattiioonn MMPP 11..44 pprréésseenntteenntt--eelllleess uunn qquueellccoonnqquuee aavvaannttaaggee
     vviiss--àà--vviiss ddeess ssppéécciiffiiccaattiioonnss 11..11 ??

     Non (selon Alan :) ), 1.4 est juste une spécification plus stricte
     de 1.1.


  7. PPoouurrqquuooii ll''hhoorrllooggee ddéérriivvee--tt--eellllee ssii rraappiiddeemmeenntt qquuaanndd llaa mmaacchhiinnee
     ffoonnccttiioonnnnee eenn mmooddee SSMMPP ??


     Il s'agit d'un problème connu avec la gestion des IRQ et les
     blocages noyau longs dans la série 2.0 des noyaux. Pensez à mettre
     à jour votre système vers un 2.2 plus récent.

     De JJaakkoobb OOeesstteerrggaaaarrdd: ou pensez à utiliser xntpd. Cela devrait
     garder votre horloge à l'heure. Je pense avoir entendu qu'activer
     RTC dans le noyau corrigeait aussi le problème de dérive de
     l'horloge. Ça a marché pour moi, mais j'ignore si cela est général
     ou si j'ai juste été chanceux !


     Certaines corrections du noyau dans les derniers 2.2.x devraient
     résoudre ce problème.



  8. PPoouurrqquuooii mmeess pprroocceesssseeuurrss ssoonntt--iillss nnuumméérroottééss 00 eett 22 aauu lliieeuu ddee 00 eett
     11 ((oouu aauuttrree nnuumméérroottaattiioonn bbiizzaarrrree)) ??

     Le numéro du processeur est fixé par le fabricant de la carte mère
     et ne veut absolument rien dire. Ignorez le.


  9. MMoonn ssyyssttèèmmee qquuaaddrruuppllee XXeeoonn ppllaannttee ddèèss qquu''iill aa ddééccoommpprreesssséé llee nnooyyaauu

     (DDoouugg LLeeddffoorrdd) Essayez de recompiler LILO avec le support
     LARGE_EBDA et faites attention à bien toujours utiliser bzImage
     quand vous compilez le noyau. Cela semble avoir résolu le problème
     de plantage au démarrage ici sur une carte mère 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 système
     de fichier racine au démarrage.


     (RRoobbeerrtt MM.. HHyyaatttt) Avec 3 processeurs, avez-vous un terminateur dans
     le 4ème emplacement ?


  10.
     DDuurraanntt llee ddéémmaarrrraaggee llaa mmaacchhiinnee ppllaannttee eenn ssiiggnnaallaanntt uunn pprroobbllèèmmee
     IIOOAAPPIICC

     Essayez l'option de démarrage "noapic" (JJoohhnn AAllddrriicchh) et/ou
     "reboot=bios" (TTeerrrryy SShhuullll).


  11.
     MMoonn ssyyssttèèmmee ssee bbllooqquuee lloorrss ddee ttrraaffiicc NNFFSS iinntteennssee

     Essayez le dernier noyau 2.2.x et le patch knfsd. Cela est en cours
     d'investigation.  (WWaaddee HHaammppttoonn)



  12.
     MMoonn ssyyssttèèmmee bbllooqquuee ssaannss mmeessssaaggee ooooppss

     Si vous utilisez les noyaux 2.2.11 ou 2.2.12, récupérez le dernier
     noyau. Par exemple 2.2.13 possède de nombreuses corrections SMP.
     Plusieurs personnes ont rapporté ces noyaux comme instables pour le
     SMP. Ces mêmes noyaux peuvent avoir des problèmes NFS qui
     provoqueraient des blocages. Aussi, utilisez une console série pour
     capturer vos messages oops. (WWaaddee HHaammppttoonn)

     Si le problème 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 prévention contre les blocages durs qui produit des
     oops plus significatifs au lieu de planter en silence (IInnggoo
     MMoollnnaarr).

     (OOssaammuu AAookkii) Vous DEVEZ aussi _d_é_s_a_c_t_i_v_e_r toutes les fonctionnalités
     du BIOS liées à 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 activées, des plantages
  aléatoires peuvent se produire


  13.
     DDéébboogguueerr ddeess bbllooccaaggeess

     (item par WWaaddee HHaammppttoonn)

     Un bon moyen de déboguer 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 débogage. N'utilisez PAS l'option de
     blocage logicielle ! Pour des machines SMP récentes, activez
     l'option kernel debugging et ensuite l'option NMI oopser. Afin de
     vérifier que le NMI oopser fonctionne, après avoir démarré avec
     votre nouveau noyau, exécutez un /cat /proc/interrupts et vérifiez
     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 appelée.  Quand la machine se bloque, écrivez sur un
     papier la première colonne ordonnée 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 série facilite grandement le
     débogage des blocages noyau, qu'ils soient SMP ou non !


  14.
     MMeessssaaggeess ""AAPPIICC eerrrroorr iinntteerrrruupptt oonn CCPPUU##nn,, sshhoouulldd nneevveerr hhaappppeenn"" ddaannss
     lleess llooggss

     Un message comme:






     ___________________________________________________________________
     APIC error interrupt on CPU#0, should never happen.
     ... APIC ESR0: 00000002
     ... APIC ESR1: 00000000
     ___________________________________________________________________


  indique la réception d'une erreur de calcul de code d'intégrité. Linux
  ne peut en être responsable car la partie calcul des messages APIC est
  complètement matérielle. Il peut s'agir d'un problème matériel
  marginal. Tant que vous ne percevez pas d'instabilité, ils ne sont pas
  problématiques. Les messages APIC sont renvoyés jusqu'à ce qu'il
  soient délivrés (IInnggoo MMoollnnaarr).



  33..22..  CCaauusseess ppoossssiibblleess ddee ppllaannttaaggeess

  Dans cette section vous trouverez quelques information sur les causes
  ppoossssiibblleess de plantage sur une machine SMP (merci à JJaakkoobb ØØsstteerrggaaaarrdd
  pour cette partie).  Autant que je sache (David), les problèmes
  évoqués ici sont spécifiques aux plate-formes Intel.



  ·  PPrroobbllèèmmeess ddee rreeffrrooiiddiisssseemmeenntt

     De RRaallff BBääcchhllee: (concernant la taille des boîtiers et les
     ventilateurs) il est important que l'air circule.  Bien sûr, ce
     n'est pas possible quand toutes sortes d'obstacles, tels des
     câbles, l'en empêchent dans des boîtiers par trop exigus.  D'un
     autre côté, j'ai vu des boîtiers surdimensionnés provoquer de gros
     problèmes. Il existe des boîtiers au format tour sur le marché qui
     s'avèrent actuellement pire à rafraîchir que des boîtiers au format
     bureau.  En bref, la meilleure chose à faire est de penser à
     l'aérodynamique dans le boîtier. Des boîtiers supplémentaires pour
     les périphériques dégageant de la chaleur sont également utiles.

     Bien sûr vous pouvez toujours aller chez Radio Shack (ou similaire)
     et acheter un ventilateur. Vous pouvez utiliser lm_sensor pour
     surveiller la température des processeurs PII et PIII. Cela peut
     vous aider à déterminer si la chaleur est un problème ou non (WWaaddee
     HHaammppttoonn).


  ·  MMaauuvvaaiissee bbaarrrreettttee ddee mméémmooiirree

     N'achetez pas de la RAM bon marché et ne mélangez pas des barrettes
     différente sur une même carte mère.

     Les cartes mères Tyan sont tout particulièrement 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 mémoire RAM PC 100 à 10ns vendues
     avec des cartes mères dont le processeur avait vraiment besoin de
     RAM à 8ns (WWaaddee HHaammppttoonn).


  ·  MMaauuvvaaiissee ccoommbbiinnaaiissoonn ddee pprroocceesssseeuurrss ddee ffrrééqquueenncceess ddiifffféérreenntteess

     Vérifiez /proc/cpuinfo pour voir si vos processeurs fonctionnent à
     la même cadence.



  ·  SSii vvoottrree ssyyssttèèmmee eesstt iinnssttaabbllee,, SSUURRTTOOUUTT nnee ll''oovveerrcclloocckkeezz ppaass !!

     D'ailleurs, même s'il est stable, ne le surcadencez pas.


     De RRaallff BBääcchhllee: le surcadencement pose des problèmes très subtils.
     J'ai un bel exemple: une de mes vieilles machines surcadencées
     commet des erreurs de calcul pour quelques pixels d'une fractale de
     640 X 400. Le problème 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.


  ·  NNooyyaauuxx 22..00..xx eett EEtthheerrnneett rraappiiddee (de RRoobbeerrtt GG.. BBrroowwnn)

     Les noyaux 2.0.x sur des systèmes Ethernet rapide et hautes
     performances ont des problèmes significatifs (et connus) avec les
     conditions de course/inter-blocage (race/deadlock) dans la prise en
     charge des interruptions réseau.


     La solution consiste à obtenir la dernière version des pilotes
     100BT en cours de développement à CESDIS Linux Ethernet device
     drivers site <http://cesdis.gsfc.nasa.gov/linux/drivers/> (ceux qui
     sont au point définissent SMPCHECK).


  ·  UUnn bboogguuee ddaannss llee cchhiippsseett 444400FFXX (de EEmmiill BBrriiggggss)

     Si votre système utilise le chipset 440FX alors les problèmes de
     blocage sont peut-être dûs à une erreur (documentée) du chipset. En
     voici la référence:


     Intel 440FX PCIset 82441FX (PMC) et 82442FX (DBX) Specification
     Update.  pg. 13


     http://www.intel.com/design/pcisets/specupdt/297654.htm


     Le problème peut se résoudre 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


  ·  NNEE PPAASS llaanncceerr eemmmm338866..eexxee aavvaanntt ddee ddéémmaarrrreerr LLiinnuuxx SSMMPP

     De MMaarrkk DDuugguuiidd, Règle implicite #1 avec une carte mère W6LI. ;)


  ·  SSii llaa mmaacchhiinnee rreeddéémmaarrrree//ggèèllee aauu bboouutt dd''uunn mmoommeenntt,, iill ppeeuutt yy aavvooiirr
     ddeeuuxx bboonnnnee rraaiissoonnss lliiééeess àà llaa mméémmooiirree eett aauu BBIIOOSS (JJaakkoobb ØØsstteerrggaaaarrdd)

  ·  Si le BIOS est muni de réglages comme "memory hole at 16M" et/ou
     "OS/2 memory > 64MB", essayez de les désactiver tous les deux.
     Linux ne réagit pas toujours très bien à ces deux options.

  ·  Si vous avez plus de 64 MB de mémoire dans votre machine, et que
     vous spécifiez manuellement le chiffre exact dans la configuration
     de LILO, vous devriez spécifier 1 MB de moins que ce vous avez
     réellement dans votre machine. Si vous avez 128 MB, votre ligne
     dans votre lilo.conf ressemble à: append="mem=127M"

  ·  SSooyyeezz aavveerrttiiss ddeess pprroobbllèèmmeess ccoonncceerrnnaanntt lleess IIRRQQ

     Parfois, certaines cartes ne sont pas reconnues ou peuvent
     déclencher des conflits d'IRQ. Essayez de mettre les cartes sur des
     slots différents et si possible de les assigner à des IRQ
     différentes.


     Contribution de hhAASSCCIIII : enlever la ligne "append="hisax=9,2,3"
     dans lilo.conf autorisant à utiliser un noyau de la série 2.1.xx
     avec le support ISDN + Hisax activé. Les noyaux de la série 2.0.xx
     ne posent pas ce genre de problème.


     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 (IInnggoo MMoollnnaarr).



  ·  UUttiilliissaattiioonn ssiimmuullttaannééee dduu lleecctteeuurr ddee ddiissqquueetttteess ddee llaa ssoorrttiiee ssoonn

     Si vous bloquez alors que vous essayez d'accéder 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 problème se manifeste avec mon
     Dell WS400 dual PII/300, 2.2.x, SMP (WWaaddee HHaammppttoonn).



  33..33..  IInnffoorrmmaattiioonnss ssppéécciiffiiqquueess aauuxx ccaarrtteess mmèèrreess

  _N_o_t_e_z que des informations plus précises peuvent être trouvées avec la
  liste des Cartes mère supposées fonctionner sous Linux SMP
  <http://www.nlug.org/smp/>



  33..33..11..  CCaarrtteess mmèèrreess aavveecc ddeess pprroobbllèèmmeess ccoonnnnuuss


  ·  Aucune pour l'instant


  33..44..  MMaacchhiinnee SSMMPP LLiinnuuxx àà bbaass pprriixx ((mmaacchhiinnee ddoouubbllee CCeelleerroonn))

  (SSttéépphhaannee ÉÉccoolliivveett)


  Les machines SMP Linux les moins chères avec des processeurs
  disponibles de nos jours sont les systèmes double Celeron. Un tel
  système n'est pas officiellement possible selon Intel. On a intérêt à
  vérifier qu'il s'agit bien de Celerons de seconde génération, ceux
  avec 128 Kb de cache L2.


  33..44..11..  EEsstt--iill ppoossssiibbllee ddee ffaaiirree ffoonnccttiioonnnneerr uunnee mmaacchhiinnee ddoouubbllee
  CCeelleerroonn ??

  RRééppoonnssee ooffffiicciieellllee dd''IInntteell :: non, le Celeron ne peut pas fonctionner
  en mode SMP.



  RRééppoonnssee pprraattiiqquuee :: c'est possible, mais cela demande une modification
  matérielle pour les processeurs Slot 1. La manipulation est décrite
  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'altération peut-être faite sur l'adaptateur Socket 370 à
  Slot 1 qui peut même être vendu pré-cablé pour une utilisation SMP
  (AAnnddyy PPoolliinngg, HHaannss -- EErriikk SSkkyyttttbbeerrgg, JJaammeess BBeeaarrdd).


  Il existe aussi une carte mère (ABIT BP6) autorisant l'insertion de
  deux Celerons dans le format Socket 370 (MMaarrttiijjnn KKrruuiitthhooff, RRyyaann
  MMccCCuuee), l'ABIT Computer BP6 vérifiée, testée et supportée sous linux
  avec deux ppga socket 370 (AAnnddrree HHeeddrriicckk).


  33..44..22..  CCoommmmeenntt LLiinnuuxx ssee ccoommppoorrttee--tt--iill ssuurr lleess ssyyssttèèmmeess ddoouubbllee CCeelleerroonn
  ??

  Bien, merci.


  33..44..33..  QQuu''eenn eesstt--iill ddeess ssyyssttèèmmeess ddoouubblleess CCeelleerroonn ??  LLeess pprroocceesssseeuurrss
  CCeelleerroonn ssoonntt rrééppuuttééss ppoouurr êêttrree ffaacciilleemmeenntt ssuurrccaaddeennççaabbllee..

  Cela ppeeuutt marcher. Néanmoins, surcadencer un tel système n'est pas
  aussi facile que pour un monoprocesseur. Ce n'est franchement pas une
  bonne idée pour un système de production. Pour une utilisation
  personnelle, des systèmes double Celeron 300 A fonctionnant
  parfaitement à 450 MHz ont été signalés (ddee nnoommbbrreeuusseess ppeerrssoonnnneess).


  33..44..44..  EEtt uunn ssyyssttèèmmee qquuaaddrruuppllee CCeelleerroonn ??

  C'est impossible. Les processeurs Celerons possèdent à peu près les
  mêmes fonctionnalités qu'un Pentium II basique. Si vous voulez plus de
  deux processeur dans votre système, vous devriez regarder du côté des
  machines à base de Pentium Pro, Pentium II Xeon ou Pentium III (?).


  33..44..55..  PPoouurrqquuooii nnee ppaass mmééllaannggeerr CCeelleerroonn eett PPeennttiiuumm IIII ??

  Un système utilisant un Celeron "ré-autorisé" et un Pentium II à la
  même cadence ppeeuutt tthhééoorriiqquueemmeenntt fonctionner.

  AAlleexxaannddrree CChhaarrbbeeyy à fabriqué un tel système:

  ·  Carte mère Asus P2B-D, proc 1: Celeron 366, proc 2: Pentium II
     400@266

  ·  Les fréquences de bus 66Mhz et 75Mhz furent fonctionnelles

  ·  Le processeur le plus rapide (dans ce cas le Celeron) doit être
     placé sur le deuxième slot. Inverser les processeurs (le plus
     rapide en premier) conduit rapidement à un échec.


  44..  QQuueessttiioonnss ssppéécciiffiiqquueess àà ll''aarrcchhiitteeccttuurree SSppaarrcc



  44..11..  QQuueelllllleess ssoonntt lleess mmaacchhiinneess SSppaarrcc ssuuppppoorrttééeess ??

  Citation de la page web UltraLinux <http://ultra.linux.cz/> (systèmes
  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 (AAnnttoonn BBllaanncchhaarrdd)

  UltraLinux a fonctionné sur une machine de 14 processeurs (voir la
  sortie dmesg <http://lwn.net/1998/1210/a/dm-sparc.html>).


  44..22..  PPrroobbllèèmmeess ssppéécciiffiiqquueess aauu ssuuppppoorrtt SSMMPP SSppaarrcc

  (DDaavviidd MMiilllleerr) Il ne devrait pas y avoir d'inquiétudes.

  Le seul problème connu et que nous n'avons pas l'intention de
  corriger, consiste en ce qu'un noyau SMP compilé pour des systèmes
  32bits (ie.  non-ultrasparc) ne fonctionnera pas sur les systèmes
  sun4c.


  44..33..  LLiimmiitteess SSMMPP ssppéécciiffiiqquueess aauu nnooyyaauu ccoouurraanntt ((22..22))

  DDaavviidd MMiilllleerr: il y a un bug dans le fichier d'en-tête
  include/linux/tasks.h, cela nécessite de définir NR_CPUS à 64 sur
  UltraSparc puisqu'il s'agit de la limite supérieure pour le matériel
  que nous supportons :-)


  55..  QQuueessttiioonnss ssppéécciiffiiqquueess àà ll''aarrcchhiitteeccttuurree PPoowweerrPPCC



  55..11..  QQuueelllllleess ssoonntt lleess mmaacchhiinneess PPPPCC ssuuppppoorrttééeess ??


  ·  Cartes mères PowerSurge (incluant UMAX s900)

  ·  PowerMac

  ·  Motorola MTX : support en cours de développement. Les patches ne
     sont pas encore inclus dans le noyau principal (TTrrooyy BBeennjjeeggeerrddeess).

  (CCoorrtt DDoouuggaann) Non supporté: Systèmes PPC RS/6000


  55..22..  PPrroobbllèèmmeess ssppéécciiffiiqquueess ccoonncceerrnnaanntt llee ssuuppppoorrtt SSMMPP PPPPCC

  Rien. Compilation SMP normale (voir plus haut). Comme d'habitude,
  soyez attentif. Les modules sont spécifiques pour UP ou pour SMP.
  Recompilez les (PPaauull MMaacckkeerrrraass).


  66..  QQuueessttiioonnss ssppéécciiffiiqquueess àà ll''aarrcchhiitteeccttuurree AAllpphhaa


  66..11..  QQuueelllleess ssoonntt lleess mmaacchhiinneess AAllpphhaa ssuuppppoorrttééeess ??

  GGeeeerrtteenn KKuuiippeerr : le SMP marche pour la plupart des serveurs AXP, sinon
  pour tous.


  JJaayy AA EEssttaabbrrooookk : 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)


  66..22..  PPrroobbllèèmmeess ssppéécciiffiiqquueess aauu ssuuppppoorrtt SSMMPP AAllpphhaa

  Aucun (vraiment ? :-) ).


  77..  PPooiinntteeuurrss uuttiilleess


  77..11..  DDiivveerrss


  ·  Parallel Processing en utilisant Linux
     <http://yara.ecn.purdue.edu/~pplinux/>

  ·  Linux Parallel Processing HOWTO
     <http://yara.ecn.purdue.edu/~pplinux/PPHOWTO/pphowto.html>

  ·  ((ddééppaasssséé)) Page d'acceuille SMP Linux
     <http://www.uk.linux.org/SMP/title.html>

  ·  linux-smp mailing list

     Pour ssoouussccrriirree, envoyez subscribe linux-smp dans le corps du
     message à majordomo@vger.rutgers.edu

     Pour se ddééssiinnssccrriirree, 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 mères qui paraît-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/>

  ·  Systèmes Double Celeron <http://kikumaru.w-
     w.ne.jp/pc/celeron/index_e.html>



  77..22..  PPrrooggrraammmmeess eett lliibbrraaiirriieess mmuullttiitthhrreeaadd


  ·  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 prévue pour le
     5/27/98. Pour plus de détails, voir Blas News
     <http://www.cs.utk.edu/~ghenry/distrib/blasnews>).

  ·  Librairie Mesa <http://www.ssec.wisc.edu/~brianp/Mesa.html>
     (support multithread expérimental)

  ·  Plugins parallèles pour The GIMP
     <http://nemo.physics.ncsu.edu/~briggs/gimp/index.html>



  77..33..  PPaattcchheess ssppéécciiffiiqquueess SSMMPP


  ·  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 (dernière 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 esthètes seulement, s'il vous plaît lisez linux-
     smp@vger.rutgers.edu)



  77..44..  CCoommppiillaatteeuurrss ppaarraallllèèlliisseeuurrss//ooppttiimmiisseeuurrss ppoouurr lleess mmaacchhiinneess
  558866//668866 (( SSuummiitt RRooyy ))


  ·  Pentium Compiler Group <http://www.goof.com/pcg/> créateur 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 parallèlisation
     Fortran sur Linux
  ·  Pacific-Sierra Research Corporation <http://www.psrv.com/> contient
     un compilateur gratuit F90 pour Linux et aussi des compilateurs
     parallèlisant pour SMP Linux

  ·  Applied Parallel Research <http://s006.infomall.org/index.html>
     inclut actuellement des compilateurs parallèlisant 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 (GGeerroo WWeeddeemmaannnn).


  88..  GGlloossssaarryy


  ·  SSMMPP Multi-Processeur Symmétrique

  ·  AAPPIICC Contrôleur d'Interruptions Programmable Avancé

  ·  tthhrreeaadd Un thread est l'activité processeur dans un processus.  Un
     même processus peut avoir de multiples thread. Ces threads
     partagent l'espace adresse du processus et peuvent donc par-là
     partager des données.

  ·  pptthhrreeaadd Posix thread, threads définie par le standard Posix.

  ·  AAPPMM Gestion avancée de l'énergie


  99..  QQuuooii ddee nneeuuff ??



     vv11..99,, 1133 jjaannvviieerr 22000000

     ·  Rappel, désactivation de toutes les fonctions de gestion
        d'énergie du BIOS (OOssaammuu AAookkii)

     ·  Explication sur la manière d'accéder au mode de configuration
        avancé du serveur Compaq (AAddrriiaann PPoorrtteellllii)


     vv11..88,, 88 nnoovveemmbbrree 11999999

     ·  La carte mère quadruple celeron était un canular, restauration
        de l'ancien paragraphe (SSiimmeenn TTiimmiiaann TThhoorreesseenn)


     vv11..77,, 66 nnoovveemmbbrree 11999999

     ·  Nouvelle introduction (CC.. PPoolliisshheerr 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)

     ·  Référence sur KAI un compilateur optimisé (GGeerroo WWeeddeemmaannnn)

     ·  Les cartes mères quadruple celeron existent (JJeeffffrreeyy HH.. IInnggbbeerr)


     vv11..66,, 2211 ooccttoobbrree 11999999


     ·  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 matériels

     ·  Suppression de la section "Comment obtenir un maximum de
        performance" (obsolète)

     ·  Ajout d'information sur les systèmes double processeurs avec
        différents processeurs x86 (un Celeron et un PII)


     vv11..55,, 44 ooccttoobbrree 11999999

     ·  Plus de précision dans la description de PSET


     vv11..44,, 3300 sseepptteemmbbrree 11999999

     ·  Précision sur l'activation du support MTRR pour les noyaux SMP
        x86 (moi)


     vv11..33,, 2299 sseepptteemmbbrree 11999999

     ·  Beaucoup beaucoup de corrections grammaticales et typographique
        (WWaaddee HHaammppttoonn aka hww)

     ·  Ajout d'information dans la courte introduction à propos des
        différences 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 problèmes liés aux modules
        SMP/UP (hww)

     ·  Ajout de précision 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 débogage des problèmes de blocage (hww)

     ·  Ajout d'information à propos des problèmes de dégagement de
        chaleur (hww)

     ·  Divers mise à jour que j'ai oublié (hww)

     ·  Nouvel item à propos des accès disquette et du son (hww)


     vv11..22,, 2277 sseepptteemmbbrree 11999999

     ·  Changement de nom: ce document est maintenant un Howto.  TWD, et
        rapide! (GGuuyyllhheemm AAzznnaarr)


     vv11..11,, 2266 sseepptteemmbbrree 11999999


     ·  Ajout d'un lien vers le premier brouillon de la FAQ de Chris
        Pirish

     ·  Extension des problèmes liés aux IRQ


     vv11..0000,, 2255 sseepptteemmbbrree 11999999

     ·  Première 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" : dépassé

     ·  Suppression de l'item "Mon système SMP se verrouille tout le
        temps." : dépassé

     ·  Suppression de l'item "Vous utilisez le 2.0.35, n'est-ce pas
        ?" : dépassé

     ·  Suppression de l'item "Certains matériels sont aussi connu pour
        poser des problèmes." : dépassé

     ·  Effacement de la section "Cartes mère avec des problèmes
        connus". Nous devrions recommencer du début.

     ·  Suppression de la section "Carte mère sans problèmes connus" :
        dépassée

     ·  Mise à jour de la section celeron (de nombreuses personnes)

     ·  Ajout de "Les machines SPARC sun4m SMP" dans les machines Sparc
        supportées (AAnnttoonn BBllaanncchhaarrdd)

     ·  Ajout de l'item "Durant le démarrage la machine se bloque en
        signalant un problème 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 ?"

     ·  Réparation d'un lien dépassé

     ·  Ajout d'un pointeur vers les patches de test SMP d'Ingo


     vv00..5544,, 1133 mmaarrss 11999999

     ·  Ajout de la section à propos des systèmes SMP Alpha


     vv00..5533,, 0088 mmaarrss 11999999

     ·  Ajout de la section sur les systèmes PowerPC SMP


     vv00..5522,, 0077 mmaarrss 11999999

     ·  Ajout de la section sur les systèmes Sparc SMP


     vv00..5511,, 0066 mmaarrss 11999999

     ·  Ajout de la section dual-celeron

     ·  Suppression de la section Adaptec

     ·  Mise à jour du lien procps

     ·  Mise à jour du lien xosview

     ·  Ajout d'une réponse 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


     vv00..5500,, 0033 fféévvrriieerr 11999999

     ·  Mise à jour du lien "Programmes Multithread sous linux"


     vv00..4499,, 1133 jjaannvviieerr 11999999

     ·  Mise à jour à propos de CONFIG_SMP. Ajout du .txt dans
        Documentation/smp. (MMiicchhaaeell EElliizzaabbeetthh CChhaassttaaiinn)


     vv00..4488,, 1100 ddéécceemmbbrree 11999988

     ·  Fautes d'orthographes corrigée. Adresses email corrigée.


     vv00..4477,, 2200 nnoovveemmbbrree 11999988

     ·  Ajout de la mention du patch MTRR est inclus 2.0.36 (lié à des
        problème de BogoMips)


     vv00..4466,, 1100 nnoovveemmbbrree 11999988

     ·  Mise à jour à propos des cartes mère Epox KP6-LS


     vv00..4455,, 2255 ooccttoobbrree 11999988

     ·  Correction d'une erreur concernant le fichier /proc/stat

     ·  Ajout d'un pointeur vers le site CESDIS Ethernet Linux Drivers


     vv00..4444,, 1144 ooccttoobbrree 11999988

     ·  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 chronométrer un
        système SMP avec les noyaux 2.0


     vv00..4433,, 99 sseepptteemmbbrree 11999988

     ·  Mise à jour de la première question dans la section 3.1

     ·  Mise à jour du lien mt-Mesa : multithread est maintenant inclus
        comme expérimental dans la distribution Mesa

     vv00..4422,, 22 sseepptteemmbbrree 11999988

     ·  Mise à jour cosmétique dans la section 3.3

     ·  Deux liens sont marquer comme obsolètes (Multithreaded Mesa et
        performance SMP)

     ·  Mise à jour de l'item à propos des threads et des exceptions en
        C++ (sect 3.3)


     vv00..4411,, 11 sseepptteemmbbrree 11999988

     ·  Ajout d'une section majeur: "3.3 Programmation SMP" écrite par
        Jakob Østergaard

     ·  Déplacement de la section "3.2 Coté utilisateur" vers la section
        3.3


     vv00..4400,, 2277 aaooûûtt 11999988

     ·  Mise à jour: section 3.1, item 7: processor affinity


     vv00..3399,, 2277 aaooûûtt 11999988

     ·  Mise à jour nécessaire du BOIS Award pour les cartes mères Tyan
        (hhAASSCCIIII)

     ·  Ajout d'un item sur les IRQ dans la section plantage (moi et
        hhAASSCCIIII)

     ·  Ajout du bon support de l'Asus P2B-DS (UUllff RRoommppee)

     ·  Ajout d'une autre archive smp-list dans la section pointeur
        (HHaannkk LLeeiinniinnggeerr)


     vv00..3388,, 88 aaooûûtt 11999988

     ·  Ajout d'un pointeur vers la FAQ Linux Threads


     vv00..3377,, 3300 JJuuiilllleett 11999988

     ·  EEmmiill BBrriiggggss est en train de travailler sur des plugins
        parallèles pour Gimp (voir "Existe-t-il des programmes ou des
        library utilisant les threads ?", section "Coté utilisateur")


     vv00..3366,, 2266 JJuuiilllleett 11999988

     ·  Merci à JJaakkoobb ØØsstteerrggaaaarrdd, 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 liés au BIOS"


     vv00..3355,, 1144 JJuuiilllleett 11999988

     ·  Ajout des N440BX Server Board dans carte-mère-sans-aucun-
        problème

     ·  Ajout d'une success story pour la carte mère GigaByte avec une
        mise à jour du BIOS

     ·  Ajout de la section "Comment obtenir les performances maximum ?"
        (attend vos suggestions ;)


     vv00..3344,, 1100 jjuuiinn 11999988

     ·  Ajout de la section "Parallelizing/Optimizing Compilers for
        586/686 i machines" dans la section "Useful Pointers", merci à
        SSuummiitt RRooyy

     ·  Correction, "Asus P/I-UP5" est en fait "Asus P/I-P65UP5"


     vv00..3333,, 33 jjuuiinn 11999988

     ·  Encore une success story avec une carte mère GigaByte DLX.

     ·  Une astuce pour les cartes mère Tyan, désactiver l'option "DRAM
        Fast Leadoff" du BIOS


     vv00..3322,, 2277 mmaaii 11999988

     ·  Asus P/I-UP5 ajouter à la section carte-mère-sans-aucun-problème


     vv00..3311,, 1188 mmaaii 11999988

     ·  Elitegroup P6LX2-A marche avec le 2.1.100 et le 101

     ·  Les bugs doivent être rapportés àlinux-smp@vger.rutgers.edu


     vv00..3300,, 1122 mmaaii 11999988

     ·  SuperMicro est maintenant une carte mère dans la section carte-
        mère-sans-aucun-problème


     vv00..2299,, 1111 mmaaii 11999988

     ·  La success story d'une carte mère 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
        détails.


     vv00..2288,, 0099 mmaaii 11999988

     ·  Un miroir US de cette FAQ est maintenant disponible (voir
        Introduction)

     ·  Fusion de deux entrées confuses, Gigabyte 686


     vv00..2277,, 0055 mmaaii 11999988


     ·  Nouvelles informations pour les pilotes Adaptec et TekRam

     ·  Les cartes mères Micronics W6-LI marche avec SMP



  1100..  LLiissttee ddeess ccoonnttrriibbuutteeuurrss

  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 Bächle

  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.
     Stéphane É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 ``''

  11..  CCoommmmeenntt SSRRMM ddeemmaarrrree--tt--iill uunn ssyysstteemmee dd''eexxppllooiittaattiioonn ??

  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.

  11..11..  CChhaarrggeerr llee cchhaarrggeeuurr sseeccoonnddaaiirree

  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.

  22..  LLee cchhaarrggeeuurr bbrruutt

  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 :

     ttoooollss//llxxbboooott:
        Le premier secteur du disque. Il contient l'adresse et la taille
        du prochain fichier au format decrit ci-dessus.

     ttoooollss//bboooottllxx:
        Le lanceur brut qui chargera le fichier ci-dessous

     vvmmlliinnuuxx..nnhh:
        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.

  33..  LLee cchhaarrggeeuurr aabboooott

  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.

  33..11..  SSee pprrooccuurreerr eett iinnssttaalllleerr aabboooott

  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 :

     aabboooott
        L'executable reel (fichier objet ECOFF ou ELF),

     bboooottllxx
        Comme ci-dessus, mais ce fichier ne contient  que  les  segments
        text, data et bss (ce fichier n'est pas un fichier objet),

     ssddiisskkllaabbeell//wwrriitteebboooott
        Un utilitaire pour installer aboot sur un disque dur,

     ttoooollss//ee22wwrriitteebboooott
        Un  utilitaire  pour  installer aboot sur un systeme de fichiers
        ext2 (n'est en general utilise que pour les disquettes),

     ttoooollss//iissoommaarrkkbboooott
        Un utilitaire pour installer aboot sur un  systeme  de  fichiers
        iso9660 (utilise par les distributeurs de CD-ROM),

     ttoooollss//aabboooottccoonnff
        Un utilitaire pour configurer aboot s'il est installe.

  33..22..  IInnssttaallllaattiioonn ssuurr ddiissqquueettttee

  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

  33..33..  IInnssttaallllaattiioonn ssuurr ddiissqquuee dduurr

  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.

  33..44..  IInnssttaallllaattiioonn ssuurr CCDD--RROOMM

  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 !

  33..55..  CCoonnssttrruuiirree uunn nnooyyaauu LLiinnuuxx

  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

  33..66..  DDeemmaarrrreerr LLiinnuuxx

  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.

  33..66..11..  NNoomm dduu ffiicchhiieerr bboooott

  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).

  33..66..22..  DDrraappeeaauuxx ddee ddeemmaarrrraaggee

  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 :

     llooaadd__rraammddiisskk==11
        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.

     ffllooppppyy==_s_t_r

     rroooott==_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).

     ssiinnggllee
        Lance le systeme en mode mono-utilisateur.

     kkggddbb
        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

  33..66..22..11..  SSeelleeccttiioonnnneerr llaa ppaarrttiittiioonn ddee //eettcc//aabboooott..ccoonnff

  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.

  33..77..  DDeemmaarrrraaggee rreesseeaauu

  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.

  44..  PPaarrttaaggeerr uunn ddiissqquuee aavveecc DDiiggiittaall UUnniixx

  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.

  44..11..  PPaarrttiittiioonnnneerr llee ddiissqquuee

  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 ;-).

  44..22..  IInnssttaalllleerr aabboooott

  _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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  CCooppyyrriigghhtt

  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.

  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  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.

  11..33..  RReettoouurr dd''iinnffoorrmmaattiioonnss

  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.

  11..44..  AAvveerrttiisssseemmeenntt

  Votre systeme peut varier par rapport aux exemples, et  les  solutions
  presentees dans ce HOWTO peuvent ne pas fonctionner.

  22..  MMaatteerriieell ssuuppppoorrttee

  Les materiels suivants fonctionnent correctement sous Linux.

  22..11..  CCaarrtteess sseerriiee ssttaannddaarrddss ppoouurr PPCC

  +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.

  22..22..  MMooddeemmss PPlluugg AAnndd PPllaayy ((PPnnPP))

  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 :-)

  22..33..    CCaarrtteess   sseerriiee    mmuullttiippoorrttss    ssiimmpplleess    ((eeqquuiippeeeess    dd''UUAARRTT
  88225500//1166445500//1166555500AA))

  +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.

  22..44..  CCaarrtteess sseerriiee mmuullttiippoorrttss iinntteelllliiggeenntteess

  +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.

  22..55..  MMaatteerriieell nnoonn ssuuppppoorrttee

  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.

  33..  CCoommmmeenntt ssee nnoommmmeenntt lleess ppoorrttss sseerriiee ??

  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.

  33..11..  PPeerriipphheerriiqquueess sseerriiee eett nnuummeerrooss ddaannss //ddeevv

  /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*

  33..11..11..  CCrreeeerr lleess ppeerriipphheerriiqquueess ddaannss //ddeevv

  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.

  33..22..  RReemmaarrqquueess ppoouurr lleess ccaarrtteess mmuullttiippoorrttss ssiimmpplleess

  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.

  33..33..  RReemmaarrqquueess ppoouurr lleess ccaarrtteess mmuullttiippoorrttss iinntteelllliiggeenntteess

  Lisez  les  informations  fournies  avec  le gestionnaire.  Ces cartes
  utilisent des peripheriques non-standards.  Ces  informations  varient
  suivant le materiel.

  44..  QQuueellqquueess pprrooggrraammmmeess iinntteerreessssaannttss aa ccoonnnnaaiittrree

  44..11..  QQuu''eesstt--ccee qquuee ggeettttyy ?

  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.

  44..11..11..  AA pprrooppooss ddee ggeettttyy__ppss

  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.

  44..11..22..  AA pprrooppooss ddee mmggeettttyy

  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/.

  44..11..33..  AA pprrooppooss ddee aaggeettttyy

  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.

  44..22..  QQuu''eesstt--ccee qquuee sseettsseerriiaall ?

  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.

  55..  CCoommmmeenntt ppuuiiss--jjee aappppeelleerr aavveecc mmoonn mmooddeemm ??

  55..11..  MMaatteerriieell nneecceessssaaiirree

  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.

  55..11..11..  RReemmaarrqquueess ppoouurr lleess mmooddeemmss iinntteerrnneess

  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.

  55..22..  ````PPaarrlleezz'''' aa vvoottrree mmooddeemm

  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.

  55..33..  CCoonnffiigguurraattiioonn dduu mmooddeemm eenn mmooddee aappppeellaanntt

  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.

  55..44..  CCoonnttrroollee ddee fflluuxx mmaatteerriieell

  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.

  66..   CCoommmmeenntt  ppuuiiss--jjee  aappppeelleerr  eett  eettrree  aappppeellee  aavveecc  mmoonn  mmooddeemm  eett
  ggeettttyy__ppss ?

  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.

  66..11..  CCoonnffiigguurraattiioonn eenn mmooddeess aappppeellaanntt eett aappppeellee

  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.

  66..22..  IInnssttaalllleerr ggeettttyy__ppss

  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.

  66..33..  CCoonnffiigguurreerr uuuuggeettttyy

  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

  66..44..  PPeerrssoonnnnaalliisseerr uuuuggeettttyy

  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).

  77..  CCoommmmeenntt ccoonnffiigguurreerr uunn tteerrmmiinnaall rraaccccoorrddee aa mmoonn PPCC ??

  Ces  instructions permettent aussi bien de connecter des terminaux que
  d'autres ordinateurs sur le port serie de votre machine Linux.

  77..11..  BBeessooiinnss mmaatteerriieellss

  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.

  77..22..  CCoonnffiigguurreerr ggeettttyy

  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.

  77..33..  RReemmaarrqquueess ssuurr llaa ccoonnffiigguurraattiioonn dd''uunn PPCC eenn ttaanntt qquuee tteerrmmiinnaall

  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.

  88..  PPuuiiss--jjee uuttiilliisseerr pplluuss ddee ddeeuuxx ppoorrttss sseerriiee ??

  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.

  88..11..  CChhooiissiirr lleess iinntteerrrruuppttiioonnss ddeess ppeerriipphheerriiqquueess sseerriiee

  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.

  88..22..  CChhooiissiirr lleess aaddrreesssseess ddeess ppeerriipphheerriiqquueess sseerriiee

  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.

  99..   CCoommmmeenntt  ccoonnffiigguurreerr  ddeess vviitteesssseess pplluuss iimmppoorrttaanntteess ppoouurr mmeess ppoorrttss
  sseerriiee ?? AA qquueellllee vviitteessssee ddooiiss--jjee ffiixxeerr mmoonn mmooddeemm ??

  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

  1100..  PPrrooggrraammmmeess eett uuttiilliittaaiirreess ddee ccoommmmuunniiccaattiioonnss

  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.

  1111..  TTrruuccss eett aassttuucceess ssuurr lleess lliiaaiissoonnss sseerriiee

  Je  vous  presente  ici  quelques  astuces  que  vous  pourrez trouver
  utiles...

  1111..11..  kkeerrmmiitt 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.

  1111..22..  PPaarraammeettrreerr lleess ttyyppeess ddee tteerrmmiinnaauuxx aauuttoommaaggiiqquueemmeenntt

  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.

  1111..33..  llss 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.

  1111..44..  IImmpprriimmeerr ssuurr uunnee iimmpprriimmaannttee aattttaacchheeee aa uunn tteerrmmiinnaall

  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.

  1111..55..     LLiinnuuxx    ppeeuutt--iill    ccoonnffiigguurreerr   lleess   ppeerriipphheerriiqquueess   sseerriiee
  aauuttoommaaggiiqquueemmeenntt ??

  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.

  1111..55..11..  RReemmaarrqquueess ppoouurr lleess ccaarrtteess mmuullttiippoorrttss

  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.

  1111..66..  UUttiilliisseerr uunnee ccoonnssoollee sseerriiee

  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)

  1111..77..  OObbtteenniirr ddeess ddeebbiittss pplluuss iimmppoorrttaannttss

  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.

  1122..  UUnn ppaass ddee pplluuss......

  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.

  1122..11..  QQuu''eesstt--ccee qquuee lleess ffiicchhiieerrss vveerrrroouuss ??

  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.

  1122..22..  ````bbaauudd'''' eett ````bbppss''''

  ``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 !
     bbaauudd
        Le  baud  represente la frequence de (de)modulation d'un signal,
        par exemple celui envoye  ou  recu  par  un  modem  (mmoodulateur-
        ddeemmodulateur),  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.

     bbppss
        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.

  1122..33..   QQuu''eesstt--ccee  qquuee  lleess  UUAARRTT  ??   CCoommmmeenntt  iinnfflluueenntt--iillss  ssuurr  lleess
  ppeerrffoorrmmaanncceess ??

  Les  UART  (UUniversal  AAsyncronous  RReceiver  TTransmitter  --  EEmmeetttteeuurr
  RReecceepptteeuurr  UUnniivveerrsseell  AAssyynncchhrroonnee))  ssoonntt  ddeess  cciirrccuuiittss   eelleeccttrroonniiqquueess
  eeqquuiippaanntt  lleess  ccaarrtteess  sseerriiee  ddeess  PPCC..   IIllss sseerrvveenntt aa ttrraannssffoorrmmeerr lleess
  ddoonnnneeeess eenn bbiittss,, aa lleess eennvvooyyeerr ssuurr llaa lliiggnnee sseerriiee,, ppuuiiss aa rreeccoonnssttrruuiirree
  cceess  ddoonnnneeeess  aa  ll''aauuttrree  bboouutt..  IIllss  ttrraavvaaiilllleenntt  ssuurr ddeess oocctteettss,, qquuii
  ccoorrrreessppoonnddeenntt jjuusstteemmeenntt aa llaa ttaaiillllee ddeess ccaarraacctteerreess AASSCCIIII..

  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.

  1133..  RReessoouuddrree lleess pprroobblleemmeess

  1133..11..   LLee mmeessssaaggee ````lliinnee _N_N_N ooff iinniittttaabb iinnvvaalliidd'''' ss''aaffffiicchhee eenn ppeerrmmaa--
  nneennccee

  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.

  1133..22..  LLee mmeessssaaggee ````//ddeevv//ccuuaa_N::  DDeevviiccee  oorr  rreessoouurrccee  bbuussyy''''  aappppaarraaiitt
  qquuaanndd jj''eessssaaiiee dd''aappppeelleerr

  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.

  1133..33..  LLee mmeessssaaggee ````IIdd SS_N rreessppaawwnniinngg ttoooo ffaasstt::  ddiissaabblleedd  ffoorr  55  mmiinn--
  uutteess'''' ss''aaffffiicchhee ppeerriiooddiiqquueemmeenntt

  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''.

  1133..44..  MMeess ppeerriipphheerriiqquueess sseerriiee ssoonntt lleennttss oouu uunniiddiirreeccttiioonnnneellss

  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.

  1133..55..  MMoonn mmooddeemm nnee rreeppoonndd pplluuss aapprreess llee rraaccccrroocchhaaggee,, oouu uuuuggeettttyy 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.

  1133..66..   UUnn  tteerrmmiinnaall  eesstt ccoonnnneeccttee aa mmoonn PPCC,, mmaaiiss iill ssee bbllooqquuee ddeess qquuee
  jj''aaii eennttrree mmoonn nnoomm dd''uuttiilliissaatteeuurr

  +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

  1133..77..  MMoonn mmooddeemm ppeerrdd ddeess ddoonnnneeeess aa hhaauuttee vviitteessssee

  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 ?''.

  1133..88..  AAuu ddeemmaarrrraaggee,, LLiinnuuxx nn''aaffffiicchhee ppaass lleess ppoorrttss sseerriiee tteellss  qquuee  jjee
  lleess aaii ppaarraammeettrreess

  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.

  1133..99..  rrzz 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.

  1133..1100..  MMoonn eeccrraann iimmpprriimmee ddeess ccaarraacctteerreess bbiizzaarrrreess

  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

  1133..1111..  ggeettttyy 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...

  1144..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  +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)

  1155..  CCoonnttrriibbuuttiioonnss

  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.

  11..

  IInnttrroodduuccttiioonn

  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.

  11..11..

  CCooppyyrriigghhtt

  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.
  11..22..

  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt..

  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).

  11..33..

  CCoommmmeennttaaiirreess

  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.

  22..

  DDeemmaarrrraaggee

  22..11..

  DDeebbuuggggaaggee

  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.

  22..22..

  CCoonnffiigguurraattiioonn ddeess ppoorrttss

  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 ?

  22..33..

  FFaaccoonnss ddee lliirree ssuurr lleess ppeerriipphheerriiqquueess sseerriiee

  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.

  22..33..11..

  EEnnttrreeee ccaannoonniiqquuee

  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...

  22..33..22..

  EEnnttrreeee nnoonn ccaannoonniiqquuee

  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.

  22..33..33..

  EEnnttrreeee aassyynncchhrroonnee

  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.

  22..33..44..

  AAtttteennttee dd''eennttrreeee ddeeppuuiiss ddee mmuullttiipplleess ssoouurrcceess

  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.

  33..

  EExxeemmpplleess ddee pprrooggrraammmmeess

  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) !

  33..11..

  TTrraaiitteemmeenntt ccaannoonniiqquuee

  #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);
  }

  33..22..

  EEnnttrreeee nnoonn ccaannoonniiqquuee

  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);
  }

  33..33..

  LLeeccttuurree aassyynncchhrroonnee

  #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;
  }

  33..44..

  MMuullttiipplleexxaaggee eenn lleeccttuurree

  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.

  44..

  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  +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.

  55..

  CCoonnttrriibbuuttiioonnss

  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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  NNoottee dduu ttrraadduucctteeuurr

  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.

  11..22..  CChhaannggeemmeennttss ppaarr rraappppoorrtt aauuxx vveerrssiioonnss pprreecceeddeenntteess

  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

  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt::

  La  derniere version de ce document pourra toujours etre recuperee via
  FTP anonyme sur:

  +o  Version Originale: ssuunnssiittee..uunncc..eedduu

     /pub/Linux/docs/HOWTO/SHADOW-HOWTO

  ou:

  /pub/Linux/docs/HOWTO/other-formats/SHADOW-HOWTO{-html.tar,ps,dvi}.gz

  +o  Version Francaise: ffttpp..lliipp66..ffrr

     /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.

  11..44..  CCoommmmeennttaaiirreess oouu ssuuggggeessttiioonnss..

  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.

  22..  PPoouurrqquuooii uuttiilliisseerr llee ssyysstteemmee ddee mmoottss ddee ppaassssee SShhaaddooww??

  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. LLiinnuuxx 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/>

  22..11..  PPaasssswwoorrdd PPoouurrqquuooii  nnee  ddeevvrriieezz--vvoouuss  ppaass  iinnssttaalllleerr  llee  ssyysstteemmee
  SShhaaddooww

  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.

  22..22..  FFoorrmmaatt dduu ffiicchhiieerr //eettcc//ppaasssswwdd

  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:

     uusseerrnnaammee
        Le nom de l'utilisateur (login)

     ppaasssswwdd
        Le mot de passe encode

     UUIIDD
        Identificatuer de l'utilisateur: user ID

     GGIIDD
        Identificatuer du groupe: group ID

     ffuullll__nnaammee
        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

     ddiirreeccttoorryy
        Repertoire personnel de l'utilisateur

     sshheellll
        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.

  22..33..  FFoorrmmaatt dduu ffiicchhiieerr //eettcc//sshhaaddooww

  Le fichier /etc/shadow contient les informations suivantes:

       username:passwd:last:may:must:warn:expire:disable:reserved

  En detail:

     uusseerrnnaammee
        Le Nom de l'Utilisateur

     ppaasssswwdd
        Le mot de passe encode

     llaasstt
        Date de la derniere modification (en nombre de jours  depuis  le
        1er janvier 1970).

     mmaayy
        Nombre de jours avant que le mot de passe puisse etre modifie

     mmuusstt
        Nombre de jours avant que le mot de passe doive etre modifie

     wwaarrnn
        Nombre  de  jours  durant  lesquels l'utilisateur est prevenu de
        l'expiration de son mot de passe.

     eexxppiirree
        Nombre de jours  entre  l'expiration  du  mot  de  passe  et  la
        fermeture du compte.

     ddiissaabbllee
        Date de la fermeture du compte (en nombre de jours depuis le 1er
        janvier 1970).

     rreesseerrvveedd
        Champ reserve

  Donc, l'exemple precedent devrait etre:

       username:Npge08pfz4wuk:9479:0:10000::::

  22..44..  AAppeerrccuu ddee llaa ffoonnccttiioonn ccrryypptt((33))

  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.

  AAtttteennttiioonn:: Une cle de 56 bits correspond a: 2^56 donc  7.3e16  valeurs
  possibles.  Les recherches exhaustives ssoonntt ppoossssiibblleess 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

  33..  SSee pprrooccuurreerr llee ppaaqquueettaaggee SShhaaddooww..

  33..11..  HHiissttoorriiqquuee dduu ppaaqquueettaaggee SShhaaddooww ppoouurr LLiinnuuxx??

  _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>

  33..22..  OOuu ttrroouuvveerr llaa SSuuiittee SShhaaddooww

  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.

  33..33..  CCee qquuii eesstt iinncclluuss ddaannss llee ppaaqquueettaaggee SShhaaddooww

  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.

  44..  CCoommppiilleerr lleess pprrooggrraammmmeess..

  44..11..  EExxttrraaiirree ll''aarrcchhiivvee

  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

  44..22..  CCoonnffiigguurreerr llee ffiicchhiieerr ccoonnffiigg..hh

  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.

  44..33..  FFaaiirree uunnee ccooppiiee ddee ssaauuvveeggaarrddee ddee vvooss pprrooggrraammmmeess oorriiggiinnaauuxx..

  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.

  44..44..  LLaanncceerr mmaakkee

  _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.

  55..  IInnssttaalllleerr

  55..11..  AAyyeezz uunnee ddiissqquueettttee ddee bboooott aa ppoorrtteeee ddee mmaaiinn

  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.

  55..22..  SSuupppprriimmeerr lleess ppaaggeess ddee mmaannuueell eenn ddoouubbllee

  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.

  55..33..  LLaanncceerr mmaakkee iinnssttaallll

  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).

  55..44..  LLaanncceerr ppwwccoonnvv

  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.

  55..55..  RReennoommmmeerr nnppaasssswwdd eett nnsshhaaddooww

  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.

  66..  LLeess aauuttrreess pprrooggrraammmmeess aa mmeettttrree aa jjoouurr

  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).

  66..11..  llee pprrooggrraammmmee AAdddduusseerr ((SSllaacckkwwaarree))

  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

  66..22..  LLee sseerrvveeuurr wwuu__ffttppdd

  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.

  66..33..  ffttppdd ssttaannddaarrdd

  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>

  66..44..  ppoopp33dd ((PPoosstt OOffffiiccee PPrroottooccooll 33))

  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.

  66..55..  xxlloocckk

  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.

  66..66..  xxddmm

  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.

  66..77..  ssuuddoo

  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

  66..88..  iimmaappdd ((ppaaqquueettaaggee EEmmaaiill ppiinnee))

  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.

  66..99..  ppppppdd ((SSeerrvveeuurr PPooiinntt--ttoo--PPooiinntt pprroottooccooll))

  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.

  77..  FFaaiirree eenn ssoorrttee qquuee llaa ssuuiittee sshhaaddooww ffoonnccttiioonnnnee

  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.

  77..11..  AAjjoouutteerr,, mmooddiiffiieerr,, eett ssuupppprriimmeerr ddeess uuttiilliissaatteeuurrss..

  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.

  77..11..11..  uusseerraadddd

  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.

  77..11..22..  uusseerrmmoodd

  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.

  77..11..33..  uusseerrddeell

  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.

  77..22..  LLaa ccoommmmaannddee ppaasssswwdd eett llaa dduurreeee dduu mmoott ddee ppaassssee..

  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.

  77..33..  LLee ffiicchhiieerr llooggiinn..ddeeffss

  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.

  77..44..  LLeess mmoottss ddee ppaassssee ppoouurr lleess ggrroouuppeess

  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:

     ggrroouuppnnaammee
        Le nom du groupe,

     !!  Le  champs  contenant  normalement  le  mot  de  passe  qui  est
        maintenant stocke dans le fichier /etc/gshadow,

     GGIIDD
        L'identificateur numerique du groupe,

     mmeemmbbeerr
        La liste des membres du groupe.

  Le format du fichier /etc/gshadow est:

       groupname:password:admin,admin,...:member,member,...

  ou:

     ggrroouuppnnaammee
        Le nom du groupe,

     ppaasssswwoorrdd
        Le mot de passe encode,

     aaddmmiinn
        La liste des administrateurs de groupe,

     mmeemmbbeerr
        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.

  77..55..  PPrrooggrraammmmeess ddee vveerriiffiiccaattiioonn ddee llaa ssttrruuccttuurree

  77..55..11..  ppwwcckk

  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.

  77..55..22..  ggrrppcckk

  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.

  77..66..  LLeess mmoottss ddee ppaassssee ""AAcccceess aa ddiissttaannccee""

  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.

  88..  AAjjoouutteerr llee ssuuppppoorrtt sshhaaddooww aa uunn pprrooggrraammmmee eenn CC..

  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.

  88..11..  LLeess ffiicchhiieerrss dd''eenn--tteettee

  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).

  88..22..  LLaa bbiibblliiootthheeqquuee lliibbsshhaaddooww..aa

  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.

  88..33..  LLaa ssttrruuccttuurree sshhaaddooww

  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..

  88..44..  LLeess ffoonnccttiioonnss SShhaaddooww..

  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.

  88..55..  EExxeemmppllee

  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.

  99..  FFooiirree AAuuxx QQuueessttiioonnss

  _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.

  1100..  CCooppyyrriigghhtt..

  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".

  1111..  DDiivveerrss eett RReemmeerrcciieemmeennttss

  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
  Bézecourt <thbzcrt@worldnet.fr>
  2.0, 18 septembre 1999

  Ce HOWTO décrit des méthodes de publication de logiciel convenant à
  des projets de logiciel libre pour Linux. En adoptant ces règles, vous
  permettrez à vos utilisateurs de compiler votre code et de l'utiliser
  plus facilement, et à d'autres développeurs de mieux le comprendre et
  de vous aider à l'améliorer.  Ce document est à lire absolument par
  les développeurs débutants. Ceux qui ont plus d'expérience devraient
  le parcourir à nouveau au moment de publier un nouveau projet. Il sera
  mis à jour périodiquement afin de refléter l'évolution des règles de
  bonne pratique.
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 Raison d'être de ce document
     1.2 Nouvelles versions de ce document

  2. Règles d'usage pour le nommage de votre projet et de votre archive

     2.1 Utilisez le style de nommage GNU, avec un préfixe suivi d'un numérotage du type majeur.mineur.patch.
     2.2 Mais respectez le cas échéant les conventions locales
     2.3 Choisissez avec le plus grand soin un préfixe unique et facile à taper

  3. Règles d'usage pour la licence et le copyright : la théorie

     3.1 Les logiciels à code ouvert et le copyright
     3.2 Déterminer ce qui peut être qualifié comme logiciel à code ouvert

  4. Règles d'usage pour la licence et le copyright : la pratique

     4.1 Donnez le copyright à vous-même 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. Règles d'usage du développement

     5.1 Ecrivez soit en C ANSI pur, soit dans un langage de script portable
     5.2 Respectez les règles de portabilité du C
     5.3 Utilisez autoconf/automaker/autoheader
     5.4 Soignez la rigueur de votre code avant chaque nouvelle version

  6. Règles d'usage pour la mise au point de la distribution

     6.1 Assurez-vous que vos archives se décompactent toujours dans un répertoire 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 adéquat
     7.3 Ayez un site Web
     7.4 Hébergez des listes de diffusion pour votre projet
     7.5 Publiez dans les archives les plus importantes

  8. La bonne gestion d'un projet


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  11..11..  RRaaiissoonn dd''êêttrree ddee ccee ddooccuummeenntt

  Un vaste ensemble de traditions relatives au développement de
  logiciels libres permet à d'autres personnes de porter le code plus
  facilement, de l'utiliser et de participer à son développement.
  Certaines de ces conventions sont des traditions du monde Unix
  antérieures à Linux ; d'autres ont été suscitées récemment par
  l'apparition de nouveaux outils et de nouvelles technologies comme le
  World Wide Web.

  Ce document vous aidera à acquérir ces règles d'usage. Il se compose
  de plusieurs sections thématiques, chacune contenant une liste de
  points à vérifier. Considérez que ces sections sont pour votre
  distribution comme la liste de contrôle qu'un pilote d'avion vérifie
  avant le décollage.


  11..22..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  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 répertoire
  pub/Linux/docs/HOWTO.

  Vous pouvez aussi voir la dernière 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 française 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>.


  22..  RRèègglleess dd''uussaaggee ppoouurr llee nnoommmmaaggee ddee vvoottrree pprroojjeett eett ddee vvoottrree aarrcchhiivvee

  Au fur et à mesure que s'accroît la charge de travail des
  gestionnaires d'archives comme Metalab, le site PSA ou le CPAN, les
  soumissions sont de plus en plus souvent traitées, en tout ou en
  partie, par des programmes (et non en totalité par des humains).

  Il est donc très important que le nom de votre projet et celui de
  votre fichier d'archive suivent des règles précises, afin que des
  programmes informatiques puissent les analyser et les comprendre.


  22..11..  nnuumméérroottaaggee dduu ttyyppee mmaajjeeuurr..mmiinneeuurr..ppaattcchh..  UUttiilliisseezz llee ssttyyllee ddee
  nnoommmmaaggee GGNNUU,, aavveecc uunn pprrééffiixxee ssuuiivvii dd''uunn

  Vous faciliterez la vie à tout le monde en donnant à vos archives des
  noms dans le style GNU : un préfixe-racine alphanumérique tout en
  minuscules, suivi par un tiret, puis un numéro 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 :



     ttoottoo--11..22..33..ttaarr..ggzz
        L'archive des sources


     ttoottoo..llssmm
        Le fichier LSM (si vous l'envoyez à Metalab).


  N'utilisez _p_a_s les noms suivants :


     ttoottoo112233..ttaarr..ggzz
        Beaucoup de programmes croiront qu'il s'agit du fichier
        d'archive d'un projet nommé `toto123', sans numéro de version.


     ttoottoo11..22..33..ttaarr..ggzz
        Beaucoup de programmes croiront qu'il s'agit de l'archive d'un
        projet nommé `toto1' à la version 2.3.


     ttoottoo--vv11..22..33..ttaarr..ggzz
        Beaucoup de programmes prendront cela pour un projet nommé
        `toto-v1'.


     ttoo__ttoo--11..22..33..ttaarr..ggzz
        Le caractère souligné est difficile à prononcer, à taper, et à
        retenir.


     TTooTToo--11..22..33..ttaarr..ggzz
        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 séparément une archive de sources et une archive
  de binaires, ou différentes 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 numéro de version. Voici
  quelques exemples :


     ttoottoo--11..22..33..ssrrcc..ttaarr..ggzz
        sources


     ttoottoo--11..22..33..bbiinn..ttaarr..ggzz
        binaires, type non spécifié


     ttoottoo--11..22..33..bbiinn..EELLFF..ttaarr..ggzz
        binaires ELF


     ttoottoo--11..22..33..bbiinn..EELLFF..ssttaattiicc..ttaarr..ggzz
        binaires ELF liés statiquement


     ttoottoo--11..22..33..bbiinn..SSPPAARRCC..ttaarr..ggzz
        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 à séparer un infixe (tel que `ELF') de
  la racine du mot.

  Un bon schéma de nommage générique contient, dans l'ordre, les parties
  suivantes :


  1. préfixe du projet

  2. tiret

  3. numéro de version

  4. point

  5. "src" ou "bin" (optionnel)

  6. point ou tiret (un point de préférence)

  7. type de binaire et options (optionnel)

  8. extensions relatives au mode d'archivage et de compression


  22..22..  MMaaiiss rreessppeecctteezz llee ccaass éécchhééaanntt lleess ccoonnvveennttiioonnss llooccaalleess

  Certains projets ou communautés ont des conventions bien établies pour
  les noms et les numéros de version, et ces conventions ne sont pas
  toujours compatibles avec les conseils qui précèdent. Par exemple, les
  modules Apache ont en général des noms du genre mod_foo, et ils ont à
  la fois un numéro de version propre et le numéro de la version
  d'Apache avec laquelle ils fonctionnent. De même, les numéros de
  version des modules Perl peuvent être traités comme des nombres
  décimaux (par exemple, vous pouvez voir 1,303 à la place de 1.3.3), et
  les distributions s'appellent en général Foo-Bar-1.303.tar.gz pour la
  version 1.303 du module Foo::Bar.

  Apprenez et respectez les conventions des communautés et développeurs
  spécialisés ; suivez les règles ci-dessus dans le cas général.

  22..33..  ttaappeerr CChhooiissiisssseezz aavveecc llee pplluuss ggrraanndd ssooiinn uunn pprrééffiixxee uunniiqquuee eett
  ffaacciillee àà

  Le préfixe-racine devrait être le même pour tous les fichiers d'un
  projet, et il devrait être facile à lire, à taper et à retenir.
  N'utilisez pas le caractère "souligné". Et ne mettez pas de majuscules
  ou de MajusculesIntérieures sans une très bonne raison -- cela dérange
  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 même nom.
  Assurez-vous donc, dans la mesure du possible, qu'il n'y a pas de
  conflit de nommage avant de publier votre première version. Un bon
  endroit pour le vérifier est l'index de Metalab
  <http://metalab.unc.edu/pub/Linux>.


  33..  RRèègglleess dd''uussaaggee ppoouurr llaa lliicceennccee eett llee ccooppyyrriigghhtt :: llaa tthhééoorriiee

  La licence que vous choisissez définit le contrat social que vous
  souhaitez mettre en place avec vos co-développeurs et vos
  utilisateurs. Le copyright que vous mettez sur le logiciel sert
  principalement de déclaration légale de votre droit à fixer les termes
  de la licence sur le logiciel et sur les oeuvres qui en sont dérivées.





  33..11..  LLeess llooggiicciieellss àà ccooddee oouuvveerrtt eett llee ccooppyyrriigghhtt

  (Note du traducteur : dans cette section comme dans celles qui
  suivent, l'expression "(logiciel à) code ouvert" est utilisée 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 possède 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 détenteurs du copyright
  même s'il n'y a pas de note de copyright.


  Il peut être très difficile de déterminer 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 précisant
  les conditions dans lesquelles l'oeuvre peut être utilisée, elles
  donnent aux utilisateurs des droits qui les protègent des actions
  arbitraires que pourraient entreprendre les détenteurs du copyright.


  Dans le logiciel propriétaire, les termes de la licence sont formulés
  de manière à protéger le copyright. Ils permettent de donner quelques
  droits aux utilisateurs tout en assurant au propriétaire (le détenteur
  du copyright) la plus grande possibilité d'action possible sur le plan
  légal. Le détenteur du copyright a une grande importance, et la
  licence est tellement restrictive dans l'esprit que les détails
  techniques de ses termes sont généralement sans importance.

  Dans le logiciel à code ouvert, la situation est souvent exactement
  inverse ; le copyright existe pour protéger la licence. Les seuls
  droits qui sont toujours conservés au détenteur du copyright sont ceux
  qui permettent de renforcer la licence. Parmi les autres droits, un
  petit nombre seulement sont réservés, et c'est l'utilisateur qui a la
  plus grande liberté. En particulier, le détenteur du copyright ne peut
  pas modifier la licence sur une copie que vous possédez déjà. Par
  conséquent, le détenteur du copyright dans les logiciels à code ouvert
  n'a presque aucune importance -- contrairement aux termes de la
  licence.

  Normalement, le détenteur du copyright sur un projet est le
  responsable actuel du projet ou une organisation mécène. Le changement
  de responsable à la tête d'un projet se manifeste souvent par la
  modification du copyright. Toutefois ce n'est pas une règle 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
  entraîné des complications sur le plan légal.

  Certains projets choisissent de donner le copyright à la Free Software
  Foundation, avec l'idée que cette fondation a un intérêt dans la
  défense du logiciel à code ouvert, et possède les avocats pour s'en
  occuper.


  33..22..  oouuvveerrtt DDéétteerrmmiinneerr ccee qquuii ppeeuutt êêttrree qquuaalliiffiiéé ccoommmmee llooggiicciieell àà
  ccooddee

  En ce qui concerne la licence, on peut distinguer plusieurs sortes de
  droits transférables 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 résultat
  d'un important effort de réflexion 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 règles proscrivent les restrictions sur la redistribution de
  binaires modifiés ; 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 apparaître les intentions de l'auteur et, dans
  un``suivi d'audit'', toutes les modifications faites par d'autres
  personnes.

  L'OSD est la définition légale de la marque de certification `OSI
  Certified Open Source', et vaut toutes les définitions qu'on a pu
  faire du ``logiciel libre''. Toutes les licences courantes (MIT, BSD,
  Artistic et GPL/LGPL) la vérifient (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 qualifiées de licences à code ouvert, même 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 compliquée aux
  distributeurs de CD-ROM et aux autres personnes qui essaient de
  diffuser commercialement les logiciels à code ouvert.


  44..  RRèègglleess dd''uussaaggee ppoouurr llaa lliicceennccee eett llee ccooppyyrriigghhtt :: llaa pprraattiiqquuee

  Voici comment appliquer dans la pratique la théorie qui précède :


  44..11..  DDoonnnneezz llee ccooppyyrriigghhtt àà vvoouuss--mmêêmmee oouu àà llaa FFSSFF

  Dans certains cas, si vous avez derrière vous une organisation mécène
  qui possède des avocats, vous pouvez choisir de donner le copyright à
  cette organisation.


  44..22..  CChhooiissiisssseezz uunnee lliicceennccee ccoonnffoorrmmee àà ll''OOppeenn SSoouurrccee DDeeffiinniittiioonn

  L'Open Source Definition (Définition du Code Ouvert) est la règle d'or
  pour les licences. L'OSD n'est pas une licence en soi ; elle définit
  plutôt un ensemble minimal de droits qu'une licence doit garantir afin
  d'être considérée comme une licence à code ouvert. On peut trouver
  L'OSD, avec des documents complémentaires, sur le site Web de l'Open
  Source Initiative <http://www.opensource.org>.


  44..33..  NN''ééccrriivveezz ppaass vvoottrree pprroopprree lliicceennccee ssii vvoouuss ppoouuvveezz ll''éévviitteerr..

  Les licences compatibles à l'OSD et connues de tous ont des traditions
  d'interprétation bien établies. Les développeurs (et, dans la mesure
  où ils s'y intéressent, les utilisateurs) savent ce qui en découle, et
  mesurent les risques et les inconvénients qu'elles comportent. Par
  conséquent, 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 coûts importants. Si vous n'êtes jamais passé par là, vous ne
  pouvez pas imaginer pas à quel point un débat sur les licences peut
  tourner au vinaigre ; les gens s'enflamment, parce que les licences
  sont considérées comme des pactes presque sacrés qui touchent aux
  valeurs essentielles de la communauté des logiciels ouverts.

  De plus, l'existence d'une tradition d'interprétation bien établie
  pourrait se révéler importante si un jour votre licence faisait
  l'objet d'un procès. A la date où on écrit ces lignes (septembre
  1999), il n'y a pas d'exemple de décision 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 interpréter les
  licences et les contrats en fonction des attentes et des pratiques de
  la communauté qui les a produits.


  55..  RRèègglleess dd''uussaaggee dduu ddéévveellooppppeemmeenntt

  La plupart de ces règles visent à assurer la portabilité, non
  seulement entre les différentes distributions de Linux, mais aussi
  avec d'autres variétés 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 négligeable contre les
  évolutions futures de Linux lui-même.

  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.


  55..11..  EEccrriivveezz ssooiitt eenn CC AANNSSII ppuurr,, ssooiitt ddaannss uunn llaannggaaggee ddee ssccrriipptt
  ppoorrttaabbllee

  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 implémentation multi-
  plateforme unique.

  Parmi les langages de script, Python, Perl, Tcl et Emacs Lisp
  respectent ce critère. Le bon vieux shell _n_e _c_o_n_v_i_e_n_t _p_a_s ; il existe
  trop d'implémentations différentes, chacune ayant des particularités
  subtiles, et l'environnement du shell est souvent transformé de
  manière imprévisible par des configurations propres à chaque
  utilisateur, comme les alias.

  Java promet beaucoup sur le plan de la portabilité, mais les
  implémentations disponibles sur Linux sont encore sommaires et mal
  intégrées dans le système 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é.


  55..22..  RReessppeecctteezz lleess rrèègglleess ddee ppoorrttaabbiilliittéé dduu CC

  Si vous écrivez en C, n'hésitez pas à utiliser à fond les
  fonctionnalités décrites dans la norme ANSI -- y compris les
  prototypes de fonction, qui vous aideront à repérer les incohérences
  entre modules. Les compilateurs du type K&R relèvent du passé.
  En revanche, ne supposez _p_a_s que certaines caractéristiques
  spécifiques à GCC comme l'option `-pipe' ou les fonctions imbriquées
  sont disponibles. Cela vous poursuivra et vous vous en repentirez le
  jour où quelqu'un portera votre logiciel vers un système autre que
  Linux, et dépourvu de GCC.


  55..33..  UUttiilliisseezz aauuttooccoonnff//aauuttoommaakkeerr//aauuttoohheeaaddeerr

  Si vous écrivez en C, utilisez autoconf/automaker/autoheader pour
  assurer la portabilité, vérifier la configuration du système 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.


  55..44..  SSooiiggnneezz llaa rriigguueeuurr ddee vvoottrree ccooddee aavvaanntt cchhaaqquuee nnoouuvveellllee vveerrssiioonn

  Si vous écrivez en C, faites une compilation de test avec l'option
  -Wall et corrigez les erreurs résultantes, 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, vérifiez votre code avec perl -c (voire -T
  dans les cas adéquats). Utilisez perl -w 'use strict' religieusement
  (consultez la documentation de Perl pour plus d'informations).


  66..  RRèègglleess dd''uussaaggee ppoouurr llaa mmiissee aauu ppooiinntt ddee llaa ddiissttrriibbuuttiioonn

  Les indications qui suivent montrent à quoi votre distribution devrait
  ressembler lorsqu'on la récupère et qu'on la décompacte.


  66..11..  rrééppeerrttooiirree nnoouuvveeaauu eett uunniiqquuee..  AAssssuurreezz--vvoouuss qquuee vvooss aarrcchhiivveess ssee
  ddééccoommppaacctteenntt ttoouujjoouurrss ddaannss uunn

  L'erreur la plus agaçante que font les développeurs novices est de
  fabriquer des archives qui décompactent les fichiers et répertoires de
  la distribution dans le répertoire courant, avec le risque d'écraser
  des fichiers déjà présents. _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 même répertoire, avec un nom dérivant de celui du projet. Ainsi,
  ils se placeront dans un seul répertoire, juste _e_n_-_d_e_s_s_o_u_s du
  répertoire courant.

  Voici un moyen de réaliser cela dans un makefile, en supposant que le
  répertoire 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))




  66..22..  EEccrriivveezz uunn RREEAADDMMEE

  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'intrépide explorateur lira après 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 française dans un fichier nommé
  LISEZMOI, pour les utilisateurs francophones).

  Voici quelques éléments qu'il est bon d'avoir dans un README :


  ·  Une brève description du projet.

  ·  Un lien vers le site Web du projet, le cas échéant.

  ·  Des indications sur l'environnement de compilation du développeur
     et sur les possibles problèmes de portabilité.

  ·  Un plan d'ensemble des fichiers et sous-répertoires 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 dernières nouvelles relatives au projet, ou un lien vers un
     fichier les contenant (habituellement NEWS).


  66..33..  AAddoopptteezz lleess ccoonnvveennttiioonnss ccoouurraanntteess ddee nnoommmmaaggee ddeess ffiicchhiieerrss

  Avant même d'avoir regardé le README, votre intrépide explorateur aura
  parcouru la liste des fichiers dans répertoire principal de votre
  distribution. Ces noms, par eux-mêmes, contiennent de l'information.
  En suivant certaines règles de nommage, vous donnerez à l'explorateur
  de bons indices pour orienter son parcours.

  Voici quelques noms recommandés pour les fichiers du répertoire
  principal, avec leur signification. Tous ne sont pas indispensables
  dans chaque projet.


     RREEAADDMMEE oouu RREEAADD..MMEE
        le plan d'ensemble, à lire en premier


     IINNSSTTAALLLL
        instructions de configuration, de compilation et d'installation


     CCRREEDDIITTSS
        liste des contributeurs du projet

     NNEEWWSS
        dernières nouvelles


     HHIISSTTOORRYY
        histoire du projet


     CCOOPPYYIINNGG
        termes de la licence (convention GNU)


     LLIICCEENNSSEE
        termes de la licence


     MMAANNIIFFEESSTT
        liste des fichiers


     FFAAQQ
        Foire Aux Questions pour le projet, au format texte.


     TTAAGGSS
        Fichier de tags généré automatiquement, pour être utilisé par
        Emacs ou vi

  Remarquez que la convention générale est que les fichiers dont le nom
  ne comporte que des majuscules sont des fichiers d'information sur le
  projet lui-même, et ne sont pas des éléments du système à compiler.


  66..44..  FFoouurrnniisssseezz ddeess RRPPMM

  Le format standard de facto pour les distributions de binaires à
  installer est celui qu'utilise le Red Hat Package Manager, RPM. Il est
  présent 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 conséquent, c'est une bonne idée de fournir sur le site de votre
  projet des RPM installables en même temps qu'une archive des sources.

  C'est aussi une bonne idée d'inclure dans votre archive de sources le
  fichier de spécification du RPM, avec dans le Makefile une entrée qui
  fabrique les RPM à partir de lui. Le fichier de spécification devrait
  avoir l'extension `.spec' ; c'est comme cela que l'option -t de rpm le
  trouve à l'intérieur de l'archive.

  Encore un point de style : générez votre fichier de spécification avec
  un script shell qui insère automatiquement le numéro de version en
  analysant le Makefile ou un fichier version.h.


  77..  CCoommmmeenntt ccoommmmuunniiqquueerr

  Votre logiciel n'apportera pas grand-chose à l'univers si vous êtes le
  seul à connaître son existence. De plus, en établissant une présence
  visible sur Internet pour votre projet, vous pourrez recruter plus
  facilement des utilisateurs et des co-développeurs. On le fait
  habituellement comme ceci :




  77..11..  FFaaiitteess uunnee aannnnoonnccee ddaannss cc..oo..ll..aa

  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>.


  77..22..  FFaaiitteess uunnee aannnnoonnccee ddaannss uunn ffoorruumm ddee ddiissccuussssiioonn aaddééqquuaatt

  Trouvez un forum USENET dont le thème 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 sûrement pas dans comp.lang.perl, à moins que le
  programme utilise de manière instructive des techniques Perl avancées.

  Votre annonce devrait aussi contenir l'URL du site Web de votre
  projet.


  77..33..  AAyyeezz uunn ssiittee WWeebb

  Si vous comptez établir une communauté substantielle d'utilisateurs ou
  de développeurs autour de votre projet, celui-ci devrait avoir son
  site Web. Voici des éléments 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 téléchargement 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 même une URL pour un accès anonyme à
  l'arborescence principale du code source.


  77..44..  HHéébbeerrggeezz ddeess lliisstteess ddee ddiiffffuussiioonn ppoouurr vvoottrree pprroojjeett

  Il est d'usage d'avoir une liste de développement privée qui permet
  aux collaborateurs du projet de communiquer et d'échanger des patchs.
  Vous voudrez peut-être créer en plus une liste d'annonces pour les
  gens qui veulent être informés de la progression du projet.


  77..55..  PPuubblliieezz ddaannss lleess aarrcchhiivveess lleess pplluuss iimmppoorrttaanntteess

  Depuis plusieurs années, 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 Réseau d'Archives Perl
     Global (pour les logiciels écrits en Perl).


  88..  LLaa bboonnnnee ggeessttiioonn dd''uunn pprroojjeett

  Bien gérer un projet lorsque tous les participants sont bénévoles
  présente des défis particuliers. Le sujet est trop large pour être
  traité dans le cadre d'un HOWTO. Heureusement, il existe des documents
  de réflexion qui vous aideront à comprendre les principaux points.

  Pour un essai sur l'organisation de base du développement et du
  principe `distribuez tôt, mettez à jour souvent' propre au `mode
  bazar', lisez The Cathedral and the Bazaar
  <http://www.tuxedo.org/~esr/writings/cathedral-bazaar/>.

  Pour une réflexion sur les motivations psychologiques, des coutumes de
  la communauté et de la résolution des conflits, lisez Homesteading the
  Noosphere <http://www.tuxedo.org/~esr/writings/homesteading/>.

  Pour un exposé des principes économiques et des modèles 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 prétendent pas se poser comme les références ultimes à
  propos des développements à code source ouvert. Mais ils constituent
  les premières analyses sérieuses écrites sur le sujet, et n'ont pas
  encore été dépassés.































  Le Linux Sound-HOWTO
  Jeff Tranter, tranter@pobox.com, traduction française de
  Gaël Duval (version 1.18) gael@linuxmandrake.com
  v1.19, 23 janvier 1998 - mis à jour en décembre 1998.

  Ce document décrit comment le son est géré par Linux. Il énumère les
  différents matériels supportés, décrit comment configurer les pilotes
  dans le noyau, et répond aux questions les plus fréquentes. Son but
  est de permettre aux nouveaux utilisateurs de profiter du son rapide­
  ment, et de désengorger le trafic Usenet.
  ______________________________________________________________________

  Table des matières





















































  1. Introduction

     1.1 Remerciements
     1.2 Versions antérieures
     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. Matériel supporté

     3.1 Les cartes son
     3.2 Des pilotes son alternatifs
     3.3 Le haut-parleur du PC
     3.4 Le port parallèle

  4. L'installation

     4.1 L'installation de la carte son
     4.2 La configuration du noyau
     4.3 La création des Fichiers spéciaux des Périphériques
     4.4 Démarrage de Linux et Test de l'Installation
     4.5 Problèmes rencontrés
        4.5.1 Premier point : Soyez certain que vous utilisez vraiment votre noyau fraîchement compilé !
        4.5.2 Deuxième point : Soyez sûr que les pilotes son du noyau y sont bien inclus
        4.5.3 Troisième point : Est-ce que le noyau a bien détecté votre carte son pendant le démarrage ?
        4.5.4 Quatrième point : Arrivez-vous à lire des données en provenance du dsp ?
        4.5.5 Quoi encore...

  5. Applications utilisant le son

  6. Réponses aux Questions Fréquemment Posées

     6.1 Quels sont les différents fichiers de périphériques liés 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' (périphérique occupé) !
     6.10 Lecture incomplète 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 exécutables qui fonctionnaient avant
     6.14 Quels sont les bugs connus et les limitations dans le pilote son ?
     6.15 Quelles ressources processeur sont-elles nécessaires pour enregistrer ou jouer des fichiers son sans pause ?
     6.16 Problèmes avec la PAS16 et l'adaptateur SCSI Adaptec 1542
     6.17 Est-il possible de lire et de jouer des échantillons sonores simultanément ?
     6.18 Ma SB16 est reglée 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 supportées ?
     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 Problèmes avec DOOM sous Linux
     6.22 Comment réduire le
     6.23 Je peux jouer des sons échantillonés, mais pas en enregistrer
     6.24 Ma carte "compatible" fonctionne seulement si je l'initialise préalablement 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 supportées ?
     6.31 Sox/Play/Vplay indique : "invalid block size 1024"
     6.32 Pourquoi le pilote son possède-il son propre programme de configuration ?
     6.33 Les paramètres du mixeur sont réinitialisés à 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 supportés ?

  7. Références



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ceci est le document Linux Sound-HOWTO. Il est conçu pour être une
  référence rapide couvrant tout ce que vous devez savoir pour installer
  et configurer les fonctions sonores de Linux. Des réponses sont
  données aux questions les plus fréquentes à propos du son sous Linux,
  et des références à d'autres informations sur le son et la musique de
  synthèse sont mentionnées.

  L'étude se limite aux aspects des cartes son qui concernent Linux.
  Pour des informations plus générales 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.


  11..11..  RReemmeerrcciieemmeennttss


  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
  développement des pilotes son du noyau Linux et des utilitaires
  associés soient donc remerciés.

  Merci au paquetage Linuxdoc-SGML de Matt Welsh, qui permet à ce HOWTO
  d'être disponible sous différents formats, émanants tous d'un même
  fichier source.


  11..22..  VVeerrssiioonnss aannttéérriieeuurreess



     VVeerrssiioonn 11..11
        première version; postée uniquement dans le canal SOUND de la
        `linux activists mailing list' (`liste de diffusion des
        activistes Linux').

     VVeerrssiioonn 11..22
        corrections mineures; première version disponible sur les sites
        d'archives.

     VVeerrssiioonn 11..33
        conversion au format SGML ; maintenant disponible sous plusieurs
        formats, grâce aux outils Linuxdoc-SGML de Matt Welsh; la
        présentation a changé à cause du nouveau format, mais peu de
        changements sur le fond.

     VVeerrssiioonn 11..44
        petites modifications de SGML; ajout de réponses à propos des
        incompatibilités entre la PAS16 et la carte SCSI Adaptec1542A.

     VVeerrssiioonn 11..55
        le pilote son 2.5a est maintenant dans la distribution du noyau
        1.1; note sur le support GUS-MAX; quelques petites corrections.
     VVeerrssiioonn 11..66
        ajout d'information sur l'erreur "no space on device" ; notez
        que le Hacker's Guide est dans un répertoire caché ; ajout de
        questions à propos du mode bidirectionnel ; informations sur les
        erreurs "device busy" ; corrections diverses.


     VVeerrssiioonn 11..77
        ajout d'informations sur l'ASP et l'AWE32; VoxWare 2.9 est
        disponible; réponses aux questions concernant l'utilisation de
        l'IRQ 2; liens vers les Sound-HOWTO et SCSI HOWTO.


     VVeerrssiioonn 11..88
        ajout d'une question à propos d'erreurs survenant sous DOS;
        plusieurs points réactualisé pour la version 2.90 du pilote son;
        informations concernant DOOM; réponse sur la réduction du bruit.


     VVeerrssiioonn 11..99
        questions concernant l'enregistrement et les cartes compatibles.


     VVeerrssiioonn 11..1100
        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.


     VVeerrssiioonn 11..1111
        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 supportées; nouvelles informations
        sur la configuration et les problèmes rencontrés; beaucoup de
        nouveaux liens HTML ajoutés; mise à disposition en ligne au
        format du CD-ROM HOWTO.


     VVeerrssiioonn 11..1122
        nouveaux pilotes son du noyau 1.3.34; nouveaux noms pour les
        fichiers de périphérique 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.


     VVeerrssiioonn 11..1133
        précision sur le nom VoxWare; mise à jour en fonctions des
        dernières cartes supportées et des options de configuration;
        questions sur le support Plug and Play; question sur le problème
        de la taille du block; nouvelles options pour xconfig et
        menuconfig; modutils a un support de fichier de périphérique
        sonore; fin de la liste de diffusion vger; mise à jour du site
        web de l'auteur; autres changements divers et variés.


     VVeerrssiioonn 11..1144
        l'Audio Excel DSP16 n'est plus supportée (mais devrait
        refonctionner dans quelques mois); changements pour le programme
        configure; la version italienne de ce HOWTO est disponible;
        astuce pour régler 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 périphérique son.

     VVeerrssiioonn 11..1155
        suppresion d'anciennes questions devenues obsolètes; 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 multimédia; petites corrections
        grammaticales.


     VVeerrssiioonn 11..1166
        beaucoup de mises à jour et de corrections proposées 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.


     VVeerrssiioonn 11..1177
        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 Français et en Japonais;
        références à des mini-HOWTOs utiles; pointeur pour le Thinkpad
        IBM.


     VVeerrssiioonn 11..1188
        la traduction coréenne 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.


     VVeerrssiioonn 11..1199
        cette nouvelle version est publiée selon la licence LDP plutot
        que GPL.



  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  Les nouvelles versions de ce document seront périodiquement postées
  dans le groupe fr.comp.os.linux.annonces.  Elles seront aussi envoyées
  à divers sites ftp qui archivent ce genre d'informations, notamment :
  <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO/> (version française)
  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 répertoire /usr/doc et
  il est possible d'en acheter des versions imprimées chez plusieurs
  revendeurs spécialisés. Parfois, les HOWTOs disponibles sur CD-ROM,
  sur les sites FTP et dans les version imprimées sont dépassés. Si le
  HOWTO a plus de six mois, alors une nouvelle version est certainement
  disponible sur Internet.


  11..44..  RReettoouurr dd''iinnffoorrmmaattiioonnss......


  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 répondre 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 détaillée du problème. Merci de
  ne pas me poser de questions quant à l'utilisation des cartes son avec
  d'autres systèmes d'exploitation que Linux.


  Si vous publiez ce document sur CD-ROM ou sous forme imprimée,
  j'apprécierais 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>.


  11..55..  CCee ddooccuummeenntt :: ppoolliittiiqquuee ddee ddiissttrriibbuuttiioonn


  Copyright 1995-1997 Jeff Tranter.

  Traduction française 1998 Gaël Duval.

  Ce document est distribuable selon les termes de la licence LDP que
  l'on peut consulter à  <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.


  22..  LLaa tteecchhnnoollooggiiee ddeess ccaarrtteess--ssoonn


  Cette partie vous donne un petit aperçu des techniques audio employées
  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-numérique ou de
  traitement du signal numérique...

  Le son est un phénomène analogique; il se traduit par une valeur
  quelconque sur une échelle continue. Les ordinateurs fonctionnent de
  manière _n_u_m_é_r_i_q_u_e; c'est-à-dire qu'ils utilisent des valeurs
  discrètes. 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
  numériques qui peuvent alors être stockées dans la mémoire de
  l'ordinateur. De même, 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 numériques en une tension
  analogique qui peut alors être amplifiée pour "attaquer" un haut-
  parleur et produire du son...

  La conversion analogique-numérique (échantillonage ou "sampling" en
  anglais) génère des erreurs. Deux facteurs déterminent 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 réalisés par
  unité de temps (exprimée en Hertz). Une petite fréquence
  d'échantillonage produira une représentation moins fine du signal
  analogique d'origine, dans le sens où les fréquences aigues ne seront
  pas ou mal restituées.  (ndt : la théorie nous enseigne que pour
  restituer correctement une fréquence 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
  restituée par un échantillonage à 44100 Hz (norme CD-AUDIO) ).  Le
  nombre de bits d'échantillonage conditionne l'étendue des valeurs
  utilisables pour représenter chaque échantillon, qui conditionne elle-
  même 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 inhérent au matériel de restitution.
  Cette plage dynamique est exprimée de manière logarithmique en
  decibels (dB). En théorie, 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 fréquences d'échantillonage allant de 4000 à
  44100 (ndt : ou 48000 Hz). L'échantillonage pouvant être réalisé sur
  une voie (mono) ou deux (stéréo) (ndt : et plus (8, 16...) pour des
  cartes professionnelles).

  La _s_y_n_t_h_è_s_e _F_M est une ancienne méthode utilisée pour produire des
  sons. Son principe consiste en la combinaison de plusieurs ondes de
  formes différentes (ex : sinusoïdales, triangulaires, carrées). Ce
  procédé est plus simple à implémenter au niveau "hardware" que la
  conversion analogique-numérique mais son utilisation est plus
  compliqué (au niveau programmation).  Beaucoup de cartes son
  supportent la synthèse FM afin de rester compatibles avec des cartes
  ou programmes plus anciens.  Plusieurs générateurs sonores différents
  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 possibilités multivoies de
  la synthèse FM. Avec ce procédé, des sons digitalisés/numérisés
  peuvent être chargés dans une mémoire dédiée puis rejoués, combinés,
  et modifiés en sollicitant peu le microprocesseur de la machine.
  Toutes les cartes son actuelles supportent la synthèse 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 différentes sources avec des
  niveaux différents.

  Le terme _M_I_D_I signifie : Musical Instrument Digital Interface soit :
  interface numérique pour instruments musicaux en français. Ce
  protocole matériel et logiciel standard permet aux "instruments
  électroniques" de communiquer entre eux. Les évènements envoyés dans
  un bus MIDI peuvent aussi être mémorisés dans des fichiers MIDI. Cela
  permet de les éditer ultèrieurement et de les rejouer.  Beaucoup de
  cartes son possèdent une interface MIDI. Celles qui n'en n'ont pas
  peuvent quand même jouer des fichier MIDI.

  Les fichiers _M_O_D sont un format courant pour les sons générés par
  ordinateur. En plus des informations relatives aux notes devant être
  jouées, ces fichiers contiennent des échantillons d'instruments ou de
  voix digitalisées. Les fichiers MOD proviennent du monde Amiga, mais
  peuvent être joués par d'autres systèmes - dont Linux - en utilisant
  des logiciels appropriés.


  33..  MMaattéérriieell ssuuppppoorrttéé


  Cette partie répertorie les cartes son et interfaces qui sont
  supportées par les derniers noyaux Linux à la date où ce document a
  été rédigé.

  Les différentes versions des pilotes son ont leur propre numérotation.
  La dernière 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 intégrantes du noyau Linux.  La liste la plus actualisée des
  cartes supportées 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 nécessaire pour tel type de carte, ou
  si son support est encore en développement. Le fichier
  /usr/src/linux/drivers/sound/Readme.cards distribué avec le noyau
  Linux contient des informations sur les cartes supportées mais n'est
  pas forcément à 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. Néanmoins, il peut dans ce
  cas exister des conflits d'adresses avec d'autres périphériques, même
  si la carte fonctionne parfaitement sur une machine à base de x86. Il
  n'est donc généralement pas possible de dire si telle ou telle carte
  va fonctionner sans l'essayer.

  A l'heure où ces lignes ont été rédigées, 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 possèdent des slots EISA et/ou des circuits-
  son intégrés dans la machine. On m'a dit que le groupe Linux-MIPs
  souhaitait intégrer un support son dans le futur.

  Le noyau Linux contient un pilote-son particulier pour les versions
  Atari et Amiga de Linux qui implémente une compatibilité
  d'instructions avec le pilote son des machines x86, ceci en utilisant
  les possibilités matérielles natives de ces machines.

  Le portage de Linux pour SPARC n'inclue pas encore de support du son.
  De la même façon que pour les Amiga et les Atari, les machines SPARC
  possèdent des possibilités sonores intégrées à la machine. Il faudrait
  donc un pilote spécifique (ce qui est rigolo, car sous Linux, /dev/dsp
  est une émulation du pilote son de SunOS !).


  33..11..  LLeess ccaarrtteess ssoonn


  Les cartes son suivantes sont supportées par le pilote son du noyau
  linux :


  ·  ATI Stereo F/X (n'est plus fabriqué)

  ·  AdLib (n'est plus fabriqué)

  ·  Ensoniq SoundScape (et compatibles fabriquées 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 entièrement
  compatibles avec les modèles non-PnP de la même carte. Par exemple, la
  SoundBlaster16 PnP n'est pas compatible à 100% avec la SoundBlaster16
  originelle. Il en va de même 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 supportées, soit parce qu'elles sont
  dépassées, soit parce que le constructeur ne souhaite pas communiquer
  la totalité des spécifications techniques nécessaires pour écrire le
  pilote concerné.


  ·  Pro Audio Spectrum (originelle)

  ·  Pro Audio Spectrum+

  ·  anciennes cartes (Sierra Aria based)fabriquées par Diamond

  Les autres cartes qui sont annoncées comme étant compatibles avec une
  des cartes supportées vues plus haut _p_e_u_v_e_n_t fonctionner à condition
  qu'elles soient réellement compatibles au niveau matériel
  (c'est-à-dire, au niveau des registres).
  Même si la plupart des cartes son sont dites "compatibles
  SoundBlaster", un très 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 véritables cartes SoundBlaster fabriquées par
  Creative Labs et qui utilisent les puces Creative (comme la
  SoundBlaster16 Vibra), la MV Jazz16 et les cartes basées sur
  l'ESS688/1688 fonctionnent en général avec le pilote SoundBlaster.
  Tenter d'utiliser une "carte son SoundBlaster Pro compatible 16 bits"
  avec le pilote de périphérique SoundBlaster est en général une perte
  de temps.

  Le noyau Linux supporte les ports SCSI présents sur quelques cartes
  son (par exemple, sur la SoundBlaster16 Vibra) et les interfaces
  propriétaires 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 périphérique SCSI, CD-ROM, joystick et son du
  noyau sont complètement indépendants 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
  références).


  33..22..  DDeess ppiillootteess ssoonn aalltteerrnnaattiiffss


  Il y a des pilotes "non officiels" disponibles. Ils font pas partie de
  la distribution standard du noyau Linux et sont utilisés à la place du
  pilote son normal.

  Une version commerciale du pilote son est vendue par 4Front
  Technologies.  Elle offre un grand nombre de caractéristiques
  supplémentaires 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 conçu un pilote
  son pour les cartes son Turtle Beach Multisound (classic),  Tahiti et
  Monterey. La documentation précise :


       "ce pilote a été conçu pour de l'enregistrement/ lecture sur
       disque-dur sans perte de synchronisation, même sur un
       système chargé. Les autres fonctionalités, comme la synthèse
       sonore par table d'échantillons, le MIDI et l'utilisation
       des DSP (Digital Signal Processor = Processeurs de Signaux
       Numériques) ne peuvent pas être utilisées. De même, l'enreg­
       istrement et la lecture simultanés 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 systèmes 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 véritable 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'améliorations ont été réalisées 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 métronome, des possibilités de syn­
       chronisation - par exemple des images en fonction d'un bat­
       tement sans perte de précision, une interface avancée de
       relecture/enregistrement/overdub (lecture et enregistrement
       simultanés) 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 conçu 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 récente
  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 détails (je suis
  moi-même radio-amateur avec VE3ICH comme indicatif !).


  33..33..  LLee hhaauutt--ppaarrlleeuurr dduu PPCC


  Un autre pilote son est également disponible, qui ne nécessite 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 nécessite plus
  de ressources CPU. Les résultats semblent être assez inégaux, et
  dépendent  des caractéristiques 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 trouvée sur
  <ftp://ftp.informatik.hu-berlin.de/pub/os/linux/hu-sound/>


  33..44..  LLee ppoorrtt ppaarraallllèèllee


  Une autre option consiste à fabriquer un convertisseur numérique-
  analogique en utilisant le port parallèle (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
  matériel adéquat.


  44..  LL''iinnssttaallllaattiioonn



  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. Création des fichiers "device" (fichiers spéciaux associés.  au
     périphérique : /dev/...).

  4. Redémarrage de la machine et tests d'installation.

  Dans la suite sont explicitées toutes ces étapes.


  44..11..  LL''iinnssttaallllaattiioonn ddee llaa ccaarrttee ssoonn


  Suivez les instructions du fabriquant pour l'installation matérielle
  ou confiez-la à votre revendeur.

  Les vieilles cartes-son ont souvent des petits interrupteurs appelés
  cavaliers ("switch" ou "jumper") permettant de configurer les adresses
  IRQ (Interrupt ReQuest = requête d'interruption ), DMA (Direct Memory
  Access =  bus de transfert direct des données), les canaux, etc. Si
  vous n'êtes pas certain, utilisez les réglages d'usine. Essayez
  d'éviter les conflits avec d'autres prériphériques (comme les cartes
  ethernet, les cartes SCSI, les ports série et parallèle).

  Normalement, vous devrez utiliser les mêmes 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
  réglage particulier pour que cela fonctionne avec Linux.  Il faudra
  peut-être faire quelques essais.


  44..22..  LLaa ccoonnffiigguurraattiioonn dduu nnooyyaauu


  Quand vous avez installé Linux, vous avez certainement utilisé un
  noyau précompilé. Généralement, ces noyaux ne fournissent pas de
  support son. Il vous faut donc recompiler votre noyau en fonction des
  périphériques que vous possédez.  Vous devez également recompiler le
  noyau lorsque vous passez à une de ses nouvelles versions ou afin de
  libérer de la mémoire en réduisant 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 très simple à faire). Je ne vais parler ici que
  des points qui sont spécifiques 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 spécifiques à votre
  carte-son. La documentation suivant peut-être trouvée dans le
  répertoire des pilotes son du noyau Linux. Il se trouve en général
  dans /usr/src/linux/drivers/sound :







  CHANGELOG         - description des modifications pour chaque version
  COPYING           - droit et restrictions de duplication
  Readme            - informations récentes et importantes
  Readme.aedsp16    - à propos de la carte Audio Excel 16 DSP
  Readme.cards      - précisions sur la configuration de cartes spécifiques
  Readme.linux      - précisions sur l'installation de pilotes son non inclus dans le noyau
  Readme.modules    - comment compiler le pilote en un module chargeable
  Readme.v30        - nouvelles possibilitées dans la version 3.0 du pilote son
  experimental.txt  - à propos des caractéristiques expérimentales



  Suivez tout d'abord la procédure habituelle pour compiler le noyau. Il
  existe actuellement trois interfaces disponibles pour la procédure de
  configuration. Une interface graphique sous X11 peut être lancée par
  "make xconfig". Une interface à base de menus texte est disponible en
  tapant "make menuconfig".  Enfin, la méthode originelle, en utilisant
  "make config" propose une interface uniquement à base de texte.

  Il faut faire particulièrement attention en utilisant "make xconfig"
  ou "make menuconfig". En effet, les choix par défaut sont toujours
  positionnés 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 validée.

  Dans ce document, je suppose que vous utilisez la procédure
  traditionnelle en mode texte : "make config". Néanmoins, la procédure
  est identique dans les autres cas.

  Il y a également deux autres manières de configurer le son. La
  première est l'"ancienne" façon (la seule disponible pour les noyaux
  2.0.0). Elle utilise un programme de configuration séparé qui fait
  partie du pilote son. Cette méthode fonctionne pour la plupart des
  cartes, exceptées quelques unes qui nécessitent des pilotes
  additionnels "bas niveau" (miroSOUND, AWE32, et AEDSP16).

  La seconde méthode (la "nouvelle") est mieux intégrée à la
  configuration par menus texte utilisée pour le reste du noyau. Elle ne
  fonctionne pas pour les cartes qui ont besoin d'un fichier
  constructeur téléchargeable. Ceci concerne les cartes PSS, SM Wave,
  AudioTrix Pro et TurtleBeach Tropez/Maui. Avec ces cartes, on
  utilisera la vieille procédure.

  La "nouvelle" méthode est toujours utilisée en faisant "make xconfig".
  Quand on utilise "make menuconfig", on peut choisir entre les deux
  méthodes. En faisant "make config", vous aurez la vieille méthode par
  défaut. Mais si vous avez déjà utilisé la nouvelle méthode, ce sera
  celle utilisée par "make config" ! Vous pouvez resélectionner
  l'ancienne en lançant "make menuconfig" et en la sélectionnant.

  La méthode recommendée est l'utilisation de "make menuconfig" avec
  l'ancienne méthode de configuration. Beaucoup de problèmes de
  configuration du son proviennent (au moins en partie) de l'utilisation
  de la nouvelle méthode.

  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 répondant "y"
  à la question :




  Sound card support (CONFIG_SOUND) [M/n/y/?]




  A la fin des questions de configuration, un programme sera compilé et
  exécuté et vous demandera alors quelles sont les options pour votre
  carte son. Attention en répondant à ces questions, car une réponse
  erronée pour une option peut empêcher d'autres questions suivantes
  d'être posées. Par exemple, ne répondez "yes" à la première question
  (PAS 16) que si vous n'avez réellement pas de carte PAS 16. De même,
  n'activez pas plus d'options que celles dont vous avez réellement
  besoin car cela consomme de la mémoire !  Certains pilotes (comme
  celui du MPU-401) peuvent également entrer en conflit avec votre
  controleur SCSI et empêcher le noyau de "booter".

  Voici une liste de toutes les options de configuration. Répondez "y"
  (oui) ou "n" (non) à chaque question. La réponse par défaut est
  affichée en lettre majuscule telle que : "[Y/n/?]" signifie "y" par
  défaut et vice versa. Pour valider la valeur par défaut, appuyez juste
  sur Enter, tout en sachant que cette valeur par défaut n'est pas
  forcément correcte.

  Si vous rentrez "?", vous aurez un court message d'explication sur
  l'option présente.

  Notez également que toutes les options ne sont pas demandées. Le
  programme de configuration désactive certaines questions en fonction
  des choix précedemment validés. Il peut également sélectionner
  automatiquement certaines options.



     OOlldd ccoonnffiigguurraattiioonn eexxiissttss iinn //eettcc//ssoouunnddccoonnff.. UUssee iitt [[YY//nn//??]]
        Si vous avez précedemment compilé le noyau pour le support son,
        la configuration précédente a pu être sauvegardé.  Si vous
        souhaitez utiliser cette ancienne configuration, alors entrez
        "y". Si vous essayez une configuration différente ou si vous
        utilisez une nouvelle version du noyau, répondez "n" pour
        commencer la configuration.


     PPrrooAAuuddiiooSSppeeccttrruumm 1166 ssuuppppoorrtt [[YY//nn//??]]
        Répondez "y" _u_n_i_q_u_e_m_e_n_t si vous possédez une Pro Audio Spectrum
        _1_6, une ProAudio Studio 16 ou une Logitech SoundMan 16.  Ne
        répondez pas "y" si vous avez une autre carte de chez Media
        Vision ou Logitech car elle ne sera pas compatible PAS16.


     SSoouunnddBBllaasstteerr ssuuppppoorrtt [[YY//nn//??]]
        Répondez "y" si vous avez une carte SoundBlaster de chez
        Creative Labs, ou une carte compatible à 100% au niveau matériel
        (comme la Thunderboard ou la SM Games). Si votre carte est dans
        la liste des cartes supportées, consultez le fichier
        Readme.cards des cartes spécifiques avant de répondre à cette
        question. Pour une carte inconnue, essayez "y" si cette carte se
        dit être compatible SoundBlaster.


     GGrraavviiss UUllttrraassoouunndd ssuuppppoorrtt [[YY//nn//??]]
        Répondez "y" si vous avez une GUS ou une GUS MAX.  Répondez "n"
        si vous n'avez pas de GUS car ce pilote utilise beaucoup de
        mémoire.



     MMPPUU--440011 ssuuppppoorrtt ((NNOOTT ffoorr SSBB1166)) [[YY//nn//??]]
        Attention avec cette question. L'interface MPU-401 est supportée
        par presque toutes les cartes son. Néanmoins, quelques cartes
        supportées possèdent 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 système qui ne possède pas d'interface
        MPU-401 peut causer des disfonctionnements. Si votre carte est
        normalement supportée, consultez quand même les instructions
        spécifiques la concernant dans le fichier  Readme.cards.  Il est
        plus sûr d'entrer "y" si vous possédez une véritable carte avec
        interface MPU-401 MIDI.


     66885500 UUAARRTT MMiiddii ssuuppppoorrtt [[YY//nn//??]]
        Il est sûr de répondre "n" à cette question dans tous les cas.
        L'interface 6850 UART n'est que très rarement utilisée.


     PPSSSS ((EECCHHOO--AADDII22111111)) ssuuppppoorrtt [[YY//nn//??]]
        Répondez "y" si vous possédez une carte Orchid SW32, ou Cardinal
        DSP16 ou encore d'autres cartes basées sur les puces PSS (codec
        AD1848 + puce DSP ADSP-2115 + puce Echo ESC614 ASIC).

        v

     1166 bbiitt ssaammpplliinngg ooppttiioonn ooff GGUUSS ((_n_o_t GGUUSS MMAAXX)) [[YY//nn//??]]
        Répondez "y" si vous avez installé la carte-fille
        d'échantillonage 16 bits sur votre GUS. Répondez non si vous
        avez une GUS MAX.  Cette option désactive le support GUS MAX.


     GGUUSS MMAAXX ssuuppppoorrtt [[YY//nn//??]]
        Répondez "y" uniquement si vous avez une GUS MAX.


     MMiiccrroossoofftt SSoouunndd SSyysstteemm ssuuppppoorrtt [[YY//nn//??]]
        Faite encore attention avant  de répondre "y" à cette question.
        Il est plus sûr de répondre "y" si vous possédez la carte
        Windows Sound System originelle fabriquée par Petitmou
        (microsoft) ou l'Aztech SG 16 Pro / NX 16 Pro. Vous pouvez aussi
        répondre "y" au cas où votre carte n'ait pas été proposée plus
        haut. Pour les cartes ayant le support natif pour VoxWare,
        consultez les instructions spécifiques dans le fichier
        Readme.cards. Certains pilotes possèdent leur propre support MSS
        et l'activation de cette option dans ce cas causera un conflit.


     EEnnssoonniiqq SSoouunnddssccaappee ssuuppppoorrtt [[YY//nn//??]]
        Répondez "y" si vous avez une carte son basée sur les puces
        Ensoniq SoundScape. De telles cartes sont fabriquées, au moins
        chez Ensoniq, Spea et Reveal (ce dernier fabrique également
        d'autres types de cartes).


     MMeeddiiaaTTrriiXX AAuuddiiooTTrriiXX PPrroo ssuuppppoorrtt [[YY//nn//??]]
        Répondez "y" si vous avez une AudioTriX Pro.


     SSuuppppoorrtt ffoorr MMAADD1166 aanndd//oorr MMoozzaarrtt bbaasseedd ccaarrddss??
        Répondez "y" ici si votre carte possède une puce d'interface
        Mozart (OAK OTI-601)  ou MAD16 (OPTi 82C928 ou 82C929). Ces
        circuits sont assez répandus, il est donc possible qu'un grand
        nombre de cartes "anonymes" en possèdent.  De plus, la puce
        MAD16 est utilisée dans des cartes fabriquées par des
        constructeur connus comme Turle Beach (Tropez), Reveal (quelques
        modèles) et Diamond (les plus récentes).
     SSuuppppoorrtt ffoorr CCrryyssttaall CCSS44223322 bbaasseedd ((PPnnPP)) ccaarrddss [[YY//nn//??]]
        Répondez "y" si vous avez une carte basée sur les circuits
        Crystal CS4232.


     SSuuppppoorrtt ffoorr TTuurrttllee BBeeaacchh WWaavvee FFrroonntt ((MMaauuii,, TTrrooppeezz)) ssyynntthheessiizzeerrss
        [Y/n/?]"  Répondez "y" ici si vous possédez l'une de ces cartes.


     SSoouunnddBBllaasstteerr PPrroo ssuuppppoorrtt [[YY//nn//??]]
        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 mémoire ici en
        répondant "n" mais l'alternative la plus sûre est de répondre
        "y".


     SSoouunnddBBllaasstteerr 1166 ssuuppppoorrtt [[YY//nn//??]]
        Validez si vou avez une SoundBlaster 16 (dont l'AWE 32).


     AAuuddiioo EExxcceell DDSSPP 1166 iinniittiiaalliizzaattiioonn ssuuppppoorrtt [[YY//nn//??]]
        Répondez "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 répondre "y" à
  chacune de ces questions, et "n" uniquement si vous savez que vous
  n'aurez pas besoin de cette option.



     //ddeevv//ddsspp aanndd //ddeevv//aauuddiioo ssuuppppoorrtt ((uussuuaallllyy rreeqquuiirreedd)) [[YY//nn//??]]
        Répondre "n" désactive /dev/dsp et /dev/audio, les périphériques
        de conversion A/D et D/A. Répondez "y".


     MMIIDDII iinntteerrffaaccee ssuuppppoorrtt [[YY//nn//??]]
        Répondre "n" désactive les périphériques associés à /dev/midixx
        ainsi que les accés aux ports MIDI utilisant /dev/sequencer et
        /dev/music.  Cette option affecte également tous les
        périphériques compatibles MPU-401 et/ou General MIDI.


     FFMM ssyynntthheessiizzeerr ((YYMM33881122//OOPPLL--33)) ssuuppppoorrtt [[YY//nn//??]]
        Répondre "y" ici.


     //ddeevv//sseeqquueenncceerr ssuuppppoorrtt [[YY//nn//??]]
        Répondre "n" désactive  /dev/sequencer et /dev/music.


     DDoo yyoouu wwaanntt ssuuppppoorrtt ffoorr tthhee mmiixxeerr ooff SSGG NNXX PPrroo ??
        Répondez "y" si vous possédez une carte son Sound Galaxy NX Pro
        et que vous voulez utiliser ses fonctions étendues de mixage.


     DDoo yyoouu wwaanntt ssuuppppoorrtt ffoorr tthhee MMVV JJaazzzz1166 ((PPrrooSSoonniicc eettcc..)) ??
        Répondez "y" si vous avez une carte son MV Jazz 16.


     DDoo yyoouu hhaavvee aa LLooggiitteecchh SSoouunnddMMaann GGaammeess [[YY//nn//??]]
        Répondez "y" si vous possédez une carte Logitech SoundMan Games.


  Après toutes ces questions, le programme de configuration vous
  questionne sur la configuration spécifique de la carte.
  Habituellement, juste quelques adresses d'E/S, d'IRQ et de DMA sont
  demandées. Pour certaines cartes, le programme demande quels fichiers
  doivent être utilisés durant l'initialisation de la carte. Ceci est
  vrai pour les cartes qui possèdent 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 ultèrieure 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.


  44..33..  LLaa ccrrééaattiioonn ddeess FFiicchhiieerrss ssppéécciiaauuxx ddeess PPéérriipphhéérriiqquueess


  Pour opérer proprement, des entrées des fichiers de périphériques
  doivent être crées pour vos périphériques son. Normalement, ils sont
  créés automatiquement lors de l'installation de Linux. Une
  vérification rapide peut être effectuée en utilisant la commande ci-
  dessous. Si vous obtenez la même chose (excepté pour la date...) alors
  les fichiers de périphériques 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 périphériques corrects ne
  garantit rien en tant que tel... Le pilote du noyau doit également
  être chargé ou compilé avant que les périphériques puissent
  fonctionner.

  Si vous pensez que les fichiers de périphériques ne sont pas bons,
  vous pouvez les recréer en utilisant le petit script shell (à éxécuter
  en tant qu'utilisateur root) que vous trouverez à la fin du fichier
  Readme.linux dans le répertoire /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 déterminer quels fichiers
  doivent être créés.


  44..44..  DDéémmaarrrraaggee ddee LLiinnuuxx eett TTeesstt ddee ll''IInnssttaallllaattiioonn


  Vous devriez maintenant être prêt à `rebooter' (redémarrer) sur votre
  nouveau noyau et tester les pilotes de son. Suivez la procédure
  habituelle pour installer et rebooter sur le nouveau noyau (gardez
  l'ancien dans un petit coin au cas où il y aurait un un problème !).

  Pendant le redémarrage, essayez de vérifier quelques messages
  d'information tels que ceux qui suivent (s'ils défilent 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 affichés quand on utilise le module
  chargeable du pilote son (à moins que vous ne l'ayez spécifié 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 affichés. S'ils ne le sont pas, cela signifie qu'il n'y
  a pas de pilote son dans le noyau. Dans ce cas, vérifiez 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é configurée.

  Le pilote peut également afficher des messages d'erreurs ou
  d'avertissement ("warnings") pendant le redémarrage. Regardez bien
  tout ça quand vous rebootez pour la première fois après avoir
  configuré le pilote son.

  Ensuite, vous devriez vérifier le fichier de périphérique
  /dev/sndstat.  La lecture du fichier d'état du pilote son devrait vous
  fournir  des informations supplémentaires sur la façon dont a été
  initalisée 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 dernière commande peut générer des messages d'erreur. "No such
  file or directory" signifie que vous devez créer les fichiers de
  périphériques (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 parenthèses dans la partie "Card
  config:" de /dev/sndstat (par exemple : "(SoundBlaster at 0x220 irq 5
  drq 1,5)" ), cela signifie que le périphérique (la carte) a bien été
  configurée, mais pas détectée.

  Maintenant, vous devriez pouvoir jouer un fichier son. Procurez-vous
  un petit fichier son et envoyez-le vers le fichier de périphérique
  pour vérifier 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, généralement, utiliser cat n'est pas une façon correcte de
  jouer des fichiers audio, mais juste un moyen rapide de vérification.
  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
  périphérique 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é détectée.

  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 fréquent de trouver des messages d'erreurs à cet endroit. Très
  souvent, on trouve le message : "Sound: DMA (output) timed out -
  IRQ/DRQ config error?". Cette erreur signifie que la carte n'a pas
  réussi à 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 façon de le faire fonctionnner est
  d'essayer tous les IRQ et les DMA supportés par le pilote.

  Une autre raison est que le fichier de périphérique n'est pas
  compatible avec le pilote pour lequel il est configuré Ceci est le
  plus souvent vrai quand une carte son supposée "compatible
  SoundBlaster (Pro/16)" ne fonctionne pas avec le pilote SoundBlaster.
  Dans ce cas, essayez de trouver avec quelle autre carte votre matériel
  est réellement compatible (en postant dans fr.comp.os.linux par
  exemple).

  Quelques fichiers son peuvent être trouvés dans ce paquetage :
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/snd-data-0.1.tar.Z>

  Maintenant, vous pouvez vérifier 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'
  (mélangeur de sources sonores), afin de sélectionner le microphone
  comme étant le périphérique d'entrée. Ceci doit également vous
  permettre d'ajuster le niveau d'enregistrement (gain).

  Si tout cela fonctionne, vous pouvez être à peu près certain que vos
  convertisseurs A/N et N/A fonctionnent, ainsi que la partie du pilote
  y étant associée. Si vous rencontrez des difficultés, passez à la
  section suivante !!!


  44..55..  PPrroobbllèèmmeess rreennccoonnttrrééss


  Si vous avez encore des problèmes après avoir suivi les instructions
  de ce HOWTO, voici quelques points à vérifier. Ils sont listés dans un
  ordre de difficulté croissante. Si la vérification se solde par un
  echec, résolvez le problème avant d'effectuer la suivante !


  44..55..11..  PPrreemmiieerr ppooiinntt :: SSooyyeezz cceerrttaaiinn qquuee vvoouuss uuttiilliisseezz vvrraaiimmeenntt vvoottrree
  nnooyyaauu ffrraaîîcchheemmeenntt ccoommppiilléé !!


  Vous pouvez vérifier 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 réellement redémarré la machine ? Si vous utilisez
  LILO (multiboot), l'avez-vous réinstallé ?  (normalement, cela se fait
  par : /etc/lilo/install). Si vous bootez à partir d'une disquette, en
  avez-vous créé une nouvelle et bien utilisée ?


  44..55..22..  nnooyyaauu yy ssoonntt bbiieenn iinncclluuss DDeeuuxxiièèmmee ppooiinntt :: SSooyyeezz ssûûrr qquuee lleess
  ppiillootteess ssoonn dduu


  La façon la plus simple de vérifier ceci est de controler ce que
  contient /dev/sndstat comme cela a été décrit précédemment. Si il
  semble y avoir un problème, alors quelque chose s'est mal déroulé
  pendant la configuration ou la construction du nouveau noyau.


  44..55..33..  TTrrooiissiièèmmee ppooiinntt :: EEsstt--ccee qquuee llee nnooyyaauu aa bbiieenn ddéétteeccttéé vvoottrree
  ccaarrttee ssoonn ppeennddaanntt llee ddéémmaarrrraaggee ??


  Soyez certain que votre carte son a bien été détectée lors du
  démarrage. Vous avez dû voir un message lors de la phase de boot. Vous
  pouvez retrouvez les messages du dernier démarrage en utilisant la
  commande dmesg :



       % dmesg




  ou



       % tail /var/adm/messages





  Si votre carte n'a pas été trouvée, c'est que quelque chose s'est mal
  passé. Soyez certain que votre carte est réellement installée ! Si
  elle fonctionne sous DOS, vous pouvez supposer qu'elle va fonctionner
  sous Linux, et qu'il doit y avoir un problème au niveau de la
  configuration du noyau. Soit vous avez configuré une mauvaise carte ou
  de mauvais paramètres, soit votre carte n'est supportée par aucun des
  pilotes son du noyau Linux...

  Une possibilité est que votre carte nécessite 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. Vérifiez bien que que les
  adresses d'E/S, de DMA, et les numéros d'IRQ sont les mêmes sous Linux
  et sous DOS. Consultez le fichier Readme.cards dans les sources du
  pilote son Linux pour connaître les détails de configuration de votre
  carte.

  Si votre carte n'est pas mentionnée dans ce document, il est possible
  que le pilote son de Linux ne la supporte pas. Vous pouvez consulter
  les références listées à la fin de ce document pour obtenir de l'aide.


  44..55..44..  QQuuaattrriièèmmee ppooiinntt :: AArrrriivveezz--vvoouuss àà lliirree ddeess ddoonnnnééeess eenn pprroovvee­­
  nnaannccee dduu ddsspp ??


  Essayez d'enregistrer des sons en provenance de /dev/audio en
  utilisant la commande dd dont on a déjà parlé dans ce document.

  Si ça ne fonctionne pas, alors il y a probablement un conflit d'IRQ ou
  de DMA, ou une incompatibilité matérielle (le périphérique n'est pas
  supporté par Linux ou le pilote n'est pas configuré pour le bon
  périphérique).

  Une autre possibilité est d'avoir un matériel défectueux. Testez cette
  carte sous DOS pour vérifier !


  44..55..55..  QQuuooii eennccoorree......


  Si ça ne marche toujours pas, voici quelques suggestions sur ce que
  vous devriez faire :


  ·  relisez soigneusement ce HOWTO !

  ·  consultez les références à la fin de ce document, et
     particulièrement les pages Web de d'Hannu Savolainen et les
     fichiers Readme présents dans les sources du noyau.

  ·  postez une question précise et détaillée dans fr.comp.os.linux en
     n'oubliant pas de préciser que vous avez préalablement 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 récent

  ·  envoyez un email à l'auteur du pilote son de votre carte

  ·  lancez emacs et tapez Esc-x doctor :-)



  55..  AApppplliiccaattiioonnss uuttiilliissaanntt llee ssoonn


  Je donne ici quelques exemples d'applications que vous aimerez
  peut-être avoir si vous possédez une carte son sous Linux. Pour avoir
  des informations plus fraîches, 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 à posséder :


  ·  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 ésotériques (comme des utilitaires de synthèse ou de
  reconnaissance vocale) qu'il peut-être amusant d'essayer...


  66..  RRééppoonnsseess aauuxx QQuueessttiioonnss FFrrééqquueemmmmeenntt PPoossééeess


  Ce paragraphe répond à des questions qui sont souvent posées dans les
  forums de discussion et les listes de diffusion.

  Des réponses à d'autres questions peuvent également être trouvées sur
  la page web des pilotes son OSS.


  66..11..  QQuueellss ssoonntt lleess ddiifffféérreennttss ffiicchhiieerrss ddee ppéérriipphhéérriiqquueess lliiééss aauu ssoonn
  ??


  Ce sont des noms le plus souvent "standard", mais certaines
  distribtutions Linux peuvent avoir choisi des noms différents.


     //ddeevv//aauuddiioo
        lien symbolique vers /dev/audio0

     //ddeevv//aauuddiioo00
        périphérique audio compatible avec les stations Sun (dans une
        implémentation partielle seulement : il n'y a pas de support de
        l'interface ioctl Sun, uniquement l'encodage u-law)

     //ddeevv//aauuddiioo11
        second périphérique audio (pour certaines cartes son ou si vous
        en avez deux)

     //ddeevv//ddsspp
        normalement, c'est un lien symbolique vers /dev/dsp0

     //ddeevv//ddsspp00
        premier périphérique d'échantillonage


     //ddeevv//ddsspp11
        second périphérique d'échantillonage

     //ddeevv//mmiixxeerr
        lien vers /dev/mixer0

     //ddeevv//mmiixxeerr00
        premier mixeur son

     //ddeevv//mmiixxeerr11
        second mixeur son

     //ddeevv//mmuussiicc
        interface séquenceur de haut niveau

     //ddeevv//sseeqquueenncceerr
        accés bas niveau pour MIDI, FM et GUS

     //ddeevv//sseeqquueenncceerr22
        normalement, lien vers /dev/music

     //ddeevv//mmiiddii0000
        premier port MIDI

     //ddeevv//mmiiddii0011
        second port MIDI

     //ddeevv//mmiiddii0022
        troisième port MIDI

     //ddeevv//mmiiddii0033
        quatrième port MIDI

     //ddeevv//ssnnddssttaatt
        indique l'état du pilote son

  Le pilote pour haut-parleur PC fournit les fichiers de périphériques
  suivant :


     //ddeevv//ppccaauuddiioo
        équivalent à /dev/audio

     //ddeevv//ppccsspp
        équivalent à /dev/dsp

     //ddeevv//ppccmmiixxeerr
        équivalent à /dev/mixer


  66..22..  CCoommmmeenntt ppuuiiss--jjee jjoouueerr uunn ffiicchhiieerr ssoonn ??


  Les fichiers son provenant des stations Sun (.au) peuvent être envoyés
  directement dans /dev/audio. Les fichiers son bruts doivent être
  envoyés dans /dev/dsp, de préférence en utilisant un utilitaire prévu
  à cet effet (play). Sinon, le résultat risque d'être de piètre
  qualité.

  Les programmes comme wavplay ou vplay (dans le paquetage snd-util)
  donneront leurs meilleurs résultats avec des fichiers WAV. Par contre,
  ils ne reconnaissent pas les fichiers WAV Microsoft compressés 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 paramètres corrects sont spécifiés
  en ligne de commande.


  66..33..  CCoommmmeenntt ffaaiirree ppoouurr eennrreeggiissttrreerr uunn ssoonn ??


  La lecture de /dev/audio ou /dev/dsp fournira des données
  échantillonées qui peuvent être redirigées vers un fichier. Un
  programme tel que vrec facilite le réglage de la fréquence
  d'échantillonage, la durée d'enregistrement, etc. Vous aurez aussi
  certainement besoin d'un programme de mixage pour sélectionner
  l'entrée son apropriée.


  66..44..  AAvvooiirr pplluuss dd''uunnee ccaarrttee ssoonn


  Avec le piloye son actuel, il est possible d'avoir plusieurs
  SoundBlaster, SoundBlaster/Pro, SoundBlaster16, MPU-401 ou cartes MSS
  à la fois sur votre système. L'installation de deux SoundBlaster est
  possible en définissant 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 même 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. Après 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 système) :



       #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 matérielle)

  ·  AudioTrix Pro (limitation matérielle)

  ·  CS4232 (limitation matérielle)


  66..55..  EErrrroorr:: NNoo ssuucchh ffiillee oorr ddiirreeccttoorryy ffoorr ssoouunndd ddeevviicceess


  Vous devez créer les fichiers de périphériques du pilote son.
  Consultez la section concernée. Si vous avez déjà ces fichiers,
  assurez-vous qu'ils possèdent bien les nombres majeur et mineur
  corrects (certaines distributions obsolètes de Linux créent des
  fichiers de périphériques incorrects durant l'installation).


  66..66..  EErrrroorr:: NNoo ssuucchh ddeevviiccee ffoorr ssoouunndd ddeevviicceess


  Vous avez démarré votre machine avec un noyau non configuré pour le
  son, ou alors, les adresses d'E/S configurées dans votre noyau ne
  correspondent pas à celles de votre marériel. Vérifiez que vous
  utilisez bien votre noyau fraichement compilé et qu'il a été
  correctement configuré avec des paramètres correspondant à votre
  matériel.


  66..77..  EErrrroorr:: NNoo ssppaaccee lleefftt oonn ddeevviiccee ffoorr ssoouunndd ddeevviicceess


  Ceci peut arriver si vous tentez d'envoyer des données vers /dev/audio
  ou /dev/dsp sans créer le fichier de périphérique adéquat. Ce fichier
  est alors un fichier normal qui a rempli votre disque-dur !!! Vous
  devez exécuter 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 mémoire vive sur votre machine lorsque le fichier de
  périphérique est ouvert. Le pilote audio a besoin d'au moins deux
  pages (de 8 ko) contiguës de mémoire 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 très longtemps. Il est
  possible de libérer de la mémoire vive en compilant et en éxécutant ce
  programme C avant d'ouvrir le fichier de périphérique :




       main() {
         int i;
         char mem[500000];
         for (i = 0; i < 500000; i++)
           mem[i] = 0;
         exit(0);
       }





  66..88..  EErrrroorr:: DDeevviiccee bbuussyy ffoorr ssoouunndd ddeevviicceess


  Un périphérique son ne peut être ouvert que par un seul processus à la
  fois. Il y a certainement un processus qui utilise déjà la carte son.
  Une façon 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 numéro 256
  a déjà ouvert le périphérique.  Vous devez alors attendre que ce
  processus finisse son travail ou alors, le tuer (avec kill). Pour
  connaître les processus d'un utilisateur autre que vous, il faut être
  root pour utiliser la commande fuser.


  66..99..  JJ''aaii eennccoorree uunnee eerrrreeuurr ddee ttyyppee ``ddeevviiccee bbuussyy'' ((ppéérriipphhéérriiqquuee
  ooccccuuppéé)) !!


  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 même 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 nécessaire 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.


  66..1100..  LLeeccttuurree iinnccoommppllèèttee dd''uunn ffiicchhiieerr dd''éécchhaannttiilllloonnss aauuddiioo


  Habituellement, cela se traduit par l'arrêt 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. Vérifiez que le noyau est bien configuré et
  qu'il n'y a pas de conflit d'adresse avec d'autres cartes.

  Un autre symptôme est une lecture en boucle. Ceci est souvent lié à un
  conflit d'IRQ.


  66..1111..  IIll yy aa ddeess ppaauusseess lloorrss ddee llaa lleeccttuurree dd''uunn ffiicchhiieerr MMOODD


  La lecture des fichiers MOD nécessite 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 réel.  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 intérêt à utiliser un
  des lecteurs mod conçus spécifiquement pour la GUS (par ex. gmod).


  66..1122..  EErrrreeuurrss ddee ccoommppiillaattiioonn dd''aapppplliiccaattiioonnss uuttiilliissaanntt llee ssoonn



  Les version 1.0c et antérieures du pilote son utilisent des appels
  ioctl() incompatibles. Récupérez des sources plus récentes ou
  effectuez les modifications nécessaires pour l'adapter au nouveau
  pilote son. Voyez le fichier Readme du pilote son pour plus de
  détails...

  Soyez également certain que vous avez utilisé la dernière version de
  soundcard.h et ultrasound.h en compilant votre application. Voyez
  comment les installer au début de ce document.


  66..1133..  SSEEGGVV eenn uuttiilliissaanntt ddeess eexxééccuuttaabblleess qquuii ffoonnccttiioonnnnaaiieenntt aavvaanntt


  Il s'agit certainement du même problème que précédemment.


  66..1144..  QQuueellss ssoonntt lleess bbuuggss ccoonnnnuuss eett lleess lliimmiittaattiioonnss ddaannss llee ppiilloottee
  ssoonn ??


  Ils sont partiellement répertoriés 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 dernière version est
  la "draft 2" disponible sur
  <ftp://nic.funet.fi/pub/Linux/ALPHA/sound/>. Notez que ce répertoire
  est caché et n'apparaîtra pas à moins d'y accéder directement avec la
  commande "cd" de FTP.

  Lors de la rédaction de ce document, de nouvelles documentations
  étaient disponibles sur le site web de 4Front Technologies.

  Une autre source d'information est le Guide du Multimédia sous Linux
  (ndt: traduit en Français par Eric Dumas). Voir les références dans ce
  document.


  66..1155..  oouu jjoouueerr ddeess ffiicchhiieerrss ssoonn ssaannss ppaauussee ??  QQuueelllleess rreessssoouurrcceess pprroo­­
  cceesssseeuurr ssoonntt--eelllleess nnéécceessssaaiirreess ppoouurr eennrreeggiissttrreerr


  Il n'existe pas de réponde immédiate à cette question.  Cela dépend
  de:


  ·  la technique utilisée : échantillonage PCM ou synthèse FM

  ·  la fréquence d'échantillonage et la taille des échantillons

  ·  l'application utilisée pour jouer et enregistrer

  ·  la carte son utilisée

  ·  la vitesse du disque dur, la vitesse du processeur, la taille du
     cache, etc.

  En général, les machines à base de 386 peuvent jouer des échantillons
  ou faire de la synthèse FM sur des cartes 8 bits sans problème.

  Jouer des fichiers MOD nécessite plus de ressources CPU. Des mesures
  expérimentales 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 implémentées au niveau physique et
  nécessitera donc moins de ressources CPU.

  (ndt: actuellement, on peut considérer que toute machine moderne, à
  base de pentium ou supérieur est capable d'enregistrer et de jouer des
  fichiers son en qualité "CD" : 44 khz/16 bits)

  Ces considérations supposent que vous n'éxécutez par simultanément 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 possédez un
  coprocesseur arithmétique (intégré ou non dans le processeur).  Le
  pilote son quant à lui n'effectue pas de calculs en virgule flottante.


  66..1166..  PPrroobbllèèmmeess aavveecc llaa PPAASS1166 eett ll''aaddaappttaatteeuurr SSCCSSII AAddaapptteecc 11554422


  (les explications suivantes ont éré fournies par seeker@indirect.com)

  Linux reconnaît seulement la 1542 à l'adresse 330 (par défaut) ou 334,
  et la PAS autorise l'émulation MPU-401 à l'adresse 330 uniquement.  Le
  conflit subsiste même si vous avez désactivé 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 stéréo et que
  vous sauvez le fichier sur un disque SCSI piloté par la 1542, vous
  aurez certainement des problèmes. Les canaux DMA débordent et la
  mémoire vive ne se rafraîchit 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 régler pour le bus des délais
  "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 réduisez la durée "on" du bus,
  ou augmentez sa durée "off" jusqu'à ce que le problème disparaisse.
  SCSISEL.EXE modifie les réglages de l'EEPROM et les modifications
  apportées fonctionneront donc au prochain redémarrage sous Linux.


  Dernier problème - les vieilles puces Symphony réduisent de manière
  importante les périodes de cycle I/O pour accélerer les accès au bus.
  Aucune des cartes essayées ne produit de problèmes avec ces courtes
  périodes de cycle, sauf pour la PAS-16. Le BBS de Media Vision propose
  le programme SYMPFIX.EXE qui est supposé résoudre le problème en
  utilisant un bit de diagnostic dans le controleur de bus Symphony,
  mais cela ne procure aucune garantie matérielle. Vous devrez peut-être
  :


  ·  contacter le distributeur de la carte-mère pour remplacer la
     vieille puce incriminée

  ·  changer de carte-mère ou...

  ·  acheter une autre carte-son !



  Le premier problème dépend de la puce utilisée sur votre carte-mère,
  de la vitesse du bus et des paramètres du BIOS, et de la phase de la
  lune.  Le second problème dépend de l'option de rafraîchissement
  (caché ou synchronisé), de la fréquence de rafraîchissement du DMA de
  la 1542 et éventuellement de celui du bus d'E/S. Le troisième problème
  peut-être déterminé en appellant Media Vision et en leur demandant
  quelle catégorie de puce Symphony est incompatible avec leur design...



  66..1177..  EEsstt--iill ppoossssiibbllee ddee lliirree eett ddee jjoouueerr ddeess éécchhaannttiilllloonnss ssoonnoorreess
  ssiimmuullttaannéémmeenntt ??


  A cause de certaines limitation matérielles, ceci est impossible sur
  beaucoup de cartes-son. Certaines cartes récentes 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.


  66..1188..  MMaa SSBB1166 eesstt rreeggllééee eenn IIRRQQ 22,, mmaaiiss llee pprrooggrraammmmee ddee ccoonnffiigguurraattiioonn
  nnee ppeerrmmeett ppaass cceettttee vvaalleeuurr..


  Sur les machines à base de 286, l'IRQ 2 est équivalente à l'IRQ 9.
  Spécifiez IRQ 9 dans la configuration.


  66..1199..  EEsstt--ccee qquuee lleess SSoouunnddBBllaasstteerr AAWWEE3322 eett SSoouunnddBBllaasstteerr1166 AASSPP ssoonntt
  ssuuppppoorrttééeess ??


  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.


  66..2200..  SSii jj''uuttiilliissee LLiinnuuxx eett qquuee jjee rreellaannccee llee DDOOSS eennssuuiittee,, jj''oobbttiieennss
  ddeess eerrrreeuurrss eett//oouu cceerrttaaiinneess aapppplliiccaattiioonnss nnee ffoonnttiioonnnneenntt pplluuss ccoorrrreeccttee­­
  mmeenntt..


  Cela arrive après un redémarrage à chaud sur DOS. Parfois, le message
  d'erreur met en cause un mauvais fichier CONFIG.SYS.

  Une rapide solution à ce problème est de procéder à un redémarrage
  complet en utilisant le bouton reset ou en coupant le secteur plutot
  qu'un redémarrage à chaud (en utilisant Control-Alt-Del). (N.d.t.:
  dans les nouvelles versions de linux, le redémarrage par Control-Alt-
  Del provoque normalement une réinitialisation totale de la machine,
  équivalente au "reset" matériel )

  La bonne solution est d'utiliser les mêmes réglages d'IRQ et de DMA
  sous DOS et Linux (ou de ne pas utiliser DOS :-) ).


  66..2211..  PPrroobbllèèmmeess aavveecc DDOOOOMM ssoouuss LLiinnuuxx


  Ceux qui utilisent le portage de DOOM pour Linux réalisé par ID
  Software peuvent être intéressés par ces notes.

  Pour une sortie son correcte, vous devez utiliser la version 2.90 ou
  supérieure du pilote son : il a été conçu pour supporter le mode
  temps-réel de DOOM.

  Les échantillons sonores sont en 16 bits. Si vous avez une carte son 8
  bits vous pouvez quand même utiliser le son en récupérant plusieurs
  programmes disponibles sur
  <ftp://sunsite.unc.edu/pub/Linux/games/doom>.

  Si DOOM râme sur votre système, désactiver le son (en renommant le
  fichier sndserver) peut augmenter les performances.

  Par défaut, DOOM ne supporte pas la musique sous Linux. Le programme
  musserver y remédie. On peut le trouver sur
  <ftp://pandora.st.hmc.edu/pub/linux/musserver.tgz>.


  66..2222..  CCoommmmeenntt rréédduuiirree lleebbrruuiitt pprroodduuiitt ppaarr mmaa ccaarrttee ssoonn ??


  Utilisez des câbles de liaison blindés et de bonne qualité, essayez de
  placer votre carte dans des slots différents. Si la carte a un control
  de volume, modifiez ce réglage.

  Utilisez également un programme "mixeur" pour vous assurer que les
  entrées inutiles (comme le micro) sont désactivées.

  Mais certaines cartes sont mal blindées et mal reliées à la terre et
  produisent naturellement beaucoup de bruit.

  Enfin, sur mon système, j'ai découvert qu'utiliser l'option de
  configuration no-hlt réduisait le niveau de bruit. Cette commande
  force le noyau à ne pas utiliser l'instruction halt quand il éxécute
  le processus "idle" (ndt : c'est à dire, quand le système n'a rien à
  faire). Vous pouvez utiliser ceci manuellement au démarrage ou le
  spécifier dans le fichier de configuration de LILO avec la commande :
  append="no-hlt"


  66..2233..  JJee ppeeuuxx jjoouueerr ddeess ssoonnss éécchhaannttiilllloonnééss,, mmaaiiss ppaass eenn eennrreeggiissttrreerr


  Si vous pouvez jouer des sons mais pas en enregistrer, essayez ceci :


  ·  utilisez un programme mixeur de son pour sélectionner le
     périphérique approprié (par exemple, un micro)

  ·  avec le même mixeur, positionnez le gain d'entrée du périphérique
     au maximum

  ·  Si vous le pouvez, essayez de tester l'enregistrement du son sous
     DOS afin de déterminer s'il existe ou non un problème de matériel

  Parfois, deux canaux DMA différents sont utilisés pour
  l'enregistrement et la lecture. Dans ce cas, il est assez probable que
  le canal DMA spécifié pour l'enregistrement n'est pas correct.


  66..2244..  MMaa ccaarrttee ""ccoommppaattiibbllee"" ffoonnccttiioonnnnee sseeuulleemmeenntt ssii jjee ll''iinniittiiaalliissee
  pprrééaallaabblleemmeenntt ssoouuss DDOOSS..


  Dans la plupart des cas, une carte "compatible SoundBlaster"
  fonctionnera mieux sous Linux si elle est configurée avec un pilote
  autre que celui destiné à la véritable SoundBlaster. Beaucoup de
  cartes se disent "compatibles SoundBlaster" mais bien souvent, ce mode
  SoundBlaster est seulement un bidouillage prévu pour la compatibilité
  avec les jeux sous DOS. Beaucoup de cartes possèdent un mode 16 bits
  natif qui est facilement supporté par les version récentes du noyau
  Linux (2.0.1 et plus).

  Pour d'autres cartes plus anciennes, il sera nécessaire d'essayer de
  les faire fonctionner dans le mode SoundBlaster. Les seules cartes
  récentes qui font exception à cette règle sont les cartes basées sur
  Mwave.


  66..2255..  mmooddee 88--bbiittss ssoouuss LLiinnuuxx..  MMaa ccaarrttee ssoonn 1166 bbiittss ""ccoommppaattiibbllee
  SSoouunnddBBllaasstteerr"" ffoonnccttiioonnnnee sseeuulleemmeenntt eenn


  Les cartes son 16 bits dites "compatible SoundBlaster" ne sont
  véritablement qu'avec le mode 8 bits SoundBlaster Pro. Elles possèdent
  en général 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.


  66..2266..  OOùù ppuuiiss--jjee ttrroouuvveerr ddeess llooggiicciieellss ddee ssoonn ssoouuss LLiinnuuxx ??


  Voici quelques bons sites d'archive intéressants 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/>



  66..2277..  EEsstt--ccee qquuee llee ppiilloottee ddee ssoonn ppeeuutt--êêttrree ccoommppiilléé ccoommmmee mmoodduullee
  cchhaarrggeeaabbllee ??


  Ceci est possible pour les versions récentes 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.


  66..2288..  PPuuiiss--jjee uuttiilliisseerr mmaa ccaarrttee ssoonn ppoouurr rreemmppllaacceerr llee ""bbiipp"" pprroodduuiitt
  ppaarr mmaa ccoonnssoollee ??


  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 générer des sons sur requête du noyau.

  De plus, il est possible avec certaines cartes son d'y connecter la
  sortie du haut-parleur PC de telle manière que tous les sons passent
  par les haut parleurs de la carte.

  66..2299..  QQuu''eesstt--ccee qquuee VVooxxWWaarree ??


  Les pilotes son du noyau supportent différentes sortes de systèmes
  Unix/x86 et sont donc disponibles en tant que paquetage indépendant du
  noyau Linux.  Jusqu'à Février 1996, les auteurs ont appellé ce
  programme "Voxware".  Malheureusement, ce nom était déjà déposé 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 manière
  commerciale pour plusieurs systèmes Unix par 4Front Technologies. La
  version gratuite, connue sous le nom d'OSS/Free, continuera d'être
  disponible gratuitement pour Linux.

  D'autres noms utilisés par le passé et se réferrant au même 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
  présentation d'OSS/Linux dans le numéro de juin 1997 de Linux Journal
  (n.d.t. : en anglais).


  66..3300..  EEsstt--ccee qquuee lleess ccaarrtteess ssoonn PPlluugg && PPllaayy ssoonntt ssuuppppoorrttééeess ??


  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 possédez un système Pentium récent avec un BIOS Plug & Play,
  il devrait pouvoir pouvoir configurer vos cartes. Prennez garde de
  configurer le pilote son de Linux avec les mêmes paramètres d'E/S,
  d'IRQ et de canal DMA que dans le BIOS.

  Il existe un paquetage d'outils Plug & Play pouvant être utilisés pour
  configurer les cartes. On peut le trouver sur le site
  <http://www.redhat.com/> (peut-être se trouve t-il déjà dans votre
  distribution Linux).

  Si vous utilisez votre carte sous Windows95, vous pouvez utiliser le
  gestionnaire de périphérique pour configurer la carte, puis démarrer
  Linux après une réinitialisation à chaud en utilisant le programme
  LOADLIN. Vérifiez que les paramètres de configuration sont identiques
  sous les deux systèmes.

  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 matériel sous DOS. Utilisez le programme
  LOADLIN pour relancer Linux. Vérifiez ici encore que les paramètres
  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 adéquat pour les
  paramètres désirés. Ensuite, la carte (même éteinte)  gardera en
  mémoire interne son paramêtrage, et il ne sera pas nécessaire 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 auprès de 4Front Technologies.




  66..3311..  SSooxx//PPllaayy//VVppllaayy iinnddiiqquuee :: ""iinnvvaalliidd bblloocckk ssiizzee 11002244""


  Une modification du pilote dans sa version 1.3.67 a rendu inopérants
  certains programmes son qui vérifiaient (abusivement) que le résultat
  de la requête ioctl SNDCTL_DSP_GETBLKSIZE était supérieure à 4096.
  Les utilitaires présents dans le dernier paquetage snd-util-3.x.tar.gz
  (sur  <ftp://ftp.4front-tech.com/ossfree>) gèrent maintenant ceci
  correctement. Les dernières versions du pilote son ont également été
  modifiées pour éviter des fragments d'allocation plus petits que 4096
  octets, ce qui résoud le problème avec les anciens utilitaires.


  66..3322..  PPoouurrqquuooii llee ppiilloottee ssoonn ppoossssèèddee--iill ssoonn pprroopprree pprrooggrraammmmee ddee ccoonn­­
  ffiigguurraattiioonn ??


  Le pilote son supporte un grand nombre de paramètres de configuration.
  Le programme configure inclus avec le pilote son vérifie les
  dépendances entre ces paramètres. Les outils utilisés pour configurer
  le noyau ne supportent pas ce niveau de fonctionalités.

  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 consacrée à la "configuration du noyau").



  66..3333..  cchhaarrggee llee mmoodduullee dduu ppiilloottee ssoonn LLeess ppaarraammèèttrreess dduu mmiixxeeuurr ssoonntt
  rrééiinniittiiaalliissééss àà cchhaaqquuee ffooiiss qquuee jjee


  Il est possible de compiler le pilote son en tant que module
  chargeable par le noyau et utiliser kerneld pour un chargement et
  déchargement automatiques. Cela peut engendrer un problème. A chaque
  fois que le module est rechargé, les paramètres 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
  exécuté immédiatement après le chargement du pilote son. Le paramètre
  dma_buffsize est recquis par la commande option. Modifiez cela en
  fonction de votre programme mixeur et de vos réglages de gain.

  Si vous avez compilé le pilote son en dur dans le noyau et que vous
  souhaitez régler les différents gains du mixeur au démarrage de Linux,
  vous pouvez effectuer l'appel au programme mixeur dans
  /etc/rc.d/rc.local.


  66..3344..  SSeeuull ll''uuttiilliissaatteeuurr rroooott ppeeuutt eennrreeggiissttrreerr ddeess ssoonnss


  Par défaut, le script se trouvant dans Readme.linux qui crée les
  fichiers de périphériques son (/dev/...) autorise seulement l'accés à
  la carte son par root. Ceci afin de combler un trou de sécurité
  potentiel. Dans un environnement réseau, des utilisateurs externes
  pourraient se connecter à votre machine et vous écouter par
  l'intermédiaire 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 spéciaux /dev/audio et /dev/dsp.

  Par contre, ce script autorise par défaut n'importe quel utilisateur à
  jouer un échantillon sonore dans la carte. Ceci n'a aucune conséquence
  sur la sécurité mais peut se révéler plutôt désagréable.


  66..3355..  EEsstt--ccee qquuee lleess cciirrccuuiittss ssoonnoorreess ddee ll''IIBBMM TThhiinnkkPPaadd ssoonntt ssuupp­­
  ppoorrttééss ??


  Vous trouverez des informations à ce sujet sur :
  <http://www.screamin.demon.co.uk/>.


  77..  RRééfféérreenncceess


  Si vous possédez 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 française.

  Le Sound-Playing HOWTO explique comment jouer différents 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 Français 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 présentes ont été tirées de la documentation
  disponible sur  <http://www.4front-tech.com/pguide>, mais la section
  concernant /dev/sequencer peut tout de même vous être utile.

  Les FAQs (Questions Fréquemment Posées ou Foire Aux Questions !)
  suivantes sont régulièrement postées dans le forum Usenet
  news.announce et sont également archivées 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 réguliers de FAQ dans le forum
  Usenet fr.comp.os.linux.annonces)


  Les FAQs vous indiquent également plusieurs listes de diffusion
  spécifiques à certains matériels 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 multimédia)

  ·  alt.sb.programmer (programmation de la SoundBlaster)

  ·  comp.multimedia (à propos de Multimédia)

  ·  comp.music (théories et recherches sur la musique assistée par
     ordinateur)

  ·  comp.sys.ibm.pc.soundcard.* (divers forums pour cartes son
     compatibles IBM PC)

  Un site web consacré au multimédia 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 consacrées 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 général destinées
  à des discussions relatives au développement d'applications liées 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 très utiles relatifs aux pilotes
  de carte son. Typiquement, on trouvera ces fichiers dans le répertoire
  /usr/src/linux/drivers/sound.

  Le concepteur du pilote son, Hannu Savolainen, peut être contacté par
  email à hannu@voxware.pp.fi.  Il possède é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 façon toutes les applications gérant les
  périphériques 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
  gérant 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 française d'Eric Dumas,
  numéro ISBN : ISBN 2-84177-014-1) publié chez O'Reilly and Associates.
  Ce bouquin est en vente un peu partout, mais vous pouvez quand même
  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 Août 1998

  (Adaptation française par       Guillaume Bertucat guillaume@ibpc.fr
  et Raphaël Gurlie raphael@ibpc.fr, 20 Janvier 1998).  Ce document est
  un inventaire des applications qui lisent différents formats de sons
  sous Linux.


  11..  IInnttrroodduuccttiioonn

  Ceci est le document Sound Playing HOWTO. Il fait l'inventaire des
  nombreux formats de son et des applications qui peuvent être utilisées
  pour les lire. Il donne aussi quelques trucs et conseils sur la
  manière d'utiliser ces applications. Il existe également d'autres
  applications intéressantes relatives au son, mais pas directement
  reliées a la lecture de celui-ci. Cependant, ce document n'est _p_a_s un
  guide d'installation du support son sur un système Linux. Pour obtenir
  des informations sur l'installation du support son sur votre système
  Linux et les matériels supportés, reportez-vous au Linux Sound HOWTO
  de Jeff Tranter.

  Ce document traite des applications son destinées aux utilisateurs
  normaux. C'est à dire, qu'il ne s'intéresse qu'à ce que l'utilisateur
  moyen a besoin de savoir sur le coté applicatif du son, et non aux
  bizarreries exotiques comme la synthèse vocale, ou aux problèmes
  matériels qui sont traités dans le Sound HOWTO.



  11..11..  CCooppyyrriigghhtt ddee ccee ddooccuummeenntt

  Ce document peut être distribué et modifié librement ( j'apprécierait
  cependant que toute modification me soit signalée), aussi longtemps
  que cette note y est incluse.  Cependant, il ne peut lui être appliqué
  d'autres restrictions, et une version modifiée de ce document devra
  être soumise au même copyright que celui-ci.  De plus, le mérite doit
  être rendu à qui de droit.



  11..22..  CCooppyyrriigghhtt ddeess aapppplliiccaattiioonnss iinnvveennttoorriiééeess

  S'il n'est fait mention d'aucun copyright, alors l'application est
  sous GNU General Public License.



  11..33..  OOùù ttrroouuvveerr ccee ddooccuummeenntt

  La version officielle la plus récente de ce document peut être obtenue
  auprès du Linux Documentation Project <http://sunsite.unc.edu/LDP/>.
  La version non officielle la plus récente de ce document peut être
  obtenue auprès de <http://laplace.snu.ac.kr/~wacko/howto/>.

  Une version Coréenne de ce document (très 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>.





  11..44..  RReemmaarrqquueess eett ccoommmmeennttaaiirreess

  Je ne suis pas omniscient, et je n'utilise pas toutes les applications
  citées ci après (je n'ai même pas pu essayer certaines d'entre elles),
  par conséquent il y a très certainement des erreurs. De plus, comme
  les logiciels évoluent en permanence, la documentation devient
  invariablement obsolète. 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.)



  11..55..  RReemmeerrcciieemmeennttss

  Merci aux auteurs des applications citées 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.



  22..  LLiirree ddiivveerrss ffoorrmmaattss ssoonn

  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.



  22..11..  MMIIDDII

  MIDI signifie Musical Instrument Device Interface.  Les fichiers MIDI
  ont généralement l'extension .mid. Il contiennent des informations sur
  les séquences, c'est à dire des informations sur quand et de quelle
  manière jouer de quel instrument, etc. Selon votre matériel (et peut
  être aussi le logiciel que vous utiliserez), le son pourra être divin
  ou carrément pourrit.



  22..11..11..  AAddaaggiioo

  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 gênant (cf version 0.5 sur certains matériels) fait que
  le son est ralenti à la fin. Plus précisément, au lieu d'achever la
  piste sonore comme le spécifie le fichier MIDI, il termine en jouant
  l'avant dernière note dans un intervalle plus long. Cela ne m'a pas
  empêché d'utiliser mp, mais cela découragera peut être une utilisation
  plus poussée. Le démarrage 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
  interprétation 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 récuperer sur
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/adagio05.tar.gz> . Les
  exécutables inclus ici sont au format a.out (liés aux anciennes
  bibliothèques), et l'exécutable segfaults de xmp dans l'environnement
  X11R6 (XFree86 3.1.1, libc 4.7.2). L'exécutable de mp fonctionne très
  bien dans un environnement a.out.

  Le compiler vous coûtera 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 bibliothèque flex, qui n'est pas liée par défaut. 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 désirez compiler xmp.



  22..11..22..  TTiiMMiiddiittyy

  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, même si la différence
  tend à disparaitre avec des cartes son possèdant une table
  d'échantillons sonores comme les GUS). Cependant, il souffre d'une
  forte consomation CPU. Il lit le format MIDI en commençant 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 basée 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 dernière 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 bibliothèque pour patchs GUS



  22..11..33..  ppllaayymmiiddii

  Il s'agit d'un lecteur MIDI qui sort sous FM, GUS et MIDI externe. Il
  est supposé démarrer 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 réel incluant le traçage 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 supprimée dans un avenir
  proche.

  playmidi a été écrit par Nathan Laredo (laredo@gnu.org or
  laredo@ix.netcom.com).

  On peut le récuppérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/playmidi-2.3.tar.gz>.



  22..22..  MMoodduulleess

  Les modules (en musique assistée par ordinateur) sont des fichiers de
  musique digitale, constituées d'un assortiment d'échantillons et
  d'informations de séquence, qui signalent à l'utilisateur quand jouer
  quel échantillon (intrument), sur quelle piste, sur quel ton, et
  réaliser 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 même
  quelle que soit la plateforme, car les échantillons sont inclus dans
  le module. L'inconvénient 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 répandu est identifié par l'extension .mod. Il existe
  de nombreuses autres extensions, qui dépendent de leur format.



  22..22..11..  ttrraacckkeerr

  C'est un programme très portable (il l'a été sur de nombreuses
  plateformes) qui lit les modules musicaux SoundTracker et ProTracker.
  Il utilise une sortie stéréo 16 bits, et je trouve sa qualité
  exellente. Si vous cherchez un moyen simple de réduire 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 déjà configuré pour Linux peut être
  obtenue sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tracker-4.3-linux.tar.gz>.



  22..22..22..  ggmmoodd

  C'est un lecteur de modules musicaux pour carte Gravis UltraSound. Les
  formats supportés sont 4/6/8 canaux MOD, 8 canaux 669, MultiTracker
  (MTM), UltraTracker (ULT), FastTracker (XM) et ScreamTracker III
  (S3M).
  Il nécessite un pilote son 3.0 ou ultérieur, et bien sûr une GUS. Pour
  que le contrôle du volume fonctionne de la manière voulue, il peut
  s'avérer nécéssaire de modifier le noyau.

  Il possède une interface X qui nécessite le toolkit QT (version 0.99
  ou ultérieure). 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 à présent la
  maintenance (robinson@cnj.digex.net).

  On peut le récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/gmod-3.1.tar.gz>.



  22..22..33..  MMiikkMMoodd

  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 compressés. Il utilise une sortie
  son stéréo en 16 bits. Pour réduire simplement la consommation CPU,
  utilisez l'option -m (pour sortie mono).

  La version Unix peut utiliser indifférement ncurses ou Tcl/Tk pour
  l'interfaçage. On peut aussi s'en servir comme d'une bibliothèque, pas
  seulement comme d'un programme indépendant.

  La version originale a été écrite par Jean-Paul Mikkers
  (mikmak@via.nl). A présent, 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 nécessaire).

  On peut le trouver sur la MikMod home page
  <http://www.freenet.tlh.fl.us/~amstpi/mikmod.html>.



  22..22..44..  xxmmpp

  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 supportés, mais encore de façon expérimentale
  ou incomplète). Si vous possédez 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
  gérer les modules compressés.

  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/>.



  22..22..55..  ss33mmoodd

  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 défaut de 22 kHz. L'option -s passe en stéréo, -b
  en sortie 16 bits, et -f règle la fréquence d'échantillonage.
  Cependant, la sortie est plus mauvaise qu'avec tracker (bruit de
  fond), aussi je conseille d'utiliser plutôt tracker que s3mod pour
  lire des fichiers MOD ordinaires (à moins que votre machine manque de
  puissance). La consomation CPU est nettement inférieure à celle de
  tracker.

  Un copyright a été déposé 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 récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/s3mod-
  v1.09.tar.gz>.



  22..22..66..  mmoodd

  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 compressés si vous avez installé gzip,
  lharc, unzip et unarj. Il ne peut pas lire les modules compressés avec
  certains compositeurs Amiga (signature "PACK").

  Il nécessite 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 antérieure.
  L'interface en mode texte nécessite ncurses. Une interface X est
  également incluse, basée sur Tcl/Tk.

  Il a été écrit par Mikael Nordqvist (mech@df.lth.se ou
  d91mn@efd.lth.se).

  On peut le récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/mod-v0.81.tgz>.



  22..22..77..  nnssppmmoodd

  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 intègre 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 récuperer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/nspmod-0.1.tar.gz>.



  22..22..88..  yyaammppmmoodd

  Ce programe en version _a_l_p_h_a a été conçu pour lire des modules 4
  canaux en utilisant le minimum de ressources CPU. Il n'a _p_a_s été conçu
  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 récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/yampmod-0.1.tar.gz>.




  22..33..  FFlluuxx aauuddiioo MMPPEEGG

  MPEG est un standard spécifiant le codage vidéo ainsi que la piste
  audio associée pour un stockage digital.  MPEG est habituellement
  associé avec la vidéo, mais la partie audio du standart MPEG peut être
  utilisée seule. Elle définit trois couches (layer), couche I,II, et
  III. Les lecteurs pouvant décoder une couche élevée peuvent également
  décoder 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
  vidéo MPEG, c'est probablement un flux audio), la couche II a
  généralement l'extension .mp2, et la couche III l'extension .mp3. La
  compression audio est plutôt bonne. Un fichier audio MPEG de couche II
  faisant 2 Mégaoctets (Mo) prendra problablement 25 Mo pour un fichier
  d'échantillon brut PCM de la même qualité.



  22..33..11..  mmppgg112233

  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 réel 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 réserve
  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 récente sur la mpg123 homepage
  <http://mpg.123.org/>.



  22..33..22..  mmaappllaayy 11..22

  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 intolérable 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 stéréo par défaut.

  Un léger changement dans un des fichiers pourrait être nécessaire pour
  le compiler. A savoir, vous pourriez avoir besoin d'ajouter la ligne
  suivante au début du fichier configuration.sh.



       #! /bin/sh


  L'auteur est Tobias Bading (bading@cs.tu-berlin.de).

  On peut récupérer maplay 1.2 sur  <ftp://ftp.cs.tu-
  berlin.de/pub/misc/maplay1.2/maplay1_2.tar>.



  22..33..33..  mmaappllaayy 11..33bb

  C'est une modification non officielle (pas par l'auteur original) de
  maplay 1.2  qui peut être exécuté 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 défaut, 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 récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay-1.3b-
  Linux.tar.gz>.



  22..33..44..  mmaappllaayy33

  C'est un autre dérivé 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 régler le problème.

  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 entièrement sûr 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 dérivés d'avoir un copyright différent.

  On peut le récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay3.tar.gz>.



  22..33..55..  ssppllaayy

  Ce lecteur en version _b_e_t_a est un autre dérivé de maplay 1.2 (en fait
  de maplay 1.2+, qui est un dérivé 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 reçus à travers des connections HTTP.

  Une autre caractéristique de splay est qu'il peut être utilisé comme
  une bibliothèque (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 nécessairepour 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 après 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/>.



  22..33..66..  SSaajjbbeerr JJuukkeebbooxx

  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 réel sous connexion HTTP.
  Il est facilement configurable.

  Il utilise le toolkit QT (nécessite au moins la version 1.2).  Il
  utilise aussi la bibliothèque LinuxThreads (les exécutables inclus ne
  marchent qu'avec la version 0.5).

  L'auteur est Joel Lindholm (wizball@kewl.campus.luth.se).

  La dernière version peut être récupérée sur
  <ftp://kewl.campus.luth.se/pub/jukebox>.



  22..33..77..  aammpp

  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 près 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 récupérer sur
  <ftp://ftp.rasip.fer.hr/pub/mpeg/amp-0.7.3.tgz>.



  22..33..88..  XXAAuuddiioo

  Cette bibliothèque en version _a_l_p_h_a a été écrite pour être une
  implémentation rapide d'une bibliothèque de décodage pour des IHM
  variées. Il suporte les MPEG audio de couche I, II, et III. Il est
  capable d'effectuer des accès aléatoires 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 bibliothèque peut être récupérée librement. La bibliothèque
  elle-même demande une license pour être utilisée (une license pour la
  source et les exécutables est disponible).

  L'interface pour la bibliothèque peut être obtenue sur la XAudio home
  page <http://www.xaudio.com/>.



  22..33..99..  LLaayyeerr 33 SShhaarreewwaarree EEnnccooddeerr//DDeeccooddeerr

  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
  résoudre ce problème. 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 inquiéter 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 préalablement 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 stéréo de 44,1 kHz).



       $ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 -





  Le nombre après -r est la fréquence du flux audio, et le nombre après
  -c dépend de s'il est mono ou stéréo (ou même quadriphonique). Si ça
  vous semble trop compliqué, vous pouvez utiliser quelque chose comme
  un script shell ou un alias.

  C'est un shareware déposé par  Fraunhofer-IIS.  Une version de
  démonstration pour les systèmes Linux à base de x86 peut être récupéré
  sur <ftp://ftp.fhg.de/pub/layer3> La version de démonstration
  convertis seulement les flux audio MPEG de couche III.



  22..33..1100..  XX1111AAmmpp

  Ce logiciel en version _b_e_t_a est un lecteur de flux audio MPEG doté
  d'une interface graphique, similaire à celle utilisée 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 récupérer sur X11Amp's homepage <http://www.x11amp.bz.nu/>.
  Seuls les exécutables pour les systèmes Intel Linux et FreeBSD sont
  disponibles à cette adresse.




  22..44..  WWAAVV

  Tiré de la page man de sox :


       Ils (format WAV) apparaissent comme étant très similaires
       aux fichiers IFF, mais ce ne sont pas les mêmes. 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 présentés ici.



  22..44..11..  wwaavvppllaayy

  Ce programme supporte la lecture et l'enregistrement avec le format
  WAV. Il utilise un système de verrou, ainsi un seul son peut être lu à
  la fois. Ses capacités de verrou peuvent être utilisées indépendamment
  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 réecrit
  par Warren W. Gay (bx249@freenet.toronto.on.ca ou wwg@ica.net).

  On peut le récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/wavplay-1.0.tar.gz>.



  22..55..  AAuuttrreess

  Cette section présente les moyens disponibles pour lire les formats
  son qui ne méritent pas une section séparée (par exemple les formats
  qui n'ont qu'un lecteur disponible), ou les lecteurs qui lisent plus
  d'un format.



  22..55..11..  ssooxx

  Ce programme est en fait un convertisseur : il convertit un format son
  en un autre. Toutefois, des versions de sox, invoquées comme play,
  lisent les sons ( l'application play dans le Sound HOWTO détaille
  probablement cela). Il supporte les données 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 près 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 nécessaire, 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 récupérer 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 récente de Chris Bagwell (cbagwell@sprynet.com)
  (basée sur la dernière version gamma du sox original, et incluant les
  modifications ci-dessus) peut être récupérée sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-
  cb3.tar.gz>.



  22..55..22..  bbppllaayy

  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
  variétés de techniques pour obtenir le vitesse la plus élevée
  possible, permettant ainsi d'être exécuté de façon acceptable même sur
  des machines lentes. Une de ces techniques requiert que les programmes
  installés soient setuid root. Le barge espérant l'utiliser devrait
  employer le paquetage Debian de Ian Jackson (ijackson@gnu.org), qui
  permet d'ôter la caractéritique nécessitant le bit setuid.

  L'auteur est David Monro (davidm@gh.cs.usyd.edu.au).

  On peut le récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/bplay-0.96.tar.gz>.



  22..55..33..  SSIIDDPPLLAAYY

  Ce programme émule la puce Sound Interface Device (MOS 6581,
  communément appelée SID) et le Micro Processor Unit (MOS 6510) du
  Commodore 64. Il est ainsi possible de charger et d'exécuter des
  programmes en code machine C64 qui produisent de la musique ou du son.
  En général ce sont des fragments de code et de données qui sont tirés
  de jeux et de démos directement transférés du C64.

  Il utilise une interface en ligne de commande par défaut. Il existe
  aussi des interface en Tk ou QT disponible séparément 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/>.





  22..55..44..  RReeaallAAuuddiioo PPllaayyeerr

  Ce programme vous permet d'écouter des sons, qui sont stockés dans un
  format propriétaire, en temps réel à travers Internet sans rapatrier
  intégralement le fichier son préalablement. 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
  récupéré sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/traplayer-0.5.tar.gz>.

  Il a été réalisé par Progressive Networks, Inc. Il ne peut être
  redistribué, modifié, etc. Regardez la license pour les détails exacts
  sur ce que vous pouvez faire. Il peut être obtenu en s'enregistrant
  gratuitement sur la RealAudio home page <http://www.realaudio.com/>.



  22..55..55..  ccaatt

  On peut se demander ce que cat, l'utilitaire de concaténation 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 même 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 idée très approximative (si vous êtes
  chanceux).



  33..  AAuuttrreess uuttiilliittaaiirreess ssoonn pprraattiiqquueess


  Cette section ne concerne pas la lecture des fichiers son.  Cependant,
  il existe une collection d'utilitaires que vous pourriez trouver
  utiles.


  33..11..  vvoolluummee

  C'est une simple interface en ligne de commande pour contrôler le
  volume (qu'est ce que ça aurait pu être d'autre ?). Il a aussi un
  programme séparé, inclus dans le paquetage, ayant une interface en
  Tcl/Tk permettant de contrôler le volume, de lire les fichiers son
  .au.  Un lecteur très 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 récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/soundcard/volume-2.1.tar.gz>.



  33..22..  SSoouunndd SSttuuddiioo

  C'est une application en Tcl/Tk utilisant sox qui supporte la lecture,
  l'enregistrement, et l'édition de sons numériques. 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>.



  33..33..  TTiicckkllee MMuussiicc

  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 variés tant que le programme approprié pour les jouer est sur
  votre système. Par défaut 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 déposé par Shannon Hendrix (shendrix@pcs.cnu.edu ou
  shendrix@escape.widomaker.com).

  On peut le récupérer sur
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tmusic-1.0.tar.gz>.



  44..  RRééfféérreenncceess


  1. La documentation incluse avec les applications présentées dans ce
     document.

  2. Le Linux Sound HOWTO. On peut le trouver sur le Linux Documentation
     Project <http://sunsite.unc.edu/LDP/> ou en français
     <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 décrit l'approche de Linux à Tcl, un langage de script.
  C'est un langage interprété, facile à apprendre, qui utilise l'absence
  de typage pour permettre un niveau de programmation plus élevé et le
  développement rapide d'applications.  La boîte à outils Tk est un
  environnement de programmation pour créer des interfaces graphiques
  (Graphical User Interfaces, GUI) sous le système X-Window.  Leurs
  fonctionnalités incluent la possibilité d'extension et l'inclusion
  dans une autre application, le développement rapide et la facilité
  d'utilisation.  Conjointement, Tcl et Tk apportent de grands bénéfices
  à la fois au développeur et à l'utilisateur.  Les interfaces basées
  sur Tk ont tendance à être plus personnalisables et dynamiques que
  celles construites avec une boîte à outils reposant sur du C ou C++.
  Tk reproduit l'allure et les sensations de Motif. Un grand nombre
  d'applications intéressantes sous X sont entièrement implémentées en
  Tk, sans aucune nouvelle commande spécifique à l'application elle-
  même.
  ______________________________________________________________________

  Table des matières










































  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 révisions
     1.5 Retours et commentaires
     1.6 Crédits
     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 supportées

  4. Installation et prise en main de Tcl et Tk

     4.1 Télédéchargement 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 problèmes, bugs, ou améliorations

  5. Un tout petit peu de programmation

     5.1 Programme-minute en Tcl

  6. Langage de script : avantages et inconvénients

     6.1 Reproches les plus courants à propos de Tcl
        6.1.1 Tcl est interprété
        6.1.2 Plusieurs caractéristiques 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 interprété
        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 célèbres utilisant Tcl/Tk

  8. Références

     8.1 Livres
        8.1.1 The Tcl and Tk Toolkit
        8.1.2 Practical Programming in Tcl and Tk, deuxième é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
  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn


  Ceci est le Linux Tcl et Tk HOWTO. Il vise, en tant que référence pour
  Linux, à couvrir tout ce qu'il est nécessaire de connaître concernant
  l'installation, la configuration, ainsi qu'une introduction au
  développement sous Tcl et Tk.  Il présente d'abord un historique,
  puis aborde les avantages et inconvénients de Tcl et Tk sous linux, et
  enfin des références à d'autres sources d'information sur une large
  étendue de sujets liés à ce langage de script simple mais puissant.

  Si vous avez déjà 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.


  Après l'exécution de la première étape de la recompilation du noyau,
  un script appelé kconfig.tk est exécuté via wish (l'interpréteur Tcl).
  La fenêtre de configuration du noyau Linux apparaît. Au lieu de
  répondre à des questions en série, cet utilitaire de configuration
  basé sur X vous permet d'utiliser des cases à cocher pour sélectionner
  les options du noyau que vous souhaitez activer.

  Le système conserve les options de votre dernière configuration afin
  qu'à chaque nouvelle exécution vous n'ayiez à ajouter/supprimer
  quelques sélections 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 préférez. Après cette étape
  simplifiée, vous pouvez recompiler votre noyau, en suivant la manière
  traditionnelle.


  Il existe en fait un autre exemple bien connu. Avez-vous déjà 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 agréablement réussi
  à 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-même se charge de mettre en place les services en
  créant le répertoire 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 régler les marges), propose une aide en ligne et plein d'autres
  caractéristiques.


  Quelle est la différence avec une autre implémentation de service
  d'impression ?

  Tout est réalisé en utilisant Tcl/Tk comme une « colle » entre
  applications consolidées et en opérant avec les fichiers de
  configurations standards de Linux, dans un mode fenêtré, visuel et
  interactif, sous X-Window. Aucune nouvelle commande spécifique à
  l'application n'a été écrite.



  11..11..  BBuutt ddee ccee ddooccuummeenntt


  Actuellement, le but de ce document est de fournir des références de
  départ 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 référence pour le développement et la
  programmation en Tcl et Tk - c'est juste un point de départ pour les
  utilisateurs de Linux.

  La conception que l'auteur se fait d'un manuel de référence coïncide
  avec la définition 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 installés sur
  votre machine Linux. Vous pourrez accéder aux pages de manuel de
  Tcl/Tk par la commande man.

  Beaucoup de tutoriels de programmation complets et structurés ont été
  écrits dans le but de laisser l'utilisateur débutant trafiquer avec
  Tcl/Tk ; des tonnes d'autres données sont disponibles sur Internet.
  M'inspirant de la philosophie de Tcl/Tk, je ne vais pas réinventer la
  roue, mais essayer de cimenter cette énorme masse d'information déjà
  disponible.

  Je vous suggère de jeter un oeil aux autres documents cités dans ``la
  section Références'' pour savoir où trouver des informations
  spécifiques à propos de Tcl/Tk.


  11..22..  CCee qquu''iill ffaauutt ssaavvooiirr aavvaanntt ddee ppoouurrssuuiivvrree


  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 très simple.
  Basiquement, vous avez besoin de bien connaître :

  ·  des concepts simples de programmation ;

  ·  l'utilisation de commandes et d'utilitaires très usuels d'unix ;

  ·  l'accès à Internet ;

  ·  l'utilisation de ftp.



  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  Les versions plus récentes de ce document seront téléchargées 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 française :

  Archive des HOWTO français sur LIP6
  <ftp://ftp.lip6.fr/pub/linux/french/HOWTO/>

  Archive  des HOWTO français 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 récente en
  html et en sgml. La plupart des distributions de Linux sur CD-ROM
  incluent les HOWTOs, souvent dans un sous-répertoire de /usr/doc/ et
  vous pouvez également en acheter des copies imprimées chez certains
  distributeurs.

  Parfois, les HOWTOs disponibles sur les CD-ROMs, sites ftp ou en copie
  imprimée ne sont plus d'actualité. Si la date y figurant est dépassée
  de plus de 6 mois, il existe probablement une version plus récente sur
  Internet.

  Si vous faites une traduction de ce document dans une autre langue,
  envoyez-moi un mot et j'en inclurai une référence ici.


  11..44..  HHiissttoorriiqquuee ddeess rréévviissiioonnss


  ·  VVeerrssiioonn 00..11 : 28 Octobre 1998 - première version ;

  ·  VVeerrssiioonn 00..22 : 07 Novembre 1998 - profonds changements de style et
     rajeunissement.


  11..55..  RReettoouurrss eett ccoommmmeennttaaiirreess


  Je compte sur vous, lecteurs, pour rendre ce HOWTO utile. Si vous avez
  des suggestions, corrections ou commentaires, s'il vous plaît envoyez-
  les moi (Luca Rossetti <mailto:lukaros@tin.it>), et j'essaierai de les
  inclure dans la version suivante.

  Si des liens mentionnés dans ce document venaient à être indisponibles
  ou déplacés, merci de m'en informer tout de suite pour que je puisse
  mettre à jour ou changer le lien.

  J'ai la volonté de répondre aux questions d'ordre général à propos de
  Tcl/Tk et de Linux du mieux que je peux. Avant tout, lisez s'il vous
  plaît toutes les informations contenues dans ce HOWTO, et envoyez-moi
  un message détaillé sur le problème rencontré.

  Si vous publiez ce document sur un CD-ROM ou sous forme papier,
  j'apprécierais d'en avoir une copie. Envoyez-moi un e-mail et je vous
  donnerai mon adresse postale.

  Dans plusieurs sections je mentionne des sociétés de publication ou
  des URLs de sites commerciaux. Je ne travaille vraiment pas pour ces
  gens-là.


  11..66..  CCrrééddiittss



  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), spécialement Eugenia Franzoni et
  Giovanni Bortolozzo pour leurs commentaires.


  11..77..  PPoolliittiiqquuee ddee ddiiffffuussiioonn


  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 sûr il est considéré sans garantie ; sans même la garantie sous-
  jacente de commercialisabilité ou d'adéquation à 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 détails.


  22..  HHiissttooiirree ddee TTccll//TTkk


  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'implémenter à son retour à Berkeley au printemps
  1988 ; dès 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>.


  22..11..  CChhrroonnoollooggiiee


  ·  11998899 :: premières diffusions externes de Tcl et début de
     l'implémentation de Tk ;

  ·  11999911 :: première version de Tk ;

  ·  11999944 :: le Dr. Ousterhout est employé par Sun Microsystems, Inc. :
     il se distingue comme ingénieur et dirige le projet Tcl.

  ·  AAvvrriill//MMaaii 11999977 :: Le groupe de recherche responsable chez Sun du
     développement de Tcl est déplacé dans une filiale de Sun appelée
     SunScript. Cependant les choses ont changé à nouveau rapidement.
     Vous pouvez lire les détails de cette évolution en choisissant
     "SunScript_story" à l'URL : SunScript-Story
     <http://starbase.neosoft.com/%7Eclaird/comp.lang.tcl/> ;

  ·  AAooûûtt 11999977 :: 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/> ;

  ·  FFéévvrriieerr 11999988 :: le Dr. Ousterhout quitte Sun pour fonder Scriptics
     <http://www.scriptics.com/>, une entreprise dédiée 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. Après la prochaine version, il est prévu
     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.

  ·  2233 AAvvrriill 11999988 :: L'ACM <http://www.acm.org/> (Association for
     Computing Machinery) décerne le prix du logiciel 1997 (Software
     System Award) à John Ousterhout et Scriptics (
     <http://www.acm.org/awards/>). Cette récompense est attribuée à une
     institution ou une personne reconnue pour avoir développé un
     logiciel qui a eu une influence durable, remarquée par des
     contributions à des concepts ou par un plébiscite commercial, ou
     les deux.



  33..  QQuu''eesstt--ccee qquuee TTccll//TTkk ??


  33..11..  QQuu''eesstt--ccee qquuee TTccll ??

  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 bibliothèque.

  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 débogueurs et des interpréteurs shell. Il possède une
  syntaxe simple et il est lui-même programmable : les utilisateurs de
  Tcl peuvent en effet écrire des procédures pour créer des commandes
  plus puissantes que celles que fournies par l'ensemble pré-construit.

  D'autre part, Tcl est un paquetage bibliothèque intégrable dans des
  applications. La bibliothèque Tcl est constituée d'un analyseur
  syntaxique du langage Tcl, de routines implémentant les commandes
  pré-définies de Tcl, et de procédures permettant à chaque application
  d'ajouter à Tcl des commandes additionnelles qui lui sont spécifiques.
  Le programme applicatif génère des commandes Tcl et les passe à
  l'analyseur syntaxique de Tcl pour l'exécution.

  Les commandes peuvent être générées en lisant des caractères sur une
  source en entrée ou bien en associant des chaînes de caractères avec
  des éléments de l'interface utilisateur de l'application, comme des
  boutons, des entrées de menus, ou d'autres widgets (NdT : widget =
  Window Gadget, élément de fenêtre). Lorsque la bibliothèque Tcl reçoit
  une commande, elle analyse les champs qui la composent et exécute
  directement les commandes pré-définies.

  Pour les commandes implémentées par l'application, Tcl rappelle
  l'application pour exécuter les commandes. Dans bien des cas, les
  commandes lanceront des appels récursifs à l'interpréteur Tcl en
  passant des chaînes optionnelles à exécuter (en fait les procédures et
  commandes de bouclage conditionnel fonctionnent toutes de cette
  manière). 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 basée sur Tcl.

  ·  Tcl parvient à une bonne « programmabilité ». Tout ce qu'une
     application nécessite est l'implémentation de quelques commandes
     spécifiques de bas niveau. Tcl fournit de nombreuses commandes
     utilitaires et une interface générique de programmation pour
     construire des procédures de commande complexes. En utilisant Tcl,
     les applications ne nécessitent pas de réimplémentation de ces
     caractéristiques.

  ·  Les extensions à Tcl, telles que la boîte à outils Tk, fournissent
     des mécanismes 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 aisée la communication
     entre applications.

  Il est important de noter que Tcl a été conçu en pensant que le
  programmeur devrait en fait utiliser deux langages ou plus lorsqu'il
  construit un système logiciel de taille conséquente : un pour
  manipuler des structures de données internes complexes, et là où la
  performance est cruciale, et un autre, comme Tcl, pour écrire de très
  courts scripts qui assemblent les autres morceaux, en fournissant des
  possibilités 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 possibilités de structures de données complexes et
  d'algorithmes.

  Tcl a été construit pour être aisément inclus dans un langage de plus
  bas niveau lorsqu'on rencontre des tâches pour lesquelles un langage
  de plus bas niveau est plus adéquat. Ainsi, les fonctionnalités de
  base peuvent rester petites et chacun a seulement besoin d'ajouter les
  morceaux qu'il veut ou doit avoir.

  Une réponse à la question « Qu'est-ce que Tcl ? raquo; se trouve à
  <http://www.NeoSoft.com/tcl/whatistcl.html>.


  33..22..  QQuu''eesstt--ccee qquuee TTkk ??


  Tk (prononcer "Tiii-kay") est une extension de Tcl qui apporte au
  programmeur une interface avec le système de fenêtrage X11. Il est à
  noter que Tk a été compilé avec succès 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 fenêtrage simple qui permet à
  l'utilisateur d'écrire des applications Tcl/Tk dans un environnement
  de prototypage.

  Jusqu'à présent, Tcl/Tk ne supporte pas de fontes pour les langues
  japonaise, chinoise, coréenne,...


  33..33..  EExxtteennssiioonnss


  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 nécessitent bien évidemment un interpréteur Tcl étendu.
  De plus, de nombreuses applications Tcl libres nécessitent une
  extension particulière 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 complète des extensions de Tcl/Tk peut être trouvée à l'URL
  <http://www.scriptics.com/resource/software/extensions/>.


  33..44..  PPllaatteess--ffoorrmmeess ssuuppppoorrttééeess


  Cette section contient des informations à propos de Tcl 8.0 et Tk 8.0,
  versions les plus récentes de Tcl/Tk. Elles sont sorties le 18 août
  1998 et le patch le plus récent (8.0.3) date du 3 septembre 1998.

  Quand vous télédéchargez Tcl et Tk, vous récupérez deux programmes,
  wish et tclsh, les bibliothèques supportant les scripts, et la
  documentation en ligne.  Ces programmes supportent des plates-formes
  génériques de développement d'applications en Tcl. Wish inclut la
  boîte à outils pour interface graphique utilisateur Tk. Les paquetages
  sont prêts à être utilisés après l'installation.

  Tcl 8.0 et Tk 8.0 fonctionnent sur la plupart des versions des
  systèmes d'exploitation suivants :


  ·  Windows 95

  ·  Windows NT

  ·  Solaris et SunOS

  ·  Linux

  ·  HP-UX

  ·  SGI

  ·  IRIX

  ·  Digital Unix

  ·  AIX

  ·  SCO Unix

  ·  La plupart des autres systèmes d'exploitation voisins d'UNIX pour
     Macintosh (68K et Power Mac)

  ·  Des versions pré-compilées sont disponibles pour diverses
     distributions de Linux.



  44..  IInnssttaallllaattiioonn eett pprriissee eenn mmaaiinn ddee TTccll eett TTkk

  Les distributions récentes incluent Tcl et Tk. Des paquetages rpm et
  deb de binaires pré-compilés sont disponibles pour les distributions
  Red Hat, SuSE et Debian (ce qui facilite l'installation).

  Une installation standard d'une distribution récente inclura Tcl/Tk
  puisque c'est un prérequis de nombreux utilitaires de configuration
  qui tournent principalement sous X.

  Tcl et Tk sont distribués 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 complète).
  Encore plus de scripts et d'extensions Tcl/Tk sont disponibles
  librement également.


  44..11..  TTééllééddéécchhaarrggeemmeenntt ddeess ddiissttrriibbuuttiioonnss ddee bbaassee


  La base de Tcl/Tk se constitue des bibliothèques Tcl et Tk, plus les
  applications wish et tclsh, la documentation associée, des
  bibliothèques de scripts et des applications de démonstration. Le site
  FTP primaire pour ces données est  <ftp://ftp.scriptics.com/pub/tcl/>.

  Le site primaire en HTTP est
  <http://www.scriptics.com/software/download.html>.


  44..22..  IInnssttaallllaattiioonn


  A moins qu'elle ne soit déjà disponible en paquetages propriétaires
  pour votre distribution, vous souhaiterez télédécharger le version
  code source. Vous aurez besoin des sources de Tcl comme de Tk.  La
  procédure suivante se réfère à ce second cas :

  Choisissez entre le format tar et le format tar gzippé.

  Fichiers Tar compressés

  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 gzippés

  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 récupérez 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 généralement plus petits que les .Z).

  Pour décompresser la distribution, lancez des commandes shell comme
  celles-ci, selon la version que vous avez récupérée :


  ______________________________________________________________________
  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 crée un répertoire appelé tcl8.0.3, qui
  contient les sources pour toutes les plates-formes, la documentation,
  et les bibliothèques de script pour Tcl 8.0. Pour compiler et
  installer la distribution, suivez les instructions du fichier README
  dans le répertoire de la distribution. Assurez-vous de compiler Tcl
  avant Tk, puisque Tk dépend d'informations de Tcl.


  44..33..  LL''aarrcchhiivvee ddee ccoonnttrriibbuuttiioonnss


  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 données
  et d'accès réseau, un constructeur d'interfaces graphiques
  utilisateur, le programme expect, des widgets Tk supplémentaires, et
  des dizaines d'autres choses.

  Le site primaire pour l'archive Tcl/Tk est
  <ftp://ftp.neosoft.com/pub/tcl>.


  44..44..  SSiitteess mmiirrooiirrss


  Plusieurs autres sites dans le monde sont des miroirs de tout ou
  partie des données du site de base et de l'archive de contributions ;
  vous trouverez peut-être plus pratique de prendre des données 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.


  44..55..  QQuueelllleess vveerrssiioonnss uuttiilliisseerr ??


  Référez-vous toujours à la dernière version recommandée 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 recommandées sont les dernières
  (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 accélère
  l'exécution d'un facteur 2 à 10.  Il fournit aussi des contextes de
  dénomination (namespaces), des entrées/sorties binaires et plusieurs
  nouvelles caractéristiques.

  Tk 8.0 est la première 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 mécanisme de
  fonte portable. Tcl 8.0 et Tk 8.0 offrent tous deux des
  fonctionnalités supplémentaires au modèle de sécurité Safe-Tcl.


  44..66..  OOùù aaddrreesssseerr ddeess rraappppoorrttss ddee pprroobbllèèmmeess,, bbuuggss,, oouu aamméélliioorraattiioonnss


  Utilisez  <news:comp.lang.tcl> pour les communications publiques.

  (NdT : le forum en langue française équivalent est
  <news:fr.comp.lang.tcl>).

  Une alternative consiste à envoyer problèmes, suggestions, idées
  nouvelles, etc.  directement à l'auteur. Un email à John Ousterhout
  <mailto:ouster@scriptics.com> permet de le contacter.
  Lorsque vous rendez compte de problèmes ou de bugs, veillez à
  mentionner tous les détails nécessaires à un diagnostic correct.
  Basiquement, vous devez décrire votre matériel, votre système
  d'exploitation et la version de Tcl/Tk utilisée, préciser 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
  problème.

  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 thèse, un projet, ou même une annonce commerciale,
  faites-le savoir aux personnes susceptibles d'être intéressées.

  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 expérience.

  Pour poster sur le forum comp.lang.tcl.announce
  <news:comp.lang.tcl.announce>, envoyez un email détaillé à tcl-
  announce <mailto:tcl-announce@mitchell.org>. N'hésitez pas à renvoyer
  les gens vers votre propre site ftp ou WWW si vous en avez un.


  55..  UUnn ttoouutt ppeettiitt ppeeuu ddee pprrooggrraammmmaattiioonn


  Comme Tcl est un langage interprété, pour exécuter un programme Tcl
  (qu'on appelle également un script) vous passez normalement le fichier
  à l'interpréteur 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 interpréteur 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 créer 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'interpréteur wish.  Ce programme applicatif compilé est
  véritablement, du point de vue de Tcl, une nouvelle version de
  l'interpréteur wish, avec les nouvelles commandes en C liées dedans.
  Bien sûr, le programme peut être bien plus qu'un simple interpréteur
  Tcl. (Note : vous pouvez aussi utiliser la capacité de chargement
  automatique de Tcl sur les systèmes qui la supportent).

  55..11..  PPrrooggrraammmmee--mmiinnuuttee eenn TTccll


  Tcl a une structure simple. Chaque ligne commence par une nouvelle
  commande, par exemple button et un certain nombre d'arguments. Chaque
  commande est implémentée comme si c'était une fonction C, qui prend en
  charge tous les arguments.
  Voici un exemple très bateau, le célèbre 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 manière
  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
  précédent, 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'accès).

  Rendez le fichier Hello exécutable, par un :

  ______________________________________________________________________
  chmod 775 Hello
  ______________________________________________________________________



  et lancez-le sous X.

  Vous allez voir un bouton marqué Hello World dans une fenêtre :
  cliquer dessus ferme la fenêtre.

  66..  LLaannggaaggee ddee ssccrriipptt :: aavvaannttaaggeess eett iinnccoonnvvéénniieennttss


  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 système (dans
  des langages comme le C et le Java).

  Pour une lecture à propos des comparaisons, voyez ``the comparison
  discussion''.

  Voici un résumé des principaux avantages et inconvénients de Tcl/Tk.

  66..11..  RReepprroocchheess lleess pplluuss ccoouurraannttss àà pprrooppooss ddee TTccll


  66..11..11..  TTccll eesstt iinntteerrpprrééttéé


  Les données sont traitées de manière primaire comme des chaînes de
  caractère, les programmes écrits en Tcl sont lents.  Tcl 8.0 essaie de
  pallier ceci en compilant à un certain degré ainsi qu'en autorisant
  différents types de variables.

  66..11..22..  PPlluussiieeuurrss ccaarraaccttéérriissttiiqquueess nnee ssoonntt ppaass iinnttuuiittiivveess


  Les commentaires sont des commandes plutôt que de vrais commentaires,
  les nombres commençant par 0 sont en octal, l'utilisation correcte des
  guillemets, etc.  Ces aspects sont abordés dans les diverses FAQs.

  66..22..  PPrriinncciippaauuxx aavvaannttaaggeess ddee TTccll


  66..22..11..  CC''eesstt uunn llaannggaaggee ddee ssccrriipptt ddee hhaauutt nniivveeaauu


  Vous avez besoin de beaucoup moins de code pour faire le travail,
  surtout en comparaison avec des applications Motif ou Win32. En
  général, le nombre de lignes de code (Line Of Code, LOC) d'un projet
  logiciel est l'indice de complexité le plus important.


  66..22..22..  TTccll eesstt lliibbrree


  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 coût réduit.

  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> .

  66..22..33..  IIll ffoonnccttiioonnnnee ssuurr ddee nnoommbbrreeuusseess ppllaatteess--ffoorrmmeess


  Il existe des versions pour UNIX (Linux... bien sûr), Windows et
  Macintosh. Exceptées quelques différences entre plates-formes, vos
  scripts Tcl fonctionneront de la même manière sur tous les systèmes.

  66..22..44..  IIll eesstt iinntteerrpprrééttéé


  Vous pouvez exécuter directement votre code sans compilation ni
  édition de liens (même si quelques compilateurs de Tcl sont
  disponibles).

  66..22..55..  IIll eesstt eexxtteennssiibbllee


  Il est aisé d'ajouter vos propres commandes pour étendre le langage
  Tcl. Vous pouvez les écrire en C ou en Tcl.

  66..22..66..  IIll eesstt eennccaappssuullaabbllee ddaannss vvooss aapppplliiccaattiioonnss


  L'interpréteur 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.



  66..22..77..  TTccll//TTkk eesstt ccoommppaattiibbllee AAnn 22000000


  Lisez ce que le créateur de la base Tcl et Tk dit à ce sujet :
  www.scriptics.com/Y2K.html <http://www.scriptics.com/Y2K.html> .


  77..  PPrrooggrraammmmeess lleess pplluuss ccééllèèbbrreess uuttiilliissaanntt TTccll//TTkk


  A part les deux implémentations décrites dans ``l'Introduction'', de
  nombreuses applications sont écrites en Tcl/Tk ou une combinaison de
  Tcl et de C. Une liste complète de ces implémentations figure à la
  partie 4 <http://www.tclfaq.wservice.com/tcl-faq/part4.html> de la
  Foire Aux Questions sur Tcl/Tk (FAQ). Je vous suggère de visiter
  Scriptics' Software Central
  <http://www.scriptics.com/resource/software/>.

  Un autre bon point de départ 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 fenêtres et un lanceur d'applications qui fonctionne
  très bien.

  Si vous êtes développeur en Tcl/Tk, n'hésitez pas à m'envoyer
  <mailto:lukaros@tin.it> une URL (et une description de votre travail)
  que je puisse ajouter ici.



  88..  RRééfféérreenncceess


  Pour de nombreuses raisons, les gens préfèrent souvent avoir un manuel
  papier comme référence ou aiment être aidés en ligne par d'autres
  personnes connectées.

  Vous pouvez trouver dans cette section une sélection de livres de
  référence, de tutoriels, de sites www et forums Usenet.

  88..11..  LLiivvrreess


  Beaucoup de livres concernant Tcl/Tk ont été écrits et vont être
  publiés.  Je ne vais pas essayer de tous les répertorier (uunn aauuttrree
  hhoowwttoo nn''yy ssuuffffiirraaiitt ppaass :) ). Vous trouverez davantage d'informations
  et des notes complémentaires à :

  ·  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 résumer 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é.





  88..11..11..  TThhee TTccll aanndd TTkk TToooollkkiitt


  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>

  Compléments au livre : <http://www.scriptics.com/doc/tk4.0.ps>

  Cet ouvrage couvre à l'origine Tcl 7.3 et Tk 3.6.


  88..11..22..  PPrraaccttiiccaall PPrrooggrraammmmiinngg iinn TTccll aanndd TTkk,, ddeeuuxxiièèmmee ééddiittiioonn

  Auteur : Brent Welch <mailto:welch@acm.org>

  Information sur le WWW à propos de l'ouvrage :
  <http://www.beedub.com/book/>

  Table des matières : <http://www.beedub.com/book/>

  Publicité du livre à la section_50000.html de l'URL
  <http://www.borders.com/sections/>

  Cette édition révisée décrit Tcl/Tk 8.0 tel qu'il était dans sa
  période beta.  Les ajouts par rapport à la première édition concernent
  les sockets, les paquetages, les contextes (namespaces), et une longue
  section décrivant les changements dans Tcl 7.4, 7.5, 7.6 et 8.0 (et Tk
  également), Safe Tk, et le Plugin.


  88..11..33..  TTccll aanndd TTkk RReeffeerreennccee MMaannuuaall


  Editeurs : Marc Ewing <mailto:marc@redhat.com>, Erik Troan

  Information sur le WWW à propos de l'ouvrage :
  <http://www.lsl.com/catalog/books/tcltk/>


  88..11..44..  TThhee VViissuuaall TTCCLL HHaannddbbooookk,, 11//ee


  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 mène le lecteur des concepts
  de base du développement d'interfaces graphiques utilisateur jusqu'à
  des développements 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 basée sur Motif,
  incompatible avec Tk. L'intégralité du langage TCL est documentée dans
  une section Commands séparée. Il inclut un CD-ROM avec les versions
  SGI, Solaris, HP-UX, AIX et Unixware de Visual Tcl.


  88..11..55..  RRuunnnniinngg LLiinnuuxx



  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 française de cet ouvrage est intitulée "Le Système
  Linux", aux éditions O'Reilly. Cette adaptation française de René
  Cougnenc a été révisée, pour la deuxième édition, par Manuel et Nat
  Makarévitch. Voir <http://www.editions-oreilly.fr/sysad/runux2.html>.

  La 3ème édition originale doit sortir en août 1999. Voir
  <http://www.ora.com/catalog/runux3/noframes.html>. Il faudra attendre
  un peu pour la version française).

  C'est un livre de base vraiment bien écrit. Il contient un chapitre
  sur la programmation en Tcl/Tk (ainsi que Perl, C, C++).


  88..11..66..  TTccll//TTkk ffoorr DDuummmmiieess ((PPoouurr lleess NNuullss))


  Auteur : Timothy Webster, with Alex Francis

  Information sur le WWW à propos de l'ouvrage :
  <http://www.dummies.com/>

  Un autre livre dans la série des livres de programmation. Celui-ci se
  concentre sur le plugin Tcl comme environnement de programmation.


  88..11..77..  IInntteerraaccttiivvee WWeebb AApppplliiccaattiioonnss WWiitthh TTccll//TTkk


  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 développement
  d'applets comme applications autonomes et des applications serveurs
  simples. Il est fourni avec la boîte à outils Spynergy, qui ajoute
  diverses procédures en pur Tcl/Tk pour le traitement distribué, la
  récupération d'URL, la génération de HTML, la gestion de bases de
  données 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 démonstration des fonctionnalités 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.



  88..22..  MMaannuueellss eenn lliiggnnee eett ttuuttoorriieellss


  ·  John Ousterhout a écrit un guide dans un style ingénierie, qui
     décrit 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 développeurs 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
     récupéré à
     <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>.

  ·  Même si vous devriez avoir les pages de manuel de Tcl/Tk sur votre
     système, 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 débuter.



  88..33..  SSiitteess WWoorrlldd WWiiddee WWeebb


  Il existe de nombreuses ressources WWW qui offrent des informations
  complémentaires sur beaucoup d'aspects de Tcl et de ses extensions.

  ·  Référez-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,
     Entraînement et Evénements).

  ·  Jetez un oeil à Tcl-Consortium <http://www.tclconsortium.org/> :
     une organisation à but non-lucratif pour promouvoir Tcl/Tk et
     soutenir la communauté des développeurs.

  ·  Allez naviguer à l'Archive Officielle des Sources des Contributions
     <http://www.NeoSoft.com/tcl/> pour le Tool Command Language (TCL)
     et la boîte à outils Tk, hébergée 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 systèmes similaires. La plupart d'entre elles sont tirées
     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).



  88..44..  AAuuttrreess ddooccuummeennttss && FFooiirreess AAuuxx QQuueessttiioonnss


  Beaucoup de matière est disponible sur l'Internet : papiers
  introductifs, papiers blancs, tutoriels, transparents, versions
  PostScript de brouillons d'ouvrages publiés, et bien d'autres choses.

  Pour une référence complète, veuillez s'il vous plaît jeter un oeil à
  l'excellente FAQ Tcl <http://www.tclfaq.wservice.com/tcl-faq/> .

  88..55..  FFoorruumm UUsseenneett


  comp.lang.tcl <news:comp.lang.tcl> est un groupe de discussion non
  modéré, créé pour les échanges sur le langage de programmation Tcl et
  les outils qui utilisent Tcl sous une forme quelconque, tels que la
  boîte à outils Tk pour le système X Window, le Tcl étendu, et expect.

  (NdT : le forum équivalent dans la hiérarchie 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 précise à nouveau que la FAQ se trouve à FAQ Tcl
  <http://www.tclfaq.wservice.com/tcl-faq/>.

  99..  TTeerrmmeess ddee llaa lliicceennccee ddee TTccll//TTkk


  Les termes suivants s'appliquent à toutes les versions diffusées 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 présente 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 Régents de l'Université de
  Californie, Sun Microsystems, Inc., Scriptics Corporation, et autres
  parties. Les termes suivants s'appliquent à tous les fichiers associés
  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 conservées dans toutes les copies et que la présente
  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 placées sous copyright
  par leurs auteurs et ne nécessitent pas de suivre les termes de la
  licence décrits ici, pour autant que les nouveaux termes soient
  clairement indiqués sur la première page de chaque fichier sur lequel
  ils s'appliquent.

  EENN AAUUCCUUNN CCAASS LLEESS AAUUTTEEUURRSS OOUU DDIISSTTRRIIBBUUTTEEUURRSS NNEE PPOOUURRRROONNTT EETTRREE TTEENNUUSS PPOOUURR
  RREESSPPOONNSSAABBLLEESS DDEE DDOOMMMMAAGGEESS DDIIRREECCTTSS,, IINNDDIIRREECCTTSS,, PPAARRTTIICCUULLIIEERRSS,, AACCCCIIDDEENNTTEELLSS
  OOUU CCOOLLLLAATTEERRAAUUXX PPRROOVVOOQQUUEESS PPAARR LL''UUTTIILLIISSAATTIIOONN DDEE CCEE LLOOGGIICCIIEELL,, DDEE SSAA
  DDOOCCUUMMEENNTTAATTIIOONN,, OOUU QQUUEELLCCOONNQQUUEESS CCOONNSSEEQQUUEENNCCEESS DDEE CCEECCII,, MMEEMMEE SSII LLEESS
  AAUUTTEEUURRSS OONNTT EETTEE AAVVEERRTTIISS DDEE LLAA PPOOSSSSIIBBIILLIITTEE DDEE CCEESS DDOOMMMMAAGGEESS..

  LLEESS AAUUTTEEUURRSS EETT DDIISSTTRRIIBBUUTTEEUURRSS SSEE DDEEGGAAGGEENNTT PPRREECCIISSEEMMEENNTT DDEE TTOOUUTTEESS
  GGAARRAANNTTIIEESS,, IINNCCLLUUAANNTT,, MMAAIISS PPAASS EEXXCCLLUUSSIIVVEEMMEENNTT,, LLAA GGAARRAANNTTIIEE IIMMPPLLIICCIITTEE DDEE
  CCOOMMMMEERRCCIIAALLIISSAABBIILLIITTEE,, LL''AADDEEQQUUAATTIIOONN AA UUNN BBUUTT PPAARRTTIICCUULLIIEERR,, EETT LLAA NNOONN--
  CCOONNTTRREEFFAACCOONN.. CCEE LLOOGGIICCIIEELL EESSTT FFOOUURRNNII «« TTEELL QQUUEELL »»,, LLEESS AAUUTTEEUURRSS EETT
  DDIISSTTRRIIBBUUTTEEUURRSS NN''OONNTT AAUUCCUUNNEE OOBBLLIIGGAATTIIOONN DDEE MMAAIINNTTEENNAANNCCEE,, SSUUPPPPOORRTT,, MMIISSEE AA
  JJOOUURR,, EEXXTTEENNSSIIOONNSS,, OOUU MMOODDIIFFIICCAATTIIOONNSS..

  UTILISATION GOUVERNEMENTALE : Si vous acquérez ce logiciel pour le
  compte du gouvernement américain, le gouvernement n'aura que des
  droits restreints sur le logiciel et la documentation associée, tel
  qu'il est défini dans les lois fédérales sur l'acquisition (Federal
  Acquisition Regulations - FARs) à la clause 52.227.19 (c) (2). Si vous
  acquérez ce logiciel pour le compte du ministère de la défense
  (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 défini dans la clause 252.227-7013
  (c) (1) des DFARs. Nonobstant ce qui précède, les auteurs accordent au
  gouvernement américain et aux personnes agissant en son nom la
  permission d'utiliser et de distribuer le logiciel selon les termes
  spécifiés dans la présente 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 implémentation 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 propriété (copyright (C) 1997, 1998) de Robert A. Kies­
  ling. Les termes exacts couvrant sa reproduction sont donnés dans
  l'introduction et les annexes. Les marques déposées appartiennent à
  leurs propriétaires 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 française : Mark Hoebeke mh@jouy.inra.fr.
  ______________________________________________________________________

  Table des matières
















































  1. Introduction

     1.1 Droits de reproduction
     1.2 Logiciels décrits 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 Tolérances.  (C'est quoi ces rectangles noirs à la fin de chaque ligne ?)
     3.4 Mise en page
     3.5 Numéros de page, en-têtes et pieds de page
     3.6 Titres et macros

  4. Commandes LaTeX

     4.1 Structure des documents
     4.2 Caractères 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 éléments graphiques avec

     6.1 Et si mon imprimante n'est pas supportée ?

  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 complète
     9.2 Configuration d'un système élémentaire
     9.3 Installation de la distribution source CTAN
     9.4 Détails de configuration après 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


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn





  11..11..  DDrrooiittss ddee rreepprroodduuccttiioonn

  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 préservées sur toutes les
  copies.

  Il est permis de copier et de distribuer des versions modifiées de ce
  manuel sous les mêmes conditions que les copies conformes, sous
  réserve que les sections intitulées _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
  réserve que l'intégralité du travail dérivé résultant 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 mentionnées ci-
  dessus pour les versions modifiées. À ceci près que les sections
  intitulées _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 approuvée 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.


  11..22..  LLooggiicciieellss ddééccrriittss ddaannss ccee ddooccuummeenntt

  TeX ne s'occupe que de la partie mise en forme dans la préparation 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
  préparez un fichier d'entrée avec un éditeur de textes -- ce qui est
  du « traitement de texte » dans la tête de la plupart des gens -- et
  formatez le document d'entrée avec TeX pour produire un fichier de
  sortie indépendant de tout périphérique, 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-même n'émet que des requêtes pour les polices de
  caractères. C'est la tâche 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 supplémentaire peut sembler inutilement
  compliquée, mais cette abstraction permet aux documents d'avoir une
  apparence identique sur différents périphériques sans aucun changement
  (ou presque) du document d'origine.


  11..22..11..  tteeTTeeXX

  Il existe une implémentation de TeX pour tout système informatique
  sérieux au monde -- et même pour un tas de systèmes « non sérieux »--,
  les implémenteurs 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é inhérente à toute installation de TeX. Ceci
  explique également que l'installation du système par vous-même est une
  tâche non négligeable, et, à moins d'être déjà familier avec TeX, il
  est facile de se perdre dans le nombre de programmes exécutables, de
  fichiers TeX, de documentations et de polices.

  Heureusement, teTeX est intégré à 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 déjà installé sur votre système. Si c'est le cas, vous pouvez
  passer directement à la section ``Utilisation de teTeX''.

  Toutefois, si vous voulez installer le paquetage, les archives
  nécessaires à une installation utilisable de teTeX sont sur le réseau
  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 (réseau abordable
  d'archives TeX), une série 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'accès tel que ~CTAN/contrib/pstricks, signifie « allez voir dans le
  répertoire contrib/pstricks du site CTAN le plus proche ».

  L'installation de la distribution générique de teTeX, décrite 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
  matériels ne devrait nécessiter que la substitution appropriée de
  l'archive des programmes exécutables au cours du processus
  d'installation.

  En plus des programmes exécutables, 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 dépassant les
  4 Mo. La documentation couvre tout ce dont vous aurez a priori besoin
  pour démarrer. Vous devriez donc installer tous ces documents. Non
  seulement serez-vous amené à tous les lire, mais les documents par
  eux-mêmes 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 prédéfinis 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
  différence entre les deux langages est comme la différence 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 confrérie, 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 première syllabe de « Texas. » Le _c_h_i n'a pas
  d'équivalent en français, mais « TeX » se prononce généralement de
  façon à 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 référence pour TeX. Pour écrire le mot
  « TeX » sur des périphériques à base de caractères, pensez à utiliser
  la casse standard, ou la macro \TeX{} lors de la composition.


  11..22..22..  ÉÉddiitteeuurrss ddee tteexxtteess

  N'importe lequel des éditeurs qui marchent sous Linux -- jed, joe,
  jove, vi, vim, stevie, Emacs et micro-Emacs -- peut servir à préparer
  un fichier d'entrée pour TeX, sous réserve qu'il puisse lire et écrire
  des fichiers en ASCII pur. Mon préféré est GNU Emacs. Cela pour
  plusieurs raisons :

  ·  Vous pouvez formater, prévisualiser et imprimer des documents avec
     les modes TeX et LaTeX d'Emacs.

  ·  Emacs peut insérer automatiquement des « guillemets arrondis » à la
     TeX, lors de la saisie, au lieu de ceux de l'espèce des "ASCII-pur-
     beurre."

  ·  Emacs intègre le support pour _t_e_x_i_n_f_o, un système de documentation
     hypertextuel.

  ·  Emacs bénéficie d'un support très répandu. Les versions 19.34 et
     postérieures, par exemple, sont intégrées dans les principales
     distributions Linux aux États-Unis. La version la plus récente dans
     les archives GNU est la 20.3.

  ·  Emacs peut tout faire, sauf beurrer la tartine du matin.

  ·  Emacs est libre et gratuit.


  11..22..33..  ddvviippss

  Le programme dvips de Tomas Rokicki produit du Postscript à partir
  d'un fichier .dvi. De plus, en cas de besoin, il lance Metafont pour
  générer les polices nécessaires sous forme de _b_i_t_m_a_p (-- NdT. :
  polices où chaque symbole est représenté par une matrice de points
  « allumés » 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
  complètement dans la section ``Combiner textes et éléments graphiques
  avec dvips''.


  11..22..44..  PPoolliicceess

  Une grande partie de la complexité de TeX, et par conséquent de LaTeX,
  provient de son implémentation de divers systèmes de polices, et de la
  façon dont ces polices sont spécifiées. Une amélioration majeure de
  LaTeX 2e par rapport à son prédécesseur était dans la manière dont les
  utilisateurs spécifiaient 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 schéma de sélection 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é-chargées, ce qui est suffisant pour démarrer. Les descriptions des
  métriques des polices sont également fournies dans les fichiers .tfm
  (_T_e_X _f_o_n_t _m_e_t_r_i_c). Pour générer 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 généreront les polices Computer Modern nécessaires.


  22..  UUttiilliissaattiioonn ddee tteeTTeeXX

  En théorie tout du moins, tout est installé correctement et prêt à
  fonctionner. teTeX est un paquetage logiciel très vaste. Comme pour
  tout paquetage complexe, vous voudrez commencer par apprendre teTeX en
  douceur, au lieu d'être submergé par sa complexité.

  Dans le même temps, nous voulons que le logiciel fasse quelque chose
  d'utile. Donc, au lieu de regarder TeX composer

  ``Hello, World !''


  comme le suggère le professeur Knuth, nous allons produire quelques
  unes des documentations de teTeX pour le mettre à l'épreuve.
  22..11..  IImmpprriimmeerr llaa ddooccuummeennttaattiioonn

  Vous devriez être connecté en tant que root les premières fois que
  vous utilisez teTeX. Si vous ne l'êtes pas, Metafont peut être dans
  l'incapacité de créer les répertoires indispensables pour ses polices.
  Le programme texconfig inclut une option pour rendre les répertoires
  de polices accessibles en écriture à tout un chacun, mais si vous
  travaillez sur un système multi-utilisateurs, des considérations de
  sécurité peuvent rendre cette option inapplicable ou indésirable.

  Dans chacun de ces cas, si vous ne disposez pas des droits appropriés
  pour créer ou écrire dans les répertoires où sont logés les polices,
  Metafont se plaindra bruyamment parce qu'il ne peut créer les
  répertoires. Vous ne verrez aucune sortie parce que vous aurez un tas
  de symboles de polices de longueur nulle. Cela n'est pas un problème.
  Déconnectez-vous simplement, reconnectez-vous sous root, et répétez
  l'opération qui a  échoué.

  Le côté agréable de teTeX, c'est que si vous vous plantez, il n'y a
  pas vraiment de dégâts. Ce n'est pas comme un compilateur, où, par
  exemple, vous bousillerez la partition racine si un pointeur se met à
  délirer. Comment, vous n'avez pas encore lu le manuel de teTeX ? Bien
  sûr que non. Il est encore dans la distribution sous forme de code
  source, prêt à être sorti.

  Donc, sans plus attendre, il vous plairait de lire le manuel teTeX. Il
  se trouve dans le répertoire

  /usr/lib/teTeX/texmf/doc/tetex.



  Le source LaTeX pour le manuel s'appelle TETEXDOC.tex. (L'extension
  .tex est utilisée aussi bien pour les fichiers TeX que LaTeX. Certains
  éditeurs, comme Emacs, ne savent pas faire la différence.) Un fichier
  TETEXDOC.dvi est également inclus dans la distribution, fichier que
  vous voudrez garder en lieu sûr -- disons, dans un autre répertoire --
  au cas où vous voudriez tester vos pilotes .dvi plus tard. Un fois
  cela réglé, 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 matières d'un
  document en « LaTeXant » le document deux fois. Donc, refaites la com­
  mande. Les autres avertissements peuvent être ignorés sans danger. Il
  vous informent seulement que certains des chemins FTP mentionnés dans
  la documentation sont trop longs pour l'espace qui leur est alloué.
  Les sections ``Styles et dimensions des paragraphes'' et
  ``Tolérances'' décrivent l'espacement horizontal en plus détaillé.

  teTeX aura généré plusieurs fichiers à partir de TETEXDOC.tex. Celui
  qui nous intéresse est TETEXDOC.dvi. C'est le fichier de sortie
  indépendant de tout périphérique que vous pouvez envoyer aussi bien
  sur l'écran que sur l'imprimante. Si vous faites marcher teTeX sous le
  système X Window, vous pouvez prévisualiser 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 déchargées 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 fonctionnalités
  relatives aux périphériques qu'ils gèrent. dvilj2 essaie de répondre
  aux requêtes de polices faites dans le document LaTeX d'origine, avec
  leurs équivalents les plus proches présents sur le système. Dans le
  cas d'un document purement textuel comme TETEXDOC.tex, la difficulté
  n'est pas bien grande. Toutes les polices demandées par TETEXDOC.tex
  seront générées par metafont, qui est invoqué automatiquement par
  dvilj2, si les polices ne sont pas déjà présentes. (Si c'est la
  première fois que vous lancez dvilj2, il se peut que le programme
  doive générer toutes les polices.) Il existe plusieurs options pour
  contrôler la manière dont les polices sont générées par dvilj2. Elles
  sont exposées 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­
  liothèque de recherche de chemins kpathsea -- dont la discussion
  dépasse le cadre de ce document -- et, pour l'instant vous n'avez pas
  à travailler davantage avec metafont -- tous les sources metafont pour
  la bibliothèque 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 système 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 connectée au port parallèle de l'ordinateur. Néanmoins,
  ne pas posséder d'imprimante Postscript ne constitue pas une barrière
  à l'impression de textes et de graphiques à partir de vos documents
  textuels. Ghostscript est disponible dans la plupart des distributions
  Linux, et peut même être déjà installé sur votre système.


  33..  CCoommmmaannddeess TTeeXX

  Préparer 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 résultat sera un fichier dont le nom possède la même 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 spéciaux, comme le dollar, enlevez-leur leur caractère parti­
  culier en les faisant précéder par la barre de fraction inversée
  (_b_a_c_k_s_l_a_s_h), \, et lancez TeX une deuxième fois sur votre fichier.
  Vous devez pouvoir traiter le fichier résultat avec le traducteur de
  .dvi de votre choix (cf. ci-dessus) pour obtenir une sortie imprimée.
  Une particularité des entrées pour TeX est que vous devez utiliser des
  guillemets ouvrants et fermants, qui figurent dans le fichier d'entrée
  sous forme d'accents graves et d'apostrophes. Le mode TeX d'Emacs le
  fera pour vous automatiquement (-- NdT. : en français, les guillemets
  s'écrivent « et ». Si votre clavier en dispose vous pouvez les saisir
  tels quels, sinon, ils peuvent être composés en doublant les symboles
  < et >.--) .

  "Voici des guillemets de type ASCII"
  ``Voici des guillemets `à la TeX'.''




  33..11..  SSuurrvvooll ddeess ccoommmmaannddeess

  En TeX, les commandes commencent par une barre de fraction inversée
  (« \ »). Par exemple, la commande pour changer l'interligne est

  \baselineskip=24pt



  La ligne de base est la limite inférieure des symboles sur une ligne,
  sans compter les jambages inférieurs. La distance entre les lignes de
  base de deux lignes consécutives est le \baselineskip, auquel est
  affecté une valeur de 24 points.

  En TeX, les mesures ou les dimensions sont souvent données dans les
  unités 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 insère 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-têtes et d'autres éléments
  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 caractères. Si TeX est incapable de remplir une ligne en
  respectant ses tolérances, il produit un message d'avertissement, et
  ajuste l'espacement horizontal au sein de la ligne du mieux qu'il
  peut. Les tolérances de formatage sont exposées dans la section
  ``Tolérances''.  /export/home/mh/Docs/HOWTOS/TeTeX-HOWTO/ Il existe
  beaucoup d'autres commandes qui spécifient les dimensions et les
  tolérances horizontales et verticales, et les plus répandues sont
  décrites plus loin.


  33..22..  CCoommmmaannddeess ddee ppoolliicceess

  En TeX, la police par défaut est la Computer Modern Roman en 10 pt.
  Pour préciser 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 spécifier une police pour votre document, utilisez la commande
  \font.

  \font\romantwelve=cmr12


  Cela crée la commande de police \romantwelve, qui, lorsqu'elle est
  utilisée 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 variés. L'agrandissement des polices est exponentiel, et est
  défini par la commande scaled \magstep, placée après la spécification
  de la police.

  \font\sfmedium=cmss12 scaled \magstep 1


  Cette commande vous donnera une police sans sérif d'une taille de
  120 pourcent celle de la police sans sérif Computer Modern Roman de
  12 points. Les agrandissements de polices peuvent aller de 0 à 5.
  Chaque échelle donne un agrandissement de 120 pourcent.
  33..33..  SSttyylleess eett ddiimmeennssiioonnss ddeess ppaarraaggrraapphheess

  Comme mentionné ci-dessus, TeX compose le texte en Computer Modern
  roman 10 points par défaut. La largeur d'une ligne est donnée par
  \hsize, qui s'élève à 6,5 in. par défaut. 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 spécifiée dans sa définition. En
  relation étroite avec une dimension, il existe un pas (_s_k_i_p), qui est
  une dimension placée dans l'un des registres internes de TeX. Les pas
  sont définis avec la commande \newskip. La dimension \smallskip, telle
  que définie 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 contrôlent la mise en
  page. Elles sont résumées 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 justifiée à 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'intégralité de la ligne.

  \line{Ce texte sera espace pour remplir toute la ligne.}



  La commande \hfil ajoute de l'espace là où elle apparaît 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 centrée, 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 spécifie la quantité dont la première ligne de
  chaque paragraphe sera indentée.

  \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 rétrécit les marges des paragraphes avec la valeur
  de \parindent.

  Comme mentionné dans la section précédente, \baselineskip spécifie la
  distance entre les lignes. Sa valeur par défaut est de 12 pt. Pour
  obtenir une approximation d'un double interlignage, utilisez la
  commande suivante :

  \baselineskip=\baselineskip*1.6



  La commande \parskip spécifie une distance qui s'ajoute à
  \baselineskip entre deux paragraphes. Aucun espace supplémentaire
  n'est ajouté par défaut, mais la distance entre paragraphes peut
  s'étirer jusqu'à 1 pt. pour remplir la page correctement. Pour insérer
  une ligne blanche entre les paragraphes, utilisez cette commande :

  \parskip=\baselineskip




  33..33..11..  cchhaaqquuee lliiggnnee ??))  TToolléérraanncceess..  ((CC''eesstt qquuooii cceess rreeccttaanngglleess nnooiirrss
  àà llaa ffiinn ddee

  Normalement, TeX compose le texte dans le strict respect des
  tolérances. Si, pour une raison quelconque, le texte ne peut être
  composé en respectant ces tolérances, 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 débordement (_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 formatée
  avec les contraintes imposées par le paramètre \hbadness.

  L'ajustement du texte à l'intérieur de ses dimensions imposées 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
  ajustée. La valeur par défaut de \hbadness est 1000. Si vous mettez
  \hbadness à 10000, TeX ne réclamera plus à propos des lignes pas assez
  remplies.

  TeX autorise quelquefois une ligne à déborder dans la marge droite. Il
  s'agit d'une décision esthétique de la part de l'auteur de TeX. La
  quantité autorisée pour ce débordement est déterminée par le paramètre
  \hfuzz, dont la valeur par défaut est de 0,1 pt. Si le texte ne peut
  s'adapter à la ligne, le paramètre de \tolerance détermine la façon
  dont TeX va gérer le dépassement. La valeur par défaut 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.


  33..44..  MMiissee eenn ppaaggee

  En plus des dimensions de marge gauche et de longueur de ligne
  décrites dans la section précédente, TeX vous permet de spécifier les
  marges supérieure et inférieure, ainsi que l'espacement vertical.

  À l'instar des dimensions \hsize et \hoffset décrites dans la section
  ci-dessus, TeX dispose des commandes \vsize et \voffset. Par défaut,
  \vsize vaut 8,9 in. et \voffset vaut 0.

  En temps normal, teTeX place le début de la première ligne de texte à
  1 in. sous le bord supérieur de la feuille et à 1 in. du bord gauche.
  Il vous est possible de commencer le texte plus près 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 même 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 spécifier 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 rétrécies ou étirées à
  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 séquence \vfill \eject. Si \vfill n'est pas utilisé, le texte avant
  le \break sera disposé de façon à 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 légèrement la marge inférieure
  de chaque page pour rendre l'espacement vertical plus cohérent.


  33..55..  NNuumméérrooss ddee ppaaggee,, eenn--ttêêtteess eett ppiieeddss ddee ppaaggee


  Par défaut, TeX place le numéro de page au centre du pied de page. Si
  vous souhaitez changer l'emplacement et le style du numéro de page, il
  vous est possible de spécifier d'autres en-têtes et pieds de page en
  changeant les définitions de \headline et \footline. La valeur par
  défaut pour \footline contient la commande \folio, qui imprime le
  numéro de page. La valeur par défaut 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 numéro de page en changeant la valeur de
  \pageno. Si \pageno est négatif, les nombres sont imprimés 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 défaut contient également la commande
  pour police \tenrm, qui spécifie une police Roman 10 points pour le
  numéro de page. Si vous désirez imprimer le numéro de page en Roman
  12 points par exemple, vous devez d'abord définir une commande pour
  positionner la police en Roman 12 points, et utiliser celle-ci dans la
  définition de \footline. Les commandes pour les polices sont abordées
  dans la section ``Commandes pour les polices''.

  \font\twelvrm=cmr12
  \footline={\hss\twelvrm\folio\hss}



  Vous pouvez insérer une ligne horizontale ou _r_u_l_e, en haut de chaque
  page en redéfinissant  \headline comme suit :

  \headline={\hrulefill}



  Pour spécifier des en-têtes différents 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-têtes différents 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 numéro de page
  est impair, et le deuxième argument sinon.


  33..66..  TTiittrreess eett mmaaccrrooss

  TeX ne fournit que la macro \beginsection pour les en-têtes de
  section. Elle laisse un espace au-dessus de son argument, imprime le
  texte de l'en-tête en gras, ajoute un \smallskip après le texte de
  l'en-tête, et commence le paragraphe suivant sans indentation.

  Les commandes de chapitre et de section décrites plus loin ajoutent la
  numérotation des sections, impriment les titres et les numéros des
  sections dans les en-têtes de pages et ajoutent automatiquement les
  sections à la table de matières.

  En TeX pur, c'est à vous d'écrire ces commandes. La commande \def vous
  permet de définir de nouvelles commandes. Supposons que vous
  souhaitiez imprimer le titre d'un chapitre. En premier, vous
  définissez la police que vous voulez utiliser. Une police de grande
  taille et sans sérif pour les titres de chapitres peut être définie
  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
  définition :

  \def\chaptertitlesans#1{\hbox{}\bigskip\bigskip
    \noindent{\leftline{\chapterfontsans#1}}
    \par\bigskip\bigskip\noindent}


  La première ligne, \hbox{}\bigskip, fixe un espacement de 12 points en
  haut de la page en y plaçant une \hbox{} vide. La ligne comportant le
  titre du chapitre n'est pas indentée, comme le paragraphe qui le suit
  immédiatement. 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 définition est remplacée par le premier
  argument de \chaptertitlesans qui sera en fait le titre du chapitre.
  Dans les définitions en TeX, les paramètres sont déclarés par #1, #2,
  #3 et ainsi de suite. Un exemple d'utilisation de \chaptertitlesans
  serait :

  \chaptertitlesans{Chapitre 1}
  Cela est le texte commençant le premier paragraphe du chapitre.
  Le paragraphe ne sera pas indente. Le titre du chapitre est
  "Chapitre 1."




  44..  CCoommmmaannddeess LLaaTTeeXX





  44..11..  SSttrruuccttuurree ddeess ddooccuummeennttss

  Les documents composés pour LaTeX doivent obéir à quelques règles
  supplémentaires, 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
  séparer le style produit en sortie du contenu logique du document. Par
  exemple, la composition d'un titre de section avec TeX nécessiterait
  de spécifier un espace de 36 points au dessus du titre, ensuite, le
  titre lui-même en gras et en 24 points, puis la copie du texte et du
  numéro de page dans la table des matières, et enfin de laisser un
  espace de 24 points après 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 définition de \section{} au lieu du texte lui-même
  dans le document. Vous pouvez calculer par vous-même les heures de
  remise en forme gagnées 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 utilisés par les TeXperts.

  Le préambule, dans sa forme minimale, spécifie 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
  début du corps du texte du document. Par exemple :

  \documentclass{article}
  \begin{document}


  Le postambule du document est habituellement très 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 apparaître
  dans un environnement, et de nombreuses commandes ne s'appliquent qu'à
  l'intérieur des environnements où elles sont appelées. 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 déclarer \begin{letter} et
  \end{letter}. Reportez-vous à la section ``Lettres''.) Quoi qu'il en
  soit, de nombreuses fonctions de formatage sont spécifiées au travers
  d'environnements. Elles sont décrites dans les sections suivantes.

  Les classes de documents peuvent être appelées avec des arguments. Par
  exemple, au lieu de la taille de base de 10 points adoptée par défaut,
  comme dans l'exemple précédent, nous aurions pu spécifier :

  \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_, opère les ajustements nécessaires.

  Il existe quelques classes de documents utilisées de façon courante.
  Elles sont décrites 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 définitions spéciales pour les adresses, les
  salutations et les formules de politesse, dont quelques-unes sont
  décrites plus loin.
  Vous pouvez inclure du code LaTeX préemballé, 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 répertoires définis par TEXIN­
  PUTS, que vous-même et teTeX avez spécifié lors de la phase d'instal­
  lation et de configuration.


  \documentclass{article}
  \usepackage{fancyhdr}
  \begin{document}



  Remarquez que les déclarations \usepackage{} sont données avant la
  directive \begin{document} ; et donc, dans le préambule du document.

  fancyhdr.sty étend la commande \pagestyle{} pour vous permettre de
  créer des en-têtes et des pieds de page personnalisés. La plupart des
  classes de documents LaTeX fournissent des en-têtes et des pieds de
  page pour les styles de page standardisés 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-têtes et pieds de page de la page courante, utilisez
  la commande :

  \thispagestyle{style_de_page}



  44..22..  CCaarraaccttèèrreess eett ssttyylleess ttyyppooggrraapphhiiqquueess

  Le style des caractères dépend en partie des polices spécifiées dans
  le document. Toutefois, la mise en évidence de texte par les
  caractères gras ou italiques devrait être disponible pour toutes les
  polices. Le souligné peut également être utilisé, bien que son
  formatage présente des problèmes particuliers. Consultez la section
  ``Extensions pour LaTeX et autres ressources'', plus loin.

  Vous pouvez faire ressortir du texte de plusieurs manières. La plus
  portable repose sur la commande \em. Tout le texte dans sa portée sera
  mis en italiques par défaut. 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 spécifier qu'un facteur de correction des italiques doit être
  utilisé. Pour cela, la commande est \/; ce qui correspond à une barre
  de fraction inversée puis une barre de fraction normale.
  Cet exemple {\em sera\/} correctement imprime.

  Cet exemple ne sera {\em pas} imprime correctement.


  Légèrement moins portables, mais encore acceptables dans les situa­
  tions où elles sont employées de manière isolée, il y a les commandes
  \it, \bf, et \tt, qui spécifient que les caractères dans leurs portées
  doivent être imprimés 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 coupés par un saut de ligne.

  La version la plus récente de LaTeX, qui est celle dont vous disposez,
  comprend des commandes tenant compte des occurrences où une manière 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 caractères gras.

  Pour éviter cela, NFSS, la méthode de sélection pour la forme des
  polices, nécessite trois paramètres pour chaque jeu de caractères : 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 spécifiées :

  \textup{texte}         % caracteres "droits" (par defaut) -- upright shape
  \textit{texte}         % italiques
  \textsl{texte}         % obliques
  \textsc{texte}         % petites capitales


  Voici les deux séries dont disposent la majorité des polices :

  \textmd{text}          % serie moyenne (par defaut) -- medium
  \textbf{text}          % caracteres gras


  Trois familles de caractères sont généralement disponibles :

  \textrm{text}          % Roman (par defaut)
  \textsf{text}          % sans serif
  \texttt{text}          % espacement fixe (de type Courier) ou teletype


  Spécifier des styles de polices à l'aide de ces paramètres 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 défaut est la Computer Modern, qui est une
  police matricielle. D'autres familles de polices sont généralement au
  format Postscript Type 1. Consultez la section ``Utilisation des
  polices Postscript'' pour les détails concernant leur utilisation.

  De nombreuses formes d'accents ou de caractères spéciaux 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 caractères sont utilisés comme des méta-caractères ou
  des caractères d'échappement en TeX et LaTeX. L'un d'eux, le symbole
  du dollar est mentionné plus haut. L'ensemble des méta-caractères
  qu'il faut faire précéder d'une barre de fraction inversée pour leur
  faire perdre leur signification particulière est :

  # $ % & _ { }



  De nombreux alphabets, comme l'alphabet grec ou cyrillique,  sont
  également disponibles. LaTeX fournit une aide précieuse pour la
  composition de textes en différentes langues, que l'on peut trouver
  dans quelques-unes des références mentionnées ici.


  44..33..  MMaarrggeess eett iinntteerrlliiggnneess

  Changer les marges dans un document TeX ou LaTeX n'est pas une tâche
  évidente. Beaucoup de choses dépendent de l'indentation relative du
  texte dont vous essayez d'ajuster la marge. L'endroit où est placée 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'intégralité du document, et décaleront 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 différent des commandes
  mentionnées 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 répertoire
  local figurant dans votre $TEXINPUTS. L'explication des commandes se
  trouve dans la section commentée du fichier. Pour les inclure dans un
  document, utilisez la commande

  \usepackage{margins}


  dans le préambule 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 grâce à 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 différence entre les deux formes est que _s_e_t_l_e_n_g_t_h respectera
  toutes les règles de portée qui sont actives au moment où vous
  utilisez la commande.

  Le problème avec l'utilisation de _b_a_s_e_l_i_n_e_s_k_i_p est qu'il joue
  également un rôle 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'élément que vous êtes en train de
  composer, quel qu'il soit. Toutefois, il existe des extensions
  composées de macros LaTeX comme setspace.sty, qui vous viendront en
  aide dans ces circonstances. Reportez-vous à la section ``Extensions
  pour LaTeX et autres ressources''.


  44..44..  CCllaasssseess ddee ddooccuummeennttss

  LaTeX fournit des classes de documents qui décrivent des formats
  standardisés pour ces documents. Elles donnent accès à des
  environnements de composition de listes, de citations, de notes de bas
  de page et autres éléments textuels. Les classes de documents d'usage
  courant sont abordées dans les sections qui suivent.


  44..44..11..  AArrttiicclleess eett rraappppoorrttss

  Comme mentionné ci-dessus, les classes article et report (utilisée
  pour les rapports) sont similaires. Les principales différences sont
  que la classe report crée par défaut une page de titre et fait débuter
  chaque section sur une nouvelle page. Dans la plupart des cas, ces
  deux classes de documents sont toutefois similaires.

  Pour créer des titres, des résumés 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 préambule du document. Puis, la commande

  \maketitle


  placé en début de texte, générera soit une page de titre dans la
  classe report, soit le titre et le résumé en haut de la première page,
  dans la classe article.

  La définition des sections peut se faire avec des commandes de la
  liste suivante :

  \section
  \subsection
  \subsubsection


  Ces commandes produiront des sections numérotées standardisées
  utilisées dans des documents techniques. Pour obtenir des sections
  non-numérotées, 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}
  Début 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 inversées
  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 numérotée 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}




  44..44..22..  LLeettttrreess..

  La classe letter utilise des définitions spécifiques 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 préambule du
  document définit l'adresse de retour. La commande signature définit le
  nom de l'expéditeur tel qu'il figurera après les salutations.

  Le source LaTeX d'un courrier d'entreprise élémentaire 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 inversées, qui
  indiquent où doivent se produire les sauts de ligne.


  55..  EExxtteennssiioonnss ppoouurr LLaaTTeeXX eett aauuttrreess rreessssoouurrcceess

  Plus haut, nous avons mentionné que le souligné utilisé comme moyen de
  mettre du texte en évidence présente des problèmes particuliers. En
  fait, TeX n'a aucun problème pour souligner du texte, puisqu'il s'agit
  d'une convention pour la composition en mathématiques. En LaTeX, vous
  pouvez souligner des mots avec la commande :

  \underline{texte a souligner}


  Le problème est que le souligné ne suivra pas les sauts de ligne, et
  qu'il peut se révéler irrégulier dans certaines circonstances. Toute­
  fois, il existe une extension de macros LaTeX, prêtes à l'emploi, qui
  font du souligné la méthode de mise en évidence par défaut. 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 préambule du document.

  Parmi les extensions disponibles pour LaTeX, il y a :

     iifftthheenn
        Permet d'inclure des expressions conditionnelles dans vos
        documents.

     iinniittiiaallss
        Définit une police pour les lettrines.

     ssaannsskkrriitt
        Police et préprocesseur pour la production de documents en
        sanscrit.

     rreecciippee
        Une classe LaTeX2e pour composer des recettes.

     rreeffmmaann
        Variante des styles rapport et article.

  Pour obtenir l'URL pleinement qualifié à partir d'un chemin donné dans
  le catalogue, concaténez le chemin à l'URL donnant le nom de la
  machine et la racine de l'arborescence du site CTAN que vous désirez
  contacter. Par exemple, la racine de l'arborescence CTAN du site
  ftp.tex.ac.uk est ctan/tex-archive. L'URL complet du répertoire rreeffmmaann
  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 répertoire contenant l'extension est alors donné.

  Avec l'URL sous la main, vous pouvez télécharger l'extension à partir
  de l'un des sites d'archives CTAN recensés dans l'annexe ``Annexe A''.
  Vous avez la possibilité de décharger la liste complète du contenu de
  l'archive qui se trouve dans le fichier FILES.byname, dans le
  répertoire 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>




  66..  ddvviippss CCoommbbiinneerr tteexxtteess eett éélléémmeennttss ggrraapphhiiqquueess aavveecc


  De manière générale, 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 défaut
  les polices Computer Modern. Lors de l'impression de documents
  contenant des polices vectorielles Type 1 ou des éléments graphiques,
  le rendu du texte et des graphiques est du ressort de dvips. dvips
  peut utiliser indifféremment des polices matricielles Computer Modern
  ou des polices vectorielles Type 1, ou n'importe quelle combinaison
  des deux. En premier lieu, intéressons-nous à l'impression et à la
  prévisualisation de quelques éléments graphiques.

  Vous souhaiterez sans doute suivre cette procédure à chaque fois qu'un
  document source LaTeX possède la directive

  \includepackage{graphics}


  dans son préambule. 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 opérations graphiques, et les
  directives contenues dans des documents en TeX pur ne vous renseignent
  pas forcément sur l'obligation ou non d'utiliser dvips. Toutefois, la
  différence se verra dans la sortie, lorsque le document imprimé ne
  comportera pas toutes les figures ou autres éléments 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 déjà été « TeXé » pour vous. L'explication en est
  que l'impression correcte du document repose sur la nécessité d'y
  inclure des polices Type 1. Si vous désirez composer grfguide.tex avec
  LaTeX, reportez-vous à la section suivante. Pour le moment, nous
  tâcherons d'obtenir une sortie utilisable à l'aide de dvips.

  Le fichier grfguide.dvi se trouve dans le répertoire

  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'entrée standard et écrivant sur la sortie standard. Il est
  possible de configurer dvips pour qu'il écrive par défaut 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 périphérique de sortie.

  En fonction de l'existence ou non des polices générées par dvilj2 pour
  le dernier document, dvips et metafont peuvent être amenés à créer 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 prête à être imprimée sur le
  périphérique dont vous disposez.

  Si vous êtes chanceux (et riche), alors vous disposez déjà d'une
  imprimante capable de traiter du Postscript et êtes prêt à 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,
  déchargez 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 attachée, bien que cela
  ne soit pas recommandé pour un usage courant.

  Si vous devez invoquer Ghostscript à la main, voici la démarche
  standard à suivre pour cette opération. La première chose que vous
  voudrez faire est d'invoquer Ghostscript pour connaître ses options,
  comme ceci :
  gs -help | less


  Vous verrez la liste des périphériques de sortie supportés et une
  flopée d'autres commandes. Choisissez le périphérique de sortie qui
  correspond le mieux à votre imprimante. Pour ma part, je produis en
  général 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 répertoire
  /tmp. Il est de bon ton d'utiliser un répertoire du type /tmp car gs
  peut être quelque peu singulier à propos des droits d'accès, et vous
  ne pouvez (et ne devriez) pas compter sur le fait d'être connecté sous
  root pour effectuer ces étapes. À présent 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 système, 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 prévisualisation sur l'écran
  est possible sans X, mais c'est loin d'être l'idéal. 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 bibliothèque.

  L'important dont il faut se souvenir est que grfguide.dvi émet des
  requêtes à la fois pour des polices matricielles Computer Modern et
  pour des polices vectorielles Type 1. Si vous arrivez à mélanger des
  polices vectorielles et matricielles dans un document, vous êtes en
  bonne voie pour devenir un TeXpert.


  66..11..  EEtt ssii mmoonn iimmpprriimmaannttee nn''eesstt ppaass ssuuppppoorrttééee ??

  La distribution teTeX est accompagnée d'une sélection limitée de
  pilotes pour les sorties DVI : dvips, des pilotes pour les LaserJet de
  Hewlett-Packard et c'est tout. Deux possibilités s'offrent à vous si
  vous avez une imprimante incompatible avec la LaserJet : vous pouvez
  utiliser dvips et Ghostscript, ce que je recommande de toutes façons,
  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é-compilés. Il se trouvent dans
  les archives Linux à archives
  ftp://sunsite.unc.edu/pub/Linux/apps/tex/dvi/.

  Les bibliothèques 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
  modèles qui s'y trouvent. L'URL de la bibliothèque est
  ftp://ftp.math.utah.edu/pub/tex/dvi/.


  77..  UUttiilliissaattiioonn ddee ppoolliicceess PPoossttssccrriipptt


  Il était d'usage que la qualité des polices Type 1 du domaine public
  soit nettement inférieure à celle des polices matricielles Computer
  Modern. Néanmoins, cette situation s'est améliorée au cours des
  dernières années. Mais la mise en correspondance des polices reste à
  votre charge. Disposer de plusieurs systèmes de polices différents sur
  une seule machine peut paraître redondant et un gâchis en espace
  disque. Et les polices Computer Modern peuvent paraître 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 dépenser une
  fortune pour des polices de qualité professionnelle.

  L'une des améliorations majeures de LaTeX2e par rapport à son
  prédécesseur 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
  schéma de sélection des polices). (Qui s'appelle à présent PSNFSS.)
  Auparavant, les auteurs écrivant en TeX devaient spécifier les polices
  à l'aide de commandes comme

  \font=bodyroman = cmr10 scaled \magstep 1



  ce qui permet d'être précis mais nécessite les talents d'un typographe
  et d'un mathématicien pour être utilisé correctement. De plus, cela
  manque de portabilité. Si un autre système était dépourvu 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
  spécification des polices pour tout le document. PSNFSS cependant,
  vous permet de spécifier les polices par famille (Computer Modern, URW
  Nimbus, Helvetica, Utopia et ainsi de suite), épaisseur (léger, moyen,
  gras), orientation (droit ou oblique), style (Roman ou Italique) et
  taille de base en points. (Cf. section ``Caractères et styles
  typographiques'' pour une description des commandes de spécification
  des styles typographiques.)  De nombreuses polices sont groupées en
  familles. Par exemple, une police du type Roman peut être groupée avec
  une police sans-sérif, comme Helvetica, et une police à espacement
  fixe, comme Courier. Vous, en tant qu'auteur du document LaTeX, pouvez
  spécifier une famille entière de polices avec une seule commande.

  Comme je l'ai déjà mentionné, il existe des ensembles de polices de
  très 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é versés dans le
  domaine public.

  Il se trouve que ceux-là sont mes préférés. 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 français. À l'origine, TeX a été
  conçu pour la mise en page de mathématiques, ainsi, il existe toute
  une panoplie de polices mathématiques, tout comme les alphabets
  cyrilliques et grecs, le kana et d'autres alphabets, trop nombreux
  pour être mentionnés 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 métriques. Les
  polices Type 1 utilisent des fichiers de métriques .pfm, par
  opposition au fichiers .tfm des polices matricielles. Les deux
  ensembles de polices que j'ai mentionnés plus haut sont compris dans
  les distributions teTeX, mais également de manière séparée.


  Ce que j'ai dit ci-dessus, au sujet de la facilité apportée par PSNFSS
  pour la sélection des polices, se révèle 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 préambule du document, où « bch » est la désignation courante
  pour Bitstream Charter. Les polices Charter se trouvent dans le réper­
  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 caractères. Arrivé à ce point, vous n'avez pas à vous préoccuper à
  leur sujet (-- NdT. : cela vaut plus pour les anglophones que pour les
  francophones.--) , car les encodages diffèrent principalement pour les
  caractères 8-bits, dont les valeurs numériques dépassent 128 en
  décimal. Ils définissent pour la plupart des accents et des caractères
  non-anglais. Les encodages des Type 1 marchent en général bien pour
  les alphabets occidentaux car ils répondent au standard ISO 8859
  concernant les jeux de caractères internationaux, ce qui constitue un
  argument de plus pour leur utilisation.

  Pour composer un document où sont sélectionnées des polices Charter,
  vous lanceriez la commande

  pslatex document.tex


  pslatex est une variante de la commande latex standard de teTeX qui
  définit les répertoires où se trouvent les polices Type 1, ainsi que
  des suppléments de code LaTeX à utiliser. Vous verrez l'écran d'aver­
  tissement de pslatex suivi de la sortie relative au processus TeX lui-
  même. En un instant, vous aurez un fichier .dvi incluant des requêtes
  pour des polices Charter. Il vous est possible d'imprimer le fichier
  avec dvips, et gs si nécessaire.

  L'installation d'une famille de polices Type 1 n'est pas difficile,
  tant que vous suivez quelques étapes élémentaires. Vous devriez
  déballer les polices dans une répertoire 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 répertoires que de nouvelles polices ont été
  ajoutées. 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
  références mentionnées ci-dessus. Encore une fois, n'oubliez pas de
  lancer texhash pour mettre à jour la base de répertoires de teTeX.

  L'utilisation d'un système X Window-- XFree86 sous Linux -- avec teTeX
  constitue vraiment un avantage car il permet une prévisualisation des
  documents de qualité supérieure. Il n'est pas exigé, mais en règle
  générale, tout ce qui facilite la prévisualisation à l'écran apportera
  un plus à votre travail en termes de qualité des sorties. Cela se paye
  néanmoins en vitesse de frappe, bien plus rapide sur des écrans en
  mode texte.



  88..  AAnnnneexxee AA :: lliissttee ddeess ssiitteess CCTTAANN

  Voici le texte du fichier CTAN.sites, qui est disponible dans le
  répertoire 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 pénaliser le réseau.
  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>




  99..  AAnnnneexxee BB :: iinnssttaallllaattiioonn ddee llaa ddiissttrriibbuuttiioonn CCTTAANN ddee tteeTTeeXX

  La distribution générique de teTeX n'est pas plus difficile à
  installer que les paquetages Linux. Cf. la section ``Distribution
  générique CTAN'', ci-dessous.

  Vous devriez envisager d'installer la distribution générique de teTeX
  à partir des archives CTAN si :

  ·  Votre système n'est pas basé sur l'une des distributions
     standardisées de Linux.

  ·  Vous ne disposez pas des privilèges de root sur votre système.

  ·  Vous souhaitez, ou il vous faut absolument, la dernière version de
     teTeX ou LaTeX.

  ·  Vous n'avez pas assez d'espace disque disponible pour une
     installation complète.

  ·  Vous voulez installer teTeX ailleurs que dans le répertoire /usr.

  ·  Vous voulez partager votre installation teTeX avec d'autres
     variantes d'UNIX ou d'autres plates-formes sur le réseau. Dans ce
     cas, vous devriez sérieusement 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 dernières versions des polices Type 1 du
     domaine public, qui sont considérablement meilleures que les
     polices accompagnant les versions antérieures.

  Une installation complète de la distribution binaire nécessite 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
  nécessaire d'avoir installé le compilateur GCC ou le système X Window
  (bien que X soit d'une aide précieuse puisqu'il permet la
  prévisualisation 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 télécharger les fichiers à partir de l'un des sites CTAN
  recensés dans la section ``Annexe A''. Dans les exemples ci-dessous,
  les fichiers sont originaires de l'archive CTAN située à
  ftp.tex.ac.uk.


  99..11..  IInnssttaallllaattiioonn ddee llaa ddiissttrriibbuuttiioonn bbiinnaaiirree



  99..11..11..  IInnssttaallllaattiioonn mmiinniimmaallee


  En premier lieu, faites un FTP sur ftp.tex.ac.uk et un cd vers le
  répertoire
  ctan/tex-archive/systems/unix/teTeX/distrib/


  Récupérez les fichiers

  INSTALL.bin
  install.sh


  et placez-les dans le répertoire-racine de l'endroit ou vous voulez
  installer teTeX, par exemple /var/teTeX si vous souhaitez installer
  teTeX dans le répertoire /var.

  Imprimez le fichier INSTALL.bin. Gardez-le sous la main car il décrit
  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 exécutables de teTeX. Récupérez le fichier

  ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linux.tar.gz


  si votre système utilise les bibliothèques partagées 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, récupérez
  l'archive

  ctan/tex-archive/systems/unix/teTeX/distrib/binaries/i386-linuxaout.tar.gz


  compilé pour des systèmes utilisant les bibliothèques statiques au
  format a.out, plus anciennes.

  Puis, suivant en cela les instructions du fichier INSTALL.bin,
  exécutez la commande

  sh ./install.sh


  à partir du répertoire-racine de l'installation teTeX. (Assurez vous
  que les archives teTeX s'y trouvent également). Après quelques
  instants, le programme d'installation vous avertira s'il manque cer­
  tains paquetages teTeX. Si toutefois vous prévoyez une installation
  minimale de teTeX, vous pouvez ignorer ces avertissements et passer à
  la suite. Pour configurer le système teTeX élémentaire, reportez-vous
  à la section ``Configuration d'un système élémentaire'', ci-dessous.

  Pour installer les paquetages restants, voyez la section suivante.


  99..11..22..  IInnssttaallllaattiioonn ccoommppllèèttee

  Pour effectuer une installation complète de teTeX, récupérez les
  fichiers d'archives recensés dans la section précédente, 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 placés dans le répertoire-racine de
  l'arborescence où teTeX doit résider. Comme pour l'installation mini­
  male, exécutez la commande

  sh ./install.sh



  99..22..  CCoonnffiigguurraattiioonn dd''uunn ssyyssttèèmmee éélléémmeennttaaiirree

  Le script install.sh, après avoir déterminé l'ensemble des archives
  teTeX disponibles, vous offrira un menu d'options. Le seul paramètre
  que vous avez à définir à ce moment-là est le répertoire-racine de
  l'endroit où vous voulez installer teTeX, en sélectionnant l'option
  « D ». Bien sûr, vous devez sélectionner un répertoire pour lequel
  vous avez les droits d'écriture dans le répertoire père. Par exemple,
  si vous installez teTeX dans votre _h_o_m_e _d_i_r_e_c_t_o_r_y, vous spécifierez le
  répertoire d'installation de teTeX comme

  /home/john.q.public/teTeX


  et, après être retourné au menu principal, sélectionnerez « I » pour
  poursuivre l'installation. Notez que ce répertoire ne doit pas
  exister : le script install.sh doit pouvoir le créer.

  Une option que vous pourriez envisager de modifier est la définition
  d'un répertoire pour la génération des polices. Même si vous prévoyez
  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 répertoire à utiliser. Vous devez disposer des
  droits d'écriture dans son répertoire-père. En se basant sur l'exemple
  précédent, vous pourriez spécifier

  /home/john.q.public/texfonts



  ou bien, si vous souhaitez rendre les polices générées accessibles à
  tous les utilisateurs du système, spécifiez un répertoire comme

  /var/texfonts


  Je vous recommanderai cependant de _n_e _p_a_s utiliser le répertoire par
  défaut pour cette option, /var/tmp/texfonts, car les polices générées
  pourraient être effacées au prochain redémarrage, et elles devraient
  être régénérées lorsqu'elles seraient à nouveau nécessaires.

  Après que vous aurez sélectionné l'option « I » et que install.sh aura
  installé les archives, positionné les droits d'accès divers et généré
  les liens et les fichiers de format, le programme se terminera avec un
  message vous indiquant de rajouter le répertoire des binaires teTeX à
  votre variable d'environnement $PATH, et les répertoires 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 interpréteur de
  commandes, ou à votre ~/.profile si vous en utilisez un autre pour vos
  connexions.

  Déconnectez-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 matériel spécifique :
  reportez-vous à la section ``Détails de configuration après
  l'installation'', ci-dessous.


  99..33..  IInnssttaallllaattiioonn ddee llaa ddiissttrriibbuuttiioonn ssoouurrccee CCTTAANN

  Pour installer teTeX V. 0.4 à partir du code source, faites un ftp sur
  un site CTAN comme ftp://ftp.tex.ac.uk et récupérez 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 déballez les fichiers dans un répertoire pour lequel
  vous avez les droits de lecture-écriture-exécution.

  Souvenez-vous d'utiliser l'argument p pour faire le tar, et de
  désactiver l'option noclobber du bash. Cela est possible grâce à 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 créer le répertoire ./teTeX. Le
  fichier teTeX-src-0.4pl7.tar.gz va créer le répertoire teTeX-src-0.4.
  Imprimez le fichier INSTALL.src et gardez-le à proximité pour les
  étapes suivantes. Faites un cd vers le répertoire ./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 répertoire père du répertoire teTeX. Il
  s'agit donc du sous-répertoire teTeX du répertoire où vous avez
  déballé les archives des sources et des bibliothèques. Par exemple, si
  vous avez déballé 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 génériques. 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 bibliothèques, ou de souhaiter le que compilateur fasse
  plus d'optimisations ou pour toute autre raison. Vérifiez que les
  variables USE_DIALOG, USE_NCURSES, et HAVE_NCURSES sont correctement
  positionnées pour votre système, car le programme dialog a besoin de
  la bibliothèque ncurses pour être installé. Une bibliothèque ncurses
  est comprise dans la distribution source, par conséquent, les valeurs
  par défaut 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 détendre jusqu'à
  ce que les exécutables teTeX soient construits. Cela peut prendre
  quelques heures.

  Après que la compilation a pris fin, positionnez les variables
  d'environnement $PATH, $MANPATH, et $INFOPATH pour y inclure les
  répertoires 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 diffère 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é positionnés correctement, et poursuivre la
  configuration de teTeX comme pour la distribution binaire. Cf. section
  ``Détails de configuration après l'installation'', ci-dessous.


  99..44..  DDééttaaiillss ddee ccoonnffiigguurraattiioonn aapprrèèss ll''iinnssttaallllaattiioonn

  La première chose que vous voudrez faire est de regarder le fichier
  README de Thomas Esser. Il contient un tas d'indices sur la manière de
  configurer teTeX pour votre périphérique de sortie (imprimante par
  exemple). Le fichier README se trouve dans le répertoire

  /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 connectée à /dev/lp0. Remplacez-
  le par le fichier correspondant au pilote auquel votre imprimante est
  attachée le cas échéant.

  Ou, encore mieux, imprimez-le avec la commande lpr :

  lpr /usr/lib/teTeX/texmf/doc/tetex/README


  Vous devriez avoir installé le démon 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 adaptée à votre imprimante. Nous y viendrons dans un
  moment. Dans des versions plus récentes de teTeX, la teTeX-FAQ peut
  être visualisée à l'aide de l'utilitaire texconfig.

  Ensuite, vous souhaiterez définir un répertoire où stocker vos propres
  fichiers de formats TeX. teTeX parcourt les répertoires figurant dans
  la variable d'environnement $TEXINPUTS pour des fichiers d'entrée pour
  TeX disponibles en local.

  Ajoutez

  export TEXINPUTS=".:~/texinputs:"


  au fichier système /etc/profile. Chaque utilisateur peut positionner
  son propre répertoire $TEXINPUTS local, en ajoutant la ligne dans son
  ~/.profile ou ~/.bash_profile si bash est l'interpréteur de commandes
  par défaut. La variable d'environnement $TEXINPUTS indique à teTeX de
  chercher les fichiers de style TeX des utilisateurs dans les réper­
  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 après ce réper­
  toire. teTeX va ajouter ses propres répertoires de recherche aux
  vôtres. Vous voudrez que teTeX recherche en premier lieu les fichiers
  de format locaux, pour qu'il utilise les versions locales des fichiers
  standardisés que vous avez édités.

  Ajoutez le répertoire /usr/lib/teTeX/bin aux chemins définis pour le
  système si vous installez teTeX en tant que root. Encore une fois, si
  vous installez un exemplaire personnel de teTeX, ajoutez le répertoire
  où se situent les binaires teTeX _e_n _t_ê_t_e de votre $PATH en insérant la
  ligne suivante dans votre ~/.profile ou votre ~/.bash_profile :

  export PATH="~/tetex/bin:"$PATH


  À présent, connectez-vous sous root et lancez texconfig comme il est
  dit dans la teTeX-FAQ et choisissez l'imprimante attachée à votre
  système. Assurez-vous de configurer teTeX aussi bien pour la bonne
  imprimante que pour la bonne résolution d'impression.

  Enfin, lancez le programme texhash. Cela garantit que la base de
  données interne de teTeX est bien à jour. Cette base de données n'est
  autre que le fichier ls-lR. Vous _d_e_v_e_z lancer texhash à chaque fois
  que vous modifiez la configuration du système, sans quoi teTeX sera
  incapable de prendre en compte vos changements.


  1100..  AAnnnneexxee CC :: ddiissttrriibbuuttiioonn eett ddrrooiittss dd''aauutteeuurr


  1100..11..  DDiissttrriibbuuttiioonn

  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 conçues pour permettre tout ce qu'un bon
  citoyen coopératif aurait envie de faire. Ce qui n'est pas autorisé,
  c'est d'essayer d'empêcher les autres de partager plus en avant toute
  version d'un logiciel libre qu'ils pourraient recevoir de vous. Les
  conditions précises 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 apparaît également dans
  la section suivante.

  Un moyen d'obtenir un exemplaire du paquetage est de le récupérer
  auprès de quelqu'un qui le possède. 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
  accès à l'Internet, vous pouvez rapatrier la distribution la plus
  récente 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 mêmes 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 auprès
  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 sûr
  de se procurer une copie ; c'est également une bonne méthode 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 générés par la commercialisation des distributions vont au
  soutien des buts que s'est assignés la fondation : le développement de
  nouveaux logiciels libres, et l'amélioration des programmes existants.

  Si vous utilisez des logiciels GNU à votre lieu de travail, vous
  pourriez suggérer à votre entreprise de faire un don. Si votre
  entreprise n'est pas favorable aux dons aux oeuvres de charité, vous
  pourriez alors suggérer de commander à l'occasion un CD-ROM à la
  fondation, ou de s'abonner aux mises à jour périodiques.


  1100..22..  GGNNUU GGEENNEERRAALL PPUUBBLLIICC LLIICCEENNSSEE


  Version 2, juin 1991 (-- NdT. : la version française 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 apportée.

  PPrrééaammbbuullee

  Les licences relatives à la plupart des logiciels sont destinées à
  supprimer votre liberté de les partager et de les modifier. Par
  contraste, la licence publique générale 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 présente licence publique générale 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 Générale pour
  Bibliothèques 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 générales 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 éléments
  dans de nouveaux programmes libres ;

  * et que vous savez que vous pouvez le faire.

  Pour protéger vos droits, nous devons apporter des restrictions, qui
  vont interdire à qui que ce soit de vous dénier ces droits, ou de vous
  demander d'y renoncer. Ces restrictions se traduisent par certaines
  responsabilités 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 rémunération, vous devez transférer aux
  destinataires tous les droits dont vous disposez. Vous devez vous
  garantir qu'eux-mêmes, par ailleurs, reçoivent ou peuvent recevoir le
  code source. Et vous devez leur montrer les présentes dispositions, de
  façon qu'ils connaissent leurs droits.

  Nous protégeons 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
  légale de dupliquer, distribuer et/ou modifier le logiciel.

  De même, 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
  possèdent n'est pas l'original, de façon que tous problèmes introduits
  par d'autres ne se traduisent pas par une répercussion négative sur la
  réputation 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 conséquence qu'ils aient un droit de
  propriété sur le programme. Pour éviter cette situation, nous avons
  fait tout ce qui est nécessaire 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 concédé du tout.

  Nous présentons ci-dessous les clauses et dispositions concernant la
  duplication, la distribution et la modification.

  CCoonnddiittiioonnss dd''eexxppllooiittaattiioonn ppoorrttaanntt ssuurr llaa dduupplliiccaattiioonn,, llaa ddiissttrriibbuuttiioonn
  eett llaa mmooddiiffiiccaattiioonn



  ·  Le présent contrat de licence s'applique à tout programme ou autre
     ouvrage contenant un avis, apposé par le détenteur du droit de
     propriété, disant qu'il peut être distribué au titre des
     dispositions de la présente Licence Publique Générale. Ci-après, le
     « Programme » désigne l'un quelconque de ces programmes ou
     ouvrages, et un « ouvrage fondé sur le programme » désigne soit le
     programme, soit un ouvrage qui en dérive au titre de la loi sur le
     droit d'auteur ; plus précisément, 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-après, le terme « modification » englobe, sans aucune
     limitation, les traductions qui en sont faites). Chaque titulaire
     de licence sera appelé « concessionnaire ».

     Les activités autres que la duplication, la distribution et la
     modification ne sont pas couvertes par la présente licence ; elles
     n'entrent pas dans le cadre de cette dernière. L'exécution du
     programme n'est soumise à aucune restriction, et les résultats du
     programme ne sont couverts que si son contenu constitue un ouvrage
     fondé sur le programme (indépendamment du fait qu'il a été réalisé
     par exécution du programme). La véracité de ce qui précède dépend
     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 reçoit, et ce sur un
     support quelconque, du moment qu'il appose, d'une manière
     parfaitement visible et appropriée, 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 présente licence et à l'absence de toute garantie ; et qu'il
     transmet à tout destinataire du programme un exemplaire de la
     présente licence en même temps que le programme.

     Le concessionnaire peut facturer l'acte physique de transfert d'un
     exemplaire, et il peut, à sa discrétion, proposer en échange d'une
     rémunération 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 modifiés
     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 dérive, soit
     concédé en bloc, à titre gracieux, à tous tiers au titre des
     dispositions de la présente licence.

     c. Si le programme modifié lit normalement des instructions
     interactives lors de son exécution, le concessionnaire doit, quand
     il commence l'exécution du programme pour une telle utilisation
     interactive de la manière 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-même 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 dérivent pas
     du programme et peuvent être considérées raisonnablement comme
     représentant des ouvrages indépendants et distincts par eux-mêmes,
     alors la présente 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
     mêmes sections en tant qu'élément d'un tout qui représente un
     ouvrage se fondant sur le programme, la distribution de ce tout
     doit se faire conformément aux dispositions de la présente licence,
     dont les autorisations, portant sur d'autres concessionnaires,
     s'étendent à la totalité dont il est question, et ainsi à chacune
     de ses parties, indépendamment 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 entièrement écrit par le
     concessionnaire ; bien plus, l'intention est d'exercer le droit de
     surveiller la distribution d'ouvrages dérivés 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 présente 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 exécutable, au titre des dispositions
     des Sections 1 et 2 ci-dessus, du moment que le concessionnaire
     effectue aussi l'une des opérations 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 supérieur au coût pour le
     concessionnaire, de la réalisation 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 reçues,
     pour proposer une distribution du code source correspondant (cette
     variante n'est autorisée que pour la distribution non commerciale,
     et seulement si le concessionnaire a reçu le programme sous forme
     exécutable ou sous forme d'un code objet, avec une telle offre,
     conformément à l'alinéa b) ci-dessus).

     Le code source d'un ouvrage représente la forme préférée de
     l'ouvrage pour y effectuer des modifications. Pour un ouvrage
     exécutable, le code source complet représente la totalité du code
     source pour tous les modules qu'il contient, plus tous fichiers de
     définitions d'interface associés, plus les informations en code
     machine pour commander la compilation et l'installation du
     programme exécutable. Cependant, à titre d'exceptions spéciales, 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
     système d'exploitation, etc.) du système d'exploitation sur lequel
     est exécuté le programme exécutable, à moins que le composant, par
     lui-même, ne soit joint au programme exécutable.

     Si la distribution de l'exécutable ou du code objet est réalisée de
     telle sorte qu'elle offre d'accéder à une copie à partir d'un lieu
     désigné, alors le fait d'offrir un accès équivalent à la
     duplication du code source à partir de ce même lieu s'entend comme
     distribution du code source, même si des tiers ne sont pas
     contraints de dupliquer la source en même temps que le code objet.

  ·  Le concessionnaire ne peut dupliquer, modifier, concéder en sous-
     licence ou distribuer le programme, sauf si cela est expressément
     prévu par les dispositions de la présente licence. Toute tentative
     pour autrement dupliquer, modifier, concéder en sous-licence ou
     distribuer le programme est répétée nulle, et met automatiquement
     fin aux droits du concessionnaire au titre de la présente licence.
     Cependant, les parties qui ont reçu des copies, ou des droits, de
     la part du concessionnaire au titre de la présente licence, ne
     verront pas expirer leur contrat de licence, tant que ces parties
     agissent d'une manière parfaitement conforme.


  ·  Il n'est pas exigé du concessionnaire qu'il accepte la présente
     licence, car il ne l'a pas signée. Cependant, rien d'autre
     n'octroie au concessionnaire l'autorisation de modifier ou de
     distribuer le programme ou ses ouvrages dérivés. Ces actions sont
     interdites par la loi si le concessionnaire n'accepte pas la
     présente licence. En conséquence, 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 présente
     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 reçoit
     automatiquement une licence de l'émetteur initial de la licence,
     pour dupliquer, distribuer ou modifier le programme, sous réserve
     des présentes clauses et dispositions. Le concessionnaire ne peut
     imposer aucune restriction plus poussée sur l'exercice, par le
     destinataire, des droits octroyés au titre des présentes. Le
     concessionnaire n'a pas pour responsabilité d'exiger que des tiers
     se conforment à la présente licence.

  ·  Si, en conséquence d'une décision de justice ou d'une allégation
     d'infraction au droit des brevets, ou pour toute autre raison (qui
     ne soit pas limitée à des problèmes de propriété industrielle), des
     conditions sont imposées au concessionnaire (par autorité de
     justice, par convention ou autrement), qui entrent en contradiction
     avec les dispositions de la présente licence, elles n'exemptent pas
     le concessionnaire de respecter les dispositions de la présente
     licence.  Si le concessionnaire ne peut procéder à la distribution
     de façon à satisfaire simultanément à ces obligations au titre de
     la présente licence et à toutes autres obligations pertinentes,
     alors, en conséquence de ce qui précède, le concessionnaire peut ne
     pas procéder 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 reçoivent des copies
     directement ou indirectement par l'intermédiaire du
     concessionnaire, alors le seul moyen par lequel le concessionnaire
     pourrait satisfaire tant à cette licence de brevet qu'à la présente
     licence, consisterait à s'abstenir complètement de distribuer le
     programme.

     Si une partie quelconque de cette section est considérée comme
     nulle ou non exécutoire dans certaines circonstances particulières,
     le reste de cette section est réputé s'appliquer, et la section
     dans son ensemble est considérée comme s'appliquant dans les autres
     circonstances.

     La présente section n'a pas pour objet de pousser le
     concessionnaire à enfreindre tous brevets ou autres revendications
     au droit de propriété, ou encore à contester la validité d'une ou
     de plusieurs, quelles qu'elles soient, de ces revendications ; la
     présente section a pour objet unique de protéger l'intégrité du
     système de distribution des logiciels libres, système qui est mis
     en oeuvre par les pratiques liées aux licences publiques. De
     nombreuses personnes ont apporté une forte contribution à la gamme
     étendue des logiciels distribués par ce système, en comptant sur
     l'application systématique de ce système ; c'est à
     l'auteur/donateur de décider s'il a la volonté de distribuer le
     logiciel par un quelconque autre système, et un concessionnaire ne
     peut imposer ce choix.

     La présente section veut rendre parfaitement clair ce que l'on
     pense être une conséquence du reste de la présente licence.

  ·  Si la distribution et/ou l'utilisation du Programme est restreinte
     dans certains pays, sous l'effet de brevets ou d'interfaces
     présentant un droit d'auteur, le détenteur du droit d'auteur
     original, qui soumet le Programme aux dispositions de la présente
     licence, pourra ajouter une limitation expresse de distribution
     géographique excluant ces pays, de façon que la distribution ne
     soit autorisée que dans les pays ou parmi les pays qui ne sont pas
     ainsi exclus. Dans ce cas, la limitation fait partie intégrante de
     la présente licence, comme si elle était écrite dans le corps de la
     présente licence.

     La Free Software Foundation peut, de temps à autre, publier des
     versions révisées et/ou nouvelles de la General Public License. Ces
     nouvelles versions seront analogues, du point de vue de leur
     esprit, à la présente version, mais pourront en différer dans le
     détail, pour résoudre de nouveaux problèmes ou de nouvelles
     situations.

     Chaque version reçoit un numéro de version qui lui est propre. Si
     le programme spécifie un numéro de version de la présente licence,
     qui s'applique à ce dernier et « à toute autre version
     ultérieure », le concessionnaire a le choix de respecter les
     clauses et dispositions de cette version, ou une quelconque version
     ultérieure publiée par la Free Software Foundation. Si le programme
     ne spécifie pas de numéro de version de la présente licence, le
     concessionnaire pourra choisir une version quelconque publiée à
     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 différentes, 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 règle.
     Notre décision va être guidée par le double objectif de protéger le
     statut libre de tous les dérivés de nos logiciels libres, et de
     favoriser le partage et la réutilisation des logiciels en général.


     AABBSSEENNCCEE DDEE GGAARRAANNTTIIEE

  ·  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.

  FFIINN DDEESS CCOONNDDIITTIIOONNSS DD''EEXXPPLLOOIITTAATTIIOONN


  1100..33..  CCoommmmeenntt aapppplliiqquueerr cceess ddiissppoossiittiioonnss àà vvooss nnoouuvveeaauuxx pprrooggrraammmmeess

  Si le concessionnaire développe 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 présentes
  dispositions.

  Dans ce but, il convient de rattacher au programme les avis suivants.
  Le moyen le plus sûr consiste à les rattacher au début 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 localisée la
  totalité de l'avis.


  Une ligne pour donner le nom du programme et une idée 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 conformément aux dispositions de la Licence Publique Générale GNU,
  telle que publiée par la Free Software Foundation ; version 2 de la licence,
  ou encore (à votre choix) toute version ultérieure.

  Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE
  GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou
  D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence
  Publique Générale GNU .

  Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en
  même 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, prévoyez en sortie un court avis, tel
  que celui qui est présenté ci-dessous, lors du démarrage en mode
  interactif.


  Gnomovision est livré absolument SANS AUCUNE GARANTIE ; pour plus de détails,
  tapez "show w". Il s'agit d'un logiciel libre, et vous avez le droit de le
  redistribuer dans certaines conditions ; pour plus de détail, tapez "show
  c".



  Les instructions hypothétiques show w et show c doivent présenter les
  parties appropriées de la Licence Publique Générale. Bien évidemment,
  les instructions que vous utilisez peuvent porter d'autres noms que
  show w et show c ; elles peuvent même correspondre à des clics de
  souris ou à des éléments d'un menu, selon ce qui convient à votre
  programme.

  Si nécessaire, 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 présente, renonce à tout intérêt 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 présente Licence Publique Générale n'autorise pas le
  concessionnaire à incorporer son programme dans des programmes
  propriétaires. Si votre programme est une bibliothèque de sous-
  programmes, vous pouvez considérer comme plus intéressant d'autoriser
  une édition de liens des applications propriétaires avec la
  bibliothèque. Si c'est ce que vous souhaitez, vous devrez utiliser non
  pas la présente licence, mais la Licence Publique Générale pour
  Bibliothèques 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 manière de les réparer. Cela peut être utile
  même si vous n'avez pas le manuel du terminal. Bien qu'il soit écrit
  pour de vrais terminaux reliés à un système Linux, certaines informa­
  tions de ce manuel sont applicables à l'émulation de terminal et peu­
  vent être utiles pour des systèmes différents de Linux.
  ______________________________________________________________________

  Table des matières



















































  1. Introduction

     1.1 Copyright, marques déposées, avertissement et crédits
        1.1.1 Copyright
        1.1.2 Marques déposées
        1.1.3 Avertissement
        1.1.4 Crédits
     1.2 Plans pour l'avenir : vous pouvez m'aider
     1.3 Nouvelles versions de ce HOWTO
     1.4 HOWTOs connexes
     1.5 Terminologie utilisée 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 série
        2.3.2 Terminaux graphiques rapides (d'autres noms leur sont souvent donnés)
     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 réduction du coût du matériel ?
     4.3 Contrôle des logiciels
     4.4 Mises à jour du matériel
     4.5 Autres avantages des terminaux
     4.6 Désavantages majeurs des terminaux
     4.7 Les terminaux texte sont-ils obsolètes ?

  5. Vue d'ensemble du fonctionnement des terminaux (sous Linux)

     5.1 Noms de périphériques
     5.2 Se logger / se délogger
     5.3 Half/Full Duplex
     5.4 Mémoire du terminal
     5.5 Commandes pour le terminal
     5.6 Manque de normalisation résolu par Terminfo
     5.7 L'interface
     5.8 Émulation
     5.9 La console

  6. Fichiers spéciaux pour les terminaux tels que /dev/tty

     6.1 Terminaux sur port série
     6.2 Pseudo-terminaux
     6.3 Le terminal contrôlant /dev/tty
     6.4 "Terminaux" /dev/ttyIN
     6.5 La console : /dev/ttyN
     6.6 Créer un périphérique avec "mknod"

  7. Quelques détails sur le fonctionnement des terminaux

     7.1 Mémoire du terminal
     7.2 Les premiers terminaux
     7.3 Séquences d'échappement et codes de contrôle (introduction)
        7.3.1 Codes de contrôle
        7.3.2 Séquences d'échappement
     7.4 Attributs d'affichage et cookies magiques

  8. Possibilités spéciales de certains terminaux
     8.1 Couleur
     8.2 Sessions multiples
     8.3 Port imprimante/auxiliaire
     8.4 Pages
     8.5 Jeux de caractères
     8.6 Polices
     8.7 Claviers et touches spéciales

  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 téléphoniques)
        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. Contrôle de flux (prise de contact)

     10.1 Pourquoi le contrôle de flux est-il nécessaire ?
     10.2 Remplissage
     10.3 Débordement d'un port série
     10.4 Arrêt de l'envoi
     10.5 Blocage du clavier
     10.6 Reprendre l'envoi
     10.7 Contrôle de flux matériel (RTS/CTS, etc.)
        10.7.1 Contrôle de flux RTS/CTS, DTR et DTR/DSR
        10.7.2 Etablir une connexion avec le contrôle de flux DTR ou DTR/DSR
        10.7.3 L'ancienne prise de contact RTS/CTS est différente
        10.7.4 Canal inversé
     10.8 Est-ce que le contrôle de flux matériel est fait par le matériel ?
     10.9 Obsolète ?? Contrôle de flux ETX/ACK ou ENQ/ACK

  11. Connexion physique

     11.1 Cartes d'entrées/sorties multiports (adaptateurs)
     11.2 Connexion directe par câble
        11.2.1 Schéma de brochage des câbles null modem (3, 4 ou 5 conducteurs)
        11.2.2 Brochage d'un câble null modem standard (7 connecteurs)
        11.2.3 Limitations de longueur
        11.2.4 Câbles pour le contrôle de flux matériel
        11.2.5 Astuces sur les câbles
        11.2.6 Une bidouille qui utilise un câble en paire torsadée
        11.2.7 Mise à la terre du câble
     11.3 Connexion sur un modem
        11.3.1 Appeler à l'extérieur à 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 câble
        11.6.1 Acheter ou fabriquer ?
        11.6.2 Numéros de broches
        11.6.3 Installer des connecteurs DB sur les extrémités des câbles
        11.6.4 Installer des connecteurs RJ

  12. Mise en place (configuration) en général

     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/caractère
        12.5.4 Quel contrôle de flux (prise de contact) ?
        12.5.5 Sélection du port
     12.6 Essai rapide

  13. Détails de la mise en place (configuration) du terminal

     13.1 Envoyer des séquences 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 Paramètres/options de configuration
     13.7 Émulation {Personnalité} {{Modes de terminaux}}
     13.8 Options d'affichage
        13.8.1 Taille de cellule de caractère{Char Cell}
        13.8.2 Colonnes / lignes
        13.8.3 Curseur
        13.8.4 Attributs d'affichage (cookies magiques)
        13.8.5 Caractères de contrôle d'affichage {Monitor}
        13.8.6 Largeur/hauteur double
        13.8.7 Vidéo inverse {Display} (Fond clair/foncé)
        13.8.8 Ligne d'état
        13.8.9 Pendant le changement 80/132 : effacer ou préserver ?
     13.9 Options liées 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 répondre
        13.10.1 Message de réponse (chaîne)
        13.10.2 Réponse automatique
        13.10.3 Réponse cachée
        13.10.4 Numéro 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 Répétition automatique {Repeat}
        13.11.4 Sonnette de marge
        13.11.5 Redéfinir les touches
        13.11.6 Touche de coin (uniquement pour les Wyse)
        13.11.7 Envois grâce au pavé numérique ou aux touches fléchées
        13.11.8 Qu'envoient les touches Shift+Del et Shift+Backspace ?
        13.11.9 Codes de balayage PC
        13.11.10 Caractères alternés
     13.12 Signification des codes de contrôle reçus
        13.12.1 Nouvelle ligne automatique {Newline}
        13.12.2 Saut de ligne automatique {Rcv CR}
        13.12.3 Reconnaître DEL (seulement pour Wyse ??) ou NULL
     13.13 Où va le nouveau texte
        13.13.1 Passage à la ligne
        13.13.2 Défilement
        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 Délimiteur de bloc / de page
     13.16 Blocages
     13.17 Économiseur d'écran {Scrn Saver}
     13.18 Imprimante

  14. Détails 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 nécessaire
     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 détails)

     15.1 Introduction à Terminfo
     15.2 Base de données terminfo
        15.2.1 Compilateur terminfo (tic)
        15.2.2 Regardez votre terminfo
        15.2.3 Effacer des données non nécessaires
     15.3 Modification des fichiers terminfo
     15.4 Chaîne 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 Démarrer le terminal
     16.3 Pilote de périphérique (série) du terminal
     16.4 Problèmes 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 Symptômes
        16.7.2 Envoyer des données binaires au terminal
        16.7.3 Terminer un programme de façon anormale
     16.8 Caractères (de contrôle) spéciaux
        16.8.1 Édition de la ligne de commande
        16.8.2 Interruption (et Quit, Suspend, EOF, Flush)
        16.8.3 Arrêt et reprise du défilement
        16.8.4 Prendre littéralement en compte le caractère suivant
     16.9 Visualiser des fichiers Latin-1 sur un terminal 7 bits
     16.10 Inspection de l'interface
     16.11 Modifier les paramètres 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 supérieurs
        16.12.2 Pour les noyaux antérieurs à 2.2
        16.12.3 Puis-je lancer Linux sans moniteur (console PC) ?
     16.13 Sessions multiples
     16.14 Se délogger
     16.15 Discuter entre terminaux, espionner

  17. Résoudre les problèmes (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 contrôle du modem
        17.5.2 Touche enfoncée
     17.6 Échec après le login
     17.7 Impossible de se logger
     17.8 Invite de login embrouillée
     17.9 Aucun signe d'une quelconque invite de login
        17.9.1 Diagnostiquer les problèmes à partir de la console
        17.9.2 Mesure des tensions
     17.10 Surveillance et diagnostics du port série
     17.11 Mode local
     17.12 Équipement de test électrique pour le port série
        17.12.1 Gadgets d'évasion etc.
        17.12.2 Mesurer des tensions
        17.12.3 Goûter la tension

  18. Réparations et diagnostics

     18.1 Livres et sites Web sur la réparation
        18.1.1 Livres
        18.1.2 Sites Web
     18.2 Sécurité
     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 contrôle en NVR
     18.6 Capacités
     18.7 Claviers
        18.7.1 Interchangeabilité
        18.7.2 Comment ils fonctionnent
        18.7.3 L'appui sur une touche affiche deux caractères différents
        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 : généralités

     19.1 Liste des commandes Linux pour les terminaux
        19.1.1 Envoyer une commande à un terminal
        19.1.2 Configuration du pilote de périphériques 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 liés aux terminaux
        19.2.3 Livres consacrés entièrement aux terminaux
        19.2.4 Livres possédant des chapitres sur les terminaux
     19.3 Systèmes non Linux

  20. Annexe B : terminologie des commandes de séquences d'échappement

     20.1 Liste de séquences d'échappement
     20.2 Codes de contrôle 8 bits
     20.3 Échappement pour l'imprimante
     20.4 Rapports
     20.5 Mouvements du curseur
     20.6 Pages (définition)

  21. Annexe C : communications série sur EIA-232 (RS-232)

     21.1 Introduction aux communications série
     21.2 Tensions
        21.2.1 Tension pour un bit
        21.2.2 Séquence de tension pour un octet
     21.3 La parité expliquée
     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 Définir 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 série

  22. Annexe D : Notes classées 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


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Pour tenter d'installer un terminal rapidement, voyez ``installation
  rapide''.


  11..11..  CCooppyyrriigghhtt,, mmaarrqquueess ddééppoossééeess,, aavveerrttiisssseemmeenntt eett ccrrééddiittss



  11..11..11..  CCooppyyrriigghhtt


  Copyright 1998 par David S. Lawyer. Veuillez copier et distribuer
  librement ce document (par la vente ou le don). Les travaux dérivés
  sont permis à la condition que vous : 1. fassiez un effort de bonne
  foi pour vous assurer qu'une copie (ou même le document maître) soit
  sur Internet sur un site approprié au téléchargement 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 dès le départ et si possible
  pendant votre projet.  4. donniez un crédit total aux précédent
  auteurs et contributeurs majeurs bien que la section sur les crédits
  ne doive pas excéder 1% de la longueur du document.
  11..11..22..  MMaarrqquueess ddééppoossééeess


  Si certains mots représentent des marques déposées, 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 déposées
  appartiennent à leurs propriétaires respectifs.


  11..11..33..  AAvveerrttiisssseemmeenntt


  La plupart des informations de ce HOWTO ont été obtenues sur Internet,
  dans des vieux manuels, etc. et peuvent ne pas être sûres (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 sûrement 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 légalement responsable des erreurs commises.


  11..11..44..  CCrrééddiittss


  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é incorporée dans la version 1.00 en
  des endroits variés. Les portions non incluses traitaient de thèmes
  déjà couverts dans ma version précédente, v0.05.

  Pour la traduction en français, j'aimerais remercier Xavier Glattard,
  qui a entrepris le début de la traduction et que j'ai reprise en cours
  ; ainsi que Guillaume Allègre et Jean-Luc Cassel qui ont fait un
  énorme travail de relecture.


  11..22..  PPllaannss ppoouurr ll''aavveenniirr :: vvoouuss ppoouuvveezz mm''aaiiddeerr


  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, vérifiez que
  vous avez la dernière version. Veuillez m'envoyer toutes les
  informations que vous pensez être pertinentes pour ce document. [ NdT
  : cela s'applique aussi pour la version française ! ]

  À partir de la version 1.00, j'ai tenté pour la première fois d'aider
  les gens à configurer des terminaux sans recourir à un manuel de
  terminal. Il en faudrait bien plus à cet égard. Une manière de
  résoudre ce problème serait que les fabricants de terminaux mettent
  leurs manuels sur Internet. Je vous suggère de les encourager à le
  faire. Fournir des informations sur la configuration de la plupart des
  terminaux dans ce HOWTO est une tâche décourageante. Il y a beaucoup
  de terminaux différents, mais il y a bien moins de modèles qu'il n'y
  en avait dans les années 1980, la tâche n'est donc pas totalement
  impossible à réaliser.

  Veuillez m'envoyer tous les manuels de terminaux que vous pourriez
  avoir en trop, surtout sur les terminaux fabriqués dans les dix
  dernières années (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>.


  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee HHOOWWTTOO


  Les nouvelles versions du HOWTO seront disponibles à la navigation
  Internet et au téléchargement 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 dernière 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>.)


  11..44..  HHOOWWTTOOss ccoonnnneexxeess



  ·  Le HOWTO Serial possède des informations sur les cartes série
     multiports utilisées à la fois pour les terminaux et les racks de
     modems. Il possède des informations techniques sur le port série.
     Les informations sur les terminaux texte seront enlevées.

  ·  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>


  11..55..  TTeerrmmiinnoollooggiiee uuttiilliissééee ddaannss ccee ddooccuummeenntt


  Configuration veut dire la même chose que mise en place (NdT : j'ai
  utilisé le mot "configuration" tout au long du document). Alors que
  les commandes Linux possèdent 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 matériel 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 sûr de l'affirmation, dites-le moi.


  11..66..  QQuu''eesstt--ccee qquu''uunn tteerrmmiinnaall ??


  Un terminal consiste en un écran et un clavier qu'on utilise pour
  communiquer à distance avec un ordinateur (hôte). On l'utilise comme
  s'il s'agissait d'un ordinateur personnel mais le terminal est éloigné
  de l'ordinateur hôte (à l'autre bout de la pièce ou même à l'autre
  bout du monde). Les programmes s'exécutent sur l'ordinateur hôte mais
  les résultats 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 général limitée à 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'hôte ce qui est tapé au clavier.

  Dans les temps éloignés des gros ordinateurs, du milieu des années
  1970 au milieu des années 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 câble reliait le
  terminal à l'ordinateur (souvent de manière indirecte). On l'appelait
  terminal puisqu'il était situé à une extrémité terminale de ce câble.
  Si vous utilisez Linux (sauf pour une utilisation avec X Window) avec
  un moniteur et un clavier vous savez déjà ce qu'est un terminal parce
  que vous en utilisez un (ou plus précisément 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 différent d'un moniteur parce que c'est un
  montage électronique différent. Un terminal texte est souvent relié au
  port série de l'ordinateur par l'intermédiaire d'un long câble. Ainsi,
  contrairement à un moniteur qui est le plus souvent situé juste à côté
  de l'ordinateur, un terminal peut se situer à une distance assez
  grande de son ordinateur hôte.  La carte vidéo à l'intérieur d'un
  ordinateur stocke l'image vidéo qui apparaît sur l'écran du moniteur.
  Pour un terminal, l'équivalent de cette carte vidéo est construite à
  l'intérieur même du terminal mais puisque les terminaux texte sont
  souvent monochromes sans beaucoup de graphiques, les capacités de
  cette "carte vidéo" sont plutôt faibles. De plus, la plupart des
  terminaux texte n'ont pas de souris.

  Dans la terminologie client-serveur en réseau, on pourrait penser que
  le terminal est le client et l'ordinateur hôte le serveur. Certains
  ont appelé le terminal un "client léger". Ceci n'est pas vraiment
  correct puisque le seul "service" fourni par l'hôte est de recevoir
  chaque lettre tapée au clavier et de réagir à ceci comme un ordinateur
  le ferait. Le terminal ressemble à une fenêtre donnant sur
  l'ordinateur comme l'est un moniteur (et son clavier).  Vous avez
  sûrement déjà utilisé des terminaux virtuels dans Linux (en pressant
  Alt-F2, etc.). Un vrai terminal est la même 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 réel et
  d'utiliser l'ordinateur en même temps que d'autres personnes.


  22..  TTyyppeess ddee tteerrmmiinnaauuxx



  22..11..  TTeerrmmiinnaauuxx ppaassssiiffss


  Il y a plusieurs définitions contradictoires pour un "terminal passif"
  mais à mesure que le temps passe, de plus en plus de terminaux sont
  appelés 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, même ceux qui
  présentent une interface graphique complète (GUI), sont appelés
  passifs. Si tous les terminaux sont "passifs" il n'y a plus de raison
  d'ajouter le mot "passif" derrière 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 considéré ici comme un type de
  terminal.


  22..22..  TTeerrmmiinnaauuxx tteexxttee


  Pour un terminal texte, un flux d'informations à double sens entre
  l'ordinateur et le terminal se forme sur le câble les reliant tous les
  deux.  Ce flux est constitué d'octets ASCII où chaque octet représente
  généralement un caractère.  Les octets tapés au clavier vont vers
  l'ordinateur et la plupart des octets venant de l'ordinateur sont
  affichés sur l'écran du terminal. Des octets spéciaux (ou des
  séquences d'octets) de l'ordinateur indiquent au terminal où déplacer
  le curseur, ce qu'il faut effacer, où démarrer et arrêter le
  soulignement et/ou le clignotement et/ou le gras, etc.  Il y a souvent
  des centaines de commandes spéciales et beaucoup de terminaux peuvent
  même changer leur police.

  La communication utilise des caractères (lettres) encodées avec un
  tableau de codes correspondant au jeu de caractères en cours
  d'utilisation. En général, les 128 premiers octets sur les 256 octets
  possibles utilisent les codes ASCII. Les terminaux pour des systèmes
  de type Unix sont normalement connectés aux ordinateurs par un câble
  qui se déroule entre les ports série asynchrones (RS-232-C =
  EIA-232-D) de l'ordinateur hôte et du terminal.  Quelquefois la
  connexion se fait par modem ou grâce à un serveur de terminaux, etc.

  D'autres noms pour les terminaux texte sont "terminal série",
  "terminal à cellule de caractère", "terminal ASCII/ANSI", "terminal
  asynchrone", "terminal de données", "terminal vidéo" et "terminal
  d'affichage vidéo" (VDT). Dans les jours anciens, "unité d'affichage
  vidéo" (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 possèdent
  aussi cette capacité (qui n'est pas beaucoup utilisée). Les caractères
  que vous tapez sont retenus temporairement dans la mémoire du terminal
  (et peuvent parfois être édités grâce à un éditeur résidant dans le
  terminal). Alors quand la touche envoi (ou autre) est pressée, un bloc
  de caractères (parfois juste une ligne de caractères) 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 périphérique
  bloc (et non un périphérique caractère). Voyez la section ``mode par
  blocs''.


  22..33..  TTeerrmmiinnaauuxx ggrraapphhiiqquueess


  Jusqu'à un certain degré certains symboles ASCII peuvent fournir du
  graphisme aux terminaux texte. On peut faire des flèches <--- et
  dessiner des boîtes avec _ et |. Avec des ensembles spéciaux de
  caractères 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 limitée de graphique.

  Il y a deux types de base pour l'affichage graphique : rastérisé et
  vectorisé (rarement utilisé). Les graphiques rastérisés (en mode point
  par point) affichent des points sur l'écran sur des lignes de balayage
  horizontal par l'intermédiaire 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 déplacer 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 rastérisés sont utilisés
  de manière quasi-universelle de nos jours. Pour les PC, les images
  codées en format graphique vectoriel sont quelquefois utilisées mais
  sont traduites en format graphique rastérisé pour l'affichage (avec
  une baisse de qualité pour l'image).


  22..33..11..  TTeerrmmiinnaauuxx ggrraapphhiiqquueess ssuurr lliiggnnee sséérriiee


  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 présentation d'Amérique du Nord).


  22..33..22..  TTeerrmmiinnaauuxx ggrraapphhiiqquueess rraappiiddeess ((dd''aauuttrreess nnoommss lleeuurr ssoonntt ssoouuvveenntt
  ddoonnnnééss))


  Ceux-ci ne sont pas couverts par ce document. Un terminal qui mérite
  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
  représentent 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 torsadée ou un câble coaxial.
  Les terminaux X Window font partie de ces modèles. Voyez le lien vers
  le HOWTO XTerminal référencé 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
  supérieure de Windows NT. Citrix utilise son protocole ICA et a créé
  un supplément à Hydra nommé pICAsso pour que les terminaux WinFrame
  (ICA) puissent utiliser le système ICA. Hydra est aussi multi-
  utilisateurs. Il y a aussi le "Terminal Personnel Multiconsole" de
  Unbounded Technologies et Tektronix possédait son interface multi-
  utilisateurs mais supportera désormais Hydra. Un article de magazine
  en 1997 a appelé Winterm un "terminal passif" mais il est vraiment
  intelligent.  De tels terminaux sont souvent appelés "clients légers",
  mais certains clients légers sont plus que de simples terminaux
  puisqu'on peut leur faire exécuter du code Java, etc.


  22..44..  QQuuaassii--tteerrmmiinnaauuxx ((== QQuuaassii--oorrddiinnaatteeuurrss))


  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 entièrement graphiques et se
  connectent à un ordinateur serveur. Ils sont différents des terminaux
  puisque le programme qu'ils font tourner s'exécute sur leur propre
  processeur. Du code Java peut leur être envoyé pour être exécuté. Ils
  devraient fonctionner sur des réseaux IP et pourraient fonctionner
  avec un serveur sous Linux. Wintel a fabriqué un "NetPC" qui, à la
  différence 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.


  22..55..  ÉÉmmuullaattiioonn ssuurr uunn PPCC


  Puisqu'un PC possède un écran et un clavier (comme un terminal) mais
  possède 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 théorie, simuler n'importe lequel des types ci-dessus (mais la plus
  commune est l'émulation d'un terminal texte).  Voyez ``émulation de
  terminal''

  33..  IInnssttaallllaattiioonn rraappiiddee


  Voici une procédure rapide pour installer un terminal sans passer par
  une procédure de ``mise en place'' à la fois pour le terminal et
  l'ordinateur hôte. Cela ne fonctionnera probablement pas bien s'il se
  trouve que le terminal a été configuré de manière 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 entrée le concernant (voir ``terminfo
  et termcap (détaillé)''). Déterminez sur quel port série vous le
  brancherez et quelle est le nom tty pour ce port (par exemple, ttyS1,
  voyez ``noms de périphériques'').  En tant qu'utilisateur root, éditez
  /etc/inittab et ajoutez une commande getty à côté des autres commandes
  getty. Le format de la commande getty dépend 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 paramètres de
  getty, utilisez le nom terminfo (ou termcap) de votre terminal, comme
  vt100. Entrez une vitesse de transmission supportée par le terminal.
  Si vous mettez la vitesse trop haut vous aurez peut-être besoin
  d'utiliser le ``contrôle de flux''.

  Connectez alors physiquement le port série principal du terminal au
  port série choisi de l'ordinateur avec un câble null-modem et allumez
  le terminal.  N'espérez pas que la plupart des câbles tout prêts
  soient câblés correctement pour gérer le contrôle de flux matériel.
  Assurez-vous que la vitesse de transmission du terminal est la même
  que celle que vous avez donnée à getty et que son paramètre "bits de
  données" 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
  ``régler les problèmes''.


  44..  PPoouurrqquuooii uuttiilliisseerr uunn tteerrmmiinnaall ??



  44..11..  IInnttrroodduuccttiioonn ssuurr llee ffaaiitt dd''uuttiilliisseerr uunn tteerrmmiinnaall


  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 exécutent des tâches faibles en charge
  telles que l'édition de texte, l'entrée de données, etc. Une manière
  de faire ceci est de relier un certain nombre de terminaux à un seul
  ordinateur (ordinateur hôte) par l'intermédiaire de modems ou de
  connexions directes par câble. Pour ce faire, on a besoin d'un système
  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 "distribuée" sur un
  réseau est aussi une sorte de partage de temps. On pourrait mieux le
  décrire comme de l'informatique "centralisée". Mais l'ordinateur
  central peut être connecté au reste du monde par un réseau 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 systèmes
  d'exploitation populaires qui les ont utilisés (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, système d'exploitation multi-utilisateurs, est
  disponible pour les PC, l'utilisation de terminaux avec des PC devient
  envisageable. L'inconvénient est que les terminaux texte ne sont pas
  assez perfectionnés pour supporter le type d'interface graphique
  utilisateur (GUI) que bien des utilisateurs d'ordinateur attendent de
  nos jours.


  44..22..  UUnnee rréédduuccttiioonn dduu ccooûûtt dduu mmaattéérriieell ??


  Quand les ordinateurs (même les PCs) étaient relativement chers,
  l'utilisation de terminaux tirait les coûts du matériel vers le bas de
  manière significative. Maintenant, avec les PCs bon marché, les
  économies sur les coûts sont un problème. Voici ce que j'ai écrit il y
  a des années quand les PCs étaient plus chers. C'est encore vrai
  maintenant, mais dans une moindre mesure.

  Si plusieurs personnes utilisent le même ordinateur en même temps, il
  y a une diminution de la quantité de matériel nécessaire pour le même
  niveau de service. Une façon de faire des économies est due au partage
  du code. Les fichiers des applications sur les disques durs sont
  partagés, de même que les bibliothèques partagées en mémoire (même si
  les gens font tourner des programmes différents, à condition qu'ils
  utilisent certaines fonctions identiques dans leur code). Une autre
  façon d'économiser est due à la réduction du pic de charge. Le
  matériel d'un seul PC peut être inactif la plupart du temps pendant
  que les gens entrent les informations lentement, réfléchissent,
  discutent ou s'éloignent de leur bureau. Avoir plusieurs personnes sur
  le même ordinateur à la fois fait bon usage d'une bonne partie de ce
  temps d'inactivité qui, sinon, serait gâché.

  Ces économies sont substantielles. On peut estimer grossièrement (en
  utilisant la théorie 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 mémoire, espace disque, processeur(s),
  etc.) qu'un PC unique afin de fournir le même niveau de service par
  personne. Le coût par utilisateur du matériel de calcul pour un tel
  système partagé devrait donc être trois fois moindre. Cependant, le
  coût du système d'affichage (écrans, claviers, électronique vidéo,
  etc.) est à peu près le même dans les deux cas.  Les terminaux
  induisent cependant un surcoût : l'équipement de l'ordinateur hôte
  avec des ports série supplémentaires.

  Pour faire une comparaison juste avec les PC, les terminaux devraient
  avoir les mêmes capacités 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
  élevés, et par conséquent dans ce cas les économies en coût de
  matériel, 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.


  44..33..  CCoonnttrrôôllee ddeess llooggiicciieellss


  En informatique centralisée, les logiciels (et les mises à jour des
  logiciels) ne doivent être installés que sur un seul ordinateur hôte
  au lieu de plusieurs. La personne qui s'occupe de cet ordinateur peut
  contrôler les logiciels qui y sont installés. Ceci est avantageux si
  la personne qui contrôle l'ordinateur hôte fait du bon travail et
  connaît les besoins et préférences des autres utilisateurs. On peut
  empêcher les utilisateurs de jouer à des jeux ou de naviguer sur
  Internet en n'installant pas les logiciels (ou bien en en restreignant
  l'accès). Que le contrôle centralisé soit désirable ou non dépend de
  chaque situation.


  44..44..  MMiisseess àà jjoouurr dduu mmaattéérriieell


  Avec les terminaux, les mises à jour du matériel de l'ordinateur ne
  prennent place que sur un ordinateur au lieu de plusieurs. Ceci
  économise un effort d'installation. Alors que le coût du matériel pour
  la mise à jour de l'ordinateur hôte sera plus important que pour un PC
  simple (puisque l'hôte a besoin de plus de puissance de calcul qu'un
  PC), le coût sera bien moindre que de mettre à jour le nombre de PC
  qu'on utiliserait à la place des terminaux.


  44..55..  AAuuttrreess aavvaannttaaggeess ddeess tteerrmmiinnaauuxx



  ·  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 données et des
     fichiers et peuvent s'envoyer du courrier électronique. C'est la
     même chose qu'un réseau local.


  44..66..  DDééssaavvaannttaaggeess mmaajjeeuurrss ddeess tteerrmmiinnaauuxx



  ·  Les terminaux texte ne disposent pas d'affichage graphique rapide
     (ou de graphiques haute résolution) bien qu'ils utilisent souvent
     des jeux de caractères graphiques pour dessiner des boîtes, etc. Ce
     manque limite les logiciels qu'on peut utiliser dessus.

  ·  Si l'ordinateur hôte s'arrête, plus personne ne peut utiliser les
     terminaux non plus (sauf si on peut se connecter sur un autre
     ordinateur).


  44..77..  LLeess tteerrmmiinnaauuxx tteexxttee ssoonntt--iillss oobbssoollèètteess ??


  Les terminaux texte représentent une technologie obsolète parce que
  pour un matériel légèrement plus cher, on pourrait construire un
  terminal intelligent (avec la même qualité d'affichage). Ceci n'a pas
  toujours été le cas puisque aux alentours de 1980 la mémoire coûtait
  des milliers de francs par méga-octet. Maintenant avec de la mémoire
  et des processeurs à bas prix, on pourrait faire un terminal texte
  intelligent pour une augmentation du coût du matériel de seulement 10
  à 20 %.

  Les raisons pour lesquelles les terminaux texte ne sont pas encore
  obsolètes sont :


  ·  Il n'y a pas d'interface normalisée satisfaisante pour des
     terminaux graphiques intelligents. Le système 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 coûteux et mettent en théorie plus de
     temps à devenir obsolètes, mais peuvent cependant donner accès à un
     ordinateur bien plus récent (et plus puissant).

  ·  Puisque le fonctionnement d'un terminal texte (en opposition à un
     terminal entièrement graphique) ne consomme pas beaucoup de
     ressources sur un PC moderne, on peut faire tourner beaucoup de
     terminaux sur un seul PC.


  55..  VVuuee dd''eennsseemmbbllee dduu ffoonnccttiioonnnneemmeenntt ddeess tteerrmmiinnaauuxx ((ssoouuss LLiinnuuxx))


  Voir aussi la section ``quelques détails sur le fonctionnement des
  terminaux''.


  55..11..  NNoommss ddee ppéérriipphhéérriiqquueess


  Chaque terminal est relié à un port série sur l'ordinateur hôte
  (souvent un simple PC). Les ports ont les noms suivants : ttyS0,
  ttyS1, ttyS2, etc. Ils sont représentés par des fichiers spéciaux dans
  le répertoire /dev (device : périphérique). /dev/ttyS0 correspond au
  COM1 sous DOS ou Windows. ttyS1 est le COM2, etc. Voyez ``fichiers
  spéciaux pour les terminaux'' pour plus de détails sur ceux-ci et les
  "périphériques" connexes tels que cua.


  55..22..  SSee llooggggeerr // ssee ddééllooggggeerr


  Quand l'ordinateur hôte démarre il lance le programme getty (voyez le
  HOWTO Serial 4.1 et 7.2) sur chaque port série qui y possède un
  terminal (ainsi qu'il est spécifié dans le fichier /etc/inittab). Le
  programme getty lance le programme "login" pour que les gens puissent
  se logger. Une invite "login:" apparaît à l'écran. Les gens sur le
  terminal se loggent (après avoir donné leur mot de passe) et ont alors
  accès à l'ordinateur. Quand il est temps d'éteindre le terminal, on se
  délogge en général 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).


  55..33..  HHaallff//FFuullll DDuupplleexx


  Si on regarde quelqu'un taper sur un terminal, les lettres tapées
  apparaissent simultanément sur l'écran. Une personne naïve pourrait
  penser que ce qu'on tape est envoyé directement du clavier à l'écran
  avec une copie dirigée vers l'ordinateur (de manière half-duplex, voir
  le paragraphe suivant). Ce qui se passe généralement est que ce qui
  est tapé au clavier est envoyé directement à l'ordinateur hôte
  uniquement qui en retour renvoie au terminal chaque caractère qu'il
  reçoit (ce qu'on appelle full-duplex). Dans certains cas (comme les
  mots de passe ou des commandes brutes d'éditeurs) les lettres tapées
  ne sont pas renvoyées.

  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 répéter les caractères que vous
  tapez (et que vous lui envoyez) et par conséquent le terminal doit
  aussi envoyer directement sur son écran chaque caractère que vous
  tapez. Certains terminaux possèdent un mode de fonctionnement half-
  duplex qui est rarement utilisé.


  55..44..  MMéémmooiirree dduu tteerrmmiinnaall


  L'image sur un tube à électrons s'évanouira presque instantanément à
  moins qu'elle ne soit réaffichée fréquemment sur l'écran par un
  faisceau d'électrons lancés sur la face du tube. Puisque que le texte
  envoyé à un terminal doit rester sur l'écran, l'image de l'écran doit
  être stockée dans les puces mémoire du terminal et le faisceau
  d'électrons doit balayer l'écran de façon répétée (disons 60 fois par
  seconde) pour maintenir l'image. Voyez ``mémoire du terminal'' pour
  plus de détails.


  55..55..  CCoommmmaannddeess ppoouurr llee tteerrmmiinnaall


  Le terminal est sous le contrôle 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 exécute. Ce sont des
  ``codes de contrôle'' (octets) et des ``séquences d'échappement''. Par
  exemple, le code de contrôle CR (retour chariot) déplace le curseur
  sur le côté gauche de l'écran. Une certaine séquence d'échappement
  (plusieurs octets dans lesquels le premier octet est le code de
  contrôle d'"échappement") peut déplacer le curseur à l'emplacement de
  l'écran spécifié par les paramètres placés dans la séquence
  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 modifiée à certains endroits : fort, faible,
  souligné, clignotant et vidéo inverse. Un haut-parleur dans un
  terminal peut émettre un "cliquetis" quand une touche est pressée ou
  émettre un bip si une erreur s'est produite. Les touches de fonctions
  peuvent être programmées pour des utilisations spéciales. Des polices
  variées peuvent exister. On peut faire défiler l'affichage vers le
  haut ou vers le bas. On peut effacer des parties spécifiques de
  l'affichage. On peut utiliser divers types de contrôle de flux pour
  arrêter le flux de données quand les octets sont envoyés au terminal
  plus rapidement que le terminal ne peut le supporter. Il y en a bien
  plus, que vous découvrirez en parcourant une notice de terminal très
  technique ou à travers les liens Internet de la ``liste des séquences
  d'échappement''.


  55..66..  MMaannqquuee ddee nnoorrmmaalliissaattiioonn rrééssoolluu ppaarr TTeerrmmiinnffoo


  Alors que les terminaux faits pour les États-Unis utilisaient tous le
  même code ASCII pour l'alphabet (sauf les terminaux IBM qui
  utilisaient EBCDIC), il n'utilisaient malheureusement pas tous les
  mêmes séquences d'échappement.  Ceci s'est produit même après 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 possibilités des nouveaux terminaux.  Ceci pouvait
  poser des problèmes. Par exemple, l'ordinateur pouvait envoyer une
  séquence d'échappement à un terminal lui disant de séparer l'écran en
  deux fenêtres de taille spécifiée, sans réaliser que le terminal était
  incapable de le faire.

  Pour surmonter ces problèmes une base de données appelée "termcap"
  (maintenant "terminfo") a été mise en place. Cette base de données
  réside dans certains fichiers sur l'ordinateur et en a une partie
  (quelquefois le fichier entier) pour chaque modèle de terminal. Pour
  chaque modèle (comme le VT100) une liste des capacités est fournie,
  avec une liste de certaines séquences d'échappement disponibles et ce
  qu'elles font. Voyez la section ``termcap et terminfo (détaillés)''
  pour plus de détails.  Les applications peuvent utiliser cette base de
  données en appelant certains programmes de la bibliothèque C. Un grand
  ensemble de tels programmes (il y en a plus de 200) est appelé
  "ncurses" et ils sont listés sur la page de manuel de ncurses.


  55..77..  LL''iinntteerrffaaccee


  La variable d'environnement TERM décrit le type de terminal que Linux
  croit que vous utilisez. Certaines applications l'utilisent pour
  regarder les capacités dans la base de données terminfo et par
  conséquent TERM doit être positionnée correctement. Mais que
  l'ordinateur connaisse les capacités 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 même
  vitesse (en bits par seconde) qu'ils sont envoyés du terminal. Si on
  configure le terminal pour recevoir à 19200 bauds et que l'ordinateur
  envoie des caractères à 9600 bauds, on ne verra à l'écran que des
  parasites (ou peut-être rien du tout).  On sélectionne la vitesse de
  transmission pour un terminal (ainsi que bien d'autres possibilités) à
  partir des menus de "configuration" (set-up) sur le terminal.  La
  plupart des terminaux possèdent un grand nombre d'options dans leurs
  menus de "configuration" (voyez  ``configuration du terminal
  (détaillée)''). Le port série de l'ordinateur a aussi des options et
  ces options doivent être configurées d'une manière compatible (voyez
  ``configuration de l'ordinateur (détaillée)'').


  55..88..  ÉÉmmuullaattiioonn


  La plupart des terminaux de nos jours possèdent plus d'une émulation
  (personnalité ou "mode de terminal"). Les numéros de modèles des
  terminaux fabriqués autrefois par DEC (Digital Equipment Corporation,
  maintenant Compaq) commencent par VT (par exemple, VT100). Bien
  d'autres terminaux différents des VT100 peuvent être configurés 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 conséquent 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 personnalités "naturelles" ont en général plus
  de capacités 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 chargés dans
  la mémoire 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).  Même certaines fenêtres dans X Window
  émulent des terminaux. Voyez ``émulation de terminal''.


  55..99..  LLaa ccoonnssoollee


  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 reçoit des messages du noyau
  concernant la progression du démarrage (boot) et de l'arrêt 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''.


  66..  FFiicchhiieerrss ssppéécciiaauuxx ppoouurr lleess tteerrmmiinnaauuxx tteellss qquuee //ddeevv//ttttyy


  "tty" est l'abréviation de "Teletype". Les premiers terminaux étaient
  des télétypes (comme machine à écrire pilotée à distance). Voyez la
  sous-section ``télétypes''.


  66..11..  TTeerrmmiinnaauuxx ssuurr ppoorrtt sséérriiee


  L'ordinateur considère chaque port série comme un "périphérique". On
  l'appelle parfois périphérique terminal puisqu'à un moment les
  terminaux représentaient une utilisation courante des ports série.
  Pour chacun de ces ports série, il existe un fichier spécial dans le
  répertoire /dev (device : périphérique). /dev/ttyS0 est le fichier
  spécial pour le port série 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 spécial 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 même, 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 Série) il y a aussi une série de "cua" : cua0, cua1, cua2, etc.
  cua0 correspond au même port que ttyS0, etc. Le "cu" dans cua veut
  dire CalloUt (appel sortant). Les séries ttyS sont conformes à Posix
  alors que l'utilisation de cua peut permettre l'ouverture d'un port
  dont les lignes de contrôles du modem affirment qu'il n'est pas prêt.
  À partir du noyau 2.2 cua est obsolète et un message d'avertissement
  est affiché quand vous essayez de l'utiliser (bien qu'il fonctionne
  encore). Pendant les dernières années, il n'était présent 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.


  66..22..  PPsseeuuddoo--tteerrmmiinnaauuxx


  Les pseudo-terminaux n'ont pas de connecteur physique associé sur
  l'ordinateur. On les utilise pour émuler un port série. Par exemple,
  si quelqu'un se connecte grâce à telnet sur votre ordinateur à travers
  un réseau, il peut se trouver connecté au périphérique /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 même port série physique.

  Les pseudo-terminaux vont par deux comme ttyp3 et ptyp3. La série
  pty... est le terminal maître ou contrôleur et la série tty... est
  l'esclave. ttyq5 est aussi un pseudo-terminal comme l'est ttysc (``c''
  est un chiffre hexadécimal).  Plus précisément, les pseudo-terminaux
  maîtres sont /dev/pty[p-s]N et les esclaves correspondants sont
  /dev/tty[p-s]N où N est un chiffre hexadécimal.


  66..33..  LLee tteerrmmiinnaall ccoonnttrrôôllaanntt //ddeevv//ttttyy


  /dev/tty est le terminal contrôlant (s'il y en a un) le processus en
  cours (le processus qui utilise "/dev/tty" dans une commande). Pour
  déterminer quels ttys sont attachés à 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
  périphérique du terminal en cours avec certaines possibilités
  supplémentaires pour les programmeurs en C : voyez la page de manuel
  tty(4).


  66..44..  ""TTeerrmmiinnaauuxx"" //ddeevv//ttttyyIINN


  N représente un entier. L'une des utilisations possibles de ces
  terminaux dans Linux est le paquet du pilote ISDN (RNIS) : isdn4linux.
  La série ttyIN ressemble à ttySN. Il y a aussi une série cuiN qui
  ressemble à cuaN. Les séries ttyI et cui émulent des modems et on peut
  leur envoyer des commandes de modems.


  66..55..  LLaa ccoonnssoollee :: //ddeevv//ttttyyNN


  Dans Linux le moniteur du PC est en général appelé la console et on
  lui associe plusieurs fichiers spéciaux de périphériques : 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 différents terminaux virtuels et ainsi avoir
  plusieurs sessions différentes tournant en même temps sur
  l'ordinateur. Vous basculez de l'une à l'autre en utilisant la touche
  Alt-F?  où "?" est le numéro de terminal virtuel que vous désirez. La
  console est aussi appelée /dev/tty0 et les messages du système peuvent
  aller sur ce périphérique et s'afficher sur votre console. Seuls le
  système et l'utilisateur root peuvent écrire dans /dev/tty0 à laquelle
  /dev/console est quelquefois liée. Les messages du système peuvent
  aussi être écrits directement à l'adresse matérielle de la console,
  court-circuitant ainsi /dev/tty0. Pour plus d'informations sur la
  console, voyez ``la console Linux''.


  66..66..  CCrrééeerr uunn ppéérriipphhéérriiqquuee aavveecc ""mmkknnoodd""


  Le répertoire /dev est installé avec beaucoup de fichiers spéciaux de
  périphériques. Si vous avez besoin de quelque chose non présent dans
  ce répertoire, vous pouvez essayer de le créer avec la commande
  "mknod". Voyez la page de manuel de ttys(4) pour savoir comment le
  faire pour les ports série.  Pour utiliser mknod vous devez connaître
  les numéros de périphériques mineur et majeur. Vous pourriez déduire
  les numéros dont vous avez besoin en utilisant la commande "ls -l"
  dans le répertoire /dev.  Elle affichera les numéros majeur et mineur
  des fichiers spéciaux existants.



  77..  QQuueellqquueess ddééttaaiillss ssuurr llee ffoonnccttiioonnnneemmeenntt ddeess tteerrmmiinnaauuxx


  Si vous ne connaissez presque rien sur les terminaux, je vous suggère
  de lire en premier ``introduction'' et de lire aussi ``survol du
  fonctionnement des terminaux''.


  77..11..  MMéémmooiirree dduu tteerrmmiinnaall


  L'écran du terminal se rafraîchit peut-être 60 fois par seconde à
  partir d'une image stockée dans la mémoire du terminal. Pour un PC
  l'image du moniteur est stockée dans la mémoire de la carte vidéo à
  l'intérieur de l'ordinateur mais pour un terminal, l'équivalent de la
  carte vidéo est à l'intérieur du terminal. Pour un terminal texte le
  stockage d'une image utilise peu de mémoire. Au lieu de placer chaque
  point (pixel) sur l'écran en mémoire, ce qui demande le stockage d'à
  peu près 250.000 points, on utilise une méthode de stockage bien plus
  efficace.

  Un écran rempli de texte peut être représenté dans la mémoire du
  terminal par des octets ASCII, un pour chaque caractère à l'écran. Un
  écran entier ne prend qu'environ 2 K octets ASCII. Pour afficher ces
  caractères, le terminal doit aussi connaître l'image (la forme) de
  chacun des presque 100 caractères ASCII imprimables. L'image d'un
  caractère n'occupant que, disons, 15 octets, on n'a besoin que
  d'environ 1,5 K de mémoire pour les images de tous les caractères
  ASCII (la police). Ce texte ASCII et la mémoire de la police sont
  balayés pour que l'image résultante soit affichée à l'écran environ 60
  fois par seconde.  C'est une forme de mémoire partagée où l'image
  unique d'une lettre telle que la lettre e est partagée par toutes les
  nombreuses lettres e qui apparaissent sur un écran rempli de texte.
  Une faible demande en mémoire impliquait des coûts réduits pour
  produire des moniteurs au début des années 1980 quand le coût de la
  mémoire était plusieurs milliers de fois plus important qu'il ne l'est
  actuellement (ce qui représentait à l'époque plusieurs dollars par
  kilo-octet).


  77..22..  LLeess pprreemmiieerrss tteerrmmiinnaauuxx


  Les premiers terminaux ressemblaient à des machines à écrire
  contrôlées à distance qui ne pouvaient "afficher" (imprimer sur du
  papier) que le flux de caractères que leur envoyait l'ordinateur. Les
  premiers modèles étaient appelés ``télétypes''. Le nom "tty" n'est que
  l'abréviation 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 caractère sonnette (bell)
  était reçu. À cause du manque de possibilités significatives, ce sont
  les premiers terminaux à avoir reçu 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 déterminer avec quelle sorte de terminal il
  communique.


  77..33..  SSééqquueenncceess dd''éécchhaappppeemmeenntt eett ccooddeess ddee ccoonnttrrôôllee ((iinnttrroodduuccttiioonn))


  Les terminaux possèdent beaucoup de possibilités dont certaines sont
  toujours présentes ; pour les autres, l'ordinateur doit envoyer des
  commandes au terminal afin de modifier ou activer ces possibilités.
  Mettre en oeuvre toutes ces possibilités sous le contrôle d'un
  ordinateur nécessite la mise en place de codes spéciaux pour que
  l'ordinateur puisse dire au terminal ce qu'il doit faire. Il y a deux
  grandes sortes de codes : les séquences d'échappement et les code de
  contrôle (caractères de contrôle). Il y a bien plus de séquences
  d'échappement que de codes de contrôle.


  77..33..11..  CCooddeess ddee ccoonnttrrôôllee


  Les codes de contrôle (ou caractères de contrôle) sont constitués des
  32 premiers octets de l'alphabet ASCII. Ils comprennent les codes
  suivants : retour chariot (curseur à l'extrémité gauche), saut de
  ligne (curseur une ligne vers le bas), retour en arrière, caractère
  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 affichés quand le terminal les
  recevra. On l'appelle parfois "Contrôles d'affichage" ou "Moniteur".
  Si vous faites ceci, l'affichage aura l'air légèrement dans le
  désordre puisque les séquences d'échappement, qui commencent toutes
  par le caractère de contrôle ESC (escape, échappement), ne seront plus
  exécutées. Les mots qui devraient apparaître en haut ou en bas de
  l'écran apparaîtront à d'autres endroits. Les séquences d'échappement
  pour repositionner le curseur s'afficheront sur l'écran mais le
  curseur ne se déplacera pas vers la destination indiquée par la
  séquence d'échappement.


  77..33..22..  SSééqquueenncceess dd''éécchhaappppeemmeenntt


  Puisque qu'il n'y pas assez de codes de contrôle pour tout faire (et
  pour une raison ou pour une autre, ils ne sont pas tous utilisés), on
  utilise de nombreuses séquences d'échappement. Elles sont constituées
  du caractère de contrôle d'échappement (ESC) suivi d'une séquence de
  caractères ordinaires.  En recevant un caractère d'échappement, le
  terminal examine les caractères suivants pour interpréter la séquence
  et exécuter la commande voulue par l'ordinateur. Une fois que la fin
  d'une séquence valide est reconnue, les caractères suivants
  s'affichent simplement à l'écran (sauf s'il s'agit de codes de
  contrôle ou de séquences d'échappement supplémentaires). Certaines
  séquences d'échappement peuvent prendre des paramètres (ou arguments)
  comme les coordonnées écran pour déplacer le curseur. Les paramètres
  font partie de la séquence d'échappement. Une ``liste des séquences
  d'échappement'' se trouve sur le Web pour certains terminaux, mais
  c'est un peu brutal.

  Une liste des séquences d'échappement pour votre terminal devrait se
  trouver dans le "manuel du programmeur" de votre terminal. À part pour
  de très vieux terminaux, il devrait y avoir deux ou trois cents
  séquences. Si vous n'avez pas de manuel, ce n'est pas facile de les
  trouver. Certaines séquences sont disponibles sur Internet. Un lien
  possible est ``liste des séquences d'échappement''. En cherchant une
  séquence sur Internet (comme ESC[5m) vous pouvez tomber sur une longue
  liste.

  Une autre façon de déterminer certaines séquences est de trouver la
  section termcap (terminfo) du terminal et de la décoder mentalement.
  Voyez ``terminfo et termcap (détails)'' dans ce document et/ou le
  ``manuel termcap'' sur Internet. Malheureusement, la section termcap
  (terminfo) d'un terminal ne liste souvent pas toutes les séquences
  d'échappement disponibles sur le terminal, mais heureusement, les plus
  importantes sont en général présentes.




  77..44..  AAttttrriibbuuttss dd''aaffffiicchhaaggee eett ccooookkiieess mmaaggiiqquueess


  Les terminaux possèdent diverses méthodes pour générer des attributs
  de caractères tels que gras, vidéo inverse, soulignement, etc.
  L'utilisateur ne devrait pas s'inquiéter de la manière dont c'est
  géré, sauf que cela peut poser des problèmes pour certains vieux
  terminaux et il y a quelquefois une option à ce sujet dans le menu de
  configuration des terminaux plus récents.

  La méthode des cookies magiques (magic cookie) est dépassée. C'est la
  méthode la plus simple (et la pire) pour définir des attributs :
  l'utilisation d'un octet particulier pour démarrer un attribut et un
  autre pour indiquer la fin de cet attribut. Par exemple, un octet
  magique "démarrer le soulignement" est placé juste devant le premier
  mot à souligner. Ces octets supplémentaires sont placés dans la
  mémoire de la page écran, comme les octets pour les caractères qui
  s'affichent normalement. Ceci peut cependant fausser le décompte du
  nombre de caractères par ligne puisque les caractères de cookies
  magiques non imprimables sont mélangés avec les autres caractères
  imprimables. Ceci peut dans certains cas poser des problèmes.

  Une méthode plus efficace, qui utilise plus de mémoire, est d'associer
  un caractère d'attribut (ou un demi-caractère, etc.) à chaque
  caractère affiché.  Cette méthode est utilisée par les cartes vidéo PC
  (pour le texte) pour les moniteurs PC courants.


  88..  PPoossssiibbiilliittééss ssppéécciiaalleess ddee cceerrttaaiinnss tteerrmmiinnaauuxx



  88..11..  CCoouulleeuurr


  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 possèdent le noir (faisceau
  d'électrons éteint = luminosité nulle). Un véritable terminal couleur
  peut modifier la couleur du texte et du fond avec plusieurs couleurs
  différentes alors qu'un terminal monochrome ne peut modifier que la
  luminosité d'une couleur donnée.

  Cependant, changer la luminosité, etc. offre bien des possibilités.
  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 légèrement 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 télévision. Le tube possède trois couleurs de points,
  chacune étant contrôlée par son propre faisceau d'électrons (il y a
  trois faisceaux).  Le monochrome a par définition une meilleure
  résolution puisqu'il ne dépend pas de points fixés en permanence à
  l'écran. Pour les terminaux texte la seule utilisation de la couleur
  permet de différencier le texte et cet avantage ne vaut pas toujours
  le coût d'une résolution moins bonne. Le monochrome peut donc être
  meilleur puisqu'il est aussi moins cher.


  88..22..  SSeessssiioonnss mmuullttiipplleess


  Pour les sessions doubles, le terminal possède deux ports série de
  statut égal. Chaque port est connecté au port série d'un ordinateur
  différent. Ainsi on peut se logger sur deux ordinateurs différents,
  chaque session s'affichant dans une fenêtre de l'écran séparé en deux.
  Autrement, chaque session peut s'exécuter en plein écran et on utilise
  une touche "rapide" (hot key) pour accéder directement à une session
  (ou une même touche pour basculer). On pourrait aussi se connecter sur
  deux ports série différents sur le même ordinateur et se logger deux
  fois (de manière 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.


  88..33..  PPoorrtt iimmpprriimmaannttee//aauuxxiilliiaaiirree


  Beaucoup de terminaux possèdent un connecteur à l'arrière pour un tel
  port.  Il peut s'appeler "Aux" ou "Printer", etc. Certains ports
  d'imprimantes sont destinés aux imprimantes parallèle alors que
  d'autres sont destinés aux imprimantes série.  Si une imprimante est
  connectée 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 mémoire vidéo à l'intérieur du terminal peut
  ne pas retenir les deux sessions et vous pouvez avoir besoin de
  rafraîchir 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 tâche. Il
  existe de nombreuses combinaisons de touches et de séquences
  d'échappement pour contrôler 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 reliée 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 ??


  88..44..  PPaaggeess


  Beaucoup de terminaux permettent le stockage de plus d'une page dans
  leur mémoire vidéo. Quelquefois la taille de la page est la même que
  celle de l'écran, mais elle est parfois plus grande, ce qui fait que
  le défilement révèlera les parties invisibles de la page. Quand
  quelqu'un regarde un écran, il peut y avoir du texte caché sur la même
  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.

  Même 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'hôte envoie des données au
  terminal. L'un des avantages de stocker des pages supplémentaires dans
  la mémoire du terminal est que vous pouvez y accéder instantanément
  sans attendre une seconde ou presque qu'elles soient transmises depuis
  l'hôte.

  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 sûrement 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 stockées sur l'ordinateur
  et vous ne pouvez avoir qu'une fenêtre-page pour chaque programme en
  cours.


  88..55..  JJeeuuxx ddee ccaarraaccttèèrreess


  Un jeu de caractères est normalement représenté par une liste (ou
  table ou tableau) de caractères accompagnée du code d'octet assigné à
  chaque caractère. Les codes d'un octet vont de 0 à 255 (00 à FF en
  hexadécimal).  Dans MS-DOS, les tables de jeux de caractères sont
  appelées "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 caractères les plus courants utilisés 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 caractères sont en général
  disponibles (sauf sur de très vieux terminaux où le seul choix est
  l'ASCII). La première moitié de la plupart des jeux de caractères sont
  les caractères ASCII traditionnels et la deuxième moitié (les
  caractères avec le bit de haut rang  mis à 1) appartiennent à une
  grande variété de jeux de caractères. Les jeux de caractères sont
  souvent des normes ISO. Pour obtenir des jeux de caractères
  spécialisés sur un terminal, vous devrez certainement télécharger une
  police logicielle pour ce jeu de caractères dans la mémoire du
  terminal.

  À côté de l'ASCII, il y a d'autres jeux de caractères courants, tous
  en 8 bits. CP est l'abréviation des jeux de caractères de page de
  codes (Code Page) inventés par IBM : CP-437 (ECS DOS), CP-850 (Latin 1
  multilingue -- pas le même que ISO Latin-1), ISO-8859-1 (Latin-1),
  ANSI (dérivé de Latin-1). MS Windows utilise ANSI alors qu'Internet
  utilise souvent Latin-1.  Il y a plusieurs jeux de caractères 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 caractères très grand dans lequel chaque
  caractère est représenté sur deux octets au lieu d'un seul.

  Voici plus d'informations sur les ensembles de caractères :


  ·  Pages de manuel : ASCII et latin1

  ·  Les HOWTOs pour diverses langues (sûrement écrits dans cette langue
     spécifique). Voyez "Cyrillic" pour le russe.

  ·  <http://www.cc.columbia.edu/kermit/charsets.html> pour une liste
     courte des divers noms de jeux de caractères.

  ·  <http://www.pku.edu.cn/on_line/w3html/International/Overview.html>
     pour des informations sur les jeux de caractères et Internet.

  ·  Langues, pays et jeux de caractères
     <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 numéro) du jeu de caractères qui
  vous intéresse, vous pouvez chercher plus d'informations dessus sur
  Internet.


  88..66..  PPoolliicceess


  La plupart des terminaux fabriqués après le milieu des années 1980
  peuvent accepter des polices logicielles téléchargées. Ceci veut dire
  qu'ils peuvent afficher quasiment n'importe quel jeu de caractères à
  condition que vous trouviez la police logicielle pour celui-ci. Si
  vous ne pouvez pas trouver la police logicielle nécessaire, vous
  pouvez toujours créer la vôtre. Un éditeur de polices libre pour
  effectuer ceci s'appelle BitFontEdit (écrit par l'auteur de ce
  document) et se trouvait (en 1998) à
  Amérique du Nord :  <ftp://cs.utk.edu/pub/shuford/BitFontEdit.tar.gz>


  88..77..  CCllaavviieerrss eett ttoouucchheess ssppéécciiaalleess


  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 supplémentaires qui ne sont pas listées ici. Certains d'entre
  eux possèdent un grand nombre de touches à usage spécial comme les
  terminaux faits pour les caisses enregistreuses. Il y a souvent bien
  plus de significations pour les touches que ce qui est décrit 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 très long (intervalle = +12 V)
     de durée de 300 à 700 millisecondes vers l'hôte. L'hôte peut
     l'interpréter comme une interruption si stty a positionné brkint ou
     l'ignorer si ignbrk est positionné.

  ·  NO SCROLL (pas de défilement) arrête le défilement de l'écran comme
     le fait ^S. Presser la touche à nouveau reprend le défilement.
     Utilise des signaux de contrôle de flux pour faire ceci.

  ·  REPEAT (répétition) si on la maintient avec une autre touche, force
     la sortie répétée de cette autre touche même si l'option de
     répétition automatique est désactivée.

  ·  LINE FEED (saut de ligne) envoie le caractère de saut de ligne ^J à
     l'hôte. Rarement utilisée.

  ·  SET-UP (configuration) permet la configuration manuelle du terminal
     par l'intermédiaire de menus. Quelquefois désactivée à dessein en
     plaçant un bloc en dessous pour qu'on ne puisse pas la presser.
     Parfois il faut appyer sur une autre touche en même temps comme
     Shift ou Control. Voyez ``entrer dans le mode de configuration''.

  ·  LOCAL déconnecte le terminal de l'hôte. En local, ce qu'on tape va
     directement à l'écran. Utile pour faire des tests.

  ·  RETURN (retour chariot) est la même chose que la touche "Entrée"
     sur un PC. Elle envoie en général un retour chariot à l'hôte qui
     est normalement traduit en un caractère nouvelle ligne par le
     pilote de périphériques de l'hôte. 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 généralement programmer pour envoyer une séquence d'octets
     (caractères).  Voyez ``touches de fonction''


  99..  ÉÉmmuullaattiioonn ddee tteerrmmiinnaall ;; llaa ccoonnssoollee



  99..11..  ÉÉmmuullaattiioonn ddee tteerrmmiinnaall



  99..11..11..  IInnttrroodduuccttiioonn àà ll''éémmuullaattiioonn ddee tteerrmmiinnaall


  Puisqu'un PC possède un écran et un clavier (comme un terminal) mais
  possède 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 intégrés dans les versions
  récentes 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 possèdent des
  moniteurs couleur mais que les VT100 et VT102 ont été faits pour des
  terminaux monochromes, l'émulation ajoute en général des possibilités
  de gestion de couleurs (et un choix de couleurs). Parfois l'émulation
  n'est pas parfaite à 100 % mais ceci ne crée en général que peu de
  problèmes. Pour utiliser un Macintosh pour émuler un terminal, voyez
  le mini-Howto : Mac-Terminal.


  99..11..22..  NN''uuttiilliisseezz ppaass TTEERRMM ppoouurr ll''éémmuullaattiioonn


  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 déclare
  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 série et ensuite
  positionné TERM sur le type B, déclarant ce faisant que le terminal
  est de type B. Dans ce cas, les applications comme les éditeurs qui
  utilisent la variable TERM enverront des séquences d'échappement
  faites pour un terminal de type B vers un terminal de type A ce qui
  aura pour résultat de corrompre l'interface. Même avec cette
  corruption le terminal peut rester utilisable puisque beaucoup de
  terminaux de types différents utilisent des séquences d'échappement
  identiques pour beaucoup de commandes (mais pas toutes).


  99..11..33..  PPrrooggrraammmmeess ddee ccoommmmuunniiccaattiioonnss ((aappppeellss ttéélléépphhoonniiqquueess))


  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 téléphone des bibliothèques publiques pour
  utiliser leurs catalogues et index (ou même 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 émulés sont
  souvent les vieux VT100, VT102 ou ANSI (comme VT100).





  99..11..44..  ÉÉmmuullaattiioonn ssoouuss XX WWiinnddooww


  Xterm (obsolète ??) 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 prédécesseurs de eterm sont rxvt et xvt. eterm
  supporte les pixmaps en fond de fenêtre.

  Pour les alphabets différents 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 possède un éditeur intégré
  et des barres de défilement.  Il a été fait pour Plan 9, un système
  d'exploitation à la Unix de AT&T.


  99..11..55..  LLeess vvrraaiiss tteerrmmiinnaauuxx ssoonntt mmiieeuuxx


  Sauf si vous utilisez X Window avec un grand affichage, il est plus
  agréable d'utiliser un vrai terminal que de l'émuler. Il coûte en
  général moins cher, a une meilleur résolution pour le texte et n'a pas
  de lecteurs de disques qui font des bruits agaçants. Certains
  terminaux réels peuvent émuler divers autres modèles de terminaux mais
  restent de vrais terminaux.


  99..22..  TTeesstteerr ll''éémmuullaattiioonn dduu tteerrmmiinnaall


  Pour la série des terminaux VT il y a un programme de test : vttest
  pour aider à déterminer 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/>.


  99..33..  LLaa ccoonnssoollee LLiinnuuxx


  La console d'un système 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 à réécrire le code du noyau) pour le faire
  émuler autre chose. Positionner la variable d'environnement TERM à un
  type de terminal différent de "Linux" n'aboutira pas à l'émulation de
  cet autre terminal. Vous n'obtiendrez qu'une interface corrompue
  puisque vous avez déclaré faussement (par l'intermédiaire de la
  variable TERM) que votre "terminal" est d'un type différent de ce
  qu'il est. Voyez la section ``n'utilisez pas TERM pour l'émulation''.

  L'émulation "Linux" est souple et possède des possibilités qui vont
  bien au-delà de celles du terminal vt102 qu'il était censé émuler.
  Celles-ci comprennent la possibilité d'utiliser des fontes
  personnalisées 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 réel).  Ces possibilités supplémentaires se trouvent
  dans le logiciel de pilotage de la console et non dans le logiciel
  d'émulation mais le résultat fait qu'on dirait que ces possibilités
  font partie de l'émulation.

  Beaucoup de commandes existent (voyez le HOWTO Keyboard-and-Console)
  pour utiliser ces possibilités supplémentaires. Les vrais terminaux,
  qui n'utilisent ni codes de balayages (scancodes) ni carte VGA, ne
  peuvent malheureusement pas utiliser la plupart de ces possibilités.
  On peut recompiler Linux pour qu'un terminal reçoive les messages qui
  vont normalement sur la console. Voyez ``transformer un terminal en
  console''.


  1100..  CCoonnttrrôôllee ddee fflluuxx ((pprriissee ddee ccoonnttaacctt))


  Le contrôle de flux (= prise de contact (handshaking) =
  ralentissement) permet d'empêcher un flux d'octets trop rapide de
  dépasser un terminal, un ordinateur, un modem ou un autre
  périphérique. Le dépassement est le fait qu'un périphérique ne puisse
  pas traiter ce qu'il reçoit assez rapidement et ainsi perd des octets
  et/ou fait d'autres erreurs sérieuses. Ce que fait le contrôle de flux
  est d'arrêter le flux d'octets jusqu'à ce que le terminal (par
  exemple) soit prêt à recevoir des octets supplémentaires. Le contrôle
  de flux envoie un signal pour arrêter le flux dans la direction
  opposée au flux des données qu'il veut arrêter. Le contrôle de flux
  doit être lancé à la fois sur le terminal et sur l'ordinateur.

  Il y a deux types de contrôle de flux : matériel et logiciel (Xon/Xoff
  ou DC1/DC3). Le contrôle de flux matériel utilise des fils de signaux
  dédiés comme RTS/CTS ou DTR/DSR alors que le contrôle de flux logiciel
  se signale en envoyant les octets de contrôle DC1 ou DC3 dans les fils
  de données normaux.  Pour le contrôle de flux matériel, le câble doit
  être câblé correctement.

  Le flux des octets de données dans le câble entre deux ports série est
  bidirectionnel, il y a donc deux flux (et deux fils) différents à
  considérer :


  1. le flux de données de l'ordinateur vers le terminal

  2. le flux de données du clavier du terminal vers l'ordinateur


  1100..11..  PPoouurrqquuooii llee ccoonnttrrôôllee ddee fflluuxx eesstt--iill nnéécceessssaaiirree ??


  Vous pouvez vous demander : "Pourquoi ne pas envoyer les données à une
  vitesse suffisamment petite pour que le périphérique ne soit pas
  dépassé et que le contrôle de flux ne soit ainsi plus nécessaire ?"
  Ceci est possible mais c'est en général bien plus lent que d'envoyer
  les données plus rapidement et d'utiliser le contrôle de flux. Une
  raison à ceci est qu'on ne peut pas positionner la vitesse du port
  série à n'importe quelle vitesse comme 14.500, puisqu'un nombre limité
  de choix est disponible. Le meilleur choix est de sélectionner une
  vitesse légèrement plus élevée que ce que peut soutenir le
  périphérique et d'utiliser ensuite le contrôle de flux pour que les
  choses fonctionnent correctement.

  Si on décide de ne pas utiliser le contrôle de flux, la vitesse doit
  alors être suffisamment basse pour pallier à la pire des situations.
  Pour un terminal, cela arrive quand on envoie des séquences
  d'échappement pour effectuer des tâches complexes qui prennent plus de
  temps qu'à l'accoutumée.  Dans le cas d'un modem (avec la compression
  de données mais pas de contrôle de flux) la vitesse de l'ordinateur au
  modem doit être suffisamment basse pour que cette même vitesse soit
  utilisable sur la ligne téléphonique, puisque dans le pire des cas les
  données sont aléatoires et ne peuvent être compressées. Si on ne
  pouvait pas utiliser de contrôle de flux, la vitesse (avec la
  compression de données activée) ne serait pas plus rapide que si on
  n'utilisait pas de compression du tout.

  Les buffers (mémoires tampons) aident à gérer les situations
  catastrophes de courte durée. Le tampon stocke les octets qui arrivent
  trop rapidement pour être traités tout d'un coup, et les garde pour
  les traiter plus tard.


  1100..22..  RReemmpplliissssaaggee


  Une autre manière de gérer une situation "catastrophe" (sans utiliser
  de contrôle de flux ni de tampon) est d'ajouter un groupe de nulls
  (octets de valeur zéro) aux séquences d'échappement. Quelquefois on
  utilise des DEL à la place, à condition qu'ils n'aient pas d'autre
  fonction. Voyez ``reconnaître DEL''.

  La séquence d'échappement permet au terminal de commencer à faire
  quelque chose, et pendant que le terminal est occupé à le faire, il
  reçoit une poignée de nulls qu'il ignore. Quand il reçoit le dernier
  null, il a terminé sa tâche et est prêt pour la commande suivante.
  C'est ce qu'on appelle le remplissage de zéros (null padding). Ces
  nulls étaient autrefois appelés des "caractères de remplissage". Ces
  nulls sont ajoutés simplement pour "perdre" du temps, mais ce n'est
  pas tout à fait perdu puisque le terminal est en général occupé à
  faire autre chose pendant que les nulls sont reçus. On utilisait
  beaucoup cette méthode dans le passé avant que le contrôle 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 tâtonnements puisque les manuels de
  terminaux n'étaient pas de grand secours. Si le contrôle de flux ne
  fonctionne pas correctement ou n'est pas implémenté, le remplissage
  est une solution. Certaines options de la commande stty concernent le
  remplissage.


  1100..33..  DDéébboorrddeemmeenntt dd''uunn ppoorrtt sséérriiee


  On peut se demander comment le débordement est possible sur un port
  série puisqu'à la fois les ports série d'envoi et de réception servant
  à la transmission d'octets de données sont paramétrés pour la même
  vitesse (en bits/s) comme 19200. La raison est que bien que
  l'électronique du port série récepteur peut gérer la vitesse du flux
  arrivant, le matériel/logiciel qui prend et traite les octets du port
  série ne peut pas toujours se débrouiller avec une vitesse de flux
  élevée.

  L'une des causes de ceci est que le tampon matériel du port série est
  assez petit. Les anciens ports série avaient une taille de tampon
  matériel d'un octet seulement (à l'intérieur de la puce UART). Si cet
  unique octet de données reçu 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 débordé). Les UART récents, par exemple la
  plupart des 16550A, possèdent des tampons de 16 octets (mais peuvent
  être paramétrés pour émuler un tampon d'un octet) et sont moins
  susceptibles d'être débordés. On peut le paramétrer 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
  (généralement la puce principale CPU pour un ordinateur) de retirer
  ces octets entrants de ce petit tampon matériel et de les traiter
  (ainsi que d'effectuer d'autres tâches).

  Quand le contenu de ce petit tampon matériel de réception atteint la
  limite spécifiée (un octet pour les vieux UART) une interruption est
  levée.  L'ordinateur interrompt alors ce qu'il était en train de faire
  et une routine fait une vérification pour déterminer ce qui vient de
  se passer. Il détermine finalement qu'il doit retirer un octet (ou
  plusieurs) du tampon du port série. Il prend cet (ces) octet(s) et les
  met dans un tampon plus grand (un autre tampon pour le port série) que
  le noyau maintient dans la mémoire principale. Pour le tampon de
  transmission, le matériel série génère une interruption quand le
  tampon est vide (ou presque vide) pour dire à la CPU de mettre
  quelques octets supplémentaires dans ce tampon afin de les envoyer.

  Les terminaux possèdent aussi des ports série et des tampons
  similaires à ceux de l'ordinateur. Puisque le flux de données des
  octets vers le terminal est en général plus grand que le flux dans la
  direction opposée du clavier vers l'ordinateur hôte, le terminal a
  plus de chance de souffrir du débordement. Bien sûr, si vous utilisez
  un ordinateur comme terminal (par émulation), il est à son tour sujet
  au débordement.

  Les situations risquées où le débordement est très probable sont : 1.
  quand un autre processus a désactivé les interruptions (pour un
  ordinateur), 2.  quand le tampon du port série dans la mémoire
  principale (ou dans celle du terminal) est prête à déborder.


  1100..44..  AArrrrêêtt ddee ll''eennvvooii


  Quand le récepteur est sur le point d'être débordé par les octets
  entrants, il envoie un signal à l'expéditeur pour arrêter l'envoi.
  C'est le contrôle de flux et les signaux de contrôle de flux sont
  toujours envoyés dans la direction opposée au flux de données qu'ils
  contrôlent (bien que ce ne soit pas dans le même canal ou le même
  fil). Ce signal peut être soit un caractère de contrôle (^S = DC3 =
  Xoff) envoyé comme un octet de données ordinaire sur la ligne de
  données (signalement dans la bande), soit une transition de tension du
  positif au négatif dans le fil de signal dtr-vers-cts (ou autre ;
  signalement hors-bande). L'utilisation de Xoff est appelée "contrôle
  de flux logiciel" et l'utilisation du saut de tension dans un fil de
  signal dédié (à l'intérieur du câble) est appelée contrôle de flux
  matériel.


  1100..55..  BBllooccaaggee dduu ccllaavviieerr


  Quand on dit à un terminal d'arrêter l'envoi, le terminal "bloque" son
  clavier. Ceci arrive rarement mais quand ça arrive, un message ou une
  lumière 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'arrêter 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 caractères 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.


  1100..66..  RReepprreennddrree ll''eennvvooii


  Quand le récepteur a rattrapé son retard dans le traitement et est
  prêt à recevoir plus d'octets de données il envoie un signal à
  l'envoyeur. Pour le contrôle de flux logiciel ce signal est le
  caractère de contrôle ^Q = DC1 = Xon qui est envoyé sur la ligne de
  données normale. Pour le contrôle de flux matériel la tension dans une
  ligne de signal passe de négative (niée) à positive (affirmée). Si on
  dit à un terminal de reprendre la transmission le clavier est alors
  débloqué et prêt à être utilisé.


  1100..77..  CCoonnttrrôôllee ddee fflluuxx mmaattéérriieell ((RRTTSS//CCTTSS,, eettcc..))


  Certains terminaux anciens n'offrent pas de contrôle de flux matériel
  alors que d'autres offraient un assortiment varié de broches diverses
  sur le port série pour le faire. La broche la plus en vogue
  actuellement semble être la broche DTR (ou les broches DTR et DSR
  ensemble).


  1100..77..11..  CCoonnttrrôôllee ddee fflluuxx RRTTSS//CCTTSS,, DDTTRR eett DDTTRR//DDSSRR


  Les PC Linux utilisent RTS/CTS mais le contrôle de flux DTR/DSR
  (utilisé par certains terminaux) se comporte de la même manière. Le
  contrôle de flux DTR (dans une seule direction et aussi utilisé par
  certains terminaux) n'est que la partie DTR du contrôle de flux
  DTR/DSR.

  RTS/CTS utilise les broches RTS et CTS sur le connecteur série
  (EIA-232). RTS veut dire "Request To Send" (demande d'envoyer). Quand
  cette broche reste en position haute (tension positive) sur le
  récepteur cela veut dire : continuez de m'envoyer des données. Si RTS
  passe en position basse (la tension devient négative), cela nie
  "demande d'envoyer", ce qui veut dire : arrêtez d'envoyer. Quand le
  récepteur est prêt à recevoir plus de données, il relance RTS,
  demandant à l'autre côté de reprendre l'envoi. Pour les ordinateurs et
  les terminaux (tous les deux des équipements terminaux) la broche RTS
  envoie le signal de contrôle de flux à la broche CTS (Clear To Send,
  prêt à envoyer) de l'autre côté du câble. C'est-à-dire que la broche
  RTS à un bout du câble est reliée à la broche CTS à l'autre bout du
  câble.

  Pour un modem (équipement de connexion) le principe est différent
  puisque la broche RTS du modem reçoit le signal et sa broche CTS
  l'envoie. Alors que ceci peut sembler déroutant, il y a des raisons
  historiques correctes pour l'expliquer, raisons qui sont trop
  compliquées pour en discuter ici.

  Les terminaux disposent en général du contrôle de flux DTR ou DTR/DSR.
  Le contrôle de flux DTR est le même que le contrôle de flux DTR/DSR
  mais il est unidirectionnel et la broche DSR n'est pas utilisée. En ce
  qui concerne le contrôle 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.


  1100..77..22..  EEttaabblliirr uunnee ccoonnnneexxiioonn aavveecc llee ccoonnttrrôôllee ddee fflluuxx DDTTRR oouu DDTTRR//DDSSRR


  Certains terminaux n'utilisent que le contrôle de flux DTR. C'est un
  contrôle de flux unidirectionnel uniquement pour empêcher le terminal
  d'être dépassé. Il ne protège pas l'ordinateur de quelqu'un qui tape
  trop vite pour que l'ordinateur puisse gérer la situation. Dans un
  câble null modem classique la broche DTR du terminal est reliée à la
  broche DSR de l'ordinateur. Linux, par contre, ne supporte pas le
  contrôle de flux DTR/DSR (bien que des pilotes pour des cartes
  multiports peuvent supporter le contrôle de flux DTR/DSR). Un moyen de
  contourner ce problème est simplement de relier la broche DTR à la
  broche CTS sur l'ordinateur et d'activer le contrôle de flux RTS/CTS
  (stty crtscts).  Le fait que ce soit unidirectionnel ne changera rien
  tant que l'hôte n'est pas dépassé par votre vitesse de frappe et ne
  lâche RTS en une vaine tentative pour bloquer votre clavier. Voyez
  ``blocage du clavier''. Pour obtenir le contrôle de flux DTR/DSR (si
  votre terminal supporte ce type de contrôle de flux bidirectionnel)
  vous faites ce qui est décrit ci-dessus. Mais vous connectez aussi la
  broche DSR sur le terminal à la broche RTS sur l'ordinateur. Vous êtes
  alors protégé si vous tapez trop rapidement.


  1100..77..33..  LL''aanncciieennnnee pprriissee ddee ccoonnttaacctt RRTTSS//CCTTSS eesstt ddiifffféérreennttee


  Ce qui est déroutant est que l'utilisation d'origine de RTS veut dire
  à peu près le contraire de l'explication précédente ci-dessus. La
  signification d'origine est : je demande à vous envoyer (I Request To
  Send to you). Cette requête était destinée à être envoyée d'un
  terminal (ou d'un ordinateur) vers un modem qui, s'il décidait
  d'accorder la requête, 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
  contrôle de flux RTS/CTS bidirectionnel du modem, ceci ne protège 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 données. L'utilisation ci-
  dessus est une forme de contrôle de flux puisque si le modem veut que
  l'ordinateur arrête d'envoyer il lâche CTS (connecté au CTS de
  l'ordinateur) et l'ordinateur arrête d'envoyer.


  1100..77..44..  CCaannaall iinnvveerrsséé


  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 contrôle de flux RTS/CTS. Cette broche passera aussi en négatif
  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 hôte. Il peut y
  avoir un petit interrupteur pour positionner la polarité de ce signal.


  1100..88..  EEsstt--ccee qquuee llee ccoonnttrrôôllee ddee fflluuxx mmaattéérriieell eesstt ffaaiitt ppaarr llee
  mmaattéérriieell ??


  Certains pensent que le contrôle de flux matériel est fait par le
  matériel mais (sauf si vous utilisez une carte série intelligente avec
  plusieurs ports série) c'est en réalité votre système d'exploitation
  qui s'en charge. Les puces UART et le matériel associé ne connaissent
  en général rien du contrôle de flux matériel. Quand un signal de
  contrôle de flux matériel est reçu, le fil du signal inverse la
  polarité et le matériel envoie un signal électrique d'interruption au
  processeur. Cependant, le matériel n'a pas d'idée sur la signification
  de cette interruption. Le processeur arrête ce qu'il était en train de
  faire et saute à une table en mémoire 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 périphérique série)
  qui arrête (ou reprend) l'envoi. Ce programme vérifie le contenu des
  registres de la puce UART pour trouver qu'un certain fil a changé sa
  polarité. Le logiciel réalise alors qu'un signal de contrôle de flux a
  été reçu et se charge d'arrêter (ou de reprendre) le flux. Cependant,
  si c'est un signal d'arrêt qui a été reçu, le flux s'arrête presque
  instantanément 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 données et les mettait dans les tampons
  matériels du port série pour la transmission). Cependant tous les
  octets (jusqu'à 16) qui étaient déjà dans le tampon de transmission
  matériel du port série seront encore transmis ?? Ainsi le matériel
  arrête presque instantanément le flux uniquement parce que sa réaction
  vis à vis d'un signal matériel est d'interrompre et d'arrêter tout ce
  que le processeur était en train de faire.


  1100..99..  OObbssoollèèttee ???? CCoonnttrrôôllee ddee fflluuxx EETTXX//AACCKK oouu EENNQQ//AACCKK


  Ceci est aussi du contrôle de flux matériel et nécessite un pilote de
  périphérique qui sait le traiter. Les octets sont envoyés par paquets
  (grâce au port série asynchrone), chaque paquet étant terminé par un
  caractère de contrôle ETX (End of Text, fin de texte). Quand le
  terminal reçoit un ETX il attend jusqu'à ce qu'il soit prêt à recevoir
  le paquet suivant et retourne alors un ACK (Acknowledge,
  acquittement). Quand l'ordinateur reçoit le ACK, il envoie le paquet
  suivant. Et ainsi de suite. Ceci n'est pas supporté par Linux ??
  Certains terminaux HP utilisent la même méthode mais utilisent ENQ au
  lieux de ETX.


  1111..  CCoonnnneexxiioonn pphhyyssiiqquuee


  Les cartes multiports permettent de relier plusieurs terminaux (ou
  modems) à un ordinateur. On peut relier un terminal à son ordinateur
  hôte soit par une connexion directe par câble, soit par un modem, ou
  encore par l'intermédiaire d'un serveur de terminaux.


  1111..11..  CCaarrtteess dd''eennttrrééeess//ssoorrttiieess mmuullttiippoorrttss ((aaddaappttaatteeuurrss))


  On peut acheter des cartes série supplémentaires qui possèdent
  plusieurs ports série, et qu'on appelle "cartes multiports". Ces
  cartes ne sont pas détaillées dans ce HOWTO mais on en parle beaucoup
  dans le HOWTO Serial. Une société qui fait des prix en dessous de la
  moyenne est ByteRunner <http://www.byterunner.com/cgi-
  bin/goto.cgi?FILE=iocards.html>.


  1111..22..  CCoonnnneexxiioonn ddiirreeccttee ppaarr ccââbbllee


  La manière la plus simple de relier un terminal à un ordinateur hôte
  est par l'intermédiaire d'une connexion directe vers un port série de
  l'ordinateur.  La plupart des PC possèdent deux ports série, mais la
  souris en utilise en général un. Pour le port EIA-232, vous avez
  besoin d'un câble null modem qui croise les fils de transmission et de
  réception. Si vous voulez faire du contrôle de flux matériel, vous
  utiliserez sûrement la broche DTR (ou les broches DTR et DSR
  ensemble).

  Assurez-vous que vous avez le bon type de câble. Un câble null modem
  acheté dans un magasin d'ordinateurs peut être bon (s'il est assez
  long), mais ne fonctionnera probablement pas bien pour le contrôle de
  flux matériel. Ce genre de câble peut être étiqueté comme un câble
  pour imprimante série.  Voyez ceci pour vous aider à déterminer si
  vous devez ``acheter ou fabriquer'' votre propre câble.  Assurez-vous
  que vous utilisez votre port série, la prise mâle DB25 ou DB9, et non
  pas votre port parallèle (prise DB25 femelle ou Centronics).


  1111..22..11..  SScchhéémmaa ddee bbrroocchhaaggee ddeess ccââbblleess nnuullll mmooddeemm ((33,, 44 oouu 55 ccoonndduucc­­
  tteeuurrss))


  Si vous n'avez que le contrôle de flux DTR (unidirectionnel), vous
  pouvez éliminer le fil RTS-vers-DSR. Si vous n'avez pas de contrôle de
  flux matériel, vous pouvez alors aussi éliminer le fil CTS-vers-DTR.
  Alors, si vous avez deux paires torsadées, vous pouvez utiliser deux
  fils pour la masse du signal comme indiqué à ``une astuce qui utilise
  du câble en paire torsadée''. Pour un connecteur DB25 sur votre PC,
  vous avez besoin de :



    PC DB25 mâle                         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 série, essayez le schéma
  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 schémas ci-dessus n'ont pas de lignes de contrôle de modem, soyez
  donc sûr de donner une option "local" à getty (ce qui est équivalent à
  "stty clocal"). De plus si vous avez besoin du contrôle de flux
  matériel il doit être activé du côté de votre ordinateur (utilisez le
  drapeau -h avec agetty) (équivalent à "stty crtscts").


  1111..22..22..  BBrroocchhaaggee dd''uunn ccââbbllee nnuullll mmooddeemm ssttaannddaarrdd ((77 ccoonnnneecctteeuurrss))


  Le diagramme suivant montre des câbles null modem "standards"
  complets. Si vous en achetez un, il risque d'être câblé de cette
  manière. Ils fonctionneront pour les terminaux en utilisant le
  contrôle de flux logiciel (Xon/Xoff), ou sans contrôle de flux.
  Cependant, ils ne fonctionnent pas pour le contrôle de flux matériel
  puisque la plupart des terminaux supportent le contrôle de flux DTR ou
  DTR/DSR (prise de contact) mais que Linux ne le fait pas.













  PC DB25 mâle                            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 câble null modem DB9-DB25 (ne fonctionnera pas
  avec la prise de contact matérielle 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 nécessaire)



  (Oui, les broches 2 et 3 _o_n_t _v_r_a_i_m_e_n_t des significations opposées dans
  les connecteurs DB9 et DB25 !)

  L'utilisation des deux connexions ci-dessus fournit des signaux de
  contrôle de modem complets et de même nous permettent de positionner
  "stty -clocal".  On doit alors allumer le terminal en premier (pour
  lancer DTR) avant de pouvoir ouvrir le port de manière normale par
  getty, etc. Mais il risque d'y avoir des problèmes 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 défaut (ignore les lignes de contrôle du modem)
  et les fils supplémentaires dans ces câbles ne servent alors à rien
  d'utile.

  Dans les jours anciens où il n'était pas si facile d'ignorer les
  signaux de contrôle du modem, etc., on utilisait "l'astuce" suivante
  pour les câbles qui n'avaient pas les fils pour le contrôle de modem :
  du côté ordinateur du connecteur, on reliait RTS et CTS ensemble, et
  on connectait aussi DSR, DCD et DTR ensemble. De cette manière, quand
  l'ordinateur avait besoin d'un certain signal de prise de contact pour
  continuer, il l'obtenait (par erreur) de lui-même.


  1111..22..33..  LLiimmiittaattiioonnss ddee lloonngguueeuurr


  Un câble de plus de 15 mètres 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 câble est de type basse capacitance et/ou
  l'électronique de la partie réception est très sensible. On dit que
  sous certaines conditions idéales à 9600 bauds, un câble de 1000 pieds
  (300 mètres) fonctionne correctement. Une manière de couvrir de
  longues distances est d'installer un pilote de ligne près de chaque
  port série afin de convertir des signaux asymétriques en symétriques
  (et inversement)  et d'utiliser ensuite du câblage en paire torsadée.
  Mais les pilotes de lignes sont chers.


  1111..22..44..  CCââbblleess ppoouurr llee ccoonnttrrôôllee ddee fflluuxx mmaattéérriieell


  Si vous voulez faire du contrôle de flux matériel (prise de contact)
  vous aurez certainement besoin de fabriquer votre propre câble (ou de
  le faire faire). Bien sûr, si les connecteurs à chaque extrémité d'un
  câble usagé s'enlèvent, vous pouvez le reconnecter. Voyez
  ``installation de connecteurs DB''. Vous devrez déterminer 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 contrôle de flux), ce qui implique
  bien sûr qu'il utilise la broche DTR.  Il peut aussi utiliser la
  broche DSR. Voyez ``contrôle de flux matériel'' pour une explication
  détaillée. Des terminaux anciens peuvent ne rien fournir pour faire du
  contrôle de flux matériel.


  1111..22..55..  AAssttuucceess ssuurr lleess ccââbblleess


  Un câble "droit" normal ne fonctionnera pas sauf si vous l'utilisez
  comme câble d'extension couplé soit à un câble null modem, soit à un
  adaptateur null modem. Assurez-vous que les connecteurs au bout du
  câble se brancheront dans les connecteurs matériels. On peut utiliser
  du câble de téléphone qui a au moins 4 conducteurs (et peut-être en
  paire torsadée). Un câble d'ordinateur spécial de basse capacitance,
  blindé, est mieux.


  1111..22..66..  UUnnee bbiiddoouuiillllee qquuii uuttiilliissee uunn ccââbbllee eenn ppaaiirree ttoorrssaaddééee


  Bien qu'aucun signal EIA-232 ne soit stabilisé pour de la paire
  torsadée on peut tenter d'utiliser un câble en paire torsadée.
  Utilisez une paire pour la transmission et l'autre pour la réception.
  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 désiré mais ça peut aider. À cause de l'inductance plus faible du
  circuit en paire torsadée (comparée au courant de retour de masse par
  un autre chemin), un peu plus de courant de retour (terre) se massera
  sur le chemin désiré que ce qu'on pourrait attendre des seuls calculs
  de résistances. Ceci est surtout vrai à des fréquences plus élevées
  puisque l'impédance d'induction augmente avec la fréquence. La courbe
  rectangulaire du port série contient des harmoniques de haute
  fréquence.


  1111..22..77..  MMiissee àà llaa tteerrrree dduu ccââbbllee


  La broche 1 (d'une prise DB25) devrait être reliée à la masse du
  châssis (qui est aussi la masse de la terre) mais sur les ports série
  économiques il peut n'être connecté à rien du tout. Un connecteur 9
  broches n'est même pas relié à la masse du châssis. La masse du signal
  est la broche 7 et est en général reliée à la masse du châssis. Cela
  veut dire qu'une partie du courant du signal passera dans les fils de
  masse de l'installation électrique du bâtiment (indésirable). Les
  blindages de câbles sont sensés n'être mis à la terre qu'à une seule
  extrémité du câble, mais il peut être mieux de relier les deux
  extrémités à la terre puisqu'il est mieux d'avoir du courant dans le
  blindage que dans l'installation électrique du bâtiment ??


  1111..33..  CCoonnnneexxiioonn ssuurr uunn mmooddeemm


  En utilisant une combinaison terminal-modem (sans ordinateur) on peut
  se connecter à des BBS. Certains BBS (comme free-nets) permettent un
  accès à Internet grâce 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
  hôte sur lequel on a un compte, on peut parfois stocker ses fichiers
  (ou ses téléchargements) sur l'ordinateur hôte.


  1111..33..11..  AAppppeelleerr àà ll''eexxttéérriieeuurr àà ppaarrttiirr dd''uunn tteerrmmiinnaall


  Au lieu de relier un terminal (ou un ordinateur émulant un terminal)
  directement à un ordinateur hôte en utilisant un câble, il peut être
  relié à l'hôte par l'intermédiaire d'une ligne téléphonique (ou d'une
  liaison spécialisée dédiée) avec un modem à chaque bout de la ligne.
  Le terminal (ou l'ordinateur) appellera en général un ordinateur hôte
  avec une ligne téléphonique.

  Cet appel sortant se fait couramment en utilisant un ordinateur PC
  muni d'un modem pour appeler un BBS ou un fournisseur d'accès à
  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 très intelligent et ne
  donne pas assez d'informations en retour à l'utilisateur. Pour appeler
  à l'extérieur, beaucoup de terminaux peuvent stocker un ou plusieurs
  numéros de téléphone comme des messages qu'on peut leur "paramétrer".
  Ces numéros sont envoyés au modem en pressant certaines touches de
  fonction. Beaucoup de modems peuvent aussi stocker des numéros de
  téléphone.  La séquence d'initialisation du modem doit précéder le
  numéro de téléphone.  L'ordinateur hôte peut utiliser "mgetty" (un
  getty qu'on utilise pour les modems) pour que quelqu'un qui a appelé
  puisse se logger.


  1111..33..22..  OOnn ppeeuutt aappppeelleerr uunn tteerrmmiinnaall


  Il est courant pour un ordinateur faisant tourner Linux de se faire
  appeler par téléphone. L'appelant obtient une invite de login et se
  logge. À première 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 téléphone quand les tarifs ne sont pas symétriques. Votre
  terminal doit être configuré pour un appel entrant : mettez le modem
  derrière votre terminal en mode réponse automatique (auto answer,
  registre S0 mis à 2 répondra à la deuxième 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 hôte qui appelle votre terminal doit faire quelque chose
  d'inhabituel. Aussitôt que votre modem répond, il doit lancer login
  (getty).  Un hôte peut faire ceci en lançant 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 tâche peut être trop
  complexe et par conséquent l'hôte n'utilise que la partie retour du
  programme callback. Le fichier de configuration de callback doit être
  configuré correctement sur l'hôte.  Callback appelle le terminal et
  ensuite dit à mgetty de lancer un login sur ce port. Mgetty lui-même
  (au début 1998) ne sait gérer que les appels entrants mais on
  travaille sur l'incorporation de possibilités de rappel automatique et
  le rendre ainsi capable de gérer les appels sortants. Au moment où
  vous lirez ceci, mgetty peut être l'unique solution à vos besoins.


  1111..44..  CCoonnnneexxiioonn àà uunn sseerrvveeuurr ddee tteerrmmiinnaauuxx


  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 mécanique et donc il peut
  changer les vitesses et les protocoles des flux de données qui le
  traversent. Un certain nombre de sociétés fabriquent des serveurs de
  terminaux : Xyplex, Cisco, 3Com, Computone, Livingston, etc. Il y a
  beaucoup de types et de possibilités différentes. Un autre HOWTO est
  nécessaire pour les comparer et les décrire (en incluant la
  possibilité de créer votre propre serveur de terminaux avec un PC
  Linux). La plupart sont utilisés pour des connexions par modem plutôt
  que pour des terminaux reliés directement.

  Une utilisation possible est de connecter beaucoup de terminaux (ou
  des modems) à un réseau à haut débit qui permet la connexion à des
  ordinateurs hôtes. Bien sûr le serveur de terminaux doit avoir la
  puissance de calcul et les logiciels pour faire tourner des protocoles
  réseau, 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 série devrait avoir sa propre interruption matérielle. Les PC ne
  possèdent que peu d'interruptions libres à cette fin et puisqu'elles
  sont configurées en dur on ne peut pas en créer davantage par
  logiciel. Une solution est d'utiliser une carte série multiport
  avancée qui possède son propre système d'interruptions (ou sur les
  modèles 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 série on peut le considérer
  comme un serveur de terminaux s'il est relié à d'autres PC sur un
  réseau et si son travail est principalement de transférer les données
  et de gérer les interruptions du port série tous les 14 octets (ou à
  peu près). 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 reliés à des racks de modems reliés à des lignes
  téléphoniques.  Certains contiennent parfois des modems intégrés. 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 défaut
  s'attend à ce que l'appelant utilise des paquets PPP, quelque chose
  que les vrais terminaux texte ne génèrent pas.


  1111..55..  TTyyppeess ddee ccoonnnneecctteeuurrss eett dd''aaddaappttaatteeuurrss



  Un connecteur est plus ou moins relié de façon permanente à
  l'extrémité d'un câble ou à une unité matérielle. Il y a deux types de
  connexions de base : 1.  DBxx avec des broches et 2. des connecteurs
  modulaires de type téléphone.

  Un adaptateur ressemble à peu près à un connecteur mais il possède
  deux extrémités. C'est comme un câble qui est si court qu'il ne reste
  plus de partie câblée du tout -- il ne reste que des connecteurs
  différents sur chaque extrémité. L'adaptateur se branche de chaque
  côté. 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 câble
  spécial (éventuellement fait maison) pour remplacer pour cet
  adaptateur.


  1111..55..11..  SSeexxee ddeess ccoonnnneecctteeuurrss // aaddaappttaatteeuurrss


  Les connecteurs (ou un côté des adaptateurs) sont soit mâles soit
  femelles.  Les connecteurs qui ont des broches sont mâles 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'intérieur (pas facile à voir) sont les prises.  Les
  fiches sont mâles ; les prises sont femelles (NdT : mais en français
  on dit aussi prise pour un connecteur mâle).


  1111..55..22..  TTyyppeess dd''aaddaappttaatteeuurrss


  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 câble
     null modem.

  ·  changeur de genre : change le sexe d'une extrémité d'un câble. Deux
     connecteurs du même sexe peuvent maintenant être reliés l'un à
     l'autre.

  ·  adaptateur de port : va d'un type de connecteur à un autre (DB9
     vers DB25, etc.).


  1111..55..33..  CCoonnnneecctteeuurrss DDBB


  Pour savoir comment installer un connecteur DB à l'extrémité d'un
  câble, voyez ``installer des connecteurs DB''.  Ceux-ci sont
  disponibles en 9 ou 25 broches. Les spécifications EIA-232 demandent
  des 25 broches mais puisque la plupart de ces broches ne sont pas
  utilisées sur les ports série ordinaires, 9 broches sont suffisantes.
  Voyez ``DB9-DB25'' pour la signification des brochages.  Les broches
  sont en général numérotées si vous regardez de suffisamment près ou si
  vous utilisez une loupe grossissante.


  1111..55..44..  CCoonnnneecctteeuurrss mmoodduullaaiirreess RRJJ


  Ceux-ci ressemblent à des connecteurs de téléphone modernes mais ne
  sont parfois pas compatibles avec les connecteurs téléphoniques. Voyez
  aussi ``installer des connecteurs RJ''. Il peut y avoir 6, 8 ou 10
  conducteurs. RJ11/14 est une fiche de téléphone à 4-6 conducteurs.
  Une fiche qui lui ressemble est un connecteur MMJ (6 conducteurs)
  utilisé sur certains modèles tardifs de terminaux VT (et autres). MMJ
  possède une languette décalée et n'est pas compatible avec RJ11/14.
  Cependant, certains connecteurs ont été fabriqués 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 câble null modem avec des connecteurs MMJ (ou RJ11/14) reliera :
  1-6, 2-5 et 3-4. Notez qu'un tel câble supporte le contrôle de flux
  DTR/DSR qui n'est pas (encore) supporté par Linux. Faire vous-même
  votre propre câble null modem à 6 conducteurs est très simple si vous
  comprenez que le câble téléphonique à 4 conducteurs de votre mur à
  votre téléphone, utilisé dans des centaines de millions d'habitations,
  est aussi un câble null modem.  Trouvez-en un et câblez votre câble de
  la même façon.

  Si vous étalez un tel câble (ou le câble null modem de votre terminal)
  à plat sur le sol (sans torsion) vous noterez que les deux fiches aux
  extrémités ont leurs contacts dorés dirigés tous les deux vers le haut
  (ou tous les deux vers le bas). Bien que ce soit symétrique, c'est
  aussi null modem si vous y réfléchissez un peu. On pourrait associer
  un petit nombre de ces câbles avec des coupleurs en ligne et tout
  fonctionnera correctement car chaque coupleur en ligne est aussi un
  adaptateur null modem. Deux périphériques null modem en série donnent
  une connexion directe.

  RJ45 et RJ48 sont des fiches téléphoniques à 8 conducteurs (ou 10
  conducteurs pour certaines applications informatiques). Ceux à 10
  conducteurs sont légèrement plus larges et ne rentreront pas dans des
  fiches à 8 conducteurs.  On les utilise à la fois pour des câbles
  téléphoniques plats et des câbles à paire torsadée ronds. L'extrémité
  du connecteur côté câble peut être différent pour les câbles plats et
  ronds et à la fois RJ45 et RJ48 peuvent avoir 8 ou 10 conducteurs,
  donc assurez-vous que vous choisissez le bon. RJ48 possède un taquet
  supplémentaire 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 série multiports et dans les réseaux.
  Voici les numéros de broches pour une prise à 8 conducteurs :


    Fiche                          Prise
    (En regardant à                (En regardant la
     l'extrémité d'un câble)        cavité dans un mur)
       .__________.                   .__________.
       | 87654321 |                   | 12345678 |
       |__.    .__|                   |__.    .__|
          |____|                         |____|




  1111..66..  FFaabbrriiqquueerr oouu mmooddiiffiieerr uunn ccââbbllee



  1111..66..11..  AAcchheetteerr oouu ffaabbrriiqquueerr ??


  Vous pouvez essayer d'acheter un câble null modem court. On les
  étiquette souvent comme des câbles d'imprimantes série (mais les
  imprimantes série ne sont pas très en vogue de nos jours, ni les
  câbles associés).  Malheureusement, ils ne fonctionneront probablement
  pas pour le contrôle de flux matériel. Assurez-vous que les
  connecteurs sur les extrémités du câble conviendront aux connecteurs
  sur votre ordinateur et votre terminal.
  Mais si vous avez besoin de câbles plus longs pour relier des
  terminaux ou si vous avez besoin du contrôle de flux matériel, comment
  obtenez-vous les bons câbles ? Les bons câbles longs tout prêts
  peuvent s'avérer 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
  spécialement, ce qui risque d'être relativement cher bien que vous
  puissiez trouver quelqu'un pour le faire à des prix à peine plus
  élevés que ceux tout prêts (c'est ce que j'ai fait). Une autre
  alternative est de fabriquer le vôtre. Ceci peut nécessiter des outils
  spéciaux. Si vous pouvez en trouver, du câble d'occasion peut s'avérer
  faire une bonne affaire mais vous devrez probablement recâbler les
  connecteurs. La plupart des connecteurs livrés avec les câbles courts
  sont moulés de manière permanente sur le câble et ne peuvent pas être
  recâblés mais la plupart des câbles faits sur mesure ou à la main
  possèdent des connecteurs qu'on peut recâbler. L'avantage de fabriquer
  votre propre câble est que les compétences que vous acquérerez seront
  utiles si un câble se casse (ou devient mauvais) ou si vous devez
  fabriquer un autre câble en vitesse.


  1111..66..22..  NNuumméérrooss ddee bbrroocchheess


  Les numéros des broches devraient être gravées sur la partie plastique
  du connecteur. Chaque broche devrait avoir un numéro juste à côté.
  Vous aurez peut-être besoin d'une loupe grossissante pour les lire.


  1111..66..33..  IInnssttaalllleerr ddeess ccoonnnneecctteeuurrss DDBB ssuurr lleess eexxttrréémmiittééss ddeess ccââbblleess


  Voyez ``connecteurs DB'' pour une courte description de ces
  connecteurs. Malheureusement, la plupart des câbles achetés de nos
  jours possèdent des connecteurs moulés à chaque extrémité qu'on ne
  peut pas modifier. Si vous fabriquez des câbles ou en modifiez un
  existant, vous devrez apprendre à connaître les broches. Il y en a
  deux sortes : soudées et serties.

  Les broches serties nécessitent un outil de sertissage spécial et
  aussi un outil "d'insertion/extraction". Mais une fois que vous avez
  les outils, fabriquer et modifier un câble est plus rapide que de les
  souder. Si vous reliez deux fils à la même broche (nécessaire aussi si
  vous voulez relier une broche connectée à 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 soudées peuvent accepter plus d'un fil par broche.

  Pour insérer des broches serties, poussez-les simplement à la main ou
  avec l'outil. Enlever une broche avec l'outil est un peu difficile.
  Vous devez insérer le bout de l'outil autour de l'arrière de la
  broche. Un bout de l'outil nécessite de s'étaler un petit peu pour
  accéder 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 sûrement pas été inséré correctement,
  poussez-le alors plus en avant ou bien tournez-le dans une position
  différente. Vous auriez peut-être dû utiliser un autre bout qui
  entoure mieux la broche. En utilisant cet outil, on peut facilement
  convertir un câble droit en câble null modem, etc.

  Vous pouvez avoir des problèmes en utilisant l'outil
  d'"insertion/extraction". Si les outils ne s'insèrent pas sur le
  derrière 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 coincée peut être poussée 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.


  1111..66..44..  IInnssttaalllleerr ddeess ccoonnnneecctteeuurrss RRJJ


  Ce sont des connecteurs modulaires de téléphones, dont une sorte est
  utilisée pour la plupart des téléphones ordinaires. Mais il y a
  beaucoup de sortes différentes (voyez ``connecteurs modulaires RJ'').

  Ils ne sont pas faciles à réutiliser. Vous pourriez retirer les fils,
  pousser à l'intérieur un outil pointu qui relèverait les contacts
  dorés et réutiliser le connecteur. Il y a des outils de sertissage
  spéciaux qu'on utilise pour les installer ; un outil différent pour
  chaque sorte.

  Si vous n'avez pas d'outil de sertissage, l'installation est quand
  même possible (mais difficile) en utilisant un petit tournevis (et
  peut-être un marteau). Poussez les fils du câble à l'intérieur 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'abîmer si vous n'utilisez pas un tournevis
  avec une tête qui a presque la même é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 abîmer 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 préférable
  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
  téléphoniques 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 millimètre sous les 6 premiers
  millimètres 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 méthode (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 expéditif et
  bien moins cher que d'acheter un outil spécial si vous n'avez qu'un ou
  deux connecteurs à installer.


  1122..  MMiissee eenn ppllaaccee ((ccoonnffiigguurraattiioonn)) eenn ggéénnéérraall






  1122..11..  IInnttrroodduuccttiioonn àà llaa ccoonnffiigguurraattiioonn


  La configuration (mise en place) nécessite à la fois de stocker la
  configuration dans la mémoire non volatile du terminal et de mettre
  des commandes dans les fichiers de démarrage (sur votre disque dur)
  qui se lanceront à chaque fois que l'ordinateur est allumé (ou
  peut-être aussi à chaque changement de niveau d'exécution). 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 ``détails de la mise en place de
  l'ordinateur (configuration)''.


  1122..22..  VVuuee dd''eennsseemmbbllee ddee llaa mmiissee eenn ppllaaccee ((ccoonnffiigguurraattiioonn)) dduu tteerrmmiinnaall


  Quand un terminal est installé il est nécessaire de configurer le
  terminal physique en sauvant (dans sa mémoire non volatile qui n'est
  pas perdue lorsque l'on éteint le terminal) les caractéristiques qu'il
  aura au démarrage. Vous pouvez avoir de la chance et avoir un terminal
  qu'on a déjà configuré correctement pour votre installation de sorte
  que peu ou aucune configuration sur le terminal ne soit nécessaire.

  Il y a deux façons 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 séquences d'échappement au
  terminal à partir de l'ordinateur hôte. Avant que vous n'envoyiez quoi
  que ce soit au terminal (comme les séquences d'échappement ci-dessus),
  ses options d'``interface de communication'' comme la vitesse de
  transmission doivent être configurées 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''.


  1122..33..  VVuuee dd''eennsseemmbbllee ddee llaa mmiissee eenn ppllaaccee ((ccoonnffiigguurraattiioonn)) ddee ll''oorrddiinnaa­­
  tteeuurr


  À part peut-être l'envoi de séquences d'échappement à partir de
  l'ordinateur pour configurer le terminal, il faut configurer
  l'ordinateur lui-même pour gérer 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
  envoyée au terminal quand l'ordinateur démarre. Voyez ``getty'' pour
  plus de détails.

  L'ordinateur communique avec le terminal en utilisant un logiciel de
  pilote de périphérique (qui fait partie du noyau). Le pilote de
  périphérique série possède une configuration par défaut et est aussi
  configuré en partie (parfois en totalité) par le programme getty avant
  de lancer "login" sur chaque terminal. Cependant, des configurations
  supplémentaires sont souvent nécessaires en utilisant des programmes
  appelés "stty" et "setserial". Ces programmes (si besoin est) doivent
  être lancés à chaque fois que l'ordinateur démarre puisque la
  configuration est perdue à chaque fois que l'ordinateur s'éteint.
  Voyez ``détails de la mise en place de l'ordinateur (configuration)''.





  1122..44..  BBeeaauuccoouupp dd''ooppttiioonnss


  Il y a énormément 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 problèmes puisque les
  possibilités qu'elles introduisent ne sont pas utilisées. Par exemple,
  si vous n'avez pas d'imprimante reliée au terminal, la manière dont
  sont positionnés les paramètres de configuration de l'imprimante dans
  le terminal n'a aucun effet. Cette dernière 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 caractères (les données) de l'ordinateur vers
  l'imprimante uniquement. Alors rien ne s'affichera sur l'écran et
  votre terminal sera mort. Certains terminaux possèdent une option de
  configuration pour informer le terminal qu'aucune imprimante n'est
  présente. Dans ce cas le terminal ignorera toute commande qui
  redirigerait la sortie vers "l'imprimante" et le problème ci-dessus
  n'arrivera jamais. Cependant, ceci n'apporte pas beaucoup d'aide
  puisqu'il y a beaucoup d'autres commandes erronnées qu'on peut envoyer
  à votre terminal et qui sèmeront vraiment la pagaille. Cela arrivera
  sûrement si vous envoyez un fichier binaire au terminal par accident.

  Dans certains cas un paramètrage incorrect ne causera aucun problème
  jusqu'à ce qu'il vous arrive de lancer une application peu connue qui
  attend du paramètre qu'il soit positionné d'une certaine façon.
  Certaines options ne concernent que l'apparence de l'affichage et le
  terminal fonctionnera correctement si elles sont mal positionnées mais
  ne sera pas aussi beau à regarder.

  Certaines options ne concernent que le terminal et n'ont pas besoin
  d'être positionnées sur l'ordinateur. Par exemple : voulez-vous des
  lettres noires sur un fond clair ? C'est plus agréable à l'oeil qu'un
  fond noir. Une touche qu'on appuie doit-elle se répéter ? Est-ce que
  l'écran doit défiler quand une ligne dépasse le bord droit de l'écran
  ? Est-ce que les touches doivent émettre un cliquetis ?


  1122..55..  OOppttiioonnss ddee ll''iinntteerrffaaccee ddee ccoommmmuunniiccaattiioonn


  Certains paramètres (options) de communication concernent à la fois le
  terminal et l'ordinateur et doivent être positionnés exactement à
  l'identique sur les deux : vitesse, parité, bits/caractères et
  contrôle de flux. D'autres options de communication ne sont
  positionnées 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 positionnées que sur l'ordinateur en utilisant la commande
  "setserial". Jusqu'à ce que toutes les options essentielles ci-dessus
  soient paramétrées de manière compatible on ne pourra pas faire de
  communication série satisfaisante (et sûrement 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 spéciale sur chaque terminal).
  L'ordinateur hôte est configuré en lançant des commandes à chaque
  démarrage de l'ordinateur (ou quand les gens se loggent). Quelquefois
  le programme getty (qu'on trouve dans le fichier /etc/inittab) qui
  démarre le processus login s'occupera de ceci pour l'ordinateur. Voyez
  ``getty (dans /etc/inittab)''.

  Les paramètres à la fois pour l'ordinateur et le terminal sont :



  ·  ``vitesse (bits/seconde)''

  ·  ``parité''

  ·  ``bits par caractère''

  ·  ``contrôle de flux''

  Certains paramètres essentiels au terminal seul sont :


  ·  ``sélection du port''

  ·  Positionner la communication en full duplex (=FDX sur les terminaux
     Wyse)


  Si le programme ``getty (dans /etc/inittab)'' ne peut pas paramétrer
  la partie côté ordinateur de la manière dont vous le désirez, vous
  aurez alors besoin d'utiliser l'une des commandes ``stty et
  setserial'' (ou les deux).


  1122..55..11..  VViitteessssee


  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
  contrôle de flux peut rendre possible des vitesses plus élevées. Il se
  peut qu'on puisse configurer deux vitesses sur le terminal :
  transmission et réception, qu'on abrège parfois en T et R. On leur
  donne en général la même valeur puisque stty dans Linux ne semble pas
  encore avoir l'option de les positionner différemment.  (Il y a une
  option pour faire ceci avec la commande "stty" mais en réalité il
  semble qu'elle leur donne la même 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.


  1122..55..22..  PPaarriittéé eett ddeevvrriieezz--vvoouuss ll''uuttiilliisseerr ??


  Pour une définition, voyez ``la parité expliquée''.  La parité
  désactivée est souvent la valeur par défaut. Pour activer la parité,
  vous devez à la fois l'activer et ensuite sélectionner une parité
  paire ou impaire.  Cela ne fait probablement pas de différence si
  c'est pair ou impair. Pour les terminaux il y a parfois des paramètres
  de parité pour la transmission et la réception. Vous devriez
  positionner les deux à la même valeur puisque stty sur l'ordinateur ne
  permet pas un paramétrage différent.

  Est-ce vous devriez utiliser la parité ? Il est bon de disposer de la
  parité, bien qu'elle ne soit pas strictement nécessaire. 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 coût. D'abord, elle est légèrement
  plus compliquée à configurer puisqu'en général par défaut il n'y a pas
  de parité. Ensuite, la parité diminuera la vitesse avec laquelle les
  octets traversent le câble puisqu'il y aura un bit supplémentaire par
  octet. Ceci peut ou peut ne pas diminuer la vitesse effective.

  Par exemple, un terminal à sortie papier est en général limité par la
  mécanique 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'arrêt" de contrôle de flux pour
  permettre au mécanisme d'impression de rattraper le rythme. À cause
  des attentes supplémentaires dues au contrôle de flux, la vitesse
  effective n'est pas meilleure sans parité qu'avec. La situation est
  identique pour certains terminaux : après avoir mis en place la parité
  il peut y avoir moins d'attente due au contrôle de flux par unité de
  temps ce qui résulte en plus de bits/seconde (en moyenne). Cependant,
  à cause des bits de parité ajoutés, le nombre d'octets/seconde (en
  moyenne) reste le même.

  Une possibilité est d'installer les terminaux sans parité. Ensuite si
  on remarque des erreurs de parité, on peut l'activer plus tard. Pour
  détecter des erreurs possibles sans parité, regardez des erreurs de
  frappe que vous ne pensez pas avoir faites. Si vous détectez une telle
  erreur, rafraichissez l'écran (retransmettez de l'ordinateur). Si
  l'erreur s'en va, c'est alors sûrement 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 réduire la vitesse et/ou utiliser un câble plus
  court/meilleur. Activer la parité ne réduira pas le nombre d'erreurs
  mais vous signalera quand une erreur s'est produite.

  La politique opposée est d'activer la parité dès le départ. Ensuite si
  on ne voit jamais d'erreur de parité (des symboles d'erreur sur
  l'écran), sur une période de temps raisonnable, disons un mois ou
  deux, on peut la désactiver sans danger.


  1122..55..33..  BBiittss//ccaarraaccttèèrree


  C'est la taille d'un caractère (le nombre de bits de données par
  caractère, en excluant tout bit de parité).  Pour l'ASCII, c'est 7,
  mais c'est 8 pour les jeux de caractères ISO. Si vous n'allez utiliser
  que des caractères ASCII, sélectionnez alors 7 bits puisqu'il est plus
  rapide de transmettre 7 bits que 8. Certains vieux terminaux
  n'afficheront que des caractères 7 bits.


  1122..55..44..  QQuueell ccoonnttrrôôllee ddee fflluuxx ((pprriissee ddee ccoonnttaacctt)) ??


  Il faut choisir entre le contrôle de flux "matériel" (par exemple
  rts/cts ou dtr/cts) et "logiciel" (Xon/Xoff). (le menu du terminal
  Adds utilise de manière incorrecte "Xon/Xoff" pour indiquer tout type
  de contrôle de flux.)  Bien que le contrôle de flux matériel soit plus
  rapide (si les deux fils supplémentaires nécessaires sont présents
  dans le câble et si le terminal le supporte) dans la plupart des cas
  Xon/Xoff devrait fonctionner correctement.  Certaines personnes disent
  qu'elles ont résolu des problèmes dérangeants (voir ci-dessous) en
  passant au contrôle de flux matériel mais le contrôle de flux logiciel
  a bien fonctionné sur les autres installations (et chez moi
  personnellement).

  Si vous utilisez le contrôle de flux logiciel (Xon/Xoff) et avez des
  utilisateurs qui ne le savent pas, ils peuvent alors envoyer par
  accident un Xoff à l'hôte et bloquer leur terminal. Pendant qu'il est
  bloqué, ils peuvent très bien taper frénétiquement en une vaine
  tentative pour le débloquer.  Quand alors Xon est enfin envoyé pour
  rétablir la communication, tout ce qui a été tapé à toute vitesse est
  exécuté, peut-être avec des résultats inattendus. Ils ne risquent pas
  ceci avec le contrôle de flux matériel.  Voyez ``contrôle de flux''
  pour une explication sur le contrôle de flux.



  1122..55..55..  SSéélleeccttiioonn dduu ppoorrtt


  Puisque la plupart des terminaux possèdent deux connecteurs ou plus
  derrière eux, il est en général 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 à côté du
  connecteur (regardez-le bien) et ce nom (comme Aux ou Serial 2, ou
  Modem) peut être donné à la connexion vers l'hôte principal ou vers
  l'imprimante (ou autre).


  1122..66..  EEssssaaii rraappiiddee


  Bien que tout ce qui est au-dessus puisse sembler très compliqué,
  faire fonctionner un terminal est souvent assez simple. La section
  ``installation rapide'' décrit une manière simple d'essayer de le
  faire. Mais si cela ne fonctionne pas ou si vous voulez améliorer
  l'affichage, vous avez besoin d'en lire plus.


  1133..  DDééttaaiillss ddee llaa mmiissee eenn ppllaaccee ((ccoonnffiigguurraattiioonn)) dduu tteerrmmiinnaall


  À part la prochaine sous-section qui décrit l'envoi de séquences
  d'échappement au terminal, cette section présente principalement les
  détails de la configuration du terminal à la main en s'asseyant devant
  le terminal et en se déplaçant entre différents 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 même si vous ne l'avez pas il y a ici des
  informations concernant beaucoup d'options que vous serez peut-être
  amené à configurer.

  Les paramètres de communication tels que la vitesse d'envoi doivent
  toujours être configurés 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 résultats dans
  la mémoire permanente du terminal ou vous pouvez le faire en envoyant
  des séquences 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 façon. Si
  vous ne savez pas, vous pouvez simplement envoyer la chaîne
  d'initialisation de terminfo à votre terminal à chaque fois que vous
  utilisez le terminal. Peut-être que ne rien faire vous donnera quand
  même un terminal utilisable. Vous (ou une application) pouvez toujours
  changer les choses en envoyant certains séquences d'échappement au
  terminal.


  1133..11..  EEnnvvooyyeerr ddeess ssééqquueenncceess dd''éécchhaappppeemmeenntt aauu tteerrmmiinnaall


  Une fois que l'interface de communication est en place, le reste de la
  configuration des terminaux peut parfois être fait en envoyant des
  séquences 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 manière automatique. Il
  peut (ou non) y avoir une commande à envoyer au terminal pour lui dire
  de sauver sa configuration en cours dans sa mémoire permanente pour
  qu'elle soit présente la prochaine fois qu'on allumera le terminal.
  Il y a une manière simple d'envoyer ces séquences d'échappement et une
  manière compliquée. Pour la manière simple vous ne regardez jamais les
  séquences d'échappement mais envoyez des commandes qui trouvent toutes
  seules la séquence d'échappement appropriée dans la base de données
  terminfo et l'envoient. Malheureusement, toutes les séquences
  d'échappement que vous avez besoin d'envoyer ne sont pas toujours dans
  la base de données terminfo. Ainsi la manière plus compliquée (mais
  peut-être meilleure) est d'envoyer directement les séquences
  d'échappement.

  Pour cette méthode compliquée vous aurez besoin d'un manuel avancé.
  Les vieux manuels de terminaux comprenaient autrefois une liste
  détaillée de séquences d'échappement mais les manuels récents n'en ont
  généralement 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 séquences d'échappement''
  de certains terminaux est sur Internet mais c'est une liste brute et
  sûrement incomplète.

  Même sans manuel ou autre, vous pouvez quand même envoyer des
  commandes pour configurer le terminal en utilisant les programmes
  "tput" et "setterm". Voyez ``changer les paramètres du terminal''.
  Vous pourriez simplement envoyer une chaîne d'initialisation au
  terminal à partir de l'entrée terminfo si la chaîne d'initialisation
  configure le terminal comme vous le désirez. Voyez ``chaîne
  d'initialisation''.  Excepté si vous pensez envoyer ces séquences de
  l'ordinateur au terminal à chaque fois que vous allumez ce dernier,
  vous devez sauver ces paramètres dans la mémoire permanente du
  terminal.


  1133..22..  CCoonnffiigguurraattiioonn ddeess vviieeuuxx tteerrmmiinnaauuxx


  Sur les vieux terminaux, cherchez sur le clavier des noms juste au-
  dessus de la rangée supérieure du pavé numérique. S'ils existent, ces
  noms peuvent représenter l'action des touches en mode configuration.
  Certains vieux terminaux peuvent n'avoir qu'un menu de configuration
  (setup). Certains encore plus anciens possèdent des interrupteurs
  physiques. Dans certains cas toutes les touches ne sont pas bien
  nommées mais peuvent être bien cachées.  Bien sûr, si vous activez
  quelque chose en basculant un interrupteur, c'est "sauvegardé" et vous
  n'avez pas besoin de sauver le paramètre en mémoire permanente.


  1133..33..  EEnnttrreerr ddaannss llee mmooddee ddee ccoonnffiigguurraattiioonn


  Pour sélectionner des options (configurer) sur le terminal, vous devez
  d'abord entrer en mode "setup" et ensuite sélectionner des options
  (c'est-à-dire configurer) en utilisant des menus stockés dans le
  terminal et affichés sur l'écran. Pour ce faire, le terminal n'a même
  pas besoin d'être relié à un ordinateur. La manière d'entrer en mode
  de configuration est expliquée 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 même 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 modèles postérieurs cette touche peut avoir été reprogrammée
     pour faire autre chose, alors éteignez le terminal. Quand vous
     remettrez le courant, appuyez sur la touche F3 dès que vous obtenez
     un message initial à l'écran.

  ·  IBM : 3151 : Ctrl-ScrollLock. 3153 : Ctrl-Moins_du_pavé_numérique
     (ou pareil que pour le 3151).

  Pour vous déplacer dans les menus de configuration, utilisez les
  touches fléchées. Utilisez Retour, Espace ou une touche spéciale
  ("toggle" sur les vieux terminaux) pour sélectionner 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).


  1133..44..  OOppttiioonnss ddee ccoommmmuunniiccaattiioonn


  Pour que le terminal fonctionne, il faut paramétrer correctement la
  vitesse, la parité, le nombre de bits par caractère et le mode de
  communication. Un contrôle de flux incorrect peut être la cause de la
  perte ou de la corruption des données affichées à 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 supplémentaires
  positionnées uniquement sur le terminal.


  ·  ``Vitesse (bits/seconde)'' (vitesse de transmission) : 9600, 19200,
     etc.

  ·  ``Parité'' : aucune, paire, impaire, marque, espace

  ·  ``Bits par caractère'' {Données} : 7 ou 8

  ·  ``Contrôle de flux'' ou prise de contact {Hndshk} : aucun, Xon-
     Xoff, ou matériel (DTR, etc)


  ·  Prise de contact du récepteur {Rcv Hndshk} protège les données
     reçues par le terminal en envoyant des signaux de contrôle de flux
     à l'hôte.

  ·  Prise de contact de l'émetteur {Xmt Hndshk} est une protection des
     données transmises par le terminal. Le terminal reçoit des signaux
     de contrôle de flux (et bloque/débloque le clavier). Comprend
     "Xon/Xoff entrant".


  ·  Nombre de bits d'arrêt :  1 ou 2. Voyez ``séquence de tension pour
     un octet''

  ·  Niveau de contrôle de flux {Rcv Hndshk Level} {{Xoff à ...}} : le
     contrôle de flux enverra un "arrêt" quand ce nombre d'octets sera
     dépassé 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 (caractères par seconde) spécifié
     même si la vitesse est plus grande.

  ·  Limite du taux de touches de fonction : comme ci-dessus mais pour
     les messages de touches de fonction.


  ·  ``Sélection du port'' : quel connecteur physique va à l'hôte {Host
     Port} ?


  1133..55..  SSaauuvveerr llaa ccoonnffiigguurraattiioonn


  Votre configuration doit être sauvée dans la mémoire permanente du
  terminal pour être en place la prochaine fois que vous allumez le
  terminal. Si vous manquez à cette sauvegarde, les nouveaux paramètres
  seront perdus quand vous éteindrez le terminal. Avant de vous fatiguer
  à configurer un terminal, assurez-vous que vous savez sauvegarder les
  paramètres. Sur les terminaux modernes la commande de sauvegarde se
  fait grâce à un menu. Dans certains vieux terminaux, seul le manuel
  vous indique comment sauver. Pour beaucoup d'entre eux, pressez Ctrl-S
  pour sauver.


  1133..66..  PPaarraammèèttrreess//ooppttiioonnss ddee ccoonnffiigguurraattiioonn


  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 paramètres utilisés en émulation
  de terminaux.  L'émulation est souvent légèrement différente du
  terminal réel.

  Ce qui suit dans cette section décrit certaines options disponibles
  dans les menus de configuration de beaucoup de terminaux. Les options
  sont aussi appelées paramètres ou capacités. Beaucoup d'options sont
  parfois appelées "modes". Paramétrer des options est souvent appelé
  "configurer". On peut paramétrer beaucoup de ces options en envoyant
  certaines séquences d'échappement au terminal. Des modèles et marques
  différents de terminaux ont des options variées et la même option peut
  avoir des noms différents (qu'on ne donnera pas tous ici). Les noms
  abrupts utilisés par Wyse sont entourés de {...}. Les noms utilisés
  principalement pour les terminaux VT sont entourés de {{...}}.


  1133..77..  ÉÉmmuullaattiioonn {{PPeerrssoonnnnaalliittéé}} {{{{MMooddeess ddee tteerrmmiinnaauuxx}}}}


  La plupart des terminaux modernes peuvent émuler plusieurs autres
  terminaux.  Le terminal peut sûrement faire plus si on le fait
  s'émuler lui-même (en fait sans émulation) {personnalité native}.
  Quelque fois il y deux émulations différentes pour le même modèle 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 caractères
  possibles).

  Des vieux modèles de terminaux possèdent en général moins de
  possibilités que les modèles plus récents. Supposez qu'on veuille
  émuler un vieux terminal tout en gardant certaines possibilités
  avancées du modèle de terminal plus récent devant lequel on s'assied.
  Ceci est parfois possible (jusqu'à un certain niveau). Cette
  possibilité est parfois appelée {Enhance} (ou Enhanced ??).


  1133..88..  OOppttiioonnss dd''aaffffiicchhaaggee



  1133..88..11..  TTaaiillllee ddee cceelllluullee ddee ccaarraaccttèèrree{{CChhaarr CCeellll}}



  C'est la taille de la cellule dans laquelle tient un caractère. On la
  mesure en pixels (= petits points). Plus il y a de points, meilleure
  est la résolution. 10x16 représente 10 points de large sur 16 points
  de haut (16 lignes et 10 colonnes). Notez que la notation est inversée
  par rapport à la notation de la dimension des matrices qui donnent les
  lignes (la hauteur) d'abord. De même, la cellule de caractère comprend
  les lignes et les colonnes allouées à l'espace entre des caractères
  adjacents, donc la taille de la cellule qui définit les bords d'un
  caractère réel peut être plus petite.


  1133..88..22..  CCoolloonnnneess // lliiggnneess


  En général il y a 80 colonnes et 24 ou 25 lignes. Ceci veut dire qu'il
  peut y avoir jusqu'à 80 caractères sur une ligne de l'écran. Beaucoup
  de terminaux possèdent une option de 132 caractères par colonne mais,
  sauf si vous avez un grand écran, les petits caractères peuvent être
  difficiles à lire. {{Activer le mode 132 colonnes}}


  1133..88..33..  CCuurrsseeuurr


  On peut paramétrer le curseur pour qu'il apparaisse comme un rectangle
  (= bloc) {Blk}. D'autres options sont le souligné {Line} ou le
  clignotement. Je préfère 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 disparaîtra mais les nouveaux caractères
  apparaîtront à l'écran au fur et à mesure que vous tapez sous le
  curseur invisible.


  1133..88..44..  AAttttrriibbuuttss dd''aaffffiicchhaaggee ((ccooookkiieess mmaaggiiqquueess))


  Les ``attributs d'affichage'' peuvent être soit des cookies magiques
  soit des octets d'attributs assignés à chaque caractère. 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 réalité
  être des demi-octets = petits bouts).


  1133..88..55..  CCaarraaccttèèrreess ddee ccoonnttrrôôllee dd''aaffffiicchhaaggee {{MMoonniittoorr}}


  Ils peuvent avoir des noms variés tels que "contrôles d'affichage".
  Désactivés (par défaut), ils veulent dire "interpréter les caractères
  de contrôle". Quand on les active, vous voyez les séquences
  d'échappement de l'hôte (que vous ne voyez jamais à l'écran en temps
  normal). Pour que ces séquences soient visualisées d'un coup sur une
  ligne, le terminal ne les interprète pas, sauf la séquence CR LF, qui
  crée une nouvelle ligne. Voyez ``codes de contrôle''.


  1133..88..66..  LLaarrggeeuurr//hhaauutteeuurr ddoouubbllee


  Certains terminaux peuvent afficher des caractères en largeur et/ou en
  hauteur double. Cette possibilité est rarement nécessaire. En
  changeant une ligne en largeur double (DW = Double Width) la moitié
  gauche (RH = Right Half) est poussée à l'extérieur de l'écran et il
  faut se poser la question de l'effacer ou non. "Préserver" veut dire
  garder la moitié gauche des lignes en largeur double. En mode hauteur
  double, il peut être nécessaire d'envoyer chacune de ces lignes deux
  fois (la deuxième fois une ligne plus bas) pour obtenir une ligne en
  hauteur double à l'écran.


  1133..88..77..  VViiddééoo iinnvveerrssee {{DDiissppllaayy}} ((FFoonndd ccllaaiirr//ffoonnccéé))


  La vidéo normale consiste en des lettres (premier plan) claires
  (blanches, vertes, ambre) sur un fond foncé (noir). La vidéo inverse
  {Display Light} est le contraire : du texte noir sur un fond clair.
  Cela est plus commode pour les yeux (sauf si la pièce est sombre).


  1133..88..88..  LLiiggnnee dd''ééttaatt


  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 manière. Avec une telle
  ligne d'état, une application peut envoyer au terminal une séquence
  d'échappement spéciale 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 réelle en
  positionnant directement le curseur. L'utilisateur de base qui le
  regarde ne voit pas la différence.


  1133..88..99..  PPeennddaanntt llee cchhaannggeemmeenntt 8800//113322 :: eeffffaacceerr oouu pprréésseerrvveerr ??


  En basculant le nombre de colonnes de 80 à 132 (ou l'inverse), est-ce
  que les données affichées dans le format précédent doivent être
  effacées ou préservées ? {80/132 Clr} {{Screen Width Change}}. La
  manière dont vous positionnez cette option ne devrait pas faire de
  différence puisque si une application utilise 132 colonnes, elle
  devrait positionner cette option correctement grâce à une séquence
  d'échappement.


  1133..99..  OOppttiioonnss lliiééeess aauuxx ppaaggeess


  Pour qu'un terminal Wyse puisse accéder à plusieurs pages dans la
  mémoire d'affichage, il faut activer {Multipage}.


  1133..99..11..  TTaaiillllee ddee llaa ppaaggee


  La mémoire du terminal peut être divisée en un certain nombre de
  pages. Voyez ``pages'' et ``pages (définition)'' pour une explication
  sur les pages. Vous pouvez partitionner la mémoire de pages en un
  certain nombre de pages de taille déterminée. Les applications Linux
  ne semblent pas utiliser les pages pour le moment, il ne devrait donc
  pas y avoir de différence au niveau de la configuration.


  1133..99..22..  CCoouuppllaaggee ((dduu ccuurrsseeuurr eett ddee ll''aaffffiicchhaaggee))


  La mémoire du terminal peut être divisée en un certain nombre de
  pages. Voyez ``pages'' et ``pages (2)'' pour avoir une explication sur
  les pages. Quand on déplace le curseur à un endroit en mémoire vidéo
  qui n'est pas affichée à cet instant (comme une autre page, ou sur la
  même 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 même 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".


  1133..1100..  FFaaiirree uunn rraappppoorrtt eett rrééppoonnddrree


  Le terminal donnera son identité et son état, ou enverra un message
  pré-enregistré en réponse à certaines séquences d'échappement.


  1133..1100..11..  MMeessssaaggee ddee rrééppoonnssee ((cchhaaîînnee))


  Vous pouvez écrire un message court pendant la configuration qui peut
  être envoyé de manière optionnelle à l'hôte durant le démarrage ou
  être envoyé à l'hôte en réponse à une demande de l'hôte (peut-être le
  caractère de contrôle ENQ (enquire, demande)).


  1133..1100..22..  RRééppoonnssee aauuttoommaattiiqquuee


  Si ce paramètre est positionné, envoie le message de réponse à l'hôte
  durant le démarrage sans que l'hôte le demande. Est-ce qu'un processus
  "getty" quelconque cherchent ce message ??


  1133..1100..33..  RRééppoonnssee ccaacchhééee


  Si ce paramètre est positionné, il ne laissera personne voir le
  message de réponse (sauf bien sûr l'ordinateur hôte). S'il faut le
  modifier, désactivez "réponse cachée" et le message précédemment caché
  sera détruit pour que vous puissiez alors entrer un nouveau message
  (mais vous ne verrez pas le message précédent).


  1133..1100..44..  NNuumméérroo IIDD dduu tteerrmmiinnaall {{AANNSSII IIDD}}


  Le terminal envoie cette réponse à la réception d'une demande
  d'identité.


  1133..1111..  OOppttiioonnss dduu ccllaavviieerr



  1133..1111..11..  CClliicc ddee ttoouucchhee


  Quand ce paramètre 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 désactiver cette option.


  1133..1111..22..  VVeerrrroouuiillllaaggee mmaajjuussccuullee {{KKeeyylloocckk}}


  Quand la touche de verrouillage majuscule est enfoncée, les touches
  alphabétiques doivent-elles être les seules à générer des caractères
  en majuscule ? Si le paramètre est positionné à {Caps} ou majuscule
  uniquement (upper-case-only), alors l'appui sur une touche numérique
  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 caractère "décalé"
  quand le verrouillage majuscules est enfoncé (l'appui sur la touche 5
  devrait afficher % sans devoir appuyer sur Shift, etc.) NdT : sur les
  claviers français, c'est l'inverse, les chiffres étant normalement
  obtenus en appuyant sur la touche Shift.


  1133..1111..33..  RRééppééttiittiioonn aauuttoommaattiiqquuee {{RReeppeeaatt}}


  Si on maintient une touche enfoncée, celle-ci est "tapée" de manière
  répétée.  Cela est pratique pour taper répétitivement le même
  caractère pour créer une ligne à travers une page.


  1133..1111..44..  SSoonnnneettttee ddee mmaarrggee


  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 créeront automatiquement une ligne nouvelle si
  nécessaire (pas besoin d'appuyer sur la touche entrée), par conséquent
  cette possibilité est rarement nécessaire.


  1133..1111..55..  RReeddééffiinniirr lleess ttoouucchheess


  Le code envoyé à l'hôte quand on appuie sur une touche correspond
  normalement au code ASCII de cette touche (et dépend 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 complètement redéfinir le clavier en configurant le
  terminal de cette façon. Cela peut être utile pour certaines langues
  étrangères et pour les claviers Dvorak etc.  qui vous permettent de
  taper plus rapidement.


  1133..1111..66..  TToouucchhee ddee ccooiinn ((uunniiqquueemmeenntt ppoouurr lleess WWyyssee))


  Les terminaux Wyse possèdent une touche près du coin inférieur gauche
  qu'on peut configurer pour avoir des fonctions variées. Elle est
  souvent appelée "Funct", "Compose Character" ou "Alt". Quand on la met
  sur {Hold} (arrêt du défilement, No-Scroll), elle permet d'arrêter le
  flux de données (en utilisant le contrôle de flux) vers le terminal.
  L'appui à nouveau sur cette touche redonne un flux normal. Quand on la
  met sur {Compose} elle permet de générer un nombre limité de
  caractères non-latins prédéfinis. 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
  alphanumérique enfoncée envoie un octet préfixe (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
  décimal sur le pavé numérique (suivi de "entrée") envoie le même
  chiffre en hexadécimal ??





  1133..1111..77..  EEnnvvooiiss ggrrââccee aauu ppaavvéé nnuumméérriiqquuee oouu aauuxx ttoouucchheess fflléécchhééeess


  On peut configurer le pavé numérique (le rectangle de touches presque
  toutes numériques à la droite de la partie principale du clavier) pour
  envoyer des codes spéciaux qui feront certaines choses dans certaines
  applications. Idem pour les touches fléchées. Il y a donc un mode
  "normal" où elles envoient ce qui est marqué sur la touche (ou la
  séquence d'échappement normale pour une touche fléchée) et un mode
  "application" où une séquence d'échappement spéciale est envoyée. Dans
  certains cas il y a un mode numérique "hexadécimal" qui ressemble au
  mode numérique à la différence que 6 touches non numériques envoient
  les lettres A à F. On peut ainsi taper par exemple "B36F" sur le pavé
  numérique.


  1133..1111..88..  QQuu''eennvvooiieenntt lleess ttoouucchheess SShhiifftt++DDeell eett SShhiifftt++BBaacckkssppaaccee ??


  Selon la manière dont les touches sont configurées Shift-Del envoie
  parfois le caractère de contrôle CAN et Shift-Backspace envoie parfois
  DEL.


  1133..1111..99..  CCooddeess ddee bbaallaayyaaggee PPCC


  Les terminaux récents 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 même chose et même plus.
  Un port série sous Linux ne peut pas s'occuper de tels codes de
  balayage.


  1133..1111..1100..  CCaarraaccttèèrreess aalltteerrnnééss


  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 caractères alternatifs
  sont envoyés.


  1133..1122..  SSiiggnniiffiiccaattiioonn ddeess ccooddeess ddee ccoonnttrrôôllee rreeççuuss



  1133..1122..11..  NNoouuvveellllee lliiggnnee aauuttoommaattiiqquuee {{NNeewwlliinnee}}


  Dans ce cas "nouvelle ligne" veut dire une ligne nouvelle démarrant
  sur le bord gauche en dessous de la ligne en cours. Sous Linux et en C
  "nouvelle ligne" (NL) peut avoir une signification différente : le
  caractère de saut de ligne LF qu'on appelle aussi nouvelle ligne ou
  NL. C'est parce que dans les fichiers texte Linux, le caractère 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 paramètre Auto New Line (nouvelle ligne automatique) est
  positionné, la situation "normale" ci-dessus est annulée et une
  nouvelle ligne physique est créée sur l'écran en recevant un LF de
  l'hôte. C'est exactement ce qu'on veut sous Linux. Sauf que (quand
  Auto New Line est positionné) la touche Retour (ou Entrée) envoie une
  séquence CR LF à l'hôte (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 conséquent rarement utilisée. À la
  place, les traductions nécessaires sont effectuées par le pilote du
  port série par défaut. 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 défaut.


  1133..1122..22..  SSaauutt ddee lliiggnnee aauuttoommaattiiqquuee {{RRccvv CCRR}}


  Cela est simplement un autre type de "nouvelle ligne automatique".
  Quand un caractère CR (retour chariot) est reçu, une action LF (saut
  de ligne) est ajoutée ce qui résulte en l'affichage d'une nouvelle
  ligne. Puisque Linux marque les fins de lignes par LF, cette option
  n'est pas utilisée.


  1133..1122..33..  RReeccoonnnnaaîîttrree DDEELL ((sseeuulleemmeenntt ppoouurr WWyyssee ????)) oouu NNUULLLL


  Si ce paramètre est désactivé, tout caractère DEL reçu par le terminal
  est ignoré. S'il est activé, DEL effectue un retour en arrière
  destructif. Les caractères NULL sont en général ignorés dans n'importe
  quel cas. Les caractères DEL et NULL sont parfois utilisés ensemble
  pour faire du remplissage. Voyez ``Remplissage''.


  1133..1133..  OOùù vvaa llee nnoouuvveeaauu tteexxttee



  1133..1133..11..  PPaassssaaggee àà llaa lliiggnnee


  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'hôte n'a pas envoyé de caractère 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 caractères "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 général mieux de positionner le passage à la ligne.

  Pour un écran de 80 colonnes, la plupart des terminaux ne passent à la
  ligne que si le 81ème caractère venant de l'hôte est un caractère
  graphique (imprimable). Cela autorise les cas où le 81ème caractère
  venant de l'hôte peut être un "retour" ou "nouvelle ligne" (caractères
  non graphiques) qui veut dire que l'application gère bien le passage à
  la ligne et le terminal n'a pas besoin d'intervenir.


  1133..1133..22..  DDééffiilleemmeenntt


  Le défilement {Scrl} est quand toutes les lignes de l'écran se
  déplacent vers le haut ou vers le bas. On parle aussi de "panoramique"
  (pan), ce qui comprend un mouvement sur les côtés. Dans le défilement
  ordinaire, les lignes disparaissent vers le bas ou vers le haut de
  l'écran et de nouvelles lignes envoyées par l'hôte apparaissent sur le
  bord opposé (haut ou bas). Il y en a trois sortes : doux, par sauts ou
  instantané. Le défilement instantané n'est pas vraiment un défilement
  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 précédent). Le défilement par sauts est quand les nouvelles
  lignes arrivent en sautillant les unes après les autres [ NdT : en
  fait, elles arrivent une à la fois, mais la tentation était trop forte
  ;-) ].  Le défilement doux {Smth} est quand le texte se déplace à une
  vitesse soutenue vers le haut ou vers le bas. Si la vitesse de
  défilement douce est suffisamment lente, on peut lire les lignes qui
  apparaissent alors qu'elles sont encore en train de bouger (en
  mouvement).

  Le défilement doux sur les terminaux lents était utile autrefois
  puisqu'on pouvait continuer à lire alors que l'affichage défilait.
  Mais avec les vitesses de transfert plus rapides, le défilement 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
  défile prend légèrement plus de temps que la lecture d'un texte fixe,
  on peut en fait perdre plus de temps si on sélectionne un défilement
  doux.

  Si on désactive le défilement automatique {Autoscrl}, le nouveau texte
  venant de l'hôte 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
  mélange (de façon insensée) à l'ancien. Si le vieux texte est effacé,
  le nouveau texte sort alors de son contexte. Conservez donc le
  défilement automatique.


  1133..1133..33..  NNoouuvveellllee ppaaggee ??


  Voyez ``pages'' et ``pages (définition)'' pour avoir une explication
  sur les pages. Quand la page courante est pleine (la dernière ligne
  est terminée), est-ce que la page doit défiler, ou est-ce qu'une
  nouvelle page doit être créée (laissant la page précédente stockée
  dans la mémoire d'affichage du terminal) ? Si le paramètre {Autopage}
  est positionné, une nouvelle page est créée. Puisque vous n'utilisez
  probablement pas les pages, vous devriez sûrement désactiver ce
  paramètre.


  1133..1144..  TToouucchheess ddee ffoonnccttiioonn


  Ce sont les touches nommées 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 (redéfinir) ces
  touches pour envoyer une chaîne d'octets définie par l'utilisateur. On
  peut souvent les "programmer" facilement en utilisant un certain menu
  de configuration {FKey}. Sur certains terminaux, on peut aussi
  spécifier où la chaîne est envoyée quand on appuie sur la touche. En
  mode "normal" l'appui sur la touche ressemble à la frappe d'une chaîne
  au clavier. En mode "local" l'appui sur la touche envoie la chaîne au
  terminal (comme si le terminal était en mode local). On peut utiliser
  cela pour envoyer des séquences d'échappement au terminal pour le
  configurer d'une manière spéciale. En mode "lointain" la chaîne est
  toujours envoyée sur le port série vers l'ordinateur hôte (même si le
  terminal est en mode local).


  1133..1155..  OOppttiioonnss eenn mmooddee ppaarr bbllooccss



  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'hôte en transmettant par rafales. Mais c'est plus
  compliqué à configurer et ce n'est donc pas beaucoup utilisé.


  1133..1155..11..  AAffffiicchhaaggee ddee ffoorrmmuullaaiirreess


  En mode par blocs, certaines parties de l'écran concernent le texte
  des formulaires et sont donc protégées en écriture "Prot" {WPRT}. Des
  options peuvent faire que les caractères dans ces parties apparaissent
  assombris, en vidéo inverse {WPRT Rev} et/ou soulignés {WPRT Undrln}.
  {WPRT Intensity} (l'intensité) peut être sombre, normale ou même
  vierge (invisible).


  1133..1155..22..  EEnnvvooii ppaarr bbllooccss


  Est-ce que le texte protégé en écriture (le texte d'origine du
  formulaire) doit être envoyé à l'hôte lors de la transmission d'un
  bloc : {Send All} ou est-ce que le texte protégé en écriture est aussi
  protégé en lecture : {Send Erasable} ?


  1133..1155..33..  PPaarrttiiee àà eennvvooyyeerr


  Doit-on envoyer l'écran entier ou simplement la partie qui défile ?
  {Send Area}. L'envoi doit-il s'arrêter quand la position courante du
  curseur est atteinte ? Si {Xfer Term} est mis sur Cursor, seules les
  données sur l'écran jusqu'au curseur sont envoyées.


  1133..1155..44..  DDéélliimmiitteeuurr ddee bblloocc // ddee ppaaggee


  Quel est le symbole de délimitation à ajouter à un bloc de données ?
  {Blk End} ou à la fin d'une page {Send Term}inaison.


  1133..1166..  BBllooccaaggeess


  Il y a divers types de blocages. L'un est le clavier bloqué à cause du
  contrôle de flux. Voyez ``blocage du clavier''. Un autre blocage
  {Feature Lock} est celui qui empêche l'ordinateur hôte de modifier la
  configuration du terminal en envoyant certaines séquences
  d'échappement au terminal. Placer un tel verrou peut provoquer des
  comportements inattendus quand les applications enverront des
  séquences d'échappement qui seront ignorées par le terminal. Tous les
  paramètres de configuration ne sont pas verrouillés. Sauf si vous avez
  une bonne raison de le faire, vous ne devriez pas activer de tels
  verrous.

  Un blocage de touche de fonction empêchera l'ordinateur de redéfinir
  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.


  1133..1177..  ÉÉccoonnoommiisseeuurr dd''ééccrraann {{SSccrrnn SSaavveerr}}



  On l'appelle aussi "CRT Saver" (NdT : ce qui revient au même). Ceci
  éteint (ou diminue la luminosité) de l'écran quand le terminal n'est
  pas utilisé pendant un certain temps. La durée de vie de l'écran est
  prolongée et cela peut économiser de l'énergie. L'appui sur une touche
  permettra en général de retrouver l'écran et peut "exécuter" cette
  touche donc il est préférable d'appuyer sur la touche Shift etc.


  1133..1188..  IImmpprriimmaannttee


  Pour les Wyse, s'il n'y a pas d'imprimante reliée, désactivez {Printer
  Attached}. Ce n'est pas essentiel de faire ceci, mais si vous le
  faites toute séquence d'échappement envoyant du texte à l'imprimante
  (au lieu du terminal) sera ignorée.

  Paramétrer le port de l'imprimante est à peu près la même chose (en
  général plus simple) que de paramétrer les communications sur le port
  principal. Il y a quelques options spécifiques à l'imprimante. Est-ce
  une imprimante série ou parallèle ? Si c'est parallèle, on doit la
  désigner comme telle dans la configuration et la connecter sur le port
  parallèle 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.


  1144..  DDééttaaiillss ddee llaa ccoonnffiigguurraattiioonn ddee ll''oorrddiinnaatteeuurr


  Il faut éditer plusieurs fichiers pour configurer l'ordinateur pour
  gérer 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).


  1144..11..  GGeettttyy ((ddaannss //eettcc//iinniittttaabb))


  Afin de lancer un processus de login sur un port série quand
  l'ordinateur démarre (ou change de niveau d'exécution) une commande
  getty doit être placée 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 début de la ligne) et de modifier
  quelques arguments.

  Les arguments autorisés dépendent du getty que vous utilisez :

  Les meilleurs getty pour les terminaux reliés de manière 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 appropriés pour les modems sont :



  ·  mgetty : pour les modems ; utilisation possible avec les terminaux
     mais ce n'est pas très 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 désirez, vous pouvez le
  télécharger dans les logiciels série
  <http://metalab.unc.edu/pub/Linux/system/serial/>.

  Si vous n'utilisez pas les lignes de contrôle du modem (par exemple si
  vous n'utilisez que les 3 conducteurs minimums : transmission,
  réception et masse commune) vous devriez le faire savoir à getty en
  utilisant un drapeau "local". Le format de celui-ci dépend du getty
  que vous utilisez.


  1144..11..11..  AAggeettttyy ((ppeeuutt ss''aappppeelleerr ggeettttyy))


  Un exemple de ligne dans /etc/inittab :
  19200 ttyS1 vt102
  lancé en entrant dans les niveaux d'exécution 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 contrôle 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 après avoir édité la ligne de getty et vous devriez
  apercevoir une invite de login.

  Le programme agetty détectera automatiquement la parité configurée
  dans le terminal. Si vous utilisez stty pour fixer la parité, agetty
  la désactivera automatiquement puisqu'il ne veut pas que le pilote
  série enlève le bit de parité étant donné qu'il a besoin de le voir
  dans un caractère 8 bits afin de détecter la parité.  Donc, si vous
  utilisez la parité, ne l'activez que du côté du terminal et laissez
  agetty la détecter automatiquement et la positionner sur l'ordinateur.
  L'invite de login sera brouillée jusqu'à ce que vous tapiez quelque
  chose et que getty positionne la parité. Faites-moi savoir si vous
  trouvez une manière d'obtenir une invite de login qui ait l'air
  correcte avec la parité en utilisant agetty. L'invite brouillée
  repoussera les visiteurs etc. qui essaient de se logger (si c'est ce
  que vous voulez).


  1144..11..22..  ggeettttyy ((ffaaiitt ppaarrttiiee ddee ggeettttyy__ppss))


  (Ceci est tiré du vieux Serial-HOWTO de Greg Hankins).
  entrées pour getty pour utiliser votre terminal dans le fichier de
  configuration /etc/gettydefs si elles ne sont pas déjà présentes :







  # 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 intéressantes dans la bannière de login. Dans mes exemples, je
  fais afficher le nom du système et la ligne série. Vous pouvez ajouter
  d'autres choses :



       @B    la vitesse courante (évaluée au moment où @B est rencontré).
       @D    la date courante, au format MM/JJ/AA.
       @L    la ligne série à laquelle est attaché getty.
       @S    le nom du système.
       @T    l'heure courante, au format HH:MM:SS (24 heures).
       @U    le nombre d'utilisateurs actuellement loggés. C'est le compte
             du nombre d'entrées dans le fichier /etc/utmp qui possèdent
             un champ ut_name non nul.
       @V    la valeur de VERSION, donnée dans les fichiers de valeurs par
             défaut.
       Pour afficher un caractère '@', utilisez soit '\@', soit '@@'.




  Quand vous avez fini d'éditer /etc/gettydefs, vous pouvez vérifier 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 série auquel est attaché votre terminal
  (/etc/default/{uu}getty.ttyS_N ou /etc/conf.{uu}getty.ttyS_N), car cela
  entrera sûrement 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 série (en
  mettant les informations correctes pour votre environnement -- port,
  vitesse et type de terminal par défaut) :



       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.


  1144..11..33..  MMggeettttyy


  Le m veut dire modem. Ce programme est d'abord destiné aux modems mais
  il fonctionnera pour les terminaux texte. C'est très mal documenté (en
  mi-1998) pour les terminaux et vous devrez parcourir beaucoup de
  documentation sur les modems pour déterminer 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).]


  1144..22..  SSttttyy eett SSeettsseerriiaall


  Il y a à la fois une commande "stty" et une commande "setserial" pour
  configurer les ports série. Certains (ou tous les) paramètres stty
  nécessaires peuvent être positionnés grâce à getty et il peut ne pas
  être nécessaire d'utiliser setserial ; l'utilisation de ces deux
  commandes peut donc ne pas être nécessaire. Celles-ci (stty et
  setserial) paramètrent différents aspects du port série. Stty en fait
  la plupart tandis que setserial configure la partie bas niveau comme
  les interruptions et les adresses de ports. Pour "sauvegarder" les
  paramètres, ces commandes doivent être écrites dans certains fichiers
  (scripts shell) qui sont lancés à chaque démarrage de l'ordinateur.
  Vous pouvez aussi utiliser les commandes stty et setserial sur la
  ligne de commande mais de tels paramètres seront perdus dès que vous
  éteindrez l'ordinateur.


  1144..22..11..  SSeettsseerriiaall


  Setserial indique au pilote de port série à la fois le numéro
  d'interruption (IRQ) et l'adresse du port. Il peut vous dire quel type
  de puce UART vous avez si vous utilisez le paramètre autoconfig. Il
  peut paramétrer le temps de fonctionnement du port après sa fermeture
  (afin de laisser sortir les caractères qui seraient encore dans son
  tampon en mémoire principale). Cela est nécessaire à des vitesses
  basses de 1200 et moins. Pour que le port série fonctionne, le module
  série (dans le noyau Linux) doit être chargé. Si vous utilisez plus de
  deux ports série et voulez assigner des numéros d'IRQ uniques, vous
  devez alors utiliser setserial. Si votre port série est Plug-and-Play
  vous devriez regarder le Modem-HOWTO, ou éventuellement, le Serial-
  HOWTO.


  1144..22..22..  OOùù llaanncceerr sseettsseerriiaall ??


  Pour modifier (ou ajouter) une commande setserial, éditez le script
  shell qui lance setserial. Son emplacement dépend de votre
  distribution. Il peut être dans un répertoire /etc/rc.d ou dans un
  fichier "rc.serial". Vous devrez peut-être créer votre propre fichier
  à cette fin. Dans la distribution Debian c'était le fichier 0setserial
  dans /etc/rc.boot.


  1144..22..33..  SSttttyy


  Vous n'avez probablement pas besoin d'utiliser la commande "stty" pour
  configurer si vous utilisez l'un des deux getty suggérés pour faire
  l'équivalent de stty... Vous aurez encore besoin d'utiliser la
  commande stty pour voir comment le port série 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 série
  (mais les valeurs par défaut 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
  8ème bit ?, signaux de contrôle du modem, contrôle de flux, signal
  d'arrêt, délimiteurs de fin de ligne, changer la casse, remplissage,
  sonner si le tampon déborde ?, écho, permettre à des tâches de fond
  d'écrire sur le terminal ?, définir des caractères spéciaux (de
  contrôle, comme quelle touche presser pour faire une interruption).
  Voyez la page de manuel de stty ou la page info pour plus de détails.
  Voyez aussi la page de manuel : termios qui couvre les mêmes options
  que stty mais (en mi-1998) couvre des possibilités que les documents
  sur stty ne mentionnent pas. Pour l'utilisation de certains caractères
  spéciaux, voyez ``caractères spéciaux (de contrôle)''.

  Avec certaines implémentations de getty (paquet getty_ps), les
  commandes qu'on enverrait normalement à stty sont entrées dans un
  fichier de configuration getty : /etc/gettydefs. Même sans ce fichier
  de configuration, la ligne de commande de getty devrait suffire pour
  paramètrer 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 mémoire de l'ordinateur.  Bien des noms de drapeaux dans cette
  structure C sont quasiment les mêmes (et font la même chose) que les
  arguments de la commande stty.


  1144..22..44..  OOùù mmeettttrree llaa ccoommmmaannddee ssttttyy ??


  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 démarre, vous devez mettre la commande stty dans un
  fichier qui sera exécuté à chaque démarrage de l'ordinateur (de
  Linux). Ce fichier devrait être lancé avant le démarrage 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 sûrement 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 même fichier
  qui lance setserial quand le système démarre. Voyez ``où lancer
  setserial ?''. Il semblerait mieux de la placer après 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.


  1144..33..  TTeerrmmiinnffoo eett TTeerrmmccaapp ((bbrreeff))


  Voyez ``Terminfo et Termcap (en détails)'' pour une discussion plus
  détaillée sur terminfo. Beaucoup d'applications que vous lancez
  utilisent la base de données terminfo (anciennement termcap). Celle-ci
  possède une entrée pour chaque modèle 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 possèdent des "modes" d'opération variés, il peut y avoir
  plusieurs entrées terminfo parmi lesquelles choisir pour un terminal
  physique donné. Ils auront en général des noms similaires. Le dernier
  paramètre 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 spécifier de quoi le
  terminal est capable et de donner les codes à envoyer au terminal pour
  le faire faire certaines choses. Elle spécifie à quoi "gras"
  ressemblera (sera-ce en vidéo 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 "préférences".
  Elle spécifie les codes d'initialisation à envoyer au terminal
  (analogues aux chaînes d'initialisation qu'on envoie aux modems).
  Linux n'envoie pas automatiquement de telles chaînes au terminal.
  Voyez ``chaîne 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 manière de faire la mise à jour.


  1144..44..  PPoossiittiioonnnneerr TTEERRMM eett TTEERRMMIINNFFOO


  Ce sont deux variables d'environnement pour les terminaux, mais vous
  ne devriez rien avoir à faire avec elles. TERM doit toujours être
  positionnée au nom du terminal que vous utilisez. TERMINFO contient le
  chemin vers la base de données terminfo, mais peut ne pas être
  nécessaire si la base de données est dans un endroit prédéfini (ou
  TERMINFO peut être positionné automatiquement par un fichier qui est
  livré avec votre distribution de Linux).

  Heureusement, le programme getty positionne en général TERM pour vous
  juste avant le login. Cela permet aux applications de trouver le nom
  de votre terminal et ensuite de regarder les capacités du terminal
  dans la base de données terminfo. Voyez ``variable TERM'' pour plus de
  détails sur TERM.

  Si votre base de données terminfo ne peut pas être trouvée, vous
  verrez un message d'erreur à ce propos sur votre terminal. Si cela
  arrive il est temps de vérifier où réside terminfo et de positionner
  TERMINFO si nécessaire. Vous pouvez découvrir où se trouve la base de
  données terminfo en cherchant un fichier terminfo courant comme
  "vt100" avec la commande "locate".  Assurez-vous que votre terminal
  est dans cette base de données. Un exemple de positionnement de
  TERMINFO : export TERMINFO=/usr/share/terminfo (mettez ceci dans
  /etc/profile ou autre). Si les données concernant votre terminal dans
  cette base de données ne vous conviennent pas, vous devrez l'éditer.
  Voyez ``terminfo et termcap (bref)''.
  1144..55..  FFiicchhiieerr //eettcc//ttttyyttyyppee rraarreemmeenntt nnéécceessssaaiirree


  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 déjà positionnée correctement, alors ce fichier n'est pas
  nécessaire. Puisque le getty de Linux positionne TERM pour chaque tty,
  vous n'avez pas besoin de ce fichier.  Dans d'autres systèmes Unix
  comme FreeBSD, le fichier /etc/ttys fait la correspondance entre les
  ttys et bien plus de choses, comme la commande getty appropriée, et la
  catégorie de connexion (comme "dialup"). Un exemple de ligne pour le
  ttytype sous Linux : vt220 ttyS1


  1144..66..  RReessttrriiccttiioonnss ssuurr lleess llooggiinnss


  Par défaut, l'utilisateur root ne peut pas se logger à partir d'un
  terminal.  Pour permettre cela vous devez créer (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 détermine si /etc/securetty
  doit être utilisé et peut être édité afin que /etc/securetty ne soit
  pas nécessaire (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 ratées pour un
  utilisateur, cet utilisateur peut se voir interdire l'accès au
  système. Voyez la page de manuel "faillog" sur la manière de contrôler
  cela.


  1144..77..  LLaanncceerr ddeess ccoommmmaannddeess uunniiqquueemmeenntt ssii TTEERRMM==mmoonn__tteerrmmiinnaall


  Il y a parfois des commandes qu'on ne veut exécuter au démarrage que
  pour un certain type de terminal. Faire cela pour la commande stty ne
  pose pas de problèmes puisque l'on utilise l'opérateur de redirection
  < pour spécifier le terminal vers lequel la commande est destinée.
  Mais quid des alias de shell ou des fonctions ? Vous aurez envie de
  créer une fonction pour la commande ls qui mettra en couleur la liste
  des répertoires uniquement sur des terminaux couleur ou sur la
  console. Pour les terminaux monochromes vous voudrez le même nom de
  fonction (mais un corps de fonction différent) qui utilisera des
  symboles à la place du codage par couleurs. Où mettre de telles
  définitions de fonctions qui doivent être différentes pour des
  terminaux différents ?

  Vous pouvez les mettre à l'intérieur d'opérateurs "if" dans
  /etc/profile qui est lu au départ à chaque fois que quelqu'un se
  logge. L'opérateur confitionnel "if" définit certaines fonctions etc.,
  seulement si le terminal est d'un type spécifique.


  1144..77..11..  EExxeemmppllee ppoouurr llaa ffoonnccttiioonn llss


  Bien que la plupart de ce que fait cet opérateur 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
  ______________________________________________________________________




  1155..  TTeerrmmiinnffoo eett TTeerrmmccaapp ((eenn ddééttaaiillss))



  1155..11..  IInnttrroodduuccttiioonn àà TTeerrmmiinnffoo


  Terminfo (anciennement termcap) est une base de données des capacités
  des terminaux et plus. Pour chaque (enfin presque) modèle de terminal
  elle indique aux applications ce que le terminal est capable de faire.
  Elle indique quelles séquences d'échappement (ou caractère de
  contrôle) envoyer au terminal afin de faire des choses telles que
  déplacer le curseur vers un nouvel endroit, effacer une partie de
  l'écran, faire défiler l'écran, changer de mode, changer l'apparence
  (couleurs, luminosité, clignotement, soulignement, vidéo inverse,
  etc.). À partir de 1980 environ, beaucoup de terminaux supportaient
  plus d'une centaine de commandes (certaines d'entre elles prenant des
  paramètres numériques).

  Les abréviations terminfo sont en général 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 détaillées (et
  incluent les anciennes abréviations de termcap). Ainsi, sauf si vous
  êtes déjà lié à termcap, vous devriez utiliser les fichier terminfo.


  1155..22..  BBaassee ddee ddoonnnnééeess tteerrmmiinnffoo


  La base de données terminfo est compilée et possède ainsi une partie
  source et une partie compilée. La vieille base de données termcap ne
  possède qu'une partie source mais cette source peut, grâce à une seule
  commande, être à la fois convertie en source terminfo et ensuite
  compilée. Vous pouvez ainsi vous en tirer sans avoir le source
  terminfo puisque le source termcap peut créer la base terminfo
  compilée.

  Pour voir si votre terminal (disons vt100) est dans la base de données
  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 compilés. Certains
  programmes anciens peuvent s'attendre à ce qu'elle soit dans le
  répertoire /etc/terminfo. La variable d'environnement TERMINFO devrait
  être positionnée sur le chemin vers cette base de données.  Exemple :
  TERMINFO=/usr/share/terminfo.

  Le code source que vous utilisez peut résider 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 nécessaire pour créer
  (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 téléchargement (sous le nom
  termtypes.ti) à  <http://sagan.earthspace.net/terminfo>.


  1155..22..11..  CCoommppiillaatteeuurr tteerrmmiinnffoo ((ttiicc))


  Les données des fichiers sources sont compilées avec le programme
  "tic" qui est capable de faire les conversions entre les formats
  termcap et terminfo.  Vous pouvez ainsi créer une base de données
  terminfo compilée à partir d'un source termcap. Le programme
  d'installation utilisé pour installer Linux a probablement installé
  les fichiers compilés sur votre disque dur donc vous ne devez rien
  compiler sauf si vous modifiez /etc/termcap (ou terminfo.src).  "tic"
  installera automatiquement les fichiers compilés résultant dans un
  répertoire terminfo prêt à être utilisé par les applications.


  1155..22..22..  RReeggaarrddeezz vvoottrree tteerrmmiinnffoo


  C'est une bonne idée de jeter un coup d'oeil à votre entrée terminfo
  pour le terminal que vous utilisez (le code source, bien sûr) et de
  lire les commentaires. Une manière rapide de l'inspecter sans les
  commentaires est de taper simplement "infocmp". Mais les commentaires
  pourront vous dire des choses spéciales sur le terminal comme la
  manière dont vous devez le configurer pour qu'il fonctionne
  correctement avec la base de données terminfo.


  1155..22..33..  EEffffaacceerr ddeess ddoonnnnééeess nnoonn nnéécceessssaaiirreess


  Afin d'économiser de l'espace disque, on peut effacer toute la base de
  données à part les types de terminaux que l'on possède (ou dont on
  pourrait avoir besoin dans le futur). N'effacez aucun termcap pour un
  "terminal Linux" (la console) ou les entrées xterm si vous utilisez X
  Window. Le type de terminal "dumb" peut être nécessaire quand une
  application ne peut pas déterminer 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 possédez et que vous puissiez obtenir un termcap pour un nouveau
  terminal sur Internet en quelques secondes.


  1155..33..  MMooddiiffiiccaattiioonn ddeess ffiicchhiieerrss tteerrmmiinnffoo


  Certaines entrées terminfo fournies peuvent être améliorées. Par
  exemple, la plupart des terminaux ont un jeu de caractères 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é intégrée dans le
  fichier terminfo. Vous pouvez l'ajouter en découvrant 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 répertoire correct
  réservé à 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 entrée terminfo est
  meilleure que l'ancienne et semble stable (vous l'avez utilisée
  pendant un moment sans problèmes) vous devriez en envoyer une copie au
  mainteneur de terminfo comme indiqué au début du fichier source de
  terminfo (ou termcap).


  1155..44..  CChhaaîînnee dd''iinniittiiaalliissaattiioonn


  Dans le terminfo sont souvent incluses des chaînes 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
  chaîne d'initialisation n'est pas envoyée automatiquement au terminal
  pour l'initialiser. On pourrait espérer 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 chaîne d'initialisation l'annulerait
  automatiquement. Vous devez utiliser une commande sur la ligne de
  commande (ou dans un script shell) pour envoyer la chaîne
  d'initialisation telle quelle. De telles commandes sont : "tset",
  "tput init" ou "setterm -initialize". Parfois il n'y a pas besoin
  d'envoyer la chaîne d'initialisation puisque le terminal peut se
  configurer correctement quand il est allumé (en utilisant les options
  et préférences qu'on a sauvées dans la mémoire permanente du
  terminal).


  1155..55..  VVaarriiaabbllee TTEERRMM


  La variable d'environnement TERM devrait être initialisée au type de
  terminal que vous utilisez. Elle est normalement positionnée par le
  paramètre terminal_type passé au programme getty (regardez-le dans le
  fichier /etc/inittab). Ce nom doit se trouver dans la base de données
  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 représente le moniteur du PC émulant
  un modèle 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 même port
  (/dev/tty...) (par exemple, si un commutateur permet à différents
  types de terminaux d'utiliser le même port série, ou si le port est
  relié à un modem que des personnes appellent depuis différents types
  de terminaux) alors TERM doit être positionné à chaque fois que
  quelqu'un se connecte sur le port série. Il y a souvent une séquence
  d'échappement de requête pour que l'ordinateur puisse demander au
  terminal de quel type il est. Une autre façon est de demander à
  l'utilisateur de taper (sélectionner) 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 gérer cela.

  Une manière est d'utiliser "tset" (voir la page de manuel).  tset
  essaie de déterminer le nom du terminal à partir du terminal que vous
  utilisez. Il regarde ensuite les données dans terminfo et envoie une
  chaîne 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 exécuté 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 répond oui
  ou bien tape le type de terminal réel qu'il ou elle utilise. tset
  envoie ensuite la chaîne d'initialisation et positionne TERM à ce nom
  (type) de terminal.


  1155..66..  DDooccuummeennttss ssuurr tteerrmmiinnffoo//tteerrmmccaapp



  ·  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> (2ème
     éd.) par Richard M. Stallman est un manuel GNU qui est quelque peu
     obsolète. Bien qu'il date de 1992, il ne mentionne même pas
     terminfo.

  ·  les fichiers : terminfo.src et /etc/termcap possèdent des
     informations sur les diverses versions des fichiers termcap, les
     conventions de nommage pour les terminaux et des codes de capacités
     spéciales nommées 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.


  1166..  UUttiilliissaattiioonn dduu tteerrmmiinnaall



  1166..11..  IInnttrroodduuccttiioonn àà ll''uuttiilliissaattiioonn dduu tteerrmmiinnaall


  Cette section parle du contrôle 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
  manière dont l'utilisateur d'un terminal peut contrôler et inspecter
  l'interface, et comment utiliser diverses commandes fournies par le
  pilote de périphérique. Elle n'explique pas comment utiliser les
  nombreuses applications, shells ou la plupart des utilitaires Linux.
  Deux commandes utilisées couramment sur un terminal sont :


  ·  clear (pour effacer l'écran)

  ·  reset (pour réinitialiser le terminal)


  1166..22..  DDéémmaarrrreerr llee tteerrmmiinnaall


  É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
  "Entrée") plusieurs fois. Saisissez ensuite le nom de votre compte
  (suivi d'un retour/entrée) et votre mot de passe quand on vous le
  demande (suivi aussi d'un retour/entrée). 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 série peut se configurer pour
  n'envoyer que des lettres majuscules au terminal.

  Si rien ne se passe, assurez-vous que l'ordinateur hôte va bien. Si
  l'ordinateur hôte est éteint (pas de courant), ce que vous tapez sur
  le clavier du terminal peut apparaître à l'écran puisque les broches
  de transmission et de réception sur l'ordinateur peuvent être reliées
  ensemble, ce qui fait que les caractères sont retournés par un
  ordinateur "éteint". Si vous ne pouvez pas vous logger quand
  l'ordinateur fonctionne, voyez ``résolution des problèmes''.




  1166..33..  PPiilloottee ddee ppéérriipphhéérriiqquuee ((sséérriiee)) dduu tteerrmmiinnaall


  En tapant sur la ligne de commande, le shell (tel que le shell Bash)
  lit ce que vous tapez et y réagit. Ce que vous tapez passe d'abord par
  la partie pilote de terminal de votre système d'exploitation. Ce
  pilote peut traduire certains caractères (comme changer le caractère
  "retour" généré par la touche "retour" en un caractère "nouvelle
  ligne" pour les fichiers Linux). Il reconnaît aussi certains codes de
  contrôle que vous pourriez taper au clavier comme ^C pour interrompre
  l'exécution 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'arrêt de tout ou partie de cette
  fonctionnalité.


  1166..44..  PPrroobbllèèmmeess aavveecc lleess ééddiitteeuurrss


  Il peut y avoir quelques problèmes pendant l'utilisation d'emacs et de
  vi sur certains terminaux.


  1166..44..11..  EEmmaaccss eett ^^QQ


  Si le contrôle de flux logiciel est présent, la commande ^Q dans Emacs
  bloquera l'affichage (NdT : n'est-ce pas plutôt la commande ^S ??). La
  solution est de relier cette commande à une autre touche dans le
  fichier de configuration de Emacs.


  1166..44..22..  VVii eett lleess ttoouucchheess ccuurrsseeuurr


  Vi utilise la touche ESC comme commande pour sortir du mode
  d'insertion. Si on appuie sur une touche fléchée (touche de curseur)
  une séquence d'échappement (démarrant par le caractère ESC) est
  envoyée à l'hôte. Vi doit faire la différence entre ces deux
  significations d'ESC. Un vi intelligent (comme vim) doit être capable
  de détecter la différence en regardant la touche qui suit la touche
  ESC.

  Sur les terminaux VT on peut faire en sorte que la touche flèche
  gauche envoie soit ESC [ D soit ESC O D. Les autres touches fléchées
  sont similaires mais utilisent A, B et C au lieu de D. Si vous avez
  des problèmes, choisissez ESC [ D puisque le "O" dans l'autre
  alternative peut être interprétée comme une commande d'"ouverture de
  ligne". Le "[" devrait être interprété par vi pour dire qu'une touche
  fléchée a été pressée. ESC [ D sera envoyé à condition que le "mode
  application touches fléchées" (Cursor Key Application Mode) n'ait pas
  été activé. ESC [ D est normalement la valeur par défaut donc tout
  devrait être correct. Sauf que de nombreux termcaps contiennent une
  chaîne (pas la chaîne d'initialisation) qui positionne ce que vous
  voulez éviter : "Mode Application". Les éditeurs peuvent envoyer cette
  chaîne au terminal quand ils démarrent. Là, vous avez des problèmes.

  Cette chaîne possède le code termcap "ks" (smkx dans terminfo) qui
  veut dire activer les touches de fonctions (et similaires, incluant
  les touches fléchées). Une application active ces touches en envoyant
  la chaîne "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 chaîne "ks" pour que vous ne tombiez pas
  dans ce piège sur la console. Pour d'autres terminaux vous aurez
  besoin d'éditer termcap (ou terminfo) ou d'utiliser une autre entrée
  termcap. Vous devez modifier non seulement la chaîne "ks" mais aussi
  les définitions termcap de ce qu'elle envoie : kd, kl, kr, ku. Lancez
  ensuite tic pour l'installer.

  Pour vim (VI aMélioré) il y a une manière 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
  fléchées pour voir ce qu'elles envoient mais on peut les configurer
  pour qu'elles envoient autre chose quand vous êtes dans un éditeur.


  1166..55..  CCoorrrruuppttiioonn dduu llss eenn ccoouulleeuurr


  Si ls met en l'air l'émulation de votre terminal avec la possibilité
  de couleur, arrêtez-la. ls --color et ls --colour utilisent la
  possibilité de couleur. Certaines installations font que ls utilise la
  couleur par défaut. Vérifiez 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.


  1166..66..  LL''aaffffiicchhaaggee ssee bbllooqquuee ((tteerrmmiinnaall bbllooqquuéé))


  Les symptômes 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 contrôle de flux l'a stoppé). Le
  blocage peut aussi venir de :
  peut alors être boggé ou vous avez intéragi de manière fatale avec
  lui.

  Si vous voulez quitter le programme que vous avez lancé et que vous ne
  pouvez pas le faire par les méthodes normales (certains programmes ont
  des touches spéciales 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'arrêter, vous pouvez essayer de lui envoyer un
  signal 9 à partir de top qui devrait le forcer à s'arrêter. Le type de
  sortie forcée "9" peut laisser certains fichiers temporaires qui
  traînent ainsi qu'une interface corrompue.  Tuer le shell de login
  devrait relancer getty avec une nouvelle invite de login.

  Les personnes débutantes sous Linux peuvent sans le faire exprès
  appuyer sur Ctrl-S (^S) (ou la touche "Arrêt Défil") qui bloque
  l'écran de manière mystérieuse (bien que ce soit ce que cette touche
  est supposée faire si vous utilisez le contrôle 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 exécuté
  mais vous n'en verrez rien avant d'appuyer sur ^Q. Ainsi quand il est
  bloqué, ne tapez rien de spécial qui pourrait effacer des fichiers
  etc. L'un des arguments en faveur du contrôle de flux matériel est
  qu'il empêche de tels blocages.


  1166..77..  IInntteerrffaaccee dduu tteerrmmiinnaall ccoorrrroommppuuee


  Cela inclut le cas de l'"affichage bloqué" = "terminal stoppé net" de
  la section précédente.

  1166..77..11..  SSyymmppttôômmeess


  Quand l'affichage ne semble pas correct, ou quand ce que vous tapez ne
  s'affiche pas correctement (si même 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 matérielle du port série elle-même serait
  corrompue, le seul remède peut être de basculer l'interrupteur
  (éteindre le PC et redémarrer). Le problème peut provenir de choses
  telles qu'un bogue dans le programme que vous utilisez, une panne
  matérielle (ce qui inclut un défaut matériel 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 données binaires au terminal''

  ·  ``Stopper un programme de manière anormale''

  ·  ``Taper Ctrl-S par erreur''


  1166..77..22..  EEnnvvooyyeerr ddeess ddoonnnnééeess bbiinnaaiirreess aauu tteerrmmiinnaall


  Votre terminal modifiera ses caractéristiques si on lui envoie
  certaines séquences d'échappement ou des caractères de contrôle. Si
  vous essayez par inadvertance d'afficher un fichier binaire, il peut
  contenir par hasard de telles séquences 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 manière 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 générer des problèmes.

  La corruption peut aussi arriver en utilisant un programme de
  communication où un ordinateur distant peut envoyer des données
  binaires à l'écran. Il y a de nombreuses autres façons pour lesquelles
  ces problèmes peuvent arriver, alors soyez-y préparé. Même un fichier
  qu'on prend pour un fichier ASCII peut contenir des codes de contrôle
  indésirables.

  Pour résoudre ce problème, 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 chaîne de
  ré-initialisation à partir de l'entrée du terminal dans la base
  terminfo. Si la configuration correcte a été sauvée à l'intérieur du
  terminal, alors l'appui sur certaine(s) touche(s) (peut-être en mode
  de configuration) peut retrouver ce paramétrage. Vous voudrez alors
  ensuite encore utiliser "reset" pour envoyer la chaîne
  d'initialisation si vous l'utilisez pour configurer votre terminal.


  1166..77..33..  TTeerrmmiinneerr uunn pprrooggrraammmmee ddee ffaaççoonn aannoorrmmaallee


  De grandes applications (comme des éditeurs) utilisent souvent les
  commandes stty (ou autres) dans leur code pour modifier de manière
  temporaire la configuration stty pendant que vous utilisez ce
  programme. Cela peut mettre le pilote de périphérique en mode "brut"
  pour que chaque caractère que vous tapez aille directement à
  l'application. L'écho de retour que fait le pilote est désactivé pour
  que tout ce que vous voyez à l'écran vienne directement de
  l'application. Ainsi de nombreuses commandes de contrôle (comme ^C)
  peuvent ne pas fonctionner dans certaines applications.

  Quand vous quittez de telles applications, celle-ci remet d'abord en
  place les paramètres stty aux valeurs qu'ils avaient avant le
  démarrage de l'application. Si vous quittez le programme de manière
  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 paramètres stty normaux, tapez
  "stty sane". Cependant, vous devez taper ceci juste après un "retour"
  et le terminer par un "retour". Mais l'appui sur la touche "retour" ne
  donne pas le résultat escompté puisque le code "retour" n'est plus
  traduit en caractères 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 même que d'habitude
  mais elle fonctionne en général. "stty sane" peut aussi être utile
  pour sortir d'une interface corrompue par d'autres causes.


  1166..88..  CCaarraaccttèèrreess ((ddee ccoonnttrrôôllee)) ssppéécciiaauuxx


  Un certain nombre de caractères de contrôle que vous pouvez taper au
  clavier sont "attrapés" par le pilote de terminal et effectuent
  diverses tâches. Pour voir ces commandes de contrôle tapez : stty -a
  et regardez les lignes 2 à 4.  Elles sont expliquées de manière vague
  dans les pages de manuel de stty. On peut modifier les caractères ou
  les désactiver en utilisant la commande stty.  Ainsi vos caractères de
  contrôle peuvent différer de ceux décrits ci-dessous.  On les utilise
  pour l'édition de la ligne de commande, l'interruption, le défilement
  et pour se déplacer sur le caractère suivant de manière transparente.


  1166..88..11..  ÉÉddiittiioonn ddee llaa lliiggnnee ddee ccoommmmaannddee


  Alors que le pilote de terminal possède quelques commandes pour
  l'édition de la ligne de commande, certains shells possèdent un vrai
  éditeur intégré (comme "readline" dans le shell Bash). Un tel éditeur
  est normalement activé par défaut 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 arrêter le défilement.


  ·  Delete-key (touche d'effacement, que stty montre comme ^?) efface
     le dernier caractère

  ·  ^U détruit (efface) la ligne

  ·  ^W efface un mot en arrière

  ·  ^R réaffiche la ligne. Utile principalement sur les terminaux à
     sortie papier ??





  1166..88..22..  IInntteerrrruuppttiioonn ((eett QQuuiitt,, SSuussppeenndd,, EEOOFF,, FFlluusshh))



  ·  ^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
     générer un fichier "core" (dont vous n'avez probablement pas
     l'utilité) dans votre répertoire de travail).

  ·  ^Z suspend. Stoppe le programme et le met en tâche 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
     démarre.

  ·  ^O chasser. Pas implémenté sur Linux. Envoie la sortie vers
     /dev/null.


  1166..88..33..  AArrrrêêtt eett rreepprriissee dduu ddééffiilleemmeenntt


  Si ce que vous désirez voir défile hors du bas de l'écran, vous pouvez
  empêcher cela en envoyant un signal d'arrêt "stop" (^S ou Xoff) à
  l'hôte (à condition que le ``contrôle de flux'' Xon-Xoff soit activé).
  Envoyez un signal de départ "start" (^Q ou Xon) pour reprendre.
  Certains terminaux possèdent une touche "Pas de défilement" qui
  enverra de manière alternée Xoff et Xon ou peut-être enverra des
  signaux de contrôle de flux matériel ?? Voici ce que font ctrl-S (^S)
  et ctrl-Q (^Q) :


  ·  ^S arrête le défilement (Xoff)

  ·  ^Q reprend le défilement (Xon)

  Si vous voulez à la fois arrêter le défilement et quitter, utilisez
  ^C. Si vous voulez arrêter le défilement pour faire autre chose mais
  voulez garder le programme qui générait la sortie en mémoire pour que
  vous puissiez reprendre le défilement plus tard, utilisez ^Z pour
  suspendre.

  Une méthode de défilement différente 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 reconnaît pas. Pour résoudre 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 défiler en arrière.

  Sur une console PC (qui émule un terminal), vous pouvez défiler en
  arrière en utilisant Shift-PageHaut. Cela est fréquemment nécessaire
  puisque le défilement est souvent trop rapide à arrêter en utilisant
  ^S. Une fois que vous avez défilé en arrière Shift-PageBas défilera en
  avant à nouveau.


  1166..88..44..  PPrreennddrree lliittttéérraalleemmeenntt eenn ccoommppttee llee ccaarraaccttèèrree ssuuiivvaanntt


  ^V envoie le caractère tapé suivant (en général un caractère de
  contrôle) directement au pilote de périphérique sans action ou
  interprétation. En retour deux caractères ASCII comme ^C sont
  affichés.


  1166..99..  VViissuuaalliisseerr ddeess ffiicchhiieerrss LLaattiinn--11 ssuurr uunn tteerrmmiinnaall 77 bbiittss


  Certains fichiers texte sont au format Latin1 sur 8 bits (voyez
  ``ensembles de caractères''). Si vous avez un terminal qui n'affiche
  pas les caractères Latin1 (ou sur lequel on n'a pas sélectionné
  l'ensemble de caractères 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 ??


  1166..1100..  IInnssppeeccttiioonn ddee ll''iinntteerrffaaccee


  Ces utilitaires vous fourniront des informations sur l'interface du
  terminal :


  ·  gitkeys : montre quel(s) octet(s) chaque touche envoie à l'hôte.

  ·  tty : montre à quel port tty vous êtes connecté.

  ·  set : montre la valeur de TERM (le nom de l'entrée terminfo)

  ·  stty -a : montre tous les paramètres stty.

  ·  setserial -g /dev/tty?? (remplissez les ??) montre le type d'UART,
     l'adresse du port et le numéro d'IRQ.

  ·  infocmp : montre l'entrée de terminfo en cours (moins de
     commentaires)


  1166..1111..  MMooddiiffiieerr lleess ppaarraammèèttrreess dduu tteerrmmiinnaall


  Les paramètres du terminal sont normalement positionnés une fois quand
  le terminal est installé en utilisant les procédures de configuration
  du manuel du terminal. Cependant, certains paramètres peuvent être
  modifiés 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 problèmes à l'interface du terminal.  Cependant, vous pouvez faire
  certaines modifications à l'apparence de l'écran du terminal ou à son
  comportement sans détruire l'intégrité 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 méthode 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 connaître le terminal. Les trois autres
  méthodes envoient une séquence d'échappement de l'ordinateur vers le
  terminal pour faire les modifications.  Ces trois exemples montrent
  des méthodes différentes pour faire cela en positionnant la vidéo
  inverse :


  1. setterm -reverse


  2. tput -rev

  3. echo ^[[7m


  1166..1111..11..  sseetttteerrmm


  C'est la commande la plus facile à utiliser. Elle utilise des options
  longues (mais n'utilise pas les -- devant). Elle consulte la base de
  données terminfo pour déterminer le code à envoyer. Vous pouvez
  modifier la couleur, la luminosité, la coupure de ligne, la vitesse de
  répétition du clavier, l'apparence du curseur etc.


  1166..1111..22..  ttppuutt


  La commande "tput" est similaire à "setterm" mais au lieu d'utiliser
  des mots ordinaires comme arguments, vous devez utiliser les
  abréviations utilisées par terminfo. Beaucoup d'abréviations sont
  relativement laconiques et difficiles à retenir.


  1166..1111..33..  eecchhoo


  Dans l'exemple "echo ^[[7m" pour positionner la vidéo inverse, ^[ est
  le caractère d'échappement. Pour le taper, tapez ^V^[ (ou ^V suivi de
  la touche ESC). Pour utiliser cette méthode "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'exécutera un peu plus vite. Vous pouvez donc utiliser
  echo ... dans les scripts shell qui ne s'occupent que d'un type de
  terminal.


  1166..1111..44..  SSaauuvveerr lleess mmooddiiffiiccaattiioonnss


  Quand vous éteignez le terminal les modifications que vous avez faites
  seront perdues (sauf si vous les avez sauvées dans la mémoire
  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 créez une
  fonction shell. Lancez-la ensuite quand vous voulez faire les
  modifications. Une manière de rendre les modifications semi-
  permanentes est de mettre ces commandes dans un fichier lancé à chaque
  fois que vous vous loggez ou que vous démarrez l'ordinateur.


  1166..1122..  FFaaiirree dd''uunn tteerrmmiinnaall uunnee ccoonnssoollee


  C'est aussi ce que l'on appelle une "console série". Beaucoup de
  messages en provenance du système ne sont normalement envoyés que sur
  la console. On peut aussi voir sur un terminal certains messages
  envoyés sur la console durant le démarrage après un démarrage réussi
  en tapant la commande : dmesg. Si le démarrage ne réussit pas, ceci ne
  sera d'aucun utilité. Il est possible de modifier le noyau Linux pour
  qu'un terminal serve de console et reçoive tous les messages de Linux
  destinés à la console. Malheureusement, les messages du BIOS seront
  perdus puisqu'ils ne seront pas affichés sur le terminal. La "console"
  se trouve maintenant sur un port série et on l'appelle donc une
  "console série". Bien sûr, elle n'aura pas les couleurs, les fontes,
  les capacités graphiques, ni les possibilités de redéfinition 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 traités dans
  les deux sous-sections suivantes :


  1166..1122..11..  PPoouurr lleess nnooyyaauuxx 22..22 eett ssuuppéérriieeuurrss


  Les instructions pour faire une console série sont incluses dans la
  documentation livrée avec le code source dans le fichier : serial-
  console.txt. Normalement, le périphérique /dev/console est un lien
  vers tty0 (la console PC). Pour une console série vous créez un
  nouveau /dev/console qui est un vrai périphérique (et non pas un lien
  vers autre chose).  Vous devez aussi inclure une déclaration à propos
  de la console série dans /etc/lilo.conf et ensuite lancer lilo. Voyez
  la documentation ci-mentionnée pour plus de détails.


  1166..1122..22..  PPoouurr lleess nnooyyaauuxx aannttéérriieeuurrss àà 22..22


  Le Linux Journal d'avril 1997 avait un article sur la façon
  d'appliquer une rustine au noyau. Vous ajoutez quelques #define au
  début 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 précédents ??) 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
  désirez) :

  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 sélectionner quel système
  d'exploitation démarrer (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
  chaîne "serial=".


  1166..1122..33..  PPuuiiss--jjee llaanncceerr LLiinnuuxx ssaannss mmoonniitteeuurr ((ccoonnssoollee PPCC)) ??


  Oui, en utilisant un terminal et en le faisant passer pour une console
  comme indiqué ci-dessus. Vous aurez sans doute quand même besoin d'une
  carte graphique puisque la plupart des BIOS en ont besoin pour
  démarrer le PC.  Votre BIOS peut aussi avoir besoin d'un clavier pour
  démarrer, ou bien il peut avoir une option grâce à laquelle vous
  pouvez indiquer au BIOS qu'il n'a pas besoin de clavier.


  1166..1133..  SSeessssiioonnss mmuullttiipplleess


  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 stockée sur l'ordinateur hôte et non à
  l'intérieur du terminal comme elles le sont avec les "pages".


  1166..1144..  SSee ddééllooggggeerr


  Pour vous délogger, tapez soit "logout", soit "exit". Dans certains
  cas votre demande sera refusée, mais on devrait vous dire pourquoi.
  L'une des raisons du refus est que vous n'êtes pas sur le même shell
  que celui avec lequel vous vous êtes loggé. Une autre manière de vous
  délogger est d'appuyer sur ^D.  Puisqu'on utilise aussi ^D à d'autres
  fins, vous ne voudrez pas forcément que cette touche vous délogge. Si
  vous positionnez la variable IGNOREEOF dans le shell Bash, alors ^D ne
  vous déloggera plus.


  1166..1155..  DDiissccuutteerr eennttrree tteerrmmiinnaauuxx,, eessppiioonnnneerr


  Si deux personnes loggées par l'intermédiaire de terminaux sur le même
  ordinateur hôte désirent 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".


  1177..  RRééssoouuddrree lleess pprroobbllèèmmeess ((llooggiicciieellss))


  Si vous suspectez que le problème soit matériel, voyez la section
  ``réparation et diagnostic''. Si le problème concerne le port série
  lui-même, voyez le Serial-HOWTO.

  Voici une liste des problèmes possibles :


  ·  ``Le terminal fonctionne-t-il ?'' Soupçonnez 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 après le login''

  ·  ``Ne peut pas se logger'' mais l'invite de login est OK.

  ·  ``Invite de login embrouillée''

  ·  ``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 après l'installation du
  terminal. Dans ce cas, vous pouvez passer à la section suivante.

  1177..11..  LLee tteerrmmiinnaall ffoonnccttiioonnnnaaiitt ccoorrrreecctteemmeenntt


  Quand un terminal qui fonctionnait correctement ne tourne tout d'un
  coup pas bien, il est souvent facile de déceler le problème. Si vous
  réfléchissez à ce qui s'est passé récemment cela vous donnera
  certainement un indice quant à la cause du problème.

  Le problème peut être évident comme un message d'erreur au démarrage
  du terminal. S'il émet un bruit, il a sûrement besoin d'une
  réparation. Voyez ``réparation et diagnostics''. D'abord, réflechissez
  à ce que vous avez fait ou modifié récemment car c'est sûrement la
  cause du problème. Est-ce que le problème est apparu juste après
  l'installation d'un nouveau logiciel ou après une modification de
  configuration ?

  Si le terminal ne répond pas correctement (s'il répond tout court) à
  ce que vous tapez, vous avez peut-être une ``interface de terminal
  corrompue''.


  1177..22..  TTeerrmmiinnaall nnoouuvveelllleemmeenntt iinnssttaalllléé


  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 présumez que le port
  série de votre ordinateur est défectueux, vous pouvez essayer de
  lancer un programme de test et de diagnostics sur ce port. À présent
  (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 série comme DTR, CTS, etc. et qui peuvent vous aider.
  Voyez ``surveillance/diagnostic série''.

  Une manière 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 désactivation des lignes
  de contrôle du modem et à une vitesse qui ne nécessite pas de contrôle
  de flux (assurez-vous que le contrôle de flux matériel est désactivé).
  Si cette copie fonctionne, compliquez alors un petit peu la situation
  et voyez si ça fonctionne encore, etc., etc. Quand le problème
  apparaît juste après avoir fait une modification, alors ce changement
  est sûrement la cause du problème.  En fait, il est plus efficace
  (mais plus compliqué) de sauter de la situation simple à à peu près la
  moitié de la configuration finale pour que le test élimine à peu près
  la moitié des causes possibles restantes pour le problème.  Répétez
  alors cette méthode pour le test suivant. De cette manière 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 méthode en
  vous basant sur des intuitions et des indices.


  1177..33..  EEsstt--ccee qquuee llee tteerrmmiinnaall vvaa bbiieenn ??


  Un bon terminal démarre en général 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 lumière
  n'est allumée, etc.), réenfoncez le câble d'alimentation des deux
  côtés. 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 réparé
  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 ``réparations et diagnostics'' pour
  avoir des astuces sur la réparation du terminal.

  Si le terminal démarre correctement, mais que vous soupçonnez qu'il y
  ait un problème, mettez-vous en "mode local" où il fonctionnera comme
  une machine à écrire et essayez de taper. Voyez ``mode local''.


  1177..44..  TTeexxttee mmaannqquuaanntt


  Si le texte s'affiche normalement sur le terminal puis s'arrête sans
  avoir terminé (au milieu d'un mot, etc.) ou si des morceaux de texte
  manquent, vous avez sûrement un problème avec le contrôle de flux. Si
  vous ne pouvez pas trouver tout de suite ce qui le cause, baissez la
  vitesse. Si cela l'arrange, c'est sûrement un problème de contrôle de
  flux. Il se peut que le contrôle de flux ne fonctionne pas du tout à
  cause d'un manque de configuration correcte ou à cause d'un câblage
  incorrect (pour le contrôle de flux matériel). Voyez ``contrôle de
  flux''.

  Si des caractèrs isolés manquent, le port série est peut-être dépassé
  par une vitesse trop élevée. Essayez une vitesse plus petite.

  Si vous utilisez une vitesse de transmission en dessous de 1200 (très
  lente, principalement utilisée par les anciens terminaux à copie
  papier et les imprimantes) et que le texte est tronqué, alors le
  problème peut provenir du pilote de périphériques série. Voyez le
  Printing-HOWTO à la section "périphériques série" sur la manière de
  régler ceci.


  1177..55..  GGeettttyy ssee rreellaannccee ttrroopp rraappiiddeemmeenntt



  1177..55..11..  PPaass ddee tteennssiioonn ddee ccoonnttrrôôllee dduu mmooddeemm


  Si getty ne peut pas ouvrir et/ou utiliser un port à cause du manque
  de tension de contrôle de modem positive sur l'une des broches, alors
  getty peut se terminer. Alors, grâce 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 désactivé. Essayez d'utiliser l'option "local" dans
  getty et/ou de vérifier les paramètres et les tensions de contrôle du
  modem.


  1177..55..22..  TToouucchhee eennffoonnccééee


  Une autre cause possible du relancement de getty est qu'une touche du
  clavier soit enfoncée, ce qui donne le même résultat que si la touche
  était maintenue appuyée en continu. Avec la répétition automatique
  activée, ceci "tape" des milliers de caractères à l'invite de login.
  Cherchez un écran rempli de caractères identiques (dans certains cas
  avec deux caractères différents ou plus).


  1177..66..  ÉÉcchheecc aapprrèèss llee llooggiinn



  Si vous pouvez vous logger correctement mais ne pouvez utiliser le
  terminal il se peut que le démarrage du shell de login ait reconfiguré
  le terminal (avec des paramètres incorrects) à cause d'une commande
  que quelqu'un a mise dans l'un des fichiers qui sont lancés quand vous
  vous loggez, et qu'un shell soit lancé. Ces fichiers comprennent
  /etc/profile et  /.bashrc. Cherchez une commande commençant par "stty"
  ou "setserial" et assurez-vous qu'elle est correcte. Même si elle est
  correcte dans un fichier d'initialisation, elle peut être
  repositionnée de manière incorrecte dans un autre fichier
  d'initialisation que vous ne soupçonnez pas. Des méthodes pour revenir
  sur le système afin de le réparer 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 démarrage.


  1177..77..  IImmppoossssiibbllee ddee ssee llooggggeerr


  Si vous obtenez une invite de login mais pas de réponse (ou peut-être
  une réponse embrouillée) à 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 désactiver les lignes de contrôle du modem. Voyez
  ``getty (dans /etc/inittab)''. Vous pourriez aussi désactiver le
  contrôle de flux matériel (stty -crtscts) s'il était activé. Si cela
  fonctionne maintenant correctement, alors soit les lignes de contrôle
  de votre modem sont câblées de manière incorrecte, soit il y a une
  erreur dans votre configuration.  Certains terminaux permettent le
  positionnement de valeurs différentes (comme la vitesse de
  transmission) pour envoyer et recevoir, de sorte que la réception 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''.


  1177..88..  IInnvviittee ddee llooggiinn eemmbbrroouuiillllééee


  Ceci peut-être à cause de l'utilisation d'un jeu de caractères
  incorrect, des erreurs de transmission dues à des vitesses de
  connexion trop élevées, des vitesses de connexion incompatibles ou des
  parités incompatibles. Si c'est une variété de caractères étranges
  vous avez un jeu de caractères 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
  incompatibilités de vitesse de transmission ou de parité vous voyez
  beaucoup d'erreurs "character error" identiques (erreur de caractère)
  qui représentent le fait qu'un vrai caractère 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 détectera et positionnera la parité si vous tapez quelque
  chose. Essayez-le avec un retour chariot pour voir si cela répare des
  erreurs possibles de parité.





  1177..99..  AAuuccuunn ssiiggnnee dd''uunnee qquueellccoonnqquuee iinnvviittee ddee llooggiinn


  Cela arrive quand rien ne se passe du tout sur le terminal, mais que
  le terminal semble fonctionner correctement. L'une des premières
  choses à faire est de s'assurer que toutes les connexions câblées sont
  fermes et reliées correctement. D'autres problèmes peuvent être : une
  différence de vitesse de transmission, du matériel en panne ou getty
  ne tournant pas. À ce point, deux possibilités d'approche sont (vous
  pouvez en suivre plus d'une à la fois) :


  ·  ``diagnostiquer les problèmes à partir de la console''

  ·  ``mesurer les tensions''


  1177..99..11..  DDiiaaggnnoossttiiqquueerr lleess pprroobbllèèmmeess àà ppaarrttiirr ddee llaa ccoonnssoollee


  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
  désactiver afin d'essayer de copier un fichier vers le terminal à des
  fins de tests.

  Pour désactiver getty, éditez /etc/inittab et mettez en commentaire la
  commande getty avec un signe # au début pour qu'il ne se relance pas
  après 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 idée serait
  d'essayer cela au début 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 désactivant tout
  (comme le contrôle de flux matériel : -crtscts ; la parité, et les
  signaux de contrôle du modem : clocal). Assurez-vous que les vitesses
  de transmission et le nombre de bits par octet sont les mêmes. Si rien
  ne se passe, vérifiez que le port est vivant avec un voltmètre grâce à
  la section suivante.


  1177..99..22..  MMeessuurree ddeess tteennssiioonnss


  Si vous disposez d'un voltmètre à portée de main, vérifiez qu'il y a
  -12 V (-5 à -15) sur la broche 3 (réception de données) du côté du
  terminal sur le câble null modem. La borne positive du voltmètre
  devrait être reliée à une bonne terre (les connecteurs métalliques sur
  les extrémités des câbles ne sont souvent pas reliés à la terre). S'il
  n'y a pas de tension négative, vérifiez-la sur la broche de
  transmission (TxD) sur l'ordinateur (voyez ``DB9-DB25'' pour le
  brochage). Si elle est présente là mais pas sur la broche de réception
  (RxD) du terminal, alors le câble est mauvais (connexion flottante,
  câble cassé ou le câble n'est pas null modem).  S'il n'y a pas de
  tension du côté de l'ordinateur, le port série de l'ordinateur est
  mort. Testez-le avec un programme de diagnostics ou remplacez-le.

  Si le port série est vivant, vous pouvez lui envoyer un fichier (avec
  les contrôles de modem désactivés) et voyez si quelque chose y arrive.
  Pour vérifier qu'un signal est transmis avec un voltmètre 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 à zéro et bouger autour de 0 alors qu'elle mesure
  des moyennes de courte distance sur le flux de données. Vous pouvez
  aussi le voir sur l'échelle de courant alternatif à condition que
  votre voltmètre 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
  erronée. Sans voltmètre, vous pourriez relier un bon périphérique
  (comme un autre terminal ou un modem externe) au port série et voir
  s'il fonctionne correctement.


  1177..1100..  SSuurrvveeiillllaannccee eett ddiiaaggnnoossttiiccss dduu ppoorrtt sséérriiee


  Quelques programmes Linux surveilleront les lignes de contrôle du
  modem et indiqueront si elles sont positives (1) ou négatives (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 déjà. Sinon, allez à logiciels série
  <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 hôte. La situation sur le terminal sera différente
  puisque certains fils sont souvent manquants des câbles alors que
  d'autres fils se croisent. En juin 1998, je ne connais aucun programme
  de diagnostic sous Linux pour le port série.


  1177..1111..  MMooddee llooccaall


  En mode local, le terminal se déconnecte 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 activités
  au point où vous vous étiez arrêté 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 séquences
  d'échappement (en commençant 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 sûr de ce
  que fait une séquence 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 sélectionner "local" dans un menu (ou presser
  une certaine touche). Voyez ``aller dans le mode de configuration''.


  1177..1122..  ÉÉqquuiippeemmeenntt ddee tteesstt éélleeccttrriiqquuee ppoouurr llee ppoorrtt sséérriiee



  1177..1122..11..  GGaaddggeettss dd''éévvaassiioonn eettcc..


  Alors qu'un multimètre (utilisé comme voltmètre) peut être tout ce
  dont vous avez besoin pour quelques terminaux, un équipement de test
  spécial simple a été fait pour tester les lignes des ports série.
  Certains s'appellent "évasion ..." (breakout, NdT) où évasion veut
  dire sortir des conducteurs d'un câble. Ces gadgets possèdent quelques
  connecteurs et s'insèrent dans le câble série. Certains possèdent des
  points de tests pour y relier un voltmètre. Certains possèdent des
  LEDs qui s'allument quand certaines lignes de contrôle sont activées
  (allumées). D'autres encore possèdent des cavaliers pour que vous
  puissiez relier n'importe quel fil à n'importe quel fil.  Certains
  possèdent des interrupteurs.

  Radio Shack vend (en 1998), un "expert de RS-232" ou "testeur de ligne
  RS-232" qui vérifie TD, RD, CD, RTS, CTS, DTR, et DSR. Une lumière
  verte veut dire "allumé" (+12 V) alors que rouge veut dire "éteint"
  (-12 V). Ils vendent aussi une "boîte de cavaliers série RS-232" qui
  permet de relier les broches de la manière dont vous le souhaitez.


  1177..1122..22..  MMeessuurreerr ddeess tteennssiioonnss


  N'importe quel voltmètre ou multimètre, même les moins chers qu'on
  vend pour environ 60 F, devraient fonctionner correctement. Essayer
  d'utiliser d'autres méthodes pour tester la tension est compliqué.
  N'utilisez pas de diode électroluminescente (LED) sauf si on lui
  adjoint une résistance en série pour réduire la tension sur la diode.
  On utilise une résistance 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 négatives. Personne ne fait un tel gadget pour tester
  automatiquement les circuits ?? Les sondes logiques peuvent être
  endommagées 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 idée.
  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 déplié dans l'ouverture désirée. Le diamètre du
  trombone ne doit pas être plus grand que les broches afin de ne pas
  abîmer le contact. Mettez une pince croco (ou autre) sur le trombone
  pour vous connecter.


  1177..1122..33..  GGooûûtteerr llaa tteennssiioonn


  En dernier recours, si vous n'avez pas d'équipement de test et voulez
  risquer d'être choqué (ou même électrocuté) vous pouvez toujours
  goûter à 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 sûrement pas envie d'utiliser votre langue.

  Pour tester du 12 V, léchez 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 goût reconnaissable. Vous pouvez
  d'abord essayer ceci avec des piles 4,5 V pour savoir quel goût ça
  aura.


  1188..  RRééppaarraattiioonnss eett ddiiaaggnnoossttiiccss


  La réparation d'un terminal possède beaucoup en commun avec la
  réparation d'un moniteur et/ou d'un clavier. Parfois les diagnostics
  intégrés au terminal vous indiqueront à l'écran ce qui ne va pas.
  Sinon, par les symptômes, on peut souvent isoler le problème à l'une
  des choses suivantes : clavier défectueux, écran mort, panne de
  l'électronique numérique du terminal. Il est mieux d'avoir un manuel
  de service, mais même si vous n'en avez pas, beaucoup de terminaux
  peuvent encore être réparés.


  1188..11..  LLiivvrreess eett ssiitteess WWeebb ssuurr llaa rrééppaarraattiioonn



  1188..11..11..  LLiivvrreess


  Bigelow, Stephen J. : Troubleshooting & Repairing Computer Monitors,
  2ème édition, McGraw-Hill, 1997. Ne couvre pas l'électronique de
  génération des caractères ni le clavier.


  1188..11..22..  SSiitteess WWeebb


  La FAQ  <http://www.repairfaq.org> du groupe de nouvelles
  sci.electronics.repair est longue et complète, bien qu'elle ne couvre
  pas les terminaux en soi. Voyez la section "Moniteurs d'ordinateurs et
  vidéos" ("Computer and Video Monitors", NdT). La plupart de ces
  informations peuvent s'appliquer aux terminaux ainsi que dans les
  sections "tester les capacités", "tester les transformateurs", etc.
  Peut-être que dans le futur, les "informations" de réparation 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 réparations de Shuford
  <http://www.cs.utk.edu/~shuford/terminal/repair_hints_news.txt>,
  archive de posts dans des groupes de nouvelles sur la réparation des
  terminaux.


  1188..22..  SSééccuurriittéé


  Les écrans utilisent de très 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 même si vous le faites
  puisque la somme de courant qu'il peut fournir est limité. Mais il est
  possible que cela vous brûle 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 sûre. Vous
  devriez remarquer le câble à haute tension bien isolé connecté à un
  bout du tube d'images. Même quand l'écran est éteint, il reste
  suffisamment de tension résiduelle sur la connexion du câble au tube
  d'images pour vous donner un certain choc. Pour décharger cette
  tension quand l'écran est débranché, utiliser un tournevis (poignée
  isolée) avec la lame en métal relié au câble 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 limitées en
  courant. Elles sont même encore plus dangereuses si vos mains sont
  mouillées ou si vous portez un bracelet de montre en métal, 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 numériques sont relativement sûrs mais ne touchez à rien
  (sauf avec un outil bien isolé) sauf si vous savez ce que vous faites.


  1188..33..  AAppppaarreennccee ddee ll''aaffffiicchhaaggee


  Si l'affichage est trop faible, augmentez la luminosité et/ou le
  contraste en utilisant les molettes à l'extérieur de l'unité (si elles
  existent). Si la largeur, la hauteur ou le centrage sont incorrects,
  il y a souvent des molettes de contrôle pour ceux-ci. Sur certains
  terminaux anciens, on doit presser une touche fléchée (ou autre) en
  mode de configuration.

  Vous aurez peut-être besoin d'enlever le couvercle pour faire des
  ajustements, surtout sur les modèles 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 tête Phillips) peut être tout ce dont
  vous avez besoin, les bobines peuvent nécessiter certains outils
  spéciaux d'alignement de télévisions (clés en plastique, etc.). Le nom
  abrégé 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 linéarité verticale (à utiliser si la largeur des
     lignes de balayage diffère en haut et en bas de l'écran)

  ·  V-Hold ajuste le maintien vertical (à utiliser si l'écran défile de
     manière incontrôlable)

  ·  Bright ajuste la luminosité (une molette extérieure peut aussi
     exister)

  ·  Sub-Bright ajuste la luminosité du mode d'intensité atténuée
     (souvent le mode normal : plus faible que le mode gras ou fort).

  Changer la linéarité peut modifier la taille et donc il peut être
  nécessaire de la réajuster. 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 récupérer un peu avec
  l'utilisation (les bords noirs vont rétrécir).


  1188..44..  DDiiaaggnnoossttiiqquueerr



  1188..44..11..  LLee tteerrmmiinnaall aa éémmiiss uunn bbrruuiitt


  Si le terminal a émis un bruit juste avant de tomber en panne (ou
  quand vous l'allumez juste après qu'il est tombé en panne), ce bruit
  est un indice de ce qui ne va pas. Si vous entendez un crépitement ou
  voyez/sentez de la fumée, éteignez immédiatement le terminal pour
  empêcher des dommages supplémentaires. Le problème est sûrement 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 période de temps dans une pièce peu
  éclairée et regardez les arcs électriques. Le câble à haute tension
  (qui court entre le transformateur et le côté du tube d'images) peut
  avoir une isolation défectueuse qui provoque des arcs avec la terre.
  Réparez-le avec de l'isolant haute tension, ou du chatterton
  électrique spécial fait pour, disons, 10000 volts.

  Le transformateur (haute tension) peut ne faire qu'un cliquetis ou un
  crépitement 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 déterminer la
  provenance du bruit, vous pouvez utiliser un morceau de tube en
  caoutchouc (comme on en utilise dans les voitures) comme stéthoscope
  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
  résoudre le problème car le même 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-circuités peuvent faire éclater le fusible. On peut
  les tester avec un vérificateur de transistors ou même avec un
  ohmmètre. Utilisez une petite échelle d'ohms sur un ohmmètre pour que
  la tension appliquée par l'ohmmètre soit faible. Ceci réduira les
  dommages possibles sur les composants sains causés par ce test de
  tension.

  Si le terminal a été exposé à l'humidité, en étant stocké dans un
  endroit humide ou près d'une cuisine avec la vapeur de la cuisine, une
  solution peut être de sécher l'unité. Chauffer un transformateur "en
  panne" avec un sèche-cheveux pendant quelques minutes peut le ranimer.


  1188..44..22..  LLee tteerrmmiinnaall nn''aa éémmiiss aauuccuunn bbrruuiitt


  Un écran vide peut être causé par une personne qui a tourné le
  contrôle de luminosité au plus bas niveau ou par l'âge. La chose à
  faire alors est de vérifier les câbles pour voir si les connexions
  sont mal faites ou cassées.  S'il n'y a pas de signe de courant,
  mettez un nouveau cordon d'alimentation après vous être assuré que la
  prise de courant murale délivre du courant.

  Si vous soupçonnez le clavier, essayez-le sur un autre terminal du
  même type ou mettez un bon clavier. Manipulez les extrémités du câble
  du clavier et la prise. Les fils à l'intérieur du câble peuvent
  casser, surtout vers leurs extrémités. Si la cassure est vérifiée en
  bougeant le câble (et en alternant la panne et la bonne marche du
  terminal en même temps que le mouvement), il faut alors soit obtenir
  un nouveau câble, soit couper le câble et ressouder les cassures, etc.

  L'une des premières choses à faire si le clavier fonctionne est de
  mettre le terminal en ``mode local''. Si cela fonctionne en local,
  alors le problème vient sûrement de la connexion à l'ordinateur hôte
  (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 problème. Regardez les changements de couleurs, les
  craquelures, etc. Un problème intermittent peut se révéler en appuyant
  sur les composantes avec un stylo à bille (pas la partie métallique,
  bien sûr). Une cassure de la partie conductrice d'un circuit imprimé
  peut parfois être révélée 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 problèmes les plus fréquents pour votre terminal et peut-être
  des informations sur la manière de les réparer.

  Pour voir si l'électronique numérique 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.


  1188..55..  MMeessssaaggeess dd''eerrrreeuurr àà ll''ééccrraann


  Vous avez de la chance si vous voyez un message d'erreur à l'écran.
  Cela arrive en général quand vous allumez pour la première fois le
  terminal.


  1188..55..11..  EErrrreeuurr ddee ccllaavviieerr


  Ceci veut dire en général que le clavier n'est pas branché, ou que la
  connexion est branlante. Pour des problèmes plus sérieux, voyez
  ``claviers''.


  1188..55..22..  EErrrreeuurr ddee ssoommmmee ddee ccoonnttrrôôllee eenn NNVVRR


  La NVR est la mémoire non volatile (Non-Volatile RAM, NdT). Ceci veut
  dire que la NVR, où sont stockées les informations de configuration,
  est corrompue. Le terminal fonctionnera sûrement encore mais la
  configuration qui avait été sauvegardée la dernière fois que quelqu'un
  a configuré le terminal a sûrement été perdue. Essayez de refaire la
  configuration et de la sauver.  Cela a des chances de fonctionner. Sur
  certains terminaux très vieux (début des années 1980) il y avait un
  CMOS alimenté sur pile pour sauver la configuration donc dans ce cas
  le problème peut venir d'une pile morte.  Parfois la puce EEPROM (pas
  besoin de pile) devient mauvaise après trop de sauvegardes. On aura du
  mal à en trouver. Si vous ne pouvez pas la réparer vous êtes soit
  bloqué avec la configuration par défaut ou vous pouvez envoyer des
  séquences d'échappement au terminal quand vous le démarrez ou quand
  vous essayez de le configurer.


  1188..66..  CCaappaacciittééss


  Les capacités électrolytiques possèdent une coquille de métal et
  peuvent faiblir ou tomber en panne s'ils restent inutilisés pendant
  des années.  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 année ou tous les deux ans.




  1188..77..  CCllaavviieerrss



  1188..77..11..  IInntteerrcchhaannggeeaabbiilliittéé


  Les claviers pour terminaux ne sont pas les mêmes que les claviers
  pour PC.  La différence ne réside pas seulement dans la disposition
  des touches mais aussi dans les codes générés quand on presse une
  touche. De plus, les claviers pour diverses marques et modèles 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
  spéciales pour la configuration et la pause ne fonctionneront pas
  correctement.


  1188..77..22..  CCoommmmeenntt iillss ffoonnccttiioonnnneenntt


  La plupart des claviers font simplement un contact entre deux
  conducteurs quand vous appuyez sur une touche. L'électronique à
  l'intérieur d'une puce dans le clavier convertit l'établissement de ce
  contact en un code envoyé à travers le câble externe du clavier. Au
  lieu d'avoir un fil (ou conducteur) séparé allant de chaque touche à
  la puce, le principe suivant est utilisé.  Numérotez 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 pressée, un court-circuit est établi entre 3 et B. La puce
  ressent ce court-circuit et sait quelle touche a été pressée.  Un tel
  principe réduit le nombre de conducteurs nécessaire (et réduit le
  nombre de broches nécessaires sur la puce). C'est un principe
  similaire à ce qu'on appelle un commutateur croisé (crossbar).


  1188..77..33..  LL''aappppuuii ssuurr uunnee ttoouucchhee aaffffiicchhee ddeeuuxx ccaarraaccttèèrreess ddiifffféérreennttss


  Si, à cause d'un défaut, les conducteurs 3 et 4 sont court-circuités
  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é pressées à la fois.
  Ceci fera sûrement afficher deux caractères différents alors que tout
  ce que vous souhaitiez était un caractère.


  1188..77..44..  CCllaavviieerrss mmooddeerrnneess ccoonnttrree aanncciieennss


  Alors que le clavier moderne et le type ancien se ressemblent
  beaucoup, la mécanique d'opération est différente. Les vieux possèdent
  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 imprimés (comprenant des points de
  contact). Quand vous appuyez sur une touche, les deux feuilles
  "imprimées" sont pressées l'une contre l'autre à un certain point, ce
  qui ferme les contacts imprimés sur les feuilles à ce point.





  1188..77..55..  LLee ccllaavviieerr nnee ffoonnccttiioonnnnee ppaass dduu ttoouutt


  Si aucune touche ne fonctionne, essayez un autre clavier (si vous en
  avez un) pour vérifier que le clavier est effectivement le problème.
  La cause la plus probable est un fil cassé à l'intérieur du cordon
  (câble) le reliant au terminal. La position la plus probable de la
  cassure est à l'une des extrémités du cordon. Essayez de manipuler les
  extrémités du cordon tout en tapant sur une touche pour voir si ça
  fonctionne de manière 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.


  1188..77..66..  LL''aappppuuii ssuurr bb aaffffiicchhee bbbb,, eettcc.. ((aaffffiicchhaaggee eenn ddoouubbllee))


  Si tous les caractères apparaissent en double il n'y a sûrement pas de
  problèmes avec le clavier. En revanche, votre terminal a sûrement été
  configuré de manière incorrecte en semi-duplex (HDX ou echo local =
  oui) et chaque caractère que vous tapez est renvoyé à la fois depuis
  l'électronique à l'intérieur de votre terminal et depuis votre
  ordinateur hôte. Si les deux caractères ne sont pas les mêmes, il peut
  y avoir un court-circuit à l'intérieur de votre clavier. Voyez  ``un
  appui affiche deux caractères différents''.


  1188..77..77..  LLee ccllaavviieerr ttaappee ttoouutt sseeuull


  Si une touche est court-circuitée il est probable qu'elle tapera un
  grand nombre de fois le même caractère si la répétition automatique
  est activée. Si plus d'une touche est court-circuitée, alors la
  répétition de séquences de quelques caractères sera tapée. Cela peut
  amener getty à se relancer trop rapidement si cela arrive à l'invite
  de login. Voyez ``touche court-circuitée''. La solution est de
  nettoyer les contacts grâce à ``nettoyage des contacts du clavier''.


  1188..77..88..  LLiiqquuiiddee vveerrsséé ssuurr llee ccllaavviieerr


  Si de l'eau ou du liquide aqueux a été versé sur le clavier (ou s'il a
  été exposé à la pluie, une rosée 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
  répétition automatique est activée. S'il est devenu humide et ensuite
  séché en partie (ou en totalité), certaines touches pourront ne pas
  fonctionner à cause de dépôts sur la surface des contacts. Sur les
  types de claviers modernes, on peut facilement séparer les feuilles de
  plastique à l'intérieur et les sécher/nettoyer. Pour les plus anciens,
  on peut les laisser sécher au soleil ou au four (basse température).
  Quand c'est sec il faudra peut-être nettoyer les contacts comme
  expliqué ci-dessous.


  1188..77..99..  NNeettttooyyaaggee ddeess ccoonnttaaccttss dduu ccllaavviieerr






  1188..77..99..11..  CCllaavviieerrss aavveecc mmeemmbbrraannee


  Sur certains claviers récents, les feuilles de plastique (membranes)
  sont faciles à enlever pour les inspecter et les nettoyer si
  nécessaire. Vous n'avez besoin d'enlever que quelques vis pour séparer
  le clavier en deux et obtenir les feuilles. Sur certains vieux clavier
  IBM les feuilles ne peuvent pas être enlevées sans casser beaucoup de
  taquets en plastique qu'il faudra réparer à la colle afin de les
  remettre (probablement pas la peine de les réparer). Un tel clavier
  peut parfois fonctionner en tordant, tournant et/ou pesant sur
  l'assemblage contenant les feuilles de plastique.


  1188..77..99..22..  CCllaavviieerrss aavveecc ccoonnttaaccttss iinnddiivviidduueellss


  Ce qui suit concerne les vieux claviers qui possèdent des contacts
  séparés en plastique dur pour chaque touche. Avant de faire tout le
  travail de nettoyage des contacts électriques essayez d'abord de
  tourner le clavier tête en bas et bougez les mauvaises touches. Ceci
  peut aider à déloger les saletés, surtout si vous pressez la touche
  fortement et rapidement pour faire une vibration.  (NdT : bien secouer
  le clavier régulièrement fait effectivement tomber toutes les saletés,
  miettes de pain, etc. et fait du bien au clavier !)

  Souvent on peut enlever les capuchons de touches en les découvrant
  vers le haut en utilisant un petit tournevis comme levier tout en
  empêchant une inclinaison excessive avec un doigt. Il existe un outil
  spécial appelé extracteur de touches mais vous pouvez vous en passer.
  (Attention : les capuchons de touches sur les claviers modernes ne se
  découvrent pas.) Le capuchon de touche peut basculer un peu et branler
  alors qu'il se détache. Il peut même 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 séparer 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 méthode la plus rapide mais peut ne pas fonctionner et peut aussi
  endommager le plastique. Avant de vaporiser, nettoyez la surface près
  des supports de contacts. Avec le clavier branché (ou en connectant un
  ohmmètre sur les contacts de touches) utilisez le tube livré avec le
  vaporisateur pour injecter du nettoyant à l'intérieur du contact de
  touche. Ne laissez pas le liquide de nettoyage s'en aller dans les
  touches voisines où il pourrait amasser de la poussière et s'infiltrer
  (avec la poussière) dans d'autres contacts de touches. Si vous faites
  cette erreur, vous pourriez réparer une touche et abimer les touches
  voisines.

  Si possible, basculez le clavier pour que le nettoyant coule à
  l'intérieur des contacts. Pour le terminal CIT101e avec un clavier
  Alps, ceci implique de basculer la rangée 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 tête en bas tout en bougeant
  la touche pour enlever le nettoyant qui reste. Plus vous injecterez de
  nettoyant plus vous serez sûr de réparer la touche mais vous aurez
  aussi plus de chances d'endommager le plastique, utilisez donc ce que
  vous jugez nécessaire 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 très bien quand les contacts à
  l'intérieur sont saturés de liquide de nettoyant de contacts, mais
  quand le liquide sèche quelques minutes plus tard, le dépôt résultant
  sur les contacts empêche un contact correct et la touche fonctionne
  avec des ratés (si elle fonctionne).  Faire bouger la touche alors que
  le liquide sèche à l'intérieur peut aider les choses. Certaines
  touches possèdent des contacts presque scellés à l'intérieur 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 désassembler le contact de touche, inspectez-le d'abord
  pour voir comment il est installé et se sépare. Parfois on peut
  enlever le capuchon du contact sans enlever le contact du clavier.
  Pour ce faire, découvrez (ou tirez) le haut du contact de touche après
  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 séparer (ou de le remplacer). Une fois que le
  contact a été séparé, 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 légèrement 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
  enlevée 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.


  1199..  AAnnnneexxee AA :: ggéénnéérraalliittééss



  1199..11..  LLiissttee ddeess ccoommmmaannddeess LLiinnuuxx ppoouurr lleess tteerrmmiinnaauuxx



  1199..11..11..  EEnnvvooyyeerr uunnee ccoommmmaannddee àà uunn tteerrmmiinnaall



  ·  ``setterm'' : options longues

  ·  ``tput'' : options courtes

  ·  tset : ne fait que l'initialisation

  ·  clear : efface l'écran

  ·  reset : envoie une chaîne de réinitialisation


  1199..11..22..  CCoonnffiigguurraattiioonn dduu ppiilloottee ddee ppéérriipphhéérriiqquueess ppoouurr lleess tteerrmmiinnaauuxx



  ·  ``setserial'' :

  ·  ``stty''




  1199..11..33..  TTeerrmmiinnffoo



  ·  ``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 entrées terminfo


  1199..11..44..  AAuuttrreess



  ·  gitkeys : montre quels octets chaque touche envoie à l'hôte.

  ·  tty : montre sur quel port tty vous êtes connecté.

  ·  set (ou tset -q) : montre la valeur de TERM, le nom de l'entrée
     terminfo

  ·  ``tset'' : positionne TERM de manière interactive et fait
     l'initialisation


  1199..22..  IInntteerrnneett eett lleess lliivvrreess



  1199..22..11..  IInnffoorrmmaattiioonn ssuurr llee tteerrmmiinnaall ssuurr ll''IInntteerrnneett



  ·  Site Web de Shuford
     <http://www.cs.utk.edu/~shuford/terminal_index.html> à l'université
     du Tennessee possède 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 spécifications,
     choisissez les liens ADDS, VT ou DORIO. Choisissez ensuite un lien
     "data sheet". Ensuite, sur la feuille de données, sélectionnez le
     lien "Go to Specs".

  ·  Wyse <http://www.wyse.com/terminal/> est un grand fabricant de
     terminaux. Voyez aussi vieilles spécifications des terminaux Wyse
     <http://www.wyse.com/service/faq/wysetter.htm>

  ·  Séquences d'échappement ; Amérique du Nord <http://www.pericom-
     usa.com/twdocs/doc/twproae.htm> ou séquences d'échappement ; Europe
     <http://www.pericom.co.uk/teemworld/doc/twproae.htm> est une liste
     de séquences d'échappement (et codes de contrôles) pour certaines
     émulations de terminal (qui comprend les VT 100, 300, 420 et Wyse)
     ;

  ·  comp.terminals est le groupe de nouvelles pour les terminaux.


  1199..22..22..  LLiivvrreess lliiééss aauuxx tteerrmmiinnaauuxx




  ·  port série EIA-232, voir ``Livres sur EIA-232 (RS-232)''.

  ·  réparations, voir ``livres et sites Web sur la réparation''.

  ·  base de données Terminfo, voir ``documents Termcap''


  1199..22..33..  LLiivvrreess ccoonnssaaccrrééss eennttiièèrreemmeenntt aauuxx tteerrmmiinnaauuxx


  Autant que je sache, il n'existe pas de livre satisfaisant sur les
  terminaux texte (sauf si vous vous intéressez aux terminaux antiques
  des années 70).


  ·  Handbook of Interactive Computer Terminals par Duane E. Sharp ;
     Reston Publishing Co. 1977. (quasiment obsolète)

  ·  Communicating with Display Terminals par Roger K. deBry ; McGraw-
     Hill 1985.  (principalement sur les terminaux synchrones IBM)

  Le "HANDBOOK..." présente les spécifications brèves de plus de cent
  modèles différents de vieux terminaux fabriqués au début des années
  1970 par plus de 60 sociétés différentes. Il explique aussi comment
  ils fonctionnent physiquement mais montre de manière incorrecte un
  diagramme pour un écran qui utilise une déviation électrostatique du
  faisceau d'électrons (même dans les années 1970). Ce livre explique un
  certain nombre de concepts techniques avancés comme le "balayage au
  hasard" et le "principe de pénétration de la couleur".

  Le livre "COMMUNICATING..." au contraire du "Handbook..." ignore les
  détails physiques et électroniques des terminaux. Il possède un
  chapitre entier sur l'explication des nombres binaires (qui n'est pas
  nécessaire 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 utilisés couramment de nos jours sur les
  systèmes de type Unix. Bien qu'il en parle un peu, il ne montre les
  différents systèmes de câblage utilisés pour les relier aux ports
  série.


  1199..22..44..  LLiivvrreess ppoossssééddaanntt ddeess cchhaappiittrreess ssuurr lleess tteerrmmiinnaauuxx


  Ces chapitres ne couvrent presque rien sur les terminaux eux-mêmes et
  leurs capacités. Par contre, ces chapitres couvrent plutôt la manière
  de configurer l'ordinateur (et le pilote de terminal) pour qu'il
  fonctionne avec les terminaux. À cause des différences entre les
  systèmes 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 : paramètres du terminal et
     de la ligne série, Ch. 42 : problèmes avec les terminaux

  ·  Advanced Programming in the Unix Environment par W. Richard Stevens
     Addison-Wesley, 1993. Ch. 11 : entrées/sorties avec le terminal,
     Ch. 19 : pseudo-terminaux

  ·  Essential System Administration par Aleen Frisch, 2ème édition.
     O'Reilly, 1998. Ch. 11 : terminaux et modems.


  Le livre "UNIX POWER TOOLS" possède 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 périphériques du système d'exploitation pour s'occuper
  des terminaux. Il explique les paramètres 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.


  1199..33..  SSyyssttèèmmeess nnoonn LLiinnuuxx


  La configuration de l'ordinateur hôte pour les terminaux sur des
  systèmes d'exploitation différents de Linux est en général largement
  différente que sous Linux. Voici quelques liens vers des manuels en
  ligne pour les systèmes de type Unix :


  ·  Ajouter des terminaux série
     <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.



  2200..  AAnnnneexxee BB :: tteerrmmiinnoollooggiiee ddeess ccoommmmaannddeess ddee ssééqquueenncceess dd''éécchhaappppeemmeenntt


  On les appelle parfois "séquences de contrôle". Cette section du Text-
  Terminal HOWTO est incomplète (et pourra ne jamais être complète car
  il y a un grand nombre de séquences de contrôle). Cette section sert
  de référence 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 séquence d'échappement ANSI normale est ESC[5B qui
  déplace le curseur vers le bas de cinq lignes. ESC est le caractère
  d'échappement. Le paramètre 5 est inclus dans la séquence. Si c'était
  7 le curseur bougerait vers le bas de sept lignes, etc. Il est facile
  de comprendre l'explication suivante pour la séquence : "déplacer le
  curseur vers le bas de x lignes : ESC[xB". Mais un jargon de commande
  tel que : "requête d'attribut pour périphérique tertiaire" est moins
  compréhensible. Cette section essaiera d'expliquer une partie du
  jargon utilisé dans les commandes de séquences d'échappement. Une
  liste complète (comprenant les codes de séquences d'échappement pour
  la norme ANSI) est un projet "qu'on voudrait bien faire".  Puisque
  beaucoup de séquences d'échappement font la même chose que ce qui est
  fait en configurant le terminal avec ``options de configuration'', de
  telles options en séquences d'échappement ne seront pas répétées ici.


  2200..11..  LLiissttee ddee ssééqquueenncceess dd''éécchhaappppeemmeenntt


  Pour avoir une liste de nombreuses séquences d'échappement (mais pas
  toutes) pour divers terminaux, voyez séquences d'échappement ;
  Amérique du Nord <http://www.pericom-usa.com/twdocs/doc/twproae.htm>
  ou séquences 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
  mêmes 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".


  2200..22..  CCooddeess ddee ccoonnttrrôôllee 88 bbiittss


  Table des codes de contrôle 8 bits DEC (en hexadécimal). Fonctionne
  sur les VT2xx ou plus récents. 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     Décalage Simple 2                       8E      ESC N
  SS3     Décalage Simple 3                       8F      ESC O
  DCS     Chaîne de Contrôle Périphérique         90      ESC P
  CSI     Introduction Séquence de Contrôle       9B      ESC [
  ST      Terminaison de Chaîne                   9C      ESC \





  2200..33..  ÉÉcchhaappppeemmeenntt ppoouurr ll''iimmpprriimmaannttee



  ·  Auto Print on/off (impression automatique oui/non) : Activée (on),
     les données venant de l'hôte sont aussi envoyées sur le port
     imprimante du terminal (et sont aussi affichées sur l'écran du
     terminal).

  ·  Print Controller on/off (contrôleur d'impression oui/non) : Activée
     (on), les données venant de l'hôte ne sont envoyées qu'à
     l'imprimante (rien ne s'affiche sur l'écran du terminal).


  2200..44..  RRaappppoorrttss


  Ces séquences sont en général des requêtes envoyées de l'hôte pour
  demander un rapport du terminal. Le terminal répond en envoyant un
  rapport (en fait une autre séquence d'échappement) à l'hôte qui y a
  intégré certaines valeurs indiquant à l'hôte l'état en cours du
  terminal. Dans certains cas un rapport peut être envoyé à l'hôte même
  s'il n'a pas été demandé. Ceci arrive parfois quand on quitte la
  configuration. Par défaut aucun rapport non sollicité ne devrait être
  envoyé.


  ·  Request for Status (Report Operating Status) (Demande d'état,
     rapporter l'état d'opération) : la signification des réponses du
     VT100 est soit "je vais bien", soit "je ne vais pas bien"

  ·  Request for Device Attributes (demande des attributs du
     périphérique) : le "périphérique" est en général l'imprimante. Y a-
     t-il une imprimante ?  Est-elle prête ?

  ·  Request for Tertiary Device Attributes (pour les VT) (demande des
     attributs des périphériques tertiaires) : la réponse est le rapport
     qui a été entré pendant la configuration. Le périphérique tertiaire
     est le troisième périphérique (l'imprimante ou le périphérique sur
     le port auxiliaire ??).  Le premier périphérique peut être
     l'ordinateur hôte et le deuxième périphérique le terminal.

  ·  Request for Terminal Parameters (demande des paramètres 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'hôte ne connaissait pas déjà ces
     données, il ne pourrait pas communiquer avec le terminal ou envoyer
     une réponse.



  2200..55..  MMoouuvveemmeennttss dduu ccuurrsseeuurr


  Le curseur se trouve à l'endroit où le prochain caractère reçu de
  l'hôte sera affiché. La plupart des mouvements de curseur sont
  compréhensibles. "index cursor" (indexer le curseur) veut dire
  déplacer le curseur vers le bas d'une ligne. Les mouvements du curseur
  peuvent être relatifs à la position en cours comme "déplacer de 4
  espaces vers la gauche" ou absolus comme "déplacer à la rangée 3,
  colonne 39". Le mouvement absolu s'appelle "positionnement direct du
  curseur" ou "adressage direct du curseur".

  La position d'origine est rangée 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 défilante (pas forcément le haut de l'écran). Si le "mode
  d'origine absolu" est choisi (même chose que désactiver l'un des deux
  modes de la phrase précédente) 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.


  2200..66..  PPaaggeess ((ddééffiinniittiioonn))


  Voyez ``pages'' pour avoir une explication sur les pages. Il y a un
  certain nombre de séquences d'échappement pour s'occuper des pages. Le
  texte peut être copié d'une page à une autre et on peut déplacer 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
  données supplémentaires venant de l'hôte vont sur la page 2. Le
  curseur peut n'être que sur une page à la fois et les caractères
  envoyés au terminal vont là. Si cette page n'est pas affichée, le
  nouveau texte sera reçu par le terminal et ira en mémoire d'affichage,
  mais vous ne le verrez pas (jusqu'à ce qu'on passe à cette page sur le
  terminal).


  2211..  AAnnnneexxee CC :: ccoommmmuunniiccaattiioonnss sséérriiee ssuurr EEIIAA--223322 ((RRSS--223322))



  2211..11..  IInnttrroodduuccttiioonn aauuxx ccoommmmuunniiccaattiioonnss sséérriiee


  (Une grande partie de cette section devrait finalement se trouver dans
  le Serial-HOWTO.) Les terminaux texte sur les systèmes de type Unix
  (et sur les PC) sont connectés en général sur un port série asynchrone
  232 d'un ordinateur. C'est en général un port RS-232-C, EIA-232-D ou
  EIA-232-E. Ces trois ports sont à peu près identiques. Le préfixe
  originel RS est devenu EIA (Electronics Industries Association) et
  plus tard EIA/TIA après que EIA se soit alliée avec TIA
  (Telecommunications Industries Association). La spécification EIA-232
  décrit aussi les communications synchrones mais le matériel qui
  supporte les communications synchrones manque quasiment toujours sur
  les PC. La désignation RS est obsolète mais est toujours utilisée. On
  utilisera EIA dans cet article.

  Le port série représente plus qu'un simple connecteur physique au dos
  d'un ordinateur ou d'un terminal. Il comprend l'électronique associée
  qui doit produire des signaux conformes à la spécification EIA-232. Le
  connecteur standard possède 25 broches, dont la plupart sont
  inutilisées. Un connecteur différent ne possède que neuf broches. Une
  broche est utilisée pour envoyer des octets de données et une autre
  pour en recevoir. Une autre broche est la masse commune du signal. Les
  autres broches "utiles" sont principalement utilisées à des fins de
  signalisation avec une tension négative régulière voulant dire
  "éteint" et une tension positive régulière voulant dire "allumé".

  La puce UART (émetteur-récepteur asynchrone universel) fait la plus
  grande partie du travail. Aujourd'hui, les possibilités de cette puce
  sont en général incluses dans une autre puce.


  2211..22..  TTeennssiioonnss



  2211..22..11..  TTeennssiioonn ppoouurr uunn bbiitt


  Sur le port série EIA-232, les tensions sont bi-polaires (positives ou
  négatives 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 réception +12 volts représente le bit 0 (parfois
  appelé "espace") et -12 volts est le bit 1 (parfois appelé "marque").
  On appelle cela la logique inversée puisque normalement le bit 0 est à
  la fois faux et négatif alors que le 1 est normalement vrai et
  positif. Bien que les broches de transmission et réception soient en
  logique inversée, d'autres broches (les lignes de contrôle du modem)
  sont en logique normale avec une tension positive étant vraie et une
  tension négative étant fausse. La tension zéro n'a aucune
  signification (sauf qu'elle veut dire en général que l'unité est
  éteinte).

  Une étendue de tensions est permise. Les spécifications disent que
  l'amplitude d'un signal transmis devrait être entre 5 et 15 volts mais
  ne doit jamais dépasser 25 volts. Toute tension reçue en dessous de 3
  volts est indéfinie (mais certains terminaux considèreront qu'une
  tension plus basse est valide). On voit parfois des affirmations
  erronnées selon lesquelles la tension est communément 5 volts (ou même
  3 volts) mais c'est en général 11-12 volts. Si vous utilisez un port
  EIA-422 sur un ordinateur Macintosh comme un EIA-232 (cela demande un
  câble spécial) 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 série, cela
  peut endommager l'équipement de test.





  2211..22..22..  SSééqquueennccee ddee tteennssiioonn ppoouurr uunn oocctteett


  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 départ et reste à +12 V pendant la durée
  (période) du bit de départ. Après vient le bit de bas niveau de
  l'octet de données. Si c'est un bit 0 rien ne change et la ligne reste
  à +12 V pendant une autre période de bit.  Après 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 départ. 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 consécutifs ont la même polarité
  (tous les deux zéro ou tous les deux un).

  Un deuxième bit de stop serait aussi à -12 V, identique au premier bit
  de stop. Puisqu'il n'y a pas de signal pour marquer la frontière entre
  ces deux bits, le seul effet du deuxième bit de stop est que la ligne
  doit rester inactive à -12 V deux fois plus longtemps. Le récepteur
  n'a aucun moyen de faire la différence entre un deuxième bit de stop
  et un temps d'inactivité plus long entre les octets. Ainsi les
  communications fonctionnent bien si une extrémité utilise un bit de
  stop et l'autre extrémité 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
  gardée à -12 V pendant une période de temps et demie (comme un bit de
  stop 50 % plus long que la normale).


  2211..33..  LLaa ppaarriittéé eexxpplliiqquuééee


  Les caractères sont normalement transmis sur 7 ou 8 bits (de données).
  Une parité supplémentaire peut (ou peut ne pas) y être ajoutée, 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
  parités marque et espace peuvent être des options sur certains
  terminaux). Avec une parité impaire, le bit de parité est sélectionné
  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 détériore par
  l'inversion d'un bit, le résultat est un octet illégal de parité
  paire. Cette erreur sera détectée et si c'est un octet arrivant au
  terminal, un symbole caractère d'erreur apparaîtra à l'écran. La
  parité paire fonctionne de manière similaire avec tous les octets
  légaux (comprenant le bit de parité) ayant un nombre de bit 1 pair.
  Pendant la configuration, le nombre de bits par caractère signifie en
  général le nombre de bits de données par octet (7 pour de l'ASCII pur
  et 8 pour les divers codes de caractères 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 gâcher de la bande passante et
  devrait être évitée 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 sélectionner "pas de
  parité" pour utiliser des codes de caractères sur 8 bits puisqu'il n'y
  a pas de place pour le bit de parité.


  2211..44..  FFoorrmmaattiioonn dd''uunn oocctteett ((eennccaaddrreemmeenntt))


  Dans la transmission en série des octets par les ports EIA-232, le bit
  de bas niveau est toujours envoyé en premier. Les ports série sur les
  PC utilisent des communications asynchrones quand il y a un bit de
  départ et un bit de stop pour marquer le début 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 envoyés par octet, 10 étant le
  nombre le plus courant. 8-N-1 veut dire 8 bits de données, pas de
  parité, 1 bit de stop. Ceci fait en tout 10 bits si on compte le bit
  de départ. Un bit de stop est utilisé quasiment partout. À 110
  bits/seconde (et parfois à 300 bits/seconde) deux bits de stop étaient
  autrefois utilisés mais maintenant le deuxième bit de stop n'est
  utilisé que dans des situations très inhabituelles (ou par erreur
  puisqu'il semble encore fonctionner correctement de cette manière).


  2211..55..  LLiimmiittaattiioonnss ddee EEIIAA--223322



  2211..55..11..  BBaasssseess vviitteesssseess eett ccoouurrtteess ddiissttaanncceess


  Le port série EIA-232 traditionnel est à basse vitesse de manière
  inhérente, et est sérieusement limité en taille (distance). Les
  publicités disent souvent "grande vitesse" mais cela ne peut
  fonctionner à grande vitesse que sur de très courtes distances comme
  pour un modem situé juste à côté de l'ordinateur. Tous les fils
  utilisent un retour de masse commun et donc la technologie en paire
  torsadée (nécessaire à de grandes vitesses) ne peut être utilisée sans
  matériel supplémentaire. Cependant certains ordinateurs possèdent des
  interfaces plus modernes. Voyez ``successeurs de EIA-232''.

  Il est parfois décevant que la norme RS-232 de 1969 n'ait pas utilisé
  la technologie en paire torsadée qui aurait pu fonctionner à peu près
  100 fois plus rapidement. Les paires torsadées sont utilisées dans les
  câbles téléphoniques depuis la fin du 19ème siècle. En 1888 (il y a
  plus de 100 ans) la "conférence sur le câble" a rapporté son
  attachement à la paire torsadée (pour les systèmes téléphoniques) et a
  avancé ses avantages. Mais plus de 80 ans après cette approbation par
  la "conférence du câble", RS-232 n'a pas réussi à l'utiliser. Puisque
  RS-232 était au départ faite pour connecter un terminal à un modem
  basse vitesse situé tout près, le besoin de grande vitesse et d'une
  longueur de transmission plus élevée n'a apparemment pas été perçu.


  2211..55..22..  SSuucccceesssseeuurrss ddee EEIIAA--223322


  Un certain nombre de normes EIA ont été établies pour des vitesses
  plus élevées et des distances plus grandes en utilisant la technologie
  en paire torsadée (équilibrée). Une transmission équilibrée peut
  parfois être une centaire de fois plus rapide que EIA-232 non
  équilibrée. Pour une vitesse donnée, la distance (longueur maximale du
  câble) peut être beaucoup de fois plus grande avec de la paire
  torsadée. Mais les PC continuent d'être fabriqués avec l'EIA-232
  "obsolète" puisque que cela fonctionne correctement avec les modems
  reliés aux lignes téléphoniques 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 torsadée (équilibrée) pour la
  transmission et la réception. 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 légal). Cependant, à cause du fait
  que les Mac coûtent plus cher que les PC, on les utilise rarement
  comme ordinateur hôte pour des terminaux. Certains terminaux récents
  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 spécifications donnent des vitesses plus élevées que
  pour EIA-232 (qui ne sera d'aucune aide sur une grande distance où
  c'est le non-équilibrage qu cause les interférences).

  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 même connecteur à 25 broches que EIA-232.
  L'interface série à grande vitesse (HSSI = EIA-612/613, High Speed
  Serial Interface) utilise un connecteur à 50 broches et monte à peu
  près à 50 Mbits/s mais la distance est limitée à seulement quelques
  mètres. Le Bus Série Universel (USB, Universal Serial Bus) est
  construit dans des puces PCI. Il fait 12 Mbits/s sur une paire
  torsadée avec un connecteur à 4 broches (2 câbles fournissent le
  courant) mais il est aussi limité à des distances courtes d'au plus 5
  mètres (cela dépend de la configuration).


  2211..55..33..  PPiillootteess ddee lliiggnneess


  Pour un terminal texte, les vitesses de EIA-232 sont suffisamment
  rapides mais la longueur de câble utilisable est souvent trop courte.
  La technologie équilibrée pourrait résoudre ce problème. La méthode
  courante pour obtenir une communication équilibrée avec un terminal
  texte est d'installer deux pilotes de ligne dans la liaison série pour
  convertir du non équilibré en équilibré (et vice-versa). Ce sont des
  appareils spécialisés et ils sont chers si on les achète neufs.


  2211..66..  SSyynncchhrroonniissaattiioonn eett ssyynncchhrroonnee



  2211..66..11..  CCoommmmeenntt oonn ssyynncchhrroonniissee ll''""aassyynncchhrroonnee""


  Dans EIA-232 il n'y a que deux états sur le fil de transmission (ou de
  réception) : marque (-12 V) ou espace (+12 V). Il n'y a pas d'état à 0
  V.  Ainsi une séquence de bits à 1 est tranmise avec uniquement du -12
  V stable sans marqueur d'aucune sorte entre les bits. Pour que le
  récepteur détecte les bits individuels il doit toujours disposer d'un
  signal d'horloge qui est synchronisé avec l'horloge de l'émetteur. De
  telles horloges génèrent un "top" synchronisé avec chaque bit transmis
  (ou reçu).

  En transmission asynchrone, la synchronisation est faite en encadrant
  chaque octet d'un bit de départ et d'un bit de stop (fait par le
  matériel). Le récepteur attend sur la ligne un bit de départ et quand
  il en détecte 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 général plusieurs mesures pour un bit, ce qui demande des
  tops supplémentaires.) Ensuite le bit de stop est lu, l'horloge
  s'arrête et le récepteur attend le bit de départ suivant. Ainsi
  l'asynchrone est en fait synchronisé pendant la réception d'un seul
  octet mais il n'y a pas de synchronisation entre un octet et l'octet
  suivant.




  2211..66..22..  DDééffiinniirr ll''aassyynncchhrroonnee ppaarr rraappppoorrtt aauu ssyynncchhrroonnee


  L'asynchrone signifie "non synchrone". En pratique, un signal
  asynchrone représente ce que le port série asynchrone envoie et reçoit
  qui est un flux d'octets, chacun d'entre eux étant délimité par un bit
  de départ et un bit de stop. Le synchrone est à peu près tout le
  reste. Mais ceci n'explique pas les concepts de base.

  En théorie, synchrone veut dire que les octets sont envoyés à vitesse
  constante l'un après l'autre (en accord sur un top d'horloge). Les
  octets asynchrones peuvent être envoyés n'importe quand avec des
  intervalles de temps variés entre les octets (comme quelqu'un qui tape
  des caractères sur un clavier).

  Il y a des situations limites qu'on doit classer comme synchrones ou
  asynchrones. Le port série asynchrone envoie souvent des octets dans
  un flux constant qui en ferait un cas synchrone mais comme il y aura
  encore les bits de départ et de stop (ce qui permet de les envoyer de
  manière indéterminée) on l'appelle asynchrone. Un autre cas est quand
  les octets de données (sans auncun bit de départ ou de stop) forment
  des paquets avec un espacement erratique entre un paquet et le
  suivant. On l'appelle synchrone puisque les octets à l'intérieur de
  chaque paquet doit être transmis de manière synchrone.


  2211..66..33..  CCoommmmuunniiccaattiioonn ssyynncchhrroonnee


  Ne vous-êtes vous jamais demandé ce qu'on faisait de toutes les
  broches inutilisées sur un connecteur 25 broches pour le port série ?
  La plupart d'entre eux sont utilisés dans une communication synchrone
  qu'on implémente rarement sur les PC. Il y a des broches pour les
  signaux de temporisation de synchronisation ainsi que pour un canal
  inverse synchronisé. La spécification EIA-232 est donnée à la fois
  pour les communications synchrones et asynchrones mais les PC
  utilisent une puce UART (Émetteur Récepteur 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 série synchrone est sûrement assez cher.

  À côté de la partie synchrone de EIA-232, il y a plusieurs autres
  normes EIA synchrones. Pour EIA-232, trois broches sur le connecteur
  sont réservées pour les signaux d'horloge (de temporisation). Parfois
  c'est le rôl du modem de générer 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 série soient synchrones, la communication
  synchrone prend souvent place sur les lignes téléphoniques en
  utilisant des modems qui utilisent la correction d'erreurs V.42. Ceci
  enlève les bits de départ et de stop et place les octets de données
  dans des paquets ce qui donne une opération synchrone sur la ligne
  téléphonique.


  2211..77..  MMooddee ppaarr bbllooccss



  2211..77..11..  IInnttrroodduuccttiioonn aauu mmooddee ppaarr bbllooccss



  Le mode par blocs est rarement utilisé sous Linux. En mode par blocs,
  quand quelqu'un tape sur un terminal, le résultat est sauvé dans la
  mémoire du terminal et n'est pas envoyé immédiatement à l'ordinateur
  hôte. De tels terminaux possèdent souvent des possibilités d'édition
  intégrées. Quand l'utilisateur appuie sur certaines touches (comme la
  touche envoi), ce qui a été sauvegardé dans la mémoire du terminal est
  envoyé à l'ordinateur hôte.  Cependant les éditeurs vi et emacs sous
  Linux réagissent instantanément à 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'').


  2211..77..22..  TTyyppeess ddee mmooddeess ppaarr bbllooccss,, ffoorrmmuullaaiirreess


  Le mode par blocs peut lui-même avoir divers sous-modes comme "page"
  (une page à la fois) et "ligne" (une ligne à la fois). Certains
  terminaux possèdent à la fois les modes de transmissions par blocs et
  les modes traditionnels par caractères, et on peut passer d'un mode à
  l'autre. Les terminaux asynchrones possédant des modes par blocs sont
  parmi les HP2622A, VT130, VT131, VT330, VT340 et Visual500. Beaucoup
  de modèles de terminaux plus récents peuvent émuler le mode par blocs.
  Les modes par blocs peuvent comprendre une possibilité de formulaires
  où l'ordinateur hôte envoie un formulaire au terminal.  L'utilisateur
  le remplit alors et envoie la touche envoi qui ne renvoie que les
  données du formulaire à l'ordinateur hôte. Le formulaire lui-même (pas
  les données) est affiché à l'écran dans des champs protégés qui ne
  sont pas transmis à l'hôte.


  2211..77..33..  EEffffiiccaacciittéé


  Les modes par blocs enlèvent une bonne partie de la charge sur
  l'ordinateur hôte, surtout si le matériel de l'ordinateur hôte est
  fait pour les modes par blocs (comme c'est/c'était le cas sur les
  minis IBM). En mode caractère, chaque caractère tapé est envoyé
  immédiatement sur le port série et en général génère une interruption
  sur l'ordinateur hôte. L'hôte qui reçoit l'octet doit arrêter tout ce
  qu'il fait et va chercher ce caractère depuis le matériel du port.
  Même avec des UART qui possèdent des tampons matériels FIFO, le délai
  matériel ne représente normalement que le temps de transmission de 3
  octets, donc une interruption est générée à chaque caractère tapé.

  En vrai mode par blocs, un bloc de caractères long est reçu en
  n'utilisant qu'une interruption. Si on utilise le mode par blocs avec
  des ports série FIFO asynchrones, une interruption n'est nécessaire
  que tous les 14 octets puisqu'ils ont des tampons matériels de 16
  octets. Ainsi la plus grande partie de la charge et du coût de la
  gestion des interruptions est éliminée et l'ordinateur a plus de temps
  à consacrer à d'autres tâches quand on utilise le mode par blocs.

  On fait des économies significatives en mode par blocs si le terminal
  est relié à son hôte par l'intermédiaire d'un réseau. Sans le mode par
  blocs, chaque caractère (octet) tapé est envoyé dans son propre paquet
  avec tous les octets d'enveloppe (40 dans un paquet TCP/IP comme ceux
  utilisés sur l'Internet). En mode par blocs, un grand nombre de
  caractères est envoyé dans un seul paquet.


  2211..88..  LLiivvrreess ssuurr EEIIAA--223322 ((RRSS--223322))


  (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.


  2211..99..  LLooggiicciieellss sséérriiee


  Voyez logiciels série <ftp://sunsite.unc.edu/pub/Linux/system/serial/>
  pour les logiciels Linux sur les ports série avec getty et les
  moniteurs de ports.


  2222..  AAnnnneexxee DD :: NNootteess ccllaassssééeess ppaarr mmaarrqquuee


  Voici des notes classées par marque qui étaient trop spécifiques à 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
  modèles et marques ont souvent beaucoup de choses en commun qu'on ne
  doit écrire qu'à un endroit. Il serait bien d'avoir, pour chaque
  modèle de terminal, un grand nombre de liens vers les documentations
  se rapportant à ce modèle (avec les séquences d'échappement). Il y a
  tellement de modèles de terminaux qu'une telle tâche serait
  relativement pénible 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 nécessaire.


  2222..11..  CCIITT


  Les terminaux CIT ont été fabriqués au Japon dans les années 1980 pour
  CIE Terminals. On a cessé de les importer à la fin des années 1980. La
  société, CIE, fabrique encore des imprimantes CItoh (en 1997) mais n'a
  pas de pièces détachées pour ses terminaux arrêtés. Ernie au (714)
  453-9555 à Irvine, Californie, vendait (en 1997) certaines pièces pour
  les modèles 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 paramètres de configuration pressez ^S en mode Set-Up.
  cit80 : contraste : molette à l'arrière du terminal, cit101e :
  luminosité : utilisez les touches fléchées haut/bas en mode Set-Up.


  2222..22..  TTeerrmmiinnaauuxx IIBBMM


  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 inversée 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 caractères). Deux normes sont "BISYNC" et "SNA" (qui comprend des
  normes de réseau). Beaucoup de leurs terminaux sont reliés avec du
  câble coaxial (RG62A/U) et les personnes naïves peuvent penser que le
  connecteur "BNC" sur le terminal est pour l'Ethernet (mais ce n'est
  pas le cas).

  Alors que ce système IBM est en réalité plus efficace que ce qui est
  normalement utilisé sous Linux, les terminaux possédant ces
  caractéristiques IBM ne fonctionneront pas sous Linux. Cependant,
  certains terminaux IBM sont des terminaux ASCII asynchrones et
  devraient fonctionner sous Linux sur des PC. Les modèles 31xx peuvent
  fonctionner à l'exception que 317x et 319x ne sont pas des terminaux
  ASCII. Avant d'acquérir un terminal IBM, assurez-vous qu'il y a une
  entrée termcap (ou terminfo) pour celui-ci. S'il n'y en a pas, il ne
  fonctionnera probablement pas sous Linux. Même s'il y a une entrée
  terminfo, il peut ne pas fonctionner. Par exemple, il y a une entrée
  termcap pour les 327x mais le 3270 est un terminal synchrone EBCDIC.

  Les modèles 3270 comprennent le 3278 (fin des années 1970), le 3279
  avec la couleur et les graphiques, et le contrôleur de terminal 3274
  (à peu près comme le 3174). On peut les utiliser à la fois pour BISYNC
  et SNA. Le 3290 a un écran séparé (séparé en quartiers).

  Les terminaux synchrones IBM ne sont pas directement reliés au mini
  IBM mais sont reliés à un "contrôleur de terminaux" (qu'on appelle
  parfois "contrôleur de cluster" ou "contrôleur de communications").
  Certains de ces contrôleurs peuvent convertir un signal synchrone en
  asynchrone et donc dans ce cas on pourrait relier indirectement un
  terminal synchrone à un ordinateur hôte de type Unix par son port
  série. Mais il reste un problème majeur qui est la transmission par
  blocs. Voyez la section ``mode par blocs''.


  2222..22..11..  IIBBMM 33115533


  On dit que le port Aux est DCE et utilise un câble droit.


  2222..33..  TTeelleettyyppeess


  Ce sont des antiquités et ils représentent les terminaux les plus
  anciens.  Ils ressemblent à des machines à écrire télécommandées mais
  sont grands et font du bruit. Fabriqués par Teletype Corp., les
  premiers modèles ont été faits dans les années 1920 et devancent
  l'ordinateur de plus de 30 ans. Les premiers modèles utilisaient des
  relais électro-mécaniques et des distributeurs rotatifs au lieu
  d'électronique. Leur code Baudot n'avait que 5 bits par caractère
  comparé à l'ASCII sur 7 bits. Voyez le livre "Small Computer Systems
  Handbook" par Sol Libes, Hayden Books, 1978 : pp. 138-141
  ("Teletypes").


  2222..44..  VVTT ((DDEECC))


  Digital Equipment Corporation a fabriqué les modèles VT renommés 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 possèdent un connecteur BNC pour la sortie vidéo (pas
  pour l'entrée). Parfois les gens croient à tort que c'est pour une
  liaison Ethernet.

  VT520 : il supporte le contrôle de flux DTR/DSR complet.


  2222..55..  WWyyssee


  Wyse possède certaines FAQ pour les terminaux dont les numéros sont
  en-dessous de 100 (comme le WY60). Voyez
  <http://www.wyse.com/service/faq/wysetterl.htm>. Pour les
  spécifications de terminaux plus récents voyez
  <http://www.wyse.com/terminal/>.


  2222..55..11..  WWyyssee 9999--GGTT


  Voici les menus de configuration du Wyse99GT (fin des années 1980).
  Notez que TERM veut dire "terminaison" (caractère) et non "terminal".












































  Configuration du terminal WYSE 99-GT telle qu'utilisée à 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 caractères "T" séparés par 8 points.
      Sinon, appuyez sur backspace.
  F8 F/KEYS: Vous ne verrez normalement pas de définition pour les touches de
      fonction ici (sauf si quelqu'un les a définies et sauvées). Ceci veut
      dire qu'elles génèreront normalement leurs valeurs par défaut (pas
      affichées ici). <ctrl><F5> montre la "définition par l'utilisateur" de la
      touche F5, etc.  F9 A/BACK: Normally not defined: ANSWERBACK =
  F10 EXIT: La sélection de "DEFAULT ALL" rendra les paramètres par défaut
      définis 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.

  2222..55..22..  WWyyssee 115500


  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
  Makarévitch <mailto:nat@nataa.fr.eu.org>
  v3.6, Juin 1998

  Ce document contient ces astuces et réglages difficiles à trouver qui
  rendent Linux un peu plus sympathique.
  ______________________________________________________________________

  Table des matières


  1. Introduction

  2. Astuces simples

     2.1 Un truc pratique pour syslog.
     2.2 Un script pour afficher les HOWTO compactés.
     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 Déplacement de répertoires inter partitions Linux (filesystems).
     2.7 Trouver les plus gros répertoires.
     2.8 La Linux Gazette.
     2.9 Indication permettant de résoudre le problème posé par le VPATH du GNU make version 3.7.
     2.10 Comment interdire à ma machine de lancer fsck après chaque démarrage ?
     2.11 Comment éviter les lancements de fsck, au boot, dûs 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 Méthode permettant de rechercher des expressions rationnelles dans des fichiers.
     2.15 Un script pour faire le ménage derrière les      programmes qui créent des fichiers de sauvegarde.
     2.16 Comment trouver le processus qui occupe le plus de      mémoire.
     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      démarrage d'une Red Hat ?
     2.20 Comment configurer une Red Hat pour avoir
     2.21 Comment trouver quelle bibliothèque de /usr/lib      contient une fonction donnée ?
     2.22 J'ai compilé un petit programme en C, mais quand je le      lance, je ne vois aucun résultat !

  3. Astuces détaillées

     3.1 Linux et Windows peuvent utiliser une même partition pour le swap !
     3.2 Récupération de fichiers effacés.
     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 répertoire en      minuscules.
     3.6 Mise à jour de Sendmail.
     3.7 Quelques astuces pour les administrateurs système      débutants.
     3.8 Comment configurer


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  Ce document est le LLiinnuuxx AAssttuucceess HHOOWWTTOO (titre original : LLiinnuuxx TTiippss
  HHOOWWTTOO), une liste de trucs et d'optimisations bien pratiques, qui
  contribuent à rendre Linux plus agréable. Tout ce qui est ici sort ou
  bien de ma tête, ou bien de l'ancien Astuces HOWTO (après tout,
  pourquoi enlever des astuces qui marchent ?) Alors envoyez-moi vos
  astuces préférées (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



  22..  AAssttuucceess ssiimmpplleess

  22..11..  UUnn ttrruucc pprraattiiqquuee ppoouurr ssyysslloogg.. PPaauull AAnnddeerrssoonn,, rrééddaacctteeuurr       dduu
  LLiinnuuxx AAssttuucceess HHOOWWTTOO ..

  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.



  22..22..  UUnn ssccrriipptt ppoouurr aaffffiicchheerr lleess HHOOWWTTOO ccoommppaaccttééss.. DDiiddiieerr       JJuuggeess,,
  ddjj@@ddeessttiinn..nnffddss..nneett ..

  De débutant à débutant, voici un petit script qui facilite la lectures
  des howto. Mes howto sont dans /usr/doc/faq/howto/ et sont compressés
  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 première partie du nom du fichier (avant
  le trait d'union), il décompacte le document (en laissant l'original
  intact) et l'affiche à l'écran.

  Par exemple, pour afficher le document Serial-HOWTO.gz, tapez :


       $ howto serial






  22..33..  zzoocckkii@@ggoollddffiisshh..ccuubbee..nneett ..  RReessttee--tt--iill aasssseezz ddee ppllaaccee lliibbrree ??
  HHaannss ZZooeebbeelleeiinn,,


  Voici un script qui vérifie à intervalles réguliers qu'il reste de la
  place sur tout ce qui est monté (disques durs, CDROM, disquettes...)

  En cas de pénurie d'espace libre, un message est affiché à l'écran
  toutes les X secondes et un courrier électronique est envoyé pour
  chaque périphérique qui déborde.




























































  ______________________________________________________________________
  #!/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 mystérieux 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, désolé
  # mais je vous avais prévenu: c'est votre problème
  # Si vous savez vraiment vous servir de sed, excusez moi :)
  #

  #
  # Lancez-le et vous pouvez l'oublier: mettez "check_hdspace &"
  # dans rc.local. Il vérifie l'espace libre toutes les
  # $SLEEPTIME secondes. Vous pouvez même surveiller vos
  # disquettes et vos bandes.  :)
  # Si l'espace libre est inférieur à $MINFREE (Ko),
  # le script va afficher un message d'avertissement et envoyer un
  # courrier à $MAIL_TO_ME pour chaque périphérique
  # concerné. Dès qu'il y a à nouveau plus de place
  # libre que la limite, le système d'envoi de courrier est
  # réamorcé.
  #

  # RESTE À FAIRE:
  # Des $MINFREE différents pour chaque périphérique
  # Nettoyer les répertoires /*tmp des vieilleries en cas de
  #           pénurie d'espace.


  DEVICES='/dev/sda2 /dev/sda8 /dev/sda9' # vos disques
  MINFREE=20480                           # la limite
  SLEEPTIME=10                            # secondes entre deux vérifications
  MAIL_TO_ME='root@localhost'             # la personne à avertir


  # ------- rien à changer en dessous (j'espère :) -------

  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
  ______________________________________________________________________







  22..44..  ((llooggss)).. PPaauull AAnnddeerrssoonn,, rrééddaacctteeuurr dduu LLiinnuuxx AAssttuucceess HHOOWWTTOO ..  UUnn
  uuttiilliittaaiirree ppoouurr nneettttooyyeerr vvooss ffiicchhiieerrss jjoouurrnnaauuxx

  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 très simple à installer (il faut bien sûr lire le contenu du
  répertoire doc). Une fois le paquetage installé, rajoutez une entrée à
  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 appréciez son logiciel :)



  22..55..  ccoorree .. OOttttoo HHaammmmeerrssmmiitthh ..  UUnn ssccrriipptt pprraattiiqquuee ppoouurr nneettttooyyeerr lleess
  ffiicchhiieerrss

  Créez 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 réguliers.



  22..66..  DDééppllaacceemmeenntt ddee rrééppeerrttooiirreess iinntteerr ppaarrttiittiioonnss LLiinnuuxx ((ffiilleessyysstteemmss))..
  AAllaann CCooxx,,  AA..CCooxx@@sswwaannsseeaa..aacc..uukk ..



       (cd /répertoire_source && tar cf - . ) | (cd /répertoire_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 rédacteur ]



  22..77..  TTrroouuvveerr lleess pplluuss ggrrooss rrééppeerrttooiirreess.. MMiicckk GGhhaazzeeyy ..

  Vous vous êtes déjà demandé quels étaient les plus gros répertoires
  sur votre machine ?  Voici une façon de les trouver.



       du -S | sort -n






  22..88..  LLaa LLiinnuuxx GGaazzeettttee..

  Bravo et merci à John Fisk, le créateur de la Linux Gazette. C'est un
  excellent magazine en ligne, qui plus est GGRRAATTUUIITT !! Que demander de
  plus ? Vous pouvez le trouver à l'adresse :




  http://www.linuxgazette.com




  Au fait, il s'avère que (1) la LG est maintenant mensuelle et (2) elle
  n'est plus maintenue par John Fisk, mais par l'équipe de SSC.



  22..99..  IInnddiiccaattiioonn ppeerrmmeettttaanntt ddee rrééssoouuddrree llee pprroobbllèèmmee ppoosséé ppaarr llee VVPPAATTHH
  dduu GGNNUU mmaakkee vveerrssiioonn 33..77.. TTeedd SStteerrnn,,  sstteerrnn@@aammaatthh..wwaasshhiinnggttoonn..eedduu ..

  J'ignore si ce problème concerne de nombreux utilisateurs mais l'une
  des caractéristiques de la version 3.7 du GNU make ne m'enthousiasme
  pas. Il s'agit du comportement d'un VPATH sur répertoire absolu. Un
  robuste patch corrige cela, vous pourrez l'obtenir auprès de Paul D.
  Smith <psmith@wellfleet.com>  (-- Veuillez rédiger votre courrier en
  anglais !  NDT--) .  Ce dernier poste dans le groupe gnu.utils.bug un
  article contenant ce patch et sa documentation après parution de
  chaque nouvelle version du GNU make.  En ce qui me concerne... il est
  installé sur tous les systèmes auxquels j'ai accès !



  22..1100..  CCoommmmeenntt iinntteerrddiirree àà mmaa mmaacchhiinnee ddee llaanncceerr ffsscckk aapprrèèss cchhaaqquuee
  ddéémmaarrrraaggee ?? DDaallee LLuuttzz,,  ddaall@@wwiimmsseeyy..ccoomm ..

  Réponse : Après recompilation du noyau le système de fichiers est
  considéré comme non vérifié ("marked as dirty"), ce qui implique que
  fsck sera mis en action lors de chaque démarrage. Pour éviter cela
  lancer :


       rdev -R /zImage 1




  Cela modifie le noyau qui, dès lors, considère que le système 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).



  22..1111..  CCoommmmeenntt éévviitteerr lleess llaanncceemmeennttss ddee ffsscckk,, aauu bboooott,, ddûûss aauu ""ddeevviiccee
  bbuussyy"" ?? JJoonn TToommbbss,,  jjoonn@@ggtteexx0022..uuss..eess ..

  Si votre système connaìt de fréquentes erreurs de type "device busy"
  au démarrage qui laissent le système 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 systèmes de fichiers montés, 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
  démonter les partitions ces dernières seront malgré tout considérées
  comme saines lors du redémarrage.  Cette astuce a considérablement
  écourté le temps de démarrage de mon système !



  22..1122..  dduurr.. SSiimmoonn AAmmoorr,,  ssiimmoonn@@ffoooobbaarr..ccoo..uukk ..  CCoommmmeenntt ttrroouuvveerr lleess
  pplluuss ggrrooss ffiicchhiieerrss ssuurr vvoottrree ddiissqquuee



       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






  22..1133..  CCoommmmeenntt iimmpprriimmeerr ssuurr ddeess ppaaggeess aavveecc mmaarrggeess ?? MMiikkee DDiicckkeeyy,,
  mmddiicckkeeyy@@tthhoorrpplluuss..lliibb..ppuurrdduuee..eedduu ..



       ______________________________________________________________________
               #!/bin/sh
               # /usr/local/bin/print
               # Une simple sortie formatée pour permettre de
               # perforer les feuilles afin de les mettre dans un classeur

               cat $1 | pr -t -o 5 -w 85 | lpr
       ______________________________________________________________________






  22..1144..  MMéétthhooddee ppeerrmmeettttaanntt ddee rreecchheerrcchheerr ddeess eexxpprreessssiioonnss rraattiioonnnneelllleess
  ddaannss ddeess ffiicchhiieerrss.. RRaauull DDeelluutthh MMiilllleerr,,  rroocckkwweellll@@nnoovvaa..uummdd..eedduu ..

  Je désigne, 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 "$@"
  ______________________________________________________________________






  22..1155..  pprrooggrraammmmeess qquuii ccrrééeenntt ddeess ffiicchhiieerrss ddee ssaauuvveeggaarrddee..  UUnn ssccrriipptt
  ppoouurr ffaaiirree llee mméénnaaggee ddeerrrriièèrree lleess

  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 système, 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 {} \;
       ______________________________________________________________________






  22..1166..  mméémmooiirree.. SSiimmoonn AAmmoorr ..  CCoommmmeenntt ttrroouuvveerr llee pprroocceessssuuss qquuii ooccccuuppee
  llee pplluuss ddee



       ps -aux | sort +4n




  -OU-


       ps -aux | sort +5n








  22..1177..  AAnnddeerrssoonn,, rrééddaacctteeuurr dduu LLiinnuuxx AAssttuucceess HHOOWWTTOO ..  CCoonnffiigguurraattiioonn ddee
  vvii  ppoouurr llaa pprrooggrraammmmaattiioonn eenn CC.. PPaauull

  Je passe beaucoup de temps à programmer en C, et j'ai pris le temps de
  configurer vi pour me faciliter la tâche. 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 première ligne indentée, shiftwidth
  impose une taille de 4 espaces pour ^T, backspace configure la touche
  d'espacement arrière, et ruler force l'affichage des numéros de
  lignes. Notez que pour placer le curseur sur une ligne donnée, par
  exemple la ligne 20, vous pouvez utiliser :



       vi +20 monfichier.c






  22..1188..  UUttiilliissaattiioonn ddee ccttaaggss ppoouurr ffaacciilliitteerr llaa pprrooggrraammmmaattiioonn

  Beaucoup de bidouilleurs ont déjà ctags sur leur machine, mais ne s'en
  servent pas. Cela peut être très pratique pour éditer des fonctions
  spécifiques. Supposez que vous avez une fonction dans l'un des
  nombreux fichiers sources contenus dans un répertoire 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 très pratique. Quand vous le
  lancez, ctags crée un fichier nommé tags dans le répertoire 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
  début de la fonction.



  22..1199..  ddéémmaarrrraaggee dd''uunnee RReedd HHaatt ?? PPaauull AAnnddeerrssoonn ..  PPoouurrqquuooii sseennddmmaaiill ssee
  bbllooqquuee--tt--iill ppeennddaanntt 55 mmiinnuutteess aauu

  C'est un problème 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 réparer ça vous-même. Si vous regardez dans votre fichier
  /etc/hosts, vous allez trouver quelque chose qui ressemble à ça :



       127.0.0.1        localhost        votremachine




  Quand sendmail démarre, 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 problème est très facile : éditez votre
  fichier /etc/hosts et mettez-y quelque chose comme ça :



       127.0.0.1        localhost
       10.56.142.1      votremachine






  22..2200..  PPaauull AAnnddeerrssoonn,,  ppaauull@@ggeeeekkyy11..eebbtteecchh..nneett ..  CCoommmmeenntt ccoonnffiigguurreerr
  uunnee RReedd HHaatt ppoouurr aavvooiirr llss  eenn ccoouulleeuurrss??

  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 défaut. Voici une façon d'arranger ça.

  Commencez par taper eval `DIRCOLORS`

  Puis alias ls='ls --color=auto'

  Enfin, mettez la ligne "alias ....." dans votre /etc/bashrc.



  22..2211..  ccoonnttiieenntt uunnee ffoonnccttiioonn ddoonnnnééee ?? PPaawweell VVeesseellooww ..  CCoommmmeenntt ttrroouuvveerr
  qquueellllee bbiibblliiootthhèèqquuee ddee //uussrr//lliibb

  Vous êtes en train de compiler un programme et vous avez oublié de
  lier une bibliothèque nécessaire? 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.



  22..2222..  llaannccee,, jjee nnee vvooiiss aauuccuunn rrééssuullttaatt !!  JJ''aaii ccoommppiilléé uunn ppeettiitt pprroo­­
  ggrraammmmee eenn CC,, mmaaiiss qquuaanndd jjee llee

  Vous avez compilé le programme et créé un programme appelé test, non?
  Linux a déjà un programme test, qui teste si une certaine condition
  est vraie et qui n'affiche aucun résultat à l'écran. Pour lancer votre
  programme test, tapez ./test.



  33..  AAssttuucceess ddééttaaiillllééeess

  33..11..  LLiinnuuxx eett WWiinnddoowwss ppeeuuvveenntt uuttiilliisseerr uunnee mmêêmmee ppaarrttiittiioonn ppoouurr llee
  sswwaapp !! TToonnyy AAcceerroo,,  aaccee33@@mmiiddwwaayy..uucchhiiccaaggoo..eedduu ..


  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 complètement "vide" pour faciliter son compactage.

  2. Démarrer Linux et sauver ce fichier dans un fichier.  Exemple (cas
     d'une partition de "swap" commun nommée /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 préparer et
     installer la partition de swap lorsqu'elle est employée 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 destinée à cette partiton de swap dans le fichier
  /etc/fstab

  5.  Si les programmes init et shutdown employés 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 déterminé que
  rien ne sert d'en écrire davantage !

  >>  Quels sont les avantages et inconvénients de cette méthode ?

  Avantages : gain d'espace disponible sur le disque !

  Inconvénients : si l'étape de restauration du fichier d'échange
  Windows n'est pas automatique il ne faudra pas négliger, sous Linux et
  avant chaque redémarrage "vers" Windows, de lancer les commandes
  chargées de cette remise en place.



  33..22..  RRééccuuppéérraattiioonn ddee ffiicchhiieerrss eeffffaaccééss.. MMiicchhaaeell HHaammiillttoonn,,
  mmiicchhaaeell@@aaccttrriixx..ggeenn..nnzz ..

  Voici une astuce dont j'ai eu besoin à quelques reprises.

  La récupération d'un fichier texte par une personne désespérée.

  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, récemment, j'ai effacé un courrier électronique par
  accident. J'ai immédiatement 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 système en mode
  mono-utilisateur et démonter le système 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'après 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 extrêmement 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 Entrée. 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
  déjà arrivé d'utiliser -3000 pour être sûr de réperer 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 résultat.



         strings /tmp/x | less




  Effectivement, le message était là.

  Cette méthode peut ne pas être efficace si tout ou partie de l'espace
  disque a déjà été réutilisé.

  Cette astuce n'est probablement utilisable que sur un système mono-
  utilisateur. Sur un système multi-utilisateurs avec beaucoup
  d'activité sur les disques, l'emplacement que vous avez libéré peut
  très bien déjà avoir été réutilisé. Et pour la plupart nous ne pouvons
  pas nous permettre d'enlever la machine de sous les pieds de nos
  utilisateurs dès que nous avons besoin de récupérer un fichier.

  Sur mon système personnel, cette astuce a été bien pratique à environ
  trois occasions ces quelques dernières années - généralement après que
  j'ai détruit accidentellement une partie de mon travail du jour. Si ce
  que je fais survit assez longtemps pour progresser de façon
  significative, je le sauvegarde sur une disquette, donc je n'ai pas
  souvent besoin de ce truc.



  33..33..  DDeennnniiss,,  jjaaddeessttaarr@@rraahhuull..nneett ..  CCoommmmeenntt uuttiilliisseerr llee mmaarrqquueeuurr
  dd''iimmmmuuttaabbiilliittéé.. JJiimm

  Utilisez le marqueur d'immutabilité.

  Juste après avoir installé et configuré votre système, faites un tour
  dans /bin, /sbin, /usr/bin, /usr/sbin, /usr/lib et autres, et
  n'hésitez 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
  récursion). (Vous pouvez aussi vous contenter de /etc/.dist.tar.gz).
  Et placez-y un marqueur d'immutabilité.

  Tout cela sert à limiter les dégâts que vous pouvez faire en tant que
  root. Vous éviterez ainsi d'écraser des fichiers avec une redirection
  mal contrôlée, et vous ne risquez pas de rendre le système
  inutilisable à cause d'une espace mal placée dans une commande "rm
  -fr" ; vous pouvez toujours faire très mal à vos données, mais vos
  binaires et vos bibliothèques seront à l'abri.

  De plus, cela prévient, ou du moins complique, l'exploitation d'un
  certain nombre de trous de sécurité ; 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 inconvénient se présente à l'installation de divers logiciels
  système. D'un autre côté, ça empêche 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 écrasés (et aux
  répertoires 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 déplacer vos anciens binaires,
  bibliothèques et autres dans un répertoire .old/, les renommer, les
  archiver ou autre.



  33..44..  qquuee vvoouuss rraajjoouutteezz..  UUnnee ssuuggggeessttiioonn qquuaanntt àà ll''eennddrrooiitt ooùù mmeettttrree
  ccee

  Tout ce que vous rajoutez doit se trouver sous /usr/local ou
  /usr/local/`hostname`!

  Si votre distribution laisse /usr/local vide, créez /usr/local/src,
  /usr/local/bin, etc. et utilisez-les. Si votre distribution met des
  choses dans /usr/local, créez /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 hiérarchie locale. Si quelque chose
  *doit obligatoirement* être installé dans /bin ou /usr/bin ou autre,
  créez un lien symbolique depuis la hiérarchie locale vers tout ce qui
  est installé ailleurs.

  La raison de tout ça, même si ça représente plus de travail, est que
  ça permet de trouver facilement ce qui doit être sauvegardé et
  réinstallé en cas de réinstallation complète depuis le média de
  distribution (habituellement un CD à l'heure actuelle). En utilisant
  un répertoire /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'avérer critique pour suivre les listes d'annonces
  de sécurité.

  Un de mes systèmes personnels (celui que j'utilise) a été monté avant
  que je n'applique moi-même cette politique. Je ne "sais" toujours pas
  en quoi il diffère du système de base "tel qu'installé". Et cela bien
  que je n'ai changé que très peu de choses quant à sa configuration et
  que je suis le *seul* à l'utiliser.

  A contrario, tous les systèmes que j'ai mis en place au travail (où
  j'ai été bombardé administrateur système) ont été configurés de cette
  façon. Ils ont été administrés par plusieurs personnes extérieures et
  autres membres du département informatique, et ils ont subi de
  nombreuses mises à jour et installations de logiciels. Pourtant, j'ai
  une idée très précise de ce qui a été rajouté *après* l'installation
  et la configuration initiales.



  33..55..  mmiinnuussccuulleess.. JJuussttiinn DDoosssseeyy,,  ddoosssseeyy@@oouu..eedduu ..  CCoonnvveerrssiioonn ddee ttoouuss
  lleess ffiicchhiieerrss dd''uunn rrééppeerrttooiirree eenn

  J'ai remarqué quelques procédures difficiles ou superflues
  recommandées dans les trucs et astuces du numéro 12  (-- NdT :
  Apparemment, cette section est tirée 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 répertoire
                # courant en minuscules
                # n'affecte que les fichiers, pas les sous-répertoires
                # 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 plutôt 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 façon 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 dernière étape.
  Rebooter ? J'espère qu'il ne reboote pas à chaque fois qu'il supprime
  un utilisateur. Les deux premières étapes suffisent. De toutes façons,
  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 classée, passons au mot de passe de root oublié.

  La solution donnée dans la Gazette est la plus universelle, mais pas
  la plus facile. Aussi bien avec LILO qu'avec Loadlin, le paramètre
  "single" permet de lancer directement le shell par défaut au
  démarrage, sans entrer de login ni de mot de passe. À partir de là, il
  suffit de changer ou d'enlever le mot de passe problématique, avant de
  taper "init 3" pour passer en mode multi-utilisateurs. De cette façon,
  un seul reboot ; de l'autre, deux reboots.

  Justin Dossey.



  33..66..  ppaauull@@ggeeeekkyy11..eebbtteecchh..nneett MMiissee àà jjoouurr ddee SSeennddmmaaiill.. PPaauull AAnnddeerrssoonn,,

  Nous partons d'une source propre. Commencez par vous procurer le code
  source de sendmail. J'ai téléchargé la version 8.9.0, qui est comme
  vous pouvez le voir à la pointe du progrès. Je l'ai récupérée depuis
  ftp.sendmail.org:/pub/sendmail/sendmail-8.9.0.tar.gz

  Il pèse à peu près un méga-octet, et sachant que j'utilise la version
  8.7.6, je crois que ça vaut le coût. Si ça marche, vous en entendrez
  sûrement parler ; sinon, je n'aurai plus de courrier et je ne pourrai
  pas distribuer la nouvelle version de ce HOWTO :)

  Maintenant que vous avez téléchargé le source, décompactez-le. Cela va
  créer un sous-répertoire sendmail-8.9.0 dans le répertoire courant.
  Placez-vous dans ce sous-répertoire et lisez les fichiers README et
  RELEASE_NOTES (et soyez époustouflé par toutes les améliorations
  qu'ils ont apportées). 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-même 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 système, 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 défaut dans /usr/include/db,
  au lieu de /usr/include où sendmail espère le trouver. Placez-vous
  successivement dans les sous-répertoires 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 installée !  Bien sûr, ça suppose que
  vous avez déjà votre configuration d'origine. Pour que tout marche
  bien sur mon système, comme j'héberge des listes de diffusion
  gratuites utilisant majordomo, j'ai ajouté la ligne suivante au début
  de mon /etc/sendmail.cf :



       ______________________________________________________________________
       O DontBlameSendmail=forwardfileinunsafedirpath, forwardfileinunsafedirpathsafe
       ______________________________________________________________________




  Sendmail 8.9.0 est à l'heure actuelle plutôt bavard à propos des
  permissions des répertoires et des fichiers, et il va se plaindre à
  propos des répertoires et des fichiers qui autorisent l'accès 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 sécurité mineur n'était en fait pas gênant. C'est vous qui
  voyez.



  33..77..  ddéébbuuttaannttss.. JJiimm DDeennnniiss,,  jjaaddeessttaarr@@rraahhuull..nneett QQuueellqquueess aassttuucceess ppoouurr
  lleess aaddmmiinniissttrraatteeuurrss ssyyssttèèmmee

  Créez 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 rédacteur ]

  Absolument, à compter du _p_r_e_m_i_e_r _j_o_u_r de l'administration d'un
  système, prenez des notes dans un fichier journal. Vous pouvez mettre
  "vi /README.$(hostname)" sur une ligne du fichier .bash_logout de
  root. Une autre façon 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 tapée pour créer une trace de la session et crée
  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'idée (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-même. Je pense qu'il va falloir que je me procure les
  sources et que je rajoute une paire de paramètres (pour arrêter
  l'enregistrement du script depuis la ligne de commandes) avant de me
  mettre à utiliser ça.

  Ma dernière 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 tapée avec un chemin d'accès explicite.

  De cette façon, toute personne utilisant le compte root se rend compte
  (parfois douloureusement) à quel point elle fait confiance aux
  binaires. L'administrateur avisé d'un système multi-utilisateurs va en
  plus parcourir régulièrement son répertoire ~/bin et ses fichiers
  ~/.*history pour y chercher des répétitions et des moyens de les
  contourner.

  L'administrateur vraiment motivé va repérer les enchaînements qui
  peuvent être automatisés, les endroits où des vérifications peuvent
  être ajoutées, et les tâches pour lesquelles les privilèges de root
  peuvent être abandonnées (comme lancer un éditeur, un agent de
  transport de courrier électronique ou autre gros programme pouvant
  exécuter des scripts qui *pourraient* être inclus dans des fichiers de
  données - comme vi (./.exrc) ou emacs (./.emacs) ou même, plus
  insidieux, $EXINIT et les macros contenues au début ou à la fin des
  documents). Bien sûr, les commandes de ce genre peuvent être lancées
  avec quelque chose comme ça :



                       cp $données $répertoire_utilisateur/tmp
                       su -c $commande_d_origine $paramètres
                       cp $répertoire_utilisateur/tmp $données




  (... où les détails dépendent de la commande).

  Ces dernières précautions sont pour la plupart superflues pour la
  machine personnelle ou la station "mono-utilisateur". Mais elles
  représentent une très bonne manière d'administrer un gros système
  multi-utilisateurs, particulièrement dans le cas d'un accès public
  (comme les machines de netcom).



  33..88..  CCoommmmeenntt ccoonnffiigguurreerr xxddmm  ppoouurr qquu''iill ppeerrmmeettttee ddee cchhooiissiirr llee
  ssyyssttèèmmee hhôôttee ?? AArrrriiggoo TTrriiuullzzii,,  aa..ttrriiuullzzii@@iicc..aacc..uukk ..


  1. Modifier le  fichier lançant xdm lors du démarrage (probablement
     nommé /etc/rc/rc.6 ou /etc/rc.local) de façon 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 système... tout doit fonctionner !

  J'ajoute cette section après avoir sué une semaine durant sur ce
  problème !

  Attention : certaines anciennes versions de la distribution SLS
  (1.1.1) exigent qu'un paramètre "-nodaemon" accompagne l'invocation
  d'xdm.  Les version ultérieures ne présentent PPAASS cette
  caractéristique.






















































  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

  11..  _U_m_s_d_o_s :: PPrreesseennttaattiioonn

  11..11..  HHiissttoorriiqquuee

  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.

  11..22..  DDiissppoonniibbiilliittee

  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).

  11..33..  DDiissttrriibbuuttiioonnss llee ssuuppppoorrttaanntt

  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 !)

  11..44..  SSiittee dd''aaccccuueeiill

  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.

  11..55..  DDooccuummeennttaattiioonn tteecchhnniiqquuee

  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.

  11..66..  LL''aauutteeuurr

  Jacques Gelinas jacques@solucorp.qc.ca

  22..  _U_m_s_d_o_s ccoommmmee ppaarrttiittiioonn pprriinncciippaallee

  22..11..  LLee ccoonncceepptt ppsseeuuddoo--rraacciinnee

  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.

  22..22..  CCee qquu''iill ffaauutt ssaavvooiirr aa pprrooppooss dduu mmooddee ppsseeuuddoo--rraacciinnee

  +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.

  33..  DDiiffffeerreenntteess rreemmaarrqquueess aauu ssuujjeett dduu ffoonnccttiioonnnneemmeenntt ddee _U_m_s_d_o_s

  33..11..  OOppttiioonn ddee mmoouunntt

  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.

  33..22..   CCoommmmeenntt  ddeetteerrmmiinneerr  lleess  vvaalleeuurrss  ppaarr ddeeffaauutt ppoouurr llaa ppaarrttiittiioonn
  pprriinncciippaallee

  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 /

  33..33..  SSwwaappppeerr oouu nnee ppaass sswwaappppeerr

  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.)

  44..  CCoommmmeenntt ddeemmaarrrreerr uunn ssyysstteemmee _U_m_s_d_o_s

  44..11..  LLooaaddlliinn

  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.

  44..22..  AA ppaarrttiirr dd''uunnee ddiissqquueettttee

  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:

  44..33..  LLIILLOO

  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.

  44..44..  CCoommmmeenntt ddeeffrraaggmmeenntteerr uunnee ppaarrttiittiioonn _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.

  44..55..  AAssttuucceess aavvaanncceeeess

  _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.

  55..  PPrriinncciippee ddee bbaassee

  55..11..  IInnttrroodduuccttiioonn

  _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-.---.

  55..22..  _U_m_s_d_o_s ppeeuutt rreemmppllaacceerr llee ssyysstteemmee ddee ffiicchhiieerrss _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.

  _?_?_?

  55..33..  PPrroommoouuvvooiirr uunn rreeppeerrttooiirree

  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.

  55..44..  CCoommmmeenntt pprroommoouuvvooiirr //ssbbiinn//uummssssyynncc

  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.

  55..55..  UUttiilliisseerr //ssbbiinn//uummssssyynncc 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.

  55..66..  CCoommmmeenntt ddee--pprroommoouuvvooiirr

  Effacez le fichier --linux-.--- en utilisant _D_O_S.

  55..77..  AA pprrooppooss ddeess ffiicchhiieerrss ccrreeeess lloorrss dd''uunnee sseessssiioonn _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).

  66..  ((DDeess--))IInnssttaallllaattiioonn eett qquueellqquueess aassttuucceess

  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.

  66..11..  LLaa ppsseeuuddoo--rraacciinnee //mmnntt//lliinnuuxx

  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.

  66..22..  PPrreeppaarreerr llee rreeppeerrttooiirree //mmnntt//lliinnuuxx

  /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 !

  66..33..  VVeerriiffiieerr qquuee //mmnntt//lliinnuuxx 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.

  66..44..  OOooppss rreelleeaassiinngg ppsseeuuddoo rroooott ......

  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.

  66..55..  CCoommmmeenntt ddeessiinnssttaalllleerr uunn ssyysstteemmee _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.

  66..66..  DDeeppllaacceerr uunn ssyysstteemmee _U_m_s_d_o_s vveerrss uunn aauuttrree lleecctteeuurr _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.

  66..77..  IInnssttaalllleerr 5500 ssyysstteemmeess _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".

  77..  CCoonnffiigguurreerr uunnee sseeccttiioonn _L_i_n_u_x ddaannss uunnee ppaarrttiittiioonn _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.

  88..  PPoouurrqquuooii _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.

  88..11..  LLee bbuutt ddee _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.

  88..22..  QQuuii eenn aa bbeessooiinn ??

  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.

  88..33..  PPeerrffoorrmmaanncceess

  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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  CCoonnttrriibbuutteeuurrss

  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.

  11..22..  AAvveerrttiisssseemmeenntt iimmppoorrttaanntt

  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.

  11..33..  AAuuttrreess ddooccuummeennttss

  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.

  22..  NNoottee iimmppoorrttaannttee ccoonncceerrnnaanntt ll''oobbssoolleesscceennccee ddeess iinnffoorrmmaattiioonnss

  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 ttrreess iimmppoorrttaanntteess 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).--)

  33..  OOnndduulleeuurr bbeettee,, oonndduulleeuurr iinntteelllliiggeenntt

  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.

     OOnndduulleeuurr ""bbeettee""

     +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.

     OOnndduulleeuurr ""iinntteelllliiggeenntt""

     +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.

  44..  LLooggiicciieellss

  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) :

     EEnnhhaanncceedd AAPPCC BBaacckkUUPPSS..ttaarr..ggzz
        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.

     EEnnhhaanncceedd AAPPCC UUPPSSDD--vv11..44..ttaarr..ggzz
        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.

     EEnnhhaanncceedd AAPPCC UUPPSSDD--vv11..44..ttaarr..ggzz
        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.

     ssmmuuppssdd--00..99--11..ii338866..rrppmm

     ssmmuuppssdd--00..99--11..ssrrcc..rrppmm
        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.

     ggeennppoowweerr--11..00..11..ttggzz
        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.

     ppoowweerrdd--22..00..ttaarr..ggzz
        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.

     uuppssdd--11..00..ttggzz
        Un autre _p_o_w_e_r_d de remplacement.  Semble etre  assez  comparable
        en fonctionnalites avec powerd-2.0.tar.gz.

     cchheecckkuuppss..ttaarr
        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".

     bbeessttuuppss--00..99..ttaarr..ggzz
        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.

     LLaannSSaaffee IIIIII
        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).

     aappccuuppssdd--22..88..ttaarr..ggzz
        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.

     ssmmaarrttuuppss--11..11..ttggzz
        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.

     uuppss..ttaarr..ggzz
        Du fichier _._l_s_m :

        Programme  qui  interagit   avec   les   sauvegardes   batteries
        (onduleurs Powerbox).

     uussvvdd--22..00..00..ttggzz
        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.

  55..  FFaaiitteess--llee vvoouuss--mmeemmee

  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...

  55..11..  QQuuee ffaauutt--iill ffaaiirree ((ssoommmmaaiirreemmeenntt)) ??

  +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).

  55..22..  CCoommmmeenntt eesstt--ccee ssuuppppoossee ffoonnccttiioonnnneerr ??

     TTrraavvaaiill ddee ll''oonndduulleeuurr
        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.

     TTrraavvaaiill dduu ccaabbllee
        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)

     TTrraavvaaiill ddee ppoowweerrdd
        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.

     TTrraavvaaiill ddee iinniitt ((eenn pplluuss ddee ttoouutt ccee qquu''iill ffaaiitt ppaarr aaiilllleeuurrss))
        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.

  55..33..  CCoommmmeenntt ccoonnffiigguurreerr ttoouutt ccaa ??

  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  LLaa PPaarrttiiee DDeelliiccaattee..  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 !

  55..44..  AAmmeelliioorraattiioonnss UUttiilliissaatteeuurr

  +o  Bidouillez powerd.c pour surveiller la ligne  indiquant  un  faible
     niveau de batterie.  Dans ce cas, executez un shutdown iimmmmeeddiiaattee ;

  +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.

  66..  NNootteess ssuurr llee mmaatteerriieell

  66..11..  CCoommmmeenntt rreeaalliisseerr uunn ccaabbllee ??

  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'

  66..22..  AAnnaallyyssee ddee ccaabblleess eett mmooddiiffiiccaattiioonn ddee ppoowweerrdd..cc

  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);
  }
  ______________________________________________________________________

  66..33..  AAssssiiggnneemmeenntt ddeess bbrroocchheess dduu ppoorrtt sseerriiee

  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
  ______________________________________________________________________

  66..44..  CCoorrrreessppoonnddaannccee eennttrree iiooccttll eett RRSS223322

  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.

  77..  QQuuee ffaaiirree ssii ll''oonn nn''eenn ssoorrtt ppaass ??

  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

  88..  IInnffoorrmmaattiioonnss ssuurr uunn cceerrttaaiinn nnoommbbrree dd''oonndduulleeuurrss

  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.

  VVeeuuiilllleezz mm''eennvvooyyeerr vvooss eexxppeerriieenncceess ppoouurr lleess iinncclluurree iiccii..

  88..11..  EExxppeerriieenncceess ggeenneerraalleess..

  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.

     AAPPCC ::
        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.

     BBeesstt ::
        Serviables  et  aimables.   Fournissent  le  code  source  et la
        documentation pour les deux modes.

     TTrriipppp LLiittee ::
        Une personne a  dit  que  Tripp  ne  diffuserait  pas  non  plus
        d'information.

     UUppssoonniicc ::
        Quelqu'un  a  dit  qu'Upsonic a discute de details techniques au
        telephone, repondu aux questions par fax  et  est  serviable  en
        general.

  88..22..  AAddvviiccee 11220000 AA

  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 !)

  88..33..  nnaammee==""TTrruusstt EEnneerrggyy PPrrootteeccttoorr 440000//660000""

  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

     CCoonnnneexxiioonn PPCC--oonndduulleeuurr
        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.

     LLee ppoorrtt ddee ssiiggnnaauuxx ddee ll''oonndduulleeuurr
        L'assignement des broches du port de signaux DB-9 de  l'onduleur
        est le suivant, comme indique dans le manuel utilisateur :

        bbrroocchhee 22
           Ce  relais  est  ferme  lorsque le courant d'alimentation est
           coupe.

        bbrroocchhee 44
           Masse des broches 2 et 5.

        bbrroocchhee 55
           Ce relais est ferme lorsque  la  batterie  dispose  de  moins
           d'une minute et demi d'autonomie.

        bbrroocchhee 66
           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.

        bbrroocchhee 77
           Masse de la broche 6.

     llee ccaabbllee
        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.

     CCoommmmeenntt ffoonnccttiioonnnnee llee ccaabbllee ??
        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.

     llee ddaaeemmoonn ppoowweerrdd
        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.

     ccoommppiilleerr ppoowweerrdd
        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.

     CCoommmmeenntt ffoonnccttiioonnnnee ppoowweerrdd ??
        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 :

        EEttaatt 00 -- llee ccoouurraanntt eesstt bboonn
           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).

        EEttaatt 11 -- llee ccoouurraanntt eesstt ccoouuppee
           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.

        EEttaatt 22 -- llaa bbaatttteerriiee eesstt ffaaiibbllee
           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.

     UUttiilliisseerr ppoowweerrdd
        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.

     LLee ffiicchhiieerr iinniittttaabb eett lleess ssccrriippttss ddee sshhuuttddoowwnn
        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.

     MMooddiiffiiccaattiioonn ddee iinniittttaabb
        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

     LLeess ssccrriippttss
        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.

     LLee ssccrriipptt dd''aarrrreett ssyysstteemmee
        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

     RReemmaarrqquueess ggeenneerraalleess
        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 !

     RReettoouurr dd''iinnffoorrmmaattiioonnss
        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.

     IInnffoorrmmaattiioonnss lleeggaalleess
        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

     AAppppeennddiixx AA  --  CCooddee ssoouurrccee dduu ddaaeemmoonn ppoowweerrdd>>

          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);
     }

  88..44..  TTrruusstt UUPPSS 440000--AA

  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

     ddiissppoonniibbiilliittee
        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.

     ccaabbllee
        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.

     ccoonncclluussiioonn
        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

  88..55..  SSuussttaaiinneerr SS--4400aa

  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

     eennvviirroonnnneemmeenntt
        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.

     ccaabbllee

     +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-------------+
     --+--
      ---
       -

     ffiicchhiieerr uunniippoowweerrdd..hh

     /************************************************************************/
     /* 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                                           */
     /************************************************************************/

     ffiicchhiieerr ggeennppoowweerrdd..hh
        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}}

  88..66..  SSyysstteell

  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).

  88..77..  DDeelltteecc PPoowweerr,, FFiisskkaarrss PPoowweerr SSyysstteemmss eett EExxiiddee

  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.

  88..88..  OOnndduulleeuurr BBeeaavveerr mmooddeellee UUBB550000

  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.

  88..99..  SSeennddoomm

  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".

  88..1100..  BBeesstt

  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.

     BBeesstt FFoorrttrreessss aavveecc llee llooggiicciieell ddee BBeesstt
        Mini-Howto des onduleurs Best Power

        par Michael Stutz et http://dsl.org/m.

        Version 1.0, 14 aout 1997

  88..1100..11..  AAvveerrttiisssseemmeenntt

  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.

  88..1100..22..  IInnttrroodduuccttiioonn

  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.

  88..1100..33..  IInnssttaallllaattiioonn

  88..1100..33..11..  MMaatteerriieell

  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.

  88..1100..33..22..  LLooggiicciieell

  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 !

  88..1100..33..33..  CCoonncclluussiioonn

  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.

     BBeesstt FFoorrttrreessss LLII--995500

        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.

     BBeesstt FFeerrrruuppss

        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.

  88..1111..  GGPPSS11000000 dd''AACCCCOODDAATTAA

     >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

  88..1122..  TTrriippppLLiittee BBCC775500LLAANN ((SSttaannddbbyy UUPPSS))

  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

  88..1133..  AAPPCC

  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.

     BBaacckkuupp--UUPPSS

        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.

     UUnn mmeessssaaggee dd''aavveerrttiisssseemmeenntt

        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...

     BBUUPPSS--HHOOWWTTOO

        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.

        AAtttteennttiioonn !!

        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 */
     ___________________________________________________________________

     AAuuttrreess iinnffoorrmmaattiioonnss
        (-- (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.

     AAPPCC SSmmaarrtt--UUPPSS

        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  ccoonnttiinnuuee 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...

     AAPPCC SSmmaarrtt--UUPPSS 770000

        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 ;-).

     AAPPCC SSmmaarrtt--UUPPSS 11 440000

        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        #

  99..  CCoommmmeenntt eetteeiinnddrree dd''aauuttrreess mmaacchhiinneess ssuurr llee mmeemmee oonndduulleeuurr ??

  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.

  99..11..  MMeetthhooddee ddee ll''eettaatt dduu ppoorrtt

  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.

  99..22..  MMeetthhooddee dd''eemmiissssiioonn eenn ll''aaiirr

  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}}

  99..33..  MMeetthhooddee dduu ppsseeuuddoo--llooggiinn

  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.

  11..  IInnttrroodduuccttiioonn

  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.

  11..11..  MMiisseess aa jjoouurr ddee ccee ddooccuummeenntt

  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.

  11..22..  VVooss rreeaaccttiioonnss

  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.

  11..33..  IInnffoorrmmaattiioonnss lleeggaalleess

  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.

  11..44..  RReessppoonnssaabbiilliitteess

  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.

  11..55..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  11..55..11..  LLeess ddooccuummeennttss ""LLiinnuuxx HHOOWWTTOO""

  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).

  11..55..22..  UUSSEENNEETT

  Vous  trouverez  la  reponse  a la plupart des questions que vous vous
  posez a propos de UUCP dans comp.mail.uucp.

  11..55..33..  LLiisstteess ddee ddiiffffuussiioonn

  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

  11..55..44..  PPuubblliiccaattiioonnss

  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.

  11..66..  OOuu NNEE PPAASS rreecchheerrcchheerr ddee ll''aaiiddee

  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.

  22..  MMaatteerriieell nneecceessssaaiirree

  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.

  33..  CCoommmmeenntt ssee pprrooccuurreerr UUUUCCPP

  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.

  44..  IInnssttaallllaattiioonn ddeess pprrooggrraammmmeess

  (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.

  44..11..  EExxttrraaccttiioonn ddeess aarrcchhiivveess ccoommpprreesssseeeess

  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

  44..22..  EEddiittiioonn ddee  MMaakkeeffiillee..iinn ppoouurr ssppeecciiffiieerr lleess rreeppeerrttooiirreess dd''iinnssttaall--
  llaattiioonn..

  Ici, j'initialise prefix a /usr plutot que la  valeur  par  defaut  de
  /usr/local

  44..33..  LLaanncceerr ""ccoonnffiigguurree""

  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.

  44..44..  CCoonnffiigguurraattiioonn ddeess ooppttiioonnss dduu pprrooggrraammmmee

  44..44..11..  EExxaammiinneezz ccoonnff..hh et Makefile pour  verifier  qu'ils  sont  cor-
  rects.

  J'ai utilise les valeurs par defaut.

  44..44..22..  EEddiitteezz ppoolliiccyy..hh 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 )

  44..55..  CCoommppiillaattiioonn eett iinnssttaallllaattiioonn ddeess pprrooggrraammmmeess

  +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.

  44..66..  LLeess ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn

  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.

  44..77..  EEssssaayyeezz llaa cchhoossee......

  /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.

  44..88..  CCaa nnee mmaarrcchhee ppaass.. QQuuee ffaaiirree ??

  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.

  55..  QQuueessttiioonnss ffrreeqquueemmmmeenntt ppoosseeeess aa pprrooppooss dd''UUUUCCPP ssoouuss LLiinnuuxx

  55..11..  PPoouurrqquuooii mmoonn bbiinnaaiirree ddee uuuuccpp eesstt--iill ccoonnffiigguurree eenn mmooddee HHDDBB pplluuttoott
  qquu''eenn TTaayylloorr ??

  (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.

  55..22..  DD''oouu vviieennnneenntt cceess ttiimmeeoouutt 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 !

  55..33..  PPoouurrqquuooii ll''UUUUCCPP AAnnoonnyymmee sseemmbbllee nnee ppaass ffoonnccttiioonnnneerr eenn mmooddee HHDDBB  ??

  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.

  55..44..  QQuuee ssiiggnniiffiiee ll''eerrrreeuurr nnoo mmaattcchhiinngg ppoorrttss ffoouunndd ?

  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.

  55..55..  EExxiissttee--tt--iill ddee ""bboonnss"" ffiicchhiieerrss ddee ccoonnffiigguurraattiioonn ppoouurr llee mmooddee HHDDBB
  ??

  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
  #----------------------------------------------------------------------

  55..66..  FFaaiirree aappppeelleerr ddiiffffeerreennttss nnuummeerrooss ppoouurr uunn mmeemmee ssiittee ppaarr uuuucciiccoo

  La version 1.05 implemente l'option -z dans uucico, pour lui permettre
  d'appeler alternativement differents numeros de telephone pour un meme
  site.

  66..  RReemmeerrcciieemmeennttss

  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 système 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 présente
  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 réalisée. Reportez vous au site du LDP pour obtenir
  la dernière version.
  ______________________________________________________________________

  Table des matières


















































  1. Introduction

     1.1 Pourquoi Unicode ?
     1.2 Les encodages d'Unicode
        1.2.1 Notes pour les développeurs C/C++
     1.3 Liens

  2. Configuration de l'affichage

     2.1 La console Linux
     2.2 Fontes étrangères 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 données générales
     3.4 Les variables d'environnement locales
     3.5 Créer les fichiers pour le support des locales
     3.6 Ajouter le support pour la bibliothèque C
     3.7 Conversion des catalogues de messages

  4. Applications spécifiques.

     4.1 Le réseau
        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 bibliothèque libutf8
           5.1.1.3 La méthode Plan9
        5.1.2 Pour les interfaces utilisateur graphiques
        5.1.3 Pour la manipulation de texte avancée
        5.1.4 Pour la conversion
           5.1.4.1 L'implémentation iconv d'Ulrich Drepper, contenue dans la GNU glibc-2.2.1
           5.1.4.2 librecode par François Pinard
        5.1.5 Les autre approches
     5.2 Java
     5.3 Lisp
     5.4 Ada95


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  PPoouurrqquuooii UUnniiccooddee ??

  Les gens de différents pays utilisent différents caractères pour
  représenter 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 caractères 8-bits.  Ils
  peuvent donc traiter et afficher du texte correctement à condition
  qu'il soit représenté dans un jeu de caractères 8-bits, comme
  ISO-8859-1.

  Il y a bien plus de 256 caractères dans le monde - pensez au
  cyrillique, à l'hébreu, à l'arabe, au chinois, au japonais au coréen
  et au thaï -, et de temps à autres, de nouveaux caractères sont
  inventés. Les problèmes que cela induit pour les utilisateurs sont les
  suivants  :


  ·   Il est impossible de stocker du texte avec des jeux de caractères
     différents dans le même document. Par exemple, je peux citer des
     journaux russes dans une publication allemande ou française 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 caractères, et que la
     reconnaissance des jeux de caractères n'est pas automatique,
     l'intervention manuelle de l'utilisateur est inévitable. 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 codée en GB2312.

  ·  De nouveaux symboles comme l'Euro sont inventés. ISO a publié un
     nouveau standard ISO-8859-15 qui est en gros identique à
     ISO-8859-1, excepté qu'il supprime des caractères rarement
     utilisés, comme le vieux symbole monétaire, remplacé par le signe
     Euro.  Si les utilisateurs acceptent ce standard, ils auront des
     documents dans différents jeux de caractères sur leur disque, et
     cela deviendra une préoccupation quotidienne. Mais les ordinateurs
     devraient simplifier le choses, pas les compliquer.

  La solution à ce problème est l'adoption d'un jeu de caractères
  universel. Ce jeu de caractères 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).


  11..22..  LLeess eennccooddaaggeess dd''UUnniiccooddee

  Cela réduit le problème de l'utilisateur (devoir jongler entre
  différents jeux de caractères) à un problème technique : comment
  transporter les caractères 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é utilisée par les connexions
  réseau TCP/IP.  Cependant, l'utilisation d'un octet pour la
  représentation d'un caractère est un accident de l'histoire dû au fait
  que le développement de l'ordinateur commença en Europe et aux États-
  Unis, où l'on pensait que 96 caractères seraient suffisants pour
  longtemps.

  Il y a fondamentalement quatre façons d'encoder des caractères Unicode
  dans des octets :


     UUTTFF--88
        128 caractères sont encodés en utilisant 1 octet : les
        caractères ASCII.
        1920 caractères sont encodé en utilisant deux octets : le latin,
        le grec, le cyrillique, le copte, l'arménien, l'hébreu, les
        caractères arabes.
        63488 caractères sont encodés en utilisant 3 octets, le chinois
        et le japonais entre autres.
        Les 2147418112 caractères restant (non encore assignés) peuvent
        être encodés en utilisant 4, 5 ou 6 caractères.  Pour plus
        d'informations sur UTF-8, faites man 7 utf-8 (cette page est
        contenue dans le package ldpman-1.20).


     UUCCSS--22
        Chaque caractère est représenté par deux octets. Cet encodage
        peut représenter seulement les  65536 premiers caractères
        d'Unicode.


     UUTTFF--1166
        C'est une extension d'UTF-2 qui peut représenter 11144112
        caractères Unicode. Les 65536 premiers caractères sont
        représentés par deux octets, les autres par quatre.


     UUCCSS--44
        Chaque caractère est représenté par 4 octets.

  L'espace nécessaire pour encoder un texte, comparativement aux
  encodages actuellement en usage (8 bits par caractères pour les
  langues européennes, plus pour le chinois/japonais/coréen), est le
  suivant : (Cela a une influence sur l'espace disque, et la vitesse des
  communications réseau.


     UUTTFF--88
        Pas de changement pour l'ASCII américain, juste quelques
        pourcents supplémentaires  pour ISO-8859-1, 50 % de plus pour le
        chinois/japonais/coréen, 100 % de plus pour le grec et le
        cyrillique.


     UUCCSS--22 eett UUTTFF--1166
        Pas de changement pour le chinois/japonais/coréen, augmentation
        de 100 % pour l'US ASCII et ISO-8859-1, le grec et le
        cyrillique.


     UUCCSS--44
        Augmentation de 100% pour le chinois/japonais/coréen. De 300%
        pour l'US ASCII et ISO-8859-1, le grec et le cyrillique.


  Étant donné la pénalité pour les documents américains et européens,
  causée 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 prédominant au Japon.

  D'un autre côté UTF-8 a le potentiel pour une utilisation à large
  échelle, puisqu'il ne pénalise pas les utilisateurs américains et
  européens, et que beaucoup de logiciels de "traitement de texte"
  (NDT : au sens large) n'ont pas besoin d'être changés pour supporter
  UTF-8.
  Nous allons maintenant expliquer comment configurer votre système
  Linux pour qu'il utilise UTF-8 comme encodage de texte.


  11..22..11..  NNootteess ppoouurr lleess ddéévveellooppppeeuurrss CC//CC++++

  L'approche de Microsoft Win32 rend facile pour les développeurs la
  production de versions Unicode de leurs programmes : Vous définissez
  Unicode ("#define UNICODE") au début de votre programme, et changez
  alors un grand nombre d'occurrences de char en TCHAR jusqu'à ce que
  votre programme compile sans Warnings.  Le problèmes 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 représentation interne des nombre (``the endianness''). Le
  registre de systèmes de codage de caractères de la IANA dit à l'égard
  de ISO-10646-UCS-2 : "il faut spécifier l'ordre de la représentation
  interne des nombres à l'intérieur du réseau, le standard ne le
  spécifie pas". Cette représentation est "big endian" en contexte
  réseau, alors que Microsoft recommande dans ses outils de
  développement C/C++ d'utiliser une représention dépendante de la
  machine (c.a.d. "little endian" sur les processeurs ix86), et
  d'ajouter une marque de polarité (BOM) au début du document, ou
  d'utiliser des heuristiques basées sur la statistique.

  D'un autre côté l'approche de UTF-8 garde char* comme type standard
  pour le stockage des chaînes en C. Il en résulte que votre programme
  supportera l'US ASCII, indépendamment de toute variable
  d'environnement, et supportera les textes encodés en ISO-8859-1 et
  UTF-8 à condition que la variable d'environnement LANG soit
  positionnée en conséquence.


  11..33..  LLiieennss

  La liste de ressources de Markus Kuhn (mise à jour très
  régulièrement) :

  ·  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
     répertoire 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



  22..  CCoonnffiigguurraattiioonn ddee ll''aaffffiicchhaaggee

  Nous supposons que vous avez déjà 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 plaît, ne suivez
  pas le conseil  donné dans le Thai-HOWTO vous disant de faire croire
  que vous utilisez des caractères ISO-8859-1 (U0000..U00FF) alors que
  vous tapez des caractères Thai (U0E01..U0E5B). Faire cela ne vous
  causera que des problèmes lorsque vous passerez à Unicode.


  22..11..  LLaa ccoonnssoollee LLiinnuuxx

  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
  dépourvues 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 répertoire 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 interprétée comme de l'UTF-8. De plus, le clavier est mis
  en mode Unicode (voir "man kbd_mode"). Dans ce mode, les caractères
  Unicode tapés par Alt-x1...Alt-xn (où x1...xn sont les chiffres de
  pavé numérique) seront émis en UTF-8. Si votre clavier, ou plus
  précisément, votre keymap a des touches  correspondant à des
  caractères 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 caractères de différents
  alphabets sur le même é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'hébreu, 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 exécutez
  /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.





  22..22..  FFoonntteess ééttrraannggèèrreess ppoouurr XX1111

  N'hésitez pas à installer des fontes cyrilliques, chinoises,
  japonaises, etc. Même 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 étrangères si elles
  sont disponibles.

  Les programmes suivants sont utiles pour installer des fontes :

  ·  "mkfontdir répertoire" prépare un répertoire de fontes utilisables
     par le serveur X. Il doit être exécuté après avoir installé les
     fontes dans un répertoire.

  ·  "xset fp+ répertoire" ajoute un répertoire 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 exécuté après avoir appelé mkfontdir sur
     un répertoire qui est déjà contenu dans le chemin de fontes actuel
     du serveur X.

  ·  "xfontsel" vous permet de parcourir les fontes installées en
     filtrant selon les diverses propriétés des fontes.

  ·  "xlsfonts -fn motif-de-recherche" liste toutes les fontes qui
     correspondent à un motif de recherche. Il affiche aussi diverses
     propriétés des fontes. En particulier, "xlsfonts -ll -fn fonte"
     liste les propriétés de la fonte CHARSET_REGISTRY et
     CHARSET_ENCODING, qui ensemble déterminent 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
     séparé. 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é précédemment, elles sont utiles même si vous
     préférez XEmacs à GNU Emacs,  ou même si vous n'utilisez pas Emacs
     du tout.


  22..33..  LLeess ffoonntteess UUnniiccooddee ppoouurr XX1111

  Les applications qui souhaitent pouvoir afficher du texte utilisant
  différentes alphabets (comme le cyrillique et le grec) en même temps,
  peuvent le faire en utilisant les différentes fontes X pour chaque
  partie de texte.  C'est ce que font Netscape Communicator et Java.
  Cependant, cette approche est plus compliquée, 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 mêmes dimensions.


  ·  Markus Kuhn a assemblé des fontes à largeur fixe (fixed width) de
     75 dpi avec Unicode couvrant le latin, le grec, le cyrillique,
     l'arménien, le géorgien, l'hébreu, 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 nécessaire 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.
     Teléchargez unifont.hex.gz et hex2bdf depuis
     http://czyborra.com/unifont/ Elle n'est pas à largeur fixe : 8
     pixels de large pour les caractères européens, 16 pour les
     caractères 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'arménien, le géorgien, et
     l'hébreu.  ftp://ftp.x.org/contrib/fonts/etl-unicode.tar.gz.
     Utilisez le programme "bdftopcf" pour l'installer.


  22..44..  UUnniiccooddee xxtteerrmm

  xterm fait partie de X11R6 et XFree86,  mais il est maintenu
  séparément 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 caractères Unicode que
  l'application renvoie comme une séquence 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 exécutant "./configure -enable-wide-chars...",
     puis le compiler et l'installer.

  ·  Avoir une fonte Unicode à largeur fixe installée. 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 caractères grecs et cyrilliques.

  ·  Pour configurer xterm pour qu'il utilise le support UTF-8 dès 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 effacés 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 nécessaire,
     puisque "fixed" est la valeur par défaut de toute façon.


  22..55..  DDiivveerrss

  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.


  33..  CCoonnffiigguurraattiioonn ddeess llooccaalleess



  33..11..  LLeess ffiicchhiieerrss eett llee kkeerrnneell

  Vous pouvez maintenant utiliser n'importe quel caractère Unicode dans
  les noms de fichiers. Ni le kernel ni aucun utilitaire système ne
  nécessite 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 délimiter les sous-répertoires).  Quand ils sont
  encodés en utilisant UTF-8, les caractères non-ASCII ne seront jamais
  encodés en utilisant un octet nul ou un slash.  La seule conséquence
  est que les noms de fichiers et de répertoires occupent plus d'octets
  qu'ils ne contiennent de caractères.  Par exemple, un nom de fichier
  contenant cinq caractères grecs apparaîtra 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 affichés en grec.

  C'est une théorie générale, qui est vraie tant que vos fichiers
  restent sur un système Linux.  Sur les systèmes de fichiers utilisés
  depuis d'autres systèmes d'exploitation,  mount possède des options
  pour contrôler la conversion des noms de fichiers de/vers UTF-8 :


  ·  Les systèmes 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" différente de celle utilisée
     par défaut (qui est "iso8859-1"), les résultats avec et sans
     l'option "utf8" ne sont pas cohérents. Par conséquent, je ne
     conseille pas d'utiliser l'option "iocharset" de mount.

  ·  Les systèmes de fichiers "msdos", "umsdos" ont la même option de
     montage, mais il semble qu'elle n'ait pas d'effet.

  ·  Le système 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 système de fichier "ntfs" a
     une option de montage"utf8".
     Voir file:/usr/src/linux/Documentation/filesystems/ntfs.txt

  Les autres systèmes de fichiers (nfs, smbfs, ncpfs, hpfs, etc.) ne
  convertissent pas les noms de fichiers. Par conséquent ils accepteront
  les noms de fichier Unicode encodés en UTF-8 seulement si l'autre
  système d'exploitation les supporte.  Rappelez vous que pour qu'une
  option de montage soit appliquée aux prochains montages,  vous devez
  l'ajouter à la quatrième colonne de la ligne correspondante dans
  /etc/fstab.


  33..22..  LLee kkeerrnneell eett lleess ttttyyss

  Les ttys sont en quelque sorte des tubes bidirectionnels entre deux
  programmes, autorisant des choses comme la répétition (echoing) ou
  l'édition de la ligne de commande.  Quand dans un xterm, vous exécutez
  la commande "cat" sans arguments, vous pouvez entrer et éditer autant
  de lignes que vous voulez, elles seront répétées 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 traitées
  correctement.

  Pour résoudre ce problème, 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 déjà installée 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 lançant xterm -u8 / xterm +u8 et en lançant stty
     -a et un cat interactif à l'intérieur.

  Pour que ce changement soit persistant même à travers rlogin et
  telnet, vous devrez aussi :


  ·  Définir 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 bibliothèque ncurses sur votre
     système et la base de données /usr/lib/terminfo (ou
     /usr/share/terminfo), faites cela en éxecutant


       $ tic linux-utf8 . terminfo
       $ tic xterm-utfu . terminfo




  sur un compte utilisateur (cela créera les entrées 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 créera les entrées terminfo dans /urs/lib/terminfo, où, elles
  seront probablement effacées lors de la prochaine mise à jour de votre
  système.  Si votre système possède un fichier /etc/termcap, vous
  devriez aussi éditer ce fichier : copiez les entrées 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, exécutez 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" plutôt 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".


  33..33..  CCoonnvveerrssiioonn ddee ddoonnnnééeess ggéénnéérraalleess

  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 différents encodages sur
  la même 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 très pratiques, appelés  "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 installés, 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 systèmes Linux récents), 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 données 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 système 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


  33..44..  LLeess vvaarriiaabblleess dd''eennvviirroonnnneemmeenntt llooccaalleess

  Vous pouvez avoir les variables d'environnement suivantes
  positionnées, contenant les noms de locales :


     LLAANNGGUUAAGGEE
        Remplacement pour LC_MESSAGES. Seulement utilisé par GNU
        gettext.


     LLCC__AALLLL
        Remplacement pour toute les autres variables LC_* :


     LLCC__CCTTYYPPEE,, LLCC__MMEESSSSAAGGEESS,, LLCC__CCOOLLLLAATTEE,, LLCC__NNUUMMEERRIICC,, LLCC__MMOONNEETTAARRYY,, LLCC__TTIIMMEE
        Ce sont des variables individuelles pour : le type des
        caractères et leur encodage, les messages en langue maternelle,
        les règles de classement, le format des nombres, le format des
        montants monétaires, l'affichage de la date et de l'heure.


     LLAANNGG
        Valeur par défaut pour toutes les variables LC_*

  (Voir `man 7 locale' pour une description détaillée.)

  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 désigne une
  table de caractères, 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, séparés  par deux
  points (:).

  Pour dire à votre système 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



  33..55..  CCrrééeerr lleess ffiicchhiieerrss ppoouurr llee ssuuppppoorrtt ddeess llooccaalleess

  Si vous avez la glibc-2.1 ou glibc-2.1.1 ou glibc-2.1.2 installée,
  vérifiez d'abord en utilisant "localedef -help" que le répertoire
  système pour le tables de caractères 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
  créez 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




  Généralement vous n'avez pas besoin de créer des variables appelées
  "de" ou "fr" sans suffixe pour le code du pays, parce que ces locales
  sont normalement utilisées seulement par la variable LANGUAGE, et pas
  par les variables LC_*. De plus LANGUAGE est seulement utilisé en
  remplacement de LC_MESSAGES.


  33..66..  AAjjoouutteerr llee ssuuppppoorrtt ppoouurr llaa bbiibblliiootthhèèqquuee CC

  La glibc-2.2 supportera les locales multi-octets (de plusieurs
  octets), en particulier les locales UTF-8 créées plus haut. Mais les
  glibc-2.1 et 2.1.1 ne la supportent pas réellement. Par conséquent le
  seul effet réel de la création des fichiers
  /usr/local/share/de_DE.UTF-8/* ci dessus est que setlocale(LC_ALL,"")
  retournera "de_DE.UTF-8", conformément à 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 bibliothèque '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 bibliothèque
  installée :


       export LD_PRELOAD=/usr/local/lib/libutf8_plug.so




  Alors, dans chaque programme lancé avec cette variable d'environnement
  positionnée, les fonctions de libutf8_plug.so seront appelées à 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 nécessaire quand la glibc-2.2 sortira.


  33..77..  CCoonnvveerrssiioonn ddeess ccaattaalloogguueess ddee mmeessssaaggeess

  Maintenant ajoutons un contenu à ces nouvelles locales. Les commandes
  /bin/sh suivantes convertiront vos catalogues de messages au format
  UTF-8. Elles doivent être lancées en tant que root, et nécessitent les
  programmes 'msgfmt' et 'msgunfmt' de GNU gettext-0.10.35 convert-
  msgcat.sh.
  Ceci non plus ne sera plus nécessaire une fois que la glibc-2.2 sera
  sortie, parce qu'alors la fonction gettext convertira les chaînes de
  caractères de façon appropriée depuis la table de caractères du
  traducteur vers la table de caractères de l'utilisateur, en utilisant
  soit iconv soit librecode.
  44..  AApppplliiccaattiioonnss ssppéécciiffiiqquueess..



  44..11..  LLee rréésseeaauu



  44..11..11..  rrllooggiinn

  Marche bien avec les patches mentionnés précédemment.


  44..11..22..  tteellnneett

  Telnet n'est pas ne traite pas les caractères 8-bits (il n'est
  pas"8-bit-clean") par défaut. Pour pouvoir envoyer des codes de
  touches Unicode à un hôte distant, vous devez mettre telnet en mode
  "outbinary". Il y a deux façons de faire cela :



       $ telnet -L <hote>




  et



       $telnet
       telnet> set outbinary
       telnet> open <hote>




  en outre, utilisez les patches mentionnés précédemment.


  44..22..  LLeess nnaavviiggaatteeuurrss



  44..22..11..  NNeettssccaappee

  Netscape 4.05 ou plus peut afficher des documents HTML en encodage
  UTF-8. Tout ce qu'un document nécessite est la ligne suivante, située
  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/


  44..22..22..  LLyynnxx

  Lynx 2.8 a un écran d'options (touche 'O') qui permet de sélectionner
  la table de caractères utilisée à l'affichage. Quand il, tourne dans
  un xterm ou depuis une "Linux console" en mode UTF-8, sélectionnez
  "UNICODE UTF-8".

  Maintenant, encore une fois, tout ce qu'un document nécessite 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 encodés 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 caractères supposé par défaut ("assumed document character set") en
  "utf-8".

  Il y a aussi, dans l'écran d'options, une option permettant de choisir
  le jeu de caractères par défaut ("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 problème 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 caractères pour l'affichage à été
  positionné à "UNICODE-UTF-8". Ce problème est résolu par le patch
  lynx282.diff.

  D'après les développeurs de lynx : "Pour une utilisation sérieuse de
  l'affichage UTF-8 avec Lynx, il est toujours recommandé de compiler
  avec la bibliothèque 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/


  44..22..33..  PPaaggeess ddee tteesstt

  Des pages de test pour les navigateurs peuvent être trouvées sur les
  pages d'Alan Wood et James Kass  :
  http://www.hclrss.demon.co.uk/unicode/#links,
  http://home.att.net/~jameskass/



  44..33..  LLeess ééddiitteeuurrss



  44..33..11..  yyuuddiitt

  Le programme yudit de Gáspár Sinai http://czyborra.com/yudit/ est un
  éditeur de texte unicode de premier ordre pour le système X Window.
  Il supporte le traitement simultané de beaucoup de langages, méthodes
  d'entrée, conversions de caractères locaux standards.  Il est équipé
  pour supporter l'entrée 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é très 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 méthode d'entrée. Les méthodes
  "Straight", "Unicode" et "SGML" sont les plus intéressantes. Pour
  avoir des détails sur les autres méthodes d'entrées incorporées,
  regardez dans "/usr/local/share/yudit/data/".

  Pour qu'un changement devienne un réglage par défaut pour les
  prochaines sessions, éditez votre fichier $HOME/.yuditrc.

  Les fonctionnalités générales de l'éditeur sont limitées à l'édition,
  le copier-coller, et le "chercher-remplacer" (search&replace).  Pas de
  fonction d'annulation (undo).


  44..33..22..  mmiinneedd9988

  mined98 est un petit éditeur de texte de Michiel Huisjes, Achim Müller
  et Thomas Wolff : http://www.inf.fu-berlin.de/~wolff/mined.html.  Il
  vous permet d'éditer des fichier encodés en UTF-8 ou 8 bits, dans un
  xterm UTF-8 ou 8-bits.  Il dispose aussi de puissantes fonctionnalités
  pour entrer les caractères 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 encodés aussi bien en UTF-8
  qu'en 8-bits. Par défaut il utilise un heuristique d'auto-détection.
  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'interprétation à 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 caractères pour le changer.

  Quelques bémols :

  ·  Le binaire Linux dans la distribution est dépassé 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 façon à ce que
     ESC h le trouve.

  ·  mined ignore votre réglage "stty erase". Quand votre touche
     backspace renvoie un code ASCII 127, et que vous avez positionné
     "stty erase ^?" - ce qui est finalement le réglage le plus sûr -
     vous devez appeler mined avec l'option -B de façon à ce que la
     touche backspace efface le caractère à gauche du curseur.

  ·  Les touches "Home", "End", "Delete" ne marchent pas.


  44..33..33..  vviimm

  vim (depuis la version 5.4m) supporte les locales multi-octets, mais
  seulement si la bibliothèque X a le même support, et seulement pour
  les encodages avec au moins deux octets par caractères, i.e les
  encodages ISO-2022. Il ne supporte pas l'UTF-8.


  44..33..44..  eemmaaccss

  Avant tout, vous devriez lire la section "International Character Set
  Support" (noeud "International") dans le manuel d'Emacs. En
  particulier, notez que vous devez démarrer Emacs avec la commande


       $ emacs -fn fontset-standard




  pour qu'il utilise un jeu de fontes comprenant beaucoup de caractères
  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. Après 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, grâce 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 fenêtre, pas en
  mode terminal.

  Richard Stallman prévoit à long terme d'ajouter un support d'UTF-8
  intégré à Emacs.


  44..33..55..  XXeemmaaccss


  (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 suggère, il
  est prévu pour XEmacs-21. J'ai eu besoin d'aider un peu 'patch'.  La
  différence 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
  première chose que j'ai faite fut ceci <gb-hacks.el>.

  Ce code cherche une ligne de mode spéciale commençant 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 sélectionne.
  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 défini une macro pour \u03BB (lambda
  grec) comme ceci :



       (defmacro \u03BB (x) '(lambda .,x))





  44..33..66..  nneeddiitt



  44..33..77..  xxeeddiitt

  En théorie, xedit devrait être capable d'éditer des fichiers UTF-8 si
  vos locales sont configurées en conséquence (voir au dessus), et que
  vous ajoutez la ligne "Xedit*international: true" à votre fichier
  $HOME/.Xdefaults.  En pratique, il reconnaîtra les encodages UTF-8 des
  caractères non ASCII, mais il les affichera comme des séquences de
  caractères "@".


  44..33..88..  aaxxee

  En théorie, axe devrait être capable d'éditer des fichiers UTF-8 si
  vos locales sont configurées en conséquence (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.


  44..33..99..  ppiiccoo



  44..33..1100..  TTeeXX

  Les distributions de teTex 0.9 (et supérieures) contiennent  une
  adaptation Unicode de TeX, appelée Omega
  (http://www.gutenberg.eu.org/omega/
  ftp://ftp.ens.fr/pub/tex/yannis/omega), mais est-ce que quelqu'un
  connaîtrait un tutorial sur ce système ?

  Autres liens peut-être en rapport :
  http://www.dante.de/projekte/nts/NTS-FAQ.html,
  ftp://ftp.dante.de/pub/tex/language/chinese/CJK/


  44..44..  LLeess llooggiicciieellss ddee ccoouurrrriieerr éélleeccttrroonniiqquuee

  MIME : RFC 2279 définit les jeux de caractères 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 considérée comme étant
  obsolète ("deprecated") et ne devrait plus être utilisée.

  Les clients mail sortis après le 1er janvier 1999 devraient être
  capables d'envoyer et d'afficher des courriers encodés en UTF-8, sous
  peine d'être considérés 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
  implémentent 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") :


  44..44..11..  ppiinnee

  La situation pour une version non patchée  de pine 4.10 est la
  suivante.

  Pine ne fait pas de conversion de jeu de caractères. Mais il vous
  permet de voir des courriers UTF-8 dans une fenêtre texte UTF-8
  (console Linux ou xterm).

  Normalement, Pine se plaindra du fait qu'il y a différents jeux de
  caractères à chaque fois que vous visualiserez un courrier encodé en
  UTF-8. Pour vous débarrasser de cet avertissement, choisissez S
  (setup), puis C (config), et changez la valeur de "character set" à
  UTF-8.  Cette option ne fera rien à part réduire le nombre
  d'avertissements, puisque Pine ne connaît pas UTF-8 en interne.

  Notez aussi que pour Pine la notion de caractères Unicode est très
  limitée : il affichera les caractères latins et grecs, mais ce sont
  les seuls types de caractères Unicode qu'il connaît.

  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 décoder et afficher les
  entêtes et le corps des messages correctement.  Ce patch nécessite
  GNOME libunicode http://cvs.gnome.org/lxr/source/libunicode/.


  44..44..22..  KKmmaaiill

  Kmail (comme tout KDE 1.0) ne contient absolument aucun support pour
  les mails en UTF-8.


  44..44..33..  NNeettssccaappee CCoommmmuunniiccaattoorr

  Le Messenger de Netscape Communicator peut envoyer et afficher des
  mails encodés en UTF-8, mais cela nécessite quelques interventions
  manuelles de l'utilisateur.

  Pour envoyer un mail encodé en UTF-8 : après avoir ouvert la fenêtre
  "Compose", mais avant de commencer à composer le message, sélectionnez
  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 même pas un
  indice visuel montrant que le courrier a été encodé en UTF-8. Vous
  devez sélectionner manuellement l'option adéquate dans "View ->
  Character Set -> Unicode (UTF-8)".  Pour afficher les courriers UTF-8,
  Netscape utilise des fontes différenciées.  Vous pouvez ajuster la
  fonte utilisée dans la boîte de dialogue "Edit -> Preferences ->
  Fonts". Choisissez la catégorie de fontes "Unicode".


  44..44..44..  EEmmaaccss ((rrmmaaiill,, vvmm))



  44..55..  AAuuttrreess aapppplliiccaattiioonnss eenn mmooddee tteexxttee



  44..55..11..  lleessss

  Teléchargez 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, vérifiez
  aussi que le fichier vers lequel elle pointe ne définit pas LESS­
  CHARSET.  Si nécessaire, régénérez  ce fichier en utilisant la com­
  mande


  44..55..22..  eexxppaanndd,, wwcc

  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
  répertoires où libutf8 est installé, puis recompilez.


  44..55..33..  ccooll,, ccoollccrrtt,, ccoollrrmm,, ccoolluummnn,, rreevv,, uull

  Procurez vous le package util-linux-2.9y, configurez le, puis
  définissez 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 répertoires où libutf8 est
  installé. Puis recompilez.


  44..55..44..  ffiigglleett

  Figlet 2.2 a une option pour gérer l'entrée en UTF-8 : "figlet -C
  utf-8".


  44..55..55..  kkeerrmmiitt

  Le programme de communication série C-Kermit
  http://www.columbia.edu/kermit/, dans les versions 7.0beta10 et
  supérieures, comprend les encodages de fichier et de transfert UTF-8
  et UCS-2, et l'encodage de terminal UTF-8.  La documentation de ces
  caractéristiques peut être trouvée à
  ftp://kermit.columbia.edu/kermit/test/text/ckermit2.txt


  44..66..  AAuuttrreess aapppplliiccaattiioonnss XX1111

  La Xlib de X11 ne peut malheureusement pas encore localiser UTF-8,
  cela devrait être travaillé prochainement.


  55..  CCoommmmeenntt ffaaiirree ppoouurr qquuee vvooss pprrooggrraammmmeess ccoommpprreennnneenntt UUnniiccooddee



  55..11..  CC//CC++++

  Le type C 'char' est 8-bits et restera 8-bits parce qu'il désigne la
  plus petite unité de données adressable. Divers aménagements sont
  disponibles :



  55..11..11..  PPoouurr llee ttrraaiitteemmeenntt ddee tteexxttee nnoorrmmaall


  Le standard ISO/ANSI C contient, dans une correction qui fut ajoutée
  en 1995, un type de caractère codé sur 16 bits `wchar_t', un ensemble
  de fonctions comme celles contenues dans <string.h> et  <ctype.h>
  (déclarées respectivement dans <wchar.h> et <wctype.h>), et un
  ensemble de fonctions de conversion entre  `char *' et `wchar_t *'
  (déclarées dans <stdlib.h>).

  Voici de bonnes réferences 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 référence de la bibliothèque C Dinkumware
     http://www.dinkumware.com/htm_cl/

  ·  La spécification Single Unix d'OpenGroup http://www.UNIX-
     systems.org/online.html

  Avantages de cette interface de programmation :

  ·  C'est un standard non propriétaire.

  ·  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,"");.

  Inconvénients 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 donnée de première classe. Par conséquent
     cette API ne peut pas être utilisée raisonnablement pour tout ce
     qui nécessite plus d'une locale ou d'un jeu de caractères au même
     moment.

  ·  La plupart des systèmes d'exploitation ont un  mauvais support de
     cette interface de programmation.


  55..11..11..11..  NNootteess ccoonncceerrnnaanntt llaa ppoorrttaabbiilliittéé

  Une variable `wchar_t' peut être encodée en Unicode ou non.  Ceci
  dépend de la plateforme et quelquefois aussi des locales.  Une
  séquence multi-octets `wchar_t' peut être encodée en UTF-8 ou non
  selon la plateforme, et parfois selon les locales.

  En détails, 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 conséquence notable est que dans des programmes portables vous ne
  devriez pas utiliser des caractères non-ASCII dans des chaînes
  littérales.  Cela signifie que même si vous savez que les doubles
  guillemets ont les codes U+201C et U+201D, vous ne devriez pas écrire
  une chaîne littérale L"\u201cBonjour\u201d, dit il" ou
  "\xe2\x80\x9cBonjour\xe2\x80\x9d, dit il" dans des programmes C.
  Utilisez plutôt GNU gettext comme cela :  gettext ("'Bonjour', dit
  il"), et créez une base de données de messages en.UTF-8.po qui traduit
  "'Bonjour' dit il" en "\u201cBonjour\u201d, dit il".

  Voici une étude de la portabilité des aménagements ISO/ANSI C sur
  diverses implémentations d'Unix. La GNU glibc-2.2 les supportera tous,
  mais pour l'instant nous avons le tableau suivant.


     GGNNUU gglliibbcc--22..00..xx,, gglliibbcc--22..11..xx

     ·  <wchar.h> et  <wctype.h> existent.

     ·  Possède les fonctions wcs/mbs, mais pas fgetwc/fputwc/wprintf.

     ·  Pas de locales UTF-8.

     ·  mbrtowc retourne EILSEQ pour les octets >= 0x80.

     SSoollaarriiss 22..77

     ·  <wchar.h> et <wctype.h> existent.

     ·  Possède 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.

     OOSSFF//11 44..00dd

     ·  <wchar.h> et <wctype.h> existent.

     ·  Possède toutes les fonctions wcs/mbs, fgetwc/fputwc/wprintf.

     ·  A en plus universal.utf8@ucs4 locale, voir "man 5 unicode".

     ·  mbrtowc ne connaît pas UTF-8.

     IIrriixx 66..55

     ·  <wchar.h> et <wctype.h> existent.

     ·  Possède les fonctions wcs/mbs  et fgetwc/fputwc, mais pas
        wprintf.

     ·  N'a pas de locales multi-octets.

     ·  A seulement un simulacre de définition pour  mbstate_t.

     ·  N'a pas mbrtowc.

     HHPP--UUXX 1111..0000

     ·  <wchar.h> existe, mais pas <wctype.h>.

     ·  Possède les fonctions wcs/mbs  et fgetwc/fputwc, mais pas
        wprintf.

     ·  A une locale C.utf8.

     ·  N'a pas mbstate_t.

     ·  N'a pas mbrtowc.

     AAIIXX 44..22

     ·  <wchar.h> existe, mais pas <wctype.h> - utilisez à la place
        <ctype.h> et <wchar.h>.

     ·  Possède les fonctions wcs/mbs  et fgetwc/fputwc, mais pas
        wprintf.

     ·  Possède 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 conséquent je recommande l'utilisation des fonctions redémarrables
  et multithread-safe wcsr/mbsr. Oubliez les systèmes 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 systèmes 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 spécial de certains caractères Unicode),
  vous devriez rendre ce bout de code conditionnel selon le résultat 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 utilisées.  La fonction is_locale_utf8() est
  déclarée dans utf8locale.h et définie dans utf8locale.c.


  55..11..11..22..  LLaa bbiibblliiootthhèèqquuee lliibbuuttff88

  Une implémentation portable de l'API ISO/ANSI C, qui supporte les
  locales 8-bits et les locales UTF-8, peut être trouvée dans
  libutf8-0.5.2.tar.gz

  Avantages :


  ·  Dès maintenant un support pour Unicode UTF-8 portable, même sur les
     systèmes d'exploitation dont le support des caractères multi-octets
     ne marche pas, ou qui n'ont pas du tout de support pour les
     caractères multi-octets/larges.

  ·  Le même binaire marche pour toutes les locales 8-bit et les locales
     UTF-8 supportées par le système.

  ·  Quand un système d'exploitation fournit un vrai support pour les
     caractères multi-octets, vous pouvez en tirer avantage simplement
     en recompilant sans l'option du compilateur -DHAVE_LIBUTF8.


  55..11..11..33..  LLaa mméétthhooddee PPllaann99

  Le système d'exploitation Plan9, une variante d'Unix, utilise UTF-8
  comme encodage dans toutes ses applications. Son type de caractère
  large est appelé 'Rune', pas 'wchar_'. Des parties ce ses
  bibliothèques, écrites par  Rob Pike et Howard Trikey, sont
  disponibles à
  ftp://ftp.cdrom.com/pub/netlib/research/9libs/9libs-1.0.tar.gz.  Une
  autre bibliothèque 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 bibliothèques contient un moteur
  d'expressions rationnelles qui comprend l'UTF-8.

  Désavantages de cette API :


  ·  UTF-8 est compilé  dans la bibliothèque, pas optionnel. Les
     programmes compilés dans cet univers  perdent le support des
     encodages 8-bits qui sont toujours utilisés fréquemment en Europe.




  55..11..22..  PPoouurr lleess iinntteerrffaacceess uuttiilliissaatteeuurr ggrraapphhiiqquueess

  La bibliothèque 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 utilisées.


  55..11..33..  PPoouurr llaa mmaanniippuullaattiioonn ddee tteexxttee aavvaannccééee

  Les bibliothèques mentionnées précédemment implémentent des versions
  des concepts ASCII qui comprennent Unicode. Voici des bibliothèques
  qui traitent des concepts Unicode, comme titlecase (Une troisième
  casse de lettres, différente des majuscules et des minuscules), la
  distinction entre la ponctuation et les symboles, la décomposition
  canonique, les classes combinables, le classement canonique et
  d'autres choses du même genre.


     uuccddaattaa--11..99
        La bibliothèque ucdata de Mark Leisher
        http://crl.nmsu.edu/~mleisher/ucdata.html s'occupe des
        propriétés des caractères, de la conversion de la casse, de la
        décomposition, des classes combinées.


     IICCUU
        Ce  sont les classes IBM pour Unicode.
        http://www.alphaworks.ibm.com/tech/icu/.  Une bibliothèque très
        détaillée comprenant des chaînes de caractères 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 supportées.
        Cette bibliothèque est portable pour Unix et Win32, mais
        compilera sans intervention ("out of the box") seulement avec la
        libc6, pas la libc5.


     lliibbuunniiccooddee
        La librairie Unicode de GNOME
        http://cvs.gnome.org/lxr/source/libunicode/ de Tom Tromey entre
        autres. Elle couvre la conversion du jeu de caractères, les
        propriétés des caractères, la décomposition.


  55..11..44..  PPoouurr llaa ccoonnvveerrssiioonn

  Deux bibliothèques de conversion qui supportent UTF-8 et un grand
  nombre de de jeux de caractères 8-bits, sont disponibles :


  55..11..44..11..  LL''iimmpplléémmeennttaattiioonn iiccoonnvv dd''UUllrriicchh DDrreeppppeerr,, ccoonntteennuuee ddaannss llaa
  GGNNUU gglliibbcc--22..22..11


  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 caractères diffère entre
     les plateformes. Par exemple, "EUC-JP" sous glibc devient "eucJP"
     sous HP-UX. (Le nom INIA officiel pour ce jeu de caractères est
     "EUC-JP". Il s'agit donc clairement d'une déficience de HP-UX.)

  ·  Aucune bibliothèque supplémentaire n'est nécessaire.


  55..11..44..22..  lliibbrreeccooddee ppaarr FFrraannççooiiss PPiinnaarrdd

  ftp://ftp.gnu.org/pub/gnu/recode/recode-3.5.tar.gz.

  Avantages :


  ·  Support pour la translittération, i.e conversion de caractères non-
     ASCII en séquences de caractères ASCII de façon à préserver la
     lisibilité pour les humains, même lorsqu'une transformation sans
     pertes est impossible.

  Problèmes :


  ·  Cette API est non standard.


  55..11..55..  LLeess aauuttrree aapppprroocchheess


     lliibbuuttff--88
        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 :


     ·  Très petit.

        Problèmes :


     ·  API non standard ;

     ·  UTF-8 est compilé  dans la bibliothèque, pas optionnel. Les
        programmes compilés dans cet univers  perdent le support des
        encodages 8-bits qui sont toujours utilisés fréquemment en
        Europe ;

     ·  L'installation n'est pas évidente : le Makefile doit être
        modifié. Pas d'auto-configuration.


  55..22..  JJaavvaa

  Java supporte Unicode en interne. Le type 'char' désigne un  caractère
  Unicode, et la classe 'java.lang.String' désigne une chaîne de
  caractères construite à partir de caractères Unicode.

  Java peut afficher n'importe quel caractère à travers son système de
  fenêtrage AWT, à condition que


  1. vous positionniez la propriété système "user.language" de façon
     appropriée.

  2. Les définitions de jeux de fontes
     /usr/lib/java/lib/font.properties._l_a_n_g_u_a_g_e soient appropriées, et


  3.  Le fontes spécifiées dans ce fichier soient installées.

     Par exemple, pour afficher du texte contenant des caractères
     japonais, vous devriez installer des fontes japonaise, et lancer
     "java -Duser.language=ja ...". Vous pouvez combiner les jeux de
     fontes : pour pouvoir afficher des caractères d'Europe de l'ouest,
     grecs et japonais simultanément, vous devriez créer 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
  méthodes appelées 'readUTF', et 'writeUTF' respectivement.  Mais notez
  qu'elles n'utilisent pas UTF-8 ; elles utilisent un encodage UTF-8
  modifié : le caractère NUL est encodé dans une séquence de deux octets
  0xC0 et 0x80 à la place de 0x00, et un octet 0x00 est ajouté à la fin.
  Encodées de cette façon, les chaînes peuvent contenir des caractères
  NUL mais elles doivent néanmoins être préfixées par un champ de
  taille.  Les fonctions C <string.h> comme strlen() et strcpy() peuvent
  être utilisées pour les manipuler.


  55..33..  LLiisspp

  Le standard Lisp ordinaire détermine deux types de caractères :
  support Unicode ou non. Ce langage détermine aussi un mot-clef
  argument ':external-format' pour 'open' comme place naturelle pour
  spécifier un jeu de caractères ou un encodage.

  Parmi les implémentation 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 récente.
  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
  spécifié par l'argument ':external-format'.  Les encodages utilisés
  pour les opérations d'entrée/sortie sur des ttys et l'encodage par
  défaut pour les I/O file/socket dépendent des locales.

  Parmi les implémentations 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
  entrées/sorties sur un fichier peut être défini à travers une
  combinaison des arguments de 'open'
  Limitations : les fonctions d'attributs de caractères sont dépendantes
  des locales. Les sources et les fichiers de sources compilés ne
  peuvent pas contenir des chaînes Unicode littérales.  L'implémentation
  commerciale du Lisp standard Allegro CL ne contient pas encore de
  support Unicode, mais Erik Naggum y travaille.


  55..44..  AAddaa9955

  Ada95 a été conçu pour supporter Unicode, et la bibliothèque standard
  Ada95 contient les types de données spéciaux ISO 10646-1
  Wide_Character et Wide_String, ainsi que de nombreuses procédures et
  fonctions associées.  Le compilateur Ada95 GNU (gnat-3.11 ou plus)
  supporte UTF-8 comme encodage externe des caractères 16 bits. Cela
  vous autorise à utiliser UTF-8 à la fois dans le code source et dans
  les entrées/sorties de l'application. Pour l'activer dans
  l'application, utilisez "WCEM=8" dans la chaîne FORM quand vous ouvrez
  un fichier, et utilisez l'option du compilateur "-gnatW8" si le code
  source est UTF-8. Pour plus de détails, voyez les manuels de référence
  GNAT et Ada95.

  The Unix and Internet Fundamentals HOWTO
  by Eric S. Raymond
  v1.1, 3 Décembre 1998

  Ce document décrit les principes fondamentaux des ordinateurs de type
  PC, des systèmes d'exploitation de type UNIX et d'Internet dans un
  langage non technique. (Traduction française Philippe Malinge
  pmal@easynet.fr)
  ______________________________________________________________________

  Table des matières


  1. Introduction

     1.1 Sujet de ce document
     1.2 Ressources rattachées
     1.3 Nouvelles versions de ce document
     1.4 Réactions 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 exécutez des programmes à partir du shell?

  5. Comment marchent les périphériques d'entrée et les interruptions ?

  6. Comment mon ordinateur fait-il plusieurs choses en même temps ?

  7. Comment mon ordinateur évite aux processus d'empiéter les uns sur les autres ?

  8. Comment mon ordinateur stocke des choses sur le disque ?

     8.1 Bas niveau du disque et structure du système de fichiers
     8.2 Noms de fichiers et répertoires
     8.3 Points de montage
     8.4 Comment un fichier est retrouvé ?
     8.5 Comment les choses peuvent dégénérer ?

  9. Comment fonctionnent les langages d'ordinateur ?

     9.1 Langages compilés
     9.2 Langages interprétés
     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


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  SSuujjeett ddee ccee ddooccuummeenntt

  Ce document est conçu pour aider les utilisateurs de Linux et
  d'Internet qui désirent apprendre en faisant. Bien que ce soit un bon
  moyen d'acquérir des compétences, quelquefois cela laisse de
  singulières lacunes dans la connaissance des bases -- lacunes qui
  peuvent rendre difficile la réflexion créative ou perturber fortement,
  par manque d'un modèle mental clair sur ce qu'il devrait se passer.

  J'essaierai de décrire clairement, dans un langage simple, comment
  tout marche. La présentation sera adaptée aux personnes qui utilisent
  Unix ou Linux sur du matériel de type PC. Cependant, je ferai ici
  couramment référence à 'Unix' : ce que je décrirai 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 détails diffèrent quelque peu si vous utilisez un processeur Alpha
  ou PowerPC ou une autre machine Unix, mais les concepts de base
  restent les mêmes.

  Je ne voudrais pas répéter les choses, alors vous allez devoir faire
  attention, mais cela veut dire que vous retiendrez chaque mot que vous
  lirez. C'est une bonne idée que de tout parcourir rapidement la
  première fois ; vous devrez y revenir et relire un certain nombre de
  fois afin de digérer ce que vous avez appris.

  C'est un document en permanente évolution. Je prévois d'ajouter des
  chapitres en réponse aux feedbacks, ainsi vous pourrez périodiquement
  le passer en revue.


  11..22..  RReessssoouurrcceess rraattttaacchhééeess

  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.



  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt


  Les nouvelles versions de 'Unix and Internet Fundamentals HOWTO'
  seront postées périodiquement dans comp.os.linux.help et  et
  news.answers <news:answers>. Elles pourront être téléchargées à partir
  de divers sites Linux WWW ou FTP, y compris la page d'accueil du LDP.

  Vous pouvez accéder à la dernière 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>.


  11..44..  RRééaaccttiioonnss eett ccoorrrreeccttiioonnss


  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 spécialement appréciés les liens hypertexte vers
  des explications plus détaillées 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.


  22..  AAnnaattoommiiee ddee bbaassee ddee vvoottrree oorrddiinnaatteeuurr

  Votre ordinateur possède un processeur à l'intérieur duquel se font
  réellement les calculs. Il possède une mémoire interne (ce que les
  gens DOS/Windows désignent par ``RAM'' et que les gens UNIX désignent
  souvent par ``core''). Le processeur et la mémoire résident sur la
  _c_a_r_t_e _m_è_r_e qui est le coeur de votre ordinateur.

  Votre ordinateur possède 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 mère et qui
  aident l'ordinateur à piloter ces périphériques externes. Votre
  clavier est trop simple pour nécessiter une carte séparée ; le
  contrôleur est intégré dans le châssis du clavier.)

  Nous décrirons plus tard en détails comment fonctionnent ces
  périphériques. Pour l'instant, quelques notions de base afin de garder
  à l'esprit comment ils fonctionnent ensemble :

  Tous les éléments internes de votre ordinateur sont connectés par un
  _b_u_s. Physiquement, le bus est ce sur quoi vous connectez vos cartes
  contrôleur (carte vidéo, contrôleur disque, carte son si vous en avez
  une). Le bus est l'autoroute empruntée par les données entre votre
  processeur, votre écran, votre disque et le reste.



  Le processeur, qui fait tout marcher, ne peut réellement voir tous les
  éléments directement ; il doit communiquer avec eux via le bus, le
  seul sous-système qui soit effectivement très rapide, qui accède
  directement à la mémoire (le core). Afin que les programmes puissent
  s'exécuter, ils doivent être en mémoire _c_o_r_e.

  Lorsque votre ordinateur lit un programme ou une donnée sur le disque,
  il se passe réellement les choses suivantes : le processeur utilise le
  bus pour envoyer une requête de lecture du disque à votre contrôleur
  de disque. Quelques instants après, le contrôleur de disque utilise le
  bus pour signaler à l'ordinateur qu'il a lu la donnée et qu'il l'a
  mise à un certain endroit de la mémoire. Le processeur peut utiliser
  le bus pour aller chercher ce qu'il y a à cet endroit de la mémoire.

  Votre clavier et votre écran communiquent également avec le processeur
  via le bus mais d'une manière 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.


  33..  QQuuee ssee ppaassssee--tt--iill lloorrssqquuee vvoouuss aalllluummeezz vvoottrree oorrddiinnaatteeuurr ??

  Un ordinateur sans programme qui s'exécute est juste un tas inerte
  d'électronique. La première chose que doit faire un ordinateur
  lorsqu'il est allumé est de démarrer un programme spécial appelé
  _s_y_s_t_è_m_e _d_'_e_x_p_l_o_i_t_a_t_i_o_n. Le travail du système d'exploitation est
  d'aider les autres programmes de l'ordinateur à travailler, en
  traitant les détails méprisables du contrôle du matériel de
  l'ordinateur.

  Le processus de démarrage du système 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 même ses chaussures `par les
  lacets'. Votre ordinateur sait comment booter car les instructions de
  boot sont stockées 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
  spécial 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 mémoire
  puis lancé. Le travail du chargeur de boot est de démarrer le système
  d'exploitation réel.


  Le chargeur fait cela en allant chercher un _n_o_y_a_u, en le chargeant en
  mémoire et en le démarrant. 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 carrément stupide, et Linux ne l'utilise jamais après avoir booté.
  A l'origine, j'ai programmé sur des PC 8-bits primitifs avec de petits
  disques : littéralement ils ne pouvaient accéder à suffisamment de
  disque pour charger le noyau directement. L'étape du chargeur de boot
  vous permet de démarrer plusieurs systèmes d'exploitation à partir de
  différents emplacements de votre disque, dans le cas où Unix n'est pas
  assez bon pour vous.)

  Une fois que le noyau démarre, il doit chercher autour de lui, trouver
  le reste du matériel et être prêt pour exécuter des programmes. Il
  fait cela en non pas en fouillant à des adresses mémoire ordinaires
  mais plutôt à des _p_o_r_t_s _d_'_E_n_t_r_é_e_/_S_o_r_t_i_e -- des adresses spéciales du
  bus, sensées avoir une carte contrôleur de périphériques 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 contrôleurs répondraient s'ils étaient
  présents. 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 matériel par le noyau à travers les ports
  d'Entrée/Sortie, le chiffrage de ce qui est disponible et l'adaptation
  à votre machine. Le noyau Linux est extrêmement 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'ingéniosité 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 expériences des Unix libres pour
  attirer une masse critique d'utilisateurs.


  Mais rendre le noyau complètement chargé et s'exécutant n'est pas la
  fin du processus de boot ; c'est juste la première étape (quelquefois
  appelée _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 systèmes de fichiers sur disques sont des choses fragiles ; s'ils
  ont été endommagés par une panne matérielle ou par une coupure
  soudaine d'alimentation électrique, il y a de bonnes raisons de
  rétablir l'intégrité avant que votre Unix ne puisse aller plus loin.
  Nous parlerons plus tard de ce que l'on dit à propos de ``comment les
  systèmes de fichiers peuvent devenir mauvais''.


  L'étape suivante du noyau est de lancer plusieurs _d_é_m_o_n_s. Un démon est
  un programme comme un spouleur d'imprimante, un serveur de mail ou un
  serveur WWW qui se cache en arrière-plan en attendant d'avoir des
  choses à faire. Ces programmes spéciaux doivent coordonner plusieurs
  requêtes qui peuvent entrer en conflit. Il y a des démons car il est
  souvent plus facile d'écrire un programme qui s'exécute constamment et
  qui sait tout des requêtes, plutôt que d'essayer de s'assurer qu'un
  troupeau de copies (chacune traitant une requête et toutes s'exécutant
  en même temps) ne se gêneraient pas mutuellement. La collection
  particulière de démons que le système démarre peut varier, mais
  inclura presque toujours un spouleur d'imprimante (un démon garde-
  barrière de votre imprimante).

  Une fois que tous les démons ont démarré, 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 préparation pour
  les utilisateurs. Le noyau démarre une copie d'un programme appelé
  getty pour surveiller votre console (et peut être d'autres copies pour
  surveiller des ports-série 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 prêts pour votre connexion et
  l'exécution de vos programmes.


  Quand vous vous connectez (en donnant un nom et un mot de passe), vous
  vous identifiez auprès de getty et de l'ordinateur. Il exécute
  maintenant un programme appelé (assez naturellement) login, qui
  réalise des tâches ancillaires et démarre un interpréteur de
  commandes, le _s_h_e_l_l. (Oui getty et login pourraient être un seul et
  même programme. Ils sont séparés pour des raisons historiques que nous
  n'expliciterons pas ici.)


  Dans la section suivante, nous parlerons de ce qui se passe lorsque
  vous exécutez des programmes à partir du shell.


  44..  QQuuee ssee ppaassssee--tt--iill lloorrssqquuee vvoouuss eexxééccuutteezz ddeess pprrooggrraammmmeess àà ppaarrttiirr dduu
  sshheellll??

  Le shell normal vous donne le prompt '$' que vous voyez après 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.

  Après la phase de boot et avant que vous n'exécutiez 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 événement, ce peut être l'enfoncement d'une touche ou
  un déplacement de la souris. Ou, si votre machine est connectée à un
  réseau, un événement peut être un paquet de données venant de ce
  réseau.

  Le noyau est un de ces processus. C'en est un spécial, car il contrôle
  le moment où les autres processus _u_t_i_l_i_s_a_t_e_u_r peuvent s'exécuter, et
  c'est normalement le seul processus qui accède directement au matériel
  de la machine. En fait, les processus utilisateurs font des requêtes
  au noyau lorsqu'ils veulent obtenir une entrée clavier, écrire sur
  votre écran, lire ou écrire sur votre disque ou juste autre chose que
  consommer quelques bits en mémoire. Ces requêtes sont appelées _a_p_p_e_l_s
  _s_y_s_t_è_m_e.

  Normalement toute Entrée/Sortie passe par le noyau de manière à ce
  qu'il puisse ordonnancer les opérations et éviter ainsi aux processus
  de se marcher les uns sur les autres. Quelques processus utilisateur
  sont autorisés à contourner le noyau, habituellement en ayant accès
  directement aux ports d'Entrée/Sortie. Les serveurs X (les programmes
  qui traitent les requêtes 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 caractères.

  Le shell est juste un processus utilisateur, et non un processus
  particulièrement spécial. 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 interpréter comme étant des commandes.


  Tapez `ls' suivi de `Enter' afin de lister le contenu d'un répertoire.
  Le shell applique ses règles internes pour évaluer la commande que
  vous voulez exécuter dans le fichier `/bin/ls'. Il fait un appel
  système en demandant au noyau de lancer `/bin/ls' comme un processus
  _f_i_l_s et donne son accès à 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 système _e_x_i_t. Le noyau réveille le shell et lui
  dit qu'il peut continuer à s'exécuter. Le shell affiche un autre
  prompt et attend une autre ligne en entrée.

  D'autres choses peuvent être faites pendant l'exécution de `ls',
  cependant (nous supposerons que la liste du répertoire est très
  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'exécute.



  55..  CCoommmmeenntt mmaarrcchheenntt lleess ppéérriipphhéérriiqquueess dd''eennttrrééee eett lleess iinntteerrrruuppttiioonnss ??

  Votre clavier est un périphérique très simple ; simple car il génère
  un petit flux de données très lentement (sur un ordinateur standard).
  Lorsque vous relâchez une touche, cet événement est signalé par le
  câble 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 système 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 système d'exploitation dissimule toutes
  les données associées (comme la valeur touche enfoncée/touche
  relâchée) tant qu'elle ne peut être traitée.

  Ce que le fait le handler d'interruption disque pour votre clavier est
  de déposer la valeur de la touche dans une zone en bas de la mémoire
  (core). Ainsi elle sera disponible pour l'inspection lorsque le
  système d'exploitation passera le contrôle à n'importe quel programme
  supposé attendre présentement une entrée clavier.


  Des périphériques d'entrée plus complexes comme les disques
  travaillent de manière similaire. Précédemment nous faisions référence
  à un contrôleur de disques utilisant le bus pour signaler qu'une
  requête disque a bien été exécutée. Que se passe-t-il si ce disque
  reçoit une interruption ? Le handler de l'interruption disque copie
  alors la donnée trouvée dans la mémoire, 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 évènements clavier)
  sont traitées après celles de priorité supérieures (comme les tops
  d'horloge ou les événements disque). Unix a été conçu pour traiter
  prioritairement les types d'événements qui doivent être traités
  rapidement afin de conserver une machine sur laquelle les temps de
  réponse sont sont sans à-coup.

  Les messages que vous voyez pendant la phase de boot font référence à
  des numéros d'_I_R_Q. Vous devez être prévenus qu'une des causes les plus
  courantes de mauvaise configuration de votre matériel est d'avoir deux
  périphériques qui essaient d'utiliser la même IRQ, sans savoir ce que
  c'est réellement.

  La réponse est ici. IRQ est l'abbréviation de "Interrupt ReQuest". Le
  système d'exploitation a besoin de savoir au démarrage quel numéro
  d'interruption sera utilisé par chaque périphérique, ainsi il peut
  associer le handler adéquat pour chacun. Si deux périphériques
  différents essaient d'utiliser la même IRQ, les interruptions seraient
  quelquefois distribuées au mauvais handler. Cela est classique au
  moins au verrouillage du périphérique, et peut parfois déstabiliser le
  système d'exploitation, qu'il se "désintègre" ou qu'il se crashe.


  66..  CCoommmmeenntt mmoonn oorrddiinnaatteeuurr ffaaiitt--iill pplluussiieeuurrss cchhoosseess eenn mmêêmmee tteemmppss ??

  En fait, il ne le fait pas. Les ordinateurs ne peuvent traiter qu'une
  seule tâche (ou _p_r_o_c_e_s_s_u_s) à la fois. Mais un ordinateur peut changer
  de tâche très rapidement, et duper l'esprit humain en lui faisant
  croire qu'il fait plusieurs choses en même temps. C'est ce que l'on
  appelle le _t_e_m_p_s _p_a_r_t_a_g_é.

  Une des tâches du noyau est de gérer le temps partagé. C'est une
  partie dédiée à 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, générant une interruption horloge. L'ordonnanceur arrête le
  processus qui s'exécute, le suspend dans l'état, et donne le contrôle
  à un autre processus.

  1/60 ème de seconde peut paraître peu de temps. Mais sur les
  microprocesseurs actuels c'est assez pour exécuter des dizaines de
  milliers d'instructions machine, ce qui permet d'effectuer beaucoup de
  choses. Même si vous avez plusieurs processus, chacun peut accomplir
  un petit peu sa tâche pendant ses tranches de temps.

  En pratique, un programme ne dispose pas de sa tranche de temps
  entière. Si une interruption arrive d'un périphérique d'E/S, le noyau
  arrêtera en réalité la tâche courante, exécutera le handler
  d'interruption et retournera à la tâche courante. Une tempête
  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 très rarement limitée par le
  temps machine qu'ils peuvent obtenir (il y a quelques exceptions à
  cette règle, comme la génération de son ou de graphiques en 3-D. Le
  plus souvent, les délais sont dus à l'attente, par le programme, des
  données d'un disque ou d'une connexion réseau.

  Un système d'exploitation qui peut supporter de manière routinière
  plusieurs processus est appelé "multitâche". Les systèmes
  d'exploitation de la famille Unix ont été conçus dès le début pour le
  multitâche et sont vraiment bons pour ça -- beaucoup plus efficaces
  que celui de Windows et MAC OS, pour lesquels le multitâche a été
  introduit a posteriori et qui le traitent plutôt pauvrement. Efficace,
  multitâche, fiable sont quelques-unes des raisons qui rendent Linux
  supérieur pour le réseau, les communications et les services WEB.


  77..  CCoommmmeenntt mmoonn oorrddiinnaatteeuurr éévviittee aauuxx pprroocceessssuuss dd''eemmppiiéétteerr lleess uunnss ssuurr
  lleess aauuttrreess ??

  L'ordonnanceur du noyau fait attention à séparer les processus dans le
  temps. Votre système d'exploitation les divise aussi dans l'espace, de
  telle manière que ces processus n'empiètent pas sur la mémoire de
  travail des autres. Ces choses que votre système d'exploitation
  réalise sont appelées _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
  mémoire afin de mettre son code et de garder des variables et leur
  résultat. 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 données est
  véritablement propre à chaque processus, mais si deux processus
  exécutent le même code, Unix s'arrange automatiquement pour qu'ils
  partagent le même segment de code dans un soucis d'efficacité.

  L'efficacité est importante car la mémoire est chère. Quelquefois,
  vous ne disposez pas de suffisamment de mémoire pour faire tenir tous
  les programmes, spécialement si vous utilisez un gros programme comme
  un serveur X-WINDOW. Pour contourner cela, Unix utilise une stratégie
  appelée  _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 données d'un processus en mémoire. Cependant, il garde
  seulement un espace de travail ; le reste de l'état du processus est
  laissé dans un endroit spécial 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'exécute, Unix essaie d'anticiper comment l'
  espace de travail changera, et ne chargera en mémoire que les morceaux
  dont il a besoin. Faire cela efficacement est compliqué et délicat, je
  n'essaierai pas de le décrire ici -- mais cela dépend du fait que le
  code et les références aux données peuvent arriver en blocs, avec
  chaque nouveau référençant vraisemblablement un proche ou un ancien.
  Ainsi, si Unix garde le code ou les données fréquemment (ou récemment)
  utilisés, 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 mémoire était habituellement petite par rapport à la taille des
  programmes en cours d'exécution, de telle manière que les échanges
  entre le disque et la mémoire ("swapping") étaient fréquents. La
  mémoire est beaucoup moins chère de nos jours et même les machines bas
  de gamme en sont bien dotées. Sur les machines mono-utilisateur avec
  64Mo de mémoire, il est possible de faire tourner X-WINDOW et un
  mélange de programmes sans jamais swapper.

  Même dans cette situation joyeuse, la part du système d'exploitation
  appelée 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 sûr que les programmes ne peuvent modifier que leurs
  segments de mémoire -- ce qui empêche un code erroné ou malicieux dans
  un programme de ramasser les données dans un autre. Pour faire cela,
  il conserve une table des segments de données et de code. La table est
  mise à jour chaque fois qu'un processus demande de la mémoire ou en
  libère (habituellement plus tard lorsqu'il se termine).

  Cette table est utilisée pour passer des commandes à une partie
  spécialisée du matériel sous-jacent appelée 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 intégrés. Le MMU a la faculté de mettre des
  barrières autour de zones mémoire, ainsi une référence en "dehors des
  clous" sera refusée et générera une interruption spéciale pour être
  traitée.

  Si vous avez déjà 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'exécution a tenté d'accéder à de la
  mémoire 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.


  88..  CCoommmmeenntt mmoonn oorrddiinnaatteeuurr ssttoocckkee ddeess cchhoosseess ssuurr llee ddiissqquuee ??

  Sur votre disque dur sous Unix, vous voyez un arbre de répertoires
  nommés et des fichiers. Normalement vous ne devriez pas à chercher à
  en savoir plus, mais cela peut s'avérer 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 décrire
  l'organisation du disque en partant du niveau fichier et en
  descendant, c'est pour cela que je le décrirai en remontant à partir
  du niveau matériel.


  88..11..  BBaass nniivveeaauu dduu ddiissqquuee eett ssttrruuccttuurree dduu ssyyssttèèmmee ddee ffiicchhiieerrss

  La surface de votre disque , sur laquelle il stocke les données est
  divisée comme une cible de jeu de fléchettes -- en pistes circulaires
  qui sont partagées en secteurs. Parce que les pistes de l'extérieur
  contiennent plus de surface que celles près de l'axe de rotation, au
  centre du disque, les pistes externes ont plus de secteurs que celles
  de l'intérieur. Chaque secteur (ou _b_l_o_c _d_i_s_q_u_e) a la même taille, qui
  est généralement 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 utilisée indépendamment des autres
  partitions, comme un système de fichiers ou un espace d'échange (swap
  space). La partition ayant le plus petit numéro est souvent traitée
  spécialement, 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 implémenter
  la ``mémoire 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 traitées comme une séquence
  linéaire de blocs. Les systèmes de fichiers d'un autre coté, ont
  besoin de relier les noms de fichiers à des séquences de blocs disque.
  Parce que les fichiers grossissent, diminuent, et changent tout le
  temps, les blocs de données d'un fichier ne seront pas une séquence
  linéaire mais pourront être dispersés sur toute la partition (tant que
  le système d'exploitation pourra trouver un bloc libre).



  88..22..  NNoommss ddee ffiicchhiieerrss eett rrééppeerrttooiirreess

  Dans chaque système de fichiers, la liaison entre les noms et les
  blocs est réalisée grâce à une structure appelée _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" (numéro de bloc
  les plus faibles) du système de fichiers (les tout premiers sont
  utilisés pour des besoins d'intégrité et de label que nous ne
  décrirons pas ici). Chaque i-node décrit un fichier. Les blocs de
  données des fichiers sont au dessus des i-nodes (conceptuellement).

  Chaque i-node contient la liste des numéros des blocs du fichier
  (réellement c'est une demi-vérité, c'est seulement valable pour les
  petits fichiers, mais le reste de ces détails 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 résident 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 répertoire contient juste une table des noms et des
  numéros d'i-node associés. C'est la raison pour laquelle, sous Unix,
  un fichier peut avoir plusieurs noms réels (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 entrées dans un répertoire qui
  pointent vers le même i-node.


  88..33..  PPooiinnttss ddee mmoonnttaaggee

  Dans le cas le plus simple, votre système de fichiers Unix tient sur
  une seule partition disque. Cependant vous verrez que cette
  disposition sur des petits systèmes Unix n'est pas pratique.
  Typiquement il est réparti sur plusieurs partitions disque voire  sur
  plusieurs disques physiques. Ainsi par exemple, votre système peut
  avoir une petite partition où le noyau réside, une un peu plus grande
  pour les utilitaires du système et une beaucoup plus grosse pour les
  répertoires des utilisateurs.

  La seule partition à laquelle vous aurez accès immédiatement après 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 répertoire racine du système de fichiers, le noeud le plus haut à
  partir duquel tout est raccroché.

  Les autres partitions du système doivent être attachées à cette racine
  afin que votre système 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 répertoire de la partition racine.

  Par exemple, si votre Unix a un répertoire appelé '/usr', c'est
  probablement un point de montage d'une partition qui contient un tas
  de programmes installés avec votre Unix mais qui ne sont pas
  nécessaires durant la phase initiale de boot.


  88..44..  CCoommmmeenntt uunn ffiicchhiieerr eesstt rreettrroouuvvéé ??

  Maintenant nous pouvons considérer le système de fichiers dans une
  démarche descendante. Lorsque vous ouvrez un fichier (tel que
  /home/esr/WWW/ldp/fundamentals.sgml) voici ce qu'il arrive :

  Votre noyau démarre de la racine de votre système de fichiers Unix
  (dans la partition root). Il cherche un répertoire appelé `home'.
  Habituellement `home' est un point de montage d'une grande partition
  pour les utilisateurs, il descend à l'intérieur. Au sommet de la
  structure du répertoire de cette partition utilisateur, il va chercher
  une entrée nommée `esr' et en extraire le numéro d'i-node. Il ira à
  cette i-node, notez que c'est une structure de répertoire, et
  retrouvera `WWW'. En exploitant _c_e_t i-node, il ira au sous répertoire
  correspondant et retrouvera `ldp'. Ce qui lui donnera encore un autre
  i-node répertoire. En ouvrant ce dernier, il trouvera un numéro d'i-
  node pour `fundamentals.sgml'. Cet i-node n'est pas un répertoire mais
  fournit la liste des blocs associés au fichier.




  88..55..  CCoommmmeenntt lleess cchhoosseess ppeeuuvveenntt ddééggéénnéérreerr ??

  Plus haut, nous avons laissé entendre que les systèmes de fichiers
  étaient fragiles.  Maintenant nous savons que pour accéder à un
  fichier vous devez parcourir une longue chaîne arbitraire de
  références à des répertoires et à des inodes. A présent, supposons que
  votre disque dur possède une zone défectueuse.

  Si vous êtes chanceux, il détruira quelques données d'un fichier. Si
  vous êtes malchanceux, il va corrompre une structure de répertoire ou
  un numéro d'inode et laissera un sous arbre entier de votre système
  dans l'oubli -- ou, pire, cela a donné une structure corrompue qui
  pointe par plusieurs chemins au même bloc disque ou inode. Une telle
  corruption peut s'étendre par des opérations courantes sur les
  fichiers qui ne se trouvent pas au point d'origine.

  Heureusement, ce genre de d'imprévu devient de plus en plus rare car
  les disques sont de plus en plus fiables. Malgré tout, cela veut dire
  que votre Unix voudra vérifier périodiquement l'intégrité du système
  de fichiers afin de s'assurer que rien ne cloche. Les Unix modernes
  font une vérification rapide sur chaque partition au moment du boot,
  juste avant de les monter. Au bout d'un certain nombre de redémarrages
  (reboot), la vérification sera plus approfondie et durera quelques
  minutes.

  Si tout cela vous parait, comme Unix, terriblement complexe et
  prédisposé aux défaillances, au contraire, c'est rassurant de savoir
  que ces vérifications faites au démarrage de la machine, détectent et
  corrigent les problèmes courants _a_v_a_n_t qu'ils ne deviennent réellement
  désastreux. D'autres systèmes d'exploitation ne disposent pas de ces
  fonctionnalités, qui accélèrent  un petit peu le démarrage, mais
  peuvent vous laisser tout 'bousiller' en essayant de récupérer à la
  main (et en supposant que vous ayez une copie des Utilitaires Norton
  ou autre à portée de main...).



  99..  CCoommmmeenntt ffoonnccttiioonnnneenntt lleess llaannggaaggeess dd''oorrddiinnaatteeuurr ??

  Nous avons déjà évoqué ``comment les programmes sont      exécutés''.
  Chaque programme en fin de compte doit exécuter 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 très bien le langage
  machine ; cela est devenu rare, art obscur même parmi les hackers.

  La plupart du code du noyau d'Unix excepté une petite partie de
  l'interface avec le matériel 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 héritage 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 différents 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 création humaine, la
  version éditable) est passé à travers plusieurs types de traductions
  pour arriver en code machine, que la machine peut effectivement
  exécuter.


  99..11..  LLaannggaaggeess ccoommppiillééss

  Le type le plus classique de langage est un _l_a_n_g_a_g_e _c_o_m_p_i_l_é. Les
  langages compilés sont traduits en fichiers exécutables de code
  machine binaire par un programme spécial appelé (assez logiquement) un
  _c_o_m_p_i_l_a_t_e_u_r. Lorsque le binaire est généré, vous pouvez l'exécuter
  directement sans regarder à nouveau dans le code source. (La plupart
  des logiciels délivrés sous forme de binaires compilés sont faits à
  partir d'un source auquel vous n'avez pas accès.)

  Les langages compilés tendent à fournir une excellente performance et
  ont un accès le plus complet au système d'exploitation, mais il
  difficile de programmer avec.

  Le langage C, langage dans lequel chaque Unix est lui-même écrit, est
  de tous le plus important (avec sa variante C++). FORTRAN est un autre
  langage compilé qui reste utilisé par de nombreux ingénieurs 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 très 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 développeur Unix qui utilise un langage compilé, il
  est incontournable que ce soit C ou C++.



  99..22..  LLaannggaaggeess iinntteerrpprrééttééss

  Un _l_a_n_g_a_g_e _i_n_t_e_r_p_r_é_t_é dépend d'un programme interpréteur qui lit le
  code source et traduit à la volée en calculs et appels système. Le
  source doit être ré-interprété (et l'interpréteur présent) à chaque
  fois que le programme est exécuté.

  Les langages interprétés tendent à être plus lents que les langages
  compilés, et limitent souvent les accès au système d'exploitation ou
  au matériel sous-jacent. D'un autre côté, il est plus facile de
  programmer et ils tolèrent plus d'erreurs de codage que les langages
  compilés.


  Quelques utilitaires Unix, incluant le shell et bc(1) et sed(1) et
  awk(1), sont effectivement des petits langages interprétés. Les BASICs
  sont généralement interprétés. Ainsi est Tcl. Historiquement, le
  langage le plus interprété était LISP (une amélioration énorme sur la
  plupart de ses successeurs). Aujourd'hui, Perl est très largement
  utilisé et devient résolument plus populaire.



  99..33..  LLaannggaaggeess PP--ccooddee

  Depuis 1990 un type de langage hybride qui utilise la compilation et
  l'interprétation est devenu incroyablement important. Les langages P-
  code sont comme des langages compilés dans le sens où le code est
  traduit dans une forme binaire compacte qui est celle que vous
  exécutez, 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 généralement un peu plus
  simple mais plus puissant qu'un langage machine réel. Lorsque vous
  exécutez le programme, vous interprétez du p-code.


  Le p-code peut s'exécuter pratiquement aussi rapidement que du binaire
  compilé (les interpréteurs 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 interpréteur.

  D'importants langages p-code sont Python et Java.


  1100..  CCoommmmeenntt IInntteerrnneett ffoonnccttiioonnnnee ??

  Afin de vous aider à comprendre comment Internet fonctionne, nous
  verrons ce qui se passe lorsque vous effectuez une opération classique
  -- pointer dans un navigateur ce document à partir du site Web de
  référence 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 réside dans le fichier
  LDP/HOWTO/Fundamentals.html, sous le répertoire exporté World Wide Web
  de la machine sunsite.unc.edu.



  1100..11..  NNoommss eett llooccaalliissaattiioonnss

  La première chose que votre navigateur doit faire est d'établir une
  connexion réseau avec la machine sur laquelle se trouve le document.
  Pour faire cela, il doit tout d'abord trouver la localisation réseau
  de _l_'_h_ô_t_e sunsite.unc.edu (hôte est un raccourci pour `machine hôte'
  ou `hôte réseau' ; 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 résider 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'Accés à Internet (FAI), une partie de la procédure d'installation
  décrit certainement la manière d'indiquer à votre logiciel Internet
  l'adresse IP du serveur de noms du réseau du FAI.

  Les serveurs de noms sur différentes machines communiquent avec les
  autres en échangeant et en gardant à jour toutes les informations
  nécessaires à la résolution de noms d'hôte (en les associant à des
  adresses IP). Votre serveur de noms doit demander à trois ou quatre
  sites à travers le réseau afin de résoudre sunsite.unc.edu, mais cela
  se déroule 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.



  1100..22..  PPaaqquueettss eett rroouutteeuurrss

  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 télégramme est découpé 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 requête World Wide Web.

  Alors votre machine envoie le paquet par le fil (de la connexion modem
  avec votre FAI, ou le réseau local) jusqu'à ce qu'il rencontre une
  machine spécialisée appelée _r_o_u_t_e_u_r. Le routeur possède une carte de
  l'Internet dans sa mémoire -- pas une complète mais une qui décrit
  votre voisinage réseau 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é réception 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 câble) sont
  déconnectés du réseau et modifier le chemin si possible en trouvant
  une autre route.

  Il existe une légende urbaine qui dit qu'Internet a été conçu pour
  survivre a une guerre nucléaire. Ce n'est pas vrai, mais la conception
  d'Internet est extrêmement bonne en ayant une performance fiable basé
  sur des couches matérielles d'un monde incertain... C'est directement
  du au fait que son intelligence est distribuée à travers des milliers
  de routeurs plutôt qu'à quelques auto-commutateurs massifs (comme le
  réseau téléphonique). Cela veut dire que les défaillances tendent à
  être bien localisées et le réseau peut les contourner.

  Une fois que le paquet est arrivé à destination, la machine utilise le
  numéro de service pour le fournir au serveur Web. Le serveur Web peut
  savoir à qui répondre 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 média de
  transmission du réseau et du type de service.



  1100..33..  TTCCPP eett IIPP

  Pour comprendre comment des transmissions de multiples paquets sont
  réalisées, vous devez savoir que l'Internet utilise actuellement deux
  protocoles empilés 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 appelées 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 réseau, 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'expéditeur envoie
  juste un paquet au destinataire et n'attend jamais un accusé de
  réception.

  Cependant, IP est rapide et peu coûteux. Quelquefois, rapide, peu
  coûteux et non fiable c'est OK. Lorsque vous jouez en réseau à Doom ou
  Quake, chaque balle est représentée par un paquet IP. Si quelques-unes
  sont perdues, c'est OK.

  Le niveau supérieur, _T_C_P (Transmission Control Protocol), fournit la
  fiabilité. Quand deux machine négocient une connexion TCP (ce qu'elles
  font en utilisant IP), le destinataire doit envoyer des accusés de
  réception des paquets qu'il reçoit à l'expéditeur. Si l'expéditeur ne
  reçoit pas un accusé de réception pour un paquet après un certain
  temps, il renvoie ce paquet. De plus, l'expéditeur donne à chaque
  paquet TCP un numéro de séquence, que le destinataire peut utiliser
  pour ré-assembler les paquets dans le cas où il sont arrivés dans le
  désordre. (Cela peut arriver si les liens réseau se rétablissent ou
  cassent pendant une connexion.)

  Les paquets TCP/IP contiennent également un checksum pour permettre la
  détection de données altérées 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 hôte/numéro de services. Les gens qui écrivent des
  protocoles réseau ne doivent pas se soucier la plupart du temps de la
  taille des paquets, du ré-assemblage des paquets, de la vérification
  d'erreurs, le calcul du checksum et la retransmission qui sont au
  niveau inférieurs.



  1100..44..  HHTTTTPP,, uunn pprroottooccoollee dd''aapppplliiccaattiioonn

  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 manière de passer des chaînes
  d'octets dans les deux sens. Ce protocole est appelé _H_T_T_P (Hyper-Text
  Transfer Protocol) et nous en avons déjà vu une commande -- la
  commande GET utilisée ci-dessus.

  Lorsque la commande GET arrive au serveur Web de sunsite.unc.edu avec
  comme numéro de service 80, elle sera expédiée à un _d_é_m_o_n _s_e_r_v_e_u_r qui
  écoute le port 80. La plupart des services Internet sont implémentés
  par des démons serveurs qui ne font rien d'autre qu'attendre sur des
  numéros de port, récolter et exécuter les commandes entrantes.


  Cette conception de l'Internet a une règle qui prime sur les autres,
  c'est que toutes les parties sont le plus simple possible et
  humainement accessible. HTTP, et ses compères (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'expérience a montré que le bénéfice d'avoir des commandes
  qui sont faciles à décrire et à comprendre l'emportent sur le gain
  marginal de l'efficacité que l'on peut espérer au prix de choses
  compliquées et compactes.

  Par conséquent, ce que le démon serveur vous renvoie via TCP/IP est
  aussi du texte. Le début de la réponse ressemblera à quelque chose
  comme (quelques en-têtes ont été supprimés) :


  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-têtes seront suivis d'une ligne vide et du texte de la page Web
  (après que la connexion sera rompue). Votre navigateur affichera
  simplement cette page. Les en-têtes indiquent -- en particulier, l'en-
  tête Type de Contenu (Content-Type) -- comment les données reçues sont
  vraiment du HTML).

























  HOWTO Groupe d'Usagers Linux
  Kendall Grant Clark <mailto:kclark@cmpu.net>
  Version Française 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 développement d'un Groupe d'Usagers Linux (GUL).
  ______________________________________________________________________

  Table des matières
























































  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 Résumé

  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 développement 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. Activités 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 développer un GUL

  7. Implications légales et politiques

     7.1 Implications Légales
        7.1.1 Aux Etats-Unis
        7.1.2 Au Canada
     7.2 Implications Politiques
        7.2.1 Les gens ont des opinions différentes à propos des logiciels gratuits.
        7.2.2 Les organisations sans but lucratif et l'argent ne se mélangent pas très très bien.

  8. A propos de ce document

     8.1 Conditions d'Utilisation
     8.2 NdT: Dénégation
     8.3 Nouvelles versions
     8.4 Veuillez contribuer à ce HOWTO
     8.5 Historique du document
     8.6 Remerciements


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn



  11..11..  BBuuttss

  Le HOWTO Groupe d'Usagers Linux est destiné à servir de guide sur la
  fondation, le fonctionnement, et le développement d'un Groupe
  d'Usagers Linux (GUL).

  Linux est une implémentation d'Unix à distribution gratuite pour les
  ordinateurs personnels, les serveurs et les stations de travail. Il a
  été développé 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.


  11..22..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonnss

  Si vous désirez en apprendre plus sur Linux, le Linux Documentation
  Project <http://sunsite.unc.edu/LDP/> est un bon endroit pour
  démarrer.

  Pour des informations générales sur les groupes d'usagers
  d'ordinateurs, voyez l'Association of PC Users Groups
  <http://www.apcug.org/>.


  22..  QQuu''eesstt ccee qquu''uunn GGrroouuppee dd''UUssaaggeerrss LLiinnuuxx ??



  22..11..  QQuu''eesstt ccee qquuee LLiinnuuxx ??

  Pour apprécier et comprendre totalement le rôle significatif des GULs
  dans le Mouvement Linux, il est important de comprendre ce qui rend
  Linux unique parmi les nombreux autres systèmes d'exploitation.

  Linux en tant que système d'exploitation est très efficace et très
  puissant.  Mais, Linux en tant qu'iiddééee sur la manière dont les
  logiciels devraient être développés est encore plus puissante. Linux
  est un système d'exploitation ggrraattuuiitt; 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 développé
  par un groupe de programmeurs non structuré de par le monde, sous la
  direction technique de Linus Torvalds et d'autres développeurs clés.
  Linux est un mouvement mondial sans structure centrale, bureaucratie,
  ou entité pour contrôler, coordonner, ou diriger d'une queconque façon
  ses affaires.  Alors que cette situation cause pour une grande part
  l'attrait et de la qualité technique de Linux en tant que système
  d'exploitation, elle peut rendre peu efficace la gestion des
  ressources humaines, et inopérants, voire même nuisibles la promotion,
  les relations publiques, la formation et le perfectionnement des
  usagers.


  22..22..  EEnn qquuooii LLiinnuuxx eesstt--iill uunniiqquuee ??

  Cette structure lâche ne changera probablement pas en ce qui concerne
  Linux en tant que projet logiciel. Et c'est d'ailleurs une bonne
  chose. Linux fonctionne précisément parce que les gens sont libres
  d'aller et venir comme ils le veulent: ddeess pprrooggrraammmmeeuurrss lliibbrreess ssoonntt
  ddeess pprrooggrraammmmeeuurrss hheeuurreeuuxx,, qquuii ssoonntt ddeess pprrooggrraammmmeeuurrss eeffffiiccaacceess.

  Mais cette structure lâche peut rendre la vie de l'usager de Linux
  moyen un peu compliquée -- 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 réponses à 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 régionale'' de la
  Linux Corporation dans votre village, ville ou métropole, le GUL local
  joue le même rôle qu'une agence régionale 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 réalisé par de nombreux moyens : l'Internet, les
  consultants, les VARs, les compagnies de support, les universités et
  les grandes écoles. Mais, de plus en plus, dans de nombreux endroits
  autour du globe, ceci est fait par un GUL local.


  22..33..  QQuu''eesstt ccee qquu''uunn ggrroouuppee dd''uussaaggeerrss ??

  Les groupes d'usagers d'ordinateurs, du moins aux Etats-Unis, ne sont
  pas un phénomène nouveau; en fait, ils ont joué un rôle 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 accès personnel et bon
  marché aux ressources informatiques. Bien sûr, des géants comme IBM
  ont par la suite découvert 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 problèmes financiers du plus grand groupe
  d'usagers de tout les temps, la Boston Computer Society
  <http://www.bcs.org/> ont été médiatisés; mais aux U.S. la plupart des
  grands groupes d'usagers de PC ont vu un déclin de leurs adhésions
  réelles. A leur apogée, les groupes d'usagers américains ont concentré
  leurs forces sur la production de journaux, la maintenance de
  logiciels et de librairies de disquettes, de rencontres, de
  manifestations, et, quelquefois, même de BBS (Bulletin Board Systems).
  Avec l'avènement de l'Internet, toutefois, la plupart des services que
  les groupes d'usagers fournissaient autrefois, ont été transféré à des
  choses comme CompuServe, AOL, et le Web.

  L'essor de Linux, cependant, coïncida  avec et fut intensifié par la
  ``découverte'' par le grand public de l'Internet. Plus l'Internet
  devenait populaire, plus Linux le devenait également : l'Internet a
  apporté de nouveaux usagers, développeurs, et vendeurs au Mouvement
  Linux.

  Ainsi, juste quand les groupes d'usagers de PC traditionnels
  déclinaient à cause de la popularité de l'Internet, cette popularité a
  propulsé Linux en avant, créant une nouvelle demande pour de nouveaux
  groupes d'usagers dédiés exclusivement à Linux. Pour ne donner qu'une
  indication des différences 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 contrôle
  relativement serré sur les genres de logiciels que leurs usagers
  copiaient et vendaient lors des rencontres.  Alors que des copies
  illégales de logiciels commerciaux se faisaient certainement lors de
  ces rencontres, cette pratique était officiellement désapprouvée, 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
  désapprouver, 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 désire.


  22..44..  EEnn RRééssuumméé


  Afin que le Mouvement Linux continue à se développer, la
  prolifération, le succès des GULs locaux, entre autres facteurs, est
  une nécessité absolue. En raison du statut unique de Linux, le GUL
  local doit fournir quelques unes des fonctions d'une ``agence
  régionale'' 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 même servir de liaison aux media
  locaux comme les journaux et la télévision.


  33..  QQuuee ttrroouuvvee--tt--oonn ccoommmmee GGUULLss ??


  Etant donné que ce document est conçu pour être un guide non seulement
  pour le fonctionnement et le développement des GULs mais également
  pour leur fondation, il serait bon de déterminer quels GULs on peut
  trouver avant d'aller plus loin.


  33..11..  LLiisstteess ddee GGUULLss


  Il y a plusieurs listes de GULs disponibles sur le Web. Si vous
  désirez trouver un GUL local, l'une des premières choses à faire est
  de déterminer 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 planète,
  la Chine, ne semble pas encore avoir de GUL, et l'Inde, le deuxième
  pays le plus peuplé de la planète, 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 apparaît que la liste GLUE <http://www.ssc.com/glue/groups/> est
  plus complète pour les GULs américains, tandis que le LUG List Project
  <http://www.nllgg.nl/lugww/> offre une couverture plus internationale.


  33..22..  SSoolliiddaarriittéé ccoonnttrree ccoommmmooddiittéé


  Même 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 suggère, si vous considérez 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 hiérarchie régionale Usenet
  appropriée. S'il n'y a pas déjà 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 déjà un GUL dans votre ville, mais de l'autre côté,
  on peut préférer lancer un nouveau groupe par commodité. Mais on peut
  préférer 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 agréable d'avoir deux groupes de 100 membres chacun, il y
  a certains avantages à avoir un seul groupe de 200 membres. Bien sûr,
  si vous vivez dans une petite ville ou un village, un groupe vaut
  mieux que rien.

  Le fait est que lancer un GUL est tâche ardue, qu'il faut entreprendre
  en considérant tous les facteurs importants, y compris quelque
  estimation de l'effet sur les autres groupes.


  44..  QQuuee ffaaiitt uunn GGUULL ??


  Les buts des GULs locaux sont aussi variés 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 contrôle centralisé, et il en va de même
  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 façon
  particulière afin de satisfaire les besoins particuliers de ses
  adhérents.


  44..11..  PPrroommoottiioonn ddee LLiinnuuxx

  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 rôle des
  GULs dans la promotion de Linux ne peut pas être surestimé, surtout
  tant que l'acceptation commerciale à grande échelle de Linux, qu'il
  mérite tant, n'a pas encore été atteinte. C'est certes bénéfique 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 collègues, employés, 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 façon qui reflète positivement à la fois le
  produit, ses créateurs et développeurs, et nos collègues 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
  dépassée 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 réalité. Jusque là, toutefois, le GUL local joue un rôle
  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 à connaître Linux grâce 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 déjà en contact avec un GUL
  local ont un plus par rapport à ceux dont l'intérêt pour Linux a été
  provoqué par un journaliste informatique, mais qui n'ont personne vers
  qui se tourner pour les aider dans leur quête pour installer, lancer,
  et apprendre Linux.

  Il est, par conséquent, important pour les GULs locaux de promouvoir
  Linux car leur soutien est efficace, militant, et gratuit.



  44..22..  AApppprreennttiissssaaggee ddee LLiinnuuxx

  Le rôle d'un GUL local est non seulement de promouvoir l'utilisation
  de Linux, mais aussi de s'efforcer à entraîner ses membres, ainsi que
  le public informatique du secteur, à utiliser Linux et ses composants
  associés. D'après mon expérience personnelle, la formation des usagers
  est le but le plus important qu'un GUL doive prendre en charge. Bien
  sûr, ainsi que je l'ai déjà montré, les GULs sont parfaitement libres
  de s'organiser et d'organiser leurs activités 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
  entraînant 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'intermédiaire de
  laquelle un usager de Linux pourrait recevoir une formation technique.
  Alors que les universités, les grandes écoles et les lycées se
  tournent de plus en plus vers Linux pour former leurs étudiants, à la
  fois efficacement et à bon marché, à des systèmes d'exploitation de
  type Unix, quelques usagers de Linux sont soit incapables, soit non
  désireux de s'inscrire à des cours pour apprendre Linux. Pour ces
  usagers le GUL local est une ressource précieuse pour le développement
  ou la création de compétences techniques sur les technologies modernes
  : l'administration de systèmes Unix, la programmation système, le
  support et la création des technologies Internet et Intranet, etc.

  Par une déformation ironique, de nombreux GULs locaux se partagent
  même 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. Même si
  l'utilisation et la gestion d'un PC Linux à domicile n'est pas la même
  chose que l'administration d'une base de données pour des sociétés,
  d'un centre d'appel ou d'un service d'une telle envergure, c'est à des
  années lumières plus complexe, plus enrichissant et plus instructif
  que l'utilisation et l'administration d'un PC sous Windows 95 à la
  maison. Comme Linux lui-même progresse vers des choses comme les
  systèmes de fichiers tenant un journal, une grande disponibilité, la
  possibilité du temps réel, et autres spécificités à la pointe du
  progrès d'Unix, la ligne déjà floue entre Linux et les Unix ``réels''
  deviendra encore plus indistincte.

  Non seulement une telle formation est une sorte d'entraînement des
  employés, mais elle servira également, l'informatique devenant une
  partie vitale de l'économie globale, de service rendu à la communauté.
  Dans la plupart des zones métropolitaines 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 reliés aux grandes
  entreprises. Ceci accomplit la tâche de la promotion de Linux et aide
  également à informer le public sur Linux en tant que système
  d'exploitation Unix. Etant donné que de plus en plus de ces sortes
  d'organisations tentent d'établir une présence sur l'Internet ou de
  fournir des accès modem à leurs employés, étudiants, et constituants,
  l'opportunité grandit pour un GUL local de participer à la vie de leur
  communauté en l'éduquant sur un système d'exploitation gratuit et
  disponible gratuitement. Cette sorte de service rendu permet à
  l'usager classique de Linux d'adopter cette sorte de générosité qui a
  caractérisé Linux, et la communauté des logiciels gratuits, depuis le
  tout début. La plupart des usagers de Linux ne peuvent programmer
  comme Linus Torvalds, mais nous pouvons tous offrir notre temps et nos
  capacités 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 déployer ne
  nécessite pas de prendre des licences chères, ou de payer cher pour la
  maintenance ou la mise à jour. De plus, parce que Linux est
  techniquement élégant et économique, il tourne très 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 découvrent chaque
  jour, les vieux 486 prenant la poussière dans le grenier peuvent faire
  du vvrraaii ttrraavvaaiill 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 réaliser ses buts, plus la promotion devient simple, et donc,
  plus on peut en faire. Plus les usagers nouveaux et inexpérimentés
  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 détriment de
  l'éducation à Linux, les freins naturels à l'essor de l'organisation
  seront plus gênants. 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 expérimentés.

  La formation gratuite à un Linux gratuit montre également à quel point
  Linux est membre à part entière 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 série des programmes et utilitaires GNU,
  le serveur web Apache, l'implémentation XFree86 de X Window, TeX,
  LaTeX, etc. Heureusement la liste des logiciels gratuits qui tournent
  sous Linux est une liste longue et variée.

  Enfin, Linux est un système d'exploitation auto-documenté ; en
  d'autres termes, si nous n'écrivons pas la documentation, personne ne
  le fera pour nous. A cette fin, vérifiez 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. Considérez 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 développé par le GUL : présentations
  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 connaît.  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 problème , alors des personnes des autres
  GULs tout autour du monde auront les mêmes questions et problèmes.


  44..33..  SSuuppppoorrtt LLiinnuuxx

  Bien sûr pour le nnoouuvveeaauu désespéré le rôle 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


  44..33..11..  LLeess uussaaggeerrss

  Le sujet de plainte le plus fréquent des nouveaux usagers de Linux,
  une fois qu'ils ont réussi à installer Linux, se trouve être la courbe
  d'assimilation trop raide qui n'est pas du tout spécifique à Linux,
  mais qui est, plutôt, une caractéristique de tous les Unix modernes.
  Avec la raideur de la courbe d'assimilation, toutefois, vient la
  puissance et la flexibilité d'un système 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 même 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 très changeantes. Les
  GULs locaux sont un moyen d'information précieux 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
  systèmes peuvent bénéficier. 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 même que les
  publications _m_e_n_s_u_e_l_l_e_s, ils sont souvent périmés sur les corrections
  d'erreurs, les problèmes de sécurité, 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'expérimentés.

  Par exemple, jusqu'à ce qu'un nouvel usager de Linux sache que les
  noyaux les plus récents sont disponibles sur ftp.kernel.org
  <ftp://ftp.kernel.org> ou que le LLiinnuuxx DDooccuummeennttaattiioonn PPrroojjeecctt dispose
  généralement de versions plus récentes des HOWTOs qu'une distribution
  de Linux basée 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 rôle de
  support que les GULs locaux offrent aux nouveaux usagers : les usagers
  intermédiaires et expérimentés bénéficient aussi de la profusion de
  trucs, astuces et secrets sur Linux utiles et à jour. À cause de la
  complexité de Linux, même les usagers avancés 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 lycée.


  44..33..22..  LLeess ccoonnssuullttaannttss

  Il est, je pense, plutôt évident de prétendre que les GULs locaux
  doivent être impliqués dans l'aide aux nouveaux usagers de Linux.
  Après tout, s'ils ne sont pas supposés faire celà, que devraient-ils
  faire ? Ce qui est moins évident, c'est que le GUL local peut jouer un
  rôle 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 réponse à cette question est juste la réponse à une autre question:
  que désirent 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 façon
  informelle fournisseurs et demandeurs de consultation, simplement en
  attirant toutes, ou la plupart des personnes intéressées par Linux,
  dans un même lieu et en leur permettant de se parler.  La manière 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
  rôle. 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 enregistrés dans ce HOWTO.

  Cette relation est mutuellement bénéfique. 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 nécessitant 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
  problèmes --- 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 requérant un conseiller et
  celles qui n'en ont pas besoin est quelquefois indistincte ; mais dans
  la plupart des cas la différence est claire. Tant qu'un GUL local ne
  désire pas acquérir la réputation d'envoyer inutilement de nouveaux
  usagers aux conseillers --ceci étant une attitude grossière et très
  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 référer au Linux Consultants HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/Consultants-HOWTO.html> de Martin
  Michlmayr pour une liste internationale des conseillers Linux.


  44..33..33..  LLeess ppeettiitteess eennttrreepprriisseess,, oorrggaanniissaattiioonnss ssaannss bbuutt lluuccrraattiiff,, eett
  ééccoolleess

  Les GULs ont aussi l'opportunité de conseiller les petites entreprises
  et les organisations locales. Ce support présente deux aspects. Tout
  d'abord, les GULs peuvent conseiller les entreprises et les
  organisations qui désirent utiliser Linux comme part de leurs efforts
  d'informatisation et de développement technologique. Ensuite, les GULs
  peuvent aider les entreprises et les organisations locales qui
  développent 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 désirent utiliser Linux comme système pour leurs
  opérations informatiques n'est pas vraiment si différent de la sorte
  de support que les GULs donnent aux individus qui désirent 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, plutôt 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 désireux d'écrire pour et de porter
  sous Linux en tant que plateforme commercialement viable. Si les GULs
  locaux peuvent jouer un rôle dans l'aide des usagers commerciaux à
  évaluer des solutions commerciales Linux, alors de plus en plus de
  vendeurs de logiciels seront encouragés à considérer Linux dans leur
  développement et dans leurs plans.

  Ceci nous amène 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 très peu d'autres endroits. Par exemple:


  ·  Quel FAI est compatible Linux ?

  ·  Y a-t-il des vendeurs de matériel 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 réceptives à Linux, et il les encourage à
  continuer à l'être. Il peut même, dans certains cas, aider à
  contribuer à une atmosphère compétitive dans laquelle les autres
  entreprises sont encouragées à devenir également réceptives à Linux.


  44..33..44..  LLee ddéévveellooppppeemmeenntt ddee llooggiicciieellss ggrraattuuiittss

  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.


  44..33..44..11..  CChhrriiss BBrroowwnnee :: llaa pphhiillaanntthhrrooppiiee dduu llooggiicciieell ggrraattuuiitt

  Une étape supplémentaire peut être d'encourager financièrement le
  soutien d'organisations liées à Linux. Avec les plusieurs millions
  <http://counter.li.org> d'usagers de Linux, il pourrait être très
  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 dépensée cette année 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 développement d'outils et d'applications
  améliorés pour Linux.


  Un groupe d'usagers peut encourager ses membres à contribuer à divers
  ``projets de développement''. Si il obtient un quelconque ``crédit
  fiscal pour donation'', cela peut encourager les membres à contribuer
  directement au groupe, en obtenant des déductions 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 désireraient soutenir individuellement.


  Cette section liste les candidats possibles. Aucun n'est explicitement
  recommandé ici, mais la liste peut représenter une ``matière à
  penser'' intéressante. Beaucoup sont enregistrés comme étant d'utilité
  publique aux Etats-Unis, et sont donc déductibles des taxes
  américaines.


  Ici se trouvent les organisations dont les activités sont
  particulièrement dirigées vers le développement 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 création 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 dépense.


  Il y a aussi des organisations qui sont moins directement associées
  avec Linux qui peuvent néanmoins être utiles, comme:


  ·  League for Programming Freedom <http://www.lpf.org>


     Ce n'est pas une organisation spécifique à Linux ; ils sont
     impliqués dans des activités de promotion générale qui touchent les
     personnes impliquées dans le développement des logiciels.
     L'implication dans cette organisation représente 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'Amérique en informatique que vice-versa.


  ·  Le Projet des fonds pour LaTeX3


     Le TeX Users Group (TUG) <http://www.tug.org> travaille sur la
     version ``génération suivante'' du système de publication LaTeX,
     connu sous le nom de LaTeX3. Linux est l'une des plateformes sur
     lesquelles TeX et LaTeX sont le mieux supportés.

     Les donations pour le projet peuvent être envoyées à:


       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 indépendance vis-à-vis de la
     plateforme, ce qui rend leurs ``produits'' utilisables avec Linux.



  44..33..55..  LLee MMoouuvveemmeenntt LLiinnuuxx

  Je me suis référé tout au long de ce HOWTO à quelque chose que
  j'appelle le MMoouuvveemmeenntt LLiinnuuxx. Il n'y a réellement pas de meilleur
  moyen pour décrire le phénomène 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 succès continu de Linux. Et c'est là où le
  GUL local joue un rôle incalculable.

  La puissance du Mouvement Linux international repose sur le simple
  fait que Linux offre une puissance informatique et une sophistication
  sans précédent pour son coût et sa liberté. Les clés sont valeur et
  indépendance de tout contrôle propriétaire. A chaque fois qu'une
  nouvelle personne, groupe, entreprise ou organisation a l'opportunité
  d'être exposé à la valeur intrinsèque de Linux, le Mouvement Linux
  gagne en puissance et en nombre. Les GULs locaux peuvent rendre cela
  possible.


  44..44..  CCoonnvviivviiaalliittéé LLiinnuuxx

  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 très bien y avoir des GULs locaux
  quelque part dans le monde pour lesquelles la convivialité n'est pas
  une considération importante.

  Il semble, toutefois, que dès que deux ou trois usagers de Linux se
  retrouvent, la rigolade, et souvent, la bière seront au rendez-vous.
  Linus Torvalds a toujours eu un but persistant pour Linux : plus de
  plaisir.  Pour les programmeurs, les développeurs 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
  fenêtre ou du code. C'est le plaisir profond de Linux qui maintient en
  place de nombreux GULs, et c'est la sorte de plaisir amène beaucoup de
  GULs à la convivialité.

  Par la ``convivialité'', j'entends ici d'abord le partage
  d'expériences, 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'évènements par lesquels et grâce 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 armées des Etats-Unis et dans la plupart des pays, ce
  processus est appellé camp d'entraînement ou entraînement de base.
  C'est le processus par lequel des civils sont transformés 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 spécifique du mouvement
  Linux, ses demandes et ses opportunités uniques. Ceci peut être aussi
  simple que la manière dont les usagers de Linux d'une certaine région
  prononcent le mot ``Linux''. Ce peut être aussi profond que les
  manières par lesquelles les usagers de Linux doivent promouvoir, et
  les manières 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
  réel'', peut apparaître sur des listes de discussions et sur Usenet,
  alors que l'efficacité du dernier est constamment remise en question
  précisément par les usagers peu conviviaux. De mon point de vue, la
  convivialité donnée et reçue sont toutes deux rendus meilleures en
  compagnie d'êtres humains réels, en chair et en os, et non par des
  voix désincarnés sur une liste de discussion ou un groupe Usenet.



  55..  AAccttiivviittééss llooccaalleess dd''uunn GGUULL

  Dans la section précédente je me suis attaché exclusivement à ce que
  font les GULs et ce qu'ils devraient faire. Dans cette section je
  m'intéresserais principalement aux stratégies pratiques pour accomplir
  ces buts.

  Il y a, en dépit 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.


  55..11..  LLeess rreennccoonnttrreess

  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

  ·  présentations 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 systèmes 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


  55..22..  RReessssoouurrcceess eenn lliiggnnee

  L'essor commercial de l'Internet a grossièrement 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 développement 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 sûr 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 appropriée: sites Web, listes de
  diffusion, gopher, FTP, courrier électronique, WAIS, finger, news,
  etc.  Comme le monde du commerce le découvre actuellement, l'Internet
  peut être un moyen efficace pour faire de la publicité, pour informer,
  éduquer, ou même pour vendre. L'autre raison pour l'utilisation
  extensive des technologies Internet par les GULs est que l'essence
  même de Linux est de _f_o_u_r_n_i_r une plateforme stable et riche pour le
  déploiement de ces technologies. Ainsi non seulement les GULs les GULs
  bénéficient de, disons, l'établissement d'un site Web car il avertit
  de son existence et aide à organiser ses membres, mais en déployant
  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 intéressant; j'aimerais inclure votre groupe dans
  cette liste.




  66..  SSuuggggeessttiioonnss PPrraattiiqquueess

  Enfin, je désire faire quelques très pratiques, voire mondaines,
  suggestions pour tous ceux qui désirent fonder, faire fonctionner, ou
  faire grandir un GUL.


  66..11..  OOrrggaanniissaattiioonnss ddee ssoouuttiieenn ddeess GGUULLss


  Il y a plusieurs organismes qui offrent une assistance aux GULs
  locaux.


     GGLLUUEE
        le ``Groups of Linux Users Everywhere'' est un programme de
        coordination et de soutien aux groupes d'usagers fondé par le
        SSC, les mêmes 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 bénéfices à ses
        membres.


     LLiinnuuxx SSyysstteemmss LLaabbss
        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.


     LLiinnuuxx MMaallll UUsseerr GGrroouupp PPrrooggrraamm
        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>.


     CClleevveellaanndd LLiinnuuxx UUsseerr''ss GGrroouupp
        Possède 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 trouvées sur
        LUG.NET <http://www.lug.net/> ou en écrivant à Jeff Garvas.


     RReedd HHaatt SSooffttwwaarree''ss UUsseerr GGrroouupp PPrrooggrraamm
        Aident les GULs à se développer et à grandir. Plus
        d'informations peuvent être trouvées sur le Red Hat Web site
        <http://www.redhat.com/redhat/rhug.html>.



  66..22..  FFoonnddeerr uunn GGUULL



  ·  Déterminez le GUL le plus proche déjà existant

  ·  Annoncez vos intentions sur comp.os.linux.announce et sur la
     hiérarchie régionale appropriée

  ·  Annoncez votre intention où que se trouvent les usagers
     d'ordinateurs dans votre région: librairies, rencontres diverses,
     cybercafés, grandes écoles et universités, entreprises,
     fournisseurs d'accès Internet, etc.


  ·  Trouvez des entreprises ou des institutions amicales à Linux dans
     votre région qui pourraient peut-être vous aider à constituer votre
     GUL

  ·  Créez une liste de diffusion ou un moyen quelconque de
     communication entre les personnes qui expriment un intérêt à former
     un GUL

  ·  Demandez spécifiquement aux personnes clés une aide à la diffusion
     de votre intention de créer 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

  ·  Prévoyez une rencontre initiale

  ·  Discutez à cette réunion préalable des buts du GUL


  66..33..  FFaaiirree ffoonnccttiioonnnneerr eett ddéévveellooppppeerr uunn GGUULL



  ·  Mettre les barrières 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 détails sur les
     rencontres (qui, quoi, et où), et faire passer avant tout le
     contact et les mécanismes de réponse

  ·  Installer Linux à qui le désire

  ·  Envoyer des notes, des messages, ou des publicités où que soient
     les usagers d'ordinateurs dans votre région

  ·  Assurer une direction dédiée

  ·  Suivre le modèle 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 décisions devant les membres pour un vote

  ·  Créer une liste de diffusion dédiée au support technique, et
     demander aux 'gourous' d'y participer

  ·  Programmer une mixture de présentations avancées et basiques,
     formelles et informelles

  ·  Soutenir les efforts pour le développement 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 formalités légales de déclaration du
     groupe (en France, association loi de 1901, à la Préfecture).

  ·  Déterminer si votre lieu de rencontre risque de restreindre la
     croissance du GUL

  ·  Prévoyez vos rencontres en conjonction avec les grands meetings,
     les expositions informatiques, ou tout autre évènement
     communautaire où des usagers d'ordinateurs -- c.à.d, des convertis
     potentiels à Linux -- pourraient probablement se trouver

  ·  Elire la direction formelle du GUL le plus tôt possible : quelques
     postes utiles pourraient être Président, Trésorier, Secrétaire,
     Porte Parole (annonces générales, introductions de discours,
     remarques d'introduction et de clôture, etc.), Coordinateur
     Publicitaire (qui s'occupe des envois par Usenet et courrier
     électronique, et de la publicité locale), et Coordinateur du
     Programme (organise et prévoit 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 stratégies
     du GUL

  ·  Aidez Linux et le développement de Logiciels Gratuits en donnant un
     espace Web, une liste de diffusion, ou un site FTP

  ·  Créez un site FTP pour les logiciels appropriés

  ·  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

  ·  Faîtes de la publicité pour vos rencontres dans les groupes Usenet
     appropriés, dans les publications informatiques et les journaux
     locaux

  ·  Composez des matériaux promotionnels, comme des fichiers
     Postscript, par exemple, afin que les membres puissent aider à
     faire connaître le GUL dans les librairies, les magasins
     d'informatiques, les lieux de travail, etc.

  ·  Vérifiez que vous savez ce que les membres du GUL attendent des
     actions du GUL

  ·  Présentez des notices de presses aux médias locaux au sujet de tout
     évènement du GUL inhabituel comme une Fête 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 façon responsable l'utilisation de
     Linux

  ·  Profitez au maximum des connaissances particulières des membres du
     GUL

  ·  Maintenez de bonnes relations avec les vendeurs Linux, les
     compagnies, développeurs, etc.

  ·  Identifiez et contactez les consultants Linux de votre région

  ·  Reliez vous aux dirigeants d'autres GULs dans votre région,
     département, ou pays pour partager vos expériences, astuces, et
     ressources

  ·  Maintenez les membres du GUL avertis de l'état des logiciels Linux
     -- nouveaux noyaux, bugs, corrections, avertissements de sécurité
     -- et de l'état du monde Linux global -- nouveaux ports, problème
     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: présentations techniques, cours, HOWTOs locaux,
     etc.


  77..  IImmpplliiccaattiioonnss llééggaalleess eett ppoolliittiiqquueess


  77..11..  IImmpplliiccaattiioonnss LLééggaalleess


  77..11..11..  AAuuxx EEttaattss--UUnniiss

  C'est une affaire compliquée que d'organiser légalement un GUL local.
  Je n'en parlerais donc pas ici. Cependant, si vous êtes intéressé par
  l'organisation légale de votre GUL local, cette section vous
  présentera quelques-unes des démarches nécessaires.

  NNoottee:: cette section ne doit pas être utilisé en tant que conseil légal
  compétent.  Ces démarches nécessitent l'expertise d'un conseiller
  légal compétent; vous devez, avant d'agir sur l'un des constats faits
  dans cette section, consulter un avocat.

  Il y a au moins deux status légaux différents qu'un GUL local aux
  Etats-Unis peut obtenir:


  1. constitution en tant qu'organisation à but non lucratif

  2. exemption des taxes

  Même si ces status diffèrent 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 bénéfices 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 même l'exemption des taxes de franchise sur les
  entreprises, prélevées par chaque état.

  Alors que vous devrez consulter un conseiller légal compétent avant de
  constituer votre GUL en tant qu'organisation à but non lucratif, vous
  pouvez probablement réduire vos frais légaux si vous êtes familiers
  avec les démarches nécessaires 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 légal que d'un jugement par l'Internal Revenue Service (NdT: le
  fisc américain). Il est important pour vous de savoir que la
  constitution en tant qu'organisation à but non lucratif nnee vvoouuss aassssuurree
  ppaass que l'IRS décidera que votre GUL sera exempté de taxes. Il est
  possible d'avoir une association à but non lucratif qui nnee ssooiitt ppaass
  exemptée de taxes.

  L'IRS dispose d'un document relativement simple qui explique les
  critères et le processus d'exemption de taxes. Il s'agit de la
  PPuubblliiccaattiioonn 555577:: _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 aavvaanntt 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 déclaré exempt de taxes par l'IRS, il y
  a des moyens de constitution qui eemmppêêcchheerroonntt l'IRS de déclarer 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
  définit clairement les conditions nécessaires pour que votre GUL soit
  déclaré 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 matériel sera probablement adapté à votre GUL local.


  77..11..22..  AAuu CCaannaaddaa

  Merci à Chris Browne pour les commentaires suivants à propos de la
  situation au Canada.


  L'environnement fiscal canadien ressemble beaucoup à l'environnement
  américain, dans le sens où le status d'``organisation charitable''
  confère des avantages fiscaux similaires aux donateurs proches de ceux
  obtenus par le status "sans but lucratif", alors qu'ils nécessitent de
  remplir le même type de formulaires, afin que les autorités fiscales
  donnent et maintiennent le status certifié d'organisation charitable.


  77..22..  IImmpplliiccaattiioonnss PPoolliittiiqquueess

  Chris Browne <mailto:cbbrowne@hex.net> a à dire ce qui suit à propos
  des différentes sortes de dynamiques politiques inter-GUL qui voient
  souvent le jour.


  77..22..11..  LLeess ggeennss oonntt ddeess ooppiinniioonnss ddiifffféérreenntteess àà pprrooppooss ddeess llooggiicciieellss
  ggrraattuuiittss..

  Les usagers de Linux sont très diversifiés. Dès que vous tentez d'en
  mettre beaucoup ensemble, il y a _q_u_e_l_q_u_e_s problèmes qui peuvent
  apparaître. 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 tête 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
  bénéfice et profit. Sachez que beaucoup d'usagers des variantes BSD
  UNIX considèrent 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 ``privées'' de leurs OS sont
  préférables à l'``enforced permanent freeness'' de la GPL telle
  qu'appliquée à Linux. Ne présumez pas que toutes les personnes mettant
  en avant ce point de vue sont forcéments des sangsues cupides.


  Si ces personnes sont mises ensemble quelque part, des désaccords
  peuvent survenir.



  Les dirigeants doivent être clairs sur les faits suivants:


  ·  Il y a beaucoup d'opinions sur la GPL et sur la manière dont elle
     est supposée fonctionner. Il est facile de mal comprendre à la fois
     la GPL et les différentes licences alternatives.

  ·  Linux bénéficie de contributions de beaucoup d'endroits, et peut
     supporter quelques pique-assiettes, particulièrement 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-systèmes 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
  système 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 systèmes basés sur le Motorola 68000, ou
  entre les nombreux systèmes 8 bits des années 1970. Ou de KDE contre
  GNOME.


  Un dirigeant de GUL prudent veillera à aplanir les choses, plutôt qu'à
  les développer. Les dirigeants de GUL _d_o_i_v_e_n_t avoir la peau dure.


  Il y _a_u_r_a des désaccords tôt ou tard lorsque 2 points de vues
  différents se croiseront, et les dirigeants devront être capables de
  faire avec, en résolvant les désaccords au lieu d'en rajouter.


  77..22..22..  ttrrèèss ttrrèèss bbiieenn..  LLeess oorrggaanniissaattiioonnss ssaannss bbuutt lluuccrraattiiff eett
  ll''aarrggeenntt nnee ssee mmééllaannggeenntt ppaass

  Il est important de faire très 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 immédiat, les gens ne
  s'inquiètent pas beaucoup des 'détails agaçants' comme les
  déplacements possibles de sommes d'argents inexistantes.


  On ne peut pas en dire autant dans des organisations sans but
  lucratif.  Plusieurs personnes sont impliquées pour des raisons de
  principe, et peuvent aisément donner une attention non ordinaire à des
  problèmes mineurs. Et la possibilité d'une large participation à des
  rencontres d'affaire augmente la susceptibilité d'une attention non
  ordinaire au déroulement des choses.


  Par conséquent, il est probablement préférable pour cela de  _n_e _p_a_s
  demander de droit d'entrée pour le GUL, car cela procure une chose
  pour laquelle on peut raisonnablement demander des comptes. Les
  cotisations qui ne sont pas collectées ne peuvent pas, par le fait
  même qu'ils n'existent pas, être mal utilisées.


  S'il y _a beaucoup d'argent et/ou d'autres ressources du même 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 impliquée. Dans les organisations sans but lucratif
  troublées, les informations financières sont souvent détenues par
  quelqu'un qui ne cèdera pas de bon gré le contrôle des fonds.
  Idéalement, il doit y avoir _u_n _p_e_u de rotation des charges dans un
  GUL, y compris celle du contrôle des finances.


  Des rapports financiers réguliers devront être disponibles pour tout
  ceux qui les désireront. Un GUL qui maintient un 'status charitable'
  officiel pour les problèmes de taxes devra présenter au moins un
  rapport financier annuel aux autorités financières locales, ce qui
  représente un minimum de connaissances financières à la charge des
  membres.


  Avec la croissance des logiciels financiers sous Linux, il devrait
  être possible de créer des rapports de façon régulière. Avec la
  croissance de l'Internet, il devrait même être possible de publier ces
  résultats sur le World Wide Web.


  88..  AA pprrooppooss ddee ccee ddooccuummeenntt

  88..11..  CCoonnddiittiioonnss dd''UUttiilliissaattiioonn

  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>.


  88..22..  NNddTT:: DDéénnééggaattiioonn

  Vous utilisez les informations contenues dans ce document à vos
  propres risques. Nous déclinons toute responsabilité quant à son
  contenu.  L'utilisation des concepts, des exemples ou de tout autre
  contenu se fait entièrement à vos propres risques.

  Tous les droits sont détenus par leurs propriétaires 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 particulière ne constitue
  pas un endossement.

  Il est fortement conseillé d'effectuer une sauvegarde de votre système
  avant une installation importante ainsi qu'à intervalles réguliers.


  88..33..  NNoouuvveelllleess vveerrssiioonnss

  Les nouvelles versions du Linux User Group HOWTO seront périodiquement
  postées 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 françaises 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>.
  88..44..  VVeeuuiilllleezz ccoonnttrriibbuueerr àà ccee HHOOWWTTOO

  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
  tirés de la réalité des choses décrites ici.  J'aimerais également
  ajouter une section sur les GULs en dehors des Etats-Unis, puisque ce
  HOWTO tel qu'il est maintenant est plutôt centré sur les US. Veuillez
  me faire savoir si votre groupe fait des choses qui devraient être
  mentionnées dans ce HOWTO.


  88..55..  HHiissttoorriiqquuee dduu ddooccuummeenntt


  ·  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 légales et organisationnelles

  ·  1.3.1: édition générale pour la clarté et la concision

  ·  1.4: édition générale, ajout de nouvelles ressources GULs

  ·  1.4.1: édition générale pour la clarté

  ·  1.5: ajout de quelques ressources, quelques discussions sur la
     documentation du GUL, et édition générale

  ·  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 réorganisations mineures

  ·  1.6: ajout du matériel de Chris Browne: donations philantropiques
     pour Linux et considérations politiques du GUL

  ·  1.6.1: additions très mineures

  ·  1.6.2: corrections mineures


  88..66..  RReemmeerrcciieemmeennttss

  Je voudrais remercier toutes les personnes excellentes que j'ai
  rencontré et avec qui j'ai travaillé lorsque j'étais Président 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 spécialement 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 idées sur les donations financières en tant que moyen de
  participer à Linux et au mouvement des logiciels gratuits, et sur les
  différentes sortes de politiques qui peuvent grandir dans les GULs.

  De plus, les personnes suivantes ont fait des commentaires et des
  suggestions très 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 matériel ou de logiciel, mais complètent les produits exis­
  tants. Ce Howto est maintenu par M. Poet <poet@linuxports.com>
  ______________________________________________________________________

  Table des matières






















































  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 Serverlösungen 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-Lösungen 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. Brésil

     9.1 Dextra Soluções em Informática

  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 Alcôve

  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


  ______________________________________________________________________

  11..  ÀÀ pprrooppooss ddee ccee ddooccuummeenntt


  Ceci est le Var Howto pour Linux. Ce Howto contient une liste de
  compagnies qui ne fabriquent pas de matériel ou de logiciel, mais
  complètent les produits existants. Ce complément 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 matériel
  pré-configuré destiné à faire tourner Linux. Les compagnies offrant
  d'autres services sont invitées à contacter le responsable
  poet@linuxports.com <poet@linuxports.com> pour être dans la liste.


  Si vous contactez une des compagnies listées 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 placées sur ce site en
  premier. Vérifiez que la version que vous avez est la dernière mise à
  jour.
  Les compagnies vendant du matériel destiné à Linux sont invitées à
  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 :
       Téléphone :
       Fax :
       E-mail :
       URL :
       Responsable (Nom de la personne à contacter) :
       Architecture (Intel, Alpha, SPARC) :
       Distribution(s) de Linux (ex. Debian GNU, Red Hat, ...) :
       Expertise spéciale :




  NNoottee dduu ttrraadduucctteeuurr::

  Le mot VAR signifie revendeur de produits modifiés. Cela veut dire
  qu'une compagnie achète des produits à autre compagnie, complète ces
  produits (ex: support logiciel ou matériel) et les revend.



  22..  IInnffoorrmmaattiioonn ssuurr llee CCooppyyrriigghhtt


  Ce Howto est protégé par le Copyright © 1997, 1998 par Martin
  Michlmayr.


  Ce Howto est protégé par le Copyright © 1999 par Mr. Poet et
  LinuxPorts


  Des copies peuvent être reproduites ou distribuées 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 utilisées sans le consentement
  préalable de l'auteur. Un travail dérivé 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 apprécierait qu'on l'en prévienne.


  En bref, nous souhaitons développer une dissémination de ce document
  via autant de voies de communication que possible. Toutefois, nous
  souhaitons conserver le Copyright sur les documents HOWTOs, et
  souhaitons être informés de tout projet de redistribution de ces
  HOWTOs.


  Nous voulons que toutes les informations fournies dans les HOWTOs
  soient davantage disséminées. Si vous avez des questions, contactez
  Tim Bynum, le coordinateur des HOWTOs de Linux linux-
  howto@sunsite.unc.edu.



  33..  AAffrriiqquuee dduu SSuudd




  33..11..  SSyymmpphhoonnyy RReesseeaarrcchh ((PPttyy)) LLttdd




       6 Woodlands Road
       Victoria 2192, Johannesburg
       Afrique du Sud






     TTéélléépphhoonnee ::
        +27 11 728 5742



     FFaaxx ::
        +27 11 492 1058



     EE--mmaaiill ::
        info@sr.co.za



     UURRLL ::
        http://sr.co.za <http://sr.co.za>



     CCoonnttaacctt ::
        Evan Summers



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Réseau TCP/IP, technologie clients limitée



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        4 août 1997
  44..  AAlllleemmaaggnnee


  44..11..  bbeeee BBaaaassttrruupp EEDDVV--EEnnttwwiicckklluunngg GGmmbbHH




       Mallinkrodtstrasse 7
       D-44145 Dortmund
       Allemagne






     TTéélléépphhoonnee ::
        +49 231 9812060



     FFaaxx ::
        +49 231 9812062



     EE--mmaaiill ::
        info@bee.de



     UURRLL ::
        http://www.bee.de <http://www.bee.de>



     CCoonnttaacctt ::
        Jörn Baastrup, Jürgen Stanke, Wiebke Schrader



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::

     ·  Allemagne : DLD et S.u.S.E.

     ·  International : Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::

     ·  Serveurs Linux et stations de travail configurés

     ·  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 différents composants pour les utilisateurs de
        Linux.  Les cartes série multi-ports Cyclades, cartes ICN ISDN,
        adaptateurs DPT SCSI, contrôleurs RAID, cartes ``chien de
        garde'' du matériel Berkshire, adaptateurs graphiques ELSA pour
        les serveurs XFree86 et/ou le serveur X11 Xinside, logiciels
        commerciaux pour Linux.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        6 mars 1997

  44..22..  ddccpp,, ddeessiiggnn++ccoommmmeerrcciiaall ppaarrttnneerr GGmmbbHH




       Alfredstr. 1
       D-22087 Hamburg
       Allemagne






     TTéélléépphhoonnee ::
        +49 40 2540850



     FFaaxx ::
        +49 40 25408599



     EE--mmaaiill ::
        info@dcp.de



     UURRLL ::
        http://www.dcp.de <http://www.dcp.de>



     CCoonnttaacctt ::
        Ottmar Röhrig, Frank Hellmann



     AArrcchhiitteeccttuurree ::
        Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Stations de travail haut de gamme avec un processeur Alpha à 500
        MHz et Linux


     DDeerrnniièèrree mmiissee àà jjoouurr ::
        5 août 1997

  44..33..  GGIISSMMAA EEDDVV SSyysstteemm && SSeerrvviiccee GGmmbbHH




       Spitalgasse 23
       D-96450 Coburg
       Allemagne






     TTéélléépphhoonnee ::
        +49 9561 8824 x0



     FFaaxx ::
        +49 9561 8824 x24



     EE--mmaaiill ::
        a.huemmer@gisma.de



     UURRLL ::
        http://www.gisma.de <http://www.gisma.de> http://www.gisma-
        edv.com <http://www.gisma-edv.com>



     CCoonnttaacctt ::
        Andreas Hummer



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        S.u.S.E. avec quelques modifications



     EExxppeerrttiissee ssppéécciiaallee ::
        Construit et configure des gros systèmes pour Linux



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        5 mars 1998

  44..44..  iinnnnoommiinnaattee MMuullttiiffuunnkkttiioonnaallee SSeerrvveerrllöössuunnggeenn uunndd

  IT-Dienstleistungen GbR


       Stresemannstrasse 128
       10117 Berlin
       Allemagne






     TTéélléépphhoonnee ::
        +49 30 202 90 477



     FFaaxx ::
        +49 30 202 90 249



     EE--mmaaiill ::
        info@innominate.de



     UURRLL ::
        http://innominate.de <http://innominate.de>



     CCoonnttaacctt ::
        Sascha Ottolski



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et Anfrage



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Nous proposons des serveurs de communications ("Lingo")
        entièrement configurés sur la base d'une distribution Linux de
        type "Red Hat".  Outre l'accès à 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
        même, ou entre différents lieux ainsi qu'à travers Internet. De
        plus, Lingo offre toute la palette des fonctionnalités 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 maîtriser ses coûts (statistiques  portant sur les
        liaisons RNIS, compatibilité au niveau IP, les fonctions de
        proxy et les connexions à Internet). Afin d'éviter les accès
        illicites, Lingo dispose en outre de mécanismes de protection de
        type Firewall et de cryptage.





     EExxppeerrttiissee ssppéécciiaallee ((eenn aalllleemmaanndd)) ::
        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
        Telearbeitsplätze per ISDN oder Modem realisiert.  Lingo
        organisiert den EMail-Verkehr am Standort, zwischen den
        Standorten und ins Internet.  Außerdem bietet Lingo komplette
        File-, Print- Voice- und Fax-Serverfunktionalität für 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 verfügt Lingo außerdem über
        mehrere Firewall-Schutzmechanismen und Online-Verschlüsselung.




     DDeerrnniièèrree mmiissee àà jjoouurr ::
        27 septembre 1997

  44..55..  LLIINNUUXXHHAAUUSS




       Ringbahnstrasse 13
       D-10711 Berlin
       Allemagne






     TTéélléépphhoonnee ::
        +49 30 890 944 63



     FFaaxx ::
        +49 30 890 944 64



     EE--mmaaiill ::
        info@linuxhaus.de



     UURRLL ::
        http://www.linuxhaus.de <http://www.linuxhaus.de>



     CCoonnttaacctt ::
        Jörg Frühbrodt



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Debian GNU/Linux, RedHat et S.u.S.E.
     EExxppeerrttiissee ssppéécciiaallee ::
        Bases de données, Serveurs Internet et firewalls



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        25 octobre 1998

  44..66..  nneett EEssttaattee




       Am Blütenanger 8
       D-80995 München
       Allemagne






     TTéélléépphhoonnee ::
        +49 89 15820444



     FFaaxx ::
        +49 89 15820445



     EE--mmaaiill ::
        info@netestate.de



     UURRLL ::
        http://www.netesate.de <http://www.netestate.de>



     CCoonnttaacctt ::
        Michael Brunnbauer



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        net Estate possède sa propre distribution



     EExxppeerrttiissee ssppéécciiaallee ::
        Serveurs Internet, serveurs proxy, serveurs courrier et news,
        firewalls



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        4 août 1997

  44..77..  PPRROONNEETTIICCSS




       Märkische Strasse 117
       D-44141 Dortmund
       Allemagne






     TTéélléépphhoonnee ::
        +49 231 557203 0



     FFaaxx ::
        +49 231 557203 27



     EE--mmaaiill ::
        sales@pronetics.de



     UURRLL ::
        http://www.pronetics.de <http://www.pronetics.de>



     CCoonnttaacctt ::
        Horst Hohmeier



     AArrcchhiitteeccttuurree ::
        Intel et PowerPC



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        GNU



     EExxppeerrttiissee ssppéécciiaallee ::
        Serveurs Internet, serveurs proxy, serveurs courrier et news,
        firewalls



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        11 avril 1997

  55..  AArrggeennttiinnee


  55..11..  IIWWCCCC AArrggeennttiinnaa




  Libertidad 2472
  Florida, CP 1602
  Buenos Aires
  Argentine






     TTéélléépphhoonnee ::
        +54 1 791 9877, +54 1 781 9710



     FFaaxx ::
        +54 1 791 9877



     EE--mmaaiill ::
        godel@iwcc.com



     UURRLL ::
        http://www.iwcc.com.ar <http://www.iwcc.com.ar>



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat




     EExxppeerrttiissee ssppéécciiaallee ::
        Serveurs Linux pour serveurs Internet, firewalls, ainsi que des
        produits spéciaux appelés Linux VNET. Connectez votre réseau LAN
        tout entier à Internet avec une adresse IP et une ligne
        téléphonique.




     DDeerrnniièèrree mmiissee àà jjoouurr ::
        12 octobre 1997

  66..  AAuussttrraalliiee


  66..11..  IIPPAAXX SSyysstteemmss





       GPO Box 94A
       Melbourne, 3001
       Australie

     TTéélléépphhoonnee ::
        +61 3 9887 1984



     FFaaxx ::
        +61 3 9801 8533



     EE--mmaaiill ::
        info@ipax.com.au



     UURRLL ::
        http://www.ipax.com.au <http://www.ipax.com.au>



     CCoonnttaacctt ::
        Adam Neat



     AArrcchhiitteeccttuurree ::
        Intel et SPARC



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Administration de réseau, serveurs de fichiers, d'impression et
        de courrier pour réseaux LAN, personnalisation des bases de
        données, installation de systèmes.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        28 novembre 1997

  77..  AAuuttrriicchhee


  77..11..  DDEEAASS EEDDVV--LLöössuunnggeenn GG..mm..bb..HH..





       Mariahlilfer Str. 74B
       A-1070 Wien
       Autriche






     TTéélléépphhoonnee ::
        +43 1 522 72 51 0

     FFaaxx ::
        +43 1 522 72 52



     EE--mmaaiill ::
        deas@deas.co.at



     UURRLL ::
        http://www.deas.co.at <http://www.deas.co.at>



     CCoonnttaacctt ::
        Andreas Gudorf <gudorf@deas.co.at>



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Principalement Red Hat et S.u.S.E. mais aussi Debian et DLD


     EExxppeerrttiissee ssppéécciiaallee ::
        Firewall, Web, serveurs de fichiers et FTP


     DDeerrnniièèrree mmiissee àà jjoouurr ::
        12 juillet 1998

  77..22..  QQuuaanntt XX EEDDVV--GGeess..mm..bb..HH..





       Hintnausdorf 14/1
       A-9300 St. Veit/Glan
       Autriche






     TTéélléépphhoonnee ::
        +43 4212 60040



     FFaaxx ::
        +43 4212 60044 20



     EE--mmaaiill ::
        support@quant-x.com



     UURRLL ::
        http://www.quant-x.at <http://www.quant-x.at>



     CCoonnttaacctt ::
        Wolfgang Dreyer



     AArrcchhiitteeccttuurree ::
        Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        9 août 1997

  88..  BBeellggiiqquuee


  88..11..  AABBVV CCoommppuutteerr ssaa//nnvv..





       rue Lambiotte 81
       B-1050 Bruxelles
       Belgique






     TTéélléépphhoonnee ::
        +32 2 2151234



     FFaaxx ::
        +32 2 7327482



     EE--mmaaiill ::
        bates@student.fsa.ucl.ac.be



     UURRLL ::
        http://web.arcadis.be/abv <http://web.arcadis.be/abv>



     CCoonnttaacctt ::
        James Bates



     AArrcchhiitteeccttuurree ::
        Intel et SPARC



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Serveur Odyssée (dérivé de la version Slackware 3.2)



     EExxppeerrttiissee ssppéécciiaallee ::
        Environnement complexe de réseaux : connexion, Internet,
        Intranet, ISDN, intégration avec Novell NetWare(3.11 ou plus) et
        avec IBM AS/400, et autres...



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        16 août 1997


  88..22..  BBeeFFrreeee SSAA..NNVV BBeellggiiuumm





       4, rue d'Aineffe
       B-4317 Borlez Faimes
       Belgique






     TTéélléépphhoonnee ::
        +32 19 566115




     FFaaxx ::
        +32 19 567337




     EE--mmaaiill ::
        tech@befree.be




     UURRLL ::
        http://www.befree.be <http://www.befree.be>




     CCoonnttaacctt ::
        Alexandre J.D. Dulaunoy




     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et une distribution propre pour des
        systèmes embarqués.



     EExxppeerrttiissee ssppéécciiaallee ::
        Nous développons vos applications critiques sous Linux. Nous
        construisons des inter-réseaux complexes avec radiophonie pour
        WAN et MAN. Nous avons d'autres systèmes ou des serveurs dédiés
        à Linux pour le monde réel.  Nous fournissons un service "Open
        Source" sur toute la Belgique.


     DDeerrnniièèrree mmiissee àà jjoouurr ::
        30 juin 1998

  88..33..  BBeetttteerr AAcccceessss NN..VV..





       Geldenaakse Vest 6
       B-3000 Leuven
       Belgique






     TTéélléépphhoonnee ::
        +32 16 298045



     FFaaxx ::
        +32 16 298046



     EE--mmaaiill ::
        jacko@ba.be



     UURRLL ::
        http://www.ba.be <http://www.ba.be>



     CCoonnttaacctt ::
        Jan Guldentops



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC


     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux et Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Facilité de tests, connexion et configuration Internet et
        Intranet, sécurité (VPN, firewalls, vérifications),
        développement technique WEB, consultant en Informatique (en
        général) sur IT



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        30 juin 1997

  99..  BBrrééssiill



  99..11..  DDeexxttrraa SSoolluuççõõeess eemm IInnffoorrmmááttiiccaa




       Av. José de Souza Campos, 1815 cj. 1205
       13025-320 Campinas, SP
       Brésil






     TTéélléépphhoonnee::
        +55 19 251 3644


     FFaaxx::
        +55 19 253 0440


     EE--mmaaiill::
        staff@dextra.com.br


     UURRLL::
        http://www.dextra.com.br


     CCoonnttaacctt::
        Bill Coutinho


     AArrcchhiitteeccttuurree::
        Intel.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Red Hat.


     EExxppeerrttiissee ssppéécciiaallee::
        Firewalls et VPN, accès à Internet pour LANs, serveurs Intranet,
        serveurs d'impressions et disques pour LANs Windows, serveurs
        pour les Fournisseurs d'Accès à Internet (FAI).
     DDeerrnniièèrree mmiissee àà jjoouurr::
        2 octobre 1998.



  1100..  CCaannaaddaa


  1100..11..  CCeennttuurriioonn SSeerrvviicceess




       9351 Blundell Road
       Richmond, BC V6Y 1K5
       Canada






     TTéélléépphhoonnee ::
        +1 604 279 1857



     FFaaxx ::
        +1 604 279 1800



     EE--mmaaiill ::
        jwalter@rogers.wave.ca



     UURRLL ::
        http://www.ipipeline.net/centurion
        <http://www.ipipeline.net/centurion>




     CCoonnttaacctt ::
        Jan Walter



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et Slackware



     EExxppeerrttiissee ssppéécciiaallee ::
        Intégration des systèmes non Unix. Intranet, Internet, bases de
        données, courrier. Conception de serveurs




     DDeerrnniièèrree mmiissee àà jjoouurr ::
        3 septembre 1997

  1100..22..  ddoottccoomm MMaarrkkeettiinngg CCoorrppoorraattiioonn




       #500-1168 Hamilton Street
       Vancouver, BC V6B 2S2
       Canada






     TTéélléépphhoonnee ::
        +1 604 664 7455



     FFaaxx ::
        +1 604 664 7465



     EE--mmaaiill ::
        info@dotcom.bc.ca



     UURRLL ::
        http://www.dotcom.bc.ca <http://www.dotcom.bc.ca>



     CCoonnttaacctt ::
        Graham TerMarsch graham@dotcom.bc.ca



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        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 systèmes. Possibilité de développement de logiciels
        personnalisés sur demande.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        16 octobre 1997


  1100..33..  HHaarrdd DDaattaa LLttdd..




       11060 - 166 Avenue
       Edmonton, AB T5X 1Y3
       Canada






     TTéélléépphhoonnee ::
        +1 403 456 1510



     FFaaxx ::
        +1 403 456 1510



     EE--mmaaiill ::
        harddata@bigfoot.com



     CCoonnttaacctt ::
        Maurice Hilarius, Michal Jaegermann



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat et S.u.S.E.



     EExxppeerrttiissee ssppéécciiaallee ::
        Samba, sous-systèmes de disque de grande capacité et de haute
        performance, RAID, applications de bibliothèques de données,
        systèmes Digital Alpha, communication, applications en réseau et
        configuration.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        3 novembre 1997

  1100..44..  KKwwaann''ss RReesseeaarrcchh LLaabboorraattoorryy




       Markham
       Ontario
       Canada



     EE--mmaaiill ::
        e_lib@hotmail.com



     UURRLL ::
        http://www.geocities.com/ResearchTriangle/5461
        <http://www.geocities.com/ResearchTriangle/5461>



     CCoonnttaacctt ::
        Derek Kwan



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et Slackware



     EExxppeerrttiissee ssppéécciiaallee ::
        Conception et optimisation des systèmes d'après les besoins des
        utilisateurs.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        28 novembre 1997

  1100..55..  SSoouunndd SSooffttwwaarree LLttdd..




       20 Abelard Avenue
       Brampton, ON L6Y 2K8
       Canada






     TTéélléépphhoonnee ::
        +1 905 452 0504



     FFaaxx ::
        +1 905 452 9754



     EE--mmaaiill ::
        sales@telly.org



     UURRLL ::
        http://www.telly.org/sound <http://www.telly.org/sound>
     CCoonnttaacctt ::
        Evan Leibovitch



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux



     EExxppeerrttiissee ssppéécciiaallee ::
        EDI, Progress DB, intégration Internet, migration vers SCO/Unix.
        Partenaire agré de Caldera Business.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        5 août 1997

  1111..  ÉÉttaattss--UUnniiss


  1111..11..  AAppeeXX SSyysstteemmss IInntteeggrraattiioonn CCoorrpp..




       P.O. Box 338
       Apex, NC 27502-0338
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 919 468 8150



     FFaaxx ::
        +1 919 468 5288



     EE--mmaaiill ::
        apex@2boot.com



     UURRLL ::
        http://www.apex.com <http://www.apex.com>



     CCoonnttaacctt ::
        Joe Ferguson



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat, Slackware et S.u.S.E.



     EExxppeerrttiissee ssppéécciiaallee ::
        Personnalise les systèmes, télécommunication, industrie



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        28 février 1998

  1111..22..  AASSLL WWoorrkkssttaattiioonnss,, IInncc..




       2342 Shade Tree Lane
       San Jose, CA 95131
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 408 923 3837



     FFaaxx ::
        +1 408 923 4615



     EE--mmaaiill ::
        info@aslab.com



     UURRLL ::
        http://www.aslab.com <http://www.aslab.com>



     CCoonnttaacctt ::
        Jeff Nguyen



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Craftworks et Red Hat


     EExxppeerrttiissee ssppéécciiaallee ::
        Personnalise les serveurs et les stations de travail avec
        jusqu'à 4Go de mémoire et supporte RAID niveaux 0, 1 et 5. Des
        tiroirs extractibles personnalisés sont aussi disponibles.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        6 mars 1997

  1111..33..  AAppaacchhee DDiiggiittaall CCoorrppoorraattiioonn




       777 Main Ave. Suite 211
       Durango, CO 81301
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 970 259 8153



     FFaaxx ::
        +1 970 259 8145



     EE--mmaaiill ::
        info@apache.com



     UURRLL ::
        http://www.apache.com <http://www.apache.com>



     CCoonnttaacctt ::
        Mark Wauchope



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et Slackware



     EExxppeerrttiissee ssppéécciiaallee ::
        Service spécialisé dans les configurations innd, httpd, ftpd,
        telnetd, sendmail, POP3, radius, procmail, etc. Très utile pour
        les Fournisseurs d'Accès à Internet et les administrateurs
        réseau.


     DDeerrnniièèrree mmiissee àà jjoouurr ::
        4 août 1997

  1111..44..  BBrraaiinnSSttoorrmm TTeecchhnnoollooggiieess




       5836 Florrence Boulevard
       Omaha, NE 68110
       États-Unis d'Amérique






     TTéélléépphhoonnee::
        +1 402 690 7306


     FFaaxx::
        +1 402 733 8499


     EE--mmaaiill::
        info@bstc.net


     UURRLL::
        http://www.bstc.net


     CCoonnttaacctt::
        Brian Roberson


     AArrcchhiitteeccttuurree::
        Intel.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Red Hat.


     EExxppeerrttiissee SSppéécciiaallee::
        Solutions complètes (logiciels et matériels) pour maitrîser la
        puissance de Linux dans votre actuel système informatique.
        Spécialisés dans les Fournisseurs d'Accès à Internet (FAI),
        besoins LAN/WAN, administration de systèmes, formation générale.


     DDeerrnniièèrree mmiissee àà jjoouurr::
        1 octobre 1998.


  1111..55..  TThhee CCoommppuutteerr UUnnddeerrggrroouunndd,, IInncc..




       1357 West Lane Avenue, Suite 210
       Columbus, OH 43221
       États-Unis d'Amérique


     TTéélléépphhoonnee::
        +1 614 485 0506, +1 888 485 5865


     EE--mmaaiill::
        president@tcu-inc.com


     UURRLL::
        http://www.tcu-inc.com


     CCoonnttaacctt::
        Mark Nielsen


     AArrcchhiitteeccttuurree::
        Intel.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Caldera OpenLinux, Debian GNU, Red Hat et  S.u.S.E.


     EExxppeerrttiissee ssppéécciiaallee::
        Réseaux, programmation et intégration de Linux dans des
        environements multi-systèmes.


     DDeerrnniièèrree mmiissee àà jjoouurr::
        1 octobre 1998.


  1111..66..  DDCCGG CCoommppuutteerrss IInncc..




       4 Sanborn Road, Suite 2
       Londonderry, NM 03053
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 603 421 1800



     FFaaxx ::
        +1 603 421 0911



     EE--mmaaiill ::
        sjg@dcginc.com



     UURRLL ::
        http://www.dcginc.com <http://www.dcginc.com>


     CCoonnttaacctt ::
        Stephen J.Gaudet



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Debian GNU et Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Systèmes personnalisés utilisant Linux ou Digital Unix



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        9 août 1997

  1111..77..  EEnntteerrpprriissee CCoommppuutteerr CCoonnssuullttiinngg




       327 E Main Street Suite E
       Jackson, OH 45640
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 740 286 0151



     FFaaxx ::
        +1 740 286 7236



     EE--mmaaiill ::
        ecc@nternet.net



     CCoonnttaacctt ::
        Matt Borghese



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat et Slackware


     EExxppeerrttiissee ssppéécciiaallee ::
        Configuration de serveurs Internet, serveurs de connexion mask
        IP et matériels ISP



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        12 décembre 1997

  1111..88..  IInntteerrnnaattiioonnaall TTeecchhnnoollooggyy SSaalleess




       500 North Cary Algonguin Road
       Cary, IL 60013
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 847 639 0775



     FFaaxx ::
        +1 847 639 0710



     EE--mmaaiill ::
        rip@itsinfonet.com



     UURRLL ::
        http://www.itsinfonet.com <http://www.itsinfonet.com>



     CCoonnttaacctt ::
        Clarence Fleming



     AArrcchhiitteeccttuurree ::
        Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        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, systèmes Digital et des produits Digital pour les
        réseaux.  En tant que vendeur agréé de produits Digital, nous
        vendons des cartes et systèmes 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'hébergement de sites webs.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        18 mars 1998

  1111..99..  LLAANNDD--55 CCoorrppoorraattiioonn




       9747 Businesspark Avenue
       San Diego, CA 92126
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 800 526 3885



     FFaaxx ::
        +1 619 566 3611



     EE--mmaaiill ::
        sales@land-5.com



     UURRLL ::
        http://www.land-5.com <http://www.land-5.com>



     CCoonnttaacctt ::
        David Licosati



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        RAID, tolérence erreurs


     DDeerrnniièèrree mmiissee àà jjoouurr ::
        15 juillet 1998


  1111..1100..  LLiinnuuxx HHaarrddwwaarree SSoolluuttiioonnss,, IInncc..




       130 North Front Street
       Wilmington, NC 28401
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 888 LINUXHW, +1 910 251 9998



     FFaaxx ::
        +1 910 251 8832



     EE--mmaaiill ::
        info@linux-hw.com



     UURRLL ::
        http://www.linux-hw.com <http://www.linux-hw.com>



     CCoonnttaacctt ::
        Kit Cosper <cosper@linux-hw.com>



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux et Red Hat



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        3 novembre 1997

  1111..1111..  MMiiccrrooUUnniixx SSyysstteemmss




       15391 Turquoise Circle North
       Chino Hills, CA 91709
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 909 597 3592



     FFaaxx ::
        +1 909 393 5312



     EE--mmaaiill ::
        markjc@microux.com



     UURRLL ::
        http://www.microux.com <http://www.microux.com>



     CCoonnttaacctt ::
        Mark J. Carrozza



     AArrcchhiitteeccttuurree ::
        PowerPC



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Administration AIX 4.2



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        26 juin 1998

  1111..1122..  MMiiccrroowwaayy




       Research Park, Box 79
       Kingston, MA 02364
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 508 746 7341



     FFaaxx ::
        +1 508 746 4678


     EE--mmaaiill ::
        annf@microway.com



     UURRLL ::
        http://www.microway.com <http://www.microway.com>



     CCoonnttaacctt ::
        Ann Fried



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Nous avons des années d'expérience dans le système Unix et les
        hautes performances numériques des PC



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        13 août 1997

  1111..1133..  NNeett EExxpprreessss




       3205 Isherwood Way
       Fremont, CA 94536
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 510 494 9493 (seulement pour les universités et le
        gouvernement)



     FFaaxx ::
        +1 510 790 2342



     EE--mmaaiill ::
        sales@netex.tdl.com tech@netex.tdl.com



     UURRLL ::
        http://www.tdl.com/~netex <http://www.tdl.com/~netex>
     CCoonnttaacctt ::
        Roland Baker



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Toutes les distributions disponibles



     EExxppeerrttiissee ssppéécciiaallee ::
        Stations de travail Linux hautes performances et serveurs SMP
        pour les universités américaines, le gouvernement américain, les
        scientifiques, les ingénieurs et l'industrie des
        télécommunications. Châssis avec tiroir extractible, serveurs
        Internet pré-configurés, matériel WAN sont disponibles. Notre
        site web contient des informations techniques sur la conception
        et la création de systèmes Linux à très haute performance à
        partir du matériel PC. Visitez notre site web
        <http://www.tdl.com/~netex> pour plus d'informations.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        8 août 1997

  1111..1144..  PPaacciiffiicc IInntteerrnneett




       600 Corporate Pointe, Suite 100
       Culver City, CA 90230
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 310 410 9700



     FFaaxx ::
        +1 310 215 8071



     EE--mmaaiill ::
        sales@pacnet.com



     UURRLL ::
        http://www.pacnet.com <http://www.pacnet.com>




     CCoonnttaacctt ::
        Tania Hayek, Michael Boyer, Denise Schutte, Maria Lepisto,
        Natalie Jackson



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux et Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Systèmes de Fournisseurs d'Accès à Internet (F.A.I.)



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        7 mars 1997

  1111..1155..  PPssyyttrroonniiccss




       99 Leroy Street
       Binghamton, NY 13905
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 607 724 3240



     FFaaxx ::
        +1 516 598 4619



     EE--mmaaiill ::
        info@psytronics.com



     UURRLL ::
        http://www.psytronics.com <http://www.psytronics.com>



     CCoonnttaacctt ::
        Jaron Rubenstein



     AArrcchhiitteeccttuurree ::
        Intel

     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Psytronics est un partenaire autorisé de Red Hat Support et Red
        Hat Hardware. Nous proposons des stations de travail
        personnalisées et des solutions matériels pour serveurs.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        25 octobre 1998

  1111..1166..  SSuunnsseett SSyysstteemmss




       1328 East Barbarita Avenue
       Gilbert, AZ 85234
       États-Unis d'Amérique





     TTéélléépphhoonnee ::
        +1 602 497 9335


     FFaaxx ::
        +1 602 497 8012


     EE--mmaaiill ::
        info@sunsetsystems.com



     UURRLL ::
        http://www.sunsetsystems.com <http://www.sunsetsystems.com>



     CCoonnttaacctt ::
        Rod Roark



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Slackware



     EExxppeerrttiissee ssppéécciiaallee ::
        Nous sommes spécialisés dans les machines préconfigurés Linux à
        bas prix (commençant à 500$ US), nous offrons une solution
        facile pour les débutants et un gain de temps pour les
        utilisateurs plus expérimentés.
     DDeerrnniièèrree mmiissee àà jjoouurr ::
        15 août 1998


  1111..1177..  SSWW TTeecchhnnoollooggyy




       1701 North Greenville Suite 1106
       Richardson, TX 75081
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 972 907 0871



     FFaaxx ::
        +1 972 907 9339



     EE--mmaaiill ::
        sales@swt.com



     UURRLL ::
        http://www.swt.com <http://www.swt.com>



     CCoonnttaacctt ::
        Marvin Y. Wu



     AArrcchhiitteeccttuurree ::
        Intel, Alpha et SPARC



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Debian GNU et Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        SW Technology est une des premières compagnies qui proposent des
        machines avec Linux pré-installé. Notre gamme de produits
        actuelle va de l'ordinateur portable au réseau avec des liaisons
        de transfert dont les taux se mesurent en Gigaoctets, qui
        fournissent les capacités de super-ordinateurs.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        14 novembre 1997


  1111..1188..  TTeelleenneett SSyysstteemm SSoolluuttiioonnss,, IInncc..




       2480 Kruse Drive
       San Jose, CA 95131
       États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 408 383 0334 x102



     FFaaxx ::
        +1 408 383 0335



     EE--mmaaiill ::
        linux@tesys.com



     UURRLL ::
        http://www.tesys.com/linux <http://www.tesys.com/linux>



     CCoonnttaacctt ::
        Billy Bath <billy@tesys.com>



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Toutes les distributions disponibles



     EExxppeerrttiissee ssppéécciiaallee ::
        Tous nos systèmes sont pré-testés et prêts pour Internet y
        compris des sous-systèmes RAID. Nos principaux clients sont les
        développeurs sous Linux et les utilisateurs souhaitant du
        matériel solide et de haute facture.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        7 novembre 1997

  1111..1199..  VVAA RReesseeaarrcchh





  1235 Pear Avenue, Suite 109
  Mountain View, CA 94043
  États-Unis d'Amérique






     TTéélléépphhoonnee ::
        +1 888 LINUX 4U, +1 650 934 3666



     FFaaxx ::
        +1 650 964 7668 ou +1 650 964 7669



     EE--mmaaiill ::
        sales@varesearch.com



     UURRLL ::
        http://www.varesearch.com <http://www.varesearch.com>



     CCoonnttaacctt ::
        Tim O'Mahoney



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Debian GNU, Red Hat et S.u.S.E.



     EExxppeerrttiissee ssppéécciiaallee ::
        Nous portons tous nos efforts sur des tests de performances sur
        le matériel, nous évaluons les compatibilités et configurons les
        systèmes pour obtenir un maximum de performances et de stabilité
        sous Linux



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        4 novembre 1997

  1122..  FFiinnllaannddee



  1122..11..  SSOOTT -- OOyy SSuuoommeenn OOhhjjeellmmiissttoottyyöö AAbb






  Hermiankatu 8 E
  FIN-33720 Tampere
  Finlande






     TTéélléépphhoonnee::
        +358 3 3165544


     FFaaxx::
        +358 3 3165959


     EE--mmaaiill::
        sales@sot.com


     UURRLL::
        http://www.sot.com


     CCoonnttaacctt::
        Santeri Kannisto <sk@sot.com>


     AArrcchhiitteeccttuurree::
        Intel.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Red Hat Linux FI, SOT-linux.


     EExxppeerrttiissee SSppéécciiaallee::
        Ordinateurs et serveurs basés sur la technologie Intel et
        développement de logiciels pour Linux.


     DDeerrnniièèrree mmiissee àà jjoouurr::
        1 octobre 1998.




  1133..  FFrraannccee


  1133..11..  AAllccôôvvee




       12, place Indira Gandhi
       92230 Gennevilliers
       France







     TTéélléépphhoonnee ::
        +33 1 47 33 82 84



     FFaaxx ::
        +33 1 47 33 76 98



     EE--mmaaiill ::
        ventes@alcove.fr



     UURRLL ::
        http://www.alcove.fr <http://www.alcove.fr>



     CCoonnttaacctt ::
        Christophe Le Bars, Lucien Petit



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Toutes les distributions disponibles



     EExxppeerrttiissee ssppéécciiaallee ::
        Serveurs Internet et Intranet, serveurs proxy, serveurs courrier
        et news, firewalls, serveurs fax et stations de travail.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        4 février 1998

  1144..  HHoonngg KKoonngg



  1144..11..  GGeenneessiiss SSyysstteemmss IInntt''ll LLttdd..




       7/F., Honytex Building
       22 Ashley Road, T.S.T. Kowloon
       Hong Kong





     TTéélléépphhoonnee ::
        +852 2815 0728



     FFaaxx ::
        +852 2815 0729



     EE--mmaaiill ::
        info@genesis.com.hk



     UURRLL ::
        http://www.genesis.com.hk <http://www.genesis.com.hk>



     CCoonnttaacctt ::
        Gyver Lo



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Serveurs Web



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        30 mai 1998

  1155..  PPaayyss--BBaass


  1155..11..  SSttoonnee IITT SSeerrvviicceess BBVV




       Lassuslaan 105
       NL-3723 LJ Bilthoven
       Pays-Bas






     TTéélléépphhoonnee ::
        +31 30 22 87 995



     FFaaxx ::
        +31 30 22 87 997




     EE--mmaaiill ::
        linux@stonebv.com



     UURRLL ::
        http://www.stonebv.com <http://www.stonebv.com>



     CCoonnttaacctt ::
        Martijn Smit



     AArrcchhiitteeccttuurree ::
        Intel et Alpha



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Caldera OpenLinux, Red Hat et S.u.S.E.



     EExxppeerrttiissee ssppéécciiaallee ::
        Solutions Internet et Intranet



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        30 janvier 1997

  1166..  PPoollooggnnee



  1166..11..  EEmmiitt SSpp..zz oo..oo..




       Koszarowa 48/9
       51-149 Wroclaw
       Pologne






     TTéélléépphhoonnee ::
        +48 71 721848



     FFaaxx ::
        +48 71 721733



     EE--mmaaiill ::
        kontakt@emit.com.pl



     UURRLL ::
        http://www.emit.com.pl <http://www.emit.com.pl>



     CCoonnttaacctt ::
        Ian Carr-de Avelon



     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Security corrigée et personnalisée



     EExxppeerrttiissee ssppéécciiaallee ::
        Sécurise le transfert des données et de l'argent électronique



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        2 octobre 1997

  1166..22..  PPoollsskkiiee SSiieeccii TTeelleeiinnffoorrmmaattyycczznnee SS..AA..




       ul. Zaolzianska 11
       41-800 Zabrze
       Pologne






     TTéélléépphhoonnee ::
        +48 32 276 14 30



     FFaaxx ::
        +48 32 276 01 75



     EE--mmaaiill ::
        amadloch@netpol.pl



     UURRLL ::
        htpp://www.netpol.pl <http://www.netpol.pl>



     CCoonnttaacctt ::
        Andrzej Madloch


     AArrcchhiitteeccttuurree ::
        Intel



     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Toutes les versions disponibles



     EExxppeerrttiissee ssppéécciiaallee ::
        Connexion et configuration Internet et Intranet, systèmes
        Fournisseur d'Accès Internet (ISP), serveurs et stations de
        travail configurés pour Linux, terminaux X11 (sans disque ou
        uniquement avec un lecteur de disquettes) , serveurs de
        connexion et routeurs sous Linux, sécurité (firewalls, VPN),
        Samba, émulateur de serveurs Novell, configuration de serveur
        courrier, distribution d'Equinox et BOCA cartes série multi-
        ports, conseils général IT et Linux.



     EExxppeerrttiissee ssppéécciiaallee ((eenn ppoolloonnaaiiss)) ::
        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.




     DDeerrnniièèrree mmiissee àà jjoouurr ::
        17 mars 1998

  1177..  RRooyyaauummee--UUnnii



  1177..11..  AAnnnneexx TTeecchhnnoollooggyy EEuurrooppee LLttdd




       9 Horseshoe Park
       Reading, RG8 7JW
       Royaume-Uni






     TTéélléépphhoonnee ::
        +44 118 984 1207



     FFaaxx ::
        +44 118 984 1217

     EE--mmaaiill ::
        linux@annex.co.uk



     UURRLL ::
        http://www.annex.co.uk <http://www.annex.co.uk>



     CCoonnttaacctt ::
        Alastair Martin alastair@annex.co.uk, Alex Butcher
        alex@annex.co.uk



     AArrcchhiitteeccttuurree ::
        Alpha



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        Red Hat



     EExxppeerrttiissee ssppéécciiaallee ::
        Systèmes Alpha/Linux pré-configurés, systèmes UDB, systèmes
        21164A, support pour passer les logiciels Intel vers Alpha.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        4 août 1997

  1177..22..  DDeeffiinniittee LLiinnuuxx SSyysstteemmss




       264 Ripon Road
       Stevenage
       Herts, SG1 4NF
       Royaume-Uni






     TTéélléépphhoonnee::
        +44 800 956 7213


     FFaaxx::
        +44 1438 311993


     EE--mmaaiill::
        info@ukpost.com


     UURRLL::
        http://definite.ukpost.com


     CCoonnttaacctt::
        Jason Clifford


     AArrcchhiitteeccttuurree::
        Intel et Alpha.


     DDiissttrriibbuuttiioonn LLiinnuuxx::
        Debian GNU, Red Hat, Slackware et S.u.S.E.


     EExxppeerrttiissee ssppéécciiaallee::
        Réseaux et intégration avec d'autres systèmes. Sécurité des
        réseaux.


     DDeerrnniièèrree mmiissee àà jjoouurr::
        1 octobre 1998.



  1177..33..  NNeennee IInnffoorrmmaattiioonn SSyysstteemmss




       32 Glasgow Street
       Northampton, NN5 5BL
       Royaume-Uni






     TTéélléépphhoonnee ::
        +44 7020 953494 (Ce numéro est automatiquement redirigé, mais si
        vous avez un opérateur en ligne, demandez Timothy Peters)



     FFaaxx ::
        +44 7020 953496



     EE--mmaaiill ::
        sales@nisys.demon.co.uk



     UURRLL ::
        http://www.nisys.demon.co.uk <http://www.nisys.demon.co.uk>



     CCoonnttaacctt ::
        Timothy Peters <tim@nisys.demon.co.uk>



     AArrcchhiitteeccttuurree ::
        Intel et Alpha


     DDiissttrriibbuuttiioonnss LLiinnuuxx ::
        Linux Pro, Red Hat et Slackware



     EExxppeerrttiissee ssppéécciiaallee ::
        Revendeur britanique pour la galerie marchande de Linux et les
        cartes séries multi-ports Cyclades.



     DDeerrnniièèrree mmiissee àà jjoouurr ::
        12 août 1997

  1177..44..  DD.. GGrraanntt CCrraawwlleeyy LLiimmiitteedd




       7 Owen Road
       Rainhill, Merseyside, L35 0PJ
       Royaume-Uni






     TTéélléépphhoonnee ::
        +44 151 289 9250



     FFaaxx ::
        +44 151 289 7895



     EE--mmaaiill ::
        enquiry@dgc-nms.co.uk



     CCoonnttaacctt ::
        Grant Crawley



     AArrcchhiitteeccttuurree ::
        Intel, Sparc, Alpha, MIPS, PowerPC et StrongARM



     DDiissttrriibbuuttiioonn LLiinnuuxx ::
        ARMLinux, Caldera OpenLinux, Extreme Linux, Red Hat, Slackware,
        S.u.S.E et TurboLinux.



     EExxppeerrttiissee ssppéécciiaallee ::
        Nous sommes spécialisés dans les logiciels et matériels 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 dernières nouveautés.
     DDeerrnniièèrree mmiissee àà jjoouurr ::
        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'espère, sans douleur
  --- en comparant les commandes et les outils disponibles sur ces deux
  systèmes.
  ______________________________________________________________________

  Table des matières





















































  1. Introduction

     1.1 Pourquoi Linux ?
     1.2 Commandes et fichiers comparables

  2. Petite introduction

     2.1 Fichiers
     2.2 Répertoires
     2.3 Programmes
     2.4 Visite guidée

  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 avancés

     8.1 Droits et propriété
     8.2 Multitâche : processus et tâches (
     8.3 Fichiers, deuxième
     8.4 Files d'impression

  9. Configurer

  10. Programmes utiles

     10.1 Visionneur de fichiers :
     10.2 Numéros de version sous Linux
     10.3 Archiver : tar et gzip

  11. Exemples du monde réel

  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 détails
     13.4 Commentaires sur la taille des blocks

  14. La fin

     14.1 Copyright
     14.2 Avertissement


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn




  11..11..  PPoouurrqquuooii LLiinnuuxx ??


  Vous avez entendu dire qu'Unix est difficile et vous êtes hésitant à
  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 même 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 systèmes d'exploitation et
  accomplissent essentiellement les mêmes taches. Cependant, les outils
  de Linux sont à mon humble avis supérieurs. Leur syntaxe est souvent
  plus concise et ils ont souvent les quelques fonctionnalités de plus
  qui font la différence et permettent de gagner du temps (vous
  entendrez souvent que VMS et Unix ont des philosophies différentes).
  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 gâteau, les excellentes performances des nouvelles
  cartes graphiques transforment votre tite boîte Linux, grâce à X, en
  une puissante station de travail graphique bien souvent plus rapide
  qu'une machine spécialement prévue pour cette tâche.

  J'ai plusieurs raisons de croire que la combinaison Pentium/Linux est
  préférable à celle de VAX/VMS, mais ces préférences sont strictement
  personnelles et vous ne serez peut-être pas d'accord. Vous en
  déciderez de vous-même dans quelques mois.

  Je prends en hypothèse que vous êtes une étudiant ou un chercheur à
  l'université et que vous utilisez régulièrement VMS pour les tâches
  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
  tâches sous Linux en utilisant votre expérience de VMS. Mais avant
  tout vérifiez que :


  ·  Linux et le _S_y_s_t_è_m_e _X _W_i_n_d_o_w sont correctement installés ;

  ·  vous avez un administrateur système pour s'occuper des détails
     techniques (s'il-vous-plaît, 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 nécessaire pour vous
  permettre de commencer. Vous devriez en apprendre plus sur Linux pour
  pouvoir en tirer le maximum (fonctionnalités avancées de bash,
  programmation, expressions régulières, 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 suggère également de lire le _G_u_i_d_e _d_u _r_o_o_t_a_r_d d'Éric
  Dumas et plus généralement tout ce que l'on peut trouver sur
  http://www.freenix.fr/linux et http://www.traduc.org.

  Et maintenant, c'est parti !


  11..22..  CCoommmmaannddeess eett ffiicchhiieerrss ccoommppaarraabblleess


  Ce tableau compare les commandes les plus utilisées sous VMS et Linux.
  Gardez à l'esprit que leur syntaxe est souvent très différente ; pour
  plus de détails allez faire un tour dans les sections suivantes.





















































  VMS                           Linux                   Notes
  -------------------------------------------------------------------------------
  @COMMAND                      command                    (doit être exécutable)
  COPY fichier1 fichier2        cp fichier1 fichier2
  CREATE/DIR [.répertoire]      mkdir répertoire           (seulement un par un)
  CREATE/DIR [.rép1.rép2]       mkdirhier rép/rép
  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 préféré)
  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 précisée)
                                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 [.rép.rép]        cd rép/rép
  SET HOST machine              telnet machine,            (pas exactement pareil)
                                rlogin machine
  SET FILE/OWNER_UIC=paul       chown paul fichier        (complètement différent)
  SET NOBROADCAST               mesg
  SET PASSWORD                  passwd
  SET PROT=(perm) fichier       chmod perm fichier       (complètement différent)
  SET TERMINAL                  export TERM=          (la syntaxe est différente)
  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=durée commande   at durée commande
  TEX fichier.tex               tex fichier.tex
  TYPE/PAGE fichier             more fichier
                                less fichier                     (beaucoup mieux)




  Bien sûr, les différences des deux systèmes ne se limitent pas aux
  noms des commandes. Continuez donc à lire.

  22..  PPeettiittee iinnttrroodduuccttiioonn


  Voila ce que vous devez absolument savoir avant de vous loguer pour la
  première fois. Détendez-vous, il y a relativement peu de chose.


  22..11..  FFiicchhiieerrss



  ·  Les noms des fichiers sous VMS on la forme
     fichier.extension.version.  Sous Linux, le numéro de version
     n'existe pas (c'est une grosse limitation mais on peut la compenser
     par d'astucieux moyens : jetez un oeil à la section ``Numéros de
     version sous Linux'') ; les noms des fichiers sont normalement
     limités à 255 caractères et peuvent contenir autant de points que
     vous le désirez. 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 différents 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 répertoire) alors qu'un fichier dont le nom
     finit par un tilde (« ~ ») représente une sauvegarde de fichier (ou
     _b_a_c_k_u_p).

  Maintenant, voici un tableau présentant 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 [.rép]fichier.txt;1 []           $ cp rép/fichier.txt .
       $ COPY [.rép]fichier.txt;1 [-]          $ cp rép/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.* "géologie"             $ grep géologie *tex




  Regardez en plus loin dans le document pour avoir d'autres exemples.
  Si vous voulez vous attaquer aux notions de droits, de propriétaires
  et aux sujets avancés, reportez vous à la section ``Sujets avancés''.


  22..22..  RRééppeerrttooiirreess



  ·  Les noms des répertoires sous VMS sont de la forme
     [père.rép.sousrép]. L'équivalent sous Linux est :
     /père/rép/sousrép/.  Le père de tous les répertoires est le
     répertoire racine appelé / ; il contient d'autres répertoires comme
     /bin, /usr, /tmp, /etc, et bien d'autres.
  ·  Le répertoire /home contient les répertoires _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 répertoire _h_o_m_e ;  c'est l'équivalent de
     SYS$LOGIN. Il y a un raccourci pour le répertoire _h_o_m_e : le tilde
     (« ~ »). Ainsi, cd ~/tmp est équivalent à, disons, cd
     /home/paul/tmp.

  ·  Les noms des répertoires sont soumis aux mêmes règles que ceux des
     fichiers. En plus de cela, chaque répertoire a deux entrées
     spéciales : l'une est . : elle représente le répertoire lui-même
     (comme []) ; l'autre, .., représente le répertoire parent (comme
     [-]).

  Et maintenant quelques autres exemples :




       VMS                                     Linux
       ---------------------------------------------------------------------

       $ CREATE/DIR [.répertoire]              $ mkdir répertoire
       $ CREATE/DIR [.dir1.dir2.dir3]          $ mkdirhier rép1/rép2/rép3
          non/disponible                       $ rmdir répertoire
                                               (si le répertoire est vide)
                                               $ rm -R répertoire
       $ DIRECTORY                             $ ls
       $ DIRECTORY [...]fichier.*.*            $ find . -name "fichier*"
       $ SET DEF SYS$LOGIN                     $ cd
       $ SET DEF [-]                           $ cd ..
       $ SET DEF [père.rép.sousrép]            $ cd /père/rép/sousrép
       $ SET DEF [.rép.sousrép]                $ cd rép/sousrép
       $ SHOW DEF                              $ pwd




  Si vous voulez en savoir plus sur les droits, les propriétaires, ou
  tout simplement en savoir plus tout court, sautez à la section
  ``Sujets avancés''.


  22..33..  PPrrooggrraammmmeess



  ·  Les commandes, les programmes compilés et les scripts _s_h_e_l_l
     (équivalent des fichiers de commandes de VMS) n'ont pas forcément
     une extension comme .EXE or .COM et peuvent s'appeler comme bon
     vous semble. Les fichiers exécutables sont marqués d'un astérisque
     (« * ») lorsque vous exécutez ls -F.

  ·  Pour lancer un fichier exécutable, il suffit de taper son nom (pas
     de RUN, ni de PROGRAM.EXE, ni encore de @COMMAND). Il est donc
     nécessaire que le fichier soit situé dans un répertoire du _p_a_t_h,
     qui est une liste de répertoires. En général, le _p_a_t_h contient des
     répertoires comme /bin, /usr/bin, /usr/X11R6/bin, etc. Si vous
     écrivez vos propres programmes, placez-les dans un répertoire 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/données/monprog ou
     ./monprog si le répertoire courant n'est pas dans le _p_a_t_h.

  ·  Les options des commandes sont passées sur la ligne de commande
     grâce à OPTION= sous VMS et grâce à -_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, différentes lettres
     combinées ou un mot. En particulier, l'option -R (récursif) de
     plusieurs commandes de Linux permet de faire la même 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 fonctionnalités
     (l'une n'existe pas sous VMS, l'autre est mal implémentée) : la
     redirection des entrés/sorties et les _p_i_p_e_s. (Pour être sincère,
     j'ai entendu que les versions récentes 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 tâche 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 rôle clé sous Unix. En voici un exemple typique :



       $ monprog < données | filtre1 | filtre2 >> résultat.dat 2> erreurs.log &





  Traduisons. Le programme monprog utilise le fichier données comme
  entrée, sa sortie est canalisée (grâce à |) vers le programme filtre1
  qui l'utilise en tant qu'entrée et la traite. La sortie résultante est
  canalisée (_p_i_p_é_e) vers filtre2 pour être encore une fois traitée.  La
  sortie finale est ajoutée (grâce à >>) au fichier résultat.dat, et les
  messages d'erreurs sont redirigés (grâce à 2>) vers le fichier
  errors.log.  Tout ceci est exécuté en arrière-plan (grâce au & à la
  fin de la ligne de commande). Pour en savoir plus à ce sujet,
  reportez-vous à la section ``Exemples''.



  Pour le multitâche, les files, et tout ce qui s'y rapporte, reportez-
  vous à la section ``Sujets avancés''.


  22..44..  VViissiittee gguuiiddééee


  Maintenant vous êtes prêt 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 occupée 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 dérive 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 dépend de la manière dont votre administrateur
  système 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 accéder 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
  répertoire courant (incluant les fichiers cachés) :



       $ ls -al




  Appuyez sur shift + page up pour faire défiler 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 système de fichier).


  Si vous pensez que vous êtes prêt pour travailler, allez-y. Mais si
  j'étais vous, je passerais d'abord par la section ``Sujets avancés''.


  33..  ÉÉddiitteerr ddeess ffiicchhiieerrss


  EDT ne tourne pas sous Linux, mais il y a beaucoup d'autres éditeurs
  disponibles. Le seul qui soit sûr d'être présent sur tout système Unix
  est vi --- oubliez-le, votre administrateur en a sûrement 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 particulièrement utiles pour éditer des sources
  de programmes puisque qu'ils ont deux fonctionnalités inconnue de
  EDT : la coloration syntaxique et l'indentation automatique. De plus,
  vous pouvez compilez vos programmes à partir de l'éditeur (grâce à 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 après.

  Si vous avez emacs, lancez-le. Tout d'abord vous devez comprendre le
  système de notation de combinaison de touche d'emacs. C désigne
  contrôle et M la touche méta (en général 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 insérez 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 dès que vous le lancez. Utilisez
  les même touches que sur EDT et appuyez sur échap ? h pour obtenir
  l'aide. Les commandes sont lancées de la même manière que dans emacs.
  De plus, il y a quelques raccourcis pratiques faisant défaut à EDT ;
  vous pouvez en plus configurer ces raccourcis clavier. Demandez à
  votre administrateur.

  Vous pouvez aussi utilisez un autre éditeur avec une interface
  complètement différente. emacs en mode natif est un choix courant. Un
  autre éditeur populaire est joe qui peut émuler d'autres éditeurs
  comme emacs lui-même (en étant même 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.





  44..  TTeeXXeerr


  TeX et LaTeX sont identiques à leurs homologues de VMS --- seulement
  plus rapides :-), mais les outils pour manipuler les fichiers .dvi
  et .ps sont bien supérieurs :


  ·  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 sélectionnés peuvent être imprimés. Un
     programme plus récent et meilleur permet également de faire ça :
     gv ;

  ·  Pour imprimer un fichier .ps on utilise généralement la commande
     lpr fichier.ps. Cependant si l'imprimante postscript s'appelle, par
     exemple, « ps » (demandez à votre administrateur système), il
     faudra faire lrp -Pps fichier.ps. Pour plus d'informations au sujet
     des files d'impressions, allez à la section ``Files
     d'impressions''.


  55..  PPrrooggrraammmmeerr


  Programmer sous Linux est _b_e_a_u_c_o_u_p plus agréable : 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, réédition, etc. peut être raccourci
  en utilisant des éditeurs comme emacs ou jed, comme nous l'avons vu au
  dessus.


  55..11..  FFoorrttrraann


  Il n'y a pas de réelle différence 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
  problèmes 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 détails.

  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'après mon expérience, le paquetage
  yaf77 est celui qui donne les meilleurs résultats.

  Pour compiler un source en Fortran avec g77, éditez le et sauvez le
  avec l'extension .f, et faites



  $ g77 monprog.f




  Cela va créer par défaut un exécutable appelé a.out (vous n'avez pas à
  effectuer les liens). Pour donner à l'exécutable un nom différent et
  faire quelques optimisations :



       $ g77 -O2 -o monprog monprog.f




  Méfiez-vous des optimisations ! Demandez à votre administrateur
  système de lire la documentation fournie avec le compilateur et de
  vous dire s'il y a des problèmes.

  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 créer
  une bibliothèque, 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 bibliothèque externe appelée, 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 décrit ci-
  dessous.


  55..22..  UUttiilliisseerr mmaakkee


  make est un outil pour gérer la compilation de programmes divisés en
  plusieurs fichiers sources.

  Supposons que vous ayez des fichiers sources contenant vos routines
  appelés 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 dépend de quel fichier, et les
  recompiler en tenant compte des dépendances.

  Plutôt 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 dépendances entre les sources :
  quand un source est modifié, seuls les sources qui dépendent du
  fichier modifié seront recompilées.

  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 très 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 dépend de quatre fichiers objets

  monprog.o: monprog.f
  <TAB>g77 -c monprog.f
  # monprog.o dépend de son fichier source

  fichier_1.o: fichier_1.f
  <TAB>g77 -c fichier_1.f
  # fichier_1.o dépend 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 dépend 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 dépend 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 sûr, si vous voulez en savoir
  plus : info make.


  55..33..  SSccrriippttss sshheellll



  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 exécutable (chmod +x fichier). Pour le lancer, tapez son nom
  (précédé de ./ s'il n'est pas dans le _p_a_t_h).

  Écrire des scripts avec bash est un sujet tellement vaste qu'il
  nécessiterait un livre entier, et je ne ne vais pas m'attarder sur le
  sujet. Je vais juste vous donner un exemple plus ou moins
  compréhensible et, je l'espère, utile, à partir duquel vous pourrez
  comprendre quelques règles de base.


  ______________________________________________________________________
  #!/bin/sh
  # exemple.sh
  # Je suis un commentaire.
  # Ne modifiez pas la première ligne, elle doit être présente.
  echo "Ce système est : `uname -a`" # utilise la sortie de la commande
  echo "Mon nom est $0" # variable interne
  echo "Vous m'avez donné les $# paramètres suivants : "$*
  echo "Le premier paramètre est : "$1
  echo -n "Quel est votre nom ? " ; read votre_name
  echo remarquez la différence : "Salut $votre_name" # cité avec "
  echo remarquez la différence : 'Salut $votre_name' # cité avec '
  REPS=0 ; FICHIERS=0
  for fichier in `ls .` ; do
    if [ -d ${fichier} ] ; then # si le fichier est un répertoire
      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} répertoires et ${FICHIERS} fichiers"
  ls | grep "ZxY--!!!WKW"
  if [ $? != 0 ] ; then # valeur de sortie de la dernière 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."
  ______________________________________________________________________




  55..44..  CC


  Linux est un excellent environnement pour la programmation en C. Si
  vous connaissez le C, voici quelques conseils pour vous débrouiller
  sous Linux. Pour compiler le célèbre hello.c vous utiliserez le
  compilateur gcc, qui est standard dans le monde de Linux et qui a la
  même syntaxe que g77 :



       $ gcc -O2 -o hello hello.c

  Pour lier une bibliothèque à un programme, ajoutez l'option
  -lbibliothèque.  Par exemple pour lier la bibliothèque math et
  optimiser faites



       $ gcc -O2 -o mathprog mathprog.c -lm




  (L'option -lbibliothèque force gcc à lier la bibliothèque
  /usr/lib/libbibliothèque.a ; ainsi -lm lie /usr/lib/libm.a.)

  Quand votre programme est divisé en plusieurs fichiers sources, vous
  aurez besoin du programme make décrit 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 bibliothèques disponible. Parmi les premières
  que vous voudrez probablement utiliser, il y a ncurses, qui permet de
  gérer quelques effets du mode texte et svgalib pour faire du
  graphisme.


  66..  GGrraapphhiiqquueess


  Parmi la masse de paquetages de graphiques disponibles, gnuplot sort
  du lot pour sa puissance et sa facilité d'utilisation. Créez tout
  d'abord deux fichiers de données : 2D-data.dat (deux données 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 données d'une seule colonne (une série 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 réafficher sur votre serveur X. Ne
  soyez pas déconcerté : la dernière impression se lancera seulement
  quand vous quitterez gnuplot.

  Pour plus d'informations, tapez help ou regardez le répertoire des
  exemples (/usr/lib/gnuplot/demos/) s'il existe.


  77..  MMaaiill eett oouuttiillss ppoouurr IInntteerrnneett


  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 très bien aussi) pour
     gérer 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 préférez peut-être
     d'autres programmes comme xmail ou équivalent.

  ·  Newsgroups : utilisez tin ou slrn. Ils sont tous les deux très
     intuitifs.

  ·  FTP : en plus de l'inévitable ftp, demandez à votre administrateur
     d'installer l'excellent ncftp ou un même 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.


  88..  SSuujjeettss aavvaannccééss


  Là, le jeu devient coriace. Apprenez ça, et ensuite vous pourrez dire
  que vous « connaissez quelque chose à Linux » ;-)


  88..11..  DDrrooiittss eett pprroopprriiééttéé


  Les fichiers et les répertoires ont des droits et des propriétaires,
  comme sous VMS. Si nous ne pouvez pas lancer un programme, ne pouvez
  pas modifier un fichier ou ne pouvez pas accéder à un répertoire,
  c'est parce vous n'avez pas les droits adéquats 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 propriété : le propriétaire, le groupe et les autres (comme le
  propriétaire, le groupe et le reste du monde sous VMS) et trois
  droits : lecture, écriture et exécution.

  De gauche à droite, - est le type du fichier  (- désigne un fichier
  ordinaire, d un répertoire, l un lien, etc.) ; rwx sont les droits du
  propriétaire (lecture, écriture, exécution) ;  r-x sont les droits du
  groupe du propriétaire (lecture, exécution) ; 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 représentant u (ce sont alors les droits du propriétaire qui
  sont affectés), g (ceux du groupe) ou o (ceux des « autres »). X est
  soit + (dans ce cas il donne les droits), soit - (il les enlève). Et
  _d_r_o_i_t est r, w ou x. Voici un exemple :



       $ chmod u+x fichier




  Cela permet de rendre le fichier exécutable pour le propriétaire. Il
  existe un petit raccourci chmod +x fichier.



       $ chmod go-wx fichier



  Là, on enlève les droits d'écriture et d'exécution au groupe et aux
  autres (donc à tout le monde sauf au propriétaire).



       $ chmod ugo+rwx fichier




  Tous les droits sont donnés à tout le monde.

  Une manière plus courte de préciser 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 répertoire, rx signifie que vous pouvez vous placer dans ce
  répertoire et w que vous pouvez effacer un fichier dans ce répertoire
  (en tenant compte des droits du fichier évidemment) ou le répertoire
  lui-même. Tout ça n'est qu'une petit partie du sujet : man est votre
  ami.

  Pour changer le propriétaire d'un fichier :



       $ chown <utilisateur> <fichier>




  Pour résumer, 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/






  88..22..  MMuullttiittââcchhee :: pprroocceessssuuss eett ttââcchheess (( jjoobbss ))


  En voici plus à propos de la manière de lancer les programmes. Il n'y
  a pas de file d'attente sous Linux ; le multitâche est géré très
  différemment. Voici à quoi ressemble une ligne de commande typique :



       $ commande -s1 -s2 ... -sn par1 par2 ... parn < entrée > sortie &




  Maintenant, voyons comment marche le multitâche. Les programmes qui
  tournent en avant-plan (_f_o_r_e_g_r_o_u_n_d) ou arrière-plan (_b_a_c_k_g_r_o_u_n_d) sont
  appelés des processus.


  ·  Pour lancer un processus en arrière plan :



       $ programme [option] [< entrée] [> sortie] &
       [1] 234





  Le shell vous donne le numéro de _j_o_b (le premier nombre ; regardez ci-
  dessus) et le PID (le numéro du processus). Chaque processus est iden­
  tifié par son PID.

  Pour voir combien de processus sont lancés :



       $ ps -ax





  La liste des processus actifs va être affichée.

  ·  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 manière... ;-) 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 arrière-plan ou
  en ramener un en avant-plan. Dans ce contexte, les processus sont
  appelées jobs.


  ·  Pour voir combien de _j_o_b_s sont actifs :




  $ jobs





  Les _j_o_b_s sont identifés 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 arrière-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>






  88..33..  FFiicchhiieerrss,, ddeeuuxxiièèmmee


  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 système
     sont assimilés à des fichiers. Les commandes et les programmes
     puisent leur entrée dans un « fichier » appelé _s_t_d_i_n (l'entrée
     standard : généralement le clavier), redirigent leur sortie vers un
     « fichier » appelé _s_t_d_o_u_t (généralement l'écran) et leurs erreurs
     vers un « fichier » appelé _s_t_d_e_r_r (généralement l'écran).

     En utilisant < et > vous redirigez l'entrée et la sortie vers un
     fichier différent. 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 disparaît.
  ·  Jokers/ : sur la ligne de commande * correspond à (et désigne) tous
     les fichiers sauf ceux qui sont cachés ; .* correspond à tous les
     fichiers cachés ; *.* correspond seulement ceux qui ont un « . » au
     milieu de leur nom suivi par d'autres caractères ; l*c correspondra
     à « loïc » et « luc » ; *c* correspondra à « piocher » et « picorer
     ». % devient ?.  Il existe également un autre joker : []. Par
     exemple : [abc]* désigne les fichiers commençant par a, b ou c ;
     *[I-N123] désigne 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 prévenu quand un fichier va être
     écrasé.


  88..44..  FFiilleess dd''iimmpprreessssiioonn


  Vos fichiers à imprimer sont placés dans une file comme sous VMS.
  Quand vous lancez une commande d'impression, vous aurez peut-être à
  préciser 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 gérer 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 <numéro de job>





  99..  CCoonnffiigguurreerr


  Votre administrateur système 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 rôles 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 redéfinit pas le path si ce n'est pas nécessaire
  echo $PATH | grep $LOGNAME > /dev/null
  if [ $? != 0 ]
  then
    export PATH="$PATH:/home/$LOGNAME/bin"  # ajoute mon répertoire 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 répertoire 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() # crée 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 définit les fonctions attachés 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 caractères accentués.
  # 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 "
  ______________________________________________________________________




  1100..  PPrrooggrraammmmeess uuttiilleess



  1100..11..  VViissiioonnnneeuurr ddee ffiicchhiieerrss :: lleessss


  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 compressés, les archives, etc.

  Comme les dernières versions de TYPE, less vous permet de vous
  déplacer dans le fichier dans les deux directions. Il accepte aussi
  plusieurs commandes qui sont lancées en appuyant sur une touche. Les
  plus utilisés sont :


  ·  tout d'abord, appuyez sur q pour quitter ;

  ·  h pour obtenir l'aide ;

  ·  g pour aller au début 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 même chose vers
     l'arrière ;

  ·  m suivi d'une lettre marque la position courante (par exemple ma) ;

  ·  :e ouvre un autre fichier ;

  ·  !commande exécute un shell.


  1100..22..  NNuumméérrooss ddee vveerrssiioonn ssoouuss LLiinnuuxx


  Hélas, Linux ne supporte toujours pas les numéros de version
  nativement.  Cependant, on peut régler ce problème de deux manières.
  La première est d'utiliser RCS (Revision Control System) qui vous
  permet de garder la trace des précédentes 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 numéros 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, vérifiez que vous avez une version supérieure à la 0.98.7.
  Le patch pour les numéros de version est disponible sur
  http://ibogeo.df.unibo.it/guido/slang/backups.sl


  1100..33..  AArrcchhiivveerr :: ttaarr eett ggzziipp


  Sous Unix il existe quelques applications très répandues qui sont
  utilisés 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 compressés en utilisant compress ou gzip.
  compress est aujourd'hui obsolète et on n'utilise plus que gzip.


       $ compress <fichier>
       $ gzip <fichier>




  Ceci créera 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 décompresser utilisez



       $ compress -d <fichier.Z>
       $ gzip -d <fichier.gz>




  Faites un tour du côté de leurs pages man.

  Les utilitaires unarj, zip et unzip sont aussi disponibles.

  Les fichier avec l'extension .tar.gz ou .tgz (archivés par tar, puis
  compressés par gzip) sont très 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>





  1111..  EExxeemmpplleess dduu mmoonnddee rrééeell


  Le principe central d'Unix est qu'il existe plusieurs commandes
  simples qui peuvent être liées ensemble grâce aux _p_i_p_e_s et aux
  redirections pour accomplir des tâches plus compliquées. Regardez les
  exemples suivants (je n'expliquerai que les plus compliqués ; pour les
  autres, reportez vous aux sections précédentes 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 données 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 très utile qui liste tous les
  fichier dans une arborescence (qui commence à partir du répertoire
  _h_o_m_e dans ce cas). Sa sortie peut-être filtrée selon plusieurs
  critères comme par exemple -name.

  ·  J'ai un fichier texte qui contient le mot « entropie » dans ce
     répertoire. Existe-t-il quelque chose de comparable à SEARCH ?

     Bien sûr, 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 récursif.



       $ find . -exec grep -l "entropy" {} \; 2> /dev/null





  find . sort tous les noms des fichiers à partir du répertoire courant,
  -exec grep -l "entropy" lance une commande sur chacun des fichiers
  (représentés 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 récursif
  if [ $# != 3 ]
  then
    echo "Utilisation : rgrep <paramètres> <motif> <répertoire>"
    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-tête et qui a ensuite _n
     données par ligne, pas nécessairement espacées de la même manière.
     Je veux extraire la deuxième et le cinquième 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 troisième, on affiche le second et le cinquième champ en les
  séparant par une tabulation. Apprenez à vous servir de awk --- il vous
  fera gagner beaucoup de temps.

  ·  J'ai téléchargé le ls-lR.gz d'un FTP. Pour chaque sous répertoire,
     il y a une ligne « total _x », avec _x la taille en Kilo-octets du
     répertoire. 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 envoyée vers awk
  dont je vous recommande chaudement de lire la page man.

  ·  J'ai écrit un programme en Fortran, monprog, pour calculer un
     paramètre à partir d'un fichier de données. Je voudrais le lancer
     sur des centaines de fichiers et avoir la liste des résultats, 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 très court. Faites votre programme pour qu'il cherche le
     programme mesdonnées.dat et pour qu'il afficher le résultat sur
     l'écran (stdout) et écrivez ensuite ce petit script :






     ___________________________________________________________________
     #!/bin/sh
     # monprog.sh: lance la même commande sur plusieurs fichiers
     # usage: monprog.sh *.dat
     for fichier in $*  # pour tous les paramètres (e.g. *.dat)
     do
       # ajouter le nom du fichier dans résultat.dat
       echo -n "${fichier}:    " >> résultats.dat
       # copie le paramètre courant dans mesdonnées.dat et lance monprog
       # et ajoute le sortie à résultats.dat
       cp ${fichier} mesdonnées.dat ; monprog >> résultats.dat
     done
     ___________________________________________________________________



  ·  Je veux remplacer « géologie » par « géophysique » 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 paramètre
     NOUVEAU=$2         # second
     shift ; shift      # enlever les deux premier paramètres ; les suivants sont
                        # les noms des fichiers
     for fichier in $*  # pour tous les fichier donnés en paramètres
     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 données. Je ne connais pas leur
     taille et je dois enlever leur avant-dernière et leur avant-avant-
     dernière lignes. Heu... à la mimine ?

     Bien sûr que non :


     ___________________________________________________________________
     #!/bin/sh
     # prune.sh: efface les n-1ème et n-2ème ligne de fichiers
     # utilisation : prune.sh fichier [fichier...]
     for fichier in $*   # pour chaque paramètre
     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 premières lignes
                                                   # de LIGNES
       tail -n 1 $fichier >> $fichier.new          # ajoute la dernière ligne
     done
     ___________________________________________________________________



  NDT : il est tout de même beaucoup plus élégant d'utiliser ed :
  ______________________________________________________________________
  #!/bin/sh
  # prune.sh: efface les n-1ème et n-2ème ligne de fichiers
  # utilisation : prune.sh fichier [fichier...]
  for fichier in $*   # pour chaque paramètre
  do
    printf '$-2,$-1d\nw\nq\n' | ed -s $fichier
  done
  ______________________________________________________________________



  J'espère que ces exemples vous auront ouvert l'appétit.


  1122..  AAssttuucceess ddoonntt oonn nnee ppeeuutt ssee ppaasssseerr



  ·  La complétion de commande : l'appui sur la touche tabulation quand
     vous tapez une commande va compléter la ligne de commande. Par
     exemple, disons que vous devez taper less
     un_nom_de_fichier_très_long. Il vous suffira de taper less un puis
     d'appuyer sur tabulation (si vous avez plusieurs fichier qui
     commencent par les mêmes caractères tapez-en assez pour résoudre
     l'ambiguïté).

  ·  Faire défiler l'écran vers le haut : en appuyant sur Shift-Page_up
     vous pouvez faire défiler l'écran vers le haut de quelques pages
     (le nombre de page dépend de la mémoire vidéo de votre PC).

  ·  Rétablir 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 séquence de caractères : echo ctrl-v Echap c Entrée.

  ·  Copier du texte sur la console : demandez à votre administrateur
     d'installer gpm, un driver pour la souris en mode texte. Cliquez et
     glissez pour sélectionner du texte et ensuite appuyez sur le bouton
     droit pour coller le texte sélectionné. Ça marche entre plusieurs
     consoles virtuelles.

  ·  Copier du texte sous X : cliquez et glissez pour sélectionnez le
     texte dans un xterm et cliquez ensuite sur le bouton du milieu (ou
     les deux boutons) pour coller.


  1133..  LLiirree ddeess bbaannddeess VVMMSS ddeeppuuiiss LLiinnuuxx

  (Cette section a été écrite par Mike Miller)


  1133..11..  IInnttrroodduuccttiioonn


  De temps en temps vous pourrez être amené à lire des bandes
  enregistrées à partir d'une machine sous VMS (ou des bandes
  enregistrées pour être lisibles sous VMS et les systèmes Unix). En
  général, 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 présentées sont appliquables à tout
  système Unix -- j'ai fait cela avec Linux et les systèmes Unix d'HP,
  de SUN et de DEC. La principale dépendance à la plate-forme est le nom
  des fichiers périphériques qui peuvent varier d'un système à l'autre,
  et les options de mt pour spécifier le nom du périphérique (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 traînent quelque part ?), faites-le moi
  savoir et je les ajouterai.


  1133..22..  LLeess bbaasseess


  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 données sur la
  bande : une entête, les données et une terminaison. L'entête et la
  terminaison sont intéressantes car elles contiennent des informations
  sur le fichier tel qu'il était sous VMS. Le fichier de données est...
  le fichier de données.  Chacun de ces fichiers peut être extrait de la
  bande avec la commande dd. La bande peut être positionnée en utilisant
  la commande mt.

  Prenons un exemple. J'ai une bande VMS. Les deux premiers de ses
  fichiers étaient appelés ce66-2.evt et ce66-3.evt sur le système VMS.
  Le label de la bande est c66a2.

  Si j'exécute les commandes suivantes


  ______________________________________________________________________
  $ dd if=$TAPE bs=16k of=entête1
  $ dd if=$TAPE bs=16k of=donnée1
  $ dd if=$TAPE bs=16k of=terminaison1
  $ dd if=$TAPE bs=16k of=entête2
  $ dd if=$TAPE bs=16k of=donnée2
  $ dd if=$TAPE bs=16k of=terminaison2
  ______________________________________________________________________



  je me retrouve avec six fichiers : entête1, donnée1, terminaison1,
  entête2, donnée2 et terminaison2. La syntaxe ici est if="fichier
  d'entrée", bs="taille des blocs" et of="fichier de sortie". TAPE doit
  être une variable d'environnement contenant le nom du périphérique de
  votre lecteur de bande --- par exemple /dev/nts0 si vous utilisez le
  premier disque SCSI sous Linux.

  Si vous aviez voulu récupérer le second fichier, mais pas le premier,
  sous son non d'origine, vous n'auriez pas eu à vous préoccuper de
  l'entête :


  ______________________________________________________________________
  $ 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'entête du deuxième. Le second mt saute la seconde
  terminaison et positionne la bande au début du prochain fichier : la
  troisième entête. Vous pouvez aussi utilisez mt pour sauter des
  fichiers en arrière (bsf), rembobiner (rewind) ou décharger la bande
  (offline, rewoffl).

  1133..33..  QQuueellqquueess ddééttaaiillss


  Les fichiers d'entêtes et de terminaisons contiennent des données
  ASCII en majuscules utilisées 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 première entête de la bande est un peu
  différente des suivantes.

  L'en-tête du premier fichier de la bande (comme par exemple dans
  l'exemple ci-dessus) débute par la chaîne « VOL1 ». Suit le nom de
  volume.  Dans notre exemple, le fichier entête1 commence par
  « VOL1C66A2 ». Vient ensuite une série d'espace terminée par un
  chiffre. Après, on trouve la chaîne « HDR1 » qui indique que l'on a à
  faire à un fichier d'entête. Les caractères qui suivent immédiatement
  la chaîne « HDR1 » forment le nom du fichier VMS.  Dans l'exemple,
  cette chaîne 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 différent.  « VOL1 » n'est pas
  présent. Le reste est identique.  Un autre champ utile est le
  septième. Il se termine par « DECFILES11A ». C'est un signe de
  conformité au standard DEC Files11A.



       Champ                Entête initiale                  Entêtes 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 complète sur le format de l'entête et de la
  terminaison, voyez la documentation DEC FILES11 (sur le mur
  gris/orange --- demandez à votre communauté VMS locale :-).


  1133..44..  CCoommmmeennttaaiirreess ssuurr llaa ttaaiillllee ddeess bblloocckkss


  Dans l'exemple, j'ai utilisé une taille de bloc de 16 ko. Sur un
  système Unix, il n'y a pas de taille de bloc associée à un fichier sur
  un disque alors que, sous VMS, chaque fichier à une taille de bloc
  spécifique. Cela veut dire que la taille du bloc importe peu sous
  linux... sauf que cela  rend la lecture des bandes plus compliquée. Si
  vous avez des difficultés pour trouver la taille du bloc et pour lire
  une bande, vous pouvez essayer de régler la taille de bloc matérielle
  de votre lecteur de bande en utilisant mt -f $TAPE setblk 0. La
  syntaxe exacte de l'option setblk (et sa disponibilité) dépend de la
  version de mt, de l'interface matérielle de votre lecteur de bande et
  de votre environnement Unix.

  (Merci à Wojtek Skulski pour avoir signalé l'option setblk.)




  1144..  LLaa ffiinn



  1144..11..  CCooppyyrriigghhtt


  Sauf indication contraire, les droits d'auteur des HOWTO Linux sont
  détenus par leurs auteurs respectifs. Les HOWTO Linux peuvent être
  reproduits et distribués, en totalité ou en partie, sur tout média
  physique ou électronique dans la mesure où ce copyright est préservé
  dans chaque copie. La distribution commerciale en est autorisée et
  encouragée. L'auteur apprécierait toutefois qu'on lui notifie
  individuellement ce genre de distribution.

  Le présent copyright doit couvrir toute traduction, compilation et
  autre travail dérivé des HOWTO Linux. C'est-à-dire qu'il est interdit
  d'imposer des restrictions de diffusion allant au delà du présent
  copyright à des ouvrages inspirés, ou incorporant des passages, de
  HOWTO Linux. Sous certaines conditions, des exceptions à ces règles
  seront tolérées : contactez le coordinateur des HOWTO à l'adresse
  donnée ci-dessous.

  Pour résumer, nous souhaitons une diffusion aussi large que possible
  de ces informations. Néanmoins, nous entendons garder la propriété
  intellectuelle (copyright) des HOWTO, et apprécierions d'être informés
  de leur redistribution.

  Pour toute question plus générale, merci de contacter le coordinateur
  des HOWTO, Guylhem Aznar, à l'adresse électronique linux-
  howto@sunsite.unc.edu par email.


  1144..22..  AAvveerrttiisssseemmeenntt


  Ce travail a été écrit d'après l'expérience 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
  collègues 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 collègues et amis qui m'ont aidé à définir les
  besoins et les habitudes de l'utilisateur lambda de VMS, et
  particulièrement au Dr. Warner Marsocchi.

  S'il vous plaît, aidez moi à améliorer 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 amélioré, avec coloration syntax­
  ique)
  Al Dev (Alavoor Vasudevan) alavoor@yahoo.com;
  Version française par Arnaud Launay, asl@launay.org
  v1.0, 14 Octobre 1999

  Ce document est un guide pour configurer très rapidement l'éditeur Vim
  sur les systèmes Linux ou Unix. Les informations présentées 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 systèmes 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 matières


  1. Introduction

  2. Configurez les fichiers d'initialisation de vim

     2.1 Paramètres 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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  L'éditeur Vim signifie «Vi Improved» (Vi amélioré). 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 différentes 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 fléchées, page up/down. Voyez aussi «man less».

  Pour les autres versions d'unix, récupérez 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, récupérez les fichiers zip et installez-les en
  cliquant sur setup.


  22..  CCoonnffiigguurreezz lleess ffiicchhiieerrss dd''iinniittiiaalliissaattiioonn ddee vviimm

  Pour permettre la coloration syntaxique, vous devez copier le fichier
  vimrc dans votre répertoire personnel. Il ajoutera également le menu
  «Syntax» pour la commande gvim. Vous pouvez cliquer sur le menu Syntax
  et sélectionner 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 décaleront les lignes en tapant les commandes vi ">>" ou
  "<<". Référez vous au tutorial de Vim pour plus de détails.  Pour met­
  tre en place tabstop et shiftwidth :

  ______________________________________________________________________
  set tabstop=4
  set shiftwidth=4
  set nowrapscan
  set ignorecase
  ______________________________________________________________________

  22..11..  PPaarraammèèttrreess dduu XXddeeffaauullttss

  Vous pouvez configurer quelques unes des propriétés de Vim dans le
  fichier Xdefaults.

   AATTTTEENNTTIIOONN:: _N_e _m_e_t_t_e_z _p_a_s VViimm**ggeeoommeettrryy, il coincerait les menu gvim,
  utilisez plutôt VViimm..ggeeoommeettrryy à 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 astérisque 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
  ______________________________________________________________________




  22..22..  FFiicchhiieerr vviimmrrcc dd''eexxeemmppllee

  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>
  " Dernières 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 défauts 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'entrées 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 sélectionné 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 dernière chaîne recherchée.
  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
   " caractères
   autocmd BufRead *.txt set tw=78

   augroup cprog
    " Supprime toutes les autocommandes cprog
    au!

    " Lors du début d'édition d'un fichier :
    "   Pour les fichiers C et C++ active le formatage des
    "   commentaires et l'indentation C
    "   Pour les autres fichiers, désactive 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 gzippés
    " 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")

    " Après la lecture du fichier compressé : Décompresse 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

    " Après 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é : Décompresser 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 désactivé, car il change la liste de sauts. On ne peut utiliser
   " CTRL-O pour revenir en arrière dans les fichiers précédents plus d'une fois.
   if 0
    " Lors de l'édition d'un fichier, saute toujours à la dernière position du curseur.
    " Ceci doit se trouver après les commandes de décompression.
     autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif
   endif

  endif " has("autocmd")





  22..33..  FFiicchhiieerr ggvviimmrrcc dd''eexxeemmppllee

  L'exemple de gvimrc de vim-5.5/runtime/gvimrc_example ressemble à
  celui-ci :















  ______________________________________________________________________
  " Un exemple de fichier gvimrc.
  " Ces commandes sont exécutées lors du lancement de l'interface graphique.
  "
  " Mainteneur :        Bram Moolenaar <Bram@vim.org>
  " Dernières modifications : 2 Fév 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 ultérieure.
  if version >= 500

    " J'aime avoir des chaînes éclairées dans les commentaires C
    let c_comment_strings=1

    " Active la coloration syntaxique.
    syntax on

    " Active la coloration de la chaîne recherchée.
    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 dernière ligne est en gris sombre
    " Le curseur est gris
    " Les constantes ne sont pas soulignées mais ont un fond légèrement 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
  ______________________________________________________________________







  33..  FFiicchhiieerr dd''iinniittiiaalliissaattiioonn ddee llaa ccoolloorraattiioonn ssyynnttaaxxiiqquuee

  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 différents !


  44..  UUssaaggee ddee VViimm

  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
  ______________________________________________________________________




  55..  AAiiddee ddee VViimm eenn lliiggnnee

  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.


  66..  PPaaggeess wweebb ddee VViimm eett lliieennss VViimm

  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 référence 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 conservées 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>.


  77..  AAuuttrreess ffoorrmmaattss ddee ccee ddooccuummeenntt

  Ce document est publié sous 10 formats différents, nommément - 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 français, 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 générer un fichier html)

  ·  sgml2rtf  vim-howto.sgml     (pour générer un fichier RTF)

  ·  sgml2latex vim-howto.sgml    (pour générer 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 près de vous (à l'échelle du réseau) peuvent
     se trouver sur <http://sunsite.unc.edu/LDP/hmirrors.html>
     sélectionnez 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 fenêtre avec une souris. Voyez la page man de
               xdvi. Pour naviguer utilisez les flèches, les touches page up, down,
               ou également les lettres 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' pour
               monter, descendre, centrer, page suivante, page précédente, 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 agréable à 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 française Julien Garnault judge@club-internet.fr
  v2.1, 15 Aout 1998

  Ce document a été écrit pour répondre au nombre grandissant de ques­
  tions sur la manière de rendre un service virtuel.
  ______________________________________________________________________

  Table des matières
























































  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 Problème
     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 Héberger plusieurs serveurs avec une IP
        8.4.1 Économiser des IP
        8.4.2 Inconvénient
     8.5 Plus d'informations

  9. Mail virtuel avec Pop

     9.1 Problème
     9.2 Solution
     9.3 Solution pour Sendmail
        9.3.1 Introduction
        9.3.2 Créer 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 maître 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



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  11..11..  PPrréé--rreeqquuiiss

  Créer 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 périphériques réseau NET-3 HOWTO

  ·  Installer inetd NET-3 HOWTO

  ·  Compiler et installer divers paquetages de logiciels en réseau
     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 précédentes, il est FORTEMENT recommandé que vous suiviez
  les liens proposés pour vous familiariser avec tous ces paquetages. Je
  ne répondrai à AUCUN mail concernant les points précédents. Veuillez
  s'il vous plaît rediriger toute question à l'auteur du HOWTO
  approprié.
  11..22..  BBuutt

  Le but des services virtuels est de permettre à une seule machine de
  reconnaître de multiples adresses IP sans avoir de multiples cartes
  réseau. L'IP aliasing est une option du noyau qui vous permet
  d'assigner plus d'une adresse IP à chaque périphérique réseau. Le
  noyau multiplexe (les échange très rapidement) en tâche de fond et
  l'utilisateur a l'impression d'avoir plusieurs cartes réseau dans sa
  machine.



  Ce multiplexage permet à de multiples domaines (www.domaine1.com,
  www.domaine2.com, etc.) d'être logés sur la même machine pour le même
  coût que pour un seul domaine. Malheureusement, la plupart des
  services (ftp, web, courrier électronique) n'ont pas été conçus pour
  gérer de multiples domaines. Afin de les faire fonctionner
  correctement, vous devrez modifier à la fois les fichiers de
  configuration et le code source. Ce document décrit comment réaliser
  ces modifications pour la mise en place d'une machine virtuelle.


  Un démon est également nécessaire afin de faire fonctionner les
  services virtuels. Le code source de ce démon (virtuald) est fourni
  plus loin dans ce document.


  11..33..  CCoommmmeennttaaiirreess

  Ce document va grossir au fur et à mesure que les paquetages seront
  mis à jour et que le code source ou que les modifications proposées
  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 plaît que les
  commentaires soient aussi spécifiques 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 considéré 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 recopiés tels quels. Il se peut
  que vous ayez à insérer vos propres valeurs. Si vous rencontrez des
  problèmes, 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.


  11..44..  HHiissttoorriiqquuee ddeess cchhaannggeemmeennttss

  V1.0 Document initial.


  V1.1 Correction d'une erreur dans la section sur le web virtuel.


  V1.2 Correction de la date.


  VV22..00

  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 défaut de Virtuald.

  Nouvelle section Samba.

  Mise à jour de la FAQ.


  VV22..11

  Tous les paths ont été changés 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 répertoire home à
  virtmaildelivery.


  11..55..  CCooppyyrriigghhtt//DDiissttrriibbuuttiioonn

  Ce document est Copyright (c) 1997 par The Computer Resource Center
  Inc.


  Une copie de ce document peut être reproduite ou distribuée sur
  n'importe quel support physique ou électronique sans la permission de
  l'auteur. De la même façon, les traductions sont autorisées sans
  permission expresse si elle incluent un mot disant qui l'a traduit
  (NdT : voir le début du document pour mes coordonnées). Une
  redistribution commerciale est autorisée et encouragée. 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 dérivée 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 préservés sur toutes les copies.


  En bref, nous désirons promouvoir la dissémination de cette
  information par quelque moyen que ce soit. Cependant, je désire
  conserver le copyright sur ce document, et aimerait être tenu au
  courant de tous les plans de redistribution de ce HOWTO.


  22..  IIPP aalliiaassiinngg


  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 déjà un mini-HOWTO expliquant l' IP aliasing.  Référez vous à
  ce document pour toute question concernant la mise en place de cette
  option.


  33..  VViirrttuuaalldd

  33..11..  CCoommmmeenntt ççaa mmaarrcchhee

  Toute connexion réseau est composée de deux paires adresse IP/port.
  L'API (Applications Program Interface, ou Interface de Programmation
  d'Applications) pour la programmation réseau est nommée l'API Sockets.
  La socket agit comme un fichier ouvert, et vous pouvez envoyer ou
  recevoir des données à travers une connexion réseau 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 déterminer sur quel adresse IP de la machine locale
  la connexion a été faite. Virtuald lit un fichier de configuration
  pour récupérer le répertoire associé à cette adresse IP. Il va
  utiliser chroot sur ce répertoire et prendre en compte la connexion au
  service. Chroot change le répertoire / (le répertoire root) vers un
  nouveau point, de sorte que tout ce qui est au dessus de ce répertoire
  devienne inaccessible pour le programme. Ainsi, chaque adresse IP se
  voit assigné un système virtuel de fichiers. Pour le programme réseau,
  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.


  33..22..  iinneettdd

  Inetd est un super serveur réseau qui écoute sur de multiples ports
  et, lorsqu'il reçoit une demande de connexion (par exemple, une
  requête POP), inetd réalise la connexion et l'envoie au programme
  spécifié. 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




  33..33..  FFiicchhiieerr ddee CCoonnffiigguurraattiioonn

  Chaque service se voit attribué un fichier de configuration qui
  contrôlera quelles IPs et quels répertoires sont autorisés pour ce
  service. Vous pouvez avoir un fichier de configuration principal ou de
  nombreux fichiers de configuration si vous désirez que chaque service
  se voit attribuer une liste de domaines différents. 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




  33..44..  LLee ccooddee ssoouurrccee ddee vviirrttuuaalldd

  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 désactive 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);
  }
  44..  SSccrriippttss sshheellll

  44..11..  vviirrttffss

  Chaque domaine doit avoir une arborescence de répertoires. Puisque
  vous utilisez chroot, vous aurez besoin de copies multiples des
  librairies, binaires, fichiers de configuration, etc. J'utilise le
  répertoire /virtual/domaine1.com pour chaque domaine que je crée.

  Je comprends bien que cela représente du gaspillage d'espace disque,
  mais l'espace disque est meilleur marché qu'une nouvelle machine ou
  que des cartes réseau. Si vous désirez réellement sauver de l'espace
  disque, vous pouvez faire des liens, afin qu'une seule copie de chaque
  binaire soit présente.  Le systeme de fichiers que j'utilise prend un
  peu plus de 2Mo. Le script essaye de copier tous les fichiers du
  système 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 arrête là
          exit 0
  fi

  leadingdir=/virtual

  echo -n "Saisissez le nom du répertoire contenant les domaines (défaut: $leadingdir): "
  read ans

  if [ "$ans" != "" ]
  then
          leadingdir=$ans
  fi

  newdir=$leadingdir/$domain

  if [ -d "$newdir" ]
  then
          echo Le répertoire $newdir existe déjà
          exit 0
  else
          echo Nouveau répertoire : $newdir
  fi

  echo Création de $newdir
  mkdir -p $newdir

  echo Création de bin
  cp -pdR /bin $newdir

  echo Création de dev
  cp -pdR /dev $newdir

  echo Création de dev/log
  ln -f /virtual/log $newdir/dev/log

  echo Création d'etc
  mkdir -p $newdir/etc
  for i in /etc/*
  do
          if [ -d "$i" ]
          then
                  continue
          fi
          cp -pd $i $newdir/etc
  done

  echo Création de etc/skel
  mkdir -p $newdir/etc/skel

  echo Création 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 Création de home/c/crc
  mkdir -p $newdir/home/c/crc
  chown crc.users $newdir/home/c/crc

  echo Création de lib
  mkdir -p $newdir/lib
  for i in /lib/*
  do
          if [ -d "$i" ]
          then
                  continue
          fi
          cp -pd $i $newdir/lib
  done

  echo Création de proc
  mkdir -p $newdir/proc

  echo Création de sbin
  cp -pdR /sbin $newdir

  echo Création de tmp
  mkdir -p -m 0777 $newdir/tmp
  chmod +t $newdir/tmp

  echo Création de usr
  mkdir -p $newdir/usr

  echo Création de usr/bin
  cp -pdR /usr/bin $newdir/usr

  echo Création de usr/lib
  mkdir -p $newdir/usr/lib

  echo Création de usr/lib/locale
  cp -pdR /usr/lib/locale $newdir/usr/lib

  echo Création de usr/lib/terminfo
  cp -pdR /usr/lib/terminfo $newdir/usr/lib

  echo Création de usr/lib/zoneinfo
  cp -pdR /usr/lib/zoneinfo $newdir/usr/lib

  echo Création de usr/lib/\*.so\*
  cp -pdR /usr/lib/*.so* $newdir/usr/lib

  echo Création de usr/sbin
  cp -pdR /usr/sbin $newdir/usr

  echo Lien de usr/tmp vers /tmp
  ln -s /tmp $newdir/usr/tmp

  echo Création de var
  mkdir -p $newdir/var

  echo Création de var/lock
  cp -pdR /var/lock $newdir/var

  echo Création de var/log
  mkdir -p $newdir/var/log

  echo Création de var/log/wtmp
  cp /dev/null $newdir/var/log/wtmp

  echo Création de var/run
  cp -pdR /var/run $newdir/var

  echo Création de var/run/utmp
  cp /dev/null $newdir/var/run/utmp

  echo Création de var/spool
  cp -pdR /var/spool $newdir/var

  echo Lien de var/tmp vers /tmp
  ln -s /tmp $newdir/var/tmp

  echo Création 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 Création de var/www/master
  mkdir -p $newdir/var/www/master
  chown webmast.www $newdir/var/www/master

  echo Création de var/www/server
  mkdir -p $newdir/var/www/server
  chown webmast.www $newdir/var/www/server

  exit 0




  44..22..  VViirrtteexxeecc


  Afin d'exécuter des commandes dans un environnement virtuel, vous
  devez utiliser chroot sur ce répertoire puis lancer la commande. J'ai
  écrit un script shell nommé virtexec se chargeant de ces opérations,
  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 répertoire $newdir N'EXISTE PAS
          exit 0
  else
          echo Nouveau répertoire : $newdir
  fi

  echo bname: $BNAME

  echo realbname: $REALBNAME

  if [ "$*" = "" ]
  then
          echo arguments: aucun
  else
          echo args: $*
  fi

  echo Changement de répertoire vers $newdir
  cd $newdir

  echo Lancement de $REALBNAME

  chroot $newdir $REALBNAME $*

  exit 0



  Veuillez noter que vous devez disposer du programme dialog sur votre
  système pour que ce script fonctionne. Pour utiliser virtexec, créez
  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 présent, 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 vérifier la file d'attente de mail sur votre système
  virtuel. Vous pouvez créer autant de liens vers virtexec que vous le
  désirez. Cependant, notez bien que si votre programme nécessite une
  librairie partagée, celle-ci doit se trouver sur le système de
  fichiers virtuel, ainsi que les binaires.


  44..33..  NNootteess

  J'installe tous les scripts dans /usr/local/bin. Tout ce que je ne
  désire pas mettre sur le système de fichiers virtuel, je le place dans
  /usr/local. Le script ne touche à rien dans ce répertoire lors de la
  copie. Les fichiers ne devant pas chevaucher plusieurs systèmes de
  fichiers virtuels doivent être supprimés. Par exemple, ssh est
  installé sur mon système, et je n'ai pas voulu que les clefs privées
  soient disponibles sur tous les systèmes de fichier. J'ai donc
  supprimé le fichier des systèmes de fichiers virtuels après avoir
  lancé virtfs. Je change également le resolv.conf et supprime tout ce
  qui contient le nom d'un autre domaine, pour des raisons légales. 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 -- vérifier la mailq

  ·  virtnewaliases -- reconstruire la table des alias mail


  55..  DDNNSS

  Vous pouvez configurer le DNS normalement. Vous pouvez consulter le
  DNS HOWTO.


  66..  SSyyssllooggdd

  66..11..  PPrroobbllèèmmee

  Syslog est l'outil de _l_o_g_g_i_n_g couramment utilisé sur les systèmes
  UNIX. C'est un démon qui ouvre un fichier spécial appelé FIFO. Une
  FIFO est un fichier spécial, se comportant comme une file d'attente.
  Tout ce qui y est écrit "ressortira" en lecture. Le démon syslog
  attend les données 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éé.


  66..22..  SSoolluuttiioonn


  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 liés, ils ont le même numéro
  d'inode et pointent vers les mêmes données. Le chroot ne peut pas
  empêcher cela, et donc tous vos /dev/log virtuels vont à présent
  fonctionner. Notez également que tous les messages de toutes les
  machines virtuelles seront écrits dans un même fichier. Cependant,
  vous pouvez écrire des programmes pour filtrer les données.


  66..22..11..  SSyyssllooggdd..iinniitt

  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




  66..33..  PPlluussiieeuurrss ssyysslloodd

  66..33..11..  UUnn ppaarr ddiissqquuee

  Si vous manquez de place sur un système de fichiers, et que vous devez
  séparer 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 .


  66..33..22..  UUnn ppaarr ddoommaaiinnee

  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 rassemblés dans
  /var/log.  N'oubliez pas de lancer syslod normalement  syslod  pour le
  système principal ainsi qu'un logger pour le noyau  klogd .


  77..  FFTTPP vviirrttuueell

  77..11..  IInneettdd

  Wu-ftpd intégre en standard le support des domaines virtuels.
  Cependant, vous ne pouvez pas utiliser des fichiers de mot de passe
  différents pour chaque domaine. Par exemple, si bob@domaine1.com et
  bob@domaine2.com désirent 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 à présent de
  systèmes de fichiers différents pour chaque domaine, vous disposez de
  fichiers de mot de passe différents et ce problème disparaît. Vous
  n'avez qu'à créer un script virtnewuser et virtpasswd de la façon qui
  est expliquée ci-dessus, et tout fonctionnera.


  Les entrées pour wu-ftp dans inetd.conf sont :


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp wu.ftpd -l -a




  77..22..  LLeess FFTTPP aannoonnyymmeess

  Ils ne sont pas affectés par la presence de virtuald.  Pour un
  utilisateur anonyme, créer 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 répertoire anonyme du FTP. Vous avez des
  fichier de mot de passe séparés, donc vous pouvez restreindre
  n'importe quel domaine à un FTP avec un compte anonyme.  Notez que
  comme le serveur à un  chroot  dans le répertoire /virtual/domain1.com
  vous n'avez pas a préfixer de chemins avec.


  77..33..  UUttiilliissaatteeuurrss ddee FFTTPP VViirrttuueell

  Wu-ftpd supporte quelque chose qui s'appelle un groupe d'invité (guest
  group).  Ça permet de créer différentes zones FTP pour chaque
  utilisateur. Le serveur FTP fait un  chroot  vers la zone specifiée,
  donc, l'utilisateur ne peut sortir du répertoire. Si vous créez un
  utilisateur dans un domaine virtuel, il ne sera pas capable de voir le
  système de fichiers Système.


  Ajouter le group guest au fichier /virtual/domain1.com/etc/ftpaccess.


  Créer une entrée dans /virtual/domain1.com/etc/passwd avec  chroot et
  le répertoire home de départ séparé 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 separés pour chaque domaine,
  donc vous pouvez spécifier 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 à
  préfixer de chemin.


  88..  WWeebb vviirrttuueell

  88..11..  LLaanncceemmeenntt aavveecc vviirrttuuaalldd

  88..11..11..  NNoonn rreeccoommmmaannddéé

  Apache supporte en standard la gestion des domaines virtuels. C'est
  d'ailleurs le seul programme pour lequel je recommande d'utiliser le
  système de gestion des domaines virtuels fourni avec. Lorsque vous
  lancez un programme par l'intermédiaire d'inetd, il y a un coût
  supplémentaire, puisque le programme doit démarrer à chaque fois qu'il
  y a une demande de connexion, et vous obtenez des temps de réponse
  beaucoup plus longs, inacceptables pour le web. Apache intégre
  également un mécanisme 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 idée. 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 déjà la tâche.


  Ce qui suit ne restera pas ici, c'est pour expliquer à ceux qui sont
  assez idiots pour le faire.


  88..11..22..  IInneettdd

  É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




  88..11..33..  HHttttppdd..ccoonnff

  É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




  88..11..44..  CCoonnffiigguurraattiioonn

  Ensuite, configurez chaque cas du serveur Apache comme si vous n'aviez
  qu'un seul domaine.


  88..11..55..  HHttttppdd..iinniitt

  Un fichier httpd.init n'est pas nécéssaire si le serveur est lancé par
  inetd.


  88..22..  LLaanncceerr AAppaacchhee aavveecc VViirrttuuaallHHoosstt

  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 séparer en
  trois sections la configuration la rend plus simple à gérer, donc je
  garderai ce style dans le HOWTO.


  88..22..11..  AAcccceessss..ccoonnff

  Ce fichier de configuration est utilisé pour contrôler l'accès aux
  répertoires dans la structure du répertoire web. Voici un exemple de
  fichier de configuration qui montre comment avoir plusieurs options
  pour chaque domaine.

















  # /var/www/conf/access.conf: Configuration des accès globaux

  # Les options sont heritées du répertoire précedent
  # Mettre les options par défaut pour le répertoire principal
  <Directory />
  AllowOverride None
  Options Indexes
  </Directory>

  # Créer un répertoire 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>

  # Créer un autre domaine Server Side Include (SSI)
  <Directory /virtual/domain2.com/var/www/html>
  Options IncludesNOEXEC
  </Directory>




  88..22..22..  HHttttppdd..ccoonnff

  Ce fichier de configuration est utilisé pour contrôler les options
  principales du serveur Apache. Voici un exemple de fichier de
  configuration qui montre comment avoir différentes options pour chaque
  domaine.
































  # /var/www/conf/httpd.conf: Fichier de configuration principal du serveur

  # Début: Section principale
  ServerType standalone

  # Numéro 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

  # Début: Section de l'hébergement virtuel

  # Indique au serveur d'accepter les connexions pour IP:Port
  # Il y a une ligne pour chaque IP nécessaire donc, vous pouvez ignorer certains
  # domaines
  Listen 10.10.10.129:80
  Listen 10.10.10.130:80

  # La commande VirtualHost permet de spécifier un autre domaine virtuel sur le
  # serveur. La plupart des options d'Apache peuvent être spécifiées dans cette
  # section.
  <VirtualHost www.domain1.com>

  # E-mail à laquelle sont envoyées 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 envoyées 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




  88..22..33..  SSrrmm..ccoonnff

  Ce fichier de configuration est utilisé pour contrôler comment sont
  servies les demandes et comment sont formattés les résultats. 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.


  88..22..44..  HHttttppdd..iinniitt

  Rien de spécial n'est à faire dans ce fichier. Utilisez la version de
  base qui est fournie avec Apache.


  88..33..  DDeessccrriipptteeuurrss ddee ffiicchhiieerrss :: lliimmiittee ddee ccaappaacciittéé

  88..33..11..  AAtttteennttiioonn

  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 à accès à 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.



  88..33..22..  PPlluussiieeuurrss sseerrvveeuurr AAppaacchhee

  Si vous prévoyez cinq descripteurs de fichiers par domaine, vous
  pouvez avoir 50 domaines tournant sur votre serveur Apache sans
  problèmes. Mais, si votre serveur a des problèmes, vous pouvez créer
  /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.


  88..44..  HHéébbeerrggeerr pplluussiieeuurrss sseerrvveeuurrss aavveecc uunnee IIPP

  88..44..11..  ÉÉccoonnoommiisseerr ddeess IIPP

  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 même adresse IP et être deux site Web différents. La
  configuration d'Apache est la même qu'avant, à part que vous n'avez
  pas besoin de mettre plusieurs directives Listen comme les deux
  domaines ont la même IP.


  88..44..22..  IInnccoonnvvéénniieenntt

  Le seul problème est que virtuald utilise les adresses IP pour
  distinguer les domaines. Dans sa forme actuelle Virtuald ne serait pas
  capable de  chroot vers un répertoire de mail (spool) pour chaque
  domaine. Donc, les mails ne peuvent etre reçus que sur une IP et il
  n'y aurait plus un répertoire 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.


  88..55..  PPlluuss dd''iinnffoorrmmaattiioonnss

  Ce HOWTO montre seulement comment implémenter le support virtuel sur
  le serveur Web Apache.  La plupart des serveur Web utilisent une
  interface similaire. Pour plus d'informations sur l'hébergement de web
  virtuel, consultez le WWW-HOWTO, la documentation d'Apache sur le Site
  d'Apache, ou la documentation sur ApacheWeek.


  99..  MMaaiill vviirrttuueell aavveecc PPoopp

  99..11..  PPrroobbllèèmmee

  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 différents 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
  même boîte. C'est un problème puisque les bob sont deux personnes
  différentes, avec du courrier électronique différent.





  99..22..  SSoolluuttiioonn

  Vous pouvez vous assurer que chaque nom d'utilisateur est unique en
  utilisant une numérotation 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 désordonné. Le
  mail sortant à pour domaine domaineprincipal.com et vous désirez que
  chaque mail envoyé dans chaque sous-domaine ait une adresse From:
  différente.


  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 nécessaire 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 réveillent 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 répertoire de file d'attente. Il a
  besoin d'un autre programme puisque que Qmail ne se fonde pas sur
  virtuald. Je crois qu'une procédure similaire peut être faite avec
  Sendmail. Cependant, Qmail se prête plus aisément à 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.


  99..33..  SSoolluuttiioonn ppoouurr SSeennddmmaaiill

  99..33..11..  IInnttrroodduuccttiioonn

  Chaque système de fichiers virtuel fournit à chaque domaine un fichier
  /etc/passwd. Cela signifie que bob@domaine1.com et bob@domaine2.com
  sont des utilisateurs différents dans des fichiers /etc/passwd
  différents, donc le mail ne constituera aucun problème. Ils possèdent
  également chacun un spool de mail, donc les boîtes aux lettres seront
  des fichiers différents sur des système de fichiers virtuels
  différents.


  99..33..22..  CCrrééeerr uunn ffiicchhiieerr ddee ccoonnffiigguurraattiioonn SSeennddmmaaiill

  Créez  /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)






  99..33..33..  ÉÉddiittiioonn dduu ffiicchhiieerr ddee ccoonnffiigguurraattiioonn

  É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




  99..33..44..  DDiissttrriibbuuttiioonn llooccaallee ppaarr SSeennddmmaaiill

  Éditez /virtual/domain1.com/etc/sendmail.cw

  vi /virtual/domain1.com/etc/sendmail.cw
  mail.domain1.com
  domain1.com
  domain1
  localhost




  99..33..55..  SSeennddmmaaiill eett lleess ddoommaaiinneess vviirrttuueellss :: llaa bbiiddoouuiillllee ((pprree88..88..66))

  Cependant, sendmail nécessite 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
  vérification interne de toutes les interfaces réseau de la machine
  pour initialiser cette liste avec les adresses IP locales. Cela
  présente un problème si vous envoyez des mails entre deux domaines
  virtuels de la même 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 problème 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 nécessaire que si vous désirez
  envoyer du mail entre des domaines virtuels, ce qui est probable, je
  pense.


  Cela corrigera le problème. Cependant, l'adaptateur réseau principal
  eth0 n'est pas supprimé. Ainsi, si vous envoyez un mail depuis une
  adresse IP virtuelle vers une adresse sur eth0 de la même machine, il
  sera délivré localement. Pour cela, j'utilise une adresse IP bidon
  virtuel1.domaine.com (10.10.10.157). Je n'envoie jamais de mail à cet
  hôte, les domaines virtuels non plus. C'est aussi l'adresse IP que
  j'utiliserai pour me connecter sur la machine via ssh, pour vérifier
  si le système fonctionne.


  99..33..66..  SSeennddmmaaiill eett lleess ddoommaaiinneess vviirrttuueellss :: NNoouuvveellllee ffoonnccttiioonn
  ((PPOOSSTT88..88..66))

  Depuis la version 8.8.6 de Sendmail, il existe une option qui
  désactive le chargement des interfaces réseaux supplémentaires. Ce qui
  implique la NON nécéssité 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




  99..33..77..  SSeennddmmaaiill..iinniitt

  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
  réponse plus long, mais si vous avez un site tellement occupé pour que
  la différence soit importante, alors vous devriez utiliser une machine
  dédiée à 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 gérez. 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




  99..33..88..  CCoonnffiigguurraattiioonn dd''iinneettdd

  Pop devrait s'installer normalement, sans effort supplémentaire. Vous
  n'avez qu'à modifier l'entrée pour pop dans le fichier inetd.conf pour
  utiliser le démon 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




  99..44..  SSoolluuttiioonn ppoouurr QQmmaaiill

  99..44..11..  IInnttrroodduuccttiioonn

  Cette solution prend la responsabilité de distribution du qmail-local,
  donc l'utilisation des fichiers .qmail dans les répertoire home des
  domaines virtuels ne marcheront pas. Cependant, chaque domaine aura
  toujours un utilisateur maître par domaine qui contrôlera les aliasing
  du domaine. Deux programmes externes seront utilisés pour le fichier
  .qmail-default  des maîtres de domaine.  Le mail passera par ces deux
  programmes afin de distribuer le courrier à chaque domaine.


  Deux programmes sont necéssaires, 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 sécurité pour une discussion sur le pourquoi
  est-ce nécessaire.


  Cette solution se passe de virtuald. Qmail est assez flexible pour ne
  pas avoir besoin d'une configuration virtuald génerale. La conception
  de Qmail utilise l'enchaînement de programmes pour distribuer les
  mails. Cette conception facilite l'insertion d'une section virtuelle
  dans le processus de distribution de Qmail sans altérer une
  installation standard de Qmail.


  Depuis que vous utilisez Qmail, tout nom de domaine non qualifié sera
  développé en utilisant le serveur principal. C'est dû au fait que vous
  n'avez pas un Qmail pour chaque domaine. Donc, soyez sûr que vos
  clients (Eudora, elm, mutt, etc.) puissent developper tous vos noms de
  domaines non qualifiés.


  99..44..22..  IInnssttaallllaattiioonn ddeess ddoommaaiinneess vviirrttuueellss

  Qmail doit être configuré de manière à accepter les mails pour chaque
  domaine que vous désservez. Tapez la commande suivante :


  echo "domain1.com:domain1" >> /var/qmail/control/virtualdomains




  99..44..33..  IInnssttaallllaattiioonn ddee ll''uuttiilliissaatteeuurr mmaaîîttrree dduu ddoommaaiinnee

  Ajouter à votre fichier  /etc/passwd  principal l'utilisateur domain1.
  Je choisirais le shell /bin/false pour que le maître 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 caractères et les noms
  de domaines peuvent être plus long. Les caractères restants seront
  ignorés. Ce qui implique, que les utilisateurs domain12 et domain123
  seraient le même utilisateur et Qmail pourra être perturbé. Donc,
  attention à votre convention pour nommer les utilisateurs maîtres des
  domaines.


  Créer les fichiers .qmail du maître de domaine avec les commandes
  suivantes. Ajoutez les autres alias système au même 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



  Créez le fichier .qmail-default du maître de domaine. Il filtre tous
  les mails du domaine virtuel.

  echo "| /usr/local/bin/virtmailfilter" > /home/d/domain1/.qmail-default




  99..44..44..  TTccppsseerrvveerr

  Qmail a besoin d'un pop spécial 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 passées par une ligne de commande. Ci-
  dessous, se trouve le fichier tcpserver.ini que vous devez utiliser
  pour le démon 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 appellés.
  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




  99..44..55..  QQmmaaiill..iinniitt

  Vous pouvez utiliser le script standard de Qmail.init fourni. Qmail
  est livré avec une très bonne documentation décrivant comment le
  mettre en place.




  99..44..66..  SSoouurrccee

  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));
  }
  99..44..77..  SSoouurrccee

  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);
  }




  99..55..  RReemmeerrcciieemmeennttss

  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é.


  1100..  SSaammbbaa VViirrttuueell

  1100..11..  MMiissee eenn ppllaaccee

  L'installation de Samba Virtuel est très simple. Soyez sûr que les
  fichiers suivants soit installés 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

  1100..22..  IInneettdd

  É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




  1100..33..  SSmmbb..iinniitt

  Un fichier smb.init n'est pas nécessaire tant que le serveur est lancé
  via inetd.


  1111..  LLee rreessttee


  Tout autre service devrait suivre une procédure similaire :


  ·  Lancer virtfs pour ajouter le binaire et les librairies au système
     de fichiers virtuel ;

  ·  L'ajouter dans /etc/inetd.conf ;

  ·  Créer un fichier /virtual/conf.service ;

  ·  Créer tout script virtuel manquant.


  1122..  CCoonncclluussiioonn

  Voici tout ce dont vous avez besoin. J'espère que cet article répond à
  vos attentes. Vous pouvez utiliser l'email à Computer Resource Center
  pour tout commentaire (NdT : en anglais bien sûr). 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 intêret. Je remercie toutes les
  personnes qui m'ont envoyé des questions et qui m'ont aidé à former ce
  document pour obtenir l'intérêt des utilisateurs. Avant de me poser
  des questions, je vous recommande de lire la FAQ pour voir si cela n'a
  pas déjà été demandé. Merci encore.  Brian


  1133..  FFAAQQ

  QQ11. 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.


  RR11. Ces fichiers sont appellés scripts d'initialisation. Ils sont
  lancés par le programme init quand votre ordinateur démarre. Ils ne
  vont pas avec les binaires de /usr/local. Consultez le Guide de
  l'Administrateur Système Linux (Linux System Administrators Guide) ou
  le Guide pour Bien Démarrer avec Linux (Linux Getting Started Guide)
  pour des informations sur la manière d'utiliser les scripts
  d'initialisation du système.


  QQ22. 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 ?


  RR22. 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 capacités de macros pour créer le fichier  sendmailf.cf .
  Les lignes FEATURE sont en fait des macros qui se développent par
  rapport à la configuration de Sendmail. Lisez la documentation de
  sendmail pour savoir comment configurer sendmail avec cette méthode.
  Aussi, notez que vous créez 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.


  QQ33. Ou puis-je trouver virtuald, qu'est-ce donc et comment
  l'utiliser ?


  RR33. 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 résultant est placé dans /usr/local/bin.
  Ajoutez les lignes nécessaires à /etc/inetd.conf pour utiliser
  virtuald comme une facade vers un programme serveur.


  QQ44. Dialog n'est pas installé sur mon système ?


  RR44. Dialog est un programme qui permet d'avoir des fenêtres dans vos
  scripts shell. Il est nécéssaire pour faire fonctionner mon script
  shell virtuel.  Vous pouvez trouver une copie de dialog sur metalab.
  Il ne devrait pas y avoir de problèmes pour le compiler et
  l'installer.


  QQ55. Comment puis-je savoir si le syslogd virtuel marche ?


  RR55.  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
  système
   chroot  effectué. Si ce message apparaît, 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 démon
  qui rend un service virtuel indépendamment, logue quelque chose avec
  syslogd.


  QQ66. Comment puis-je installer des quotas à travers un système de
  fichiers virtuel ?


  RR66. Vous l'installez comme vous le feriez d'habitude. Aller voir le
  Quota mini-HOWTO.  Cependant, vous devez être sûr 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.  Préparez 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.


  QQ77. Que fait cette notation "\" dans toutes les entrées du
  inetd.conf ?


  RR77. C'est juste une méthode 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 manière à obtenir une meilleure
  présentation. Vous pouvez ingorer le "\" et les rejoindre en une
  seule.


  QQ88. Quand je lance  passwd  ou n'importe quel programme concernant les
  logins, le système me renvoie  permission denied .  Quand je lance FTP
  ou  su  le système me renvoié
   no modules loaded for service XXX . Pourquoi ?


  RR88. 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
  problèmes.


  QQ99. Est-ce que virtuald peut fonctionner avec les hosts.allow et
  hosts.deny de tcpd ?


  RR99. Oui, il peut, mais avec quelques modifications.


  D'abord, le code source doit être changé en deux endroits.


  Il faut insérer ces lignes là où les arguments sont analysés.


          if (!argv[3])
          {
                  syslog(LOG_ERR,"invalid arguments: no program to run");
                  exit(0);
          }



  La ligne d'exécution doit remplacer :


          if (execvp(argv[2],argv+2)<0)



  par :


          if (execvp(argv[2],argv+3)<0)



  Deuxièmement, les lignes du fichier  inetd.conf  :


  ftp stream tcp nowait root /usr/local/bin/virtuald \
          virtuald /virtual/conf.ftp tcpd wu.ftpd -l -a



  Troisièmement, éditer les fichier
  /virtual/domain1.com/etc/hosts.allow et
  /virtual/domain1.com/etc/hosts.deny pour mettre vos paramètres.


  QQ1100. Est-ce que mon serveur virtuel peut lancer des CGI ?


  RR1100. Bien sûr, mais je vous recommande de mettre le répertoire
   /cgi-bin  à un endroit en dehors du  chroot , où vous seul avez
  accès. Par exemple, /var/www/cgi-bin/domain1.com. Donner l'accès aux
  cients à /cgi-bin leur donne la possibilité de lancer des programmes
  sur votre serveur. C'est un gros trou de sécurité. Soyez prudent. Je
  ne laisse aucun CGI tourner sur mon système sans que je n'ai pas
  personnellement cherché d'éventuels bugs.


  QQ1111. Mes fichiers de configuration sont différents de vos exemples.
  Que dois je faire ?


  RR1111 Il y a deux styles de configuration : System V et BSD. Les
  exemples fournis dans ce HOWTO sont basés sur les fichiers de
  configuration System V.  Les services virtuels marchent aussi bien sur
  l'autre système. Pour des informations sur la méthode pour configurer
  vos fichier de style BSD, consultez l'origine de votre distribution ou
  le site LDP le plus près.



  QQ1122. Je vous ai envoyé un mail et n'ai pas reçu de réponses ou alors
  elles ont pris un long moment avant de me parvenir. Pourquoi ?


  RR1122. Vous n'avez sûrement pas mis VIRTSERVICES HOWTO dans le sujet.
  Sachez que je suis un administrateur réseau, 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 réponse
  dans les deux ou trois jours suivants. Les mails mal adressés ne
  seront pas filtrés vers ma boîte aux lettres pour VIRTSERVICES, et
  peuvent m'être inconnus pendant plusieurs jours, voir semaines.


  QQ1133. Est-ce que virtuald marche avec une connection a 100Mbit ?


  RR1133. La vitesse d'une carte réseau est totalement indépendante du fait
  que virtuald fonctionne ou pas. Vérifiez que votre serveur tourne sous
  10Mbit et que votre carte 100Mbit fonctionne normalement sans un
  serveur virtuel.


  QQ1144. Est-ce que je dois utiliser la  table virthost  de sendmail ?


  RR1144. Non, c'est une fonctionnalité de Sendmail qui reçoit 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.


  QQ1155. Puis-je installer un telnet virtuel sur ma machine ? Et est-il
  possible de créer un compte root virtuel, pour que les client puissent
  administrer leur propre domaine ?


  RR1155. Ces questions reviennent souvent, et pour etre honnête, j'en ai
  un peu marre de les entendre. La réponse, qui est dans ce document,
  est que n'importe quel service lancé par inetd peut être rendu
  virtuel, donc rien ne vous empêche de le faire. Rien, à part le bon
  sens.  Cependant, les bénéfices que vous pouvez avoir sont fortement
  altérés par le prix de la securité de votre machine virtuelle (ainsi
  que les sites que vous êtes supposés héberger d'une manière
  résponsable). Voici quelques exemples :


  ·  Afin de duper une session telnet entrante vous devez modifier le
     noyau, pour avoir plusieurs proccessus, réinitialiser votre adresse
     IP source pour les connections sortantes, duper  gethostname  pour
     qu'il utilise le nom de domaine virtuel et non celui du système,
     etc.  Si vous êtes un utilisateur avancé, hackez le kernel. Pour un
     débutant, 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 privilèges root et causer des
     dommages sur votre système.

  ·  Donner un accès root en telnet sur une machine virtuelle est très
     mauvais.  Un utilisateur root virtuel peut quand même lire les
     fichiers des péripheriques , ce qui annule le  chroot , peut
     éteindre le système et tuer les autres processus sur le système.

  ·  Telnet est un service réseau non sécurisé. Des mots de passes sont
     envoyés en clair par le réseau. Si un utilisateur avec de mauvaises
     intentions récupère ce mot de passe, il ou elle peut utiliser les
     attaques mentionnées ci-dessus pour nuire à votre système.

  ·  Votre environnement virtuel devra être plus gros. Vous aurez besoin
     de plus de librairies, plus de fichiers de configuration, et plus
     d'exécutables. Un disque de 6Go peut être très vite rempli.


  Comme quoi, c'est une très mauvaise idée d'autoriser des connections
  sur une machine virtuelle. Si vous le permettez, tous les sites
  hebergés sur cette machine seront en danger. Si vous voulez autoriser
  un propriétaire de site à administrer ses utilisateurs, vous devez
  alors écrire (pas de script) le programme nécessaire pour lancer un
  processus virtuel qui l'autorise à les ajouter, effacer ou modifier en
  se connectant par ssh. Ceci devra être complètement exécuté par menus,
  vous ne devrez jamais autoriser de consoles, ou d'accès root. Afin
  d'accomplir ceci, vous devrez changer le propriétaire des fichiers
  concernés 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
  désastre. S'il y avait une raison de le faire, le site devrait être
  hébergé sur une machine dédiée, 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.


  QQ1166. Y a-t-il un rpm, tar, site web, liste de diffusion, etc. associé
  à virtuald et au Virtual-Services HOWTO ?


  RR1166. 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.


  QQ1177. Quand j'essaye de lancer virtexec en tant que simple utilisateur,
  j'ai  chroot: operation not permitted . Pourquoi ?


  RR1177.  chroot  est un appl système 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.


  QQ1188. J'ai mis en place pop et sendmail, mais la récuperation des mails
  ne semble pas marcher. D'où cela vient-il ?


  RR1188. Certains programmes pop prennent comme emplacement des fichiers
  mail
   /usr/spool/mail . Je sais que  qpop  doit etre édité manuellement
  pour résoudre ce problème. 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 .


  QQ1199. Je n'ai pas utilisé le programme mentionné dans votre HOWTO,
  j'utilise le programme XXX. Il ne marche pas. Pourquoi ?


  RR1199. J'ai essayé de faire des exemples le plus génerique 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 problème 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).


  QQ2200. Quand je lance virtexec il dit  symlink not a virt function .
  Qu'est-ce que cela veut dire et comment le réparer ?


  RR2200. Virtexec est programme pour lequel les arguments sont les quatres
  premiers caractères, 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
  très simple à porter.  Référez vous aux pages de manuels de bash ou du
  shell que vous utilisez pour vos question sur la programmation de
  script shell.


  QQ2211. 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.


  RR2211. Tous les paquetages décris ici sont pleinement documentés.
  Certains ont un site web comme  www.nom_du_paquetage.org  qui leur est
  entièrement dédié. S'il vous plait consultez ces documents à propos de
  ce genre de questions.


  QQ2222. J'ai plusieurs alias de domaines pointant sur domain1.com mais
  les mails continuent à être renvoyés aux alias. D'où est-ce que ca
  vient ?

  AA2222. Virtmaildelivery compte sur les variables d'environnement qui lui
  sont passées pour déterminer quel répertoire /virtual/domain1.com
  utiliser pour distribuer le courrier. Il ne fait pas de recherche DNS
  pour déterminer 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 créer des liens symboliques
  comme :


  cd /virtual
  ln -s domain1.com domain1alias.com



  De cette manière, virtmaildelivery sera trompé en pensant que ces
  mêmes répertoires existent même 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 répertoires des domaines dans la boîte de
  dialogue quand vous le lancerez. Vous pouvez choisir n'importe lequel,
  mais ce sera le même système de fichier.





































































  Linux WWW-HOWTO
  Wayne Leister, n3mtr@qis.net;
  Version Française 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 prévu pour
  être un manuel détaillé mais une vue d'ensemble et un bon pointeur
  vers des informations complémentaires.
  ______________________________________________________________________

  Table des matières






















































  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 différentes.
     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 Héberger des serveurs web virtuels
        7.4.1 Hébergement virtuel basé IP
        7.4.2 Hébergement virtuel par IP partagée
     7.5 Scripts CGI
     7.6 Répertoires Web des Utilisateurs
     7.7 Mode démon contre mode Inetd
     7.8 Autoriser les commandes put et delete
     7.9 Authentification de l'Utilisateur / Contrôle des Accès
     7.10 su-exec
     7.11 Imagemaps
     7.12 SSI/XSSI
     7.13 Système modulaire

  8. Ajouts au serveur web

  9. FAQ (Foire Aux Questions)

  10. Documents plus avancés

     10.1 Livres de chez O'Reilly & Associates
     10.2 Internet Request For Comments (RFC)


  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  La plupart des gens sont passés sous Linux car ils cherchaient une
  plateforme véritablement _a_d_a_p_t_é_e _à _l_'_I_n_t_e_r_n_e_t.  De plus, des
  institutions, des universités, des organisations à but non lucratif,
  et de petites entreprises désirent 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 indiqués 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 même, les compagnies
  US créeront deux versions de leurs logiciels. La version destinée au
  marché intérieur 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 sécurisées. L'autre nom des
  transactions sécurisées est le Secure Socket Layer (SSL).  Nous nous
  référerons à ces transactions comme SSL pour le reste du document.


  11..11..  CCooppyyrriigghhtt

  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 Générale GNU publiée
  par la Free Software Foundation (version 2 ou bien toute autre version
  ultérieure choisie par vous).

  Cette documentation est distribuée car potentiellement utile, mais
  SSAANNSS AAUUCCUUNNEE GGAARRAANNTTIIEE, ni explicite ni implicite, y compris les
  garanties de ccoommmmeerrcciiaalliissaattiioonn ou dd''aaddaappttaattiioonn ddaannss uunn bbuutt ssppéécciiffiiqquuee.
  Reportez-vous à la Licence Publique Générale GNU pour plus de détails.

  Vous pouvez obtenir une copie de la Licence Publique Générale GNU en
  écrivant à la Free Software Foundation <http://www.fsf.org>, Inc., 675
  Mass Ave, Cambridge, MA 02139, États-Unis.

  Les marques déposées sont propriétés de leurs propriétaire respectif.


  11..22..  EEcchhooss

  Tout écho est le bienvenu. Je ne clame pas être un expert.  Une partie
  des informations provient de sites web mal écrits; il est très
  probable qu'il y ait des erreurs et des omissions. Cependant, vérifiez
  que vous avez la dernière version avant d'envoyer des corrections; ce
  pourrait être fixé dans la version suivante (voyez la section qui suit
  pour savoir où trouver la dernière version). Envoyez vos réactions à
  n3mtr@qis.net.


  11..33..  NNoouuvveelllleess vveerrssiioonnss ddee ccee ddooccuummeenntt

  Les nouvelles versions de ce document peuvent être récupérées 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 dernière 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.
  22..  CCoonnffiigguurreerr uunn cclliieenntt WWWWWW

  Le chapitre qui suit est dédié à la configuration des navigateurs.
  Vous êtes libres de me contacter si votre navigateur favori n'est pas
  présent 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 décider en
  faveur d'un navigateur, et vous donne les informations principales sur
  chaque navigateur. La section détails est destiné à vous aider à
  installer, configurer, et maintenir chaque navigateur.

  Personnellement, je préfère Netscape; c'est le seul navigateur qui
  offre les dernières nouveautés en HTML. Par exemple, les Frames, Java,
  Javascript, les feuilles de styles, les layers, et les transactions
  sécurisées. Rien n'est plus désagréable 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.


  22..11..  SSuurrvvooll


     ````NNaavviiggaattoorr//CCoommmmuunniiccaattoorr''''
        Netscape Navigator est le seul navigateur mentionné ici qui peut
        utiliser les dernières nouveautés 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 mémoire. Il utilise
        également un cache séparé pour tous les utilisateurs, ce faisant
        utilisant de l'espace disque. Netscape est un produit
        commercial.  Les compagnies ont une période 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 obligés d'utiliser MS Internet Explorer sur une
        plateforme Windows :(


     ````LLyynnxx''''
        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.


     KKffmm
        Kfm fait partie de K Desktop Environment (KDE). KDE est un
        système qui tourne au-dessus de X-Window. Il vous donne de
        nombreuses spécificités comme le copier - coller, les sons, une
        corbeille et une apparence unifiée. 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 très utilisable en tant que
        navigateur. Il supporte déjà 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 utilisées par KDE. Pour plus
        d'informations sur KDE et Kfm, visitez le site web de KDE à
        <http://www.kde.org>.


     ````EEmmaaccss''''
        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 très 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 inconvénient 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.


     NNCCSSAA MMoossaaiicc
        Mosaic est un navigateur X-Window développé 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 dernière 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> possède les droits commerciaux sur
        Mosaic. C'est un navigateur X-Window solide, mais il lui manque
        les dernières nouveautés 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>.


     AArreennaa
        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 développement a été
        effectué par Yggdrasil Computing, dans l'idée d'en faire un
        navigateur X-Window totalement libre. Mais le développement a
        été stoppé en février 1997 avec la version 0.3.11. Une partie
        seulement du standard HTML 3.2 a été implémentée. 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/>.


     AAmmaayyaa
        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 nouveautés 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 dernière
        version publique est la 1.0 beta. La version 1.1 beta est en
        tests internes et doit sortir bientôt. 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>.


     RReedd BBaarroonn
        Red Baron un navigateur X-Window conçu 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>.


     CChhiimmeerraa
        Chimera est un navigateur X-Window basique. Il supporte quelques
        unes des spécificités du HTML 3.2. La dernière version est la
        2.0 alpha 6 du 27 août 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>.


     QQwweebb
        Qweb est encore un autre navigateur X-Window basique. Il
        supporte les tableaux, les formulaires, et les cartes des images
        côté serveur. La dernière 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>.


     GGrraaiill
        Grail est un navigateur X-Window développé par la Corporation
        for National Research Initiatives (CNRI). Grail est entièrement
        écrit en Python, un langage interprété orienté objet. La
        dernière 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.


     IInntteerrnneett EExxpplloorreerr
        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 sûr, envoyez moi un mail.


  A mon humble avis, la plupart des logiciels ci-dessus sont
  inutilisables pour apprécier sérieusement le web. Je n'essaye pas de
  discréditer les auteurs, je sais qu'ils ont travaillé très 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.



  33..  LLyynnxx

  Lynx est des plus petits (environ 600 ko d'exécutable) 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 système 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 mémoire
  supplémentaire pour faire tourner ce petit browser.


  33..11..  OOùù ll''oobbtteenniirr ??

  Les deux distributions Red Hat et Slackware incluent Lynx. C'est
  pourquoi je ne vous ennuierai pas avec les détails sur la compilation
  et l'installation de Lynx.

  La dernière 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:

     LLyynnxx LLiinnkkss
        <http://www.crl.com/~subir/lynx.html>

     LLyynnxx PPaaggeess
        <http://lynx.browser.org>

     LLyynnxx HHeellpp PPaaggeess
        <http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html>
        (les mêmes que celle données par lynx --help et ? dans lynx).

  Note: les pages d'aides de Lynx ont récemment déménagé. 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 spécificité la plus importante de Lynx par rapport à
  tous les autres navigateurs web est sa capacité de récupération
  automatique des fichiers.N'importe qui peut écrire un script qui
  récupérera 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 données dans les
  formulaires HTML en mode batch en redirigeant simplement l'entrée
  standard et en utilisant l'option _-_p_o_s_t___d_a_t_a.

  Pour en savoir plus les spécificités exceptionnelles de Lynx regardez
  juste les fichiers d'aide et les pages de man. Si vous utilisez une
  option spéciale de Lynx que vous désireriez voir ajouter à ce
  document, faîtes le moi savoir.


  44..  EEmmaaccss--WW33

  Il y a différentes 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 départ par Lucid Emacs) est une version qui tourne uniquement sous
  X-Window. Il dispose de nombreuses spécificités de type X-Window (de
  meilleurs menus, ...).


  44..11..  OOùù ll''oobbtteenniirr ??

  Les deux distributions Red Hat et Slackware incluent GNU Emacs.

  Le GNU emacs le plus récent 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 dernière 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/


  55..  NNeettssccaappee NNaavviiggaattoorr//CCoommmmuunniiccaattoorr


  55..11..  DDeess vveerrssiioonnss eett ddeess ooppttiioonnss ddiifffféérreenntteess..

  Netscape Navigator est le roi des navigateurs WWW. Netscape Navigator
  peut quasiment tout faire. Mais d'un autre côté, c'est un des
  programmes les plus gourmand en mémoire et en ressources que j'ai pu
  voir.

  Il y a 3 versions différentes 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 conférences 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 siège).

  En addition à ces trois versions il y a deux autres options que vous
  pouvez choisir.

  La première est l'installation complète ou basique. L'installation
  complète vous installe tout. L'installation de base vous en donne
  suffisamment pour commencer. Vous pouvez charger les composants
  supplémentaires lorsque vous en avez besoin (comme le support
  multimedia et netscaster). Ces composants peuvent être installés par
  l'utilitaire 'smart update' de Netscape (après l'installation allez
  dans 'help->software updates'). Actuellement, l'installation complète
  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 sécurisées
  (SSL).  La version d'export dispose seulement d'une encryption 40
  bits, et est la seule version autorisée en dehors des US et du Canada.

  La dernière version de Netscape Navigator/Communicator/Communicator
  Pro est la 4.03. Il y a deux versions différentes pour Linux, une pour
  l'ancienne série des noyaux 1.2 et une pour les nouveaux 2.0. Si vous
  n'avez pas de noyau 2.0 je vous suggère de le mettre à jour; il y a de
  nombreuses nouveautés dans le nouveau noyau.

  Des beta version sont également disponibles. Si vous essayez une
  version beta, elles expireront généralement plus ou moins un mois
  après !


  55..22..  OOùù ll''oobbtteenniirr ??


  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 sélection. Lorsqu'on
  demande une version Linux, on référence par rapport au noyau (la
  plupart des gens doivent maintenant utiliser le 2.0). Si vous n'êtes
  pas sûr 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 désirez une version export vous pouvez la charger directement
  des serveurs FTP de Netscape. Leurs serveurs FTP sont également plus à
  jour. Par exemple la première 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 pêchant sur le
  site FTP  <ftp://ftp.netscape.com/pub/communicator/>.

  Ces serveurs sont souvent très chargés. Il vaut mieux attendre hors
  des heures de bureau ou choisir un site mirroir. Soyez préparé à
  attendre, ces archives sont grosses. Navigator pèse environ 8 megs, et
  l'installation de base de Communicator est de 10 megs.


  55..33..  IInnssttaallllaattiioonn

  Cette section explique comment installer la version 4 de Netscape
  Navigator, Communicator, et Communicator Pro.

  Tout d'abord décompactez l'archive dans un répertoire temporaire.
  Lancez ensuite le script ns-install (tapez ./ns-install).  Créez
  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 système la valeur
  /usr/local/netscape, de façon à 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"




  Après 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).




  66..  LLaanncceerr uunn sseerrvveerr WWWWWW

  Cette section contient des informations sur les différents 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 présentation ont été
  récupérées sur divers sites web.  S'il y a des informations
  incorrectes ou manquantes, veuillez me le faire savoir.


  Pour une documentation plus technique des mécanismes du http, voyez
  les RFCs mentionnées dans le chapitre "Documents plus avancés" de ce
  HOWTO.

  Je préfère utiliser le serveur Apache. Il a la plupart des options que
  vous avez jamais désiré et il est gratuit ! J'admets que cette section
  est fortement orientée vers Apache. J'ai décidé de concentrer mes
  efforts sur la section Apache plutôt que le négliger par rapport à
  tous les autres serveurs web. Je pourrais couvrir d'autres serveurs
  web dans le futur.


  66..11..  SSuurrvvooll


     CCeerrnn hhttttppdd
        Ce fut le premier serveur web. Il a été développé 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 dernière version est la 3.0.  Pour plus d'informations
        visitez la page mère 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).


     NNCCSSAA HHTTTTPPdd
        Le serveur NCSA HTTPd est le père d'Apache (le développement a
        donné naissance à deux serveurs différents). Toutefois les
        fichiers de configuration sont très 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 fût
        populaire, mais la plupart des gens l'ont remplacé par Apache.
        Apache est un essai de remplacement du serveur NCSA (même
        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 dernière version
        est la 1.5.2a. Pour plus d'informations voyez le site du NCSA à
        <http://hoohoo.ncsa.uiuc.edu>.


     ````AAppaacchhee''''
        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 caractéristiques. Apache est très flexible et
        dispose de très, très nombreuses caractéristiques. Apache et ses
        dérivés réalisent 44% de tous les domaines web (50% su vous
        comptez tous les dérivés).  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 dérivés 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 (basée sur une
        vieille version d'Apache).  Stronghold est le numéro deux des
        serveurs sécurisés derrière 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é développé
        hors des US, il est donc disponible avec du SSL en 128 bits
        partout.

        Apache-SSL est une implémentation 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/>.


     NNeettssccaappee FFaasstt TTrraacckk SSeerrvveerr
        Fast Track a été développé 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 sûr qu'il
        tourne seulement sous Caldera OpenLinux ou si toute distribution
        Linux peut le faire (écrivez moi si vous connaissez la réponse).
        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 dernière 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/>


     WWNN WN dispose de nombreuses caractéristiques qui le rende
        attractif.  Tout d'abord il est plus petit que les serveurs
        CERN, NCSA HTTPd, Apache. Il dispose également de nombreuses
        options intégrées qui nécessiteraient sinon des CGI. Par exemple
        la recherche sur le site, des intégrés du côté du serveur. Il
        peut également décompresser/compresser des fichiers en
        transparence avec son option de filtrage. Il peut également
        récupérer 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/>.


     AAOOLLsseerrvveerr
        AOLserver est développé 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 données. Les pages peuvent
        interroger une base de données par les commandes Structured
        Query Language (SQL). La base de données 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 même 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/>.


     ZZeeuuss SSeerrvveerr
        Zeus Server a été développé par Zeus Technology. Ils se
        réclament comme ayant le serveur web le plus rapide (d'après la
        batterie de tests WebSpec96). Le serveur peut être configuré et
        contrôlé par un navigateur web ! Cela limite l'encombrement du
        processeur et de la mémoire pour les scripts CGI, et il
        s'exécute dans un environnement sécurisé (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 désirez le serveur sécurisé (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 préviens qu'ils sont trop sûrs
        d'eux à propos de leur serveur le plus rapide. Mais ils
        n'apparaissent même pas dans le top des serveurs web de la
        Netcraft Surveys.


     CCLL--HHTTTTPP
        CL-HTTP est l'abrégé 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 basée 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 avancés,
  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 néanmoins l'utilisation de l'un des
  trois pré-cités.

  Il s'agit seulement d'une liste partielle de tous les serveurs
  disponibles.  Pour une liste plus complète visitez Netcraft à
  <http://www.netcraft.com/survey/servers.html> ou Web Compare à
  <http://webcompare.internet.com>.


  77..  AAppaacchhee

  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 détails 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 développeurs. Sans vouloir discréditer les développeurs, ils sont
  un peu difficiles à comprendre si vous ne connaissez pas la
  terminologie.


  77..11..  OOùù ll''oobbtteenniirr ??

  Apache est inclus dans les distributions Red Hat, Slackware, et
  OpenLinux.  Cependant il se peut que ce ne soit pas la dernière
  version, ce sont des binaires très fiables. La mauvaise nouvelle est
  que vous aurez à vivre avec leurs choix de répertoires (qui sont
  totalement différents les uns des autres et de ceux par défaut
  d'Apache).

  Le source est disponible sur le site web d'Apache à
  <http://www.apache.org/dist/>.  Les binaires sont également
  disponibles au même 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 généralement dans le répertoire 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 même. 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 sécurité. Un binaire inconnu peut avoir une "sortie cachée" pour
  les hackers, ou une correction instable peut crasher votre système.
  Ceci vous donnera également plus de contrôle sur les modules compilés,
  et vous autorisera à changer les répertoires par défaut. Il n'est pas
  difficile de compiler Apache, et vous ne serez pas un réel utilisateur
  de Linux tant que vous ne compilerez pas vos programmes ;)


  77..22..  CCoommppiilleerr eett IInnssttaalllleerr

  Tout d'abord décompactez l'archive dans un répertoire temporaire.
  Ensuite placez vous dans le répertoire src. Editez alors le fichier
  Configuration si vous désirez ajouter des modules spéciaux. Les
  modules les plus communément utilisés sont déjà inclus. Il n'y a pas
  besoin de changer les règles ou le makefile pour Linux. Lancez ensuite
  le script shell Configure (./Configure). Vérifiez 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
  répertoires par défaut.  L'emplacement du serveur (où sont conservés
  les fichiers de configuration) par défaut est /usr/local/etc/httpd/,
  mais vous pouvez le changer pour juste /etc/httpd/. Et le répertoire
  principal du serveur (où sont conservées les pages HTML) par défaut
  est /usr/local/etc/httpd/htdocs/, mais j'apprécie le répertoire
  /home/httpd/html (le défaut de Red Hat pour Apache). Si vous devez
  utiliser su-exec (voir les options spéciales plus bas) vous pouvez
  également désirer changer le répertoire. Le répertoire 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 problèmes au sujet de fichiers include manquants,
  vérifiez les points suivants. Vérifiez que vous avez les entêtes du
  noyau (fichiers include) installés pour votre version du noyau.
  Vérifiez également que vous avez ces liens symboliques installés:


       /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 créés 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 exécutable nommé httpd dans
  le répertoire. Il est nécessaire de le déplacer dans un répertoire
  bin.  /usr/sbin ou /usr/local/sbin seraient de bons choix.

  Copiez les sous-répertoires conf, logs, et icons des sources vers
  l'emplacement du serveur. Renommez ensuite trois des fichiers du sous-
  répertoire conf pour vous débarasser 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 répertoire support et doivent être compilés et
  installés séparément/ La plupart d'entre eux peuvent être créés en
  utilisant le makefile de leur répertoire (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.


  77..33..  CCoonnffiigguurreerr

  Maintenant vous devez avoir quatre fichiers dans votre sous-répertoire
  conf de l'emplacement du serveur. Le fichier httpd.conf met en place
  le daemon du serveur (numéro de port, utilisateur, etc). Le srm.conf
  donne l'arborescence pour les documents principaux, les actions
  spéciales, etc. Le access.conf donne les cas basiques pour l'accès.
  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 documentés (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 réellement 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 déjà dans le fichier. La majorité
  des gens ne devrait pas éditer ce fichier.  Au cours du temps, plus de
  types mime seront ajoutés 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. Vérifiez que
  vous envoyez le signal au process parent et non aux process enfants.
  Le parent a généralement le chiffre id le plus faible. L'id du process
  du parent est également dans le fichier httpd.pid du répertoire 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 problèmes spécifiques, des choix
  à faire, et des options spéciales.

  Je recommande chaudement que tous les utilisateurs lisent les trucs
  sur la sécurité dans la documentation Apache. Elle est également
  disponible sur le site web d'Apache à
  <http://www.apache.org/docs/mics/security_tips.html>.


  77..44..  HHéébbeerrggeerr ddeess sseerrvveeuurrss wweebb vviirrttuueellss

  L'hébergement virtuel existe lorsqu'un seul ordinateur dispose de plus
  d'un nom de domaine. L'ancienne méthode était d'avoir une adresse IP
  pour chaque site virtuel. La nouvelle méthode 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 hébergement
  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 complète de
  l'hébergement virtuel. Alors que les deux méthodes peuvent vous donner
  des possibilités de courrier virtuel (est ce que quelqu'un peut
  confirmer?), seul l'hébergement 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
  considérer l'hébergement virtuel par IP liée.  Ce devrait être moins
  cher que l'hébergement basé IP et vous sauverez de précieuses
  addresses IP.

  Vous pouvez également mélanger les hébergements virtuels par IP fixes
  et par IP partagées sur le même serveur. Pour plus d'information sur
  l'hébergement virtuel voyez Apacheweek sur
  <http://www.apacheweek.com/features/vhost>.


  77..44..11..  HHéébbeerrggeemmeenntt vviirrttuueell bbaasséé IIPP

  Pour cette méthode chaque site virtuel dispose de sa propre adresse
  IP. En déterminant l'adresse IP à laquelle la requête était envoyée,
  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 réels.

  La configuration se fait en deux parties. La première consiste à
  obtenir de Linux l'acceptation de plus d'une adresse IP. La seconde
  est de configurer apache pour servir les sites virtuels.

  La première étape dans la configuration pour l'acceptation par Linux
  de multiples adresses IP est de créer un nouveau noyau. Ceci
  fonctionne mieux avec la série des noyaux 2.0 (ou supérieure). 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 française 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 contrôle. Lancez X-Window en tant que super-utilisateur,
  vous devriez voir un panneau de contrôle. Double-cliquez sur "network
  configuration" (configuration réseau). Allez ensuite sur le panneau
  des interfaces et choisissez votre carte réseau. 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 réalité vous devriez les mettre avec
  toutes celles concernant le réseau). Vous devrez avoir une commande
  ifconfig et route pour chaque périphérique. Les adresses en alias sont
  divisées sous le périphérique 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 française à
  <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 possédez pas déjà 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.

  Dernièrement vous devrez configurer Apache de manière à desservir
  correctement le domaine virtuel. Ceci se fait dans le fichier de
  configuration httpd.conf près de la fin. Ils vous donnent un exemple
  sur la façon de procéder. Toutes les commandes spécifiques au site
  virtuel sont placés entre les marqueurs virtualhost. Vous pouvez
  mettre à peu près n'importe quelle commande ici.  Généralement vous
  devrez placer différents répertoires pour le serveur, le répertoire
  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 séparés si
  une directive est nécessaire 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 différents. Chaque serveur répondra seulement à une
  seule adresse IP, spécifiée par la directive bindaddress. C'est un
  gain incroyable de ressources système.


  77..44..22..  HHéébbeerrggeemmeenntt vviirrttuueell ppaarr IIPP ppaarrttaaggééee

  C'est une nouvelle méthode pour l'hébergement virtuel. Elle utilise
  une adresse IP simple, tout en conservant les adresses IP pour les
  vrais machines (et pas les virtuelles). Dans le même 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
  désire lorsqu'il envoie la demande. Le problème est que les
  navigateurs qui ne supportent pas HTTP 1.1 obtiendront la page
  principale des serveurs, qui peut être configurée pour donner la liste
  des sites virtuels disponibles. Ceci ruine la totale illusion de
  l'hébergement virtuel. L'illusion que vous avez votre propre serveur.
  La configuration est bien plus simple que pour l'hébergement 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 même adresse IP que le domaine original. Ensuite Apache
  se configure comme précédemment. Puisque vous utilisez la même adresse
  IP dans les marqueurs virtualhost, Apache sait que vous désirez
  l'hébergement virtuel par IP partagée.

  Il y a différentes choses à faire pour les anciens navigateurs. Je
  vais vous expliquer la meilleure. Tout d'abord vous devrez créer vos
  pages principales pour un serveur virtuel (soit basé IP, soit par IP
  partagée). Ceci libère la page principale pour un lien listant tous
  vos sites virtuels. Ensuite vous devrez créer une sortie cachée pour
  les anciens navigateurs. On le réalise 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 accéder au site par
  www.monsite.com/monsite/. Ensuite mettez dans la page par défaut du
  serveur principal un message qui les incitera poliment à obtenir un
  nouveau navigateur, et listera les liens sur toutes les sorties
  cachées des sites qye vous hébergez sur cette machine. Lorsqu'un
  ancien navigateur accèdera au site ils seront renvoyés à 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 demandées à
  partir de deux URL différentes (www.monsite.com et
  www.monsite.com/monsite/).

  J'espère que je ne vous ai pas perdu ici, mais ce n'est pas d'une
  compréhension simple. Après tout, vous devriez peut-être considérer
  l'hébergement basé IP. Une explication très 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'hébergement par
  IP partagée, j'aimerais le connaître. Il serait agréable de connaître
  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.


  77..55..  SSccrriippttss CCGGII

  Il existe deux méthodes différentes pour donner à vos utilisateurs la
  possibilité d'utiliser des scripts CGI. La première est de déclarer
  tout fichier se terminant par .cgi comme script CGI. La seconde est de
  créer des répertoires de scripts (généralement nommés cgi-bin). Vous
  pouvez également utiliser les deux méthodes. Quelque soit la méthode
  utilisée vos scripts doivent être exécutable par n'importe qui (chmod
  711). En donnant à vos utilisateurs l'accès aux scripts vous créez un
  gros risque de sécurité. Faîtes proprement votre travail afin de
  minimiser les risques concernant la sécurité.

  Je préfère la première méthode, spécialement pour les scripts
  complexes.  Ceci vous autorisera à mettre les scripts dans n'importe
  quel répertoire.  J'aime mettre mes scripts au même endroit que les
  pages web qui s'en servent. Pour les sites avec beaucoup de script,
  ceci est beaucoup mieux que d'avoir un répertoire plein de scripts. La
  configuration est simple. Tout d'abord supprimez le commentaire du
  marqueur .cgi à la fin du fichier srm.conf. Ensuite vérifiez que tous
  vos répertoires ont les marqueurs option ExecCGI ou All dans le
  fichier access.conf.

  Créer un répertoire de scripts est considéré comme plus sûr.  Pour
  créer un répertoire de scripts vous utilisez la directive ScriptAlias
  dans le fichier srm.conf. Le premier argument est l'Alias, et le
  second le répertoire réel. Par exemple ScriptAlias /cgi-bin/
  /usr/httpd/cgi-bin/ rend le répertoire /usr/httpd/cgi-bin capable
  d'exécuter les scripts. Ce répertoire sera utilisé même si quelqu'un
  demande le répertoire /cgi-bin/. Pour des raisons de sécurité vous
  devez également changer les propriétés du répertoire pour Options
  none, AllowOveride none dans le fichier access.conf (supprimer
  simplement les commentaires de l'exemple donné). Egalement ne placez
  pas vos répertoires de scripts en tant que sous répertoire de vos
  répertoires de pages web. Par exemple si vous servez les pages à
  partir de /home/httpd/html/, ne créez pas le répertoire de scripts en
  tant que /home/httpd/html/cgi-bin; au lieu de ça mettez le dans
  /home/httpd/cgi-bin.

  Si vous désirez que vos utilisateurs disposent de leurs propres
  répertoires 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
  connaît un moyen simple pour autoriser les utilisateurs à avoir leur
  propre répertoire cgi-bin sans utiliser des commandes individuelles
  ScriptAlias ?


  77..66..  RRééppeerrttooiirreess WWeebb ddeess UUttiilliissaatteeuurrss

  Il y a deux différentes méthodes pour s'occuper des répertoires web
  des utilisateurs. La première est d'avoir un sous-répertoire dans les
  répertoires des utilisateurs (généralement public_html).  La seconde
  est d'avoir une aborescence entièrement différente pour les
  répertoires web.  Pour ces deux méthodes vérifiez les options d'accès
  aux répertoires dans le fichier access.conf.

  La première méthode est configurée par défaut dans apache. Lorsqu'une
  demande pour /~bob/ arrive, Apache regarde dans le répertoire
  public_html du répertoire principal de bob. Vous pouvez changer le
  répertoire avec la directive UserDir dans le fichier srm.conf. Ce
  répertoire doit lisible et exécutable par tout le monde.  Cette
  méthode crée un risque pour la sécurité car Apache le répertoire
  principal eds utilisateurs doit être exécutable par toute personne
  afin qu'Apache puisse y accéder.

  La seconde méthode est facile à configurer. Vous devez juste changer
  la directive UserDir dans le fichier srm.conf. Il y a beaucoup de
  formats différents; vous pouvez voir la documentation d'Apache pour
  clarification. Si vous que chaque utilisateur dispose de son propre
  répertoire 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-répertoire dans le
  répertoire de bob vous pouvez utiliser UserDir /home/httpd/*/html.
  Ceci traduira en /home/httpd/bob/html/ et vous autorisera également à
  avoir un répertoire de script (par exemple /home/httpd/bob/cgi-bin/).


  77..77..  MMooddee ddéémmoonn ccoonnttrree mmooddee IInneettdd

  Il y a deux méthodes par lesquelles apache peut tourner. L'une est un
  démon qui tourne tout le temps (Apache appelle ceci standalone). La
  seconde est celle du super-serveur inetd.

  Le mode démon est de loin supérieur au mode inetd. Apache est
  configuré pour le mode démon par défaut. La seule raison d'utiliser le
  mode d'inetd est pour les applications très peu utilisées, comme les
  tests de scripts en interne, l'Intranet d'une petite compagnie, etc.
  Le mode inetd économisera de la mémoire car apache ne sera chargé que
  lorsqu'il sera demandé. Seul le démon inetd restera en mémoire.

  Si vous n'utilisez pas très souvent apache vous pouvez juste vouloir
  le conserver en mode démon et le lancer lorsque vous en avez besoin.
  Ensuite vous pouvez le supprimer lorsque vous avez terminé (soyez sûr
  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 déjà présent. S'il n'y
  est pas alors ajoutez ceci:


       http    80/tcp




  Le placer juste après 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 démon inetd en a besoin. Si vous
  n'utilisez généralement pas le démon 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 généralement lancées par ce démon).

  Si le démon inetd est déjà 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).


  77..88..  AAuuttoorriisseerr lleess ccoommmmaannddeess ppuutt eett ddeelleettee

  Les nouveaux outils de publication web supportent cette nouvelles
  méthodes d'envoi des pages web par http (à la place de FTP). Certains
  de ces produits ne supportent même plus le FTP! Apache le supporte,
  mais il manque d'un script pour se charger des requêtes. Le script
  peut être un gros trou de sécurité, soyez certain de ce que vous
  faîtes avant de tenter d'en écrire ou d'en installer un.

  Si quelqu'un connaît un script qui fonctionne faîtes le moi savoir et
  j'incluerai l'adresse ici.

  Pour plus d'informations voyez l'article d'Apacheweek à
  <http://www.apacheweek.com/features/put>.


  77..99..  AAuutthheennttiiffiiccaattiioonn ddee ll''UUttiilliissaatteeuurr // CCoonnttrrôôllee ddeess AAccccèèss

  Il s'agit de l'une de mes options préférées. Elle vous autorise à
  protéger un répertoire ou un fichier par un mot de passe sans utiliser
  de scripts CGI. Il vous autorise également à interdire ou à autoriser
  l'accès sur la base de l'adresse IP ou du nom de domainde du client.
  C'est une spécificité très intéressante pour laisser les crétins 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 répertoire doit
  avoir AllowOverrides AuthConfig dans le fichier access.conf. Pour
  autoriser le contrôle d'accès (par domaine ou adresse IP)
  AllowOverrides Limit doit être mis pour ce répertoire.

  La configuration du répertoire oblige le placement d'un fichier
  .htaccess dans le répertoire. Pour l'authentification de l'utilisateur
  il est également utilisé avec un .htpasswd et optionnellement un
  fichier .htgroup. Ces fichiers peuvent être partagées pour de
  multiples fichiers .htaccess si vous le désirez.

  Pour des raisons de sécurité 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 système vous pouvez également
  l'ajouter dans votre fichier .htaccess si AllowOverride Limit est
  configuré pour votre répertoire. Cette directive interdira à quiconque
  de regarder dans vos fichiers de contrôle d'accès (.htaccess,
  .htpasswd, etc).

  Il y a de nombreux types de fichiers et d'options qui peuvent être
  utilisés avec le contrôle d'accès. Toutefois il n'est pas de la
  compétence de ce document de décrire 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>.


  77..1100..  ssuu--eexxeecc

  su-exec lance les scripts CGI en tant qu'utilisateur du propriétaire.
  Normalement ils sont lancés en tant qu'utilisateur du serveur web
  (généralement nobody). Ceci autorise les utilisateurs à accéder à
  leurs propres fichiers CGI sans les rendre autorisés en écriture (un
  trou de sécurité). Mais si vous ne faîtes pas attention vous pouvez un
  trou encore plus gros en utilisant le code su-exec. Celui-ci effectue
  des contrôles de sécurité avant d'exécuter les scripts, mais si vous
  le configurez de manière incorrecte vous aurez un trou de sécurité.

  Le code su-exec n'est pas pour les amateurs. Ne l'utilisez pas si vous
  ne savez pas ce que vous faîtes. Vous pouvez terminer par un gros
  problème de sécurité où vos utilisateurs peuvent obtenir des accès
  super-utilisateurs pour votre système. 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 répertoire support des sources. Tout
  d'abord vous devez éditer le fichier suexec.h pour votre système.
  Ensuite vous devez compiler le code su-exec avec cette commande:


       gcc suexec.c -o suexec

  Copiez ensuite l'exécutable suexec dans le répertoire approprié.
  Apache le place par défaut 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 répertoire,
  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 changées (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 exécutable par tous comme
  d'habitude.  Ils seront automatiquement lancés par le possesseur du
  script CGI. Si vous changez les permissions les scripts CGI ne
  fonctionneront pas. Si le répertoire ou le fichier est en écriture par
  tous ou par un groupe le script ne fonctionnera pas. Les scripts
  possédés par les utilisateurs système ne doivent pas être lancés
  (root, bin, etc.). Pour les autres conditions de sécurité qui doivent
  être remplies voyez la documentation de su-exec. Si vous avez des
  problèmes 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 démon. 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>.


  77..1111..  IImmaaggeemmaappss

  Apache peut gérer des cartes d'images du côté du serveur. Ce que l'on
  appelle "Imagemaps" sont les images des pages web qui envoient les
  utilisateurs à divers emplacements, dépendant de l'endroit où ils
  cliquent.  Pour utiliser les imagemaps vérifiez que le module imagemap
  est installé (c'est un des modules par défaut). 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 délimitent différentes
  aires sur l'image renvoyant vers des liens séparés. 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 générer des fichiers d'aires
  compatibles NCSA ou vous pouvez les créer vous-même. Pour une
  discussion plus détaillée sur les imagemaps et les fichiers d'aires
  voyez l'article d'Apacheweek à
  <http://www.apacheweek.com/features/imagemaps>.




  77..1122..  SSSSII//XXSSSSII

  Les Server Side Includes (SSI) ajoutent un contenu dynamique à des
  pages web qui sinon seraient statiques. Les en-têtes sont ajoutés dans
  les pages web en tant que commentaires. Le serveur web les exécute
  ensuite et passe les résultats au serveur web. SSI peut ajouter des
  en-têtes et des notes de pieds aux documents, ajouter la date à
  laquelle le document a été modifié pour la dernière fois, exécuter une
  commande système 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 contrôle 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 système. Cependant vous devez
  distinguer les fichiers HTML normaux de ceux qui contiennent les
  commandes SSI. Ceci se fait généralement en changeant l'extension des
  fichiers HTML utilisant SSI.  Généralement on utilise l'extension
  .shtml.

  Pour faire fonctionner SSI/XSSI vérifiez tout d'abord que le module
  des en-têtes 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 répertoires où vous désirez lancer des fichiers SSI/XSSI. Ceci se
  fait dans le fichier access.conf. Maintenant tous les fichiers avec
  l'extension .shtml seront analysés pour les commandes SSI/XSSI.

  Un autre moyen de faire fonctionner les en-têtes est d'utiliser la
  directive XBitHack. Si vous la mettez en marche il regardera si le
  fichier est exécutable par l'utilisateur. Si il l'est et que Options
  Includes est autorisé pour le répertoire, 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
  méthode préférée.

  Il y a un risque pour la sécurité en autorisant SSI à exécuter des
  commandes systèmes 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 détaillée de l'implémentation 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>.


  77..1133..  SSyyssttèèmmee mmoodduullaaiirree

  Apache peut être étendu pour supporter quasiment tout avec les
  modules.  Il y a beaucoup de modules qui existent déjà. Seul les
  modules d'intérêt général 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/>


  88..  AAjjoouuttss aauu sseerrvveeuurr wweebb

  Désolé, cette section n'a pas encore été écrite.

  A venir bientôt: mSQL, PHP/FI, cgiwrap, Fast-cgi, MS frontpage
  extentions, et beaucoup d'autres.


  99..  FFAAQQ ((FFooiirree AAuuxx QQuueessttiioonnss))

  Il n'y a pas de question fréquemment posées - pour l'instant...


  1100..  DDooccuummeennttss pplluuss aavvaannccééss



  1100..11..  LLiivvrreess ddee cchheezz OO''RReeiillllyy && AAssssoocciiaatteess

  A mon avis O'Reilly & Associates éditent les meilleures références
  techniques de la planète. 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 arrêter même 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 révisés tout les six mois environ. Visitez donc le site web
  d'O'Reilly & Associates <http://www.ora.com/> ou arrêtez 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.


  1100..22..  IInntteerrnneett RReeqquueesstt FFoorr CCoommmmeennttss ((RRFFCC))


  ·  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.

  11..  AA pprrooppooss ddee ccee DDooccuummeenntt

  11..11..  LLeecctteeuurrss ccoonncceerrnneess

  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.

  11..22..  CCoonnvveennttiioonnss ttyyppooggrraapphhiiqquueess

  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;
  ______________________________________________________________________

  22..  IInnttrroodduuccttiioonn

  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 :

     LLiinnuuxx
        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.

     HHTTMMLL
        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.

     NNaavviiggaatteeuurrss
        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.

     SSeerrvveeuurrss HHTTTTPP
        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.

     SSQQLL
        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.

     CCGGII
        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.

     PPeerrll
        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.

  33..  PPrroocceedduurree dd''iinnssttaallllaattiioonn

  33..11..  MMaatteerriieell rreeqquuiiss

  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.

  33..22..  LLooggiicciieell

  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.

  33..33..  IInnssttaallllaattiioonn ddee ll''OOSS

  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.

  33..44..  LLee sseerrvveeuurr HHTTTTPP

  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.

  33..55..  LLeess nnaavviiggaatteeuurrss

  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.

  33..55..11..  CCoonnffiigguurraattiioonn ddee LLyynnxx

  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.

  33..55..22..  CCoonnffiigguurraattiioonn dd''AArreennaa

  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.

  33..55..33..  IInnssttaallllaattiioonn eett CCoonnffiigguurraattiioonn ddee NNeettssccaappee

  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.

  33..66..  LLeess nnaavviiggaatteeuurrss aavveecc AAppaacchhee

  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.

  33..77..  LLaa BBaassee ddee ddoonnnneeeess eett ssoonn iinnssttaallllaattiioonn

  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.

  33..77..11..  IInnssttaallllaattiioonn ddee mmssqqll--11..00..1166

  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.

  33..77..22..  TTeesstt ddee  mmssqqll--11

  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.

  33..77..33..  IInnssttaallllaattiioonn ddee mmssqqll--22..00..11

  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/* .

  33..77..44..  TTeesstt ddee mmssqqll--22

  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.

  33..88..  LLeess ddiiffffeerreenntteess IInntteerrffaacceess :: DDBBII//mmSSQQLL,, MMssqqllPPeerrll,, eett LLiittee

  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.

  33..88..11..  DDBBII eett DDBBDD--mmSSQQLL

  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.

  33..88..22..  MMssqqllPPeerrll

  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.

  33..88..33..  LLee llaannggaaggee ddee ccoommmmaannddee pprroopprree ddee mmssqqll :: LLiittee

  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.

  33..99..  LLaa ssoolluuttiioonn ssttaannddaarrdd :: DDBBII eett DDBBDD--mmssqqll

  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.

  33..99..11..  IInnssttaallllaattiioonn ddee ll''iinntteerrffaaccee ppeerrll ddee bbaassee ddee ddoonnnneeeess DDBBII

  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.

  33..99..22..  LLee ppiilloottee mmssqqll ddee ppeerrll :: DDBBDD--mmSSQQLL

  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.

  33..1100..  LL''iinntteerrffaaccee MMssqqllPPeerrll

  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

  33..1111..  BBiibblliiootthheeqquuee CCGGII ddee ppeerrll

  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.

  33..1122..  CChheecckk--lliisstt ddee ll''iinnssttaallllaattiioonn

  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.

  44..  UUnn eexxeemmppllee ddee BBaassee ddee DDoonnnneeeess

  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.

  44..11..  AAddaappttaattiioonn ddee ll''eexxeemmppllee ddee ssccrriipptt ppoouurr MMssqqllPPeerrll

  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.

  44..22..  AAddaappttaattiioonn ddee ll''eexxeemmppllee ppoouurr mmssqqll--22

  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.

  55..  CCoonncclluussiioonn

  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.

  11..  IInnttrroodduuccttiioonn

  11..11..  XX--WWiinnddooww

  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.

  11..22..  AAuuttrreess ssoouurrcceess dd''iinnffoorrmmaattiioonn

  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.

  11..33..  NNoouuvveelllleess vveerrssiioonnss dduu pprreesseenntt ddooccuummeenntt

  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>.

  11..44..  CCoommmmeennttaaiirreess eett ccrriittiiqquueess

  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.

  22..  MMaatteerriieellss ccoommppaattiibblleess

  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).

  33..  IInnssttaallllaattiioonn ddee XXFFrreeee8866

  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 :

     XX333388551144..ttggzz
        Serveur pour carte basee sur 8514.

     XX3333AAGGXX..ttggzz
        Serveur pour carte basee sur AGX.

     XX3333II112288..ttggzz
        Serveur pour carte basee sur Number Nine Imagine 128.

     XX3333MMaacchh3322..ttggzz
        Serveur pour carte basee sur Mach-32 .

     XX3333MMaacchh6644..ttggzz
        Serveur pour carte basee sur Mach-64.

     XX3333MMaacchh88..ttggzz
        Serveur pour carte basee sur Mach-8.

     XX3333MMoonnoo..ttggzz
        Serveur pour modes monochromes.

     XX3333PP99KK..ttggzz
        Serveur pour carte basee sur P9000.
     XX3333SS33..ttggzz
        Serveur pour carte basee sur S3.

     XX3333SS33VV..ttggzz
        Serveur  pour  carte  basee  sur S3 ViRGE et ViRGE/VX (considere
        comme beta).

     XX3333SSVVGGAA..ttggzz
        Serveur pour carte SVGA.

     XX3333WW3322..ttggzz
        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 :

     pprreeiinnsstt..sshh
        Script de pre-installation.

     ppoossttiinnsstt..sshh
        Script de post-installation.

     XX3333bbiinn..ttggzz
        Le reste des binaires.

     XX3333ccffgg..ttggzz
        Fichiers de configuration de xdm, xinit and fs.

     XX3333ddoocc..ttggzz
        Documentations.

     XX3333mmaann..ttggzz
        Manuels.

     XX3333ffnnttss..ttggzz
        Les fontes de base 75dpi, misc et PEX.

     XX3333lliibb..ttggzz
        Les librairies partagees et les utilitaires qui vont avec.

     XX3333sseett..ttggzz
        L'utilitaire XF86Setup

     XX3333VVGG1166..ttggzz
        Serveur pour les cartes VGA/EGA

  Les fichiers suivants sont optionnels :

     XX3333ff110000..ttggzz
        Les fontes en 100 dpi.

     XX3333ffccyyrr..ttggzz
        Les fontes cyrilliques

     XX3333ffnnoonn..ttggzz
        Autres fontes (Chinois, Japonais, Coreen, Hebreu)

     XX3333ffssccll..ttggzz
        Les fontes redimensionnables (Speedo, Type1).

     XX3333ffssrrvv..ttggzz
        Serveur de fontes et fichiers de configuration.
     XX3333pprroogg..ttggzz
        Les  fichiers  d'en-tete,  les  fichiers  de  configuration   et
        certaines librairies.

     XX3333llkkiitt..ttggzz
        Le serveur X LinkKit.

     XX3333llkk9988..ttggzz
        Le serveur X PC98 LinkKit.

     XX3333nneesstt..ttggzz
        Le serveur X Nested.

     XX3333pprrtt..ttggzz
        Le serveur X print.

     XX3333vvffbb..ttggzz
        Le serveur X Virtual framebuffer.

     XX3333ppss..ttggzz
        La version PostScript de la documentation.

     XX3333hhttmmll..ttggzz
        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.

  44..  CCoonnffiigguurraattiioonn ddee XXFFrreeee8866

  44..11..  CCoonnffiigguurraattiioonn nnoorrmmaallee

  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.

  44..22..  CCaa nnee mmaarrcchhee ttoouujjoouurrss ppaass !!

  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.

  44..33..  AAmmeelliioorraattiioonn ddee llaa ccoonnffiigguurraattiioonn

  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>.

  44..44..  UUttiilliisseerr 6655553366 ccoouulleeuurrss ((eenn 1166 bbiittss ddoonncc))

  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.

  55..  LLaanncceemmeenntt ddee XXFFrreeee8866

  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.

  66..  NNoottiiccee lleeggaallee

  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.

  77..  RReemmeerrcciieemmeennttss

  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 française de Philippe Andersson reprise par Guil­
  laume Allègre <mailto:Guillaume.Allegre@imag.fr>
  Version 4.4, 13 mars 2000

  Comment définir une ligne de mode pour votre couple carte
  graphique/moniteur sous XFree86.  La distribution XFree86 comprend
  maintenant les éléments 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 personnalisée pour un moniteur
  à haute performance ou du matériel très inhabituel.  Il vous aidera
  aussi à utiliser kvideogen pour générer les modelines, et xvidtune
  pour effectuer le réglage fin d'un mode standard qui n'est pas encore
  optimal pour votre moniteur.
  ______________________________________________________________________

  Table des matières
















































  1. Mise en garde

  2. Introduction

  3. Outils de calcul automatique

  4. Comment fonctionnent les écrans vidéo

  5. Principes fondamentaux relatifs à votre écran et votre carte graphique

     5.1 Les fréquences de synchronisation du moniteur
     5.2 La bande passante vidéo du moniteur
     5.3 La fréquence pilote (
     5.4 Que contrôlent ces données de base

  6. Comprendre les spécifications de base

     6.1 A propos de la bande passante
     6.2 Fréquences de synchronisation et fréquence de rafraîchissement

  7. Concessions lors de la configuration du système

  8. Exigences en terme de mémoire

  9. Calcul de la taille de trame

  10. Magie noire et impulsions de synchronisation

     10.1 Synchronisation horizontale
     10.2 Synchronisation verticale

  11. Synthèse

  12. Usage du moniteur en surcapacité

  13. Utilisation des modes entrelacés

  14. Questions et réponses

  15. Résoudre les problèmes affectant l'image

     15.1 L'image est décentrée vers la gauche ou la droite
     15.2 L'image est décentrée 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. Représentation graphique des capacités du moniteur

  17. Crédits



  ______________________________________________________________________

  11..  MMiissee eenn ggaarrddee


  L'utilisation des informations reprises ci-dessous se fait
  EXCLUSIVEMENT A VOS RISQUES ET PERILS.  Piloter votre moniteur en
  dehors des limites fixées par les spécifications du fabricant peut
  présenter un danger pour votre matériel et pour vous-mêmes.  Lisez la
  section ``Usage du moniteur en surcapacité'' pour un avertissement
  détaillé. Tout dommage infligé à votre personne ou à votre moniteur dû
  à un usage en surcapacité est votre problème.

  La plus récente version de ce HOWTO est disponible à la page du Linux
  Documentation Project <http://metalab.unc.edu/LDP>.

  Prière de transmettre vos commentaires, critiques, et suggestions (en
  anglais) à esr@snark.thyrsus.com <mailto:esr@thyrsus.com>, ou en
  français au traducteur. S'il vous plaît, _n_'_e_n_v_o_y_e_z _p_a_s de courrier
  électronique implorant une solution miracle à vos problèmes 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.


  22..  IInnttrroodduuccttiioonn


  Le serveur XFree86 permet aux utilisateurs de configurer leur sous-
  système vidéo, ce qui favorise une utilisation optimale du matériel
  existant.  Le but de ce guide est de vous apprendre à créer vos propre
  valeurs d'horloge pour faire le meilleur usage de votre carte vidéo et
  moniteur.

  Nous présenterons une méthode pour obtenir une configuration de base
  utilisable, ensuite nous vous montrerons comment, au départ de celle-
  ci, vous pouvez vous livrer à des expériences pour déterminer un
  ensemble de valeurs qui l'adapte à vos préférences.

  Si vous disposez déjà d'un mode qui fonctionne presque (en
  particulier, si l'un des modes VESA pré-définis vous donne une image
  stable mais décentrée vers la gauche ou la droite, trop petite, ou
  trop grande) vous pouvez passer immédiatement à la section intitulée
  ``Résoudre les problèmes affectant l'image''.  Celle-ci vous apprendra
  diverses manières de manipuler les valeurs d'horloge en vue d'obtenir
  certains résultats précis.

  Ne partez pas du principe que vous allez avoir de fastidieux
  ajustements de modes à faire, juste parce qu'à votre premier lancement
  de X après installation, vous obtenez un écran brouillé. Il se peut
  que presque toutes les lignes de modes soient bonnes, mais que le
  serveur utilise par défaut justement celle qui ne convient pas à votre
  matériel.  Au lieu de désespérer, essayez de basculer de mode en mode
  avec CTRL-ALT-KP+.  Si certains donnent de bons résultats, essayez de
  les commenter tous sauf un 640x480, et vérifiez que ce mode
  fonctionne. Si c'est le cas, décommentez aussi une paire d'autres
  modes, par exemple un 800x600 et un 1024x768 à une fréquence que votre
  moniteur devrait aussi gérer.

  Bientôt la configuration sera très facile. De nombreux modules pilotes
  de la toute récente version 4.0 d'XFree86 supportent le système DDC
  VESA (pour _D_i_s_p_l_a_y _D_a_t_a _C_h_a_n_n_e_l : canal de données d'affichage).  Ce
  système permet à l'écran de déclarer à XFree86 les lignes de mode
  qu'il est capable de supporter. Ainsi, avec XFree 4.0 et un moniteur
  récent, vous avez de bonnes chances de n'avoir aucune configuration à
  faire.


  33..  OOuuttiillss ddee ccaallccuull aauuttoommaattiiqquuee

  Si vous avez un moniteur relativement récent (1996 au moins) qui
  supporte les spécifications PnP, vous avez une chance de lire les
  caractéristiques 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
  XXFF8866SSeettuupp(1) qui simplifie grandement la création interactive d'un
  mode graphique valable, sans devoir manipuler directement les valeurs
  d'horloge vidéo.  Ainsi, dans la plupart des cas, il ne devrait pas
  vous être nécessaire de calculer un mode graphique de base.
  Malheureusement, XXFF8866SSeettuupp(1) a ses limites ; il ne connaît que les
  modes graphiques standards jusqu'à 1280x1024.  Si vous disposez d'un
  moniteur à très haute performance capable d'afficher 1600x1200 ou
  plus, il vous faudra malgré tout encore calculer votre mode graphique
  de base vous-mêmes.

  Il y a un utilitaire KDE appelé KVideoGen
  <http://without.netpedia.net/kvideogen/> qui calcule des lignes de
  mode à partir des caractéristiques du moniteur et de la carte. J'ai
  bien généré des lignes de modes avec, mais je ne les ai pas testées.
  Notez que ses paramètres "refresh rate" horizontal et vertical sont la
  même chose que les fréquences de synchronisation HSF et VSF que nous
  décrivons 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 défaut.

  Les versions récentes de XFree86 comprennent un outil appelé
  xxvviiddttuunnee(1) que vous trouverez sans doute très utile pour tester et
  affiner les modes graphiques.  Il commence par un avertissement
  effrayant relatif aux possibles conséquences d'un usage abusif.  Si
  vous accordez à ce document une attention scrupuleuse et apprenez ce
  qui se cache derrière les jolies valeurs dans les écrans de xvidtune,
  vous serez capables d'utiliser ce programme efficacement et en toute
  confiance.

  Si xxvviiddttuunnee(1) est présent, il vous sera possible d'essayer de
  nouveaux modes "au vol", sans modifier votre fichier de configuration
  X, sans même redémarrer votre serveur X.  Dans le cas contraire,
  XFree86 vous permet d'utiliser des raccourcis clavier pour
  sélectionner parmi les différents modes définis dans Xconfig (voyez
  XFree86.man pour de plus amples détails).  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
  défaut, de façon à 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 générer des lignes de
  mode, mais ça peut vous aider à comprendre les relations qui
  permettent de les définir.


  44..  CCoommmmeenntt ffoonnccttiioonnnneenntt lleess ééccrraannss vviiddééoo

  Savoir comment fonctionne l'écran est essentiel pour comprendre
  quelles valeurs placer dans les différents champs du fichier Xconfig.
  Le serveur XFree86 utilise ces valeurs pour obtenir le contrôle de
  plus bas niveau sur l'écran.

  L'écran crée une image à partir de ce qu'on peut considérer comme une
  série de points.  Ces points sont juxtaposés de gauche à droite pour
  créer des lignes.  Ces lignes sont à leur tour juxtaposées de haut en
  bas pour créer l'image.  Les points émettent de la lumière lorsqu'ils
  sont frappés par les faisceaux d'électrons à l'intérieur du tube
  cathodique, un par couleur.  Pour faire en sorte que le faisceau
  frappe tous les points pendant une durée égale, le faisceau balaye
  l'écran suivant un itinéraire immuable, appelée _t_r_a_m_e.

  Nous avons écrit "ce qu'on peut considérer comme une série 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 sévère effet de moiré. Les points de la
  trame correspondent réellement à l'échantillonnage du signal
  analogique du pilote vidéo, et sont affichés sous la forme d'une
  grille de points simplement parce que les pics et les vallées du
  signal sont espacés suffisamment régulièrement et finement.

  Le tracé de cet itinéraire commence dans le coin supérieur gauche,
  traverse l'écran vers la droite en une ligne horizontale, et s'arrête
  momentanément au bord droit.  Le faisceau est alors envoyé du côté
  gauche de l'écran, mais une ligne plus bas.  Cette nouvelle ligne est
  parcourue de gauche à droite juste comme la première.  Ce schéma est
  répété jusqu'à ce que la dernière ligne de l'écran ait été parcourue.
  A ce moment, le faisceau est renvoyé du coin inférieur droit au coin
  supérieur gauche, et la manoeuvre recommence.

  Il existe une variante de ce schéma, 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 première demi-trame et les autres sont traitées lors d'un
  deuxième parcours de demi-trame.

  Le départ du faisceau dans le coin supérieur gauche de l'écran est
  appelé le début de trame.  La trame se termine lorsque le faisceau
  retrouve sa position de départ venant du coin inférieur 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 illuminés.
  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
  contrôler le faisceau à cet endroit.  De façon à réduire cette
  distorsion, les points en dehors de la zone affichable ne sont pas
  illuminés par le faisceau, même si celui-ci peut être dirigé dans leur
  direction.  Ceci explique que la taille de la zone affichable soit
  inférieure à 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 latérales de la zone affichable est utilisé pour renvoyer
  le faisceau du côté droit au côté gauche en le faisant passer à la
  ligne suivante.  De la même façon, le temps pendant lequel le faisceau
  aurait pu illuminer les marges inférieure et supérieure de la zone
  affichable est utilisé pour déplacer le faisceau du coin inférieur
  droit de l'écran au coin supérieur gauche.

  Le rôle de la carte graphique est de générer les signaux qui
  commanderont à l'écran d'allumer ou d'éteindre le faisceau d'électrons
  pour chaque point, créant ainsi l'image.  La carte contrôle aussi le
  moment où l'écran déplace le faisceau du côté droit au début 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 supérieur gauche.  Un signal de synchronisation verticale
  est émis à la fin de chaque trame.

  De courts temps de pause sont nécessaires immédiatement avant et après
  l'émission des signaux de synchronisation horizontale et verticale de
  façon à 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 ultérieure, nous reviendrons sur ces bases avec des
  définitions, des formules et des exemples pour vous aider à les
  utiliser.


  55..  ggrraapphhiiqquuee PPrriinncciippeess ffoonnddaammeennttaauuxx rreellaattiiffss àà vvoottrree ééccrraann eett vvoottrree
  ccaarrttee


  Il y a quelques principes fondamentaux qu'il vous faut comprendre
  avant de bricoler une entrée dans le fichier XF86config.  Ceux-ci
  sont :


  ·  les options relatives aux fréquences de synchronisation horizontale
     et verticale de votre moniteur

  ·  la bande passante de votre moniteur

  ·  les fréquences d'horloge pilotes de votre carte graphique, ou _d_o_t
     _c_l_o_c_k_s



  55..11..  LLeess ffrrééqquueenncceess ddee ssyynncchhrroonniissaattiioonn dduu mmoonniitteeuurr

  La fréquence de synchronisation horizontale représente 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 fréquence de synchronisation verticale
  représente le nombre de fois par seconde que le moniteur peut déplacer
  le faisceau verticalement.

  Les fréquences de synchronisation seront généralement fournies à la
  page "spécifications techniques" du manuel de votre moniteur.  La
  fréquence de synchronisation verticale est typiquement exprimée 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-fréquences (_m_u_l_t_i_s_y_n_c), ces
  fréquences seront données sous forme de plages.  Certains moniteurs,
  spécialement les modèles bas de gamme, ne supportent qu'une série de
  fréquences fixes.  Ceux-ci peuvent aussi être configurés, mais votre
  marge de manoeuvre sera sérieusement limitée par les caractéristiques
  physiques du moniteur.  Choisissez la plus haute paire de fréquences
  pour obtenir la meilleure résolution.  Et soyez prudents --- essayer
  de piloter un moniteur dont les fréquences sont fixes à une fréquence
  supérieure à celle pour laquelle il a été conçu peut aisément
  l'endommager.

  Des versions précédentes de ce guide traitaient de façon fort légère
  l'utilisation de moniteurs multi-fréquences en surcapacité, les
  poussant au-delà du maximum nominal de leur fréquence de
  synchronisation verticale dans le but d'obtenir de meilleures
  performances.  D'autres arguments ont depuis lors été portés à notre
  connaissance, incitant à la prudence en ce domaine ; nous reviendrons
  sur ce sujet dans la section ``Usage du moniteur en surcapacité'' ci-
  dessous.





  55..22..  LLaa bbaannddee ppaassssaannttee vviiddééoo dduu mmoonniitteeuurr


  La page des spécifications techniques du votre manuel de votre
  moniteur devrait mentionner sa bande passante.  Si ce n'est pas le
  cas, jetez un oeil à la résolution maximale annoncée pour le moniteur.
  En première approximation, voici une table de conversion de résolution
  en estimation de bande passante (il s'agit donc de limites supérieures
  approximatives pour la fréquence 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 fréquences pilotes les plus basses par résolution dans
  la base de données des modes standard XFree86 (exception faite de la
  dernière, que j'ai extrapolée).  La bande passante de votre moniteur
  peut en réalité être plus élevée que le minimum requis pour sa
  résolution maximale, aussi ne craignez pas d'essayer une fréquence
  pilote de quelques MHz supérieure.

  Notez aussi que la bande passante doit rarement être prise en ligne de
  compte aux fréquences pilotes inférieures à 65 MHz environ.  Avec une
  carte SVGA et la plupart des moniteurs haute résolution, vous ne
  pourrez même pas approcher la limite de la bande passante de votre
  moniteur.  En voici quelques exemples :



               Marque                          Bande passante vidéo
               ------                          --------------------
               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




  Même les moniteurs bas de gamme n'ont en général pas de contrainte
  terrible au niveau de leur bande passante aux résolutions annoncées.
  Le NEC Multisync II en est un exemple parfait --- si l'on en croit les
  spécifications du constructeur, il ne parvient même pas à afficher en
  800x600.  Il affichera au maximum en 800x560.  Pour des résolutions si
  basses, il n'est pas nécessaire de disposer de hautes fréquences
  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 annoncée du moniteur : 30 Mhz.

  A ces deux fréquences pilotes, il se peut que l'image affichée ne soit
  pas aussi nette qu'elle devrait l'être, mais certainement d'une
  qualité tolérable. Il serait plus agréable, bien sûr, que le NEC
  Multisync II dispose d'une bande passante vidéo supérieure à 36 Mhz,
  par exemple.  Mais ceci n'est pas indispensable pour des tâches 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 immédiatement si cela devait être le
  cas).


  55..33..  LLaa ffrrééqquueennccee ppiilloottee (( ddoott cclloocckk )) ddee llaa ccaarrttee ggrraapphhiiqquuee


  La page "spécifications 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 possédez pas cette information, le serveur X la trouvera
  pour vous.  Les versions récentes des serveurs X supportent tous une
  option --probeonly qui imprime cette information et termine sans
  réellement démarrer X ni changer le mode vidéo.

  Si cette option n'est pas supportée dans votre cas, ne perdez pas
  espoir.  Même 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 conservées, même s'il vous faut
  redémarrer la machine pour obtenir à nouveau l'accès à la console.

  Les résultats de cette détection du matériel ou les messages de
  démarrage 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 modèle précis du processeur (ici, un ancien masque du 86C911)

  (--) S3: chipset driver: s3_generic
  (--) S3: videoram:  1024k
                      -----
           Taille de la mémoire RAM tampon de trame embarquée

  (**) 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
                    ------------------------------------------------------
                              Fréquences pilotes autorisées 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)
  ---  ------       -----         --------------------------------------------
   |     |            |              Fréquences pilotes autorisées en MHz
   |     |            +-- Taille de la mémoire RAM tampon de trame embarquée
   |     +-- Modèle du processeur
   +-- Nom du serveur



  Note : effectuez ce test sur votre machine lorsqu'elle n'est pas
  chargée (si possible).  Dans la mesure où X est une application, ses
  boucles de temporisation peuvent être perturbées par de l'activité sur
  le disque, rendant les valeur mentionnées ci-dessus imprécises.
  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 nécessaire.  Le processus démon qui pilote votre souris
  risque très fort de vous causer des problèmes (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 façon à éviter toute imprécision lors de la détection des
  fréquences d'horloge, vous pouvez simplement copier la liste de
  fréquences et la placer dans votre fichier XF86config comme valeur de
  la propriété "Clocks" --- ceci supprime la boucle de temporisation et
  fournit à X une liste précise des valeurs d'horloge qu'il peut
  utiliser.  En utilisant les données 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 systèmes dont la charge de travail varie fortement, ceci peut
  vous aider à éviter de mystérieux échecs au démarrage de X.  Il peut
  arriver que X démarre, obtienne une mauvaise temporisation à cause de
  la charge excessive du système, et ne soit dès lors pas capable de
  trouver une fréquence correspondante dans sa base de données de
  configuration --- ou choisisse la mauvaise !


  55..44..  QQuuee ccoonnttrrôôlleenntt cceess ddoonnnnééeess ddee bbaassee


  Les plages de fréquences de synchronisation de votre moniteur, ainsi
  que la fréquence pilote de votre carte graphique, déterminent la
  résolution maximale qu'il vous sera loisible d'atteindre.  Mais c'est
  le rôle du pilote de périphérique d'exploiter le potentiel de votre
  équipement.  Du matériel de qualité supérieure sans un pilote d'une
  compétence égale est un gaspillage d'argent.  D'un autre côté, avec un
  pilote de périphérique flexible et du matériel moins puissant, vous
  pouvez gagner un peu de marge de manoeuvre par rapport aux contraintes
  physiques.  Telle est la philosophie qui présida à la conception de
  XFree86.

  Il vous faudra sélectionner une fréquence d'horloge adaptée à la bande
  passante vidéo de votre moniteur.  Vous bénéficierez ici d'une large
  marge de manoeuvre, cependant --- certains moniteurs ont une capacité
  réelle supérieure de 30% par rapport à leur bande passante nominale.
  Le risque ici est de dépasser la fréquence de synchronisation
  verticale annoncée du moniteur ; nous discuterons ceci en détail 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 qualités visuelles de votre écran
  (spécialement la précision dans les petits détails).


  66..  CCoommpprreennddrree lleess ssppéécciiffiiccaattiioonnss ddee bbaassee


  Cette section explique la signification des spécifications mentionnées
  précédemment, ainsi que certains autres éléments qu'il vous sera utile
  de connaître.  Tout d'abord, quelques définitions.  A côté de chaque
  terme défini est mentionné entre parenthèses le nom de la variable que
  nous utiliserons pour le représenter dans nos formules.


     ffrrééqquueennccee ddee ssyynncchhrroonniissaattiioonn hhoorriizzoonnttaallee ((HHSSFF -- _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).


     ffrrééqquueennccee ddee ssyynncchhrroonniissaattiioonn vveerrttiiccaallee ((VVSSFF -- _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 supérieure pour la
        fréquence de rafraîchissement.


     ffrrééqquueennccee ppiilloottee ((DDCCFF -- _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 fréquence du cristal ou VCO de votre carte graphique --- le
        nombre maximum de points par seconde qu'elle peut émettre.

     bbaannddee ppaassssaannttee vviiddééoo ((VVBB -- _v_i_d_e_o _b_a_n_d_w_i_t_h)
        La fréquence la plus élevée que vous puissiez appliquer à
        l'entrée vidéo de votre moniteur en conservant une chance
        raisonnable d'obtenir une image intelligible. Si vous vous
        représentez le signal émis par votre carte graphique comme une
        succession rapide d'états allumés/éteints, sa fréquence la plus
        basse est égale à la moitié de DCF, de sorte qu'en théorie, la
        bande passante n'a de sens qu'à partir de DCF/2.  Pour obtenir à
        l'écran un affichage suffisamment net des petits détails,
        cependant, vous ne souhaiterez pas qu'elle soit de loin
        inférieure à votre DCF maximale ; il vaudrait même mieux qu'elle
        lui soit supérieure.


     lloonngguueeuurr ddee ttrraammee ((HHFFLL,, VVFFLL))
        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 inférieure et supérieure inactives.


     ffrrééqquueennccee ddee rraaffrraaîîcchhiisssseemmeenntt ddee ll''ééccrraann ((RRRR -- _r_e_f_r_e_s_h _r_a_t_e)
        Le nombre de fois par seconde que votre image est redessinée
        (ceci est aussi appelé la "fréquence de trame" - _f_r_a_m_e _r_a_t_e).
        Plus cette fréquence est élevée, 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 dénominateur n'est _p_a_s égal à la résolution
     visible du moniteur, mais typiquement légèrement plus grand.  Nous
     entrerons dans les détails de ceci plus loin.

     Les fréquences pour lesquelles sont généralement mentionnés les
     modes dits entrelacés (comme "87Hz Interlaced") sont en fait des
     fréquences de demi-trame : un écran de ce type semble avoir une
     fréquence de rafraîchissement supérieure aux autres modèles de sa
     catégorie, mais chaque ligne individuelle n'est rafraîchie qu'une
     fois sur deux.

     Dans le cadre de nos calculs, nous prendrons en compte la fréquence
     de rafraîchissement d'un moniteur entrelacé par trame complète,
     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é à
     fréquence de rafraîchissement par trame complète égale, mais
     définitivement plus médiocre que le mode non-entrelacé
     correspondant à la fréquence de rafraîchissement par demi-trame.


  66..11..  AA pprrooppooss ddee llaa bbaannddee ppaassssaannttee


  Les fabricants de moniteurs aiment vanter la large bande passante
  offerte par leur matériel car elle détermine la netteté des
  transitions d'intensité et de couleur à l'écran.  Une large bande
  passante signifie que de plus petits détails seront visibles.

  Votre moniteur utilise des signaux électroniques pour offrir à vos
  yeux l'image qu'ils contemplent.  Des signaux de ce type se présentent
  toujours sous la forme d'une onde une fois que l'information digitale
  a été convertie en un signal analogique.  Ils peuvent être perçus
  comme une combinaison de nombreuses ondes plus simples, chacune ayant
  une fréquence fixe, pour la plupart dans la bande des Mhz, par
  exemple, 20 Mhz, 40 Mhz, voire même 70 Mhz.  La bande passante de
  votre moniteur n'est autre, en fait, que le signal analogique de plus
  haute fréquence qu'il peut gérer sans distorsion.

  Dans le cas qui nous occupe, la bande passante vidéo est
  essentiellement importante comme limite supérieure approximative au
  niveau des fréquences pilotes qu'il vous est possible d'utiliser.


  66..22..  FFrrééqquueenncceess ddee ssyynncchhrroonniissaattiioonn eett ffrrééqquueennccee ddee rraaffrraaîîcchhiisssseemmeenntt


  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 fréquence de rafraîchissement suffisamment élevée, la persistance
  rétinienne de vos yeux vous permet de percevoir l'image complète.

  Voici quelques schémas qui vous aideront :


       _______________________
      |                       |     La fréquence de synchronisation horizontale
      |->->->->->->->->->->-> |     représente le nombre de fois
      |                      )|     par seconde que le faisceau d'électrons
      |<-----<-----<-----<--- |     du moniteur peut parcourir
      |                       |     un chemin semblable à celui-ci
      |                       |
      |                       |
      |                       |
      |_______________________|
       _______________________
      |        ^              |     La fréquence de synchronisation verticale
      |       ^ |             |     représente 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 réalité la forme d'un zigzag très serré ; cela signifie que
  le faisceau se déplace de gauche à droite et en même temps de haut en
  bas.

  Nous comprenons maintenant comment fréquence pilote (_d_o_t _c_l_o_c_k) et
  taille de trame sont liées à la fréquence de rafraîchissement.  Par
  définition, un hertz (Hz) équivaut à un cycle par seconde.  Ainsi, si
  votre longueur de trame horizontale est représentée par HFL et votre
  longueur de trame verticale par VFL, il vous faut alors (HFL * VFL)
  tics pour couvrir l'entièreté de l'écran.  Puisque votre carte émet
  DCF tics par seconde par définition, 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 représente la fréquence de
  rafraîchissement 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 nécessaire d'intégrer ce concept si vous voulez pouvoir
  mettre sur pied une configuration qui sacrifie de la résolution pour
  gagner de la stabilité (réduction de l'effet de clignotement) de la
  manière 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 capacités d'un moniteur classique.  Sur l'axe
  des x sont placées les fréquences pilotes (DCF), sur l'axe des y les
  fréquences de rafraîchissement (RR). La région noircie du diagramme
  représente les capacités du moniteur : chaque point à l'intérieur de
  cette région est un mode graphique possible.

  Les lignes marquées `R1' et `R2' symbolisent une résolution fixe
  (telle 640x480) ; le but de leur présence est de montrer comment une
  résolution donnée peut être obtenue par l'utilisation de nombreuses
  combinaisons différentes de fréquences pilotes et de fréquences de
  rafraîchissement. La ligne R2 représentera donc une plus haute
  résolution que R1.

  Les frontières haute et basse de la région noircie sont de simples
  lignes horizontales qui représentent les valeurs limites de la
  fréquence de synchronisation verticale (min VSF et max VSF). La bande
  passante vidéo (VB) est une limite supérieure à la fréquence pilote et
  apparaît donc comme une ligne verticale limitant la région noircie sur
  la droite.

  Au chapitre ``Représentation graphique des capacités 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 déduire les limites résultant des
  fréquences de synchronisation horizontale minimum et maximum.



  77..  CCoonncceessssiioonnss lloorrss ddee llaa ccoonnffiigguurraattiioonn dduu ssyyssttèèmmee


  Il existe une autre façon de formuler l'équation développée plus haut



               DCF = RR * HFL * VFL




  C'est-à-dire que vous considérez votre fréquence pilote comme fixe.
  Vous pouvez ensuite convertir ces points par seconde que vous venez
  d'économiser en fréquence de rafraîchissement, résolution horizontale,
  ou résolution verticale.  Si l'un de ces paramètres augmente, l'un ou
  les deux autres doivent diminuer.

  Notez, cependant, que votre fréquence de rafraîchissement ne peut
  excéder la fréquence de synchronisation verticale maximum de votre
  moniteur.  Ainsi, pour tout moniteur à une fréquence pilote donnée, il
  existe un produit de longueurs de trame minimum (HFL * VFL) en dessous
  duquel vous ne pourrez le faire descendre.

  Lorsque vous choisirez vos paramètres, souvenez-vous de ceci : si vous
  prenez une valeur de RR trop basse, vous serez gênés par un effet de
  clignotement.

  Il n'est pas recommandé de faire descendre votre fréquence de
  rafraîchissement en dessous des 60 Hz.  Ceci représente la fréquence
  d'oscillation des tubes fluorescents ; si vous êtes sensibles à ceux-
  ci, il vous faudra de préférence conserver les 72 Hz, le standard
  ergonomique VESA.

  L'effet de clignotement est très éprouvant pour les yeux, bien que
  l'oeil humain soit adaptable et que la tolérance individuelle au
  phénomène 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
  fréquence de rafraîchissement 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 façon à ce qu'il recouvre
  l'entièreté de la zone affichable.  Réglez ensuite votre moniteur aux
  3/4 de son intensité maximum, et détournez votre regard du moniteur.
  Essayez de le regarder en biais (de façon à forcer l'utilisation des
  cellules rétiniennes périphériques, plus sensibles).  Si vous ne
  percevez aucun effet de clignotement, ou si vous considérez celui-ci
  tolérable, cela signifie que la fréquence de rafraîchissement vous
  convient.  Dans le cas contraire il serait préférable que vous
  configuriez une fréquence de rafraîchissement plus élevée, car ce
  clignotement à la limite du perceptible fatiguera terriblement vos
  yeux et causera des maux de tête, même si l'image semble parfaite en
  vision normale.

  Dans le cas des modes entrelacés, l'importance du clignotement dépend
  de plus de facteurs différents tels la résolution verticale choisie et
  le type d'image affiché.  Il ne vous reste qu'à procéder à vos propres
  expériences.  Quoi qu'il en soit, je ne vous conseille pas de
  descendre beaucoup sous la limite des 85 Hz (fréquence par demi-
  trame).


  Partons du principe que vous avez choisi une fréquence de
  rafraîchissement représentant un minimum acceptable.  Vous aurez alors
  quelqu'espace de manoeuvre dans le choix de vos HFL et VFL.


  88..  EExxiiggeenncceess eenn tteerrmmee ddee mméémmooiirree


  La mémoire tampon de trame (_f_r_a_m_e_-_b_u_f_f_e_r _R_A_M) disponible peut limiter
  la résolution qu'il vous sera possible d'obtenir sur des écrans
  couleur ou à niveaux de gris.  Cela ne joue sans doute pas de rôle par
  contre sur des écrans qui ne peuvent afficher que deux couleurs, noir
  et blanc sans dégradé de gris.

  Pour des images en 256 couleurs, un octet de mémoire vidéo est
  nécessaire pour chaque point visible à afficher.  Ce byte contient
  l'information qui définit quel mélange de rouge, vert et bleu est
  utilisé pour son point.  Pour calculer la quantité de mémoire requise,
  multipliez le nombre de points visibles par ligne par le nombre de
  lignes visibles.  Pour un écran d'une résolution de 1024x768, cela
  ferait 1024 x 768 = 786432, ce qui correspond au nombre de points
  visibles sur l'écran.  Cela représente aussi, à raison d'un byte par
  point, le nombre de bytes de mémoire vidéo requise sur votre carte
  graphique.

  Ainsi, vos exigences en terme de mémoire seront typiquement de (HR *
  VR)/1024 Ko de VRAM, arrondis à l'unité supérieure (nous arriverions à
  768K exactement dans l'exemple précédent).  Si vous disposez de plus
  de mémoire qu'il n'est strictement nécessaire, il vous sera possible
  d'utiliser l'excédant par la création d'un écran virtuel d'une
  superficie supérieure à celle de votre écran physique.

  Cependant, si votre carte graphique n'est équipée que de 512K, il ne
  vous sera pas possible d'atteindre cette résolution.  Même si vous
  possédez un bon moniteur, à défaut d'une quantité suffisante de
  mémoire vidéo, votre ne pourrez exploiter pleinement les capacités de
  votre écran.  D'un autre côté, si votre carte SVGA est dotée d'un Méga
  de RAM, mais que votre écran ne peut afficher plus de 800x600, les
  hautes résolutions sont malgré tout hors de votre portée (voyez la
  section ``Utilisation des modes entrelacés'' pour une solution
  possible).

  Ne vous faites pas de soucis si vous disposez de plus de mémoire que
  nécessaire ; XFree86 en fera bon usage en vous permettant de faire
  dérouler votre zone affichable (voyez la documentation du fichier
  Xconfig concernant la paramétrisation de la taille de l'écran
  virtuel).  Souvenez-vous aussi qu'une carte équipée de 512 Ko de
  mémoire ne dispose pas en réalité 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 paramètre _d_e_p_t_h _4 dans Xconfig et effectivement doubler la
  résolution que votre carte pourra gérer.  Les cartes S3, par exemple,
  offrent normalement 1024x768x256.  Vous pouvez les convaincre de vous
  donner 1280x1024x16 en forçant la profondeur d'image à 4 bits.


  99..  CCaallccuull ddee llaa ttaaiillllee ddee ttrraammee


  Avertissement : cette méthode a été développée pour les moniteurs
  multi-fréquences (_m_u_l_t_i_s_y_n_c).  Elle s'appliquera sans doute aussi aux
  moniteurs à fréquence 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 possédiez une carte graphique SVGA de
  type Sigma Legend dont la fréquence pilote est de 65 MHz, et que votre
  moniteur ait une fréquence de synchronisation horizontale de 55 kHz.
  La valeur (DCF / HSF) est alors de 1181 (65 MHz = 65000 kHz; 65000/55
  = 1181).

  Et maintenant notre première astuce de magie noire.  Il vous faut
  arrondir le résultat obtenu au plus proche multiple de 8.  Cela
  s'explique par l'architecture du contrôleur VGA en usage sur les
  cartes SVGA et S3 ; ce dernier utilise un registre sur 8 bits, après
  décalage à gauche de 3 bits, pour représenter une valeur qui
  normalement occupe 11 bits.  D'autre modèles de carte comme l'ATI
  8514/A n'exigent sans doute pas cet arrondi, mais nous ne sommes pas
  sûr et l'utiliser ne peut pas nuire.  Aussi, arrondissez la longueur
  de trame horizontale utilisable vers le bas pour obtenir 1176.

  Ce résultat (DCF / HSF arrondi à un multiple de 8) représente 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 fréquence de synchronisation
  pour diminuer HSF.  Mais le revers de la médaille se manifestera par
  un effet de clignotement de plus basse fréquence et donc plus
  perceptible.

  En règle générale, 80% de la longueur de trame horizontale est
  disponible pour la résolution 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 déplacer du côté droit de l'écran au
  côté gauche, sur la ligne affichable suivante).  Dans cet exemple,
  cela représente 944 tics d'horloge.

  Dès lors, pour donner à votre image ses proportions normales de 4:3,
  fixez la résolution verticale aux 3/4 de la valeur que vous venez
  juste de calculer pour la résolution horizontale.  Toujours dans notre
  exemple, cela représente 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 revêtu d'aucun pouvoir magique ; rien ne vous
  empêche de définir des proportions qui s'écartent de la Règle 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 fréquence de
  rafraîchissement -- 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 même possible d'augmenter encore la fréquence de
  rafraîchissement, la poussant presque jusqu'à 76 Hz, en exploitant le
  fait que les moniteurs supportent souvent une fréquence de
  synchronisation horizontale supérieure 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
  décidez, soyez _s_û_r que le canon à électrons de votre moniteur accepte
  des fréquences allant jusqu'à 76 Hz en mode vertical.  (Le très
  répandu 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 générale de ce sujet. )

  Jusqu'ici, la majeure partie de ce que nous avons exposé n'est que
  simple arithmétique et connaissance de base des écrans d'affichage.
  Pas besoin de la moindre magie noire !


  1100..  MMaaggiiee nnooiirree eett iimmppuullssiioonnss ddee ssyynncchhrroonniissaattiioonn


  OK, vous venez de calculer les valeurs de HFL/VFL pour la fréquence
  pilote que vous avez choisie, vous avez trouvé une fréquence de
  rafraîchissement acceptable, et vérifié que vous disposiez d'une
  quantité suffisante de mémoire VRAM.  Passons maintenant à la vraie
  magie noire : il vous faut déterminer où et quand placer vos signaux
  de synchronisation.

  Les signaux de synchronisation contrôlent en fait les fréquences de
  balayage horizontale et verticale du moniteur.  Les valeurs HSF et VSF
  que vous avez extraites des spécifications techniques sont des
  quantités nominales, approximatives pour les fréquences de
  synchronisation maximum.  L'impulsion de synchronisation présente dans
  le signal de la carte graphique fournit au moniteur sa vitesse
  d'exécution effective.

  Vous souvenez-vous des deux schémas présentés ci-dessus ? Seule une
  partie du temps requis pour que le faisceau balaye une trame complète
  est utilisé pour construire l'image affichée (autrement dit, votre
  résolution).


  1100..11..  SSyynncchhrroonniissaattiioonn hhoorriizzoonnttaallee


  En fonction de notre définition précédente, 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 résolution horizontale de votre écran).  Il s'ensuit,
  par définition, que HR < HFL.  Pour rester pratique, supposons que les
  deux quantités démarrent au même instant comme illustré ci-après :


    |___ __ __ __ __ __ __ __ __ __ __ __ __
    |_ _ _ _ _ _ _ _ _ _ _ _                |
    |_______________________|_______________|_____
    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 utilisés à l'affichage de l'image et la limite des tics
  consacrés à la trame complète.  Pourquoi cela ?  Parce que si nous
  parvenons à ce résultat, l'image affichée ne sera pas déplacée à
  gauche ou à droite.  Elle occupera sa place assignée sur l'écran,
  recouvrant le centre de la zone affichable.

  Qui plus est, il est préférable de conserver environ 30 tics "de
  sécurité" (_g_u_a_r_d _t_i_m_e) de part et d'autre de l'impulsion de
  synchronisation.  Ces valeurs sont représentées par HGT1 et HGT2.
  Dans une configuration typique HGT1 != HGT2, mais si vous êtes en
  train de construire une configuration à partir de zéro, il vaudra
  mieux que vous commenciez vos expériences avec des valeurs égales
  (c'est-à-dire, avec l'impulsion de synchronisation centrée).

  Le symptôme d'une impulsion de synchronisation mal placée consiste en
  un déplacement de l'image sur l'écran, l'une des marges élargie à
  l'extrême tandis que l'autre côté de l'image est réfléchi sur la paroi
  latérale du tube, ce qui résulte en une ligne blanche à la limite de
  la zone affichable et une bande d'image "fantôme" du côté intérieur de
  cette ligne.  Une impulsion de synchronisation verticale excessivement
  mal placée peut aller jusqu'à provoquer un saut cyclique de l'image
  similaire à ce qu'on observe sur un poste de télévision dont on aurait
  déréglé le bouton d'ajustement vertical (c'est en fait le même
  phénomène qui est à l'oeuvre ici).

  Si vous avez de la chance, la largeur des signaux de synchronisation
  de votre moniteur sera documentée à la page des spécifications
  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 procéder par essais et
  erreurs.  Mais la plupart du temps, vous pouvez sans danger partir du
  principe qu'une impulsion de synchronisation a une durée 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 départ lorsque l'on expérimente).

  Dans cette hypothèse, sur base de la fréquence pilote de 65 Mhz
  mentionnée plus haut, nous obtenons que HSP est égal à 247 tics
  d'horloge (= 65 * 10^6 * 3.8 * 10^-6) [souvenez-vous : Méga=10^6,
  micro=10^-6].

  Certains fabricants aiment mentionner leurs paramètres de tramage
  horizontal sous forme de durée plutôt que de largeur exprimée en
  pixels.  Vous pourriez chez eux rencontrer les termes suivants :


     dduurrééee uuttiillee ((HHAATT -- _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.


     dduurrééee ddee sseerrvviiccee ((HHBBTT -- _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).


     ffeennêêttrree aavvaanntt ((HHFFPP -- _H_o_r_i_z_o_n_t_a_l _F_r_o_n_t _P_o_r_c_h)
        Synonyme d'HGT1.


     dduurrééee ddee ssyynncchhrroonniissaattiioonn
        Synonyme d'HSP.


     ffeennêêttrree aarrrriièèrree ((HHBBPP -- _H_o_r_i_z_o_n_t_a_l _B_a_c_k _P_o_r_c_h)
        Synonyme d'HGT2.






  1100..22..  SSyynncchhrroonniissaattiioonn vveerrttiiccaallee


  En nous référant à l'illustration précédente, comment placerons-nous
  les 247 tics d'horloge comme indiqué dans le graphe ?

  Toujours sur base du même exemple, nous avons HR égal à 944 et HFL
  égal à 1176.  La différence entre les deux est 1176 - 944 = 232 <
  247 !  De toute évidence, il nous faudra ici procéder à quelques
  ajustements.  Que peut-on faire ?

  La première étape est de porter 1176 à 1184, et de réduire 944 à 936
  (choix des arrondis aux multiples de 8 -- n.d.t.).  Maintenant la
  différence = 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 déjà 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 début de
  SP, et la même remarque est valable entre la fin de SP et HFL.  ET ces
  valeurs doivent être multiples de huit !  Sommes-nous dans l'impasse ?

  Non.  Procédons 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 hélas à l'horizon car l'impulsion
  de synchronisation n'est plus située juste au milieu de l'espace h -
  H.  Heureusement, grâce à 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 durée 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 problème.

  Qui plus est, l'usage de la longueur de trame horizontale présente
  requiert de notre moniteur qu'il effectue sa synchronisation à
  52.7 kHz (= 65 MHz / 1232) ce qui se situe dans les limites de ses
  capacités.  Pas de problème.

  Sur base des règles générales mentionnées plus haut, notre nouvelle
  résolution verticale sera de 936 * 75% = 702.  Notre nouvelle longueur
  de trame verticale vaudra 702 * 1.05 = 737.

  Fréquence de rafraîchissement de l'écran = 65 MHz / (737 * 1232) =
  71.6 Hz.  Cette valeur est toujours excellente.

  La représentation de l'impulsion de synchronisation verticale est très
  semblable :


     |___ __ __ __ __ __ __ __ __ __ __ __ __
     |_ _ _ _ _ _ _ _ _ _ _ _                |
     |_______________________|_______________|_____
     0                      VR              VFL     unités : tics
                             ^   ^       ^
                             |   |       |
                             |<->|<----->|
                              VGT    VSP




  Nous commençons l'impulsion de synchronisation juste après la fin des
  cycles verticaux consacrés à l'affichage réel de données.  VGT est
  l'intervalle de sécurité (_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 sécurité) et nous tirerons
  parti de cette possibilité dans cet exemple.  Un petit nombre,
  cependant, nécessitent l'emploi d'un intervalle de sécurité de 2 ou 3
  tics, et cela ne cause généralement pas grand tort de les ajouter.

  Revenons à notre exemple : puisque, suivant la définition du concept
  de longueur de trame, un tic (ou cycle) vertical représente le temps
  nécessaire pour dessiner une trame HORIZONTALE complète, il s'ensuit
  dans notre exemple qu'il vaut 1232 / 65 MHz = 18.95 s.

  L'expérience 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 paramètres de tramage
  vertical sous forme de durée plutôt que de largeur exprimée en pixels.
  Vous pourriez chez eux rencontrer les termes suivants :


     dduurrééee uuttiillee ((VVAATT -- _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.

     dduurrééee ddee sseerrvviiccee ((VVBBTT -- _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).

     ffeennêêttrree aavvaanntt ((VVFFPP -- _V_e_r_t_i_c_a_l _F_r_o_n_t _P_o_r_c_h)
        Synonyme de VGT.

     dduurrééee ddee ssyynncchhrroonniissaattiioonn
        Synonyme de VSP.

     ffeennêêttrree aarrrriièèrree ((VVBBPP -- _V_e_r_t_i_c_a_l _B_a_c_k _P_o_r_c_h)
        Une seconde temporisation de sécurité après l'impulsion de
        synchronisation verticale.  Souvent nulle.


  1111..  SSyynntthhèèssee


  La Table des Modes Vidéo du fichier Xconfig contient des séquences de
  nombres, chaque ligne définissant de façon complète un mode opératoire
  du serveur X.  Les champs sont groupés en quatre sections, à savoir
  respectivement le nom, la fréquence pilote, les paramètres horizontaux
  et les paramètres verticaux.

  La section consacrée au nom ne contient qu'un champ, le nom du mode
  vidéo défini par le reste de la ligne.  Il sera fait référence à 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 précédente s'applique à la ligne courante.

  La section de la ligne de mode consacrée à la fréquence pilote ne
  contient que ce champ-là (c'est la quantité que nous avions baptisée
  DCF).  La valeur placée dans ce champ spécifie quelle fréquence pilote
  a été utilisée pour générer les valeurs des sections suivantes.

  La section des paramètres horizontaux se compose de quatre champs qui
  définissent 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 illuminés pour créer l'image (la quantité
  que nous avons appelée HR).  Le second champ de la section (SH1)
  décrit le point où commencera l'impulsion de synchronisation
  horizontale.  Le troisième champ (SH2) décrit le point où se terminera
  cette impulsion de synchronisation.  Le quatrième champ définit la
  longueur de trame horizontale totale (HFL).

  La section des paramètres verticaux contient aussi quatre champs.  Le
  premier champ contient le nombre de lignes visibles qui apparaîtront
  sur l'écran (VR).  Le second champ (SV1) indique le numéro de la ligne
  où commencera l'impulsion de synchronisation verticale.  Le troisième
  champ (SV2) définit le numéro de ligne où se terminera cette impulsion
  de synchronisation.  Le quatrième 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
  fréquences pilotes fractionnaires.)

  Pour Xconfig, toutes les valeurs dont nous venons de parler - le
  nombre de points illuminés sur une ligne, le nombre de points séparant
  ceux qui sont illuminés du début de l'impulsion de synchronisation, le
  nombre de points représentant la durée de cette impulsion, et le
  nombre de points situés après la fin de l'impulsion de synchronisation
  - sont additionnés 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 illuminés (800)
  suivi par la coordonnée horizontale du point où commence l'impulsion
  de synchronisation (864), suivi par la coordonnée horizontale du point
  où finit cette impulsion (1024), suivi par la coordonnée 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 frappées de la même 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.  Après que la dernière ligne illuminée ait été
  affichée, un délais correspondant à un nombre précis de lignes sera
  respecté avant que l'impulsion de synchronisation verticale soit
  émise.  Cette impulsion durera alors pour quelques lignes, et
  finalement les dernières lignes de la trame, correspondant au délais
  requis après l'impulsion, seront tracées.  Les valeurs qui définissent
  ce mode opératoire sont fournies d'une manière semblable à l'exemple
  suivant.

  Exemple de valeurs verticales : 600 603 609 630

  Cet exemple définit une image composée de 600 lignes visibles, où
  l'impulsion de synchronisation verticale débute sur la 603ème ligne et
  se termine sur la 609ème, et composée d'un total global de 630 lignes.

  Remarquez que les valeurs verticales ne doivent pas nécessairement
  ê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 résultats dans le fichier Xconfig selon le format suivant :



       <nom>   DCF     HR  SH1 SH2   HFL   VR  SV1 SV2 VFL




  où SH1 représente le tic de début de l'impulsion de synchronisation
  horizontale et SH2 son tic final ; de la même manière, SV1 représente
  le tic initial de l'impulsion de synchronisation verticale et SV2 son
  tic final.

  Pour définir 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 représente
  le front arrière ; donc, SH2 = SH1 + HSP. De la même manière, SV1 = VR
  + VGT (mais VGT vaut la plupart du temps 0) et SV2 = SV1 + VSP.



       #nom     fréq.   valeurs horizontales   valeurs verticales   drapeau
       936x702  65      936 968 1200 1232      702 702 710 737




  Aucun drapeau (_f_l_a_g) spécial n'est nécessaire ici ; il s'agit d'un
  mode non-entrelacé.  Maintenant nous avons réellement terminé.


  1122..  UUssaaggee dduu mmoonniitteeuurr eenn ssuurrccaappaacciittéé


  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 fréquence de balayage supérieure s'il s'agit d'un
  moniteur à fréquence fixe.  Votre écran peut tout simplement finir
  grillé !  Avec un moniteur multi-fréquences en surcapacité, il peut
  survenir des problèmes potentiellement plus subtils, dont il est bon
  que vous soyez conscients.

  Par contre, utiliser une fréquence pilote supérieure à la bande
  passante maximum du moniteur est relativement inoffensif. C'est le
  dépassement des fréquences maximales de synchronisation qui est
  problématique. Les moniteurs modernes ont des circuits de protection
  qui éteignent l'écran aux fréquences dangereuses, mais ne comptez pas
  trop dessus. En particulier, il y a des vieux moniteurs
  multifréquences (comme le Multisync II) qui n'utilisent qu'un
  transformateur horizontal.  Ces moniteurs n'offrent pas tellement de
  protection contre leur usage en surcapacité. Même s'il y a forcément
  des circuits de régulation haute tension (qui ne sont pas nécessaires
  dans un moniteur à fréquences fixes), ils ne couvriront pas forcéments
  tous les intervalles de fréquences possibles, particulièrement dans
  les modèles bon marché.  Il n'y a pas seulement des risques pour les
  circuits, mais cela risque aussi d'accélérer 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 problèmes est la
  fréquence d'oscillation (_s_l_e_w _r_a_t_e) - la "pente" des signaux vidéo - à
  la sortie de la carte graphique, et cela ne dépend normalement pas de
  la fréquence pilote courante, mais (si le constructeur de votre carte
  se préoccupe de ces questions) est lié à la fréquence pilote maximum
  supportée par la carte.

  Aussi, soyez prudents...


  1133..  UUttiilliissaattiioonn ddeess mmooddeess eennttrreellaaccééss

  (Cette section est dûe en majeure partie à David Kastrup
  <mailto:dak@pool.informatik.rwth-aachen.de>)

  A une fréquence pilote donnée, un écran entrelacé manifestera un effet
  de clignotement considérablement moins perceptible qu'un écran non-
  entrelacé, si les circuits verticaux de votre moniteur sont capables
  de supporter cette fréquence de façon stable.  C'est la raison pour
  laquelle ces modes entrelacés furent inventés au départ.

  Les modes entrelacés doivent leur mauvaise réputation au fait que leur
  qualité est inférieure au mode non-entrelacé équivalent à la même
  fréquence de balayage verticale, VSF (celle qui est généralement
  mentionnée dans les publicités). Mais ils sont certainement d'une
  qualité supérieure à la même fréquence de balayage horizontale, et
  c'est là que se situent les limites décisives 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 donnée (ou fréquence de demi-
  trame, ou VSF) l'affichage entrelacé manifestera un clignotement plus
  fort : un affichage entrelacé à 90 Hz sera d'une qualité inférieure à
  un affichage non-entrelacé à 90 Hz. Il ne nécessitera, cependant, que
  la moitié de la bande passante vidéo et la moitié de la fréquence de
  balayage horizontale. Si vous le comparez à un mode non-entrelacé à la
  même fréquence pilote et aux mêmes fréquences de balayage, vous le
  trouverez de loin supérieur : 45 Hz non-entrelacé est intolérable.
  Avec 90 Hz entrelacé, j'ai travaillé des années 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 éléments auxquels il vous faudra prêter attention,
  cependant : n'employez les modes entrelacés qu'à des résolutions
  élevées, de sorte que les lignes illuminées 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 foncées, l'entrelacement va vous "sauter à
  la figure". J'utilise un programme qui emploie une configuration de
  points semblable pour l'arrière-plan d'un menu (il s'agit d'XCept --
  aucun autre programme à ma connaissance ne fait cela, heureusement).
  Je sélectionne toujours un mode 800x600 avant d'utiliser XCept parce
  que cela fait réellement mal aux yeux autrement.

  Pour la même 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 résolutions, cela n'a pas de sens
  d'utiliser quoi que ce soit d'autre de toute façon).

  Et bien sûr, n'utilisez jamais de mode entrelacé si votre matériel est
  capable de supporter l'emploi d'un mode non-entrelacé à la même
  fréquence de rafraîchissement.

  Si, au contraire, vous remarquez qu'à certaines résolutions vous
  poussez soit le moniteur soit la carte graphique jusqu'à ses limites,
  et que vous obtenez un clignotement désagréable ou une image délavée
  (signe que vous saturez la bande passante disponible), peut-être
  souhaiterez-vous essayer d'obtenir la même résolution par l'emploi
  d'un mode entrelacé. Ceci bien sûr 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 : procédez exactement
  comme pour un mode non-entrelacé. Il suffit de prendre en compte deux
  éléments supplémentaires : il vous faut un nombre total impair de
  lignes verticales (la dernière valeur de votre ligne de mode), et
  lorsque vous spécifiez le drapeau "Interlace", la fréquence de trame
  verticale réelle pour votre moniteur est doublée. Il faut que votre
  moniteur supporte une fréquence de trame de 90 Hz si le mode que vous
  spécifiez 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 spécifiez le même 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 inférieure de la fréquence de balayage verticale), tandis
  que vous souffrirez d'un insupportable effet de clignotement de
  l'image.

  Quelques règles 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 améliorée dans la majorité des cas.

  Si vous utilisez un mode non-entrelacé qui par ailleurs dépasse les
  spécifications de votre moniteur tandis que la fréquence 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 résolution légèrement supérieure) peut fournir
  de meilleurs résultats, mais je ne peux rien promettre.


  1144..  QQuueessttiioonnss eett rrééppoonnsseess


  Q. L'exemple présenté plus haut met en scène 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 même
  1024x768.  Les serveurs XFree86 vous offrent énormément de liberté
  lors de la configuration de votre matériel.  Il faut généralement deux
  ou trois essais pour obtenir la bonne.  L'objectif à garder en ligne
  de mire est une fréquence de rafraîchissement élevée tout en
  conservant une zone affichable de taille raisonnable. Ne visez pas une
  résolution élevée si c'est au prix d'un clignotement qui vous ruinera
  les yeux !

  Q. Est-ce là la seule résolution utilisable compte tenu d'une
  fréquence pilote de 65 MHz et d'un HSF de 55 kHz ?
  R. Pas du tout !  Nous vous exhortons au contraire à suivre la
  procédure générale décrite plus haut et à vous livrer à quelques
  expériences afin d'obtenir une configuration qui vous plaise
  réellement.  Vous livrer à ces expériences peut vous apporter
  énormément de plaisir.  La plupart des configurations risquent de ne
  produire qu'une horrible neige, mais en pratique un écran moderne
  multi-fréquences n'est pas si facile à endommager.  Soyez sûr,
  cependant, que votre moniteur peut supporter la fréquence de trame que
  vous voulez lui infliger avant de l'utiliser pour un temps
  considérable.

  Mais méfiez-vous des moniteurs à fréquence fixe !  Ce type de
  manipulations hasardeuses peut les endommager très rapidement. Soyez
  sûr que vous utilisez une fréquence de rafraîchissement supportée lors
  de _c_h_a_q_u_e tentative.

  Q. Vous n'avez fait mention que de deux résolutions standard. Dans le
  fichier Xconfig, de nombreuses résolutions 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 fréquence pilote de
  25 Mhz, les longueurs de trame sont de 800 et 525 ce qui nous donne
  une fréquence de rafraîchissement d'environ 59.5 Hz. Pas trop mal.
  Mais 28 MHz est une fréquence pilote généralement disponible sur
  nombre de cartes SVGA.  Si vous utilisiez celle-ci pour générer du
  640x480, suivant la procédure illustrée plus haut, vous obtiendriez
  des longueurs de trame de 812 (arrondi à 808) et 505.  La fréquence de
  rafraîchissement est maintenant portée à 68 Hz, ce qui représente une
  amélioration significative par rapport à la configuration standard.

  Q. Pourriez-vous résumer ce qui a été exposé jusqu'ici ?

  R. En bref :

  1. pour toute fréquence pilote donnée, une augmentation de la
     résolution maximum se paye par une diminution de la fréquence de
     rafraîchissement, ce qui induira un effet de clignotement accru.

  2. si l'obtention d'une résolution élevée s'avère nécessaire et si
     votre moniteur la supporte, essayez de vous procurer une carte SVGA
     qui fournisse une fréquence pilote (ou DCF) compatible. Plus elle
     est élevée, meilleur sera le résultat !


  1155..  RRééssoouuddrree lleess pprroobbllèèmmeess aaffffeeccttaanntt ll''iimmaaggee


  OK, ainsi donc vous disposez maintenant des valeurs nécessaires à la
  configuration de X.  Vous les avez placées dans votre fichier Xconfig,
  en choisissant pour le mode un champ "nom" qui l'identifie comme un
  test.  Vous démarrez X, vous utilisez les touches d'accès 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
  vidéo fréquentes et la façon d'y remédier.

  (Résoudre ces distorsions mineures est réellement la situation où
  xxvviiddttuunnee(1) brillera de tous ses feux.)

  Vous _d_é_p_l_a_c_e_r_e_z l'image en modifiant les coordonnées 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 déplacer l'impulsion de
  synchronisation en conséquence, de façon à la maintenir à la même
  position relative, sinon altérer la taille de l'image déplacera aussi
  celle-ci).  Voici quelques recettes plus spécifiques :
  Les positions horizontale et verticale sont indépendantes.  Par cela,
  nous entendons que déplacer l'image horizontalement n'affecte pas sa
  position verticale, et réciproquement.  Cependant, il n'en va pas tout
  à fait de même 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 fréquence pilote plus élevée pour la faire rétrécir.  Dans la
  mesure où cela se traduira par une augmentation de la résolution
  utilisable, c'est rarement un problème !


  1155..11..  LL''iimmaaggee eesstt ddéécceennttrrééee vveerrss llaa ggaauucchhee oouu llaa ddrrooiittee

  Pour y remédier, déplacez l'impulsion de synchronisation horizontale.
  C'est-à-dire, incrémentez ou décrémentez (par un multiple de 8) les
  deux valeurs médianes de la section des données horizontales qui
  déterminent les limites antérieure et postérieure de l'impulsion de
  synchronisation horizontale.

  Si l'image est décentrée vers la gauche (la marge droite étant trop
  large, vous souhaitez faire glisser l'image vers la droite)
  décrémentez les valeurs.  Si l'image est décentrée vers la droite
  (marge gauche trop large, vous voulez faire glisser l'image vers la
  gauche) incrémentez les coordonnées de l'impulsion de synchronisation.


  1155..22..  LL''iimmaaggee eesstt ddéécceennttrrééee vveerrss llee hhaauutt oouu llee bbaass

  Pour résoudre ce problème, déplacez l'impulsion de synchronisation
  verticale.  A savoir, incrémentez ou décrémentez les deux valeurs
  médianes de la section des données verticales qui déterminent les
  limites antérieure et postérieure de l'impulsion de synchronisation
  verticale.

  Si l'image est décentrée vers le haut (marge inférieure trop large,
  vous souhaitez faire glisser l'image vers le bas) décrémentez les
  valeurs.  Si l'image est décentrée vers le bas (marge supérieure trop
  large, vous souhaitez faire glisser l'image vers le haut) incrémentez
  les valeurs.


  1155..33..  LL''iimmaaggee eesstt ttrroopp ggrraannddee ddaannss lleess ddeeuuxx ddiirreeccttiioonnss

  Passez à une fréquence d'horloge supérieure sur la carte. Si vous
  disposez de nombreux modes différents dans votre fichier de
  configuration, il est possible que l'un de ceux qui exploitent une
  fréquence inférieure ait été activé par erreur.


  1155..44..  LL''iimmaaggee eesstt ttrroopp llaarrggee ((oouu ttrroopp ééttrrooiittee)) hhoorriizzoonnttaalleemmeenntt

  Pour remédier à cela, augmentez (ou diminuez) la longueur de trame
  horizontale.  C'est-à-dire, modifiez la quatrième valeur de la
  première section des coordonnées temporelles.  Pour éviter de déplacer
  l'image par la même occasion, déplacez aussi l'impulsion de
  synchronisation (deuxième et troisième valeurs) de la moitié de la
  différence, de façon à la conserver à la même position relative.


  1155..55..  LL''iimmaaggee eesstt ttrroopp ggrraannddee ((oouu ttrroopp ppeettiittee)) vveerrttiiccaalleemmeenntt

  Pour résoudre ce problème, augmentez (ou diminuez) la longueur de
  trame verticale.  C'est-à-dire, modifiez la quatrième valeur dans la
  deuxième section des coordonnées temporelles.  Pour éviter de déplacer
  l'image, n'oubliez pas de déplacer aussi l'impulsion de
  synchronisation (deuxième et troisième valeurs) de la moitié de la
  différence, pour la garder à la même position relative.

  Toute distorsion qui ne peut être éliminée en combinant ces techniques
  est probablement la preuve d'un problème plus profond, comme une
  erreur dans les calculs ou une fréquence pilote supérieure aux limites
  du moniteur.

  En dernier lieu, souvenez-vous que si vous augmentez l'une des
  longueurs de trame, vous diminuerez du même coup votre fréquence de
  rafraîchissement, et réciproquement.

  Occasionnellement, vous pouvez corriger les petites distorsions
  d'image en jouant sur les réglages de votre moniteur. Le défaut de
  cette méthode est que si vous vous éloignez trop des réglages d'usine
  pour régler les problèmes du mode graphique, vous pouvez vous
  retrouver avec une image inutilisable en mode texte. Il vaut mieux
  régler vos lignes de modes.


  1166..  RReepprréésseennttaattiioonn ggrraapphhiiqquuee ddeess ccaappaacciittééss dduu mmoonniitteeuurr


  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 caractéristiques
  de votre moniteur, fournies comme options sur la ligne de commande.

  Ci-dessous se trouve une copie de modeplot :



































  #!/bin/sh
  #
  # modeplot -- crée un graphe X des modes moniteurs disponibles
  #
  # Invoquez `modeplot -?' pour afficher les options de contrôle.
  #

  # Description du moniteur. Bande passante en MHz, fréquences horizontales
  # en kHz et fréquences verticales en Hz.
  TITLE="Viewsonic 21PS"
  BANDWIDTH=185
  MINHSF=31
  MAXHSF=85
  MINVSF=50
  MAXVSF=160
  ASPECT="4/3"
  vesa=72.5       # fréq. de rafraîchissement min. recommandée 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 contrôle de modeplot :

  -t "<description>"  nom du moniteur            défaut : "Viewsonic 21PS"
  -b <nn>                 bande passante en MHz      défaut : 185
  -h <min> <max>          HSF min & max (kHz)        défaut : 31 85
  -v <min> <max>          VSF min & max (Hz)         défaut : 50 160
  -a <aspect ratio>       proportions de l'image     défaut : 4/3
  -g "<options>"      options à transmettre à gnuplot

  La présence des paramètres -b, -h et -v est requise, -a, -t, -g sont
  optionnels.  Vous pouvez utiliser -g pour transmettre un nom de
  périphérique à gnuplot de façon à ce que (par exemple) les sorties
  produites par modeplot puissent être redirigées vers une imprimante.
  Voyez gnuplot(1) pour de plus amples détails.

  L'outil modeplot a été conçu 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 très sensible à toute
  # modification de ceux-ci, et ils pourraient être loin de la vérité dans
  # le cas de certains moniteurs.  Il nous faut déterminer des valeurs afin
  # d'obtenir même une approximation du diagramme de mode. Ces valeurs
  # proviennent d'une comparaison de nombreux exemples fournis dans la base
  # de données ModeDB.
  F1 = 1.30       # facteur de conversion résol. horiz. -> largeur de trame
  F2 = 1.05       # facteur de conversion résol. vertic. -> hauteur de trame

  # Définition de fonctions
  # (multiplier par 1.0 force l'arithmétique en nombres réels)
  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 légendes le long des axes
  set xlabel 'DCF (MHz)'
  set ylabel 'RR (Hz)' 6  # Place la légende juste au-dessus de l'axe des Y

  # Génère 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 sûr d'avoir correctement installé modeplot et
  le programme gnuplot, il vous faudra réunir les caractéristiques
  suivantes de votre moniteur :


  ·  bande passante vidéo (VB)

  ·  gamme de fréquences de synchronisation horizontale (HSF)

  ·  gamme de fréquences de synchronisation verticale (VSF)

  Le programme de tracé doit faire quelques suppositions
  simplificatrices qui ne sont pas nécessairement correctes.  C'est la
  raison pour laquelle le diagramme résultant n'est qu'une description
  relativement grossière. Ces suppositions sont les suivantes :


  1. Toutes les résolutions n'ont qu'un seul rapport de proportions
     prédéfini AR = HR/VR.  Les résolutions standard ont AR = 4/3 ou AR
     = 5/4.  Le programme modeplot suppose 4/3 par défaut, 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 fixés des résolutions horizontale
     et verticale, respectivement :




          HFL = F1 * HR
          VFL = F2 * VR




  En première approximation, prenez F1 = 1.30 et F2 = 1.05 (voyez la
  section ``Calcul de la taille de trame'').

  Maintenant considérez une fréquence de synchronisation particulière,
  HSF.  Sur base des présupposés que nous venons de mentionner, la
  valeur que prendra la fréquence pilote DCF déterminera déjà la
  fréquence de rafraîchissement 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 fréquence de rafraîchissement est égale à la fréquence pilote
  divisée par le produit des longueurs de trame :



               RR = DCF / (HFL * VFL)          (*)




  D'autre part, la longueur de trame horizontale est égale à la
  fréquence pilote divisée par la fréquence de synchronisation
  horizontale :



               HFL = DCF / HSF                 (**)




  Il est possible de réduire VFL à HFL au moyen des deux suppositions
  mentionnées plus haut :



               VFL = F2 * VR
                   = F2 * (HR / AR)
                   = (F2/F1) * HFL / AR        (***)




  En insérant (**) 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 traçons deux courbes
  de ce type pour les fréquences de synchronisation horizontale minimum
  et maximum nous obtenons les deux limites restantes de la région des
  solutions permises.

  Les lignes droites qui traversent la région des capacités représentent
  des résolutions particulières. Ceci est basé sur (*) et la deuxième
  supposition :



               RR = DCF / (HFL * VFL) = DCF / (F1 * HR * F2 * VR)




  En traçant ainsi des droites pour chacune des résolutions qui vous
  intéressent, vous pourrez immédiatement extraire du graphe les
  relations possibles entre résolution, fréquence pilote et fréquence de
  rafraîchissement dont le moniteur est capable. Remarquez que ces
  lignes ne dépendent pas des caractéristiques réelles du moniteur, mais
  bien de notre seconde supposition.

  L'outil modeplot vous offre une manière très simple de faire cela.
  Tapez modeplot -? pour afficher ses options de contrôle. Une
  invocation usuelle ressemble à ceci :



               modeplot -t "Swan SW617" -b 85 -v 50 90 -h 31 58




  Le paramètre -b spécifie la bande passante vidéo ; -v et -h
  définissent les gammes de fréquences de synchronisation horizontale et
  verticale.

  Lorsque vous consulterez le graphique produit par modeplot, conservez
  toujours présent à l'esprit le fait qu'il n'offre qu'une description
  approximative. Par exemple, il ignore les limitations imposées à HFL
  dues à ce qu'une largeur d'impulsion de synchronisation minimum est
  requise, et sa précision ne peut dépasser celle de nos suppositions.
  Il ne peut dès lors remplacer un calcul détaillé (incluant une
  certaine dose de magie noire) tel celui que nous avons présenté dans
  la section ``Synthèse''. Il devrait, cependant, vous offrir une
  meilleure perception de ce qui est possible et des concessions que
  cela implique.


  1177..  CCrrééddiittss


  L'ancêtre primordial de ce document est dû à Chin Fang
  <mailto:fangchin@leland.stanford.edu>

  Eric S. Raymond <mailto:esr@snark.thyrsus.com> a retravaillé,
  réorganisé, et largement ré-écrit l'original de Chin Fang dans le but
  de le comprendre.  Au cours de cette opération, il y a inclus la plus
  grande part d'un autre Howto écrit par Bob Crosson
  <mailto:crosson@cam.nist.gov>.

  Les informations consacrées aux modes entrelacés sont en grande partie
  dûes à 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'idée d'utiliser gnuplot pour générer des diagrammes de mode et a
  réalisé l'analyse mathématique qui soutend modeplot.  La version de
  modeplot telle qu'elle est actuellement distribuée a été repensée et
  généralisée par ESR à partir du code gnuplot original de Martin pour
  un cas précis.




























































  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
  François-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 François-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: François-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 Trümper <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 Trümper 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 Jörg 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 Jörg 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 Jörg 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'ultimoìa 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 Tøndering <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
     française

     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 Pâs <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"
                  "[AÀÁB-EÈÉF-IÌÍJ-OÒÓP-UÙÚV-Zaàáb-eèéf-iìíj-oòóp-uùúv-z]"
                  "[^AÀÁB-EÈÉF-IÌÍJ-OÒÓP-UÙÚV-Zaàáb-eèéf-iìíj-oòóp-uùúv-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 Sébastien 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'éléphant, 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 López 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
